@timardex/cluemart-shared 1.0.4 → 1.0.6

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
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
33
  EnumInviteStatus: () => EnumInviteStatus,
34
+ EnumNotification: () => EnumNotification,
34
35
  EnumRegions: () => EnumRegions,
35
36
  EnumRejectionPolicy: () => EnumRejectionPolicy,
36
37
  EnumRelationResource: () => EnumRelationResource,
@@ -107,16 +108,20 @@ __export(index_exports, {
107
108
  tagOptions: () => tagOptions,
108
109
  timeFormat: () => timeFormat,
109
110
  truncateText: () => truncateText,
111
+ useAddParticipantToChat: () => useAddParticipantToChat,
110
112
  useAddUserFavouriteResource: () => useAddUserFavouriteResource,
113
+ useCreateChat: () => useCreateChat,
111
114
  useCreateMarket: () => useCreateMarket,
112
115
  useCreateRelation: () => useCreateRelation,
113
116
  useCreateStallholder: () => useCreateStallholder,
114
117
  useCreateStallholderApplyForm: () => useCreateStallholderApplyForm,
115
118
  useCreateUser: () => useCreateUser,
119
+ useDeleteChat: () => useDeleteChat,
116
120
  useDeleteMarket: () => useDeleteMarket,
117
121
  useDeleteRelation: () => useDeleteRelation,
118
122
  useDeleteStallholder: () => useDeleteStallholder,
119
123
  useForgotPassword: () => useForgotPassword,
124
+ useGetChat: () => useGetChat,
120
125
  useGetMarket: () => useGetMarket,
121
126
  useGetMarketRelations: () => useGetMarketRelations,
122
127
  useGetMarkets: () => useGetMarkets,
@@ -132,6 +137,7 @@ __export(index_exports, {
132
137
  useGetStallholders: () => useGetStallholders,
133
138
  useGetStallholdersByRegion: () => useGetStallholdersByRegion,
134
139
  useGetUser: () => useGetUser,
140
+ useGetUserChats: () => useGetUserChats,
135
141
  useGetUserFavourites: () => useGetUserFavourites,
136
142
  useGetUserMarkets: () => useGetUserMarkets,
137
143
  useGetUserNotifications: () => useGetUserNotifications,
@@ -142,9 +148,11 @@ __export(index_exports, {
142
148
  useMarketForm: () => useMarketForm,
143
149
  useRegister: () => useRegister,
144
150
  useRegisterForm: () => useRegisterForm,
151
+ useRemoveParticipantFromChat: () => useRemoveParticipantFromChat,
145
152
  useRemoveUserFavouriteResource: () => useRemoveUserFavouriteResource,
146
153
  useSearchMarkets: () => useSearchMarkets,
147
154
  useSearchStallholders: () => useSearchStallholders,
155
+ useSendChatMessage: () => useSendChatMessage,
148
156
  useStallholderApplyForm: () => useStallholderApplyForm,
149
157
  useStallholderForm: () => useStallholderForm,
150
158
  useUpdateMarket: () => useUpdateMarket,
@@ -185,12 +193,18 @@ var EnumResourceType = /* @__PURE__ */ ((EnumResourceType2) => {
185
193
  return EnumResourceType2;
186
194
  })(EnumResourceType || {});
187
195
  var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource2) => {
188
- EnumRelationResource2["CREATED_MARKET"] = "created_market";
189
- EnumRelationResource2["CREATED_STALLHOLDER"] = "created_stallholder";
190
- EnumRelationResource2["STALLHOLDER_APPLICATION_TO_MARKET"] = "stallholder_application_to_market";
191
196
  EnumRelationResource2["MARKET_INVITE_STALLHOLDER"] = "market_invite_stallholder";
197
+ EnumRelationResource2["STALLHOLDER_APPLICATION_TO_MARKET"] = "stallholder_application_to_market";
192
198
  return EnumRelationResource2;
193
199
  })(EnumRelationResource || {});
200
+ var EnumNotification = /* @__PURE__ */ ((EnumNotification2) => {
201
+ EnumNotification2["CREATED_MARKET"] = "created_market";
202
+ EnumNotification2["CREATED_STALLHOLDER"] = "created_stallholder";
203
+ EnumNotification2["NEW_CHAT_MESSAGE"] = "new_chat_message";
204
+ EnumNotification2["MARKET_INVITE_STALLHOLDER"] = "market_invite_stallholder" /* MARKET_INVITE_STALLHOLDER */;
205
+ EnumNotification2["STALLHOLDER_APPLICATION_TO_MARKET"] = "stallholder_application_to_market" /* STALLHOLDER_APPLICATION_TO_MARKET */;
206
+ return EnumNotification2;
207
+ })(EnumNotification || {});
194
208
  var EnumResourceTypeIcon = /* @__PURE__ */ ((EnumResourceTypeIcon2) => {
195
209
  EnumResourceTypeIcon2["MARKET"] = "compass";
196
210
  EnumResourceTypeIcon2["STALLHOLDER"] = "store";
@@ -1224,15 +1238,203 @@ var useVerifyEmail = () => {
1224
1238
  return { error, loading, verifyEmail };
1225
1239
  };
1226
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
+ ...ChatFields
1302
+ }
1303
+ }
1304
+ ${CHAT_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
+
1227
1429
  // src/graphql/hooks/market/hooksMutation.ts
1228
- var import_client8 = require("@apollo/client");
1430
+ var import_client12 = require("@apollo/client");
1229
1431
 
1230
1432
  // src/graphql/mutations/market.ts
1231
- var import_client5 = require("@apollo/client");
1433
+ var import_client9 = require("@apollo/client");
1232
1434
 
1233
1435
  // src/graphql/queries/market.ts
1234
- var import_client4 = require("@apollo/client");
1235
- var MARKET_DATETIME_FIELDS_FRAGMENT = import_client4.gql`
1436
+ var import_client8 = require("@apollo/client");
1437
+ var MARKET_DATETIME_FIELDS_FRAGMENT = import_client8.gql`
1236
1438
  fragment MarketDateTimeFields on MarketDateTimeType {
1237
1439
  endDate
1238
1440
  endTime
@@ -1240,7 +1442,7 @@ var MARKET_DATETIME_FIELDS_FRAGMENT = import_client4.gql`
1240
1442
  startTime
1241
1443
  }
1242
1444
  `;
1243
- var MARKET_LOCATION_FIELDS_FRAGMENT = import_client4.gql`
1445
+ var MARKET_LOCATION_FIELDS_FRAGMENT = import_client8.gql`
1244
1446
  fragment MarketLocationFields on MarketLocationType {
1245
1447
  city
1246
1448
  coordinates
@@ -1252,7 +1454,7 @@ var MARKET_LOCATION_FIELDS_FRAGMENT = import_client4.gql`
1252
1454
  type
1253
1455
  }
1254
1456
  `;
1255
- var MARKET = import_client4.gql`
1457
+ var MARKET = import_client8.gql`
1256
1458
  fragment MarketFields on MarketType {
1257
1459
  _id
1258
1460
  active
@@ -1294,7 +1496,7 @@ var MARKET = import_client4.gql`
1294
1496
  ${OWNER_FIELDS_FRAGMENT}
1295
1497
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
1296
1498
  `;
1297
- var GET_MARKETS = import_client4.gql`
1499
+ var GET_MARKETS = import_client8.gql`
1298
1500
  query getMarkets {
1299
1501
  markets {
1300
1502
  ...MarketFields
@@ -1302,7 +1504,7 @@ var GET_MARKETS = import_client4.gql`
1302
1504
  }
1303
1505
  ${MARKET}
1304
1506
  `;
1305
- var GET_MARKET = import_client4.gql`
1507
+ var GET_MARKET = import_client8.gql`
1306
1508
  query getMarket($_id: ID!) {
1307
1509
  market(_id: $_id) {
1308
1510
  ...MarketFields
@@ -1310,7 +1512,7 @@ var GET_MARKET = import_client4.gql`
1310
1512
  }
1311
1513
  ${MARKET}
1312
1514
  `;
1313
- var GET_MARKETS_BY_REGION = import_client4.gql`
1515
+ var GET_MARKETS_BY_REGION = import_client8.gql`
1314
1516
  query getMarketsByRegion($region: String!) {
1315
1517
  marketsByRegion(region: $region) {
1316
1518
  ...MarketFields
@@ -1318,7 +1520,7 @@ var GET_MARKETS_BY_REGION = import_client4.gql`
1318
1520
  }
1319
1521
  ${MARKET}
1320
1522
  `;
1321
- var SEARCH_MARKETS = import_client4.gql`
1523
+ var SEARCH_MARKETS = import_client8.gql`
1322
1524
  query searchMarkets($search: String!, $region: String) {
1323
1525
  marketSearch(search: $search, region: $region) {
1324
1526
  ...MarketFields
@@ -1326,7 +1528,7 @@ var SEARCH_MARKETS = import_client4.gql`
1326
1528
  }
1327
1529
  ${MARKET}
1328
1530
  `;
1329
- var GET_MARKETS_NEAR_ME = import_client4.gql`
1531
+ var GET_MARKETS_NEAR_ME = import_client8.gql`
1330
1532
  query getMarketsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
1331
1533
  marketsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
1332
1534
  ...MarketFields
@@ -1336,7 +1538,7 @@ var GET_MARKETS_NEAR_ME = import_client4.gql`
1336
1538
  `;
1337
1539
 
1338
1540
  // src/graphql/mutations/market.ts
1339
- var CREATE_MARKET_MUTATION = import_client5.gql`
1541
+ var CREATE_MARKET_MUTATION = import_client9.gql`
1340
1542
  mutation createMarket($input: MarketInputType!) {
1341
1543
  createMarket(input: $input) {
1342
1544
  ...MarketFields
@@ -1344,7 +1546,7 @@ var CREATE_MARKET_MUTATION = import_client5.gql`
1344
1546
  }
1345
1547
  ${MARKET}
1346
1548
  `;
1347
- var UPDATE_MARKET_MUTATION = import_client5.gql`
1549
+ var UPDATE_MARKET_MUTATION = import_client9.gql`
1348
1550
  mutation updateMarket($_id: ID!, $input: MarketInputType!) {
1349
1551
  updateMarket(_id: $_id, input: $input) {
1350
1552
  ...MarketFields
@@ -1352,18 +1554,18 @@ var UPDATE_MARKET_MUTATION = import_client5.gql`
1352
1554
  }
1353
1555
  ${MARKET}
1354
1556
  `;
1355
- var DELETE_MARKET_MUTATION = import_client5.gql`
1557
+ var DELETE_MARKET_MUTATION = import_client9.gql`
1356
1558
  mutation deleteMarket($_id: ID!) {
1357
1559
  deleteMarket(_id: $_id)
1358
1560
  }
1359
1561
  `;
1360
1562
 
1361
1563
  // src/graphql/queries/user.ts
1362
- var import_client7 = require("@apollo/client");
1564
+ var import_client11 = require("@apollo/client");
1363
1565
 
1364
1566
  // src/graphql/queries/stallholder.ts
1365
- var import_client6 = require("@apollo/client");
1366
- var STALLHOLDER_LOCATION_FIELDS_FRAGMENT = import_client6.gql`
1567
+ var import_client10 = require("@apollo/client");
1568
+ var STALLHOLDER_LOCATION_FIELDS_FRAGMENT = import_client10.gql`
1367
1569
  fragment StallholderLocationFields on StallholderLocationType {
1368
1570
  city
1369
1571
  coordinates
@@ -1375,7 +1577,7 @@ var STALLHOLDER_LOCATION_FIELDS_FRAGMENT = import_client6.gql`
1375
1577
  type
1376
1578
  }
1377
1579
  `;
1378
- var STALLHOLDER_DATETIME_FIELDS_FRAGMENT = import_client6.gql`
1580
+ var STALLHOLDER_DATETIME_FIELDS_FRAGMENT = import_client10.gql`
1379
1581
  fragment StallholderDateTimeFields on StallholderDateTimeType {
1380
1582
  endDate
1381
1583
  endTime
@@ -1383,7 +1585,7 @@ var STALLHOLDER_DATETIME_FIELDS_FRAGMENT = import_client6.gql`
1383
1585
  startTime
1384
1586
  }
1385
1587
  `;
1386
- var STALLHOLDER = import_client6.gql`
1588
+ var STALLHOLDER = import_client10.gql`
1387
1589
  fragment StallholderFields on StallholderType {
1388
1590
  _id
1389
1591
  active
@@ -1429,7 +1631,7 @@ var STALLHOLDER = import_client6.gql`
1429
1631
  ${OWNER_FIELDS_FRAGMENT}
1430
1632
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
1431
1633
  `;
1432
- var STALLHOLDER_APPLY_FORM = import_client6.gql`
1634
+ var STALLHOLDER_APPLY_FORM = import_client10.gql`
1433
1635
  fragment StallholderApplyFormFields on StallholderApplyFormType {
1434
1636
  _id
1435
1637
  active
@@ -1460,7 +1662,7 @@ var STALLHOLDER_APPLY_FORM = import_client6.gql`
1460
1662
  }
1461
1663
  }
1462
1664
  `;
1463
- var GET_STALLHOLDERS = import_client6.gql`
1665
+ var GET_STALLHOLDERS = import_client10.gql`
1464
1666
  query getStallHolders {
1465
1667
  stallholders {
1466
1668
  ...StallholderFields
@@ -1468,7 +1670,7 @@ var GET_STALLHOLDERS = import_client6.gql`
1468
1670
  }
1469
1671
  ${STALLHOLDER}
1470
1672
  `;
1471
- var GET_STALLHOLDER = import_client6.gql`
1673
+ var GET_STALLHOLDER = import_client10.gql`
1472
1674
  query getStallHolder($_id: ID!) {
1473
1675
  stallholder(_id: $_id) {
1474
1676
  ...StallholderFields
@@ -1476,7 +1678,7 @@ var GET_STALLHOLDER = import_client6.gql`
1476
1678
  }
1477
1679
  ${STALLHOLDER}
1478
1680
  `;
1479
- var GET_STALLHOLDERS_BY_REGION = import_client6.gql`
1681
+ var GET_STALLHOLDERS_BY_REGION = import_client10.gql`
1480
1682
  query getStallholdersByRegion($region: String!) {
1481
1683
  stallholdersByRegion(region: $region) {
1482
1684
  ...StallholderFields
@@ -1484,7 +1686,7 @@ var GET_STALLHOLDERS_BY_REGION = import_client6.gql`
1484
1686
  }
1485
1687
  ${STALLHOLDER}
1486
1688
  `;
1487
- var SEARCH_STALLHOLDERS = import_client6.gql`
1689
+ var SEARCH_STALLHOLDERS = import_client10.gql`
1488
1690
  query searchStallholders($search: String!, $region: String) {
1489
1691
  stallholderSearch(search: $search, region: $region) {
1490
1692
  ...StallholderFields
@@ -1492,7 +1694,7 @@ var SEARCH_STALLHOLDERS = import_client6.gql`
1492
1694
  }
1493
1695
  ${STALLHOLDER}
1494
1696
  `;
1495
- var GET_STALLHOLDER_APPLY_FORM = import_client6.gql`
1697
+ var GET_STALLHOLDER_APPLY_FORM = import_client10.gql`
1496
1698
  query getStallholderApplyForm($stallholderId: ID!) {
1497
1699
  stallholderApplyForm(stallholderId: $stallholderId) {
1498
1700
  ...StallholderApplyFormFields
@@ -1502,7 +1704,7 @@ var GET_STALLHOLDER_APPLY_FORM = import_client6.gql`
1502
1704
  `;
1503
1705
 
1504
1706
  // src/graphql/queries/user.ts
1505
- var GET_USERS = import_client7.gql`
1707
+ var GET_USERS = import_client11.gql`
1506
1708
  query getUsers {
1507
1709
  users {
1508
1710
  ...UserFields
@@ -1510,7 +1712,7 @@ var GET_USERS = import_client7.gql`
1510
1712
  }
1511
1713
  ${USER_FIELDS_FRAGMENT}
1512
1714
  `;
1513
- var GET_USER = import_client7.gql`
1715
+ var GET_USER = import_client11.gql`
1514
1716
  query getUser($id: ID!) {
1515
1717
  user(_id: $id) {
1516
1718
  ...UserFields
@@ -1518,7 +1720,7 @@ var GET_USER = import_client7.gql`
1518
1720
  }
1519
1721
  ${USER_FIELDS_FRAGMENT}
1520
1722
  `;
1521
- var GET_USER_MARKETS = import_client7.gql`
1723
+ var GET_USER_MARKETS = import_client11.gql`
1522
1724
  query getUserMarkets {
1523
1725
  userMarkets {
1524
1726
  ...MarketFields
@@ -1526,7 +1728,7 @@ var GET_USER_MARKETS = import_client7.gql`
1526
1728
  }
1527
1729
  ${MARKET}
1528
1730
  `;
1529
- var GET_USER_FAVOURITES = import_client7.gql`
1731
+ var GET_USER_FAVOURITES = import_client11.gql`
1530
1732
  query getUserFavourites {
1531
1733
  userFavourites {
1532
1734
  markets {
@@ -1540,7 +1742,7 @@ var GET_USER_FAVOURITES = import_client7.gql`
1540
1742
  ${MARKET}
1541
1743
  ${STALLHOLDER}
1542
1744
  `;
1543
- var GET_USER_NOTIFICATIONS = import_client7.gql`
1745
+ var GET_USER_NOTIFICATIONS = import_client11.gql`
1544
1746
  query getMissedNotifications {
1545
1747
  userNotifications
1546
1748
  }
@@ -1548,7 +1750,7 @@ var GET_USER_NOTIFICATIONS = import_client7.gql`
1548
1750
 
1549
1751
  // src/graphql/hooks/market/hooksMutation.ts
1550
1752
  var useCreateMarket = () => {
1551
- const [createMarket, { loading, error }] = (0, import_client8.useMutation)(
1753
+ const [createMarket, { loading, error }] = (0, import_client12.useMutation)(
1552
1754
  CREATE_MARKET_MUTATION,
1553
1755
  {
1554
1756
  awaitRefetchQueries: true,
@@ -1558,7 +1760,7 @@ var useCreateMarket = () => {
1558
1760
  return { createMarket, error, loading };
1559
1761
  };
1560
1762
  var useUpdateMarket = () => {
1561
- const [updateMarket, { loading, error }] = (0, import_client8.useMutation)(
1763
+ const [updateMarket, { loading, error }] = (0, import_client12.useMutation)(
1562
1764
  UPDATE_MARKET_MUTATION,
1563
1765
  {
1564
1766
  awaitRefetchQueries: true,
@@ -1568,7 +1770,7 @@ var useUpdateMarket = () => {
1568
1770
  return { error, loading, updateMarket };
1569
1771
  };
1570
1772
  var useDeleteMarket = () => {
1571
- const [deleteMarket, { loading, error }] = (0, import_client8.useMutation)(
1773
+ const [deleteMarket, { loading, error }] = (0, import_client12.useMutation)(
1572
1774
  DELETE_MARKET_MUTATION,
1573
1775
  {
1574
1776
  awaitRefetchQueries: true,
@@ -1579,16 +1781,16 @@ var useDeleteMarket = () => {
1579
1781
  };
1580
1782
 
1581
1783
  // src/graphql/hooks/market/hooksQuery.ts
1582
- var import_client9 = require("@apollo/client");
1784
+ var import_client13 = require("@apollo/client");
1583
1785
  var useGetMarkets = () => {
1584
- const { loading, error, data, refetch } = (0, import_client9.useQuery)(GET_MARKETS, {
1786
+ const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_MARKETS, {
1585
1787
  fetchPolicy: "network-only"
1586
1788
  });
1587
1789
  const markets = data?.markets;
1588
1790
  return { error, loading, markets, refetch };
1589
1791
  };
1590
1792
  var useGetMarket = (_id) => {
1591
- const { loading, error, data, refetch } = (0, import_client9.useQuery)(GET_MARKET, {
1793
+ const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_MARKET, {
1592
1794
  fetchPolicy: "network-only",
1593
1795
  skip: !_id,
1594
1796
  variables: { _id }
@@ -1597,7 +1799,7 @@ var useGetMarket = (_id) => {
1597
1799
  return { error, loading, market, refetch };
1598
1800
  };
1599
1801
  var useGetMarketsByRegion = (region) => {
1600
- 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, {
1601
1803
  fetchPolicy: "network-only",
1602
1804
  skip: !region,
1603
1805
  variables: { region }
@@ -1606,7 +1808,7 @@ var useGetMarketsByRegion = (region) => {
1606
1808
  return { error, loading, markets, refetch };
1607
1809
  };
1608
1810
  var useSearchMarkets = (search, region) => {
1609
- const { loading, error, data, refetch } = (0, import_client9.useQuery)(SEARCH_MARKETS, {
1811
+ const { loading, error, data, refetch } = (0, import_client13.useQuery)(SEARCH_MARKETS, {
1610
1812
  fetchPolicy: "network-only",
1611
1813
  skip: search.length < 3,
1612
1814
  variables: { region, search }
@@ -1615,7 +1817,7 @@ var useSearchMarkets = (search, region) => {
1615
1817
  return { error, loading, markets, refetch };
1616
1818
  };
1617
1819
  var useGetMarketsNearMe = (location) => {
1618
- 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, {
1619
1821
  fetchPolicy: "network-only",
1620
1822
  skip: !location.latitude || !location.longitude,
1621
1823
  variables: {
@@ -1630,14 +1832,14 @@ var useGetMarketsNearMe = (location) => {
1630
1832
  };
1631
1833
 
1632
1834
  // src/graphql/hooks/relation/hooksMutation.ts
1633
- var import_client12 = require("@apollo/client");
1835
+ var import_client16 = require("@apollo/client");
1634
1836
 
1635
1837
  // src/graphql/mutations/relation.ts
1636
- var import_client11 = require("@apollo/client");
1838
+ var import_client15 = require("@apollo/client");
1637
1839
 
1638
1840
  // src/graphql/queries/relation.ts
1639
- var import_client10 = require("@apollo/client");
1640
- var RELATION_UPDATE_BY_FRAGMENT = import_client10.gql`
1841
+ var import_client14 = require("@apollo/client");
1842
+ var RELATION_UPDATE_BY_FRAGMENT = import_client14.gql`
1641
1843
  fragment RelationUpdateBy on RelationUpdateByType {
1642
1844
  resourceId
1643
1845
  resourceName
@@ -1646,7 +1848,7 @@ var RELATION_UPDATE_BY_FRAGMENT = import_client10.gql`
1646
1848
  toStatus
1647
1849
  }
1648
1850
  `;
1649
- var RELATION_LOGS_FRAGMENT = import_client10.gql`
1851
+ var RELATION_LOGS_FRAGMENT = import_client14.gql`
1650
1852
  fragment RelationLogs on RelationLogType {
1651
1853
  createdAt
1652
1854
  updatedAt
@@ -1656,14 +1858,14 @@ var RELATION_LOGS_FRAGMENT = import_client10.gql`
1656
1858
  }
1657
1859
  ${RELATION_UPDATE_BY_FRAGMENT}
1658
1860
  `;
1659
- var RELATION_DATES_FRAGMENT = import_client10.gql`
1861
+ var RELATION_DATES_FRAGMENT = import_client14.gql`
1660
1862
  fragment RelationDates on RelationDateType {
1661
1863
  lastUpdateBy
1662
1864
  startDate
1663
1865
  status
1664
1866
  }
1665
1867
  `;
1666
- var RELATION_FIELDS_FRAGMENT = import_client10.gql`
1868
+ var RELATION_FIELDS_FRAGMENT = import_client14.gql`
1667
1869
  fragment RelationFields on RelationType {
1668
1870
  _id
1669
1871
  createdAt
@@ -1682,7 +1884,7 @@ var RELATION_FIELDS_FRAGMENT = import_client10.gql`
1682
1884
  ${RELATION_DATES_FRAGMENT}
1683
1885
  ${RELATION_LOGS_FRAGMENT}
1684
1886
  `;
1685
- var GET_RELATION = import_client10.gql`
1887
+ var GET_RELATION = import_client14.gql`
1686
1888
  query getRelation($id: ID!) {
1687
1889
  relation(_id: $id) {
1688
1890
  ...RelationFields
@@ -1690,7 +1892,7 @@ var GET_RELATION = import_client10.gql`
1690
1892
  }
1691
1893
  ${RELATION_FIELDS_FRAGMENT}
1692
1894
  `;
1693
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client10.gql`
1895
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client14.gql`
1694
1896
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
1695
1897
  relationByMarketAndStallholder(
1696
1898
  marketId: $marketId
@@ -1701,7 +1903,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client10.gql`
1701
1903
  }
1702
1904
  ${RELATION_FIELDS_FRAGMENT}
1703
1905
  `;
1704
- var GET_MARKET_RELATIONS = import_client10.gql`
1906
+ var GET_MARKET_RELATIONS = import_client14.gql`
1705
1907
  query getMarketRelations($marketId: ID!) {
1706
1908
  marketRelations(marketId: $marketId) {
1707
1909
  ...RelationFields
@@ -1709,7 +1911,7 @@ var GET_MARKET_RELATIONS = import_client10.gql`
1709
1911
  }
1710
1912
  ${RELATION_FIELDS_FRAGMENT}
1711
1913
  `;
1712
- var GET_STALLHOLDER_RELATIONS = import_client10.gql`
1914
+ var GET_STALLHOLDER_RELATIONS = import_client14.gql`
1713
1915
  query getStallholderRelations($stallholderId: ID!) {
1714
1916
  stallholderRelations(stallholderId: $stallholderId) {
1715
1917
  ...RelationFields
@@ -1717,7 +1919,7 @@ var GET_STALLHOLDER_RELATIONS = import_client10.gql`
1717
1919
  }
1718
1920
  ${RELATION_FIELDS_FRAGMENT}
1719
1921
  `;
1720
- var GET_RESOURCE_CONNECTIONS = import_client10.gql`
1922
+ var GET_RESOURCE_CONNECTIONS = import_client14.gql`
1721
1923
  query getResourceConnections(
1722
1924
  $resourceId: ID!
1723
1925
  $resourceType: ResourceTypeEnum!
@@ -1815,7 +2017,7 @@ var GET_RESOURCE_CONNECTIONS = import_client10.gql`
1815
2017
  `;
1816
2018
 
1817
2019
  // src/graphql/mutations/relation.ts
1818
- var CREATE_RELATION_MUTATION = import_client11.gql`
2020
+ var CREATE_RELATION_MUTATION = import_client15.gql`
1819
2021
  mutation createRelation($input: RelationInputType!) {
1820
2022
  createRelation(input: $input) {
1821
2023
  ...RelationFields
@@ -1823,7 +2025,7 @@ var CREATE_RELATION_MUTATION = import_client11.gql`
1823
2025
  }
1824
2026
  ${RELATION_FIELDS_FRAGMENT}
1825
2027
  `;
1826
- var UPDATE_RELATION_MUTATION = import_client11.gql`
2028
+ var UPDATE_RELATION_MUTATION = import_client15.gql`
1827
2029
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
1828
2030
  updateRelation(_id: $_id, input: $input) {
1829
2031
  ...RelationFields
@@ -1831,7 +2033,7 @@ var UPDATE_RELATION_MUTATION = import_client11.gql`
1831
2033
  }
1832
2034
  ${RELATION_FIELDS_FRAGMENT}
1833
2035
  `;
1834
- var DELETE_RELATION_MUTATION = import_client11.gql`
2036
+ var DELETE_RELATION_MUTATION = import_client15.gql`
1835
2037
  mutation deleteRelation($_id: ID!) {
1836
2038
  deleteRelation(_id: $_id) {
1837
2039
  ...RelationFields
@@ -1842,7 +2044,7 @@ var DELETE_RELATION_MUTATION = import_client11.gql`
1842
2044
 
1843
2045
  // src/graphql/hooks/relation/hooksMutation.ts
1844
2046
  var useCreateRelation = () => {
1845
- const [createRelation, { loading, error }] = (0, import_client12.useMutation)(
2047
+ const [createRelation, { loading, error }] = (0, import_client16.useMutation)(
1846
2048
  CREATE_RELATION_MUTATION,
1847
2049
  {
1848
2050
  awaitRefetchQueries: true,
@@ -1877,7 +2079,7 @@ var useCreateRelation = () => {
1877
2079
  return { createRelation, error, loading };
1878
2080
  };
1879
2081
  var useUpdateRelation = () => {
1880
- const [updateRelation, { loading, error }] = (0, import_client12.useMutation)(
2082
+ const [updateRelation, { loading, error }] = (0, import_client16.useMutation)(
1881
2083
  UPDATE_RELATION_MUTATION,
1882
2084
  {
1883
2085
  awaitRefetchQueries: true,
@@ -1912,7 +2114,7 @@ var useUpdateRelation = () => {
1912
2114
  return { error, loading, updateRelation };
1913
2115
  };
1914
2116
  var useDeleteRelation = () => {
1915
- const [deleteRelation, { loading, error }] = (0, import_client12.useMutation)(
2117
+ const [deleteRelation, { loading, error }] = (0, import_client16.useMutation)(
1916
2118
  DELETE_RELATION_MUTATION,
1917
2119
  {
1918
2120
  awaitRefetchQueries: true,
@@ -1940,9 +2142,9 @@ var useDeleteRelation = () => {
1940
2142
  };
1941
2143
 
1942
2144
  // src/graphql/hooks/relation/hooksQuery.ts
1943
- var import_client13 = require("@apollo/client");
2145
+ var import_client17 = require("@apollo/client");
1944
2146
  var useGetRelation = (id) => {
1945
- const { loading, error, data, refetch } = (0, import_client13.useQuery)(GET_RELATION, {
2147
+ const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_RELATION, {
1946
2148
  fetchPolicy: "network-only",
1947
2149
  skip: id === "",
1948
2150
  variables: { id }
@@ -1951,7 +2153,7 @@ var useGetRelation = (id) => {
1951
2153
  return { error, loading, refetch, relation };
1952
2154
  };
1953
2155
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1954
- const { loading, error, data, refetch } = (0, import_client13.useQuery)(
2156
+ const { loading, error, data, refetch } = (0, import_client17.useQuery)(
1955
2157
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1956
2158
  {
1957
2159
  fetchPolicy: "no-cache",
@@ -1963,7 +2165,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1963
2165
  return { error, loading, refetch, relationByMarketAndStallholder };
1964
2166
  };
1965
2167
  var useGetMarketRelations = (marketId) => {
1966
- 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, {
1967
2169
  fetchPolicy: "network-only",
1968
2170
  skip: marketId === "",
1969
2171
  variables: { marketId }
@@ -1972,7 +2174,7 @@ var useGetMarketRelations = (marketId) => {
1972
2174
  return { error, loading, marketRelations, refetch };
1973
2175
  };
1974
2176
  var useGetStallholderRelations = (stallholderId) => {
1975
- const { loading, error, data, refetch } = (0, import_client13.useQuery)(
2177
+ const { loading, error, data, refetch } = (0, import_client17.useQuery)(
1976
2178
  GET_STALLHOLDER_RELATIONS,
1977
2179
  {
1978
2180
  fetchPolicy: "network-only",
@@ -1984,7 +2186,7 @@ var useGetStallholderRelations = (stallholderId) => {
1984
2186
  return { error, loading, refetch, stallholderRelations };
1985
2187
  };
1986
2188
  var useGetResourceConnections = (resourceId, resourceType) => {
1987
- 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, {
1988
2190
  fetchPolicy: "network-only",
1989
2191
  variables: { resourceId, resourceType }
1990
2192
  });
@@ -1993,11 +2195,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
1993
2195
  };
1994
2196
 
1995
2197
  // src/graphql/hooks/stallholder/hooksMutation.ts
1996
- var import_client15 = require("@apollo/client");
2198
+ var import_client19 = require("@apollo/client");
1997
2199
 
1998
2200
  // src/graphql/mutations/stallholder.ts
1999
- var import_client14 = require("@apollo/client");
2000
- var CREATE_STALLHOLDER_MUTATION = import_client14.gql`
2201
+ var import_client18 = require("@apollo/client");
2202
+ var CREATE_STALLHOLDER_MUTATION = import_client18.gql`
2001
2203
  mutation createStallholder($input: StallholderInputType!) {
2002
2204
  createStallholder(input: $input) {
2003
2205
  ...StallholderFields
@@ -2005,7 +2207,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client14.gql`
2005
2207
  }
2006
2208
  ${STALLHOLDER}
2007
2209
  `;
2008
- var UPDATE_STALLHOLDER_MUTATION = import_client14.gql`
2210
+ var UPDATE_STALLHOLDER_MUTATION = import_client18.gql`
2009
2211
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
2010
2212
  updateStallholder(_id: $_id, input: $input) {
2011
2213
  ...StallholderFields
@@ -2013,12 +2215,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client14.gql`
2013
2215
  }
2014
2216
  ${STALLHOLDER}
2015
2217
  `;
2016
- var DELETE_STALLHOLDER_MUTATION = import_client14.gql`
2218
+ var DELETE_STALLHOLDER_MUTATION = import_client18.gql`
2017
2219
  mutation deleteStallholder($_id: ID!) {
2018
2220
  deleteStallholder(_id: $_id)
2019
2221
  }
2020
2222
  `;
2021
- var CREATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client14.gql`
2223
+ var CREATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client18.gql`
2022
2224
  mutation createStallholderApplyForm($input: StallholderApplyFormInputType!) {
2023
2225
  createStallholderApplyForm(input: $input) {
2024
2226
  ...StallholderApplyFormFields
@@ -2026,7 +2228,7 @@ var CREATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client14.gql`
2026
2228
  }
2027
2229
  ${STALLHOLDER_APPLY_FORM}
2028
2230
  `;
2029
- var UPDATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client14.gql`
2231
+ var UPDATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client18.gql`
2030
2232
  mutation updateStallholderApplyForm(
2031
2233
  $_id: ID!
2032
2234
  $input: StallholderApplyFormInputType!
@@ -2040,7 +2242,7 @@ var UPDATE_STALLHOLDER_APPLY_FORM_MUTATION = import_client14.gql`
2040
2242
 
2041
2243
  // src/graphql/hooks/stallholder/hooksMutation.ts
2042
2244
  var useCreateStallholder = () => {
2043
- const [createStallholder, { loading, error }] = (0, import_client15.useMutation)(
2245
+ const [createStallholder, { loading, error }] = (0, import_client19.useMutation)(
2044
2246
  CREATE_STALLHOLDER_MUTATION,
2045
2247
  {
2046
2248
  awaitRefetchQueries: true,
@@ -2050,7 +2252,7 @@ var useCreateStallholder = () => {
2050
2252
  return { createStallholder, error, loading };
2051
2253
  };
2052
2254
  var useUpdateStallholder = () => {
2053
- const [updateStallholder, { loading, error }] = (0, import_client15.useMutation)(
2255
+ const [updateStallholder, { loading, error }] = (0, import_client19.useMutation)(
2054
2256
  UPDATE_STALLHOLDER_MUTATION,
2055
2257
  {
2056
2258
  awaitRefetchQueries: true,
@@ -2060,7 +2262,7 @@ var useUpdateStallholder = () => {
2060
2262
  return { error, loading, updateStallholder };
2061
2263
  };
2062
2264
  var useDeleteStallholder = () => {
2063
- const [deleteStallholder, { loading, error }] = (0, import_client15.useMutation)(
2265
+ const [deleteStallholder, { loading, error }] = (0, import_client19.useMutation)(
2064
2266
  DELETE_STALLHOLDER_MUTATION,
2065
2267
  {
2066
2268
  awaitRefetchQueries: true,
@@ -2070,7 +2272,7 @@ var useDeleteStallholder = () => {
2070
2272
  return { deleteStallholder, error, loading };
2071
2273
  };
2072
2274
  var useCreateStallholderApplyForm = () => {
2073
- const [createStallholderApplyForm, { loading, error }] = (0, import_client15.useMutation)(
2275
+ const [createStallholderApplyForm, { loading, error }] = (0, import_client19.useMutation)(
2074
2276
  CREATE_STALLHOLDER_APPLY_FORM_MUTATION,
2075
2277
  {
2076
2278
  awaitRefetchQueries: true,
@@ -2090,7 +2292,7 @@ var useCreateStallholderApplyForm = () => {
2090
2292
  return { createStallholderApplyForm, error, loading };
2091
2293
  };
2092
2294
  var useUpdateStallholderApplyForm = () => {
2093
- const [updateStallholderApplyForm, { loading, error }] = (0, import_client15.useMutation)(
2295
+ const [updateStallholderApplyForm, { loading, error }] = (0, import_client19.useMutation)(
2094
2296
  UPDATE_STALLHOLDER_APPLY_FORM_MUTATION,
2095
2297
  {
2096
2298
  awaitRefetchQueries: true,
@@ -2111,9 +2313,9 @@ var useUpdateStallholderApplyForm = () => {
2111
2313
  };
2112
2314
 
2113
2315
  // src/graphql/hooks/stallholder/hooksQuery.ts
2114
- var import_client16 = require("@apollo/client");
2316
+ var import_client20 = require("@apollo/client");
2115
2317
  var useGetStallholders = () => {
2116
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(GET_STALLHOLDERS, {
2318
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(GET_STALLHOLDERS, {
2117
2319
  fetchPolicy: "network-only"
2118
2320
  });
2119
2321
  const stallholders = data?.stallholders;
@@ -2125,7 +2327,7 @@ var useGetStallholders = () => {
2125
2327
  };
2126
2328
  };
2127
2329
  var useGetStallholder = (_id) => {
2128
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(GET_STALLHOLDER, {
2330
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(GET_STALLHOLDER, {
2129
2331
  fetchPolicy: "network-only",
2130
2332
  skip: !_id,
2131
2333
  variables: { _id }
@@ -2134,7 +2336,7 @@ var useGetStallholder = (_id) => {
2134
2336
  return { error, loading, refetch, stallholder };
2135
2337
  };
2136
2338
  var useGetStallholdersByRegion = (region) => {
2137
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(
2339
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(
2138
2340
  GET_STALLHOLDERS_BY_REGION,
2139
2341
  {
2140
2342
  fetchPolicy: "network-only",
@@ -2146,7 +2348,7 @@ var useGetStallholdersByRegion = (region) => {
2146
2348
  return { error, loading, refetch, stallholders };
2147
2349
  };
2148
2350
  var useSearchStallholders = (search, region) => {
2149
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(SEARCH_STALLHOLDERS, {
2351
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(SEARCH_STALLHOLDERS, {
2150
2352
  fetchPolicy: "network-only",
2151
2353
  skip: search.length < 3,
2152
2354
  variables: { region, search }
@@ -2155,7 +2357,7 @@ var useSearchStallholders = (search, region) => {
2155
2357
  return { error, loading, refetch, stallholders };
2156
2358
  };
2157
2359
  var useGetStallholderApplyForm = (stallholderId) => {
2158
- const { loading, error, data, refetch } = (0, import_client16.useQuery)(
2360
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(
2159
2361
  GET_STALLHOLDER_APPLY_FORM,
2160
2362
  {
2161
2363
  variables: { stallholderId }
@@ -2171,11 +2373,11 @@ var useGetStallholderApplyForm = (stallholderId) => {
2171
2373
  };
2172
2374
 
2173
2375
  // src/graphql/hooks/subscriptions.ts
2174
- var import_client18 = require("@apollo/client");
2376
+ var import_client22 = require("@apollo/client");
2175
2377
 
2176
2378
  // src/graphql/subscriptions/notification.ts
2177
- var import_client17 = require("@apollo/client");
2178
- var NOTIFICATION_FIELDS_FRAGMENT = import_client17.gql`
2379
+ var import_client21 = require("@apollo/client");
2380
+ var NOTIFICATION_FIELDS_FRAGMENT = import_client21.gql`
2179
2381
  fragment NotificationFields on NotificationType {
2180
2382
  createdBy
2181
2383
  important
@@ -2185,7 +2387,7 @@ var NOTIFICATION_FIELDS_FRAGMENT = import_client17.gql`
2185
2387
  resourceType
2186
2388
  }
2187
2389
  `;
2188
- var GET_GLOBAL_NOTIFICATION = import_client17.gql`
2390
+ var GET_GLOBAL_NOTIFICATION = import_client21.gql`
2189
2391
  subscription {
2190
2392
  getGlobalNotification {
2191
2393
  ...NotificationFields
@@ -2193,7 +2395,7 @@ var GET_GLOBAL_NOTIFICATION = import_client17.gql`
2193
2395
  }
2194
2396
  ${NOTIFICATION_FIELDS_FRAGMENT}
2195
2397
  `;
2196
- var GET_RELATION_NOTIFICATION = import_client17.gql`
2398
+ var GET_RELATION_NOTIFICATION = import_client21.gql`
2197
2399
  subscription {
2198
2400
  getRelationNotification {
2199
2401
  ...NotificationFields
@@ -2208,12 +2410,12 @@ var useGetNotification = () => {
2208
2410
  data: global,
2209
2411
  loading: loadingGlobal,
2210
2412
  error: errorGlobal
2211
- } = (0, import_client18.useSubscription)(GET_GLOBAL_NOTIFICATION);
2413
+ } = (0, import_client22.useSubscription)(GET_GLOBAL_NOTIFICATION);
2212
2414
  const {
2213
2415
  data: relation,
2214
2416
  loading: loadingImportant,
2215
2417
  error: errorImportant
2216
- } = (0, import_client18.useSubscription)(GET_RELATION_NOTIFICATION);
2418
+ } = (0, import_client22.useSubscription)(GET_RELATION_NOTIFICATION);
2217
2419
  const error = errorGlobal || errorImportant;
2218
2420
  const loading = loadingGlobal || loadingImportant;
2219
2421
  const notification = relation?.getRelationNotification || global?.getGlobalNotification;
@@ -2221,11 +2423,11 @@ var useGetNotification = () => {
2221
2423
  };
2222
2424
 
2223
2425
  // src/graphql/hooks/user/hooksMutation.ts
2224
- var import_client20 = require("@apollo/client");
2426
+ var import_client24 = require("@apollo/client");
2225
2427
 
2226
2428
  // src/graphql/mutations/user.ts
2227
- var import_client19 = require("@apollo/client");
2228
- var CREATE_USER_MUTATION = import_client19.gql`
2429
+ var import_client23 = require("@apollo/client");
2430
+ var CREATE_USER_MUTATION = import_client23.gql`
2229
2431
  mutation createUser($input: UserInputType!) {
2230
2432
  createUser(input: $input) {
2231
2433
  ...UserFields
@@ -2233,7 +2435,7 @@ var CREATE_USER_MUTATION = import_client19.gql`
2233
2435
  }
2234
2436
  ${USER_FIELDS_FRAGMENT}
2235
2437
  `;
2236
- var UPDATE_USER_MUTATION = import_client19.gql`
2438
+ var UPDATE_USER_MUTATION = import_client23.gql`
2237
2439
  mutation updateUser($_id: ID!, $input: UserInputType!) {
2238
2440
  updateUser(_id: $_id, input: $input) {
2239
2441
  ...UserFields
@@ -2241,7 +2443,7 @@ var UPDATE_USER_MUTATION = import_client19.gql`
2241
2443
  }
2242
2444
  ${USER_FIELDS_FRAGMENT}
2243
2445
  `;
2244
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client19.gql`
2446
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client23.gql`
2245
2447
  mutation addUserFavouriteResource(
2246
2448
  $resourceId: ID!
2247
2449
  $resourceType: ResourceTypeEnum!
@@ -2257,7 +2459,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client19.gql`
2257
2459
  }
2258
2460
  ${USER_FIELDS_FRAGMENT}
2259
2461
  `;
2260
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client19.gql`
2462
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client23.gql`
2261
2463
  mutation removeUserFavouriteResource(
2262
2464
  $resourceId: ID!
2263
2465
  $resourceType: ResourceTypeEnum!
@@ -2276,19 +2478,19 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client19.gql`
2276
2478
 
2277
2479
  // src/graphql/hooks/user/hooksMutation.ts
2278
2480
  var useCreateUser = () => {
2279
- const [createUser, { loading, error }] = (0, import_client20.useMutation)(CREATE_USER_MUTATION, {
2481
+ const [createUser, { loading, error }] = (0, import_client24.useMutation)(CREATE_USER_MUTATION, {
2280
2482
  awaitRefetchQueries: true
2281
2483
  });
2282
2484
  return { createUser, error, loading };
2283
2485
  };
2284
2486
  var useUpdateUser = () => {
2285
- const [updateUser, { loading, error }] = (0, import_client20.useMutation)(UPDATE_USER_MUTATION, {
2487
+ const [updateUser, { loading, error }] = (0, import_client24.useMutation)(UPDATE_USER_MUTATION, {
2286
2488
  awaitRefetchQueries: true
2287
2489
  });
2288
2490
  return { error, loading, updateUser };
2289
2491
  };
2290
2492
  var useAddUserFavouriteResource = () => {
2291
- const [addUserFavouriteResource, { loading, error }] = (0, import_client20.useMutation)(
2493
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client24.useMutation)(
2292
2494
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
2293
2495
  {
2294
2496
  awaitRefetchQueries: true,
@@ -2298,7 +2500,7 @@ var useAddUserFavouriteResource = () => {
2298
2500
  return { addUserFavouriteResource, error, loading };
2299
2501
  };
2300
2502
  var useRemoveUserFavouriteResource = () => {
2301
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client20.useMutation)(
2503
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client24.useMutation)(
2302
2504
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
2303
2505
  {
2304
2506
  awaitRefetchQueries: true,
@@ -2309,30 +2511,30 @@ var useRemoveUserFavouriteResource = () => {
2309
2511
  };
2310
2512
 
2311
2513
  // src/graphql/hooks/user/hooksQuery.ts
2312
- var import_client21 = require("@apollo/client");
2514
+ var import_client25 = require("@apollo/client");
2313
2515
  var useGetUsers = () => {
2314
- const { loading, error, data, refetch } = (0, import_client21.useQuery)(GET_USERS, {
2516
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_USERS, {
2315
2517
  fetchPolicy: "network-only"
2316
2518
  });
2317
2519
  const users = data?.users;
2318
2520
  return { error, loading, refetch, users };
2319
2521
  };
2320
2522
  var useGetUser = (id) => {
2321
- const { loading, error, data, refetch } = (0, import_client21.useQuery)(GET_USER, {
2523
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_USER, {
2322
2524
  variables: { id }
2323
2525
  });
2324
2526
  const user = data?.user;
2325
2527
  return { error, loading, refetch, user };
2326
2528
  };
2327
2529
  var useGetUserMarkets = () => {
2328
- 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, {
2329
2531
  fetchPolicy: "network-only"
2330
2532
  });
2331
2533
  const userMarkets = data?.userMarkets;
2332
2534
  return { error, loading, refetch, userMarkets };
2333
2535
  };
2334
2536
  var useGetUserFavourites = () => {
2335
- 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, {
2336
2538
  fetchPolicy: "network-only"
2337
2539
  });
2338
2540
  const markets = data?.userFavourites.markets;
@@ -2344,7 +2546,7 @@ var useGetUserFavourites = () => {
2344
2546
  return { error, loading, refetch, userFavourites };
2345
2547
  };
2346
2548
  var useGetUserNotifications = () => {
2347
- 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, {
2348
2550
  fetchPolicy: "network-only"
2349
2551
  });
2350
2552
  const userNotifications = data?.userNotifications;
@@ -3021,6 +3223,7 @@ var categoryColors = {
3021
3223
  // Annotate the CommonJS export names for ESM import in node:
3022
3224
  0 && (module.exports = {
3023
3225
  EnumInviteStatus,
3226
+ EnumNotification,
3024
3227
  EnumRegions,
3025
3228
  EnumRejectionPolicy,
3026
3229
  EnumRelationResource,
@@ -3097,16 +3300,20 @@ var categoryColors = {
3097
3300
  tagOptions,
3098
3301
  timeFormat,
3099
3302
  truncateText,
3303
+ useAddParticipantToChat,
3100
3304
  useAddUserFavouriteResource,
3305
+ useCreateChat,
3101
3306
  useCreateMarket,
3102
3307
  useCreateRelation,
3103
3308
  useCreateStallholder,
3104
3309
  useCreateStallholderApplyForm,
3105
3310
  useCreateUser,
3311
+ useDeleteChat,
3106
3312
  useDeleteMarket,
3107
3313
  useDeleteRelation,
3108
3314
  useDeleteStallholder,
3109
3315
  useForgotPassword,
3316
+ useGetChat,
3110
3317
  useGetMarket,
3111
3318
  useGetMarketRelations,
3112
3319
  useGetMarkets,
@@ -3122,6 +3329,7 @@ var categoryColors = {
3122
3329
  useGetStallholders,
3123
3330
  useGetStallholdersByRegion,
3124
3331
  useGetUser,
3332
+ useGetUserChats,
3125
3333
  useGetUserFavourites,
3126
3334
  useGetUserMarkets,
3127
3335
  useGetUserNotifications,
@@ -3132,9 +3340,11 @@ var categoryColors = {
3132
3340
  useMarketForm,
3133
3341
  useRegister,
3134
3342
  useRegisterForm,
3343
+ useRemoveParticipantFromChat,
3135
3344
  useRemoveUserFavouriteResource,
3136
3345
  useSearchMarkets,
3137
3346
  useSearchStallholders,
3347
+ useSendChatMessage,
3138
3348
  useStallholderApplyForm,
3139
3349
  useStallholderForm,
3140
3350
  useUpdateMarket,