@timardex/cluemart-shared 1.0.86 → 1.0.87

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.
@@ -50,6 +50,7 @@ __export(graphql_exports, {
50
50
  useGetMarkets: () => useGetMarkets,
51
51
  useGetMarketsByRegion: () => useGetMarketsByRegion,
52
52
  useGetMarketsNearMe: () => useGetMarketsNearMe,
53
+ useGetNotificationCount: () => useGetNotificationCount,
53
54
  useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
54
55
  useGetRelation: () => useGetRelation,
55
56
  useGetRelationByMarketAndStallholder: () => useGetRelationByMarketAndStallholder,
@@ -65,6 +66,7 @@ __export(graphql_exports, {
65
66
  useGetUserChats: () => useGetUserChats,
66
67
  useGetUserFavourites: () => useGetUserFavourites,
67
68
  useGetUserMarkets: () => useGetUserMarkets,
69
+ useGetUserNotifications: () => useGetUserNotifications,
68
70
  useGetUserNotificationsSubscription: () => useGetUserNotificationsSubscription,
69
71
  useGetUserStallholder: () => useGetUserStallholder,
70
72
  useGetUsers: () => useGetUsers,
@@ -1070,7 +1072,7 @@ var USER_NOTIFICATION_FRAGMENT = import_client18.gql`
1070
1072
  }
1071
1073
  `;
1072
1074
  var GET_USER_NOTIFICATIONS = import_client18.gql`
1073
- query getUserNotifications($userId: String!, $limit: Int, $offset: Int) {
1075
+ query getUserNotifications($userId: ID!, $limit: Int, $offset: Int) {
1074
1076
  userNotifications(userId: $userId, limit: $limit, offset: $offset) {
1075
1077
  ...UserNotificationFields
1076
1078
  }
@@ -1078,7 +1080,7 @@ var GET_USER_NOTIFICATIONS = import_client18.gql`
1078
1080
  ${USER_NOTIFICATION_FRAGMENT}
1079
1081
  `;
1080
1082
  var GET_NOTIFICATION_COUNT = import_client18.gql`
1081
- query getNotificationCount($userId: String!) {
1083
+ query getNotificationCount($userId: ID!) {
1082
1084
  notificationCount(userId: $userId) {
1083
1085
  total
1084
1086
  unread
@@ -1109,8 +1111,8 @@ var MARK_ALL_NOTIFICATIONS_READ = import_client19.gql`
1109
1111
  }
1110
1112
  `;
1111
1113
  var DELETE_NOTIFICATION = import_client19.gql`
1112
- mutation deleteNotification($_id: ID!) {
1113
- deleteNotification(_id: $_id)
1114
+ mutation deleteNotification($input: DeleteNotificationInput!) {
1115
+ deleteNotification(input: $input)
1114
1116
  }
1115
1117
  `;
1116
1118
 
@@ -1149,12 +1151,41 @@ var useDeleteNotification = () => {
1149
1151
  return { deleteNotification, error, loading };
1150
1152
  };
1151
1153
 
1154
+ // src/graphql/hooks/notifications/hooksQuery.ts
1155
+ var import_client21 = require("@apollo/client");
1156
+ var useGetUserNotifications = (userId, limit, offset) => {
1157
+ const { data, loading, error, refetch } = (0, import_client21.useQuery)(GET_USER_NOTIFICATIONS, {
1158
+ fetchPolicy: "cache-and-network",
1159
+ skip: !userId,
1160
+ variables: { limit, offset, userId }
1161
+ });
1162
+ return {
1163
+ error,
1164
+ loading,
1165
+ notifications: data?.userNotifications || [],
1166
+ refetch
1167
+ };
1168
+ };
1169
+ var useGetNotificationCount = (userId) => {
1170
+ const { data, loading, error, refetch } = (0, import_client21.useQuery)(GET_NOTIFICATION_COUNT, {
1171
+ fetchPolicy: "cache-and-network",
1172
+ skip: !userId,
1173
+ variables: { userId }
1174
+ });
1175
+ return {
1176
+ error,
1177
+ loading,
1178
+ notificationCount: data?.notificationCount || { total: 0, unread: 0 },
1179
+ refetch
1180
+ };
1181
+ };
1182
+
1152
1183
  // src/graphql/hooks/notifications/hooksSubscription.ts
1153
- var import_client22 = require("@apollo/client");
1184
+ var import_client23 = require("@apollo/client");
1154
1185
 
1155
1186
  // src/graphql/subscriptions/notification.ts
1156
- var import_client21 = require("@apollo/client");
1157
- var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
1187
+ var import_client22 = require("@apollo/client");
1188
+ var USER_NOTIFICATION_FRAGMENT2 = import_client22.gql`
1158
1189
  fragment UserNotificationFields on Notification {
1159
1190
  _id
1160
1191
  userId
@@ -1167,16 +1198,16 @@ var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
1167
1198
  updatedAt
1168
1199
  }
1169
1200
  `;
1170
- var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client21.gql`
1171
- subscription getUserNotifications($userId: String!) {
1201
+ var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client22.gql`
1202
+ subscription getUserNotifications($userId: ID!) {
1172
1203
  getUserNotifications(userId: $userId) {
1173
1204
  ...UserNotificationFields
1174
1205
  }
1175
1206
  }
1176
1207
  ${USER_NOTIFICATION_FRAGMENT2}
1177
1208
  `;
1178
- var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
1179
- subscription getNotificationCount($userId: String!) {
1209
+ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client22.gql`
1210
+ subscription getNotificationCount($userId: ID!) {
1180
1211
  getNotificationCount(userId: $userId) {
1181
1212
  total
1182
1213
  unread
@@ -1186,7 +1217,7 @@ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
1186
1217
 
1187
1218
  // src/graphql/hooks/notifications/hooksSubscription.ts
1188
1219
  var useGetUserNotificationsSubscription = (userId) => {
1189
- const { data, loading, error } = (0, import_client22.useSubscription)(GET_USER_NOTIFICATIONS_SUBSCRIPTION, {
1220
+ const { data, loading, error } = (0, import_client23.useSubscription)(GET_USER_NOTIFICATIONS_SUBSCRIPTION, {
1190
1221
  skip: !userId,
1191
1222
  variables: { userId }
1192
1223
  });
@@ -1197,7 +1228,7 @@ var useGetUserNotificationsSubscription = (userId) => {
1197
1228
  };
1198
1229
  };
1199
1230
  var useGetNotificationCountSubscription = (userId) => {
1200
- const { data, loading, error } = (0, import_client22.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
1231
+ const { data, loading, error } = (0, import_client23.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
1201
1232
  skip: !userId,
1202
1233
  variables: { userId }
1203
1234
  });
@@ -1209,11 +1240,11 @@ var useGetNotificationCountSubscription = (userId) => {
1209
1240
  };
1210
1241
 
1211
1242
  // src/graphql/hooks/poster.ts
1212
- var import_client24 = require("@apollo/client");
1243
+ var import_client25 = require("@apollo/client");
1213
1244
 
1214
1245
  // src/graphql/mutations/poster.ts
1215
- var import_client23 = require("@apollo/client");
1216
- var CREATE_POSTER_MUTATION = import_client23.gql`
1246
+ var import_client24 = require("@apollo/client");
1247
+ var CREATE_POSTER_MUTATION = import_client24.gql`
1217
1248
  mutation createPoster($input: PosterInputType!) {
1218
1249
  createPoster(input: $input) {
1219
1250
  message
@@ -1223,18 +1254,18 @@ var CREATE_POSTER_MUTATION = import_client23.gql`
1223
1254
 
1224
1255
  // src/graphql/hooks/poster.ts
1225
1256
  var useCreatePoster = () => {
1226
- const [createPoster, { loading, error }] = (0, import_client24.useMutation)(
1257
+ const [createPoster, { loading, error }] = (0, import_client25.useMutation)(
1227
1258
  CREATE_POSTER_MUTATION
1228
1259
  );
1229
1260
  return { createPoster, error, loading };
1230
1261
  };
1231
1262
 
1232
1263
  // src/graphql/hooks/pushToken.ts
1233
- var import_client26 = require("@apollo/client");
1264
+ var import_client27 = require("@apollo/client");
1234
1265
 
1235
1266
  // src/graphql/mutations/pushToken.ts
1236
- var import_client25 = require("@apollo/client");
1237
- var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
1267
+ var import_client26 = require("@apollo/client");
1268
+ var CREATE_PUSH_TOKEN_MUTATION = import_client26.gql`
1238
1269
  mutation createPushToken($input: PushTokenInput!) {
1239
1270
  createPushToken(input: $input) {
1240
1271
  success
@@ -1244,21 +1275,21 @@ var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
1244
1275
 
1245
1276
  // src/graphql/hooks/pushToken.ts
1246
1277
  var useCreatePushToken = () => {
1247
- const [createPushToken, { loading, error }] = (0, import_client26.useMutation)(
1278
+ const [createPushToken, { loading, error }] = (0, import_client27.useMutation)(
1248
1279
  CREATE_PUSH_TOKEN_MUTATION
1249
1280
  );
1250
1281
  return { createPushToken, error, loading };
1251
1282
  };
1252
1283
 
1253
1284
  // src/graphql/hooks/relation/hooksMutation.ts
1254
- var import_client29 = require("@apollo/client");
1285
+ var import_client30 = require("@apollo/client");
1255
1286
 
1256
1287
  // src/graphql/mutations/relation.ts
1257
- var import_client28 = require("@apollo/client");
1288
+ var import_client29 = require("@apollo/client");
1258
1289
 
1259
1290
  // src/graphql/queries/relation.ts
1260
- var import_client27 = require("@apollo/client");
1261
- var RELATION_DATES_FRAGMENT = import_client27.gql`
1291
+ var import_client28 = require("@apollo/client");
1292
+ var RELATION_DATES_FRAGMENT = import_client28.gql`
1262
1293
  fragment RelationDates on RelationDateType {
1263
1294
  lastUpdateBy
1264
1295
  paymentReference
@@ -1272,7 +1303,7 @@ var RELATION_DATES_FRAGMENT = import_client27.gql`
1272
1303
  status
1273
1304
  }
1274
1305
  `;
1275
- var RELATION_FIELDS_FRAGMENT = import_client27.gql`
1306
+ var RELATION_FIELDS_FRAGMENT = import_client28.gql`
1276
1307
  fragment RelationFields on RelationType {
1277
1308
  _id
1278
1309
  apiMessage
@@ -1289,7 +1320,7 @@ var RELATION_FIELDS_FRAGMENT = import_client27.gql`
1289
1320
  }
1290
1321
  ${RELATION_DATES_FRAGMENT}
1291
1322
  `;
1292
- var GET_RELATION = import_client27.gql`
1323
+ var GET_RELATION = import_client28.gql`
1293
1324
  query getRelation($id: ID!) {
1294
1325
  relation(_id: $id) {
1295
1326
  ...RelationFields
@@ -1297,7 +1328,7 @@ var GET_RELATION = import_client27.gql`
1297
1328
  }
1298
1329
  ${RELATION_FIELDS_FRAGMENT}
1299
1330
  `;
1300
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
1331
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client28.gql`
1301
1332
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
1302
1333
  relationByMarketAndStallholder(
1303
1334
  marketId: $marketId
@@ -1308,7 +1339,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
1308
1339
  }
1309
1340
  ${RELATION_FIELDS_FRAGMENT}
1310
1341
  `;
1311
- var GET_MARKET_RELATIONS = import_client27.gql`
1342
+ var GET_MARKET_RELATIONS = import_client28.gql`
1312
1343
  query getMarketRelations($marketId: ID!) {
1313
1344
  marketRelations(marketId: $marketId) {
1314
1345
  ...RelationFields
@@ -1316,7 +1347,7 @@ var GET_MARKET_RELATIONS = import_client27.gql`
1316
1347
  }
1317
1348
  ${RELATION_FIELDS_FRAGMENT}
1318
1349
  `;
1319
- var GET_STALLHOLDER_RELATIONS = import_client27.gql`
1350
+ var GET_STALLHOLDER_RELATIONS = import_client28.gql`
1320
1351
  query getStallholderRelations($stallholderId: ID!) {
1321
1352
  stallholderRelations(stallholderId: $stallholderId) {
1322
1353
  ...RelationFields
@@ -1324,7 +1355,7 @@ var GET_STALLHOLDER_RELATIONS = import_client27.gql`
1324
1355
  }
1325
1356
  ${RELATION_FIELDS_FRAGMENT}
1326
1357
  `;
1327
- var GET_RESOURCE_CONNECTIONS = import_client27.gql`
1358
+ var GET_RESOURCE_CONNECTIONS = import_client28.gql`
1328
1359
  query getResourceConnections(
1329
1360
  $resourceId: ID!
1330
1361
  $resourceType: ResourceTypeEnum!
@@ -1427,7 +1458,7 @@ var GET_RESOURCE_CONNECTIONS = import_client27.gql`
1427
1458
  `;
1428
1459
 
1429
1460
  // src/graphql/mutations/relation.ts
1430
- var CREATE_RELATION_MUTATION = import_client28.gql`
1461
+ var CREATE_RELATION_MUTATION = import_client29.gql`
1431
1462
  mutation createRelation($input: RelationInputType!) {
1432
1463
  createRelation(input: $input) {
1433
1464
  ...RelationFields
@@ -1435,7 +1466,7 @@ var CREATE_RELATION_MUTATION = import_client28.gql`
1435
1466
  }
1436
1467
  ${RELATION_FIELDS_FRAGMENT}
1437
1468
  `;
1438
- var UPDATE_RELATION_MUTATION = import_client28.gql`
1469
+ var UPDATE_RELATION_MUTATION = import_client29.gql`
1439
1470
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
1440
1471
  updateRelation(_id: $_id, input: $input) {
1441
1472
  ...RelationFields
@@ -1443,7 +1474,7 @@ var UPDATE_RELATION_MUTATION = import_client28.gql`
1443
1474
  }
1444
1475
  ${RELATION_FIELDS_FRAGMENT}
1445
1476
  `;
1446
- var DELETE_RELATION_MUTATION = import_client28.gql`
1477
+ var DELETE_RELATION_MUTATION = import_client29.gql`
1447
1478
  mutation deleteRelation($_id: ID!) {
1448
1479
  deleteRelation(_id: $_id) {
1449
1480
  ...RelationFields
@@ -1455,7 +1486,7 @@ var DELETE_RELATION_MUTATION = import_client28.gql`
1455
1486
  // src/graphql/hooks/relation/hooksMutation.ts
1456
1487
  var fetchPolicy = "no-cache";
1457
1488
  var useCreateRelation = () => {
1458
- const [createRelation, { loading, error }] = (0, import_client29.useMutation)(
1489
+ const [createRelation, { loading, error }] = (0, import_client30.useMutation)(
1459
1490
  CREATE_RELATION_MUTATION,
1460
1491
  {
1461
1492
  awaitRefetchQueries: true,
@@ -1507,7 +1538,7 @@ var useCreateRelation = () => {
1507
1538
  return { createRelation, error, loading };
1508
1539
  };
1509
1540
  var useUpdateRelation = () => {
1510
- const [updateRelation, { loading, error }] = (0, import_client29.useMutation)(
1541
+ const [updateRelation, { loading, error }] = (0, import_client30.useMutation)(
1511
1542
  UPDATE_RELATION_MUTATION,
1512
1543
  {
1513
1544
  awaitRefetchQueries: true,
@@ -1555,7 +1586,7 @@ var useUpdateRelation = () => {
1555
1586
  return { error, loading, updateRelation };
1556
1587
  };
1557
1588
  var useDeleteRelation = () => {
1558
- const [deleteRelation, { loading, error }] = (0, import_client29.useMutation)(
1589
+ const [deleteRelation, { loading, error }] = (0, import_client30.useMutation)(
1559
1590
  DELETE_RELATION_MUTATION,
1560
1591
  {
1561
1592
  awaitRefetchQueries: true,
@@ -1603,9 +1634,9 @@ var useDeleteRelation = () => {
1603
1634
  };
1604
1635
 
1605
1636
  // src/graphql/hooks/relation/hooksQuery.ts
1606
- var import_client30 = require("@apollo/client");
1637
+ var import_client31 = require("@apollo/client");
1607
1638
  var useGetRelation = (id) => {
1608
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RELATION, {
1639
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_RELATION, {
1609
1640
  fetchPolicy: "network-only",
1610
1641
  skip: id === "",
1611
1642
  variables: { id }
@@ -1614,7 +1645,7 @@ var useGetRelation = (id) => {
1614
1645
  return { error, loading, refetch, relation };
1615
1646
  };
1616
1647
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1617
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
1648
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
1618
1649
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1619
1650
  {
1620
1651
  fetchPolicy: "network-only",
@@ -1626,7 +1657,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1626
1657
  return { error, loading, refetch, relationByMarketAndStallholder };
1627
1658
  };
1628
1659
  var useGetMarketRelations = (marketId) => {
1629
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_MARKET_RELATIONS, {
1660
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_MARKET_RELATIONS, {
1630
1661
  fetchPolicy: "network-only",
1631
1662
  skip: marketId === "",
1632
1663
  variables: { marketId }
@@ -1635,7 +1666,7 @@ var useGetMarketRelations = (marketId) => {
1635
1666
  return { error, loading, marketRelations, refetch };
1636
1667
  };
1637
1668
  var useGetStallholderRelations = (stallholderId) => {
1638
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
1669
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
1639
1670
  GET_STALLHOLDER_RELATIONS,
1640
1671
  {
1641
1672
  fetchPolicy: "network-only",
@@ -1647,7 +1678,7 @@ var useGetStallholderRelations = (stallholderId) => {
1647
1678
  return { error, loading, refetch, stallholderRelations };
1648
1679
  };
1649
1680
  var useGetResourceConnections = (resourceId, resourceType) => {
1650
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RESOURCE_CONNECTIONS, {
1681
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_RESOURCE_CONNECTIONS, {
1651
1682
  fetchPolicy: "network-only",
1652
1683
  variables: { resourceId, resourceType }
1653
1684
  });
@@ -1656,11 +1687,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
1656
1687
  };
1657
1688
 
1658
1689
  // src/graphql/hooks/stallholder/hooksMutation.ts
1659
- var import_client32 = require("@apollo/client");
1690
+ var import_client33 = require("@apollo/client");
1660
1691
 
1661
1692
  // src/graphql/mutations/stallholder.ts
1662
- var import_client31 = require("@apollo/client");
1663
- var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
1693
+ var import_client32 = require("@apollo/client");
1694
+ var CREATE_STALLHOLDER_MUTATION = import_client32.gql`
1664
1695
  mutation createStallholder($input: StallholderInputType!) {
1665
1696
  createStallholder(input: $input) {
1666
1697
  ...StallholderFields
@@ -1668,7 +1699,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
1668
1699
  }
1669
1700
  ${STALLHOLDER}
1670
1701
  `;
1671
- var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
1702
+ var UPDATE_STALLHOLDER_MUTATION = import_client32.gql`
1672
1703
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
1673
1704
  updateStallholder(_id: $_id, input: $input) {
1674
1705
  ...StallholderFields
@@ -1676,12 +1707,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
1676
1707
  }
1677
1708
  ${STALLHOLDER}
1678
1709
  `;
1679
- var DELETE_STALLHOLDER_MUTATION = import_client31.gql`
1710
+ var DELETE_STALLHOLDER_MUTATION = import_client32.gql`
1680
1711
  mutation deleteStallholder($_id: ID!) {
1681
1712
  deleteStallholder(_id: $_id)
1682
1713
  }
1683
1714
  `;
1684
- var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1715
+ var CREATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
1685
1716
  mutation createStallholderInfo($input: StallholderInfoInputType!) {
1686
1717
  createStallholderInfo(input: $input) {
1687
1718
  ...StallholderInfoFields
@@ -1689,7 +1720,7 @@ var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1689
1720
  }
1690
1721
  ${STALLHOLDER_INFO}
1691
1722
  `;
1692
- var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1723
+ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
1693
1724
  mutation updateStallholderInfo($_id: ID!, $input: StallholderInfoInputType!) {
1694
1725
  updateStallholderInfo(_id: $_id, input: $input) {
1695
1726
  ...StallholderInfoFields
@@ -1700,7 +1731,7 @@ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1700
1731
 
1701
1732
  // src/graphql/hooks/stallholder/hooksMutation.ts
1702
1733
  var useCreateStallholder = () => {
1703
- const [createStallholder, { loading, error }] = (0, import_client32.useMutation)(
1734
+ const [createStallholder, { loading, error }] = (0, import_client33.useMutation)(
1704
1735
  CREATE_STALLHOLDER_MUTATION,
1705
1736
  {
1706
1737
  awaitRefetchQueries: true,
@@ -1712,7 +1743,7 @@ var useCreateStallholder = () => {
1712
1743
  return { createStallholder, error, loading };
1713
1744
  };
1714
1745
  var useUpdateStallholder = () => {
1715
- const [updateStallholder, { loading, error }] = (0, import_client32.useMutation)(
1746
+ const [updateStallholder, { loading, error }] = (0, import_client33.useMutation)(
1716
1747
  UPDATE_STALLHOLDER_MUTATION,
1717
1748
  {
1718
1749
  awaitRefetchQueries: true,
@@ -1724,7 +1755,7 @@ var useUpdateStallholder = () => {
1724
1755
  return { error, loading, updateStallholder };
1725
1756
  };
1726
1757
  var useDeleteStallholder = () => {
1727
- const [deleteStallholder, { loading, error }] = (0, import_client32.useMutation)(
1758
+ const [deleteStallholder, { loading, error }] = (0, import_client33.useMutation)(
1728
1759
  DELETE_STALLHOLDER_MUTATION,
1729
1760
  {
1730
1761
  awaitRefetchQueries: true,
@@ -1736,7 +1767,7 @@ var useDeleteStallholder = () => {
1736
1767
  return { deleteStallholder, error, loading };
1737
1768
  };
1738
1769
  var useCreateStallholderInfo = () => {
1739
- const [createStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
1770
+ const [createStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
1740
1771
  CREATE_STALLHOLDER_INFO_MUTATION,
1741
1772
  {
1742
1773
  awaitRefetchQueries: true,
@@ -1760,7 +1791,7 @@ var useCreateStallholderInfo = () => {
1760
1791
  return { createStallholderInfo, error, loading };
1761
1792
  };
1762
1793
  var useUpdateStallholderInfo = () => {
1763
- const [updateStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
1794
+ const [updateStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
1764
1795
  UPDATE_STALLHOLDER_INFO_MUTATION,
1765
1796
  {
1766
1797
  awaitRefetchQueries: true,
@@ -1781,9 +1812,9 @@ var useUpdateStallholderInfo = () => {
1781
1812
  };
1782
1813
 
1783
1814
  // src/graphql/hooks/stallholder/hooksQuery.ts
1784
- var import_client33 = require("@apollo/client");
1815
+ var import_client34 = require("@apollo/client");
1785
1816
  var useGetStallholders = () => {
1786
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDERS, {
1817
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDERS, {
1787
1818
  fetchPolicy: "network-only"
1788
1819
  });
1789
1820
  const stallholders = data?.stallholders;
@@ -1795,7 +1826,7 @@ var useGetStallholders = () => {
1795
1826
  };
1796
1827
  };
1797
1828
  var useGetStallholder = (_id) => {
1798
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER, {
1829
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDER, {
1799
1830
  fetchPolicy: "network-only",
1800
1831
  skip: !_id,
1801
1832
  variables: { _id }
@@ -1804,7 +1835,7 @@ var useGetStallholder = (_id) => {
1804
1835
  return { error, loading, refetch, stallholder };
1805
1836
  };
1806
1837
  var useGetStallholdersByRegion = (region) => {
1807
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(
1838
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(
1808
1839
  GET_STALLHOLDERS_BY_REGION,
1809
1840
  {
1810
1841
  fetchPolicy: "no-cache",
@@ -1816,7 +1847,7 @@ var useGetStallholdersByRegion = (region) => {
1816
1847
  return { error, loading, refetch, stallholdersByRegion };
1817
1848
  };
1818
1849
  var useSearchStallholders = (search, region) => {
1819
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(SEARCH_STALLHOLDERS, {
1850
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(SEARCH_STALLHOLDERS, {
1820
1851
  fetchPolicy: "network-only",
1821
1852
  skip: search.length < 3,
1822
1853
  variables: { region, search }
@@ -1825,7 +1856,7 @@ var useSearchStallholders = (search, region) => {
1825
1856
  return { error, loading, refetch, stallholderSearch };
1826
1857
  };
1827
1858
  var useGetStallholderInfo = (stallholderId) => {
1828
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER_INFO, {
1859
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDER_INFO, {
1829
1860
  fetchPolicy: "network-only",
1830
1861
  skip: !stallholderId,
1831
1862
  variables: { stallholderId }
@@ -1840,14 +1871,14 @@ var useGetStallholderInfo = (stallholderId) => {
1840
1871
  };
1841
1872
 
1842
1873
  // src/graphql/hooks/testers/hooksMutation.ts
1843
- var import_client36 = require("@apollo/client");
1874
+ var import_client37 = require("@apollo/client");
1844
1875
 
1845
1876
  // src/graphql/mutations/testers.ts
1846
- var import_client35 = require("@apollo/client");
1877
+ var import_client36 = require("@apollo/client");
1847
1878
 
1848
1879
  // src/graphql/queries/testers.ts
1849
- var import_client34 = require("@apollo/client");
1850
- var TESTER_FIELDS_FRAGMENT = import_client34.gql`
1880
+ var import_client35 = require("@apollo/client");
1881
+ var TESTER_FIELDS_FRAGMENT = import_client35.gql`
1851
1882
  fragment TesterFields on TesterType {
1852
1883
  _id
1853
1884
  active
@@ -1860,7 +1891,7 @@ var TESTER_FIELDS_FRAGMENT = import_client34.gql`
1860
1891
  updatedAt
1861
1892
  }
1862
1893
  `;
1863
- var GET_TESTERS = import_client34.gql`
1894
+ var GET_TESTERS = import_client35.gql`
1864
1895
  query getTesters {
1865
1896
  testers {
1866
1897
  ...TesterFields
@@ -1868,7 +1899,7 @@ var GET_TESTERS = import_client34.gql`
1868
1899
  }
1869
1900
  ${TESTER_FIELDS_FRAGMENT}
1870
1901
  `;
1871
- var GET_TESTER = import_client34.gql`
1902
+ var GET_TESTER = import_client35.gql`
1872
1903
  query getTester($_id: ID!) {
1873
1904
  tester(_id: $_id) {
1874
1905
  ...TesterFields
@@ -1878,7 +1909,7 @@ var GET_TESTER = import_client34.gql`
1878
1909
  `;
1879
1910
 
1880
1911
  // src/graphql/mutations/testers.ts
1881
- var CREATE_TESTER_MUTATION = import_client35.gql`
1912
+ var CREATE_TESTER_MUTATION = import_client36.gql`
1882
1913
  mutation createTester($input: TesterInputType!) {
1883
1914
  createTester(input: $input) {
1884
1915
  ...TesterFields
@@ -1886,7 +1917,7 @@ var CREATE_TESTER_MUTATION = import_client35.gql`
1886
1917
  }
1887
1918
  ${TESTER_FIELDS_FRAGMENT}
1888
1919
  `;
1889
- var UPDATE_TESTER_MUTATION = import_client35.gql`
1920
+ var UPDATE_TESTER_MUTATION = import_client36.gql`
1890
1921
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
1891
1922
  updateTester(_id: $_id, input: $input) {
1892
1923
  ...TesterFields
@@ -1894,7 +1925,7 @@ var UPDATE_TESTER_MUTATION = import_client35.gql`
1894
1925
  }
1895
1926
  ${TESTER_FIELDS_FRAGMENT}
1896
1927
  `;
1897
- var DELETE_TESTER_MUTATION = import_client35.gql`
1928
+ var DELETE_TESTER_MUTATION = import_client36.gql`
1898
1929
  mutation deleteTester($_id: ID!) {
1899
1930
  deleteTester(_id: $_id)
1900
1931
  }
@@ -1902,7 +1933,7 @@ var DELETE_TESTER_MUTATION = import_client35.gql`
1902
1933
 
1903
1934
  // src/graphql/hooks/testers/hooksMutation.ts
1904
1935
  var useCreateTester = () => {
1905
- const [createTester, { data, loading, error }] = (0, import_client36.useMutation)(
1936
+ const [createTester, { data, loading, error }] = (0, import_client37.useMutation)(
1906
1937
  CREATE_TESTER_MUTATION
1907
1938
  );
1908
1939
  return {
@@ -1913,7 +1944,7 @@ var useCreateTester = () => {
1913
1944
  };
1914
1945
  };
1915
1946
  var useUpdateTester = () => {
1916
- const [updateTester, { data, loading, error }] = (0, import_client36.useMutation)(
1947
+ const [updateTester, { data, loading, error }] = (0, import_client37.useMutation)(
1917
1948
  UPDATE_TESTER_MUTATION
1918
1949
  );
1919
1950
  return {
@@ -1924,16 +1955,16 @@ var useUpdateTester = () => {
1924
1955
  };
1925
1956
  };
1926
1957
  var useDeleteTester = () => {
1927
- const [deleteTester, { loading, error }] = (0, import_client36.useMutation)(
1958
+ const [deleteTester, { loading, error }] = (0, import_client37.useMutation)(
1928
1959
  DELETE_TESTER_MUTATION
1929
1960
  );
1930
1961
  return { deleteTester, error, loading };
1931
1962
  };
1932
1963
 
1933
1964
  // src/graphql/hooks/testers/hooksQuery.ts
1934
- var import_client37 = require("@apollo/client");
1965
+ var import_client38 = require("@apollo/client");
1935
1966
  var useGetTesters = () => {
1936
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTERS);
1967
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTERS);
1937
1968
  const testers = data?.testers;
1938
1969
  return {
1939
1970
  error,
@@ -1943,7 +1974,7 @@ var useGetTesters = () => {
1943
1974
  };
1944
1975
  };
1945
1976
  var useGetTester = (_id) => {
1946
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTER, {
1977
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTER, {
1947
1978
  skip: !_id,
1948
1979
  variables: { _id }
1949
1980
  });
@@ -1952,11 +1983,11 @@ var useGetTester = (_id) => {
1952
1983
  };
1953
1984
 
1954
1985
  // src/graphql/hooks/user/hooksMutation.ts
1955
- var import_client39 = require("@apollo/client");
1986
+ var import_client40 = require("@apollo/client");
1956
1987
 
1957
1988
  // src/graphql/mutations/user.ts
1958
- var import_client38 = require("@apollo/client");
1959
- var CREATE_USER_MUTATION = import_client38.gql`
1989
+ var import_client39 = require("@apollo/client");
1990
+ var CREATE_USER_MUTATION = import_client39.gql`
1960
1991
  mutation createUser($input: UserInputType!) {
1961
1992
  createUser(input: $input) {
1962
1993
  ...UserFields
@@ -1964,7 +1995,7 @@ var CREATE_USER_MUTATION = import_client38.gql`
1964
1995
  }
1965
1996
  ${USER_FIELDS_FRAGMENT}
1966
1997
  `;
1967
- var UPDATE_USER_MUTATION = import_client38.gql`
1998
+ var UPDATE_USER_MUTATION = import_client39.gql`
1968
1999
  mutation updateUser($_id: ID!, $input: UserInputType!) {
1969
2000
  updateUser(_id: $_id, input: $input) {
1970
2001
  ...UserFields
@@ -1972,12 +2003,12 @@ var UPDATE_USER_MUTATION = import_client38.gql`
1972
2003
  }
1973
2004
  ${USER_FIELDS_FRAGMENT}
1974
2005
  `;
1975
- var DELETE_USER_MUTATION = import_client38.gql`
2006
+ var DELETE_USER_MUTATION = import_client39.gql`
1976
2007
  mutation deleteUser($_id: ID!) {
1977
2008
  deleteUser(_id: $_id)
1978
2009
  }
1979
2010
  `;
1980
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2011
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
1981
2012
  mutation addUserFavouriteResource(
1982
2013
  $resourceId: ID!
1983
2014
  $resourceType: ResourceTypeEnum!
@@ -1993,7 +2024,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
1993
2024
  }
1994
2025
  ${USER_FIELDS_FRAGMENT}
1995
2026
  `;
1996
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2027
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
1997
2028
  mutation removeUserFavouriteResource(
1998
2029
  $resourceId: ID!
1999
2030
  $resourceType: ResourceTypeEnum!
@@ -2012,11 +2043,11 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2012
2043
 
2013
2044
  // src/graphql/hooks/user/hooksMutation.ts
2014
2045
  var useCreateUser = () => {
2015
- const [createUser, { loading, error }] = (0, import_client39.useMutation)(CREATE_USER_MUTATION);
2046
+ const [createUser, { loading, error }] = (0, import_client40.useMutation)(CREATE_USER_MUTATION);
2016
2047
  return { createUser, error, loading };
2017
2048
  };
2018
2049
  var useUpdateUser = () => {
2019
- const [updateUser, { loading, error }] = (0, import_client39.useMutation)(UPDATE_USER_MUTATION, {
2050
+ const [updateUser, { loading, error }] = (0, import_client40.useMutation)(UPDATE_USER_MUTATION, {
2020
2051
  awaitRefetchQueries: true,
2021
2052
  refetchQueries: (mutationResult) => {
2022
2053
  const userId = mutationResult?.data?.updateUser?._id;
@@ -2027,11 +2058,11 @@ var useUpdateUser = () => {
2027
2058
  return { error, loading, updateUser };
2028
2059
  };
2029
2060
  var useDeleteUser = () => {
2030
- const [deleteUser, { loading, error }] = (0, import_client39.useMutation)(DELETE_USER_MUTATION);
2061
+ const [deleteUser, { loading, error }] = (0, import_client40.useMutation)(DELETE_USER_MUTATION);
2031
2062
  return { deleteUser, error, loading };
2032
2063
  };
2033
2064
  var useAddUserFavouriteResource = () => {
2034
- const [addUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
2065
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
2035
2066
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
2036
2067
  {
2037
2068
  awaitRefetchQueries: true,
@@ -2041,7 +2072,7 @@ var useAddUserFavouriteResource = () => {
2041
2072
  return { addUserFavouriteResource, error, loading };
2042
2073
  };
2043
2074
  var useRemoveUserFavouriteResource = () => {
2044
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
2075
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
2045
2076
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
2046
2077
  {
2047
2078
  awaitRefetchQueries: true,
@@ -2052,37 +2083,37 @@ var useRemoveUserFavouriteResource = () => {
2052
2083
  };
2053
2084
 
2054
2085
  // src/graphql/hooks/user/hooksQuery.ts
2055
- var import_client40 = require("@apollo/client");
2086
+ var import_client41 = require("@apollo/client");
2056
2087
  var useGetUsers = () => {
2057
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USERS, {
2088
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USERS, {
2058
2089
  fetchPolicy: "network-only"
2059
2090
  });
2060
2091
  const users = data?.users;
2061
2092
  return { error, loading, refetch, users };
2062
2093
  };
2063
2094
  var useGetUser = (_id) => {
2064
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER, {
2095
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER, {
2065
2096
  variables: { _id }
2066
2097
  });
2067
2098
  const user = data?.user;
2068
2099
  return { error, loading, refetch, user };
2069
2100
  };
2070
2101
  var useGetUserMarkets = () => {
2071
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_MARKETS, {
2102
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER_MARKETS, {
2072
2103
  fetchPolicy: "network-only"
2073
2104
  });
2074
2105
  const userMarkets = data?.userMarkets;
2075
2106
  return { error, loading, refetch, userMarkets };
2076
2107
  };
2077
2108
  var useGetUserStallholder = () => {
2078
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_STALLHOLDER, {
2109
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER_STALLHOLDER, {
2079
2110
  fetchPolicy: "network-only"
2080
2111
  });
2081
2112
  const userStallholder = data?.userStallholder;
2082
2113
  return { error, loading, refetch, userStallholder };
2083
2114
  };
2084
2115
  var useGetUserFavourites = () => {
2085
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_FAVOURITES, {
2116
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER_FAVOURITES, {
2086
2117
  fetchPolicy: "network-only"
2087
2118
  });
2088
2119
  const markets = data?.userFavourites.markets;
@@ -2125,6 +2156,7 @@ var useGetUserFavourites = () => {
2125
2156
  useGetMarkets,
2126
2157
  useGetMarketsByRegion,
2127
2158
  useGetMarketsNearMe,
2159
+ useGetNotificationCount,
2128
2160
  useGetNotificationCountSubscription,
2129
2161
  useGetRelation,
2130
2162
  useGetRelationByMarketAndStallholder,
@@ -2140,6 +2172,7 @@ var useGetUserFavourites = () => {
2140
2172
  useGetUserChats,
2141
2173
  useGetUserFavourites,
2142
2174
  useGetUserMarkets,
2175
+ useGetUserNotifications,
2143
2176
  useGetUserNotificationsSubscription,
2144
2177
  useGetUserStallholder,
2145
2178
  useGetUsers,