@timardex/cluemart-shared 1.0.75 → 1.0.77

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.
@@ -76,6 +76,7 @@ __export(graphql_exports, {
76
76
  useSearchMarkets: () => useSearchMarkets,
77
77
  useSearchStallholders: () => useSearchStallholders,
78
78
  useSendChatMessage: () => useSendChatMessage,
79
+ useSetupNotificationToken: () => useSetupNotificationToken,
79
80
  useUpdateMarket: () => useUpdateMarket,
80
81
  useUpdateMarketInfo: () => useUpdateMarketInfo,
81
82
  useUpdateRelation: () => useUpdateRelation,
@@ -1035,12 +1036,35 @@ var useGetMarketInfo = (marketId) => {
1035
1036
  return { error, loading, marketInfo, refetch };
1036
1037
  };
1037
1038
 
1038
- // src/graphql/hooks/poster.ts
1039
+ // src/graphql/hooks/notifications.ts
1039
1040
  var import_client19 = require("@apollo/client");
1040
1041
 
1041
- // src/graphql/mutations/poster.ts
1042
+ // src/graphql/mutations/notification.ts
1042
1043
  var import_client18 = require("@apollo/client");
1043
- var CREATE_POSTER_MUTATION = import_client18.gql`
1044
+ var SETUP_NOTIFICATION_TOKEN_MUTATION = import_client18.gql`
1045
+ mutation setupNotificationToken($token: String!) {
1046
+ setupNotificationToken(token: $token)
1047
+ }
1048
+ `;
1049
+
1050
+ // src/graphql/hooks/notifications.ts
1051
+ var useSetupNotificationToken = () => {
1052
+ const [setupNotificationToken, { loading, error }] = (0, import_client19.useMutation)(
1053
+ SETUP_NOTIFICATION_TOKEN_MUTATION
1054
+ );
1055
+ return {
1056
+ error,
1057
+ loading,
1058
+ setupNotificationToken
1059
+ };
1060
+ };
1061
+
1062
+ // src/graphql/hooks/poster.ts
1063
+ var import_client21 = require("@apollo/client");
1064
+
1065
+ // src/graphql/mutations/poster.ts
1066
+ var import_client20 = require("@apollo/client");
1067
+ var CREATE_POSTER_MUTATION = import_client20.gql`
1044
1068
  mutation createPoster($input: PosterInputType!) {
1045
1069
  createPoster(input: $input) {
1046
1070
  message
@@ -1050,21 +1074,21 @@ var CREATE_POSTER_MUTATION = import_client18.gql`
1050
1074
 
1051
1075
  // src/graphql/hooks/poster.ts
1052
1076
  var useCreatePoster = () => {
1053
- const [createPoster, { loading, error }] = (0, import_client19.useMutation)(
1077
+ const [createPoster, { loading, error }] = (0, import_client21.useMutation)(
1054
1078
  CREATE_POSTER_MUTATION
1055
1079
  );
1056
1080
  return { createPoster, error, loading };
1057
1081
  };
1058
1082
 
1059
1083
  // src/graphql/hooks/relation/hooksMutation.ts
1060
- var import_client22 = require("@apollo/client");
1084
+ var import_client24 = require("@apollo/client");
1061
1085
 
1062
1086
  // src/graphql/mutations/relation.ts
1063
- var import_client21 = require("@apollo/client");
1087
+ var import_client23 = require("@apollo/client");
1064
1088
 
1065
1089
  // src/graphql/queries/relation.ts
1066
- var import_client20 = require("@apollo/client");
1067
- var RELATION_DATES_FRAGMENT = import_client20.gql`
1090
+ var import_client22 = require("@apollo/client");
1091
+ var RELATION_DATES_FRAGMENT = import_client22.gql`
1068
1092
  fragment RelationDates on RelationDateType {
1069
1093
  lastUpdateBy
1070
1094
  paymentReference
@@ -1078,7 +1102,7 @@ var RELATION_DATES_FRAGMENT = import_client20.gql`
1078
1102
  status
1079
1103
  }
1080
1104
  `;
1081
- var RELATION_FIELDS_FRAGMENT = import_client20.gql`
1105
+ var RELATION_FIELDS_FRAGMENT = import_client22.gql`
1082
1106
  fragment RelationFields on RelationType {
1083
1107
  _id
1084
1108
  apiMessage
@@ -1095,7 +1119,7 @@ var RELATION_FIELDS_FRAGMENT = import_client20.gql`
1095
1119
  }
1096
1120
  ${RELATION_DATES_FRAGMENT}
1097
1121
  `;
1098
- var GET_RELATION = import_client20.gql`
1122
+ var GET_RELATION = import_client22.gql`
1099
1123
  query getRelation($id: ID!) {
1100
1124
  relation(_id: $id) {
1101
1125
  ...RelationFields
@@ -1103,7 +1127,7 @@ var GET_RELATION = import_client20.gql`
1103
1127
  }
1104
1128
  ${RELATION_FIELDS_FRAGMENT}
1105
1129
  `;
1106
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client20.gql`
1130
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client22.gql`
1107
1131
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
1108
1132
  relationByMarketAndStallholder(
1109
1133
  marketId: $marketId
@@ -1114,7 +1138,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client20.gql`
1114
1138
  }
1115
1139
  ${RELATION_FIELDS_FRAGMENT}
1116
1140
  `;
1117
- var GET_MARKET_RELATIONS = import_client20.gql`
1141
+ var GET_MARKET_RELATIONS = import_client22.gql`
1118
1142
  query getMarketRelations($marketId: ID!) {
1119
1143
  marketRelations(marketId: $marketId) {
1120
1144
  ...RelationFields
@@ -1122,7 +1146,7 @@ var GET_MARKET_RELATIONS = import_client20.gql`
1122
1146
  }
1123
1147
  ${RELATION_FIELDS_FRAGMENT}
1124
1148
  `;
1125
- var GET_STALLHOLDER_RELATIONS = import_client20.gql`
1149
+ var GET_STALLHOLDER_RELATIONS = import_client22.gql`
1126
1150
  query getStallholderRelations($stallholderId: ID!) {
1127
1151
  stallholderRelations(stallholderId: $stallholderId) {
1128
1152
  ...RelationFields
@@ -1130,7 +1154,7 @@ var GET_STALLHOLDER_RELATIONS = import_client20.gql`
1130
1154
  }
1131
1155
  ${RELATION_FIELDS_FRAGMENT}
1132
1156
  `;
1133
- var GET_RESOURCE_CONNECTIONS = import_client20.gql`
1157
+ var GET_RESOURCE_CONNECTIONS = import_client22.gql`
1134
1158
  query getResourceConnections(
1135
1159
  $resourceId: ID!
1136
1160
  $resourceType: ResourceTypeEnum!
@@ -1233,7 +1257,7 @@ var GET_RESOURCE_CONNECTIONS = import_client20.gql`
1233
1257
  `;
1234
1258
 
1235
1259
  // src/graphql/mutations/relation.ts
1236
- var CREATE_RELATION_MUTATION = import_client21.gql`
1260
+ var CREATE_RELATION_MUTATION = import_client23.gql`
1237
1261
  mutation createRelation($input: RelationInputType!) {
1238
1262
  createRelation(input: $input) {
1239
1263
  ...RelationFields
@@ -1241,7 +1265,7 @@ var CREATE_RELATION_MUTATION = import_client21.gql`
1241
1265
  }
1242
1266
  ${RELATION_FIELDS_FRAGMENT}
1243
1267
  `;
1244
- var UPDATE_RELATION_MUTATION = import_client21.gql`
1268
+ var UPDATE_RELATION_MUTATION = import_client23.gql`
1245
1269
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
1246
1270
  updateRelation(_id: $_id, input: $input) {
1247
1271
  ...RelationFields
@@ -1249,7 +1273,7 @@ var UPDATE_RELATION_MUTATION = import_client21.gql`
1249
1273
  }
1250
1274
  ${RELATION_FIELDS_FRAGMENT}
1251
1275
  `;
1252
- var DELETE_RELATION_MUTATION = import_client21.gql`
1276
+ var DELETE_RELATION_MUTATION = import_client23.gql`
1253
1277
  mutation deleteRelation($_id: ID!) {
1254
1278
  deleteRelation(_id: $_id) {
1255
1279
  ...RelationFields
@@ -1261,7 +1285,7 @@ var DELETE_RELATION_MUTATION = import_client21.gql`
1261
1285
  // src/graphql/hooks/relation/hooksMutation.ts
1262
1286
  var fetchPolicy = "no-cache";
1263
1287
  var useCreateRelation = () => {
1264
- const [createRelation, { loading, error }] = (0, import_client22.useMutation)(
1288
+ const [createRelation, { loading, error }] = (0, import_client24.useMutation)(
1265
1289
  CREATE_RELATION_MUTATION,
1266
1290
  {
1267
1291
  awaitRefetchQueries: true,
@@ -1313,7 +1337,7 @@ var useCreateRelation = () => {
1313
1337
  return { createRelation, error, loading };
1314
1338
  };
1315
1339
  var useUpdateRelation = () => {
1316
- const [updateRelation, { loading, error }] = (0, import_client22.useMutation)(
1340
+ const [updateRelation, { loading, error }] = (0, import_client24.useMutation)(
1317
1341
  UPDATE_RELATION_MUTATION,
1318
1342
  {
1319
1343
  awaitRefetchQueries: true,
@@ -1361,7 +1385,7 @@ var useUpdateRelation = () => {
1361
1385
  return { error, loading, updateRelation };
1362
1386
  };
1363
1387
  var useDeleteRelation = () => {
1364
- const [deleteRelation, { loading, error }] = (0, import_client22.useMutation)(
1388
+ const [deleteRelation, { loading, error }] = (0, import_client24.useMutation)(
1365
1389
  DELETE_RELATION_MUTATION,
1366
1390
  {
1367
1391
  awaitRefetchQueries: true,
@@ -1409,9 +1433,9 @@ var useDeleteRelation = () => {
1409
1433
  };
1410
1434
 
1411
1435
  // src/graphql/hooks/relation/hooksQuery.ts
1412
- var import_client23 = require("@apollo/client");
1436
+ var import_client25 = require("@apollo/client");
1413
1437
  var useGetRelation = (id) => {
1414
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(GET_RELATION, {
1438
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_RELATION, {
1415
1439
  fetchPolicy: "network-only",
1416
1440
  skip: id === "",
1417
1441
  variables: { id }
@@ -1420,7 +1444,7 @@ var useGetRelation = (id) => {
1420
1444
  return { error, loading, refetch, relation };
1421
1445
  };
1422
1446
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1423
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(
1447
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(
1424
1448
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1425
1449
  {
1426
1450
  fetchPolicy: "network-only",
@@ -1432,7 +1456,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1432
1456
  return { error, loading, refetch, relationByMarketAndStallholder };
1433
1457
  };
1434
1458
  var useGetMarketRelations = (marketId) => {
1435
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(GET_MARKET_RELATIONS, {
1459
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_MARKET_RELATIONS, {
1436
1460
  fetchPolicy: "network-only",
1437
1461
  skip: marketId === "",
1438
1462
  variables: { marketId }
@@ -1441,7 +1465,7 @@ var useGetMarketRelations = (marketId) => {
1441
1465
  return { error, loading, marketRelations, refetch };
1442
1466
  };
1443
1467
  var useGetStallholderRelations = (stallholderId) => {
1444
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(
1468
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(
1445
1469
  GET_STALLHOLDER_RELATIONS,
1446
1470
  {
1447
1471
  fetchPolicy: "network-only",
@@ -1453,7 +1477,7 @@ var useGetStallholderRelations = (stallholderId) => {
1453
1477
  return { error, loading, refetch, stallholderRelations };
1454
1478
  };
1455
1479
  var useGetResourceConnections = (resourceId, resourceType) => {
1456
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(GET_RESOURCE_CONNECTIONS, {
1480
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_RESOURCE_CONNECTIONS, {
1457
1481
  fetchPolicy: "network-only",
1458
1482
  variables: { resourceId, resourceType }
1459
1483
  });
@@ -1462,11 +1486,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
1462
1486
  };
1463
1487
 
1464
1488
  // src/graphql/hooks/stallholder/hooksMutation.ts
1465
- var import_client25 = require("@apollo/client");
1489
+ var import_client27 = require("@apollo/client");
1466
1490
 
1467
1491
  // src/graphql/mutations/stallholder.ts
1468
- var import_client24 = require("@apollo/client");
1469
- var CREATE_STALLHOLDER_MUTATION = import_client24.gql`
1492
+ var import_client26 = require("@apollo/client");
1493
+ var CREATE_STALLHOLDER_MUTATION = import_client26.gql`
1470
1494
  mutation createStallholder($input: StallholderInputType!) {
1471
1495
  createStallholder(input: $input) {
1472
1496
  ...StallholderFields
@@ -1474,7 +1498,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client24.gql`
1474
1498
  }
1475
1499
  ${STALLHOLDER}
1476
1500
  `;
1477
- var UPDATE_STALLHOLDER_MUTATION = import_client24.gql`
1501
+ var UPDATE_STALLHOLDER_MUTATION = import_client26.gql`
1478
1502
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
1479
1503
  updateStallholder(_id: $_id, input: $input) {
1480
1504
  ...StallholderFields
@@ -1482,12 +1506,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client24.gql`
1482
1506
  }
1483
1507
  ${STALLHOLDER}
1484
1508
  `;
1485
- var DELETE_STALLHOLDER_MUTATION = import_client24.gql`
1509
+ var DELETE_STALLHOLDER_MUTATION = import_client26.gql`
1486
1510
  mutation deleteStallholder($_id: ID!) {
1487
1511
  deleteStallholder(_id: $_id)
1488
1512
  }
1489
1513
  `;
1490
- var CREATE_STALLHOLDER_INFO_MUTATION = import_client24.gql`
1514
+ var CREATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
1491
1515
  mutation createStallholderInfo($input: StallholderInfoInputType!) {
1492
1516
  createStallholderInfo(input: $input) {
1493
1517
  ...StallholderInfoFields
@@ -1495,7 +1519,7 @@ var CREATE_STALLHOLDER_INFO_MUTATION = import_client24.gql`
1495
1519
  }
1496
1520
  ${STALLHOLDER_INFO}
1497
1521
  `;
1498
- var UPDATE_STALLHOLDER_INFO_MUTATION = import_client24.gql`
1522
+ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
1499
1523
  mutation updateStallholderInfo($_id: ID!, $input: StallholderInfoInputType!) {
1500
1524
  updateStallholderInfo(_id: $_id, input: $input) {
1501
1525
  ...StallholderInfoFields
@@ -1506,7 +1530,7 @@ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client24.gql`
1506
1530
 
1507
1531
  // src/graphql/hooks/stallholder/hooksMutation.ts
1508
1532
  var useCreateStallholder = () => {
1509
- const [createStallholder, { loading, error }] = (0, import_client25.useMutation)(
1533
+ const [createStallholder, { loading, error }] = (0, import_client27.useMutation)(
1510
1534
  CREATE_STALLHOLDER_MUTATION,
1511
1535
  {
1512
1536
  awaitRefetchQueries: true,
@@ -1518,7 +1542,7 @@ var useCreateStallholder = () => {
1518
1542
  return { createStallholder, error, loading };
1519
1543
  };
1520
1544
  var useUpdateStallholder = () => {
1521
- const [updateStallholder, { loading, error }] = (0, import_client25.useMutation)(
1545
+ const [updateStallholder, { loading, error }] = (0, import_client27.useMutation)(
1522
1546
  UPDATE_STALLHOLDER_MUTATION,
1523
1547
  {
1524
1548
  awaitRefetchQueries: true,
@@ -1530,7 +1554,7 @@ var useUpdateStallholder = () => {
1530
1554
  return { error, loading, updateStallholder };
1531
1555
  };
1532
1556
  var useDeleteStallholder = () => {
1533
- const [deleteStallholder, { loading, error }] = (0, import_client25.useMutation)(
1557
+ const [deleteStallholder, { loading, error }] = (0, import_client27.useMutation)(
1534
1558
  DELETE_STALLHOLDER_MUTATION,
1535
1559
  {
1536
1560
  awaitRefetchQueries: true,
@@ -1542,7 +1566,7 @@ var useDeleteStallholder = () => {
1542
1566
  return { deleteStallholder, error, loading };
1543
1567
  };
1544
1568
  var useCreateStallholderInfo = () => {
1545
- const [createStallholderInfo, { loading, error }] = (0, import_client25.useMutation)(
1569
+ const [createStallholderInfo, { loading, error }] = (0, import_client27.useMutation)(
1546
1570
  CREATE_STALLHOLDER_INFO_MUTATION,
1547
1571
  {
1548
1572
  awaitRefetchQueries: true,
@@ -1566,7 +1590,7 @@ var useCreateStallholderInfo = () => {
1566
1590
  return { createStallholderInfo, error, loading };
1567
1591
  };
1568
1592
  var useUpdateStallholderInfo = () => {
1569
- const [updateStallholderInfo, { loading, error }] = (0, import_client25.useMutation)(
1593
+ const [updateStallholderInfo, { loading, error }] = (0, import_client27.useMutation)(
1570
1594
  UPDATE_STALLHOLDER_INFO_MUTATION,
1571
1595
  {
1572
1596
  awaitRefetchQueries: true,
@@ -1587,9 +1611,9 @@ var useUpdateStallholderInfo = () => {
1587
1611
  };
1588
1612
 
1589
1613
  // src/graphql/hooks/stallholder/hooksQuery.ts
1590
- var import_client26 = require("@apollo/client");
1614
+ var import_client28 = require("@apollo/client");
1591
1615
  var useGetStallholders = () => {
1592
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(GET_STALLHOLDERS, {
1616
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDERS, {
1593
1617
  fetchPolicy: "network-only"
1594
1618
  });
1595
1619
  const stallholders = data?.stallholders;
@@ -1601,7 +1625,7 @@ var useGetStallholders = () => {
1601
1625
  };
1602
1626
  };
1603
1627
  var useGetStallholder = (_id) => {
1604
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(GET_STALLHOLDER, {
1628
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDER, {
1605
1629
  fetchPolicy: "network-only",
1606
1630
  skip: !_id,
1607
1631
  variables: { _id }
@@ -1610,7 +1634,7 @@ var useGetStallholder = (_id) => {
1610
1634
  return { error, loading, refetch, stallholder };
1611
1635
  };
1612
1636
  var useGetStallholdersByRegion = (region) => {
1613
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(
1637
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(
1614
1638
  GET_STALLHOLDERS_BY_REGION,
1615
1639
  {
1616
1640
  fetchPolicy: "no-cache",
@@ -1622,7 +1646,7 @@ var useGetStallholdersByRegion = (region) => {
1622
1646
  return { error, loading, refetch, stallholdersByRegion };
1623
1647
  };
1624
1648
  var useSearchStallholders = (search, region) => {
1625
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(SEARCH_STALLHOLDERS, {
1649
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(SEARCH_STALLHOLDERS, {
1626
1650
  fetchPolicy: "network-only",
1627
1651
  skip: search.length < 3,
1628
1652
  variables: { region, search }
@@ -1631,7 +1655,7 @@ var useSearchStallholders = (search, region) => {
1631
1655
  return { error, loading, refetch, stallholderSearch };
1632
1656
  };
1633
1657
  var useGetStallholderInfo = (stallholderId) => {
1634
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(GET_STALLHOLDER_INFO, {
1658
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDER_INFO, {
1635
1659
  fetchPolicy: "network-only",
1636
1660
  skip: !stallholderId,
1637
1661
  variables: { stallholderId }
@@ -1646,11 +1670,11 @@ var useGetStallholderInfo = (stallholderId) => {
1646
1670
  };
1647
1671
 
1648
1672
  // src/graphql/hooks/subscriptions.ts
1649
- var import_client29 = require("@apollo/client");
1673
+ var import_client31 = require("@apollo/client");
1650
1674
 
1651
1675
  // src/graphql/subscriptions/chat.ts
1652
- var import_client27 = require("@apollo/client");
1653
- var GET_CHAT_MESSAGE = import_client27.gql`
1676
+ var import_client29 = require("@apollo/client");
1677
+ var GET_CHAT_MESSAGE = import_client29.gql`
1654
1678
  subscription {
1655
1679
  getChatMessage {
1656
1680
  ...ChatFields
@@ -1660,8 +1684,8 @@ var GET_CHAT_MESSAGE = import_client27.gql`
1660
1684
  `;
1661
1685
 
1662
1686
  // src/graphql/subscriptions/notification.ts
1663
- var import_client28 = require("@apollo/client");
1664
- var NOTIFICATION_FIELDS_FRAGMENT = import_client28.gql`
1687
+ var import_client30 = require("@apollo/client");
1688
+ var NOTIFICATION_FIELDS_FRAGMENT = import_client30.gql`
1665
1689
  fragment NotificationFields on NotificationType {
1666
1690
  createdBy
1667
1691
  important
@@ -1671,7 +1695,7 @@ var NOTIFICATION_FIELDS_FRAGMENT = import_client28.gql`
1671
1695
  resourceType
1672
1696
  }
1673
1697
  `;
1674
- var GET_GLOBAL_NOTIFICATION = import_client28.gql`
1698
+ var GET_GLOBAL_NOTIFICATION = import_client30.gql`
1675
1699
  subscription {
1676
1700
  getGlobalNotification {
1677
1701
  ...NotificationFields
@@ -1679,7 +1703,7 @@ var GET_GLOBAL_NOTIFICATION = import_client28.gql`
1679
1703
  }
1680
1704
  ${NOTIFICATION_FIELDS_FRAGMENT}
1681
1705
  `;
1682
- var GET_RELATION_NOTIFICATION = import_client28.gql`
1706
+ var GET_RELATION_NOTIFICATION = import_client30.gql`
1683
1707
  subscription {
1684
1708
  getRelationNotification {
1685
1709
  ...NotificationFields
@@ -1694,32 +1718,32 @@ var useGetNotification = () => {
1694
1718
  data: global,
1695
1719
  loading: loadingGlobal,
1696
1720
  error: errorGlobal
1697
- } = (0, import_client29.useSubscription)(GET_GLOBAL_NOTIFICATION);
1721
+ } = (0, import_client31.useSubscription)(GET_GLOBAL_NOTIFICATION);
1698
1722
  const {
1699
1723
  data: relation,
1700
1724
  loading: loadingImportant,
1701
1725
  error: errorImportant
1702
- } = (0, import_client29.useSubscription)(GET_RELATION_NOTIFICATION);
1726
+ } = (0, import_client31.useSubscription)(GET_RELATION_NOTIFICATION);
1703
1727
  const error = errorGlobal || errorImportant;
1704
1728
  const loading = loadingGlobal || loadingImportant;
1705
1729
  const notification = relation?.getRelationNotification || global?.getGlobalNotification;
1706
1730
  return { error, loading, notification };
1707
1731
  };
1708
1732
  var useGetChatSubscription = () => {
1709
- const { data, loading, error } = (0, import_client29.useSubscription)(GET_CHAT_MESSAGE);
1733
+ const { data, loading, error } = (0, import_client31.useSubscription)(GET_CHAT_MESSAGE);
1710
1734
  const chat = data?.getChat;
1711
1735
  return { chat, error, loading };
1712
1736
  };
1713
1737
 
1714
1738
  // src/graphql/hooks/testers/hooksMutation.ts
1715
- var import_client32 = require("@apollo/client");
1739
+ var import_client34 = require("@apollo/client");
1716
1740
 
1717
1741
  // src/graphql/mutations/testers.ts
1718
- var import_client31 = require("@apollo/client");
1742
+ var import_client33 = require("@apollo/client");
1719
1743
 
1720
1744
  // src/graphql/queries/testers.ts
1721
- var import_client30 = require("@apollo/client");
1722
- var TESTER_FIELDS_FRAGMENT = import_client30.gql`
1745
+ var import_client32 = require("@apollo/client");
1746
+ var TESTER_FIELDS_FRAGMENT = import_client32.gql`
1723
1747
  fragment TesterFields on TesterType {
1724
1748
  _id
1725
1749
  active
@@ -1732,7 +1756,7 @@ var TESTER_FIELDS_FRAGMENT = import_client30.gql`
1732
1756
  updatedAt
1733
1757
  }
1734
1758
  `;
1735
- var GET_TESTERS = import_client30.gql`
1759
+ var GET_TESTERS = import_client32.gql`
1736
1760
  query getTesters {
1737
1761
  testers {
1738
1762
  ...TesterFields
@@ -1740,7 +1764,7 @@ var GET_TESTERS = import_client30.gql`
1740
1764
  }
1741
1765
  ${TESTER_FIELDS_FRAGMENT}
1742
1766
  `;
1743
- var GET_TESTER = import_client30.gql`
1767
+ var GET_TESTER = import_client32.gql`
1744
1768
  query getTester($_id: ID!) {
1745
1769
  tester(_id: $_id) {
1746
1770
  ...TesterFields
@@ -1750,7 +1774,7 @@ var GET_TESTER = import_client30.gql`
1750
1774
  `;
1751
1775
 
1752
1776
  // src/graphql/mutations/testers.ts
1753
- var CREATE_TESTER_MUTATION = import_client31.gql`
1777
+ var CREATE_TESTER_MUTATION = import_client33.gql`
1754
1778
  mutation createTester($input: TesterInputType!) {
1755
1779
  createTester(input: $input) {
1756
1780
  ...TesterFields
@@ -1758,7 +1782,7 @@ var CREATE_TESTER_MUTATION = import_client31.gql`
1758
1782
  }
1759
1783
  ${TESTER_FIELDS_FRAGMENT}
1760
1784
  `;
1761
- var UPDATE_TESTER_MUTATION = import_client31.gql`
1785
+ var UPDATE_TESTER_MUTATION = import_client33.gql`
1762
1786
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
1763
1787
  updateTester(_id: $_id, input: $input) {
1764
1788
  ...TesterFields
@@ -1766,7 +1790,7 @@ var UPDATE_TESTER_MUTATION = import_client31.gql`
1766
1790
  }
1767
1791
  ${TESTER_FIELDS_FRAGMENT}
1768
1792
  `;
1769
- var DELETE_TESTER_MUTATION = import_client31.gql`
1793
+ var DELETE_TESTER_MUTATION = import_client33.gql`
1770
1794
  mutation deleteTester($_id: ID!) {
1771
1795
  deleteTester(_id: $_id)
1772
1796
  }
@@ -1774,7 +1798,7 @@ var DELETE_TESTER_MUTATION = import_client31.gql`
1774
1798
 
1775
1799
  // src/graphql/hooks/testers/hooksMutation.ts
1776
1800
  var useCreateTester = () => {
1777
- const [createTester, { data, loading, error }] = (0, import_client32.useMutation)(
1801
+ const [createTester, { data, loading, error }] = (0, import_client34.useMutation)(
1778
1802
  CREATE_TESTER_MUTATION
1779
1803
  );
1780
1804
  return {
@@ -1785,7 +1809,7 @@ var useCreateTester = () => {
1785
1809
  };
1786
1810
  };
1787
1811
  var useUpdateTester = () => {
1788
- const [updateTester, { data, loading, error }] = (0, import_client32.useMutation)(
1812
+ const [updateTester, { data, loading, error }] = (0, import_client34.useMutation)(
1789
1813
  UPDATE_TESTER_MUTATION
1790
1814
  );
1791
1815
  return {
@@ -1796,16 +1820,16 @@ var useUpdateTester = () => {
1796
1820
  };
1797
1821
  };
1798
1822
  var useDeleteTester = () => {
1799
- const [deleteTester, { loading, error }] = (0, import_client32.useMutation)(
1823
+ const [deleteTester, { loading, error }] = (0, import_client34.useMutation)(
1800
1824
  DELETE_TESTER_MUTATION
1801
1825
  );
1802
1826
  return { deleteTester, error, loading };
1803
1827
  };
1804
1828
 
1805
1829
  // src/graphql/hooks/testers/hooksQuery.ts
1806
- var import_client33 = require("@apollo/client");
1830
+ var import_client35 = require("@apollo/client");
1807
1831
  var useGetTesters = () => {
1808
- const { data, loading, error, refetch } = (0, import_client33.useQuery)(GET_TESTERS);
1832
+ const { data, loading, error, refetch } = (0, import_client35.useQuery)(GET_TESTERS);
1809
1833
  const testers = data?.testers;
1810
1834
  return {
1811
1835
  error,
@@ -1815,7 +1839,7 @@ var useGetTesters = () => {
1815
1839
  };
1816
1840
  };
1817
1841
  var useGetTester = (_id) => {
1818
- const { data, loading, error, refetch } = (0, import_client33.useQuery)(GET_TESTER, {
1842
+ const { data, loading, error, refetch } = (0, import_client35.useQuery)(GET_TESTER, {
1819
1843
  skip: !_id,
1820
1844
  variables: { _id }
1821
1845
  });
@@ -1824,11 +1848,11 @@ var useGetTester = (_id) => {
1824
1848
  };
1825
1849
 
1826
1850
  // src/graphql/hooks/user/hooksMutation.ts
1827
- var import_client35 = require("@apollo/client");
1851
+ var import_client37 = require("@apollo/client");
1828
1852
 
1829
1853
  // src/graphql/mutations/user.ts
1830
- var import_client34 = require("@apollo/client");
1831
- var CREATE_USER_MUTATION = import_client34.gql`
1854
+ var import_client36 = require("@apollo/client");
1855
+ var CREATE_USER_MUTATION = import_client36.gql`
1832
1856
  mutation createUser($input: UserInputType!) {
1833
1857
  createUser(input: $input) {
1834
1858
  ...UserFields
@@ -1836,7 +1860,7 @@ var CREATE_USER_MUTATION = import_client34.gql`
1836
1860
  }
1837
1861
  ${USER_FIELDS_FRAGMENT}
1838
1862
  `;
1839
- var UPDATE_USER_MUTATION = import_client34.gql`
1863
+ var UPDATE_USER_MUTATION = import_client36.gql`
1840
1864
  mutation updateUser($_id: ID!, $input: UserInputType!) {
1841
1865
  updateUser(_id: $_id, input: $input) {
1842
1866
  ...UserFields
@@ -1844,12 +1868,12 @@ var UPDATE_USER_MUTATION = import_client34.gql`
1844
1868
  }
1845
1869
  ${USER_FIELDS_FRAGMENT}
1846
1870
  `;
1847
- var DELETE_USER_MUTATION = import_client34.gql`
1871
+ var DELETE_USER_MUTATION = import_client36.gql`
1848
1872
  mutation deleteUser($_id: ID!) {
1849
1873
  deleteUser(_id: $_id)
1850
1874
  }
1851
1875
  `;
1852
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
1876
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client36.gql`
1853
1877
  mutation addUserFavouriteResource(
1854
1878
  $resourceId: ID!
1855
1879
  $resourceType: ResourceTypeEnum!
@@ -1865,7 +1889,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
1865
1889
  }
1866
1890
  ${USER_FIELDS_FRAGMENT}
1867
1891
  `;
1868
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
1892
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client36.gql`
1869
1893
  mutation removeUserFavouriteResource(
1870
1894
  $resourceId: ID!
1871
1895
  $resourceType: ResourceTypeEnum!
@@ -1884,11 +1908,11 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
1884
1908
 
1885
1909
  // src/graphql/hooks/user/hooksMutation.ts
1886
1910
  var useCreateUser = () => {
1887
- const [createUser, { loading, error }] = (0, import_client35.useMutation)(CREATE_USER_MUTATION);
1911
+ const [createUser, { loading, error }] = (0, import_client37.useMutation)(CREATE_USER_MUTATION);
1888
1912
  return { createUser, error, loading };
1889
1913
  };
1890
1914
  var useUpdateUser = () => {
1891
- const [updateUser, { loading, error }] = (0, import_client35.useMutation)(UPDATE_USER_MUTATION, {
1915
+ const [updateUser, { loading, error }] = (0, import_client37.useMutation)(UPDATE_USER_MUTATION, {
1892
1916
  awaitRefetchQueries: true,
1893
1917
  refetchQueries: (mutationResult) => {
1894
1918
  const userId = mutationResult?.data?.updateUser?._id;
@@ -1899,11 +1923,11 @@ var useUpdateUser = () => {
1899
1923
  return { error, loading, updateUser };
1900
1924
  };
1901
1925
  var useDeleteUser = () => {
1902
- const [deleteUser, { loading, error }] = (0, import_client35.useMutation)(DELETE_USER_MUTATION);
1926
+ const [deleteUser, { loading, error }] = (0, import_client37.useMutation)(DELETE_USER_MUTATION);
1903
1927
  return { deleteUser, error, loading };
1904
1928
  };
1905
1929
  var useAddUserFavouriteResource = () => {
1906
- const [addUserFavouriteResource, { loading, error }] = (0, import_client35.useMutation)(
1930
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client37.useMutation)(
1907
1931
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
1908
1932
  {
1909
1933
  awaitRefetchQueries: true,
@@ -1913,7 +1937,7 @@ var useAddUserFavouriteResource = () => {
1913
1937
  return { addUserFavouriteResource, error, loading };
1914
1938
  };
1915
1939
  var useRemoveUserFavouriteResource = () => {
1916
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client35.useMutation)(
1940
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client37.useMutation)(
1917
1941
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
1918
1942
  {
1919
1943
  awaitRefetchQueries: true,
@@ -1924,37 +1948,37 @@ var useRemoveUserFavouriteResource = () => {
1924
1948
  };
1925
1949
 
1926
1950
  // src/graphql/hooks/user/hooksQuery.ts
1927
- var import_client36 = require("@apollo/client");
1951
+ var import_client38 = require("@apollo/client");
1928
1952
  var useGetUsers = () => {
1929
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USERS, {
1953
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USERS, {
1930
1954
  fetchPolicy: "network-only"
1931
1955
  });
1932
1956
  const users = data?.users;
1933
1957
  return { error, loading, refetch, users };
1934
1958
  };
1935
1959
  var useGetUser = (_id) => {
1936
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER, {
1960
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER, {
1937
1961
  variables: { _id }
1938
1962
  });
1939
1963
  const user = data?.user;
1940
1964
  return { error, loading, refetch, user };
1941
1965
  };
1942
1966
  var useGetUserMarkets = () => {
1943
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_MARKETS, {
1967
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER_MARKETS, {
1944
1968
  fetchPolicy: "network-only"
1945
1969
  });
1946
1970
  const userMarkets = data?.userMarkets;
1947
1971
  return { error, loading, refetch, userMarkets };
1948
1972
  };
1949
1973
  var useGetUserStallholder = () => {
1950
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_STALLHOLDER, {
1974
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER_STALLHOLDER, {
1951
1975
  fetchPolicy: "network-only"
1952
1976
  });
1953
1977
  const userStallholder = data?.userStallholder;
1954
1978
  return { error, loading, refetch, userStallholder };
1955
1979
  };
1956
1980
  var useGetUserFavourites = () => {
1957
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_FAVOURITES, {
1981
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER_FAVOURITES, {
1958
1982
  fetchPolicy: "network-only"
1959
1983
  });
1960
1984
  const markets = data?.userFavourites.markets;
@@ -1966,7 +1990,7 @@ var useGetUserFavourites = () => {
1966
1990
  return { error, loading, refetch, userFavourites };
1967
1991
  };
1968
1992
  var useGetUserNotifications = () => {
1969
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_NOTIFICATIONS, {
1993
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER_NOTIFICATIONS, {
1970
1994
  fetchPolicy: "network-only"
1971
1995
  });
1972
1996
  const userNotifications = data?.userNotifications;
@@ -2030,6 +2054,7 @@ var useGetUserNotifications = () => {
2030
2054
  useSearchMarkets,
2031
2055
  useSearchStallholders,
2032
2056
  useSendChatMessage,
2057
+ useSetupNotificationToken,
2033
2058
  useUpdateMarket,
2034
2059
  useUpdateMarketInfo,
2035
2060
  useUpdateRelation,