@timardex/cluemart-shared 1.0.86 → 1.0.88

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,
@@ -676,8 +678,8 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client9.gql`
676
678
  addParticipantToChat(_id: $_id, input: $input) {
677
679
  ...ChatFields
678
680
  }
679
- ${CHAT_FIELDS_FRAGMENT}
680
681
  }
682
+ ${CHAT_FIELDS_FRAGMENT}
681
683
  `;
682
684
  var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client9.gql`
683
685
  mutation removeParticipantFromChat($_id: ID!, $input: ID!) {
@@ -1070,16 +1072,16 @@ 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) {
1074
- userNotifications(userId: $userId, limit: $limit, offset: $offset) {
1075
+ query getUserNotifications($limit: Int, $offset: Int) {
1076
+ userNotifications(limit: $limit, offset: $offset) {
1075
1077
  ...UserNotificationFields
1076
1078
  }
1077
1079
  }
1078
1080
  ${USER_NOTIFICATION_FRAGMENT}
1079
1081
  `;
1080
1082
  var GET_NOTIFICATION_COUNT = import_client18.gql`
1081
- query getNotificationCount($userId: String!) {
1082
- notificationCount(userId: $userId) {
1083
+ query getNotificationCount {
1084
+ notificationCount {
1083
1085
  total
1084
1086
  unread
1085
1087
  }
@@ -1096,16 +1098,16 @@ var CREATE_BULK_NOTIFICATIONS = import_client19.gql`
1096
1098
  ${USER_NOTIFICATION_FRAGMENT}
1097
1099
  `;
1098
1100
  var MARK_NOTIFICATION_READ = import_client19.gql`
1099
- mutation markNotificationRead($input: MarkNotificationReadInput!) {
1100
- markNotificationRead(input: $input) {
1101
+ mutation markNotificationRead($_id: ID!) {
1102
+ markNotificationRead(_id: $_id) {
1101
1103
  ...UserNotificationFields
1102
1104
  }
1103
1105
  }
1104
1106
  ${USER_NOTIFICATION_FRAGMENT}
1105
1107
  `;
1106
1108
  var MARK_ALL_NOTIFICATIONS_READ = import_client19.gql`
1107
- mutation markAllNotificationsRead($input: MarkAllNotificationsReadInput!) {
1108
- markAllNotificationsRead(input: $input)
1109
+ mutation markAllNotificationsRead {
1110
+ markAllNotificationsRead
1109
1111
  }
1110
1112
  `;
1111
1113
  var DELETE_NOTIFICATION = import_client19.gql`
@@ -1149,12 +1151,38 @@ 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 = (limit, offset) => {
1157
+ const { data, loading, error, refetch } = (0, import_client21.useQuery)(GET_USER_NOTIFICATIONS, {
1158
+ fetchPolicy: "cache-and-network",
1159
+ variables: { limit, offset }
1160
+ });
1161
+ return {
1162
+ error,
1163
+ loading,
1164
+ notifications: data?.userNotifications || [],
1165
+ refetch
1166
+ };
1167
+ };
1168
+ var useGetNotificationCount = () => {
1169
+ const { data, loading, error, refetch } = (0, import_client21.useQuery)(GET_NOTIFICATION_COUNT, {
1170
+ fetchPolicy: "cache-and-network"
1171
+ });
1172
+ return {
1173
+ error,
1174
+ loading,
1175
+ notificationCount: data?.notificationCount || { total: 0, unread: 0 },
1176
+ refetch
1177
+ };
1178
+ };
1179
+
1152
1180
  // src/graphql/hooks/notifications/hooksSubscription.ts
1153
- var import_client22 = require("@apollo/client");
1181
+ var import_client23 = require("@apollo/client");
1154
1182
 
1155
1183
  // src/graphql/subscriptions/notification.ts
1156
- var import_client21 = require("@apollo/client");
1157
- var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
1184
+ var import_client22 = require("@apollo/client");
1185
+ var USER_NOTIFICATION_FRAGMENT2 = import_client22.gql`
1158
1186
  fragment UserNotificationFields on Notification {
1159
1187
  _id
1160
1188
  userId
@@ -1167,16 +1195,16 @@ var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
1167
1195
  updatedAt
1168
1196
  }
1169
1197
  `;
1170
- var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client21.gql`
1171
- subscription getUserNotifications($userId: String!) {
1198
+ var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client22.gql`
1199
+ subscription getUserNotifications($userId: ID!) {
1172
1200
  getUserNotifications(userId: $userId) {
1173
1201
  ...UserNotificationFields
1174
1202
  }
1175
1203
  }
1176
1204
  ${USER_NOTIFICATION_FRAGMENT2}
1177
1205
  `;
1178
- var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
1179
- subscription getNotificationCount($userId: String!) {
1206
+ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client22.gql`
1207
+ subscription getNotificationCount($userId: ID!) {
1180
1208
  getNotificationCount(userId: $userId) {
1181
1209
  total
1182
1210
  unread
@@ -1185,22 +1213,16 @@ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
1185
1213
  `;
1186
1214
 
1187
1215
  // src/graphql/hooks/notifications/hooksSubscription.ts
1188
- var useGetUserNotificationsSubscription = (userId) => {
1189
- const { data, loading, error } = (0, import_client22.useSubscription)(GET_USER_NOTIFICATIONS_SUBSCRIPTION, {
1190
- skip: !userId,
1191
- variables: { userId }
1192
- });
1216
+ var useGetUserNotificationsSubscription = () => {
1217
+ const { data, loading, error } = (0, import_client23.useSubscription)(GET_USER_NOTIFICATIONS_SUBSCRIPTION);
1193
1218
  return {
1194
1219
  error,
1195
1220
  loading,
1196
1221
  notifications: data?.getUserNotifications || []
1197
1222
  };
1198
1223
  };
1199
- var useGetNotificationCountSubscription = (userId) => {
1200
- const { data, loading, error } = (0, import_client22.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
1201
- skip: !userId,
1202
- variables: { userId }
1203
- });
1224
+ var useGetNotificationCountSubscription = () => {
1225
+ const { data, loading, error } = (0, import_client23.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION);
1204
1226
  return {
1205
1227
  error,
1206
1228
  loading,
@@ -1209,11 +1231,11 @@ var useGetNotificationCountSubscription = (userId) => {
1209
1231
  };
1210
1232
 
1211
1233
  // src/graphql/hooks/poster.ts
1212
- var import_client24 = require("@apollo/client");
1234
+ var import_client25 = require("@apollo/client");
1213
1235
 
1214
1236
  // src/graphql/mutations/poster.ts
1215
- var import_client23 = require("@apollo/client");
1216
- var CREATE_POSTER_MUTATION = import_client23.gql`
1237
+ var import_client24 = require("@apollo/client");
1238
+ var CREATE_POSTER_MUTATION = import_client24.gql`
1217
1239
  mutation createPoster($input: PosterInputType!) {
1218
1240
  createPoster(input: $input) {
1219
1241
  message
@@ -1223,18 +1245,18 @@ var CREATE_POSTER_MUTATION = import_client23.gql`
1223
1245
 
1224
1246
  // src/graphql/hooks/poster.ts
1225
1247
  var useCreatePoster = () => {
1226
- const [createPoster, { loading, error }] = (0, import_client24.useMutation)(
1248
+ const [createPoster, { loading, error }] = (0, import_client25.useMutation)(
1227
1249
  CREATE_POSTER_MUTATION
1228
1250
  );
1229
1251
  return { createPoster, error, loading };
1230
1252
  };
1231
1253
 
1232
1254
  // src/graphql/hooks/pushToken.ts
1233
- var import_client26 = require("@apollo/client");
1255
+ var import_client27 = require("@apollo/client");
1234
1256
 
1235
1257
  // src/graphql/mutations/pushToken.ts
1236
- var import_client25 = require("@apollo/client");
1237
- var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
1258
+ var import_client26 = require("@apollo/client");
1259
+ var CREATE_PUSH_TOKEN_MUTATION = import_client26.gql`
1238
1260
  mutation createPushToken($input: PushTokenInput!) {
1239
1261
  createPushToken(input: $input) {
1240
1262
  success
@@ -1244,21 +1266,21 @@ var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
1244
1266
 
1245
1267
  // src/graphql/hooks/pushToken.ts
1246
1268
  var useCreatePushToken = () => {
1247
- const [createPushToken, { loading, error }] = (0, import_client26.useMutation)(
1269
+ const [createPushToken, { loading, error }] = (0, import_client27.useMutation)(
1248
1270
  CREATE_PUSH_TOKEN_MUTATION
1249
1271
  );
1250
1272
  return { createPushToken, error, loading };
1251
1273
  };
1252
1274
 
1253
1275
  // src/graphql/hooks/relation/hooksMutation.ts
1254
- var import_client29 = require("@apollo/client");
1276
+ var import_client30 = require("@apollo/client");
1255
1277
 
1256
1278
  // src/graphql/mutations/relation.ts
1257
- var import_client28 = require("@apollo/client");
1279
+ var import_client29 = require("@apollo/client");
1258
1280
 
1259
1281
  // src/graphql/queries/relation.ts
1260
- var import_client27 = require("@apollo/client");
1261
- var RELATION_DATES_FRAGMENT = import_client27.gql`
1282
+ var import_client28 = require("@apollo/client");
1283
+ var RELATION_DATES_FRAGMENT = import_client28.gql`
1262
1284
  fragment RelationDates on RelationDateType {
1263
1285
  lastUpdateBy
1264
1286
  paymentReference
@@ -1272,7 +1294,7 @@ var RELATION_DATES_FRAGMENT = import_client27.gql`
1272
1294
  status
1273
1295
  }
1274
1296
  `;
1275
- var RELATION_FIELDS_FRAGMENT = import_client27.gql`
1297
+ var RELATION_FIELDS_FRAGMENT = import_client28.gql`
1276
1298
  fragment RelationFields on RelationType {
1277
1299
  _id
1278
1300
  apiMessage
@@ -1289,7 +1311,7 @@ var RELATION_FIELDS_FRAGMENT = import_client27.gql`
1289
1311
  }
1290
1312
  ${RELATION_DATES_FRAGMENT}
1291
1313
  `;
1292
- var GET_RELATION = import_client27.gql`
1314
+ var GET_RELATION = import_client28.gql`
1293
1315
  query getRelation($id: ID!) {
1294
1316
  relation(_id: $id) {
1295
1317
  ...RelationFields
@@ -1297,7 +1319,7 @@ var GET_RELATION = import_client27.gql`
1297
1319
  }
1298
1320
  ${RELATION_FIELDS_FRAGMENT}
1299
1321
  `;
1300
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
1322
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client28.gql`
1301
1323
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
1302
1324
  relationByMarketAndStallholder(
1303
1325
  marketId: $marketId
@@ -1308,7 +1330,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
1308
1330
  }
1309
1331
  ${RELATION_FIELDS_FRAGMENT}
1310
1332
  `;
1311
- var GET_MARKET_RELATIONS = import_client27.gql`
1333
+ var GET_MARKET_RELATIONS = import_client28.gql`
1312
1334
  query getMarketRelations($marketId: ID!) {
1313
1335
  marketRelations(marketId: $marketId) {
1314
1336
  ...RelationFields
@@ -1316,7 +1338,7 @@ var GET_MARKET_RELATIONS = import_client27.gql`
1316
1338
  }
1317
1339
  ${RELATION_FIELDS_FRAGMENT}
1318
1340
  `;
1319
- var GET_STALLHOLDER_RELATIONS = import_client27.gql`
1341
+ var GET_STALLHOLDER_RELATIONS = import_client28.gql`
1320
1342
  query getStallholderRelations($stallholderId: ID!) {
1321
1343
  stallholderRelations(stallholderId: $stallholderId) {
1322
1344
  ...RelationFields
@@ -1324,7 +1346,7 @@ var GET_STALLHOLDER_RELATIONS = import_client27.gql`
1324
1346
  }
1325
1347
  ${RELATION_FIELDS_FRAGMENT}
1326
1348
  `;
1327
- var GET_RESOURCE_CONNECTIONS = import_client27.gql`
1349
+ var GET_RESOURCE_CONNECTIONS = import_client28.gql`
1328
1350
  query getResourceConnections(
1329
1351
  $resourceId: ID!
1330
1352
  $resourceType: ResourceTypeEnum!
@@ -1427,7 +1449,7 @@ var GET_RESOURCE_CONNECTIONS = import_client27.gql`
1427
1449
  `;
1428
1450
 
1429
1451
  // src/graphql/mutations/relation.ts
1430
- var CREATE_RELATION_MUTATION = import_client28.gql`
1452
+ var CREATE_RELATION_MUTATION = import_client29.gql`
1431
1453
  mutation createRelation($input: RelationInputType!) {
1432
1454
  createRelation(input: $input) {
1433
1455
  ...RelationFields
@@ -1435,7 +1457,7 @@ var CREATE_RELATION_MUTATION = import_client28.gql`
1435
1457
  }
1436
1458
  ${RELATION_FIELDS_FRAGMENT}
1437
1459
  `;
1438
- var UPDATE_RELATION_MUTATION = import_client28.gql`
1460
+ var UPDATE_RELATION_MUTATION = import_client29.gql`
1439
1461
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
1440
1462
  updateRelation(_id: $_id, input: $input) {
1441
1463
  ...RelationFields
@@ -1443,7 +1465,7 @@ var UPDATE_RELATION_MUTATION = import_client28.gql`
1443
1465
  }
1444
1466
  ${RELATION_FIELDS_FRAGMENT}
1445
1467
  `;
1446
- var DELETE_RELATION_MUTATION = import_client28.gql`
1468
+ var DELETE_RELATION_MUTATION = import_client29.gql`
1447
1469
  mutation deleteRelation($_id: ID!) {
1448
1470
  deleteRelation(_id: $_id) {
1449
1471
  ...RelationFields
@@ -1455,7 +1477,7 @@ var DELETE_RELATION_MUTATION = import_client28.gql`
1455
1477
  // src/graphql/hooks/relation/hooksMutation.ts
1456
1478
  var fetchPolicy = "no-cache";
1457
1479
  var useCreateRelation = () => {
1458
- const [createRelation, { loading, error }] = (0, import_client29.useMutation)(
1480
+ const [createRelation, { loading, error }] = (0, import_client30.useMutation)(
1459
1481
  CREATE_RELATION_MUTATION,
1460
1482
  {
1461
1483
  awaitRefetchQueries: true,
@@ -1507,7 +1529,7 @@ var useCreateRelation = () => {
1507
1529
  return { createRelation, error, loading };
1508
1530
  };
1509
1531
  var useUpdateRelation = () => {
1510
- const [updateRelation, { loading, error }] = (0, import_client29.useMutation)(
1532
+ const [updateRelation, { loading, error }] = (0, import_client30.useMutation)(
1511
1533
  UPDATE_RELATION_MUTATION,
1512
1534
  {
1513
1535
  awaitRefetchQueries: true,
@@ -1555,7 +1577,7 @@ var useUpdateRelation = () => {
1555
1577
  return { error, loading, updateRelation };
1556
1578
  };
1557
1579
  var useDeleteRelation = () => {
1558
- const [deleteRelation, { loading, error }] = (0, import_client29.useMutation)(
1580
+ const [deleteRelation, { loading, error }] = (0, import_client30.useMutation)(
1559
1581
  DELETE_RELATION_MUTATION,
1560
1582
  {
1561
1583
  awaitRefetchQueries: true,
@@ -1603,9 +1625,9 @@ var useDeleteRelation = () => {
1603
1625
  };
1604
1626
 
1605
1627
  // src/graphql/hooks/relation/hooksQuery.ts
1606
- var import_client30 = require("@apollo/client");
1628
+ var import_client31 = require("@apollo/client");
1607
1629
  var useGetRelation = (id) => {
1608
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RELATION, {
1630
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_RELATION, {
1609
1631
  fetchPolicy: "network-only",
1610
1632
  skip: id === "",
1611
1633
  variables: { id }
@@ -1614,7 +1636,7 @@ var useGetRelation = (id) => {
1614
1636
  return { error, loading, refetch, relation };
1615
1637
  };
1616
1638
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1617
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
1639
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
1618
1640
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1619
1641
  {
1620
1642
  fetchPolicy: "network-only",
@@ -1626,7 +1648,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1626
1648
  return { error, loading, refetch, relationByMarketAndStallholder };
1627
1649
  };
1628
1650
  var useGetMarketRelations = (marketId) => {
1629
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_MARKET_RELATIONS, {
1651
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_MARKET_RELATIONS, {
1630
1652
  fetchPolicy: "network-only",
1631
1653
  skip: marketId === "",
1632
1654
  variables: { marketId }
@@ -1635,7 +1657,7 @@ var useGetMarketRelations = (marketId) => {
1635
1657
  return { error, loading, marketRelations, refetch };
1636
1658
  };
1637
1659
  var useGetStallholderRelations = (stallholderId) => {
1638
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
1660
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
1639
1661
  GET_STALLHOLDER_RELATIONS,
1640
1662
  {
1641
1663
  fetchPolicy: "network-only",
@@ -1647,7 +1669,7 @@ var useGetStallholderRelations = (stallholderId) => {
1647
1669
  return { error, loading, refetch, stallholderRelations };
1648
1670
  };
1649
1671
  var useGetResourceConnections = (resourceId, resourceType) => {
1650
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RESOURCE_CONNECTIONS, {
1672
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_RESOURCE_CONNECTIONS, {
1651
1673
  fetchPolicy: "network-only",
1652
1674
  variables: { resourceId, resourceType }
1653
1675
  });
@@ -1656,11 +1678,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
1656
1678
  };
1657
1679
 
1658
1680
  // src/graphql/hooks/stallholder/hooksMutation.ts
1659
- var import_client32 = require("@apollo/client");
1681
+ var import_client33 = require("@apollo/client");
1660
1682
 
1661
1683
  // src/graphql/mutations/stallholder.ts
1662
- var import_client31 = require("@apollo/client");
1663
- var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
1684
+ var import_client32 = require("@apollo/client");
1685
+ var CREATE_STALLHOLDER_MUTATION = import_client32.gql`
1664
1686
  mutation createStallholder($input: StallholderInputType!) {
1665
1687
  createStallholder(input: $input) {
1666
1688
  ...StallholderFields
@@ -1668,7 +1690,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
1668
1690
  }
1669
1691
  ${STALLHOLDER}
1670
1692
  `;
1671
- var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
1693
+ var UPDATE_STALLHOLDER_MUTATION = import_client32.gql`
1672
1694
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
1673
1695
  updateStallholder(_id: $_id, input: $input) {
1674
1696
  ...StallholderFields
@@ -1676,12 +1698,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
1676
1698
  }
1677
1699
  ${STALLHOLDER}
1678
1700
  `;
1679
- var DELETE_STALLHOLDER_MUTATION = import_client31.gql`
1701
+ var DELETE_STALLHOLDER_MUTATION = import_client32.gql`
1680
1702
  mutation deleteStallholder($_id: ID!) {
1681
1703
  deleteStallholder(_id: $_id)
1682
1704
  }
1683
1705
  `;
1684
- var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1706
+ var CREATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
1685
1707
  mutation createStallholderInfo($input: StallholderInfoInputType!) {
1686
1708
  createStallholderInfo(input: $input) {
1687
1709
  ...StallholderInfoFields
@@ -1689,7 +1711,7 @@ var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1689
1711
  }
1690
1712
  ${STALLHOLDER_INFO}
1691
1713
  `;
1692
- var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1714
+ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
1693
1715
  mutation updateStallholderInfo($_id: ID!, $input: StallholderInfoInputType!) {
1694
1716
  updateStallholderInfo(_id: $_id, input: $input) {
1695
1717
  ...StallholderInfoFields
@@ -1700,7 +1722,7 @@ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1700
1722
 
1701
1723
  // src/graphql/hooks/stallholder/hooksMutation.ts
1702
1724
  var useCreateStallholder = () => {
1703
- const [createStallholder, { loading, error }] = (0, import_client32.useMutation)(
1725
+ const [createStallholder, { loading, error }] = (0, import_client33.useMutation)(
1704
1726
  CREATE_STALLHOLDER_MUTATION,
1705
1727
  {
1706
1728
  awaitRefetchQueries: true,
@@ -1712,7 +1734,7 @@ var useCreateStallholder = () => {
1712
1734
  return { createStallholder, error, loading };
1713
1735
  };
1714
1736
  var useUpdateStallholder = () => {
1715
- const [updateStallholder, { loading, error }] = (0, import_client32.useMutation)(
1737
+ const [updateStallholder, { loading, error }] = (0, import_client33.useMutation)(
1716
1738
  UPDATE_STALLHOLDER_MUTATION,
1717
1739
  {
1718
1740
  awaitRefetchQueries: true,
@@ -1724,7 +1746,7 @@ var useUpdateStallholder = () => {
1724
1746
  return { error, loading, updateStallholder };
1725
1747
  };
1726
1748
  var useDeleteStallholder = () => {
1727
- const [deleteStallholder, { loading, error }] = (0, import_client32.useMutation)(
1749
+ const [deleteStallholder, { loading, error }] = (0, import_client33.useMutation)(
1728
1750
  DELETE_STALLHOLDER_MUTATION,
1729
1751
  {
1730
1752
  awaitRefetchQueries: true,
@@ -1736,7 +1758,7 @@ var useDeleteStallholder = () => {
1736
1758
  return { deleteStallholder, error, loading };
1737
1759
  };
1738
1760
  var useCreateStallholderInfo = () => {
1739
- const [createStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
1761
+ const [createStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
1740
1762
  CREATE_STALLHOLDER_INFO_MUTATION,
1741
1763
  {
1742
1764
  awaitRefetchQueries: true,
@@ -1760,7 +1782,7 @@ var useCreateStallholderInfo = () => {
1760
1782
  return { createStallholderInfo, error, loading };
1761
1783
  };
1762
1784
  var useUpdateStallholderInfo = () => {
1763
- const [updateStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
1785
+ const [updateStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
1764
1786
  UPDATE_STALLHOLDER_INFO_MUTATION,
1765
1787
  {
1766
1788
  awaitRefetchQueries: true,
@@ -1781,9 +1803,9 @@ var useUpdateStallholderInfo = () => {
1781
1803
  };
1782
1804
 
1783
1805
  // src/graphql/hooks/stallholder/hooksQuery.ts
1784
- var import_client33 = require("@apollo/client");
1806
+ var import_client34 = require("@apollo/client");
1785
1807
  var useGetStallholders = () => {
1786
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDERS, {
1808
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDERS, {
1787
1809
  fetchPolicy: "network-only"
1788
1810
  });
1789
1811
  const stallholders = data?.stallholders;
@@ -1795,7 +1817,7 @@ var useGetStallholders = () => {
1795
1817
  };
1796
1818
  };
1797
1819
  var useGetStallholder = (_id) => {
1798
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER, {
1820
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDER, {
1799
1821
  fetchPolicy: "network-only",
1800
1822
  skip: !_id,
1801
1823
  variables: { _id }
@@ -1804,7 +1826,7 @@ var useGetStallholder = (_id) => {
1804
1826
  return { error, loading, refetch, stallholder };
1805
1827
  };
1806
1828
  var useGetStallholdersByRegion = (region) => {
1807
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(
1829
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(
1808
1830
  GET_STALLHOLDERS_BY_REGION,
1809
1831
  {
1810
1832
  fetchPolicy: "no-cache",
@@ -1816,7 +1838,7 @@ var useGetStallholdersByRegion = (region) => {
1816
1838
  return { error, loading, refetch, stallholdersByRegion };
1817
1839
  };
1818
1840
  var useSearchStallholders = (search, region) => {
1819
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(SEARCH_STALLHOLDERS, {
1841
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(SEARCH_STALLHOLDERS, {
1820
1842
  fetchPolicy: "network-only",
1821
1843
  skip: search.length < 3,
1822
1844
  variables: { region, search }
@@ -1825,7 +1847,7 @@ var useSearchStallholders = (search, region) => {
1825
1847
  return { error, loading, refetch, stallholderSearch };
1826
1848
  };
1827
1849
  var useGetStallholderInfo = (stallholderId) => {
1828
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER_INFO, {
1850
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDER_INFO, {
1829
1851
  fetchPolicy: "network-only",
1830
1852
  skip: !stallholderId,
1831
1853
  variables: { stallholderId }
@@ -1840,14 +1862,14 @@ var useGetStallholderInfo = (stallholderId) => {
1840
1862
  };
1841
1863
 
1842
1864
  // src/graphql/hooks/testers/hooksMutation.ts
1843
- var import_client36 = require("@apollo/client");
1865
+ var import_client37 = require("@apollo/client");
1844
1866
 
1845
1867
  // src/graphql/mutations/testers.ts
1846
- var import_client35 = require("@apollo/client");
1868
+ var import_client36 = require("@apollo/client");
1847
1869
 
1848
1870
  // src/graphql/queries/testers.ts
1849
- var import_client34 = require("@apollo/client");
1850
- var TESTER_FIELDS_FRAGMENT = import_client34.gql`
1871
+ var import_client35 = require("@apollo/client");
1872
+ var TESTER_FIELDS_FRAGMENT = import_client35.gql`
1851
1873
  fragment TesterFields on TesterType {
1852
1874
  _id
1853
1875
  active
@@ -1860,7 +1882,7 @@ var TESTER_FIELDS_FRAGMENT = import_client34.gql`
1860
1882
  updatedAt
1861
1883
  }
1862
1884
  `;
1863
- var GET_TESTERS = import_client34.gql`
1885
+ var GET_TESTERS = import_client35.gql`
1864
1886
  query getTesters {
1865
1887
  testers {
1866
1888
  ...TesterFields
@@ -1868,7 +1890,7 @@ var GET_TESTERS = import_client34.gql`
1868
1890
  }
1869
1891
  ${TESTER_FIELDS_FRAGMENT}
1870
1892
  `;
1871
- var GET_TESTER = import_client34.gql`
1893
+ var GET_TESTER = import_client35.gql`
1872
1894
  query getTester($_id: ID!) {
1873
1895
  tester(_id: $_id) {
1874
1896
  ...TesterFields
@@ -1878,7 +1900,7 @@ var GET_TESTER = import_client34.gql`
1878
1900
  `;
1879
1901
 
1880
1902
  // src/graphql/mutations/testers.ts
1881
- var CREATE_TESTER_MUTATION = import_client35.gql`
1903
+ var CREATE_TESTER_MUTATION = import_client36.gql`
1882
1904
  mutation createTester($input: TesterInputType!) {
1883
1905
  createTester(input: $input) {
1884
1906
  ...TesterFields
@@ -1886,7 +1908,7 @@ var CREATE_TESTER_MUTATION = import_client35.gql`
1886
1908
  }
1887
1909
  ${TESTER_FIELDS_FRAGMENT}
1888
1910
  `;
1889
- var UPDATE_TESTER_MUTATION = import_client35.gql`
1911
+ var UPDATE_TESTER_MUTATION = import_client36.gql`
1890
1912
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
1891
1913
  updateTester(_id: $_id, input: $input) {
1892
1914
  ...TesterFields
@@ -1894,7 +1916,7 @@ var UPDATE_TESTER_MUTATION = import_client35.gql`
1894
1916
  }
1895
1917
  ${TESTER_FIELDS_FRAGMENT}
1896
1918
  `;
1897
- var DELETE_TESTER_MUTATION = import_client35.gql`
1919
+ var DELETE_TESTER_MUTATION = import_client36.gql`
1898
1920
  mutation deleteTester($_id: ID!) {
1899
1921
  deleteTester(_id: $_id)
1900
1922
  }
@@ -1902,7 +1924,7 @@ var DELETE_TESTER_MUTATION = import_client35.gql`
1902
1924
 
1903
1925
  // src/graphql/hooks/testers/hooksMutation.ts
1904
1926
  var useCreateTester = () => {
1905
- const [createTester, { data, loading, error }] = (0, import_client36.useMutation)(
1927
+ const [createTester, { data, loading, error }] = (0, import_client37.useMutation)(
1906
1928
  CREATE_TESTER_MUTATION
1907
1929
  );
1908
1930
  return {
@@ -1913,7 +1935,7 @@ var useCreateTester = () => {
1913
1935
  };
1914
1936
  };
1915
1937
  var useUpdateTester = () => {
1916
- const [updateTester, { data, loading, error }] = (0, import_client36.useMutation)(
1938
+ const [updateTester, { data, loading, error }] = (0, import_client37.useMutation)(
1917
1939
  UPDATE_TESTER_MUTATION
1918
1940
  );
1919
1941
  return {
@@ -1924,16 +1946,16 @@ var useUpdateTester = () => {
1924
1946
  };
1925
1947
  };
1926
1948
  var useDeleteTester = () => {
1927
- const [deleteTester, { loading, error }] = (0, import_client36.useMutation)(
1949
+ const [deleteTester, { loading, error }] = (0, import_client37.useMutation)(
1928
1950
  DELETE_TESTER_MUTATION
1929
1951
  );
1930
1952
  return { deleteTester, error, loading };
1931
1953
  };
1932
1954
 
1933
1955
  // src/graphql/hooks/testers/hooksQuery.ts
1934
- var import_client37 = require("@apollo/client");
1956
+ var import_client38 = require("@apollo/client");
1935
1957
  var useGetTesters = () => {
1936
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTERS);
1958
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTERS);
1937
1959
  const testers = data?.testers;
1938
1960
  return {
1939
1961
  error,
@@ -1943,7 +1965,7 @@ var useGetTesters = () => {
1943
1965
  };
1944
1966
  };
1945
1967
  var useGetTester = (_id) => {
1946
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTER, {
1968
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTER, {
1947
1969
  skip: !_id,
1948
1970
  variables: { _id }
1949
1971
  });
@@ -1952,11 +1974,11 @@ var useGetTester = (_id) => {
1952
1974
  };
1953
1975
 
1954
1976
  // src/graphql/hooks/user/hooksMutation.ts
1955
- var import_client39 = require("@apollo/client");
1977
+ var import_client40 = require("@apollo/client");
1956
1978
 
1957
1979
  // src/graphql/mutations/user.ts
1958
- var import_client38 = require("@apollo/client");
1959
- var CREATE_USER_MUTATION = import_client38.gql`
1980
+ var import_client39 = require("@apollo/client");
1981
+ var CREATE_USER_MUTATION = import_client39.gql`
1960
1982
  mutation createUser($input: UserInputType!) {
1961
1983
  createUser(input: $input) {
1962
1984
  ...UserFields
@@ -1964,7 +1986,7 @@ var CREATE_USER_MUTATION = import_client38.gql`
1964
1986
  }
1965
1987
  ${USER_FIELDS_FRAGMENT}
1966
1988
  `;
1967
- var UPDATE_USER_MUTATION = import_client38.gql`
1989
+ var UPDATE_USER_MUTATION = import_client39.gql`
1968
1990
  mutation updateUser($_id: ID!, $input: UserInputType!) {
1969
1991
  updateUser(_id: $_id, input: $input) {
1970
1992
  ...UserFields
@@ -1972,12 +1994,12 @@ var UPDATE_USER_MUTATION = import_client38.gql`
1972
1994
  }
1973
1995
  ${USER_FIELDS_FRAGMENT}
1974
1996
  `;
1975
- var DELETE_USER_MUTATION = import_client38.gql`
1997
+ var DELETE_USER_MUTATION = import_client39.gql`
1976
1998
  mutation deleteUser($_id: ID!) {
1977
1999
  deleteUser(_id: $_id)
1978
2000
  }
1979
2001
  `;
1980
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2002
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
1981
2003
  mutation addUserFavouriteResource(
1982
2004
  $resourceId: ID!
1983
2005
  $resourceType: ResourceTypeEnum!
@@ -1993,7 +2015,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
1993
2015
  }
1994
2016
  ${USER_FIELDS_FRAGMENT}
1995
2017
  `;
1996
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2018
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
1997
2019
  mutation removeUserFavouriteResource(
1998
2020
  $resourceId: ID!
1999
2021
  $resourceType: ResourceTypeEnum!
@@ -2012,11 +2034,11 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2012
2034
 
2013
2035
  // src/graphql/hooks/user/hooksMutation.ts
2014
2036
  var useCreateUser = () => {
2015
- const [createUser, { loading, error }] = (0, import_client39.useMutation)(CREATE_USER_MUTATION);
2037
+ const [createUser, { loading, error }] = (0, import_client40.useMutation)(CREATE_USER_MUTATION);
2016
2038
  return { createUser, error, loading };
2017
2039
  };
2018
2040
  var useUpdateUser = () => {
2019
- const [updateUser, { loading, error }] = (0, import_client39.useMutation)(UPDATE_USER_MUTATION, {
2041
+ const [updateUser, { loading, error }] = (0, import_client40.useMutation)(UPDATE_USER_MUTATION, {
2020
2042
  awaitRefetchQueries: true,
2021
2043
  refetchQueries: (mutationResult) => {
2022
2044
  const userId = mutationResult?.data?.updateUser?._id;
@@ -2027,11 +2049,11 @@ var useUpdateUser = () => {
2027
2049
  return { error, loading, updateUser };
2028
2050
  };
2029
2051
  var useDeleteUser = () => {
2030
- const [deleteUser, { loading, error }] = (0, import_client39.useMutation)(DELETE_USER_MUTATION);
2052
+ const [deleteUser, { loading, error }] = (0, import_client40.useMutation)(DELETE_USER_MUTATION);
2031
2053
  return { deleteUser, error, loading };
2032
2054
  };
2033
2055
  var useAddUserFavouriteResource = () => {
2034
- const [addUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
2056
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
2035
2057
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
2036
2058
  {
2037
2059
  awaitRefetchQueries: true,
@@ -2041,7 +2063,7 @@ var useAddUserFavouriteResource = () => {
2041
2063
  return { addUserFavouriteResource, error, loading };
2042
2064
  };
2043
2065
  var useRemoveUserFavouriteResource = () => {
2044
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
2066
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
2045
2067
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
2046
2068
  {
2047
2069
  awaitRefetchQueries: true,
@@ -2052,37 +2074,37 @@ var useRemoveUserFavouriteResource = () => {
2052
2074
  };
2053
2075
 
2054
2076
  // src/graphql/hooks/user/hooksQuery.ts
2055
- var import_client40 = require("@apollo/client");
2077
+ var import_client41 = require("@apollo/client");
2056
2078
  var useGetUsers = () => {
2057
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USERS, {
2079
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USERS, {
2058
2080
  fetchPolicy: "network-only"
2059
2081
  });
2060
2082
  const users = data?.users;
2061
2083
  return { error, loading, refetch, users };
2062
2084
  };
2063
2085
  var useGetUser = (_id) => {
2064
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER, {
2086
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER, {
2065
2087
  variables: { _id }
2066
2088
  });
2067
2089
  const user = data?.user;
2068
2090
  return { error, loading, refetch, user };
2069
2091
  };
2070
2092
  var useGetUserMarkets = () => {
2071
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_MARKETS, {
2093
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER_MARKETS, {
2072
2094
  fetchPolicy: "network-only"
2073
2095
  });
2074
2096
  const userMarkets = data?.userMarkets;
2075
2097
  return { error, loading, refetch, userMarkets };
2076
2098
  };
2077
2099
  var useGetUserStallholder = () => {
2078
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_STALLHOLDER, {
2100
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER_STALLHOLDER, {
2079
2101
  fetchPolicy: "network-only"
2080
2102
  });
2081
2103
  const userStallholder = data?.userStallholder;
2082
2104
  return { error, loading, refetch, userStallholder };
2083
2105
  };
2084
2106
  var useGetUserFavourites = () => {
2085
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_FAVOURITES, {
2107
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER_FAVOURITES, {
2086
2108
  fetchPolicy: "network-only"
2087
2109
  });
2088
2110
  const markets = data?.userFavourites.markets;
@@ -2125,6 +2147,7 @@ var useGetUserFavourites = () => {
2125
2147
  useGetMarkets,
2126
2148
  useGetMarketsByRegion,
2127
2149
  useGetMarketsNearMe,
2150
+ useGetNotificationCount,
2128
2151
  useGetNotificationCountSubscription,
2129
2152
  useGetRelation,
2130
2153
  useGetRelationByMarketAndStallholder,
@@ -2140,6 +2163,7 @@ var useGetUserFavourites = () => {
2140
2163
  useGetUserChats,
2141
2164
  useGetUserFavourites,
2142
2165
  useGetUserMarkets,
2166
+ useGetUserNotifications,
2143
2167
  useGetUserNotificationsSubscription,
2144
2168
  useGetUserStallholder,
2145
2169
  useGetUsers,