@timardex/cluemart-shared 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -108,16 +108,20 @@ __export(index_exports, {
108
108
  tagOptions: () => tagOptions,
109
109
  timeFormat: () => timeFormat,
110
110
  truncateText: () => truncateText,
111
+ useAddParticipantToChat: () => useAddParticipantToChat,
111
112
  useAddUserFavouriteResource: () => useAddUserFavouriteResource,
113
+ useCreateChat: () => useCreateChat,
112
114
  useCreateMarket: () => useCreateMarket,
113
115
  useCreateRelation: () => useCreateRelation,
114
116
  useCreateStallholder: () => useCreateStallholder,
115
117
  useCreateStallholderApplyForm: () => useCreateStallholderApplyForm,
116
118
  useCreateUser: () => useCreateUser,
119
+ useDeleteChat: () => useDeleteChat,
117
120
  useDeleteMarket: () => useDeleteMarket,
118
121
  useDeleteRelation: () => useDeleteRelation,
119
122
  useDeleteStallholder: () => useDeleteStallholder,
120
123
  useForgotPassword: () => useForgotPassword,
124
+ useGetChat: () => useGetChat,
121
125
  useGetMarket: () => useGetMarket,
122
126
  useGetMarketRelations: () => useGetMarketRelations,
123
127
  useGetMarkets: () => useGetMarkets,
@@ -133,6 +137,7 @@ __export(index_exports, {
133
137
  useGetStallholders: () => useGetStallholders,
134
138
  useGetStallholdersByRegion: () => useGetStallholdersByRegion,
135
139
  useGetUser: () => useGetUser,
140
+ useGetUserChats: () => useGetUserChats,
136
141
  useGetUserFavourites: () => useGetUserFavourites,
137
142
  useGetUserMarkets: () => useGetUserMarkets,
138
143
  useGetUserNotifications: () => useGetUserNotifications,
@@ -143,9 +148,11 @@ __export(index_exports, {
143
148
  useMarketForm: () => useMarketForm,
144
149
  useRegister: () => useRegister,
145
150
  useRegisterForm: () => useRegisterForm,
151
+ useRemoveParticipantFromChat: () => useRemoveParticipantFromChat,
146
152
  useRemoveUserFavouriteResource: () => useRemoveUserFavouriteResource,
147
153
  useSearchMarkets: () => useSearchMarkets,
148
154
  useSearchStallholders: () => useSearchStallholders,
155
+ useSendChatMessage: () => useSendChatMessage,
149
156
  useStallholderApplyForm: () => useStallholderApplyForm,
150
157
  useStallholderForm: () => useStallholderForm,
151
158
  useUpdateMarket: () => useUpdateMarket,
@@ -1231,15 +1238,203 @@ var useVerifyEmail = () => {
1231
1238
  return { error, loading, verifyEmail };
1232
1239
  };
1233
1240
 
1241
+ // src/graphql/hooks/chat/hooksMutation.ts
1242
+ var import_client6 = require("@apollo/client");
1243
+
1244
+ // src/graphql/mutations/chat.ts
1245
+ var import_client5 = require("@apollo/client");
1246
+
1247
+ // src/graphql/queries/chat.ts
1248
+ var import_client4 = require("@apollo/client");
1249
+ var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client4.gql`
1250
+ fragment ChatMessageFields on ChatMessageType {
1251
+ _id
1252
+ content
1253
+ createdAt
1254
+ senderId
1255
+ senderName
1256
+ updatedAt
1257
+ }
1258
+ `;
1259
+ var CHAT_FIELDS_FRAGMENT = import_client4.gql`
1260
+ fragment ChatFields on ChatType {
1261
+ _id
1262
+ createdAt
1263
+ messages {
1264
+ ...ChatMessageFields
1265
+ }
1266
+ name
1267
+ participants
1268
+ updatedAt
1269
+ }
1270
+ ${CHAT_MESSAGE_FIELDS_FRAGMENT}
1271
+ `;
1272
+ var CHAT = import_client4.gql`
1273
+ query chat($_id: ID!) {
1274
+ chat(_id: $_id) {
1275
+ ...ChatFields
1276
+ }
1277
+ }
1278
+ ${CHAT_FIELDS_FRAGMENT}
1279
+ `;
1280
+ var USER_CHATS = import_client4.gql`
1281
+ query userChats {
1282
+ userChats {
1283
+ ...ChatFields
1284
+ }
1285
+ }
1286
+ ${CHAT_FIELDS_FRAGMENT}
1287
+ `;
1288
+
1289
+ // src/graphql/mutations/chat.ts
1290
+ var CREATE_CHAT_MUTATION = import_client5.gql`
1291
+ mutation createChat($input: ChatInputType!) {
1292
+ createChat(input: $input) {
1293
+ ...ChatFields
1294
+ }
1295
+ }
1296
+ ${CHAT_FIELDS_FRAGMENT}
1297
+ `;
1298
+ var SEND_CHAT_MESSAGE_MUTATION = import_client5.gql`
1299
+ mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
1300
+ sendChatMessage(_id: $_id, input: $input) {
1301
+ ...ChatMessageFields
1302
+ }
1303
+ }
1304
+ ${CHAT_MESSAGE_FIELDS_FRAGMENT}
1305
+ `;
1306
+ var DELETE_CHAT_MUTATION = import_client5.gql`
1307
+ mutation deleteChat($_id: ID!) {
1308
+ deleteChat(_id: $_id)
1309
+ }
1310
+ `;
1311
+ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client5.gql`
1312
+ mutation addParticipantToChat($_id: ID!, $input: ID!) {
1313
+ addParticipantToChat(_id: $_id, input: $input) {
1314
+ ...ChatFields
1315
+ }
1316
+ ${CHAT_FIELDS_FRAGMENT}
1317
+ }
1318
+ `;
1319
+ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client5.gql`
1320
+ mutation removeParticipantFromChat($_id: ID!, $input: ID!) {
1321
+ removeParticipantFromChat(_id: $_id, input: $input) {
1322
+ ...ChatFields
1323
+ }
1324
+ }
1325
+ ${CHAT_FIELDS_FRAGMENT}
1326
+ `;
1327
+
1328
+ // src/graphql/hooks/chat/hooksMutation.ts
1329
+ var useCreateChat = () => {
1330
+ const [createChat, { loading, error }] = (0, import_client6.useMutation)(CREATE_CHAT_MUTATION, {
1331
+ awaitRefetchQueries: true,
1332
+ refetchQueries: (mutationResult) => {
1333
+ const chatId = mutationResult?.data?.createChat?._id;
1334
+ return [
1335
+ {
1336
+ query: USER_CHATS,
1337
+ variables: { userId: mutationResult?.data?.createChat?.userId }
1338
+ },
1339
+ {
1340
+ query: CHAT,
1341
+ variables: { _id: chatId }
1342
+ }
1343
+ ];
1344
+ }
1345
+ });
1346
+ return { createChat, error, loading };
1347
+ };
1348
+ var useSendChatMessage = () => {
1349
+ const [sendChatMessage, { loading, error }] = (0, import_client6.useMutation)(
1350
+ SEND_CHAT_MESSAGE_MUTATION,
1351
+ {
1352
+ awaitRefetchQueries: true,
1353
+ refetchQueries: (mutationResult) => {
1354
+ const chatId = mutationResult?.data?.sendChatMessage?._id;
1355
+ return [
1356
+ {
1357
+ query: CHAT,
1358
+ variables: { _id: chatId }
1359
+ }
1360
+ ];
1361
+ }
1362
+ }
1363
+ );
1364
+ return { error, loading, sendChatMessage };
1365
+ };
1366
+ var useDeleteChat = () => {
1367
+ const [deleteChat, { loading, error }] = (0, import_client6.useMutation)(DELETE_CHAT_MUTATION, {
1368
+ awaitRefetchQueries: true,
1369
+ refetchQueries: [{ query: USER_CHATS }]
1370
+ });
1371
+ return { deleteChat, error, loading };
1372
+ };
1373
+ var useAddParticipantToChat = () => {
1374
+ const [addParticipantToChat, { loading, error }] = (0, import_client6.useMutation)(
1375
+ ADD_PARTICIPANT_TO_CHAT_MUTATION,
1376
+ {
1377
+ awaitRefetchQueries: true,
1378
+ refetchQueries: (mutationResult) => {
1379
+ const chatId = mutationResult?.data?.addParticipantToChat?._id;
1380
+ return [
1381
+ {
1382
+ query: CHAT,
1383
+ variables: { _id: chatId }
1384
+ }
1385
+ ];
1386
+ }
1387
+ }
1388
+ );
1389
+ return { addParticipantToChat, error, loading };
1390
+ };
1391
+ var useRemoveParticipantFromChat = () => {
1392
+ const [removeParticipantFromChat, { loading, error }] = (0, import_client6.useMutation)(
1393
+ REMOVE_PARTICIPANT_FROM_CHAT_MUTATION,
1394
+ {
1395
+ awaitRefetchQueries: true,
1396
+ refetchQueries: (mutationResult) => {
1397
+ const chatId = mutationResult?.data?.removeParticipantFromChat?._id;
1398
+ return [
1399
+ {
1400
+ query: CHAT,
1401
+ variables: { _id: chatId }
1402
+ }
1403
+ ];
1404
+ }
1405
+ }
1406
+ );
1407
+ return { error, loading, removeParticipantFromChat };
1408
+ };
1409
+
1410
+ // src/graphql/hooks/chat/hooksQuery.ts
1411
+ var import_client7 = require("@apollo/client");
1412
+ var useGetChat = (_id) => {
1413
+ const { loading, error, data, refetch } = (0, import_client7.useQuery)(CHAT, {
1414
+ fetchPolicy: "network-only",
1415
+ skip: !_id,
1416
+ variables: { _id }
1417
+ });
1418
+ const chat = data?.chat;
1419
+ return { chat, error, loading, refetch };
1420
+ };
1421
+ var useGetUserChats = () => {
1422
+ const { loading, error, data, refetch } = (0, import_client7.useQuery)(USER_CHATS, {
1423
+ fetchPolicy: "network-only"
1424
+ });
1425
+ const userChats = data?.userChats;
1426
+ return { error, loading, refetch, userChats };
1427
+ };
1428
+
1234
1429
  // src/graphql/hooks/market/hooksMutation.ts
1235
- var import_client8 = require("@apollo/client");
1430
+ var import_client12 = require("@apollo/client");
1236
1431
 
1237
1432
  // src/graphql/mutations/market.ts
1238
- var import_client5 = require("@apollo/client");
1433
+ var import_client9 = require("@apollo/client");
1239
1434
 
1240
1435
  // src/graphql/queries/market.ts
1241
- var import_client4 = require("@apollo/client");
1242
- var MARKET_DATETIME_FIELDS_FRAGMENT = import_client4.gql`
1436
+ var import_client8 = require("@apollo/client");
1437
+ var MARKET_DATETIME_FIELDS_FRAGMENT = import_client8.gql`
1243
1438
  fragment MarketDateTimeFields on MarketDateTimeType {
1244
1439
  endDate
1245
1440
  endTime
@@ -1247,7 +1442,7 @@ var MARKET_DATETIME_FIELDS_FRAGMENT = import_client4.gql`
1247
1442
  startTime
1248
1443
  }
1249
1444
  `;
1250
- var MARKET_LOCATION_FIELDS_FRAGMENT = import_client4.gql`
1445
+ var MARKET_LOCATION_FIELDS_FRAGMENT = import_client8.gql`
1251
1446
  fragment MarketLocationFields on MarketLocationType {
1252
1447
  city
1253
1448
  coordinates
@@ -1259,7 +1454,7 @@ var MARKET_LOCATION_FIELDS_FRAGMENT = import_client4.gql`
1259
1454
  type
1260
1455
  }
1261
1456
  `;
1262
- var MARKET = import_client4.gql`
1457
+ var MARKET = import_client8.gql`
1263
1458
  fragment MarketFields on MarketType {
1264
1459
  _id
1265
1460
  active
@@ -1301,7 +1496,7 @@ var MARKET = import_client4.gql`
1301
1496
  ${OWNER_FIELDS_FRAGMENT}
1302
1497
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
1303
1498
  `;
1304
- var GET_MARKETS = import_client4.gql`
1499
+ var GET_MARKETS = import_client8.gql`
1305
1500
  query getMarkets {
1306
1501
  markets {
1307
1502
  ...MarketFields
@@ -1309,7 +1504,7 @@ var GET_MARKETS = import_client4.gql`
1309
1504
  }
1310
1505
  ${MARKET}
1311
1506
  `;
1312
- var GET_MARKET = import_client4.gql`
1507
+ var GET_MARKET = import_client8.gql`
1313
1508
  query getMarket($_id: ID!) {
1314
1509
  market(_id: $_id) {
1315
1510
  ...MarketFields
@@ -1317,7 +1512,7 @@ var GET_MARKET = import_client4.gql`
1317
1512
  }
1318
1513
  ${MARKET}
1319
1514
  `;
1320
- var GET_MARKETS_BY_REGION = import_client4.gql`
1515
+ var GET_MARKETS_BY_REGION = import_client8.gql`
1321
1516
  query getMarketsByRegion($region: String!) {
1322
1517
  marketsByRegion(region: $region) {
1323
1518
  ...MarketFields
@@ -1325,7 +1520,7 @@ var GET_MARKETS_BY_REGION = import_client4.gql`
1325
1520
  }
1326
1521
  ${MARKET}
1327
1522
  `;
1328
- var SEARCH_MARKETS = import_client4.gql`
1523
+ var SEARCH_MARKETS = import_client8.gql`
1329
1524
  query searchMarkets($search: String!, $region: String) {
1330
1525
  marketSearch(search: $search, region: $region) {
1331
1526
  ...MarketFields
@@ -1333,7 +1528,7 @@ var SEARCH_MARKETS = import_client4.gql`
1333
1528
  }
1334
1529
  ${MARKET}
1335
1530
  `;
1336
- var GET_MARKETS_NEAR_ME = import_client4.gql`
1531
+ var GET_MARKETS_NEAR_ME = import_client8.gql`
1337
1532
  query getMarketsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
1338
1533
  marketsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
1339
1534
  ...MarketFields
@@ -1343,7 +1538,7 @@ var GET_MARKETS_NEAR_ME = import_client4.gql`
1343
1538
  `;
1344
1539
 
1345
1540
  // src/graphql/mutations/market.ts
1346
- var CREATE_MARKET_MUTATION = import_client5.gql`
1541
+ var CREATE_MARKET_MUTATION = import_client9.gql`
1347
1542
  mutation createMarket($input: MarketInputType!) {
1348
1543
  createMarket(input: $input) {
1349
1544
  ...MarketFields
@@ -1351,7 +1546,7 @@ var CREATE_MARKET_MUTATION = import_client5.gql`
1351
1546
  }
1352
1547
  ${MARKET}
1353
1548
  `;
1354
- var UPDATE_MARKET_MUTATION = import_client5.gql`
1549
+ var UPDATE_MARKET_MUTATION = import_client9.gql`
1355
1550
  mutation updateMarket($_id: ID!, $input: MarketInputType!) {
1356
1551
  updateMarket(_id: $_id, input: $input) {
1357
1552
  ...MarketFields
@@ -1359,18 +1554,18 @@ var UPDATE_MARKET_MUTATION = import_client5.gql`
1359
1554
  }
1360
1555
  ${MARKET}
1361
1556
  `;
1362
- var DELETE_MARKET_MUTATION = import_client5.gql`
1557
+ var DELETE_MARKET_MUTATION = import_client9.gql`
1363
1558
  mutation deleteMarket($_id: ID!) {
1364
1559
  deleteMarket(_id: $_id)
1365
1560
  }
1366
1561
  `;
1367
1562
 
1368
1563
  // src/graphql/queries/user.ts
1369
- var import_client7 = require("@apollo/client");
1564
+ var import_client11 = require("@apollo/client");
1370
1565
 
1371
1566
  // src/graphql/queries/stallholder.ts
1372
- var import_client6 = require("@apollo/client");
1373
- var STALLHOLDER_LOCATION_FIELDS_FRAGMENT = import_client6.gql`
1567
+ var import_client10 = require("@apollo/client");
1568
+ var STALLHOLDER_LOCATION_FIELDS_FRAGMENT = import_client10.gql`
1374
1569
  fragment StallholderLocationFields on StallholderLocationType {
1375
1570
  city
1376
1571
  coordinates
@@ -1382,7 +1577,7 @@ var STALLHOLDER_LOCATION_FIELDS_FRAGMENT = import_client6.gql`
1382
1577
  type
1383
1578
  }
1384
1579
  `;
1385
- var STALLHOLDER_DATETIME_FIELDS_FRAGMENT = import_client6.gql`
1580
+ var STALLHOLDER_DATETIME_FIELDS_FRAGMENT = import_client10.gql`
1386
1581
  fragment StallholderDateTimeFields on StallholderDateTimeType {
1387
1582
  endDate
1388
1583
  endTime
@@ -1390,7 +1585,7 @@ var STALLHOLDER_DATETIME_FIELDS_FRAGMENT = import_client6.gql`
1390
1585
  startTime
1391
1586
  }
1392
1587
  `;
1393
- var STALLHOLDER = import_client6.gql`
1588
+ var STALLHOLDER = import_client10.gql`
1394
1589
  fragment StallholderFields on StallholderType {
1395
1590
  _id
1396
1591
  active
@@ -1436,7 +1631,7 @@ var STALLHOLDER = import_client6.gql`
1436
1631
  ${OWNER_FIELDS_FRAGMENT}
1437
1632
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
1438
1633
  `;
1439
- var STALLHOLDER_APPLY_FORM = import_client6.gql`
1634
+ var STALLHOLDER_APPLY_FORM = import_client10.gql`
1440
1635
  fragment StallholderApplyFormFields on StallholderApplyFormType {
1441
1636
  _id
1442
1637
  active
@@ -1467,7 +1662,7 @@ var STALLHOLDER_APPLY_FORM = import_client6.gql`
1467
1662
  }
1468
1663
  }
1469
1664
  `;
1470
- var GET_STALLHOLDERS = import_client6.gql`
1665
+ var GET_STALLHOLDERS = import_client10.gql`
1471
1666
  query getStallHolders {
1472
1667
  stallholders {
1473
1668
  ...StallholderFields
@@ -1475,7 +1670,7 @@ var GET_STALLHOLDERS = import_client6.gql`
1475
1670
  }
1476
1671
  ${STALLHOLDER}
1477
1672
  `;
1478
- var GET_STALLHOLDER = import_client6.gql`
1673
+ var GET_STALLHOLDER = import_client10.gql`
1479
1674
  query getStallHolder($_id: ID!) {
1480
1675
  stallholder(_id: $_id) {
1481
1676
  ...StallholderFields
@@ -1483,7 +1678,7 @@ var GET_STALLHOLDER = import_client6.gql`
1483
1678
  }
1484
1679
  ${STALLHOLDER}
1485
1680
  `;
1486
- var GET_STALLHOLDERS_BY_REGION = import_client6.gql`
1681
+ var GET_STALLHOLDERS_BY_REGION = import_client10.gql`
1487
1682
  query getStallholdersByRegion($region: String!) {
1488
1683
  stallholdersByRegion(region: $region) {
1489
1684
  ...StallholderFields
@@ -1491,7 +1686,7 @@ var GET_STALLHOLDERS_BY_REGION = import_client6.gql`
1491
1686
  }
1492
1687
  ${STALLHOLDER}
1493
1688
  `;
1494
- var SEARCH_STALLHOLDERS = import_client6.gql`
1689
+ var SEARCH_STALLHOLDERS = import_client10.gql`
1495
1690
  query searchStallholders($search: String!, $region: String) {
1496
1691
  stallholderSearch(search: $search, region: $region) {
1497
1692
  ...StallholderFields
@@ -1499,7 +1694,7 @@ var SEARCH_STALLHOLDERS = import_client6.gql`
1499
1694
  }
1500
1695
  ${STALLHOLDER}
1501
1696
  `;
1502
- var GET_STALLHOLDER_APPLY_FORM = import_client6.gql`
1697
+ var GET_STALLHOLDER_APPLY_FORM = import_client10.gql`
1503
1698
  query getStallholderApplyForm($stallholderId: ID!) {
1504
1699
  stallholderApplyForm(stallholderId: $stallholderId) {
1505
1700
  ...StallholderApplyFormFields
@@ -1509,7 +1704,7 @@ var GET_STALLHOLDER_APPLY_FORM = import_client6.gql`
1509
1704
  `;
1510
1705
 
1511
1706
  // src/graphql/queries/user.ts
1512
- var GET_USERS = import_client7.gql`
1707
+ var GET_USERS = import_client11.gql`
1513
1708
  query getUsers {
1514
1709
  users {
1515
1710
  ...UserFields
@@ -1517,7 +1712,7 @@ var GET_USERS = import_client7.gql`
1517
1712
  }
1518
1713
  ${USER_FIELDS_FRAGMENT}
1519
1714
  `;
1520
- var GET_USER = import_client7.gql`
1715
+ var GET_USER = import_client11.gql`
1521
1716
  query getUser($id: ID!) {
1522
1717
  user(_id: $id) {
1523
1718
  ...UserFields
@@ -1525,7 +1720,7 @@ var GET_USER = import_client7.gql`
1525
1720
  }
1526
1721
  ${USER_FIELDS_FRAGMENT}
1527
1722
  `;
1528
- var GET_USER_MARKETS = import_client7.gql`
1723
+ var GET_USER_MARKETS = import_client11.gql`
1529
1724
  query getUserMarkets {
1530
1725
  userMarkets {
1531
1726
  ...MarketFields
@@ -1533,7 +1728,7 @@ var GET_USER_MARKETS = import_client7.gql`
1533
1728
  }
1534
1729
  ${MARKET}
1535
1730
  `;
1536
- var GET_USER_FAVOURITES = import_client7.gql`
1731
+ var GET_USER_FAVOURITES = import_client11.gql`
1537
1732
  query getUserFavourites {
1538
1733
  userFavourites {
1539
1734
  markets {
@@ -1547,7 +1742,7 @@ var GET_USER_FAVOURITES = import_client7.gql`
1547
1742
  ${MARKET}
1548
1743
  ${STALLHOLDER}
1549
1744
  `;
1550
- var GET_USER_NOTIFICATIONS = import_client7.gql`
1745
+ var GET_USER_NOTIFICATIONS = import_client11.gql`
1551
1746
  query getMissedNotifications {
1552
1747
  userNotifications
1553
1748
  }
@@ -1555,7 +1750,7 @@ var GET_USER_NOTIFICATIONS = import_client7.gql`
1555
1750
 
1556
1751
  // src/graphql/hooks/market/hooksMutation.ts
1557
1752
  var useCreateMarket = () => {
1558
- const [createMarket, { loading, error }] = (0, import_client8.useMutation)(
1753
+ const [createMarket, { loading, error }] = (0, import_client12.useMutation)(
1559
1754
  CREATE_MARKET_MUTATION,
1560
1755
  {
1561
1756
  awaitRefetchQueries: true,
@@ -1565,7 +1760,7 @@ var useCreateMarket = () => {
1565
1760
  return { createMarket, error, loading };
1566
1761
  };
1567
1762
  var useUpdateMarket = () => {
1568
- const [updateMarket, { loading, error }] = (0, import_client8.useMutation)(
1763
+ const [updateMarket, { loading, error }] = (0, import_client12.useMutation)(
1569
1764
  UPDATE_MARKET_MUTATION,
1570
1765
  {
1571
1766
  awaitRefetchQueries: true,
@@ -1575,7 +1770,7 @@ var useUpdateMarket = () => {
1575
1770
  return { error, loading, updateMarket };
1576
1771
  };
1577
1772
  var useDeleteMarket = () => {
1578
- const [deleteMarket, { loading, error }] = (0, import_client8.useMutation)(
1773
+ const [deleteMarket, { loading, error }] = (0, import_client12.useMutation)(
1579
1774
  DELETE_MARKET_MUTATION,
1580
1775
  {
1581
1776
  awaitRefetchQueries: true,
@@ -1586,16 +1781,16 @@ var useDeleteMarket = () => {
1586
1781
  };
1587
1782
 
1588
1783
  // src/graphql/hooks/market/hooksQuery.ts
1589
- var import_client9 = require("@apollo/client");
1784
+ var import_client13 = require("@apollo/client");
1590
1785
  var useGetMarkets = () => {
1591
- const { loading, error, data, refetch } = (0, import_client9.useQuery)(GET_MARKETS, {
1786
+ const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_MARKETS, {
1592
1787
  fetchPolicy: "network-only"
1593
1788
  });
1594
1789
  const markets = data?.markets;
1595
1790
  return { error, loading, markets, refetch };
1596
1791
  };
1597
1792
  var useGetMarket = (_id) => {
1598
- const { loading, error, data, refetch } = (0, import_client9.useQuery)(GET_MARKET, {
1793
+ const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_MARKET, {
1599
1794
  fetchPolicy: "network-only",
1600
1795
  skip: !_id,
1601
1796
  variables: { _id }
@@ -1604,7 +1799,7 @@ var useGetMarket = (_id) => {
1604
1799
  return { error, loading, market, refetch };
1605
1800
  };
1606
1801
  var useGetMarketsByRegion = (region) => {
1607
- const { loading, error, data, refetch } = (0, import_client9.useQuery)(GET_MARKETS_BY_REGION, {
1802
+ const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_MARKETS_BY_REGION, {
1608
1803
  fetchPolicy: "network-only",
1609
1804
  skip: !region,
1610
1805
  variables: { region }
@@ -1613,7 +1808,7 @@ var useGetMarketsByRegion = (region) => {
1613
1808
  return { error, loading, markets, refetch };
1614
1809
  };
1615
1810
  var useSearchMarkets = (search, region) => {
1616
- const { loading, error, data, refetch } = (0, import_client9.useQuery)(SEARCH_MARKETS, {
1811
+ const { loading, error, data, refetch } = (0, import_client13.useQuery)(SEARCH_MARKETS, {
1617
1812
  fetchPolicy: "network-only",
1618
1813
  skip: search.length < 3,
1619
1814
  variables: { region, search }
@@ -1622,7 +1817,7 @@ var useSearchMarkets = (search, region) => {
1622
1817
  return { error, loading, markets, refetch };
1623
1818
  };
1624
1819
  var useGetMarketsNearMe = (location) => {
1625
- const { loading, error, data, refetch } = (0, import_client9.useQuery)(GET_MARKETS_NEAR_ME, {
1820
+ const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_MARKETS_NEAR_ME, {
1626
1821
  fetchPolicy: "network-only",
1627
1822
  skip: !location.latitude || !location.longitude,
1628
1823
  variables: {
@@ -1637,14 +1832,14 @@ var useGetMarketsNearMe = (location) => {
1637
1832
  };
1638
1833
 
1639
1834
  // src/graphql/hooks/relation/hooksMutation.ts
1640
- var import_client12 = require("@apollo/client");
1835
+ var import_client16 = require("@apollo/client");
1641
1836
 
1642
1837
  // src/graphql/mutations/relation.ts
1643
- var import_client11 = require("@apollo/client");
1838
+ var import_client15 = require("@apollo/client");
1644
1839
 
1645
1840
  // src/graphql/queries/relation.ts
1646
- var import_client10 = require("@apollo/client");
1647
- var RELATION_UPDATE_BY_FRAGMENT = import_client10.gql`
1841
+ var import_client14 = require("@apollo/client");
1842
+ var RELATION_UPDATE_BY_FRAGMENT = import_client14.gql`
1648
1843
  fragment RelationUpdateBy on RelationUpdateByType {
1649
1844
  resourceId
1650
1845
  resourceName
@@ -1653,7 +1848,7 @@ var RELATION_UPDATE_BY_FRAGMENT = import_client10.gql`
1653
1848
  toStatus
1654
1849
  }
1655
1850
  `;
1656
- var RELATION_LOGS_FRAGMENT = import_client10.gql`
1851
+ var RELATION_LOGS_FRAGMENT = import_client14.gql`
1657
1852
  fragment RelationLogs on RelationLogType {
1658
1853
  createdAt
1659
1854
  updatedAt
@@ -1663,14 +1858,14 @@ var RELATION_LOGS_FRAGMENT = import_client10.gql`
1663
1858
  }
1664
1859
  ${RELATION_UPDATE_BY_FRAGMENT}
1665
1860
  `;
1666
- var RELATION_DATES_FRAGMENT = import_client10.gql`
1861
+ var RELATION_DATES_FRAGMENT = import_client14.gql`
1667
1862
  fragment RelationDates on RelationDateType {
1668
1863
  lastUpdateBy
1669
1864
  startDate
1670
1865
  status
1671
1866
  }
1672
1867
  `;
1673
- var RELATION_FIELDS_FRAGMENT = import_client10.gql`
1868
+ var RELATION_FIELDS_FRAGMENT = import_client14.gql`
1674
1869
  fragment RelationFields on RelationType {
1675
1870
  _id
1676
1871
  createdAt
@@ -1689,7 +1884,7 @@ var RELATION_FIELDS_FRAGMENT = import_client10.gql`
1689
1884
  ${RELATION_DATES_FRAGMENT}
1690
1885
  ${RELATION_LOGS_FRAGMENT}
1691
1886
  `;
1692
- var GET_RELATION = import_client10.gql`
1887
+ var GET_RELATION = import_client14.gql`
1693
1888
  query getRelation($id: ID!) {
1694
1889
  relation(_id: $id) {
1695
1890
  ...RelationFields
@@ -1697,7 +1892,7 @@ var GET_RELATION = import_client10.gql`
1697
1892
  }
1698
1893
  ${RELATION_FIELDS_FRAGMENT}
1699
1894
  `;
1700
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client10.gql`
1895
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client14.gql`
1701
1896
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
1702
1897
  relationByMarketAndStallholder(
1703
1898
  marketId: $marketId
@@ -1708,7 +1903,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client10.gql`
1708
1903
  }
1709
1904
  ${RELATION_FIELDS_FRAGMENT}
1710
1905
  `;
1711
- var GET_MARKET_RELATIONS = import_client10.gql`
1906
+ var GET_MARKET_RELATIONS = import_client14.gql`
1712
1907
  query getMarketRelations($marketId: ID!) {
1713
1908
  marketRelations(marketId: $marketId) {
1714
1909
  ...RelationFields
@@ -1716,7 +1911,7 @@ var GET_MARKET_RELATIONS = import_client10.gql`
1716
1911
  }
1717
1912
  ${RELATION_FIELDS_FRAGMENT}
1718
1913
  `;
1719
- var GET_STALLHOLDER_RELATIONS = import_client10.gql`
1914
+ var GET_STALLHOLDER_RELATIONS = import_client14.gql`
1720
1915
  query getStallholderRelations($stallholderId: ID!) {
1721
1916
  stallholderRelations(stallholderId: $stallholderId) {
1722
1917
  ...RelationFields
@@ -1724,7 +1919,7 @@ var GET_STALLHOLDER_RELATIONS = import_client10.gql`
1724
1919
  }
1725
1920
  ${RELATION_FIELDS_FRAGMENT}
1726
1921
  `;
1727
- var GET_RESOURCE_CONNECTIONS = import_client10.gql`
1922
+ var GET_RESOURCE_CONNECTIONS = import_client14.gql`
1728
1923
  query getResourceConnections(
1729
1924
  $resourceId: ID!
1730
1925
  $resourceType: ResourceTypeEnum!
@@ -1822,7 +2017,7 @@ var GET_RESOURCE_CONNECTIONS = import_client10.gql`
1822
2017
  `;
1823
2018
 
1824
2019
  // src/graphql/mutations/relation.ts
1825
- var CREATE_RELATION_MUTATION = import_client11.gql`
2020
+ var CREATE_RELATION_MUTATION = import_client15.gql`
1826
2021
  mutation createRelation($input: RelationInputType!) {
1827
2022
  createRelation(input: $input) {
1828
2023
  ...RelationFields
@@ -1830,7 +2025,7 @@ var CREATE_RELATION_MUTATION = import_client11.gql`
1830
2025
  }
1831
2026
  ${RELATION_FIELDS_FRAGMENT}
1832
2027
  `;
1833
- var UPDATE_RELATION_MUTATION = import_client11.gql`
2028
+ var UPDATE_RELATION_MUTATION = import_client15.gql`
1834
2029
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
1835
2030
  updateRelation(_id: $_id, input: $input) {
1836
2031
  ...RelationFields
@@ -1838,7 +2033,7 @@ var UPDATE_RELATION_MUTATION = import_client11.gql`
1838
2033
  }
1839
2034
  ${RELATION_FIELDS_FRAGMENT}
1840
2035
  `;
1841
- var DELETE_RELATION_MUTATION = import_client11.gql`
2036
+ var DELETE_RELATION_MUTATION = import_client15.gql`
1842
2037
  mutation deleteRelation($_id: ID!) {
1843
2038
  deleteRelation(_id: $_id) {
1844
2039
  ...RelationFields
@@ -1849,7 +2044,7 @@ var DELETE_RELATION_MUTATION = import_client11.gql`
1849
2044
 
1850
2045
  // src/graphql/hooks/relation/hooksMutation.ts
1851
2046
  var useCreateRelation = () => {
1852
- const [createRelation, { loading, error }] = (0, import_client12.useMutation)(
2047
+ const [createRelation, { loading, error }] = (0, import_client16.useMutation)(
1853
2048
  CREATE_RELATION_MUTATION,
1854
2049
  {
1855
2050
  awaitRefetchQueries: true,
@@ -1884,7 +2079,7 @@ var useCreateRelation = () => {
1884
2079
  return { createRelation, error, loading };
1885
2080
  };
1886
2081
  var useUpdateRelation = () => {
1887
- const [updateRelation, { loading, error }] = (0, import_client12.useMutation)(
2082
+ const [updateRelation, { loading, error }] = (0, import_client16.useMutation)(
1888
2083
  UPDATE_RELATION_MUTATION,
1889
2084
  {
1890
2085
  awaitRefetchQueries: true,
@@ -1919,7 +2114,7 @@ var useUpdateRelation = () => {
1919
2114
  return { error, loading, updateRelation };
1920
2115
  };
1921
2116
  var useDeleteRelation = () => {
1922
- const [deleteRelation, { loading, error }] = (0, import_client12.useMutation)(
2117
+ const [deleteRelation, { loading, error }] = (0, import_client16.useMutation)(
1923
2118
  DELETE_RELATION_MUTATION,
1924
2119
  {
1925
2120
  awaitRefetchQueries: true,
@@ -1947,9 +2142,9 @@ var useDeleteRelation = () => {
1947
2142
  };
1948
2143
 
1949
2144
  // src/graphql/hooks/relation/hooksQuery.ts
1950
- var import_client13 = require("@apollo/client");
2145
+ var import_client17 = require("@apollo/client");
1951
2146
  var useGetRelation = (id) => {
1952
- const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_RELATION, {
2147
+ const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_RELATION, {
1953
2148
  fetchPolicy: "network-only",
1954
2149
  skip: id === "",
1955
2150
  variables: { id }
@@ -1958,7 +2153,7 @@ var useGetRelation = (id) => {
1958
2153
  return { error, loading, refetch, relation };
1959
2154
  };
1960
2155
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1961
- const { loading, error, data, refetch } = (0, import_client13.useQuery)(
2156
+ const { loading, error, data, refetch } = (0, import_client17.useQuery)(
1962
2157
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1963
2158
  {
1964
2159
  fetchPolicy: "no-cache",
@@ -1970,7 +2165,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1970
2165
  return { error, loading, refetch, relationByMarketAndStallholder };
1971
2166
  };
1972
2167
  var useGetMarketRelations = (marketId) => {
1973
- const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_MARKET_RELATIONS, {
2168
+ const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKET_RELATIONS, {
1974
2169
  fetchPolicy: "network-only",
1975
2170
  skip: marketId === "",
1976
2171
  variables: { marketId }
@@ -1979,7 +2174,7 @@ var useGetMarketRelations = (marketId) => {
1979
2174
  return { error, loading, marketRelations, refetch };
1980
2175
  };
1981
2176
  var useGetStallholderRelations = (stallholderId) => {
1982
- const { loading, error, data, refetch } = (0, import_client13.useQuery)(
2177
+ const { loading, error, data, refetch } = (0, import_client17.useQuery)(
1983
2178
  GET_STALLHOLDER_RELATIONS,
1984
2179
  {
1985
2180
  fetchPolicy: "network-only",
@@ -1991,7 +2186,7 @@ var useGetStallholderRelations = (stallholderId) => {
1991
2186
  return { error, loading, refetch, stallholderRelations };
1992
2187
  };
1993
2188
  var useGetResourceConnections = (resourceId, resourceType) => {
1994
- const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_RESOURCE_CONNECTIONS, {
2189
+ const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_RESOURCE_CONNECTIONS, {
1995
2190
  fetchPolicy: "network-only",
1996
2191
  variables: { resourceId, resourceType }
1997
2192
  });
@@ -2000,11 +2195,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
2000
2195
  };
2001
2196
 
2002
2197
  // src/graphql/hooks/stallholder/hooksMutation.ts
2003
- var import_client15 = require("@apollo/client");
2198
+ var import_client19 = require("@apollo/client");
2004
2199
 
2005
2200
  // src/graphql/mutations/stallholder.ts
2006
- var import_client14 = require("@apollo/client");
2007
- var CREATE_STALLHOLDER_MUTATION = import_client14.gql`
2201
+ var import_client18 = require("@apollo/client");
2202
+ var CREATE_STALLHOLDER_MUTATION = import_client18.gql`
2008
2203
  mutation createStallholder($input: StallholderInputType!) {
2009
2204
  createStallholder(input: $input) {
2010
2205
  ...StallholderFields
@@ -2012,7 +2207,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client14.gql`
2012
2207
  }
2013
2208
  ${STALLHOLDER}
2014
2209
  `;
2015
- var UPDATE_STALLHOLDER_MUTATION = import_client14.gql`
2210
+ var UPDATE_STALLHOLDER_MUTATION = import_client18.gql`
2016
2211
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
2017
2212
  updateStallholder(_id: $_id, input: $input) {
2018
2213
  ...StallholderFields
@@ -2020,12 +2215,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client14.gql`
2020
2215
  }
2021
2216
  ${STALLHOLDER}
2022
2217
  `;
2023
- var DELETE_STALLHOLDER_MUTATION = import_client14.gql`
2218
+ var DELETE_STALLHOLDER_MUTATION = import_client18.gql`
2024
2219
  mutation deleteStallholder($_id: ID!) {
2025
2220
  deleteStallholder(_id: $_id)
2026
2221
  }
2027
2222
  `;
2028
- var CREATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client14.gql`
2223
+ var CREATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client18.gql`
2029
2224
  mutation createStallholderApplyForm($input: StallholderApplyFormInputType!) {
2030
2225
  createStallholderApplyForm(input: $input) {
2031
2226
  ...StallholderApplyFormFields
@@ -2033,7 +2228,7 @@ var CREATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client14.gql`
2033
2228
  }
2034
2229
  ${STALLHOLDER_APPLY_FORM}
2035
2230
  `;
2036
- var UPDATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client14.gql`
2231
+ var UPDATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client18.gql`
2037
2232
  mutation updateStallholderApplyForm(
2038
2233
  $_id: ID!
2039
2234
  $input: StallholderApplyFormInputType!
@@ -2047,7 +2242,7 @@ var UPDATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client14.gql`
2047
2242
 
2048
2243
  // src/graphql/hooks/stallholder/hooksMutation.ts
2049
2244
  var useCreateStallholder = () => {
2050
- const [createStallholder, { loading, error }] = (0, import_client15.useMutation)(
2245
+ const [createStallholder, { loading, error }] = (0, import_client19.useMutation)(
2051
2246
  CREATE_STALLHOLDER_MUTATION,
2052
2247
  {
2053
2248
  awaitRefetchQueries: true,
@@ -2057,7 +2252,7 @@ var useCreateStallholder = () => {
2057
2252
  return { createStallholder, error, loading };
2058
2253
  };
2059
2254
  var useUpdateStallholder = () => {
2060
- const [updateStallholder, { loading, error }] = (0, import_client15.useMutation)(
2255
+ const [updateStallholder, { loading, error }] = (0, import_client19.useMutation)(
2061
2256
  UPDATE_STALLHOLDER_MUTATION,
2062
2257
  {
2063
2258
  awaitRefetchQueries: true,
@@ -2067,7 +2262,7 @@ var useUpdateStallholder = () => {
2067
2262
  return { error, loading, updateStallholder };
2068
2263
  };
2069
2264
  var useDeleteStallholder = () => {
2070
- const [deleteStallholder, { loading, error }] = (0, import_client15.useMutation)(
2265
+ const [deleteStallholder, { loading, error }] = (0, import_client19.useMutation)(
2071
2266
  DELETE_STALLHOLDER_MUTATION,
2072
2267
  {
2073
2268
  awaitRefetchQueries: true,
@@ -2077,7 +2272,7 @@ var useDeleteStallholder = () => {
2077
2272
  return { deleteStallholder, error, loading };
2078
2273
  };
2079
2274
  var useCreateStallholderApplyForm = () => {
2080
- const [createStallholderApplyForm, { loading, error }] = (0, import_client15.useMutation)(
2275
+ const [createStallholderApplyForm, { loading, error }] = (0, import_client19.useMutation)(
2081
2276
  CREATE_STALLHOLDER_APPLY_FORM_MUTATION,
2082
2277
  {
2083
2278
  awaitRefetchQueries: true,
@@ -2097,7 +2292,7 @@ var useCreateStallholderApplyForm = () => {
2097
2292
  return { createStallholderApplyForm, error, loading };
2098
2293
  };
2099
2294
  var useUpdateStallholderApplyForm = () => {
2100
- const [updateStallholderApplyForm, { loading, error }] = (0, import_client15.useMutation)(
2295
+ const [updateStallholderApplyForm, { loading, error }] = (0, import_client19.useMutation)(
2101
2296
  UPDATE_STALLHOLDER_APPLY_FORM_MUTATION,
2102
2297
  {
2103
2298
  awaitRefetchQueries: true,
@@ -2118,9 +2313,9 @@ var useUpdateStallholderApplyForm = () => {
2118
2313
  };
2119
2314
 
2120
2315
  // src/graphql/hooks/stallholder/hooksQuery.ts
2121
- var import_client16 = require("@apollo/client");
2316
+ var import_client20 = require("@apollo/client");
2122
2317
  var useGetStallholders = () => {
2123
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(GET_STALLHOLDERS, {
2318
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(GET_STALLHOLDERS, {
2124
2319
  fetchPolicy: "network-only"
2125
2320
  });
2126
2321
  const stallholders = data?.stallholders;
@@ -2132,7 +2327,7 @@ var useGetStallholders = () => {
2132
2327
  };
2133
2328
  };
2134
2329
  var useGetStallholder = (_id) => {
2135
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(GET_STALLHOLDER, {
2330
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(GET_STALLHOLDER, {
2136
2331
  fetchPolicy: "network-only",
2137
2332
  skip: !_id,
2138
2333
  variables: { _id }
@@ -2141,7 +2336,7 @@ var useGetStallholder = (_id) => {
2141
2336
  return { error, loading, refetch, stallholder };
2142
2337
  };
2143
2338
  var useGetStallholdersByRegion = (region) => {
2144
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(
2339
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(
2145
2340
  GET_STALLHOLDERS_BY_REGION,
2146
2341
  {
2147
2342
  fetchPolicy: "network-only",
@@ -2153,7 +2348,7 @@ var useGetStallholdersByRegion = (region) => {
2153
2348
  return { error, loading, refetch, stallholders };
2154
2349
  };
2155
2350
  var useSearchStallholders = (search, region) => {
2156
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(SEARCH_STALLHOLDERS, {
2351
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(SEARCH_STALLHOLDERS, {
2157
2352
  fetchPolicy: "network-only",
2158
2353
  skip: search.length < 3,
2159
2354
  variables: { region, search }
@@ -2162,7 +2357,7 @@ var useSearchStallholders = (search, region) => {
2162
2357
  return { error, loading, refetch, stallholders };
2163
2358
  };
2164
2359
  var useGetStallholderApplyForm = (stallholderId) => {
2165
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(
2360
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(
2166
2361
  GET_STALLHOLDER_APPLY_FORM,
2167
2362
  {
2168
2363
  variables: { stallholderId }
@@ -2178,11 +2373,11 @@ var useGetStallholderApplyForm = (stallholderId) => {
2178
2373
  };
2179
2374
 
2180
2375
  // src/graphql/hooks/subscriptions.ts
2181
- var import_client18 = require("@apollo/client");
2376
+ var import_client22 = require("@apollo/client");
2182
2377
 
2183
2378
  // src/graphql/subscriptions/notification.ts
2184
- var import_client17 = require("@apollo/client");
2185
- var NOTIFICATION_FIELDS_FRAGMENT = import_client17.gql`
2379
+ var import_client21 = require("@apollo/client");
2380
+ var NOTIFICATION_FIELDS_FRAGMENT = import_client21.gql`
2186
2381
  fragment NotificationFields on NotificationType {
2187
2382
  createdBy
2188
2383
  important
@@ -2192,7 +2387,7 @@ var NOTIFICATION_FIELDS_FRAGMENT = import_client17.gql`
2192
2387
  resourceType
2193
2388
  }
2194
2389
  `;
2195
- var GET_GLOBAL_NOTIFICATION = import_client17.gql`
2390
+ var GET_GLOBAL_NOTIFICATION = import_client21.gql`
2196
2391
  subscription {
2197
2392
  getGlobalNotification {
2198
2393
  ...NotificationFields
@@ -2200,7 +2395,7 @@ var GET_GLOBAL_NOTIFICATION = import_client17.gql`
2200
2395
  }
2201
2396
  ${NOTIFICATION_FIELDS_FRAGMENT}
2202
2397
  `;
2203
- var GET_RELATION_NOTIFICATION = import_client17.gql`
2398
+ var GET_RELATION_NOTIFICATION = import_client21.gql`
2204
2399
  subscription {
2205
2400
  getRelationNotification {
2206
2401
  ...NotificationFields
@@ -2215,12 +2410,12 @@ var useGetNotification = () => {
2215
2410
  data: global,
2216
2411
  loading: loadingGlobal,
2217
2412
  error: errorGlobal
2218
- } = (0, import_client18.useSubscription)(GET_GLOBAL_NOTIFICATION);
2413
+ } = (0, import_client22.useSubscription)(GET_GLOBAL_NOTIFICATION);
2219
2414
  const {
2220
2415
  data: relation,
2221
2416
  loading: loadingImportant,
2222
2417
  error: errorImportant
2223
- } = (0, import_client18.useSubscription)(GET_RELATION_NOTIFICATION);
2418
+ } = (0, import_client22.useSubscription)(GET_RELATION_NOTIFICATION);
2224
2419
  const error = errorGlobal || errorImportant;
2225
2420
  const loading = loadingGlobal || loadingImportant;
2226
2421
  const notification = relation?.getRelationNotification || global?.getGlobalNotification;
@@ -2228,11 +2423,11 @@ var useGetNotification = () => {
2228
2423
  };
2229
2424
 
2230
2425
  // src/graphql/hooks/user/hooksMutation.ts
2231
- var import_client20 = require("@apollo/client");
2426
+ var import_client24 = require("@apollo/client");
2232
2427
 
2233
2428
  // src/graphql/mutations/user.ts
2234
- var import_client19 = require("@apollo/client");
2235
- var CREATE_USER_MUTATION = import_client19.gql`
2429
+ var import_client23 = require("@apollo/client");
2430
+ var CREATE_USER_MUTATION = import_client23.gql`
2236
2431
  mutation createUser($input: UserInputType!) {
2237
2432
  createUser(input: $input) {
2238
2433
  ...UserFields
@@ -2240,7 +2435,7 @@ var CREATE_USER_MUTATION = import_client19.gql`
2240
2435
  }
2241
2436
  ${USER_FIELDS_FRAGMENT}
2242
2437
  `;
2243
- var UPDATE_USER_MUTATION = import_client19.gql`
2438
+ var UPDATE_USER_MUTATION = import_client23.gql`
2244
2439
  mutation updateUser($_id: ID!, $input: UserInputType!) {
2245
2440
  updateUser(_id: $_id, input: $input) {
2246
2441
  ...UserFields
@@ -2248,7 +2443,7 @@ var UPDATE_USER_MUTATION = import_client19.gql`
2248
2443
  }
2249
2444
  ${USER_FIELDS_FRAGMENT}
2250
2445
  `;
2251
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client19.gql`
2446
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client23.gql`
2252
2447
  mutation addUserFavouriteResource(
2253
2448
  $resourceId: ID!
2254
2449
  $resourceType: ResourceTypeEnum!
@@ -2264,7 +2459,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client19.gql`
2264
2459
  }
2265
2460
  ${USER_FIELDS_FRAGMENT}
2266
2461
  `;
2267
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client19.gql`
2462
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client23.gql`
2268
2463
  mutation removeUserFavouriteResource(
2269
2464
  $resourceId: ID!
2270
2465
  $resourceType: ResourceTypeEnum!
@@ -2283,19 +2478,19 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client19.gql`
2283
2478
 
2284
2479
  // src/graphql/hooks/user/hooksMutation.ts
2285
2480
  var useCreateUser = () => {
2286
- const [createUser, { loading, error }] = (0, import_client20.useMutation)(CREATE_USER_MUTATION, {
2481
+ const [createUser, { loading, error }] = (0, import_client24.useMutation)(CREATE_USER_MUTATION, {
2287
2482
  awaitRefetchQueries: true
2288
2483
  });
2289
2484
  return { createUser, error, loading };
2290
2485
  };
2291
2486
  var useUpdateUser = () => {
2292
- const [updateUser, { loading, error }] = (0, import_client20.useMutation)(UPDATE_USER_MUTATION, {
2487
+ const [updateUser, { loading, error }] = (0, import_client24.useMutation)(UPDATE_USER_MUTATION, {
2293
2488
  awaitRefetchQueries: true
2294
2489
  });
2295
2490
  return { error, loading, updateUser };
2296
2491
  };
2297
2492
  var useAddUserFavouriteResource = () => {
2298
- const [addUserFavouriteResource, { loading, error }] = (0, import_client20.useMutation)(
2493
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client24.useMutation)(
2299
2494
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
2300
2495
  {
2301
2496
  awaitRefetchQueries: true,
@@ -2305,7 +2500,7 @@ var useAddUserFavouriteResource = () => {
2305
2500
  return { addUserFavouriteResource, error, loading };
2306
2501
  };
2307
2502
  var useRemoveUserFavouriteResource = () => {
2308
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client20.useMutation)(
2503
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client24.useMutation)(
2309
2504
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
2310
2505
  {
2311
2506
  awaitRefetchQueries: true,
@@ -2316,30 +2511,30 @@ var useRemoveUserFavouriteResource = () => {
2316
2511
  };
2317
2512
 
2318
2513
  // src/graphql/hooks/user/hooksQuery.ts
2319
- var import_client21 = require("@apollo/client");
2514
+ var import_client25 = require("@apollo/client");
2320
2515
  var useGetUsers = () => {
2321
- const { loading, error, data, refetch } = (0, import_client21.useQuery)(GET_USERS, {
2516
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_USERS, {
2322
2517
  fetchPolicy: "network-only"
2323
2518
  });
2324
2519
  const users = data?.users;
2325
2520
  return { error, loading, refetch, users };
2326
2521
  };
2327
2522
  var useGetUser = (id) => {
2328
- const { loading, error, data, refetch } = (0, import_client21.useQuery)(GET_USER, {
2523
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_USER, {
2329
2524
  variables: { id }
2330
2525
  });
2331
2526
  const user = data?.user;
2332
2527
  return { error, loading, refetch, user };
2333
2528
  };
2334
2529
  var useGetUserMarkets = () => {
2335
- const { loading, error, data, refetch } = (0, import_client21.useQuery)(GET_USER_MARKETS, {
2530
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_USER_MARKETS, {
2336
2531
  fetchPolicy: "network-only"
2337
2532
  });
2338
2533
  const userMarkets = data?.userMarkets;
2339
2534
  return { error, loading, refetch, userMarkets };
2340
2535
  };
2341
2536
  var useGetUserFavourites = () => {
2342
- const { loading, error, data, refetch } = (0, import_client21.useQuery)(GET_USER_FAVOURITES, {
2537
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_USER_FAVOURITES, {
2343
2538
  fetchPolicy: "network-only"
2344
2539
  });
2345
2540
  const markets = data?.userFavourites.markets;
@@ -2351,7 +2546,7 @@ var useGetUserFavourites = () => {
2351
2546
  return { error, loading, refetch, userFavourites };
2352
2547
  };
2353
2548
  var useGetUserNotifications = () => {
2354
- const { loading, error, data, refetch } = (0, import_client21.useQuery)(GET_USER_NOTIFICATIONS, {
2549
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_USER_NOTIFICATIONS, {
2355
2550
  fetchPolicy: "network-only"
2356
2551
  });
2357
2552
  const userNotifications = data?.userNotifications;
@@ -3105,16 +3300,20 @@ var categoryColors = {
3105
3300
  tagOptions,
3106
3301
  timeFormat,
3107
3302
  truncateText,
3303
+ useAddParticipantToChat,
3108
3304
  useAddUserFavouriteResource,
3305
+ useCreateChat,
3109
3306
  useCreateMarket,
3110
3307
  useCreateRelation,
3111
3308
  useCreateStallholder,
3112
3309
  useCreateStallholderApplyForm,
3113
3310
  useCreateUser,
3311
+ useDeleteChat,
3114
3312
  useDeleteMarket,
3115
3313
  useDeleteRelation,
3116
3314
  useDeleteStallholder,
3117
3315
  useForgotPassword,
3316
+ useGetChat,
3118
3317
  useGetMarket,
3119
3318
  useGetMarketRelations,
3120
3319
  useGetMarkets,
@@ -3130,6 +3329,7 @@ var categoryColors = {
3130
3329
  useGetStallholders,
3131
3330
  useGetStallholdersByRegion,
3132
3331
  useGetUser,
3332
+ useGetUserChats,
3133
3333
  useGetUserFavourites,
3134
3334
  useGetUserMarkets,
3135
3335
  useGetUserNotifications,
@@ -3140,9 +3340,11 @@ var categoryColors = {
3140
3340
  useMarketForm,
3141
3341
  useRegister,
3142
3342
  useRegisterForm,
3343
+ useRemoveParticipantFromChat,
3143
3344
  useRemoveUserFavouriteResource,
3144
3345
  useSearchMarkets,
3145
3346
  useSearchStallholders,
3347
+ useSendChatMessage,
3146
3348
  useStallholderApplyForm,
3147
3349
  useStallholderForm,
3148
3350
  useUpdateMarket,