@timardex/cluemart-shared 1.0.85 → 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.
@@ -28,7 +28,6 @@ __export(graphql_exports, {
28
28
  useCreateChat: () => useCreateChat,
29
29
  useCreateMarket: () => useCreateMarket,
30
30
  useCreateMarketInfo: () => useCreateMarketInfo,
31
- useCreateNotification: () => useCreateNotification,
32
31
  useCreatePoster: () => useCreatePoster,
33
32
  useCreatePushToken: () => useCreatePushToken,
34
33
  useCreateRelation: () => useCreateRelation,
@@ -51,6 +50,7 @@ __export(graphql_exports, {
51
50
  useGetMarkets: () => useGetMarkets,
52
51
  useGetMarketsByRegion: () => useGetMarketsByRegion,
53
52
  useGetMarketsNearMe: () => useGetMarketsNearMe,
53
+ useGetNotificationCount: () => useGetNotificationCount,
54
54
  useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
55
55
  useGetRelation: () => useGetRelation,
56
56
  useGetRelationByMarketAndStallholder: () => useGetRelationByMarketAndStallholder,
@@ -66,6 +66,7 @@ __export(graphql_exports, {
66
66
  useGetUserChats: () => useGetUserChats,
67
67
  useGetUserFavourites: () => useGetUserFavourites,
68
68
  useGetUserMarkets: () => useGetUserMarkets,
69
+ useGetUserNotifications: () => useGetUserNotifications,
69
70
  useGetUserNotificationsSubscription: () => useGetUserNotificationsSubscription,
70
71
  useGetUserStallholder: () => useGetUserStallholder,
71
72
  useGetUsers: () => useGetUsers,
@@ -1071,7 +1072,7 @@ var USER_NOTIFICATION_FRAGMENT = import_client18.gql`
1071
1072
  }
1072
1073
  `;
1073
1074
  var GET_USER_NOTIFICATIONS = import_client18.gql`
1074
- query getUserNotifications($userId: String!, $limit: Int, $offset: Int) {
1075
+ query getUserNotifications($userId: ID!, $limit: Int, $offset: Int) {
1075
1076
  userNotifications(userId: $userId, limit: $limit, offset: $offset) {
1076
1077
  ...UserNotificationFields
1077
1078
  }
@@ -1079,7 +1080,7 @@ var GET_USER_NOTIFICATIONS = import_client18.gql`
1079
1080
  ${USER_NOTIFICATION_FRAGMENT}
1080
1081
  `;
1081
1082
  var GET_NOTIFICATION_COUNT = import_client18.gql`
1082
- query getNotificationCount($userId: String!) {
1083
+ query getNotificationCount($userId: ID!) {
1083
1084
  notificationCount(userId: $userId) {
1084
1085
  total
1085
1086
  unread
@@ -1088,14 +1089,6 @@ var GET_NOTIFICATION_COUNT = import_client18.gql`
1088
1089
  `;
1089
1090
 
1090
1091
  // src/graphql/mutations/notification.ts
1091
- var CREATE_NOTIFICATION = import_client19.gql`
1092
- mutation createNotification($input: CreateNotificationInput!) {
1093
- createNotification(input: $input) {
1094
- ...UserNotificationFields
1095
- }
1096
- }
1097
- ${USER_NOTIFICATION_FRAGMENT}
1098
- `;
1099
1092
  var CREATE_BULK_NOTIFICATIONS = import_client19.gql`
1100
1093
  mutation createBulkNotifications($input: CreateBulkNotificationInput!) {
1101
1094
  createBulkNotifications(input: $input) {
@@ -1118,16 +1111,12 @@ var MARK_ALL_NOTIFICATIONS_READ = import_client19.gql`
1118
1111
  }
1119
1112
  `;
1120
1113
  var DELETE_NOTIFICATION = import_client19.gql`
1121
- mutation deleteNotification($_id: ID!) {
1122
- deleteNotification(_id: $_id)
1114
+ mutation deleteNotification($input: DeleteNotificationInput!) {
1115
+ deleteNotification(input: $input)
1123
1116
  }
1124
1117
  `;
1125
1118
 
1126
1119
  // src/graphql/hooks/notifications/hooksMutation.ts
1127
- var useCreateNotification = () => {
1128
- const [createNotification, { loading, error }] = (0, import_client20.useMutation)(CREATE_NOTIFICATION);
1129
- return { createNotification, error, loading };
1130
- };
1131
1120
  var useCreateBulkNotifications = () => {
1132
1121
  const [createBulkNotifications, { loading, error }] = (0, import_client20.useMutation)(
1133
1122
  CREATE_BULK_NOTIFICATIONS
@@ -1162,12 +1151,41 @@ var useDeleteNotification = () => {
1162
1151
  return { deleteNotification, error, loading };
1163
1152
  };
1164
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
+
1165
1183
  // src/graphql/hooks/notifications/hooksSubscription.ts
1166
- var import_client22 = require("@apollo/client");
1184
+ var import_client23 = require("@apollo/client");
1167
1185
 
1168
1186
  // src/graphql/subscriptions/notification.ts
1169
- var import_client21 = require("@apollo/client");
1170
- var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
1187
+ var import_client22 = require("@apollo/client");
1188
+ var USER_NOTIFICATION_FRAGMENT2 = import_client22.gql`
1171
1189
  fragment UserNotificationFields on Notification {
1172
1190
  _id
1173
1191
  userId
@@ -1180,16 +1198,16 @@ var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
1180
1198
  updatedAt
1181
1199
  }
1182
1200
  `;
1183
- var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client21.gql`
1184
- subscription getUserNotifications($userId: String!) {
1201
+ var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client22.gql`
1202
+ subscription getUserNotifications($userId: ID!) {
1185
1203
  getUserNotifications(userId: $userId) {
1186
1204
  ...UserNotificationFields
1187
1205
  }
1188
1206
  }
1189
1207
  ${USER_NOTIFICATION_FRAGMENT2}
1190
1208
  `;
1191
- var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
1192
- subscription getNotificationCount($userId: String!) {
1209
+ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client22.gql`
1210
+ subscription getNotificationCount($userId: ID!) {
1193
1211
  getNotificationCount(userId: $userId) {
1194
1212
  total
1195
1213
  unread
@@ -1199,7 +1217,7 @@ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
1199
1217
 
1200
1218
  // src/graphql/hooks/notifications/hooksSubscription.ts
1201
1219
  var useGetUserNotificationsSubscription = (userId) => {
1202
- 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, {
1203
1221
  skip: !userId,
1204
1222
  variables: { userId }
1205
1223
  });
@@ -1210,7 +1228,7 @@ var useGetUserNotificationsSubscription = (userId) => {
1210
1228
  };
1211
1229
  };
1212
1230
  var useGetNotificationCountSubscription = (userId) => {
1213
- 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, {
1214
1232
  skip: !userId,
1215
1233
  variables: { userId }
1216
1234
  });
@@ -1222,11 +1240,11 @@ var useGetNotificationCountSubscription = (userId) => {
1222
1240
  };
1223
1241
 
1224
1242
  // src/graphql/hooks/poster.ts
1225
- var import_client24 = require("@apollo/client");
1243
+ var import_client25 = require("@apollo/client");
1226
1244
 
1227
1245
  // src/graphql/mutations/poster.ts
1228
- var import_client23 = require("@apollo/client");
1229
- var CREATE_POSTER_MUTATION = import_client23.gql`
1246
+ var import_client24 = require("@apollo/client");
1247
+ var CREATE_POSTER_MUTATION = import_client24.gql`
1230
1248
  mutation createPoster($input: PosterInputType!) {
1231
1249
  createPoster(input: $input) {
1232
1250
  message
@@ -1236,18 +1254,18 @@ var CREATE_POSTER_MUTATION = import_client23.gql`
1236
1254
 
1237
1255
  // src/graphql/hooks/poster.ts
1238
1256
  var useCreatePoster = () => {
1239
- const [createPoster, { loading, error }] = (0, import_client24.useMutation)(
1257
+ const [createPoster, { loading, error }] = (0, import_client25.useMutation)(
1240
1258
  CREATE_POSTER_MUTATION
1241
1259
  );
1242
1260
  return { createPoster, error, loading };
1243
1261
  };
1244
1262
 
1245
1263
  // src/graphql/hooks/pushToken.ts
1246
- var import_client26 = require("@apollo/client");
1264
+ var import_client27 = require("@apollo/client");
1247
1265
 
1248
1266
  // src/graphql/mutations/pushToken.ts
1249
- var import_client25 = require("@apollo/client");
1250
- var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
1267
+ var import_client26 = require("@apollo/client");
1268
+ var CREATE_PUSH_TOKEN_MUTATION = import_client26.gql`
1251
1269
  mutation createPushToken($input: PushTokenInput!) {
1252
1270
  createPushToken(input: $input) {
1253
1271
  success
@@ -1257,21 +1275,21 @@ var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
1257
1275
 
1258
1276
  // src/graphql/hooks/pushToken.ts
1259
1277
  var useCreatePushToken = () => {
1260
- const [createPushToken, { loading, error }] = (0, import_client26.useMutation)(
1278
+ const [createPushToken, { loading, error }] = (0, import_client27.useMutation)(
1261
1279
  CREATE_PUSH_TOKEN_MUTATION
1262
1280
  );
1263
1281
  return { createPushToken, error, loading };
1264
1282
  };
1265
1283
 
1266
1284
  // src/graphql/hooks/relation/hooksMutation.ts
1267
- var import_client29 = require("@apollo/client");
1285
+ var import_client30 = require("@apollo/client");
1268
1286
 
1269
1287
  // src/graphql/mutations/relation.ts
1270
- var import_client28 = require("@apollo/client");
1288
+ var import_client29 = require("@apollo/client");
1271
1289
 
1272
1290
  // src/graphql/queries/relation.ts
1273
- var import_client27 = require("@apollo/client");
1274
- var RELATION_DATES_FRAGMENT = import_client27.gql`
1291
+ var import_client28 = require("@apollo/client");
1292
+ var RELATION_DATES_FRAGMENT = import_client28.gql`
1275
1293
  fragment RelationDates on RelationDateType {
1276
1294
  lastUpdateBy
1277
1295
  paymentReference
@@ -1285,7 +1303,7 @@ var RELATION_DATES_FRAGMENT = import_client27.gql`
1285
1303
  status
1286
1304
  }
1287
1305
  `;
1288
- var RELATION_FIELDS_FRAGMENT = import_client27.gql`
1306
+ var RELATION_FIELDS_FRAGMENT = import_client28.gql`
1289
1307
  fragment RelationFields on RelationType {
1290
1308
  _id
1291
1309
  apiMessage
@@ -1302,7 +1320,7 @@ var RELATION_FIELDS_FRAGMENT = import_client27.gql`
1302
1320
  }
1303
1321
  ${RELATION_DATES_FRAGMENT}
1304
1322
  `;
1305
- var GET_RELATION = import_client27.gql`
1323
+ var GET_RELATION = import_client28.gql`
1306
1324
  query getRelation($id: ID!) {
1307
1325
  relation(_id: $id) {
1308
1326
  ...RelationFields
@@ -1310,7 +1328,7 @@ var GET_RELATION = import_client27.gql`
1310
1328
  }
1311
1329
  ${RELATION_FIELDS_FRAGMENT}
1312
1330
  `;
1313
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
1331
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client28.gql`
1314
1332
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
1315
1333
  relationByMarketAndStallholder(
1316
1334
  marketId: $marketId
@@ -1321,7 +1339,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
1321
1339
  }
1322
1340
  ${RELATION_FIELDS_FRAGMENT}
1323
1341
  `;
1324
- var GET_MARKET_RELATIONS = import_client27.gql`
1342
+ var GET_MARKET_RELATIONS = import_client28.gql`
1325
1343
  query getMarketRelations($marketId: ID!) {
1326
1344
  marketRelations(marketId: $marketId) {
1327
1345
  ...RelationFields
@@ -1329,7 +1347,7 @@ var GET_MARKET_RELATIONS = import_client27.gql`
1329
1347
  }
1330
1348
  ${RELATION_FIELDS_FRAGMENT}
1331
1349
  `;
1332
- var GET_STALLHOLDER_RELATIONS = import_client27.gql`
1350
+ var GET_STALLHOLDER_RELATIONS = import_client28.gql`
1333
1351
  query getStallholderRelations($stallholderId: ID!) {
1334
1352
  stallholderRelations(stallholderId: $stallholderId) {
1335
1353
  ...RelationFields
@@ -1337,7 +1355,7 @@ var GET_STALLHOLDER_RELATIONS = import_client27.gql`
1337
1355
  }
1338
1356
  ${RELATION_FIELDS_FRAGMENT}
1339
1357
  `;
1340
- var GET_RESOURCE_CONNECTIONS = import_client27.gql`
1358
+ var GET_RESOURCE_CONNECTIONS = import_client28.gql`
1341
1359
  query getResourceConnections(
1342
1360
  $resourceId: ID!
1343
1361
  $resourceType: ResourceTypeEnum!
@@ -1440,7 +1458,7 @@ var GET_RESOURCE_CONNECTIONS = import_client27.gql`
1440
1458
  `;
1441
1459
 
1442
1460
  // src/graphql/mutations/relation.ts
1443
- var CREATE_RELATION_MUTATION = import_client28.gql`
1461
+ var CREATE_RELATION_MUTATION = import_client29.gql`
1444
1462
  mutation createRelation($input: RelationInputType!) {
1445
1463
  createRelation(input: $input) {
1446
1464
  ...RelationFields
@@ -1448,7 +1466,7 @@ var CREATE_RELATION_MUTATION = import_client28.gql`
1448
1466
  }
1449
1467
  ${RELATION_FIELDS_FRAGMENT}
1450
1468
  `;
1451
- var UPDATE_RELATION_MUTATION = import_client28.gql`
1469
+ var UPDATE_RELATION_MUTATION = import_client29.gql`
1452
1470
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
1453
1471
  updateRelation(_id: $_id, input: $input) {
1454
1472
  ...RelationFields
@@ -1456,7 +1474,7 @@ var UPDATE_RELATION_MUTATION = import_client28.gql`
1456
1474
  }
1457
1475
  ${RELATION_FIELDS_FRAGMENT}
1458
1476
  `;
1459
- var DELETE_RELATION_MUTATION = import_client28.gql`
1477
+ var DELETE_RELATION_MUTATION = import_client29.gql`
1460
1478
  mutation deleteRelation($_id: ID!) {
1461
1479
  deleteRelation(_id: $_id) {
1462
1480
  ...RelationFields
@@ -1468,7 +1486,7 @@ var DELETE_RELATION_MUTATION = import_client28.gql`
1468
1486
  // src/graphql/hooks/relation/hooksMutation.ts
1469
1487
  var fetchPolicy = "no-cache";
1470
1488
  var useCreateRelation = () => {
1471
- const [createRelation, { loading, error }] = (0, import_client29.useMutation)(
1489
+ const [createRelation, { loading, error }] = (0, import_client30.useMutation)(
1472
1490
  CREATE_RELATION_MUTATION,
1473
1491
  {
1474
1492
  awaitRefetchQueries: true,
@@ -1520,7 +1538,7 @@ var useCreateRelation = () => {
1520
1538
  return { createRelation, error, loading };
1521
1539
  };
1522
1540
  var useUpdateRelation = () => {
1523
- const [updateRelation, { loading, error }] = (0, import_client29.useMutation)(
1541
+ const [updateRelation, { loading, error }] = (0, import_client30.useMutation)(
1524
1542
  UPDATE_RELATION_MUTATION,
1525
1543
  {
1526
1544
  awaitRefetchQueries: true,
@@ -1568,7 +1586,7 @@ var useUpdateRelation = () => {
1568
1586
  return { error, loading, updateRelation };
1569
1587
  };
1570
1588
  var useDeleteRelation = () => {
1571
- const [deleteRelation, { loading, error }] = (0, import_client29.useMutation)(
1589
+ const [deleteRelation, { loading, error }] = (0, import_client30.useMutation)(
1572
1590
  DELETE_RELATION_MUTATION,
1573
1591
  {
1574
1592
  awaitRefetchQueries: true,
@@ -1616,9 +1634,9 @@ var useDeleteRelation = () => {
1616
1634
  };
1617
1635
 
1618
1636
  // src/graphql/hooks/relation/hooksQuery.ts
1619
- var import_client30 = require("@apollo/client");
1637
+ var import_client31 = require("@apollo/client");
1620
1638
  var useGetRelation = (id) => {
1621
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RELATION, {
1639
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_RELATION, {
1622
1640
  fetchPolicy: "network-only",
1623
1641
  skip: id === "",
1624
1642
  variables: { id }
@@ -1627,7 +1645,7 @@ var useGetRelation = (id) => {
1627
1645
  return { error, loading, refetch, relation };
1628
1646
  };
1629
1647
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1630
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
1648
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
1631
1649
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1632
1650
  {
1633
1651
  fetchPolicy: "network-only",
@@ -1639,7 +1657,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1639
1657
  return { error, loading, refetch, relationByMarketAndStallholder };
1640
1658
  };
1641
1659
  var useGetMarketRelations = (marketId) => {
1642
- 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, {
1643
1661
  fetchPolicy: "network-only",
1644
1662
  skip: marketId === "",
1645
1663
  variables: { marketId }
@@ -1648,7 +1666,7 @@ var useGetMarketRelations = (marketId) => {
1648
1666
  return { error, loading, marketRelations, refetch };
1649
1667
  };
1650
1668
  var useGetStallholderRelations = (stallholderId) => {
1651
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
1669
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
1652
1670
  GET_STALLHOLDER_RELATIONS,
1653
1671
  {
1654
1672
  fetchPolicy: "network-only",
@@ -1660,7 +1678,7 @@ var useGetStallholderRelations = (stallholderId) => {
1660
1678
  return { error, loading, refetch, stallholderRelations };
1661
1679
  };
1662
1680
  var useGetResourceConnections = (resourceId, resourceType) => {
1663
- 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, {
1664
1682
  fetchPolicy: "network-only",
1665
1683
  variables: { resourceId, resourceType }
1666
1684
  });
@@ -1669,11 +1687,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
1669
1687
  };
1670
1688
 
1671
1689
  // src/graphql/hooks/stallholder/hooksMutation.ts
1672
- var import_client32 = require("@apollo/client");
1690
+ var import_client33 = require("@apollo/client");
1673
1691
 
1674
1692
  // src/graphql/mutations/stallholder.ts
1675
- var import_client31 = require("@apollo/client");
1676
- var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
1693
+ var import_client32 = require("@apollo/client");
1694
+ var CREATE_STALLHOLDER_MUTATION = import_client32.gql`
1677
1695
  mutation createStallholder($input: StallholderInputType!) {
1678
1696
  createStallholder(input: $input) {
1679
1697
  ...StallholderFields
@@ -1681,7 +1699,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
1681
1699
  }
1682
1700
  ${STALLHOLDER}
1683
1701
  `;
1684
- var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
1702
+ var UPDATE_STALLHOLDER_MUTATION = import_client32.gql`
1685
1703
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
1686
1704
  updateStallholder(_id: $_id, input: $input) {
1687
1705
  ...StallholderFields
@@ -1689,12 +1707,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
1689
1707
  }
1690
1708
  ${STALLHOLDER}
1691
1709
  `;
1692
- var DELETE_STALLHOLDER_MUTATION = import_client31.gql`
1710
+ var DELETE_STALLHOLDER_MUTATION = import_client32.gql`
1693
1711
  mutation deleteStallholder($_id: ID!) {
1694
1712
  deleteStallholder(_id: $_id)
1695
1713
  }
1696
1714
  `;
1697
- var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1715
+ var CREATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
1698
1716
  mutation createStallholderInfo($input: StallholderInfoInputType!) {
1699
1717
  createStallholderInfo(input: $input) {
1700
1718
  ...StallholderInfoFields
@@ -1702,7 +1720,7 @@ var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1702
1720
  }
1703
1721
  ${STALLHOLDER_INFO}
1704
1722
  `;
1705
- var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1723
+ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
1706
1724
  mutation updateStallholderInfo($_id: ID!, $input: StallholderInfoInputType!) {
1707
1725
  updateStallholderInfo(_id: $_id, input: $input) {
1708
1726
  ...StallholderInfoFields
@@ -1713,7 +1731,7 @@ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1713
1731
 
1714
1732
  // src/graphql/hooks/stallholder/hooksMutation.ts
1715
1733
  var useCreateStallholder = () => {
1716
- const [createStallholder, { loading, error }] = (0, import_client32.useMutation)(
1734
+ const [createStallholder, { loading, error }] = (0, import_client33.useMutation)(
1717
1735
  CREATE_STALLHOLDER_MUTATION,
1718
1736
  {
1719
1737
  awaitRefetchQueries: true,
@@ -1725,7 +1743,7 @@ var useCreateStallholder = () => {
1725
1743
  return { createStallholder, error, loading };
1726
1744
  };
1727
1745
  var useUpdateStallholder = () => {
1728
- const [updateStallholder, { loading, error }] = (0, import_client32.useMutation)(
1746
+ const [updateStallholder, { loading, error }] = (0, import_client33.useMutation)(
1729
1747
  UPDATE_STALLHOLDER_MUTATION,
1730
1748
  {
1731
1749
  awaitRefetchQueries: true,
@@ -1737,7 +1755,7 @@ var useUpdateStallholder = () => {
1737
1755
  return { error, loading, updateStallholder };
1738
1756
  };
1739
1757
  var useDeleteStallholder = () => {
1740
- const [deleteStallholder, { loading, error }] = (0, import_client32.useMutation)(
1758
+ const [deleteStallholder, { loading, error }] = (0, import_client33.useMutation)(
1741
1759
  DELETE_STALLHOLDER_MUTATION,
1742
1760
  {
1743
1761
  awaitRefetchQueries: true,
@@ -1749,7 +1767,7 @@ var useDeleteStallholder = () => {
1749
1767
  return { deleteStallholder, error, loading };
1750
1768
  };
1751
1769
  var useCreateStallholderInfo = () => {
1752
- const [createStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
1770
+ const [createStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
1753
1771
  CREATE_STALLHOLDER_INFO_MUTATION,
1754
1772
  {
1755
1773
  awaitRefetchQueries: true,
@@ -1773,7 +1791,7 @@ var useCreateStallholderInfo = () => {
1773
1791
  return { createStallholderInfo, error, loading };
1774
1792
  };
1775
1793
  var useUpdateStallholderInfo = () => {
1776
- const [updateStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
1794
+ const [updateStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
1777
1795
  UPDATE_STALLHOLDER_INFO_MUTATION,
1778
1796
  {
1779
1797
  awaitRefetchQueries: true,
@@ -1794,9 +1812,9 @@ var useUpdateStallholderInfo = () => {
1794
1812
  };
1795
1813
 
1796
1814
  // src/graphql/hooks/stallholder/hooksQuery.ts
1797
- var import_client33 = require("@apollo/client");
1815
+ var import_client34 = require("@apollo/client");
1798
1816
  var useGetStallholders = () => {
1799
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDERS, {
1817
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDERS, {
1800
1818
  fetchPolicy: "network-only"
1801
1819
  });
1802
1820
  const stallholders = data?.stallholders;
@@ -1808,7 +1826,7 @@ var useGetStallholders = () => {
1808
1826
  };
1809
1827
  };
1810
1828
  var useGetStallholder = (_id) => {
1811
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER, {
1829
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDER, {
1812
1830
  fetchPolicy: "network-only",
1813
1831
  skip: !_id,
1814
1832
  variables: { _id }
@@ -1817,7 +1835,7 @@ var useGetStallholder = (_id) => {
1817
1835
  return { error, loading, refetch, stallholder };
1818
1836
  };
1819
1837
  var useGetStallholdersByRegion = (region) => {
1820
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(
1838
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(
1821
1839
  GET_STALLHOLDERS_BY_REGION,
1822
1840
  {
1823
1841
  fetchPolicy: "no-cache",
@@ -1829,7 +1847,7 @@ var useGetStallholdersByRegion = (region) => {
1829
1847
  return { error, loading, refetch, stallholdersByRegion };
1830
1848
  };
1831
1849
  var useSearchStallholders = (search, region) => {
1832
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(SEARCH_STALLHOLDERS, {
1850
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(SEARCH_STALLHOLDERS, {
1833
1851
  fetchPolicy: "network-only",
1834
1852
  skip: search.length < 3,
1835
1853
  variables: { region, search }
@@ -1838,7 +1856,7 @@ var useSearchStallholders = (search, region) => {
1838
1856
  return { error, loading, refetch, stallholderSearch };
1839
1857
  };
1840
1858
  var useGetStallholderInfo = (stallholderId) => {
1841
- 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, {
1842
1860
  fetchPolicy: "network-only",
1843
1861
  skip: !stallholderId,
1844
1862
  variables: { stallholderId }
@@ -1853,14 +1871,14 @@ var useGetStallholderInfo = (stallholderId) => {
1853
1871
  };
1854
1872
 
1855
1873
  // src/graphql/hooks/testers/hooksMutation.ts
1856
- var import_client36 = require("@apollo/client");
1874
+ var import_client37 = require("@apollo/client");
1857
1875
 
1858
1876
  // src/graphql/mutations/testers.ts
1859
- var import_client35 = require("@apollo/client");
1877
+ var import_client36 = require("@apollo/client");
1860
1878
 
1861
1879
  // src/graphql/queries/testers.ts
1862
- var import_client34 = require("@apollo/client");
1863
- var TESTER_FIELDS_FRAGMENT = import_client34.gql`
1880
+ var import_client35 = require("@apollo/client");
1881
+ var TESTER_FIELDS_FRAGMENT = import_client35.gql`
1864
1882
  fragment TesterFields on TesterType {
1865
1883
  _id
1866
1884
  active
@@ -1873,7 +1891,7 @@ var TESTER_FIELDS_FRAGMENT = import_client34.gql`
1873
1891
  updatedAt
1874
1892
  }
1875
1893
  `;
1876
- var GET_TESTERS = import_client34.gql`
1894
+ var GET_TESTERS = import_client35.gql`
1877
1895
  query getTesters {
1878
1896
  testers {
1879
1897
  ...TesterFields
@@ -1881,7 +1899,7 @@ var GET_TESTERS = import_client34.gql`
1881
1899
  }
1882
1900
  ${TESTER_FIELDS_FRAGMENT}
1883
1901
  `;
1884
- var GET_TESTER = import_client34.gql`
1902
+ var GET_TESTER = import_client35.gql`
1885
1903
  query getTester($_id: ID!) {
1886
1904
  tester(_id: $_id) {
1887
1905
  ...TesterFields
@@ -1891,7 +1909,7 @@ var GET_TESTER = import_client34.gql`
1891
1909
  `;
1892
1910
 
1893
1911
  // src/graphql/mutations/testers.ts
1894
- var CREATE_TESTER_MUTATION = import_client35.gql`
1912
+ var CREATE_TESTER_MUTATION = import_client36.gql`
1895
1913
  mutation createTester($input: TesterInputType!) {
1896
1914
  createTester(input: $input) {
1897
1915
  ...TesterFields
@@ -1899,7 +1917,7 @@ var CREATE_TESTER_MUTATION = import_client35.gql`
1899
1917
  }
1900
1918
  ${TESTER_FIELDS_FRAGMENT}
1901
1919
  `;
1902
- var UPDATE_TESTER_MUTATION = import_client35.gql`
1920
+ var UPDATE_TESTER_MUTATION = import_client36.gql`
1903
1921
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
1904
1922
  updateTester(_id: $_id, input: $input) {
1905
1923
  ...TesterFields
@@ -1907,7 +1925,7 @@ var UPDATE_TESTER_MUTATION = import_client35.gql`
1907
1925
  }
1908
1926
  ${TESTER_FIELDS_FRAGMENT}
1909
1927
  `;
1910
- var DELETE_TESTER_MUTATION = import_client35.gql`
1928
+ var DELETE_TESTER_MUTATION = import_client36.gql`
1911
1929
  mutation deleteTester($_id: ID!) {
1912
1930
  deleteTester(_id: $_id)
1913
1931
  }
@@ -1915,7 +1933,7 @@ var DELETE_TESTER_MUTATION = import_client35.gql`
1915
1933
 
1916
1934
  // src/graphql/hooks/testers/hooksMutation.ts
1917
1935
  var useCreateTester = () => {
1918
- const [createTester, { data, loading, error }] = (0, import_client36.useMutation)(
1936
+ const [createTester, { data, loading, error }] = (0, import_client37.useMutation)(
1919
1937
  CREATE_TESTER_MUTATION
1920
1938
  );
1921
1939
  return {
@@ -1926,7 +1944,7 @@ var useCreateTester = () => {
1926
1944
  };
1927
1945
  };
1928
1946
  var useUpdateTester = () => {
1929
- const [updateTester, { data, loading, error }] = (0, import_client36.useMutation)(
1947
+ const [updateTester, { data, loading, error }] = (0, import_client37.useMutation)(
1930
1948
  UPDATE_TESTER_MUTATION
1931
1949
  );
1932
1950
  return {
@@ -1937,16 +1955,16 @@ var useUpdateTester = () => {
1937
1955
  };
1938
1956
  };
1939
1957
  var useDeleteTester = () => {
1940
- const [deleteTester, { loading, error }] = (0, import_client36.useMutation)(
1958
+ const [deleteTester, { loading, error }] = (0, import_client37.useMutation)(
1941
1959
  DELETE_TESTER_MUTATION
1942
1960
  );
1943
1961
  return { deleteTester, error, loading };
1944
1962
  };
1945
1963
 
1946
1964
  // src/graphql/hooks/testers/hooksQuery.ts
1947
- var import_client37 = require("@apollo/client");
1965
+ var import_client38 = require("@apollo/client");
1948
1966
  var useGetTesters = () => {
1949
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTERS);
1967
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTERS);
1950
1968
  const testers = data?.testers;
1951
1969
  return {
1952
1970
  error,
@@ -1956,7 +1974,7 @@ var useGetTesters = () => {
1956
1974
  };
1957
1975
  };
1958
1976
  var useGetTester = (_id) => {
1959
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTER, {
1977
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTER, {
1960
1978
  skip: !_id,
1961
1979
  variables: { _id }
1962
1980
  });
@@ -1965,11 +1983,11 @@ var useGetTester = (_id) => {
1965
1983
  };
1966
1984
 
1967
1985
  // src/graphql/hooks/user/hooksMutation.ts
1968
- var import_client39 = require("@apollo/client");
1986
+ var import_client40 = require("@apollo/client");
1969
1987
 
1970
1988
  // src/graphql/mutations/user.ts
1971
- var import_client38 = require("@apollo/client");
1972
- var CREATE_USER_MUTATION = import_client38.gql`
1989
+ var import_client39 = require("@apollo/client");
1990
+ var CREATE_USER_MUTATION = import_client39.gql`
1973
1991
  mutation createUser($input: UserInputType!) {
1974
1992
  createUser(input: $input) {
1975
1993
  ...UserFields
@@ -1977,7 +1995,7 @@ var CREATE_USER_MUTATION = import_client38.gql`
1977
1995
  }
1978
1996
  ${USER_FIELDS_FRAGMENT}
1979
1997
  `;
1980
- var UPDATE_USER_MUTATION = import_client38.gql`
1998
+ var UPDATE_USER_MUTATION = import_client39.gql`
1981
1999
  mutation updateUser($_id: ID!, $input: UserInputType!) {
1982
2000
  updateUser(_id: $_id, input: $input) {
1983
2001
  ...UserFields
@@ -1985,12 +2003,12 @@ var UPDATE_USER_MUTATION = import_client38.gql`
1985
2003
  }
1986
2004
  ${USER_FIELDS_FRAGMENT}
1987
2005
  `;
1988
- var DELETE_USER_MUTATION = import_client38.gql`
2006
+ var DELETE_USER_MUTATION = import_client39.gql`
1989
2007
  mutation deleteUser($_id: ID!) {
1990
2008
  deleteUser(_id: $_id)
1991
2009
  }
1992
2010
  `;
1993
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2011
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
1994
2012
  mutation addUserFavouriteResource(
1995
2013
  $resourceId: ID!
1996
2014
  $resourceType: ResourceTypeEnum!
@@ -2006,7 +2024,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2006
2024
  }
2007
2025
  ${USER_FIELDS_FRAGMENT}
2008
2026
  `;
2009
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2027
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
2010
2028
  mutation removeUserFavouriteResource(
2011
2029
  $resourceId: ID!
2012
2030
  $resourceType: ResourceTypeEnum!
@@ -2025,11 +2043,11 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
2025
2043
 
2026
2044
  // src/graphql/hooks/user/hooksMutation.ts
2027
2045
  var useCreateUser = () => {
2028
- const [createUser, { loading, error }] = (0, import_client39.useMutation)(CREATE_USER_MUTATION);
2046
+ const [createUser, { loading, error }] = (0, import_client40.useMutation)(CREATE_USER_MUTATION);
2029
2047
  return { createUser, error, loading };
2030
2048
  };
2031
2049
  var useUpdateUser = () => {
2032
- const [updateUser, { loading, error }] = (0, import_client39.useMutation)(UPDATE_USER_MUTATION, {
2050
+ const [updateUser, { loading, error }] = (0, import_client40.useMutation)(UPDATE_USER_MUTATION, {
2033
2051
  awaitRefetchQueries: true,
2034
2052
  refetchQueries: (mutationResult) => {
2035
2053
  const userId = mutationResult?.data?.updateUser?._id;
@@ -2040,11 +2058,11 @@ var useUpdateUser = () => {
2040
2058
  return { error, loading, updateUser };
2041
2059
  };
2042
2060
  var useDeleteUser = () => {
2043
- const [deleteUser, { loading, error }] = (0, import_client39.useMutation)(DELETE_USER_MUTATION);
2061
+ const [deleteUser, { loading, error }] = (0, import_client40.useMutation)(DELETE_USER_MUTATION);
2044
2062
  return { deleteUser, error, loading };
2045
2063
  };
2046
2064
  var useAddUserFavouriteResource = () => {
2047
- const [addUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
2065
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
2048
2066
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
2049
2067
  {
2050
2068
  awaitRefetchQueries: true,
@@ -2054,7 +2072,7 @@ var useAddUserFavouriteResource = () => {
2054
2072
  return { addUserFavouriteResource, error, loading };
2055
2073
  };
2056
2074
  var useRemoveUserFavouriteResource = () => {
2057
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
2075
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
2058
2076
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
2059
2077
  {
2060
2078
  awaitRefetchQueries: true,
@@ -2065,37 +2083,37 @@ var useRemoveUserFavouriteResource = () => {
2065
2083
  };
2066
2084
 
2067
2085
  // src/graphql/hooks/user/hooksQuery.ts
2068
- var import_client40 = require("@apollo/client");
2086
+ var import_client41 = require("@apollo/client");
2069
2087
  var useGetUsers = () => {
2070
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USERS, {
2088
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USERS, {
2071
2089
  fetchPolicy: "network-only"
2072
2090
  });
2073
2091
  const users = data?.users;
2074
2092
  return { error, loading, refetch, users };
2075
2093
  };
2076
2094
  var useGetUser = (_id) => {
2077
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER, {
2095
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER, {
2078
2096
  variables: { _id }
2079
2097
  });
2080
2098
  const user = data?.user;
2081
2099
  return { error, loading, refetch, user };
2082
2100
  };
2083
2101
  var useGetUserMarkets = () => {
2084
- 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, {
2085
2103
  fetchPolicy: "network-only"
2086
2104
  });
2087
2105
  const userMarkets = data?.userMarkets;
2088
2106
  return { error, loading, refetch, userMarkets };
2089
2107
  };
2090
2108
  var useGetUserStallholder = () => {
2091
- 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, {
2092
2110
  fetchPolicy: "network-only"
2093
2111
  });
2094
2112
  const userStallholder = data?.userStallholder;
2095
2113
  return { error, loading, refetch, userStallholder };
2096
2114
  };
2097
2115
  var useGetUserFavourites = () => {
2098
- 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, {
2099
2117
  fetchPolicy: "network-only"
2100
2118
  });
2101
2119
  const markets = data?.userFavourites.markets;
@@ -2116,7 +2134,6 @@ var useGetUserFavourites = () => {
2116
2134
  useCreateChat,
2117
2135
  useCreateMarket,
2118
2136
  useCreateMarketInfo,
2119
- useCreateNotification,
2120
2137
  useCreatePoster,
2121
2138
  useCreatePushToken,
2122
2139
  useCreateRelation,
@@ -2139,6 +2156,7 @@ var useGetUserFavourites = () => {
2139
2156
  useGetMarkets,
2140
2157
  useGetMarketsByRegion,
2141
2158
  useGetMarketsNearMe,
2159
+ useGetNotificationCount,
2142
2160
  useGetNotificationCountSubscription,
2143
2161
  useGetRelation,
2144
2162
  useGetRelationByMarketAndStallholder,
@@ -2154,6 +2172,7 @@ var useGetUserFavourites = () => {
2154
2172
  useGetUserChats,
2155
2173
  useGetUserFavourites,
2156
2174
  useGetUserMarkets,
2175
+ useGetUserNotifications,
2157
2176
  useGetUserNotificationsSubscription,
2158
2177
  useGetUserStallholder,
2159
2178
  useGetUsers,