@timardex/cluemart-shared 1.7.91 → 2.0.0

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.
Files changed (65) hide show
  1. package/dist/{ad-DzAxJcWT.d.ts → ad-C7jlZyUd.d.ts} +2 -2
  2. package/dist/{ad-DjHlreUH.d.mts → ad-tNoTBv3n.d.mts} +2 -2
  3. package/dist/{affiliate-BpjRWPUA.d.mts → affiliate-BL1ZN-4t.d.mts} +2 -2
  4. package/dist/{affiliate-BVLyYY70.d.ts → affiliate-DStyY84o.d.ts} +2 -2
  5. package/dist/auth/index.cjs +11 -8
  6. package/dist/auth/index.cjs.map +1 -1
  7. package/dist/auth/index.d.mts +3 -3
  8. package/dist/auth/index.d.ts +3 -3
  9. package/dist/auth/index.mjs +1 -1
  10. package/dist/chunk-7DQBUZXY.mjs +41 -0
  11. package/dist/chunk-7DQBUZXY.mjs.map +1 -0
  12. package/dist/{chunk-STNE7PMX.mjs → chunk-JJQL6LZE.mjs} +1 -1
  13. package/dist/chunk-JJQL6LZE.mjs.map +1 -0
  14. package/dist/{chunk-3ZPHXVUT.mjs → chunk-L3SNS6OJ.mjs} +2 -2
  15. package/dist/{chunk-PSKWWPLY.mjs → chunk-OUWKLNHZ.mjs} +14 -23
  16. package/dist/chunk-OUWKLNHZ.mjs.map +1 -0
  17. package/dist/{chunk-ZW4M5EGZ.mjs → chunk-XPUYQ7GB.mjs} +115 -71
  18. package/dist/chunk-XPUYQ7GB.mjs.map +1 -0
  19. package/dist/{contactUs-TEAbhwp9.d.mts → contactUs-BYm-iDIH.d.mts} +1 -1
  20. package/dist/{contactUs-Dm-0Qua3.d.ts → contactUs-_BHRXUrv.d.ts} +1 -1
  21. package/dist/formFields/index.cjs.map +1 -1
  22. package/dist/formFields/index.d.mts +1 -1
  23. package/dist/formFields/index.d.ts +1 -1
  24. package/dist/formFields/index.mjs +3 -2
  25. package/dist/{global-CDYmiqmd.d.mts → global-C7-KDYqg.d.mts} +6 -3
  26. package/dist/{global-DTXnm4Ok.d.ts → global-D_et_d2Y.d.ts} +6 -3
  27. package/dist/graphql/index.cjs +347 -275
  28. package/dist/graphql/index.cjs.map +1 -1
  29. package/dist/graphql/index.d.mts +54 -55
  30. package/dist/graphql/index.d.ts +54 -55
  31. package/dist/graphql/index.mjs +17 -14
  32. package/dist/hooks/index.cjs +191 -184
  33. package/dist/hooks/index.cjs.map +1 -1
  34. package/dist/hooks/index.d.mts +5 -5
  35. package/dist/hooks/index.d.ts +5 -5
  36. package/dist/hooks/index.mjs +5 -4
  37. package/dist/hooks/index.mjs.map +1 -1
  38. package/dist/index.cjs +356 -275
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.mts +70 -52
  41. package/dist/index.d.ts +70 -52
  42. package/dist/index.mjs +315 -239
  43. package/dist/index.mjs.map +1 -1
  44. package/dist/map/index.d.mts +1 -1
  45. package/dist/map/index.d.ts +1 -1
  46. package/dist/{resourceActivities-BDp-h5yH.d.mts → resourceActivities-BvejCLh9.d.mts} +1 -1
  47. package/dist/{resourceActivities-C14qOL7_.d.ts → resourceActivities-Smsl03Je.d.ts} +1 -1
  48. package/dist/sharing/index.d.mts +1 -1
  49. package/dist/sharing/index.d.ts +1 -1
  50. package/dist/types/index.cjs.map +1 -1
  51. package/dist/types/index.d.mts +7 -7
  52. package/dist/types/index.d.ts +7 -7
  53. package/dist/types/index.mjs +1 -1
  54. package/dist/{user-DCpVFB6K.d.mts → user-BA7TT2yB.d.mts} +1 -1
  55. package/dist/{user-C1yYa8oa.d.ts → user-nHjaLZoG.d.ts} +1 -1
  56. package/dist/utils/index.cjs +42 -0
  57. package/dist/utils/index.cjs.map +1 -1
  58. package/dist/utils/index.d.mts +20 -4
  59. package/dist/utils/index.d.ts +20 -4
  60. package/dist/utils/index.mjs +12 -2
  61. package/package.json +4 -1
  62. package/dist/chunk-PSKWWPLY.mjs.map +0 -1
  63. package/dist/chunk-STNE7PMX.mjs.map +0 -1
  64. package/dist/chunk-ZW4M5EGZ.mjs.map +0 -1
  65. /package/dist/{chunk-3ZPHXVUT.mjs.map → chunk-L3SNS6OJ.mjs.map} +0 -0
@@ -22,15 +22,21 @@ var graphql_exports = {};
22
22
  __export(graphql_exports, {
23
23
  ACTIVATE_VENDOR_CLAIM_MUTATION: () => ACTIVATE_VENDOR_CLAIM_MUTATION,
24
24
  GET_EVENT: () => GET_EVENT,
25
+ GET_EVENTS: () => GET_EVENTS,
25
26
  GET_EVENT_BY_SLUG: () => GET_EVENT_BY_SLUG,
26
27
  GET_EVENT_INFO: () => GET_EVENT_INFO,
27
28
  GET_OWNED_EVENT: () => GET_OWNED_EVENT,
28
29
  GET_PARTNER: () => GET_PARTNER,
30
+ GET_PARTNERS: () => GET_PARTNERS,
29
31
  GET_PARTNER_BY_SLUG: () => GET_PARTNER_BY_SLUG,
30
32
  GET_POST: () => GET_POST,
33
+ GET_POSTS: () => GET_POSTS,
34
+ GET_POSTS_BY_TYPE: () => GET_POSTS_BY_TYPE,
31
35
  GET_POST_BY_SLUG: () => GET_POST_BY_SLUG,
32
36
  GET_RESOURCE_CONNECTIONS: () => GET_RESOURCE_CONNECTIONS,
37
+ GET_USERS: () => GET_USERS,
33
38
  GET_VENDOR: () => GET_VENDOR,
39
+ GET_VENDORS: () => GET_VENDORS,
34
40
  GET_VENDOR_BY_SLUG: () => GET_VENDOR_BY_SLUG,
35
41
  GET_VENDOR_INFO: () => GET_VENDOR_INFO,
36
42
  MY_PENDING_VENDOR_CLAIM: () => MY_PENDING_VENDOR_CLAIM,
@@ -99,7 +105,6 @@ __export(graphql_exports, {
99
105
  useGetEventByPlaceId: () => useGetEventByPlaceId,
100
106
  useGetEventInfo: () => useGetEventInfo,
101
107
  useGetEventRelations: () => useGetEventRelations,
102
- useGetEvents: () => useGetEvents,
103
108
  useGetEventsByRegion: () => useGetEventsByRegion,
104
109
  useGetEventsNearMe: () => useGetEventsNearMe,
105
110
  useGetGame: () => useGetGame,
@@ -109,11 +114,8 @@ __export(graphql_exports, {
109
114
  useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
110
115
  useGetOwnedEvent: () => useGetOwnedEvent,
111
116
  useGetPartner: () => useGetPartner,
112
- useGetPartners: () => useGetPartners,
113
117
  useGetPartnersByRegion: () => useGetPartnersByRegion,
114
118
  useGetPost: () => useGetPost,
115
- useGetPosts: () => useGetPosts,
116
- useGetPostsByType: () => useGetPostsByType,
117
119
  useGetPrivateChats: () => useGetPrivateChats,
118
120
  useGetRelation: () => useGetRelation,
119
121
  useGetRelationByEventAndVendor: () => useGetRelationByEventAndVendor,
@@ -136,12 +138,10 @@ __export(graphql_exports, {
136
138
  useGetUserPartners: () => useGetUserPartners,
137
139
  useGetUserResources: () => useGetUserResources,
138
140
  useGetUserVendors: () => useGetUserVendors,
139
- useGetUsers: () => useGetUsers,
140
141
  useGetUsersByPromoCode: () => useGetUsersByPromoCode,
141
142
  useGetVendor: () => useGetVendor,
142
143
  useGetVendorInfo: () => useGetVendorInfo,
143
144
  useGetVendorRelations: () => useGetVendorRelations,
144
- useGetVendors: () => useGetVendors,
145
145
  useGetVendorsByRegion: () => useGetVendorsByRegion,
146
146
  useLeaveGame: () => useLeaveGame,
147
147
  useLogin: () => useLogin,
@@ -150,6 +150,7 @@ __export(graphql_exports, {
150
150
  useMarkChatMessagesSeen: () => useMarkChatMessagesSeen,
151
151
  useMarkNotificationRead: () => useMarkNotificationRead,
152
152
  useMyPendingVendorClaim: () => useMyPendingVendorClaim,
153
+ usePaginatedList: () => usePaginatedList,
153
154
  useRedeemAffiliateReward: () => useRedeemAffiliateReward,
154
155
  useRedeemReward: () => useRedeemReward,
155
156
  useRefreshToken: () => useRefreshToken,
@@ -634,8 +635,11 @@ var EVENT = import_client2.gql`
634
635
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
635
636
  `;
636
637
  var GET_EVENTS = import_client2.gql`
637
- query getEvents($dateStatus: EventDateStatusEnumType) {
638
- events(dateStatus: $dateStatus) {
638
+ query getEvents(
639
+ $dateStatus: EventDateStatusEnumType
640
+ $options: PaginationOptions
641
+ ) {
642
+ events(dateStatus: $dateStatus, options: $options) {
639
643
  ...EventListItemFields
640
644
  }
641
645
  }
@@ -940,8 +944,8 @@ var UNREGISTERED_VENDOR = import_client3.gql`
940
944
  ${UNREGISTERED_VENDOR_INVITATION_FRAGMENT}
941
945
  `;
942
946
  var GET_VENDORS = import_client3.gql`
943
- query getVendors {
944
- vendors {
947
+ query getVendors($options: PaginationOptions) {
948
+ vendors(options: $options) {
945
949
  ...VendorFields
946
950
  }
947
951
  }
@@ -1184,8 +1188,8 @@ var PARTNER = import_client5.gql`
1184
1188
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
1185
1189
  `;
1186
1190
  var GET_PARTNERS = import_client5.gql`
1187
- query getPartners {
1188
- partners {
1191
+ query getPartners($options: PaginationOptions) {
1192
+ partners(options: $options) {
1189
1193
  ...PartnerFields
1190
1194
  }
1191
1195
  }
@@ -1401,8 +1405,8 @@ var POST_FIELDS_FRAGMENT = import_client8.gql`
1401
1405
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
1402
1406
  `;
1403
1407
  var GET_POSTS = import_client8.gql`
1404
- query getPosts {
1405
- posts {
1408
+ query getPosts($options: PaginationOptions) {
1409
+ posts(options: $options) {
1406
1410
  ...PostFields
1407
1411
  }
1408
1412
  }
@@ -1417,38 +1421,142 @@ var GET_POST = import_client8.gql`
1417
1421
  ${POST_FIELDS_FRAGMENT}
1418
1422
  `;
1419
1423
  var GET_POSTS_BY_TYPE = import_client8.gql`
1420
- query getPostsByType($postType: PostTypeEnum!) {
1421
- postsByType(postType: $postType) {
1424
+ query getPostsByType($postType: PostTypeEnum!, $options: PaginationOptions) {
1425
+ postsByType(postType: $postType, options: $options) {
1422
1426
  ...PostFields
1423
1427
  }
1424
1428
  }
1425
1429
  ${POST_FIELDS_FRAGMENT}
1426
1430
  `;
1427
1431
 
1428
- // src/graphql/queries/shareSlug.ts
1432
+ // src/graphql/queries/user.ts
1429
1433
  var import_client9 = require("@apollo/client");
1430
- var GET_EVENT_BY_SLUG = import_client9.gql`
1434
+ var GET_USERS = import_client9.gql`
1435
+ query getUsers($options: PaginationOptions) {
1436
+ users(options: $options) {
1437
+ ...UserFields
1438
+ }
1439
+ }
1440
+ ${USER_FIELDS_FRAGMENT}
1441
+ `;
1442
+ var GET_USER = import_client9.gql`
1443
+ query getUser($_id: ID!) {
1444
+ user(_id: $_id) {
1445
+ ...UserFields
1446
+ }
1447
+ }
1448
+ ${USER_FIELDS_FRAGMENT}
1449
+ `;
1450
+ var GET_USER_EVENTS = import_client9.gql`
1451
+ query getUserEvents {
1452
+ userEvents {
1453
+ ...EventFields
1454
+ }
1455
+ }
1456
+ ${EVENT}
1457
+ `;
1458
+ var GET_USER_VENDORS = import_client9.gql`
1459
+ query getUserVendors {
1460
+ userVendors {
1461
+ ...VendorFields
1462
+ }
1463
+ }
1464
+ ${VENDOR}
1465
+ `;
1466
+ var GET_USER_PARTNERS = import_client9.gql`
1467
+ query getUserPartners {
1468
+ userPartners {
1469
+ ...PartnerFields
1470
+ }
1471
+ }
1472
+ ${PARTNER}
1473
+ `;
1474
+ var GET_USER_ACTIVITIES = import_client9.gql`
1475
+ query getUserActivities {
1476
+ userActivities {
1477
+ favourites {
1478
+ events {
1479
+ ...EventListItemFields
1480
+ }
1481
+ partners {
1482
+ ...PartnerFields
1483
+ }
1484
+ vendors {
1485
+ ...VendorFields
1486
+ }
1487
+ }
1488
+ going {
1489
+ events {
1490
+ ...EventListItemFields
1491
+ }
1492
+ }
1493
+ interested {
1494
+ events {
1495
+ ...EventListItemFields
1496
+ }
1497
+ }
1498
+ present {
1499
+ events {
1500
+ ...EventListItemFields
1501
+ }
1502
+ }
1503
+ }
1504
+ }
1505
+ ${EVENT_LIST_ITEM}
1506
+ ${VENDOR}
1507
+ ${PARTNER}
1508
+ `;
1509
+ var GET_USER_RESOURCES = import_client9.gql`
1510
+ query getUserResources($userId: ID!) {
1511
+ userResources(userId: $userId) {
1512
+ resources {
1513
+ _id
1514
+ logo
1515
+ name
1516
+ resourceType
1517
+ }
1518
+ }
1519
+ }
1520
+ `;
1521
+ var GET_USERS_BY_PROMO_CODE = import_client9.gql`
1522
+ query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
1523
+ usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
1524
+ active
1525
+ avatar {
1526
+ ...ResourceImageFields
1527
+ }
1528
+ deletedAt
1529
+ nickName
1530
+ userId
1531
+ }
1532
+ }
1533
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
1534
+ `;
1535
+
1536
+ // src/graphql/queries/shareSlug.ts
1537
+ var import_client10 = require("@apollo/client");
1538
+ var GET_EVENT_BY_SLUG = import_client10.gql`
1431
1539
  query getEventBySlug($slug: String!) {
1432
1540
  eventBySlug(slug: $slug) {
1433
1541
  _id
1434
1542
  }
1435
1543
  }
1436
1544
  `;
1437
- var GET_VENDOR_BY_SLUG = import_client9.gql`
1545
+ var GET_VENDOR_BY_SLUG = import_client10.gql`
1438
1546
  query getVendorBySlug($slug: String!) {
1439
1547
  vendorBySlug(slug: $slug) {
1440
1548
  _id
1441
1549
  }
1442
1550
  }
1443
1551
  `;
1444
- var GET_PARTNER_BY_SLUG = import_client9.gql`
1552
+ var GET_PARTNER_BY_SLUG = import_client10.gql`
1445
1553
  query getPartnerBySlug($slug: String!) {
1446
1554
  partnerBySlug(slug: $slug) {
1447
1555
  _id
1448
1556
  }
1449
1557
  }
1450
1558
  `;
1451
- var GET_POST_BY_SLUG = import_client9.gql`
1559
+ var GET_POST_BY_SLUG = import_client10.gql`
1452
1560
  query getPostBySlug($slug: String!, $postType: PostTypeEnum!) {
1453
1561
  postBySlug(slug: $slug, postType: $postType) {
1454
1562
  _id
@@ -1457,8 +1565,8 @@ var GET_POST_BY_SLUG = import_client9.gql`
1457
1565
  `;
1458
1566
 
1459
1567
  // src/graphql/queries/relation.ts
1460
- var import_client10 = require("@apollo/client");
1461
- var RELATION_FIELDS_FRAGMENT = import_client10.gql`
1568
+ var import_client11 = require("@apollo/client");
1569
+ var RELATION_FIELDS_FRAGMENT = import_client11.gql`
1462
1570
  fragment RelationFields on RelationType {
1463
1571
  _id
1464
1572
  active
@@ -1475,7 +1583,7 @@ var RELATION_FIELDS_FRAGMENT = import_client10.gql`
1475
1583
  }
1476
1584
  ${RELATION_DATES_FRAGMENT}
1477
1585
  `;
1478
- var GET_RELATION = import_client10.gql`
1586
+ var GET_RELATION = import_client11.gql`
1479
1587
  query getRelation($_id: ID!) {
1480
1588
  relation(_id: $_id) {
1481
1589
  ...RelationFields
@@ -1483,7 +1591,7 @@ var GET_RELATION = import_client10.gql`
1483
1591
  }
1484
1592
  ${RELATION_FIELDS_FRAGMENT}
1485
1593
  `;
1486
- var GET_RELATION_BY_EVENT_AND_VENDOR = import_client10.gql`
1594
+ var GET_RELATION_BY_EVENT_AND_VENDOR = import_client11.gql`
1487
1595
  query getRelationByEventAndVendor($eventId: ID!, $vendorId: ID!) {
1488
1596
  relationByEventAndVendor(eventId: $eventId, vendorId: $vendorId) {
1489
1597
  ...RelationFields
@@ -1491,7 +1599,7 @@ var GET_RELATION_BY_EVENT_AND_VENDOR = import_client10.gql`
1491
1599
  }
1492
1600
  ${RELATION_FIELDS_FRAGMENT}
1493
1601
  `;
1494
- var GET_EVENT_RELATIONS = import_client10.gql`
1602
+ var GET_EVENT_RELATIONS = import_client11.gql`
1495
1603
  query getEventRelations($eventId: ID!) {
1496
1604
  eventRelations(eventId: $eventId) {
1497
1605
  ...RelationFields
@@ -1499,7 +1607,7 @@ var GET_EVENT_RELATIONS = import_client10.gql`
1499
1607
  }
1500
1608
  ${RELATION_FIELDS_FRAGMENT}
1501
1609
  `;
1502
- var GET_VENDOR_RELATIONS = import_client10.gql`
1610
+ var GET_VENDOR_RELATIONS = import_client11.gql`
1503
1611
  query getVendorRelations($vendorId: ID!) {
1504
1612
  vendorRelations(vendorId: $vendorId) {
1505
1613
  ...RelationFields
@@ -1507,7 +1615,7 @@ var GET_VENDOR_RELATIONS = import_client10.gql`
1507
1615
  }
1508
1616
  ${RELATION_FIELDS_FRAGMENT}
1509
1617
  `;
1510
- var GET_RESOURCE_CONNECTIONS = import_client10.gql`
1618
+ var GET_RESOURCE_CONNECTIONS = import_client11.gql`
1511
1619
  query getResourceConnections(
1512
1620
  $resourceId: ID!
1513
1621
  $resourceType: ResourceTypeEnum!
@@ -1532,11 +1640,11 @@ function toGraphqlQueryString(query) {
1532
1640
  }
1533
1641
 
1534
1642
  // src/graphql/hooks/admin/hooksMutation.ts
1535
- var import_client12 = require("@apollo/client");
1643
+ var import_client13 = require("@apollo/client");
1536
1644
 
1537
1645
  // src/graphql/mutations/admin.ts
1538
- var import_client11 = require("@apollo/client");
1539
- var ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = import_client11.gql`
1646
+ var import_client12 = require("@apollo/client");
1647
+ var ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = import_client12.gql`
1540
1648
  mutation adminUpdateResourceType($input: AdminUpdateResourceInputType!) {
1541
1649
  adminUpdateResourceType(input: $input) {
1542
1650
  data {
@@ -1548,7 +1656,7 @@ var ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = import_client11.gql`
1548
1656
  }
1549
1657
  }
1550
1658
  `;
1551
- var ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = import_client11.gql`
1659
+ var ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = import_client12.gql`
1552
1660
  mutation adminResendUserVerificationEmail($userId: ID!) {
1553
1661
  adminResendUserVerificationEmail(userId: $userId) {
1554
1662
  data
@@ -1556,7 +1664,7 @@ var ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = import_client11.gql`
1556
1664
  }
1557
1665
  }
1558
1666
  `;
1559
- var ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION = import_client11.gql`
1667
+ var ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION = import_client12.gql`
1560
1668
  mutation adminPermanentlyDeleteResource(
1561
1669
  $resourceId: ID!
1562
1670
  $resourceType: ResourceTypeEnum!
@@ -1573,7 +1681,7 @@ var ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION = import_client11.gql`
1573
1681
 
1574
1682
  // src/graphql/hooks/admin/hooksMutation.ts
1575
1683
  var useAdminUpdateResourceType = () => {
1576
- const [adminUpdateResourceType, { loading, error }] = (0, import_client12.useMutation)(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {
1684
+ const [adminUpdateResourceType, { loading, error }] = (0, import_client13.useMutation)(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {
1577
1685
  awaitRefetchQueries: true,
1578
1686
  refetchQueries: (mutationResult) => {
1579
1687
  const adminUpdateResourceType2 = mutationResult?.data?.adminUpdateResourceType?.data;
@@ -1596,7 +1704,7 @@ var useAdminUpdateResourceType = () => {
1596
1704
  };
1597
1705
  };
1598
1706
  var useAdminResendUserVerificationEmail = () => {
1599
- const [adminResendUserVerificationEmail, { loading, error }] = (0, import_client12.useMutation)(ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION);
1707
+ const [adminResendUserVerificationEmail, { loading, error }] = (0, import_client13.useMutation)(ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION);
1600
1708
  return {
1601
1709
  adminResendUserVerificationEmail,
1602
1710
  error,
@@ -1604,7 +1712,7 @@ var useAdminResendUserVerificationEmail = () => {
1604
1712
  };
1605
1713
  };
1606
1714
  var useAdminPermanentlyDeleteResource = () => {
1607
- const [adminPermanentlyDeleteResource, { loading, error }] = (0, import_client12.useMutation)(ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION);
1715
+ const [adminPermanentlyDeleteResource, { loading, error }] = (0, import_client13.useMutation)(ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION);
1608
1716
  return {
1609
1717
  adminPermanentlyDeleteResource,
1610
1718
  error,
@@ -1613,11 +1721,11 @@ var useAdminPermanentlyDeleteResource = () => {
1613
1721
  };
1614
1722
 
1615
1723
  // src/graphql/hooks/auth.ts
1616
- var import_client14 = require("@apollo/client");
1724
+ var import_client15 = require("@apollo/client");
1617
1725
 
1618
1726
  // src/graphql/mutations/auth.ts
1619
- var import_client13 = require("@apollo/client");
1620
- var REGISTER_MUTATION = import_client13.gql`
1727
+ var import_client14 = require("@apollo/client");
1728
+ var REGISTER_MUTATION = import_client14.gql`
1621
1729
  mutation register($input: RegisterInputType!) {
1622
1730
  register(input: $input) {
1623
1731
  data {
@@ -1632,7 +1740,7 @@ var REGISTER_MUTATION = import_client13.gql`
1632
1740
  }
1633
1741
  ${USER_FIELDS_FRAGMENT}
1634
1742
  `;
1635
- var LOGIN_MUTATION = import_client13.gql`
1743
+ var LOGIN_MUTATION = import_client14.gql`
1636
1744
  mutation login($input: LoginInputType!) {
1637
1745
  login(input: $input) {
1638
1746
  data {
@@ -1647,7 +1755,7 @@ var LOGIN_MUTATION = import_client13.gql`
1647
1755
  }
1648
1756
  ${USER_FIELDS_FRAGMENT}
1649
1757
  `;
1650
- var LOGOUT_MUTATION = import_client13.gql`
1758
+ var LOGOUT_MUTATION = import_client14.gql`
1651
1759
  mutation logout {
1652
1760
  logout {
1653
1761
  data
@@ -1655,7 +1763,7 @@ var LOGOUT_MUTATION = import_client13.gql`
1655
1763
  }
1656
1764
  }
1657
1765
  `;
1658
- var REFRESH_TOKEN_MUTATION = import_client13.gql`
1766
+ var REFRESH_TOKEN_MUTATION = import_client14.gql`
1659
1767
  mutation refreshToken($input: RefreshTokenInputType!) {
1660
1768
  refreshToken(input: $input) {
1661
1769
  data {
@@ -1666,7 +1774,7 @@ var REFRESH_TOKEN_MUTATION = import_client13.gql`
1666
1774
  }
1667
1775
  }
1668
1776
  `;
1669
- var RESET_PASSWORD_MUTATION = import_client13.gql`
1777
+ var RESET_PASSWORD_MUTATION = import_client14.gql`
1670
1778
  mutation resetPassword($input: ResetPasswordInputType!) {
1671
1779
  resetPassword(input: $input) {
1672
1780
  data
@@ -1674,7 +1782,7 @@ var RESET_PASSWORD_MUTATION = import_client13.gql`
1674
1782
  }
1675
1783
  }
1676
1784
  `;
1677
- var REQUEST_PASSWORD_RESET_MUTATION = import_client13.gql`
1785
+ var REQUEST_PASSWORD_RESET_MUTATION = import_client14.gql`
1678
1786
  mutation requestPasswordReset($input: RequestPasswordResetInputType!) {
1679
1787
  requestPasswordReset(input: $input) {
1680
1788
  data
@@ -1682,7 +1790,7 @@ var REQUEST_PASSWORD_RESET_MUTATION = import_client13.gql`
1682
1790
  }
1683
1791
  }
1684
1792
  `;
1685
- var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client13.gql`
1793
+ var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client14.gql`
1686
1794
  mutation validateVerificationToken(
1687
1795
  $input: ValidateVerificationTokenInputType!
1688
1796
  ) {
@@ -1695,43 +1803,43 @@ var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client13.gql`
1695
1803
 
1696
1804
  // src/graphql/hooks/auth.ts
1697
1805
  var useRegister = () => {
1698
- const [register, { loading, error }] = (0, import_client14.useMutation)(REGISTER_MUTATION);
1806
+ const [register, { loading, error }] = (0, import_client15.useMutation)(REGISTER_MUTATION);
1699
1807
  return { error, loading, register };
1700
1808
  };
1701
1809
  var useLogin = () => {
1702
- const [login, { loading, error }] = (0, import_client14.useMutation)(LOGIN_MUTATION);
1810
+ const [login, { loading, error }] = (0, import_client15.useMutation)(LOGIN_MUTATION);
1703
1811
  return { error, loading, login };
1704
1812
  };
1705
1813
  var useLogout = () => {
1706
- const [logout, { loading, error }] = (0, import_client14.useMutation)(LOGOUT_MUTATION);
1814
+ const [logout, { loading, error }] = (0, import_client15.useMutation)(LOGOUT_MUTATION);
1707
1815
  return { error, loading, logout };
1708
1816
  };
1709
1817
  var useRefreshToken = () => {
1710
- const [refreshToken, { loading, error }] = (0, import_client14.useMutation)(REFRESH_TOKEN_MUTATION);
1818
+ const [refreshToken, { loading, error }] = (0, import_client15.useMutation)(REFRESH_TOKEN_MUTATION);
1711
1819
  return { error, loading, refreshToken };
1712
1820
  };
1713
1821
  var useRequestPasswordReset = () => {
1714
- const [requestPasswordReset, { loading, error }] = (0, import_client14.useMutation)(REQUEST_PASSWORD_RESET_MUTATION);
1822
+ const [requestPasswordReset, { loading, error }] = (0, import_client15.useMutation)(REQUEST_PASSWORD_RESET_MUTATION);
1715
1823
  return { error, loading, requestPasswordReset };
1716
1824
  };
1717
1825
  var useValidateVerificationToken = () => {
1718
- const [validateVerificationToken, { loading, error }] = (0, import_client14.useMutation)(VALIDATE_VERIFICATION_TOKEN_MUTATION);
1826
+ const [validateVerificationToken, { loading, error }] = (0, import_client15.useMutation)(VALIDATE_VERIFICATION_TOKEN_MUTATION);
1719
1827
  return { error, loading, validateVerificationToken };
1720
1828
  };
1721
1829
  var useResetPassword = () => {
1722
- const [resetPassword, { loading, error }] = (0, import_client14.useMutation)(RESET_PASSWORD_MUTATION);
1830
+ const [resetPassword, { loading, error }] = (0, import_client15.useMutation)(RESET_PASSWORD_MUTATION);
1723
1831
  return { error, loading, resetPassword };
1724
1832
  };
1725
1833
 
1726
1834
  // src/graphql/hooks/chat/hooksMutation.ts
1727
- var import_client17 = require("@apollo/client");
1835
+ var import_client18 = require("@apollo/client");
1728
1836
 
1729
1837
  // src/graphql/mutations/chat.ts
1730
- var import_client16 = require("@apollo/client");
1838
+ var import_client17 = require("@apollo/client");
1731
1839
 
1732
1840
  // src/graphql/queries/chat.ts
1733
- var import_client15 = require("@apollo/client");
1734
- var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client15.gql`
1841
+ var import_client16 = require("@apollo/client");
1842
+ var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client16.gql`
1735
1843
  fragment ChatMessageFields on ChatMessageType {
1736
1844
  _id
1737
1845
  content
@@ -1754,7 +1862,7 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client15.gql`
1754
1862
  updatedAt
1755
1863
  }
1756
1864
  `;
1757
- var CHAT_PARTICIPANT = import_client15.gql`
1865
+ var CHAT_PARTICIPANT = import_client16.gql`
1758
1866
  fragment ChatParticipantFields on ChatParticipantType {
1759
1867
  active
1760
1868
  userAvatar
@@ -1763,7 +1871,7 @@ var CHAT_PARTICIPANT = import_client15.gql`
1763
1871
  userName
1764
1872
  }
1765
1873
  `;
1766
- var CHAT_FIELDS_FRAGMENT = import_client15.gql`
1874
+ var CHAT_FIELDS_FRAGMENT = import_client16.gql`
1767
1875
  fragment ChatFields on ChatType {
1768
1876
  _id
1769
1877
  active
@@ -1784,7 +1892,7 @@ var CHAT_FIELDS_FRAGMENT = import_client15.gql`
1784
1892
  ${CHAT_MESSAGE_FIELDS_FRAGMENT}
1785
1893
  ${CHAT_PARTICIPANT}
1786
1894
  `;
1787
- var CHAT = import_client15.gql`
1895
+ var CHAT = import_client16.gql`
1788
1896
  query chat($_id: ID!) {
1789
1897
  chat(_id: $_id) {
1790
1898
  ...ChatFields
@@ -1792,7 +1900,7 @@ var CHAT = import_client15.gql`
1792
1900
  }
1793
1901
  ${CHAT_FIELDS_FRAGMENT}
1794
1902
  `;
1795
- var PRIVATE_CHATS = import_client15.gql`
1903
+ var PRIVATE_CHATS = import_client16.gql`
1796
1904
  query privateChats {
1797
1905
  privateChats {
1798
1906
  ...ChatFields
@@ -1800,7 +1908,7 @@ var PRIVATE_CHATS = import_client15.gql`
1800
1908
  }
1801
1909
  ${CHAT_FIELDS_FRAGMENT}
1802
1910
  `;
1803
- var RELATION_CHATS = import_client15.gql`
1911
+ var RELATION_CHATS = import_client16.gql`
1804
1912
  query relationChats {
1805
1913
  relationChats {
1806
1914
  ...ChatFields
@@ -1808,7 +1916,7 @@ var RELATION_CHATS = import_client15.gql`
1808
1916
  }
1809
1917
  ${CHAT_FIELDS_FRAGMENT}
1810
1918
  `;
1811
- var GET_CHATS_BY_REGION = import_client15.gql`
1919
+ var GET_CHATS_BY_REGION = import_client16.gql`
1812
1920
  query getChatsByRegion($region: String!) {
1813
1921
  chatsByRegion(region: $region) {
1814
1922
  ...ChatFields
@@ -1816,7 +1924,7 @@ var GET_CHATS_BY_REGION = import_client15.gql`
1816
1924
  }
1817
1925
  ${CHAT_FIELDS_FRAGMENT}
1818
1926
  `;
1819
- var CHAT_REPORT_FIELDS_FRAGMENT = import_client15.gql`
1927
+ var CHAT_REPORT_FIELDS_FRAGMENT = import_client16.gql`
1820
1928
  fragment ChatReportFields on ReportChatUserType {
1821
1929
  _id
1822
1930
  chatId
@@ -1831,7 +1939,7 @@ var CHAT_REPORT_FIELDS_FRAGMENT = import_client15.gql`
1831
1939
  updatedAt
1832
1940
  }
1833
1941
  `;
1834
- var GET_REPORTED_CHAT_USERS = import_client15.gql`
1942
+ var GET_REPORTED_CHAT_USERS = import_client16.gql`
1835
1943
  query getReportedChatUsers {
1836
1944
  reportedChatUsers {
1837
1945
  ...ChatReportFields
@@ -1841,7 +1949,7 @@ var GET_REPORTED_CHAT_USERS = import_client15.gql`
1841
1949
  `;
1842
1950
 
1843
1951
  // src/graphql/mutations/chat.ts
1844
- var CREATE_PRIVATE_CHAT_MUTATION = import_client16.gql`
1952
+ var CREATE_PRIVATE_CHAT_MUTATION = import_client17.gql`
1845
1953
  mutation createPrivateChat($userId: ID!) {
1846
1954
  createPrivateChat(userId: $userId) {
1847
1955
  data {
@@ -1852,7 +1960,7 @@ var CREATE_PRIVATE_CHAT_MUTATION = import_client16.gql`
1852
1960
  }
1853
1961
  ${CHAT_FIELDS_FRAGMENT}
1854
1962
  `;
1855
- var SEND_CHAT_MESSAGE_MUTATION = import_client16.gql`
1963
+ var SEND_CHAT_MESSAGE_MUTATION = import_client17.gql`
1856
1964
  mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
1857
1965
  sendChatMessage(_id: $_id, input: $input) {
1858
1966
  data {
@@ -1863,7 +1971,7 @@ var SEND_CHAT_MESSAGE_MUTATION = import_client16.gql`
1863
1971
  }
1864
1972
  ${CHAT_FIELDS_FRAGMENT}
1865
1973
  `;
1866
- var DELETE_CHAT_MUTATION = import_client16.gql`
1974
+ var DELETE_CHAT_MUTATION = import_client17.gql`
1867
1975
  mutation deleteChat($_id: ID!) {
1868
1976
  deleteChat(_id: $_id) {
1869
1977
  data
@@ -1871,7 +1979,7 @@ var DELETE_CHAT_MUTATION = import_client16.gql`
1871
1979
  }
1872
1980
  }
1873
1981
  `;
1874
- var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client16.gql`
1982
+ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client17.gql`
1875
1983
  mutation addParticipantToChat($chatId: ID!, $userId: ID!) {
1876
1984
  addParticipantToChat(chatId: $chatId, userId: $userId) {
1877
1985
  data {
@@ -1882,7 +1990,7 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client16.gql`
1882
1990
  }
1883
1991
  ${CHAT_FIELDS_FRAGMENT}
1884
1992
  `;
1885
- var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client16.gql`
1993
+ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client17.gql`
1886
1994
  mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {
1887
1995
  removeParticipantFromChat(chatId: $chatId, userId: $userId) {
1888
1996
  data {
@@ -1893,7 +2001,7 @@ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client16.gql`
1893
2001
  }
1894
2002
  }
1895
2003
  `;
1896
- var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = import_client16.gql`
2004
+ var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = import_client17.gql`
1897
2005
  mutation toggleChatMessageLike($chatId: ID!, $messageId: ID!) {
1898
2006
  toggleChatMessageLike(chatId: $chatId, messageId: $messageId) {
1899
2007
  data {
@@ -1904,7 +2012,7 @@ var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = import_client16.gql`
1904
2012
  }
1905
2013
  ${CHAT_FIELDS_FRAGMENT}
1906
2014
  `;
1907
- var MARK_CHAT_MESSAGES_SEEN_MUTATION = import_client16.gql`
2015
+ var MARK_CHAT_MESSAGES_SEEN_MUTATION = import_client17.gql`
1908
2016
  mutation markChatMessagesSeen($chatId: ID!, $messageIds: [ID!]!) {
1909
2017
  markChatMessagesSeen(chatId: $chatId, messageIds: $messageIds) {
1910
2018
  data {
@@ -1915,7 +2023,7 @@ var MARK_CHAT_MESSAGES_SEEN_MUTATION = import_client16.gql`
1915
2023
  }
1916
2024
  ${CHAT_FIELDS_FRAGMENT}
1917
2025
  `;
1918
- var REPORT_CHAT_USER_MUTATION = import_client16.gql`
2026
+ var REPORT_CHAT_USER_MUTATION = import_client17.gql`
1919
2027
  mutation reportChatUser($input: ReportChatUserInputType!) {
1920
2028
  reportChatUser(input: $input) {
1921
2029
  data {
@@ -1929,14 +2037,14 @@ var REPORT_CHAT_USER_MUTATION = import_client16.gql`
1929
2037
 
1930
2038
  // src/graphql/hooks/chat/hooksMutation.ts
1931
2039
  var useCreatePrivateChat = () => {
1932
- const [createPrivateChat, { loading, error }] = (0, import_client17.useMutation)(CREATE_PRIVATE_CHAT_MUTATION, {
2040
+ const [createPrivateChat, { loading, error }] = (0, import_client18.useMutation)(CREATE_PRIVATE_CHAT_MUTATION, {
1933
2041
  awaitRefetchQueries: true,
1934
2042
  refetchQueries: [{ query: PRIVATE_CHATS }]
1935
2043
  });
1936
2044
  return { createPrivateChat, error, loading };
1937
2045
  };
1938
2046
  var useSendChatMessage = () => {
1939
- const [sendChatMessage, { loading, error }] = (0, import_client17.useMutation)(SEND_CHAT_MESSAGE_MUTATION, {
2047
+ const [sendChatMessage, { loading, error }] = (0, import_client18.useMutation)(SEND_CHAT_MESSAGE_MUTATION, {
1940
2048
  awaitRefetchQueries: true,
1941
2049
  refetchQueries: (mutationResult) => {
1942
2050
  const chatId = mutationResult?.data?.sendChatMessage?.data?._id;
@@ -1951,14 +2059,14 @@ var useSendChatMessage = () => {
1951
2059
  return { error, loading, sendChatMessage };
1952
2060
  };
1953
2061
  var useDeleteChat = () => {
1954
- const [deleteChat, { loading, error }] = (0, import_client17.useMutation)(DELETE_CHAT_MUTATION, {
2062
+ const [deleteChat, { loading, error }] = (0, import_client18.useMutation)(DELETE_CHAT_MUTATION, {
1955
2063
  awaitRefetchQueries: true,
1956
2064
  refetchQueries: [{ query: PRIVATE_CHATS }, { query: RELATION_CHATS }]
1957
2065
  });
1958
2066
  return { deleteChat, error, loading };
1959
2067
  };
1960
2068
  var useAddParticipantToChat = () => {
1961
- const [addParticipantToChat, { loading, error }] = (0, import_client17.useMutation)(ADD_PARTICIPANT_TO_CHAT_MUTATION, {
2069
+ const [addParticipantToChat, { loading, error }] = (0, import_client18.useMutation)(ADD_PARTICIPANT_TO_CHAT_MUTATION, {
1962
2070
  awaitRefetchQueries: true,
1963
2071
  refetchQueries: (mutationResult) => {
1964
2072
  const chatId = mutationResult?.data?.addParticipantToChat?.data?._id;
@@ -1979,7 +2087,7 @@ var useAddParticipantToChat = () => {
1979
2087
  return { addParticipantToChat, error, loading };
1980
2088
  };
1981
2089
  var useRemoveParticipantFromChat = () => {
1982
- const [removeParticipantFromChat, { loading, error }] = (0, import_client17.useMutation)(REMOVE_PARTICIPANT_FROM_CHAT_MUTATION, {
2090
+ const [removeParticipantFromChat, { loading, error }] = (0, import_client18.useMutation)(REMOVE_PARTICIPANT_FROM_CHAT_MUTATION, {
1983
2091
  awaitRefetchQueries: true,
1984
2092
  refetchQueries: (mutationResult) => {
1985
2093
  const region = mutationResult?.data?.removeParticipantFromChat?.data?.region;
@@ -1999,7 +2107,7 @@ var useRemoveParticipantFromChat = () => {
1999
2107
  return { error, loading, removeParticipantFromChat };
2000
2108
  };
2001
2109
  var useToggleChatMessageLike = () => {
2002
- const [toggleChatMessageLike, { loading, error }] = (0, import_client17.useMutation)(TOGGLE_CHAT_MESSAGE_LIKE_MUTATION, {
2110
+ const [toggleChatMessageLike, { loading, error }] = (0, import_client18.useMutation)(TOGGLE_CHAT_MESSAGE_LIKE_MUTATION, {
2003
2111
  awaitRefetchQueries: true,
2004
2112
  refetchQueries: (mutationResult) => {
2005
2113
  const chatId = mutationResult?.data?.toggleChatMessageLike?.data?._id;
@@ -2014,7 +2122,7 @@ var useToggleChatMessageLike = () => {
2014
2122
  return { error, loading, toggleChatMessageLike };
2015
2123
  };
2016
2124
  var useMarkChatMessagesSeen = () => {
2017
- const [markChatMessagesSeen, { loading, error }] = (0, import_client17.useMutation)(MARK_CHAT_MESSAGES_SEEN_MUTATION, {
2125
+ const [markChatMessagesSeen, { loading, error }] = (0, import_client18.useMutation)(MARK_CHAT_MESSAGES_SEEN_MUTATION, {
2018
2126
  awaitRefetchQueries: true,
2019
2127
  refetchQueries: (mutationResult) => {
2020
2128
  const chatId = mutationResult?.data?.markChatMessagesSeen?.data?._id;
@@ -2029,16 +2137,16 @@ var useMarkChatMessagesSeen = () => {
2029
2137
  return { error, loading, markChatMessagesSeen };
2030
2138
  };
2031
2139
  var useReportChatUser = () => {
2032
- const [reportChatUser, { loading, error }] = (0, import_client17.useMutation)(REPORT_CHAT_USER_MUTATION);
2140
+ const [reportChatUser, { loading, error }] = (0, import_client18.useMutation)(REPORT_CHAT_USER_MUTATION);
2033
2141
  return { error, loading, reportChatUser };
2034
2142
  };
2035
2143
 
2036
2144
  // src/graphql/hooks/chat/hooksQuery.ts
2037
- var import_client19 = require("@apollo/client");
2145
+ var import_client20 = require("@apollo/client");
2038
2146
 
2039
2147
  // src/graphql/subscriptions/chat.ts
2040
- var import_client18 = require("@apollo/client");
2041
- var GET_CHAT_MESSAGE = import_client18.gql`
2148
+ var import_client19 = require("@apollo/client");
2149
+ var GET_CHAT_MESSAGE = import_client19.gql`
2042
2150
  subscription {
2043
2151
  getChatMessage {
2044
2152
  ...ChatFields
@@ -2049,7 +2157,7 @@ var GET_CHAT_MESSAGE = import_client18.gql`
2049
2157
 
2050
2158
  // src/graphql/hooks/chat/hooksQuery.ts
2051
2159
  var useGetChat = (_id) => {
2052
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(CHAT, {
2160
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(CHAT, {
2053
2161
  fetchPolicy: "network-only",
2054
2162
  skip: !_id || _id === "",
2055
2163
  variables: { _id }
@@ -2058,28 +2166,28 @@ var useGetChat = (_id) => {
2058
2166
  return { chat, error, loading, refetch };
2059
2167
  };
2060
2168
  var useGetPrivateChats = () => {
2061
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(PRIVATE_CHATS, {
2169
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(PRIVATE_CHATS, {
2062
2170
  fetchPolicy: "network-only"
2063
2171
  });
2064
2172
  const privateChats = data?.privateChats || [];
2065
2173
  return { error, loading, privateChats, refetch };
2066
2174
  };
2067
2175
  var useGetRelationChats = () => {
2068
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(RELATION_CHATS, {
2176
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(RELATION_CHATS, {
2069
2177
  fetchPolicy: "network-only"
2070
2178
  });
2071
2179
  const relationChats = data?.relationChats || [];
2072
2180
  return { error, loading, refetch, relationChats };
2073
2181
  };
2074
2182
  var useGetChatSubscription = () => {
2075
- const { data, loading, error } = (0, import_client19.useSubscription)(
2183
+ const { data, loading, error } = (0, import_client20.useSubscription)(
2076
2184
  GET_CHAT_MESSAGE
2077
2185
  );
2078
2186
  const chat = data?.getChat;
2079
2187
  return { chat, error, loading };
2080
2188
  };
2081
2189
  var useGetChatsByRegion = (region) => {
2082
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_CHATS_BY_REGION, {
2190
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(GET_CHATS_BY_REGION, {
2083
2191
  fetchPolicy: "network-only",
2084
2192
  variables: { region }
2085
2193
  });
@@ -2087,7 +2195,7 @@ var useGetChatsByRegion = (region) => {
2087
2195
  return { chatsByRegion, error, loading, refetch };
2088
2196
  };
2089
2197
  var useGetReportedChatUsers = () => {
2090
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_REPORTED_CHAT_USERS, {
2198
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(GET_REPORTED_CHAT_USERS, {
2091
2199
  fetchPolicy: "network-only"
2092
2200
  });
2093
2201
  const reportedChatUsers = data?.reportedChatUsers || [];
@@ -2095,11 +2203,11 @@ var useGetReportedChatUsers = () => {
2095
2203
  };
2096
2204
 
2097
2205
  // src/graphql/hooks/contactUs.ts
2098
- var import_client21 = require("@apollo/client");
2206
+ var import_client22 = require("@apollo/client");
2099
2207
 
2100
2208
  // src/graphql/mutations/contactUs.ts
2101
- var import_client20 = require("@apollo/client");
2102
- var CONTACT_US_MUTATION = import_client20.gql`
2209
+ var import_client21 = require("@apollo/client");
2210
+ var CONTACT_US_MUTATION = import_client21.gql`
2103
2211
  mutation contactUs($input: ContactUsInputType!) {
2104
2212
  contactUs(input: $input) {
2105
2213
  data
@@ -2110,7 +2218,7 @@ var CONTACT_US_MUTATION = import_client20.gql`
2110
2218
 
2111
2219
  // src/graphql/hooks/contactUs.ts
2112
2220
  var useContactUs = () => {
2113
- const [contactUs, { loading, error }] = (0, import_client21.useMutation)(CONTACT_US_MUTATION);
2221
+ const [contactUs, { loading, error }] = (0, import_client22.useMutation)(CONTACT_US_MUTATION);
2114
2222
  return { contactUs, error, loading };
2115
2223
  };
2116
2224
 
@@ -2118,8 +2226,8 @@ var useContactUs = () => {
2118
2226
  var import_client24 = require("@apollo/client");
2119
2227
 
2120
2228
  // src/graphql/mutations/event.ts
2121
- var import_client22 = require("@apollo/client");
2122
- var CREATE_EVENT_MUTATION = import_client22.gql`
2229
+ var import_client23 = require("@apollo/client");
2230
+ var CREATE_EVENT_MUTATION = import_client23.gql`
2123
2231
  mutation createEvent($input: EventInputType!) {
2124
2232
  createEvent(input: $input) {
2125
2233
  data {
@@ -2130,7 +2238,7 @@ var CREATE_EVENT_MUTATION = import_client22.gql`
2130
2238
  }
2131
2239
  ${EVENT}
2132
2240
  `;
2133
- var UPDATE_EVENT_MUTATION = import_client22.gql`
2241
+ var UPDATE_EVENT_MUTATION = import_client23.gql`
2134
2242
  mutation updateEvent($_id: ID!, $input: EventInputType!) {
2135
2243
  updateEvent(_id: $_id, input: $input) {
2136
2244
  data {
@@ -2141,7 +2249,7 @@ var UPDATE_EVENT_MUTATION = import_client22.gql`
2141
2249
  }
2142
2250
  ${EVENT}
2143
2251
  `;
2144
- var DELETE_EVENT_MUTATION = import_client22.gql`
2252
+ var DELETE_EVENT_MUTATION = import_client23.gql`
2145
2253
  mutation deleteEvent($_id: ID!) {
2146
2254
  deleteEvent(_id: $_id) {
2147
2255
  data
@@ -2149,7 +2257,7 @@ var DELETE_EVENT_MUTATION = import_client22.gql`
2149
2257
  }
2150
2258
  }
2151
2259
  `;
2152
- var CREATE_EVENT_INFO_MUTATION = import_client22.gql`
2260
+ var CREATE_EVENT_INFO_MUTATION = import_client23.gql`
2153
2261
  mutation createEventInfo($input: EventInfoInputType!) {
2154
2262
  createEventInfo(input: $input) {
2155
2263
  data {
@@ -2160,7 +2268,7 @@ var CREATE_EVENT_INFO_MUTATION = import_client22.gql`
2160
2268
  }
2161
2269
  ${EVENT_INFO}
2162
2270
  `;
2163
- var UPDATE_EVENT_INFO_MUTATION = import_client22.gql`
2271
+ var UPDATE_EVENT_INFO_MUTATION = import_client23.gql`
2164
2272
  mutation updateEventInfo($_id: ID!, $input: EventInfoInputType!) {
2165
2273
  updateEventInfo(_id: $_id, input: $input) {
2166
2274
  data {
@@ -2172,110 +2280,6 @@ var UPDATE_EVENT_INFO_MUTATION = import_client22.gql`
2172
2280
  ${EVENT_INFO}
2173
2281
  `;
2174
2282
 
2175
- // src/graphql/queries/user.ts
2176
- var import_client23 = require("@apollo/client");
2177
- var GET_USERS = import_client23.gql`
2178
- query getUsers {
2179
- users {
2180
- ...UserFields
2181
- }
2182
- }
2183
- ${USER_FIELDS_FRAGMENT}
2184
- `;
2185
- var GET_USER = import_client23.gql`
2186
- query getUser($_id: ID!) {
2187
- user(_id: $_id) {
2188
- ...UserFields
2189
- }
2190
- }
2191
- ${USER_FIELDS_FRAGMENT}
2192
- `;
2193
- var GET_USER_EVENTS = import_client23.gql`
2194
- query getUserEvents {
2195
- userEvents {
2196
- ...EventFields
2197
- }
2198
- }
2199
- ${EVENT}
2200
- `;
2201
- var GET_USER_VENDORS = import_client23.gql`
2202
- query getUserVendors {
2203
- userVendors {
2204
- ...VendorFields
2205
- }
2206
- }
2207
- ${VENDOR}
2208
- `;
2209
- var GET_USER_PARTNERS = import_client23.gql`
2210
- query getUserPartners {
2211
- userPartners {
2212
- ...PartnerFields
2213
- }
2214
- }
2215
- ${PARTNER}
2216
- `;
2217
- var GET_USER_ACTIVITIES = import_client23.gql`
2218
- query getUserActivities {
2219
- userActivities {
2220
- favourites {
2221
- events {
2222
- ...EventListItemFields
2223
- }
2224
- partners {
2225
- ...PartnerFields
2226
- }
2227
- vendors {
2228
- ...VendorFields
2229
- }
2230
- }
2231
- going {
2232
- events {
2233
- ...EventListItemFields
2234
- }
2235
- }
2236
- interested {
2237
- events {
2238
- ...EventListItemFields
2239
- }
2240
- }
2241
- present {
2242
- events {
2243
- ...EventListItemFields
2244
- }
2245
- }
2246
- }
2247
- }
2248
- ${EVENT_LIST_ITEM}
2249
- ${VENDOR}
2250
- ${PARTNER}
2251
- `;
2252
- var GET_USER_RESOURCES = import_client23.gql`
2253
- query getUserResources($userId: ID!) {
2254
- userResources(userId: $userId) {
2255
- resources {
2256
- _id
2257
- logo
2258
- name
2259
- resourceType
2260
- }
2261
- }
2262
- }
2263
- `;
2264
- var GET_USERS_BY_PROMO_CODE = import_client23.gql`
2265
- query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
2266
- usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
2267
- active
2268
- avatar {
2269
- ...ResourceImageFields
2270
- }
2271
- deletedAt
2272
- nickName
2273
- userId
2274
- }
2275
- }
2276
- ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
2277
- `;
2278
-
2279
2283
  // src/graphql/hooks/event/hooksMutation.ts
2280
2284
  var useCreateEvent = () => {
2281
2285
  const [createEvent, { loading, error }] = (0, import_client24.useMutation)(CREATE_EVENT_MUTATION, {
@@ -2364,14 +2368,6 @@ var useUpdateEventInfo = () => {
2364
2368
 
2365
2369
  // src/graphql/hooks/event/hooksQuery.ts
2366
2370
  var import_client25 = require("@apollo/client");
2367
- var useGetEvents = (dateStatus) => {
2368
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_EVENTS, {
2369
- fetchPolicy: "network-only",
2370
- variables: { dateStatus }
2371
- });
2372
- const events = data?.events || [];
2373
- return { error, events, loading, refetch };
2374
- };
2375
2371
  var useGetEvent = (_id) => {
2376
2372
  const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_EVENT, {
2377
2373
  fetchPolicy: "network-only",
@@ -2420,10 +2416,10 @@ var useGetEventsByRegion = (region, options, dateStatus, tags) => {
2420
2416
  refetch
2421
2417
  };
2422
2418
  };
2423
- var useSearchEvents = (region, searchQuery, tags, dateStatus) => {
2424
- const normalizedSearch = searchQuery?.trim() ?? "";
2419
+ var useSearchEvents = (search, region, tags, dateStatus) => {
2420
+ const normalizedSearch = search.trim();
2425
2421
  const normalizedTags = (tags ?? []).filter(Boolean);
2426
- const shouldRunQuery = normalizedSearch.length > 3 || normalizedTags.length > 0;
2422
+ const shouldRunQuery = normalizedSearch.length >= 3 || normalizedTags.length > 0;
2427
2423
  const { loading, error, data, refetch } = (0, import_client25.useQuery)(SEARCH_EVENTS, {
2428
2424
  fetchPolicy: "network-only",
2429
2425
  skip: !shouldRunQuery,
@@ -3043,21 +3039,6 @@ var useActivateVendorClaim = () => {
3043
3039
 
3044
3040
  // src/graphql/hooks/vendor/hooksQuery.ts
3045
3041
  var import_client40 = require("@apollo/client");
3046
- var useGetVendors = () => {
3047
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(
3048
- GET_VENDORS,
3049
- {
3050
- fetchPolicy: "network-only"
3051
- }
3052
- );
3053
- const vendors = data?.vendors || [];
3054
- return {
3055
- error,
3056
- loading,
3057
- refetch,
3058
- vendors
3059
- };
3060
- };
3061
3042
  var useGetVendor = (_id) => {
3062
3043
  const { loading, error, data, refetch } = (0, import_client40.useQuery)(
3063
3044
  GET_VENDOR,
@@ -3089,10 +3070,11 @@ var useGetVendorsByRegion = (region, options) => {
3089
3070
  };
3090
3071
  };
3091
3072
  var useSearchVendors = (search, region) => {
3073
+ const normalizedSearch = search.trim();
3092
3074
  const { loading, error, data, refetch } = (0, import_client40.useQuery)(SEARCH_VENDORS, {
3093
3075
  fetchPolicy: "network-only",
3094
- skip: search.length < 3,
3095
- variables: { region, search }
3076
+ skip: normalizedSearch.length < 3,
3077
+ variables: { region, search: normalizedSearch }
3096
3078
  });
3097
3079
  const vendorSearch = data?.vendorSearch || [];
3098
3080
  return { error, loading, refetch, vendorSearch };
@@ -3426,16 +3408,6 @@ var useSelectStandardPackage = () => {
3426
3408
 
3427
3409
  // src/graphql/hooks/user/hooksQuery.ts
3428
3410
  var import_client43 = require("@apollo/client");
3429
- var useGetUsers = () => {
3430
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(
3431
- GET_USERS,
3432
- {
3433
- fetchPolicy: "network-only"
3434
- }
3435
- );
3436
- const users = data?.users || [];
3437
- return { error, loading, refetch, users };
3438
- };
3439
3411
  var useGetUser = (_id) => {
3440
3412
  const { loading, error, data, refetch } = (0, import_client43.useQuery)(
3441
3413
  GET_USER,
@@ -3977,18 +3949,6 @@ var useDeletePartner = () => {
3977
3949
 
3978
3950
  // src/graphql/hooks/partner/hooksQuery.ts
3979
3951
  var import_client58 = require("@apollo/client");
3980
- var useGetPartners = () => {
3981
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(GET_PARTNERS, {
3982
- fetchPolicy: "network-only"
3983
- });
3984
- const partners = data?.partners || [];
3985
- return {
3986
- error,
3987
- loading,
3988
- partners,
3989
- refetch
3990
- };
3991
- };
3992
3952
  var useGetPartner = (_id) => {
3993
3953
  const { loading, error, data, refetch } = (0, import_client58.useQuery)(
3994
3954
  GET_PARTNER,
@@ -4020,10 +3980,11 @@ var useGetPartnersByRegion = (region, options) => {
4020
3980
  };
4021
3981
  };
4022
3982
  var useSearchPartners = (search, region) => {
3983
+ const normalizedSearch = search.trim();
4023
3984
  const { loading, error, data, refetch } = (0, import_client58.useQuery)(SEARCH_PARTNERS, {
4024
3985
  fetchPolicy: "network-only",
4025
- skip: search.length < 3,
4026
- variables: { region, search }
3986
+ skip: normalizedSearch.length < 3,
3987
+ variables: { region, search: normalizedSearch }
4027
3988
  });
4028
3989
  const partnersSearch = data?.partnersSearch || [];
4029
3990
  return { error, loading, partnersSearch, refetch };
@@ -4090,12 +4051,6 @@ var useDeletePost = () => {
4090
4051
 
4091
4052
  // src/graphql/hooks/post/hooksQuery.ts
4092
4053
  var import_client61 = require("@apollo/client");
4093
- var useGetPosts = () => {
4094
- const { data, loading, error, refetch } = (0, import_client61.useQuery)(GET_POSTS, {
4095
- fetchPolicy: "network-only"
4096
- });
4097
- return { error, loading, posts: data?.posts || [], refetch };
4098
- };
4099
4054
  var useGetPost = (_id) => {
4100
4055
  const { data, loading, error, refetch } = (0, import_client61.useQuery)(GET_POST, {
4101
4056
  fetchPolicy: "network-only",
@@ -4104,14 +4059,6 @@ var useGetPost = (_id) => {
4104
4059
  });
4105
4060
  return { error, loading, post: data?.post, refetch };
4106
4061
  };
4107
- var useGetPostsByType = (postType) => {
4108
- const { data, loading, error, refetch } = (0, import_client61.useQuery)(GET_POSTS_BY_TYPE, {
4109
- fetchPolicy: "network-only",
4110
- skip: !postType,
4111
- variables: { postType }
4112
- });
4113
- return { error, loading, postsByType: data?.postsByType || [], refetch };
4114
- };
4115
4062
 
4116
4063
  // src/graphql/hooks/appSettings/hooksMutation.ts
4117
4064
  var import_client64 = require("@apollo/client");
@@ -5314,19 +5261,149 @@ var useGetCoupon = (_id) => {
5314
5261
  const coupon = data?.coupon || null;
5315
5262
  return { coupon, error, loading, refetch };
5316
5263
  };
5264
+
5265
+ // src/graphql/hooks/usePaginatedList.ts
5266
+ var import_client86 = require("@apollo/client");
5267
+ var import_react = require("react");
5268
+
5269
+ // src/utils/pagination.ts
5270
+ var DEFAULT_PAGE_SIZE = 50;
5271
+ function defaultGetId(item) {
5272
+ const id = item?._id;
5273
+ return id != null ? String(id) : "";
5274
+ }
5275
+ function accumulateItems(items, page, getId) {
5276
+ if (page.length === 0) {
5277
+ return items;
5278
+ }
5279
+ const seen = /* @__PURE__ */ new Set();
5280
+ for (const item of items) {
5281
+ const id = getId(item);
5282
+ if (id !== "") {
5283
+ seen.add(id);
5284
+ }
5285
+ }
5286
+ const fresh = page.filter((item) => {
5287
+ const id = getId(item);
5288
+ if (id === "") {
5289
+ return true;
5290
+ }
5291
+ if (seen.has(id)) {
5292
+ return false;
5293
+ }
5294
+ seen.add(id);
5295
+ return true;
5296
+ });
5297
+ return fresh.length === 0 ? items : [...items, ...fresh];
5298
+ }
5299
+
5300
+ // src/graphql/hooks/usePaginatedList.ts
5301
+ function usePaginatedList({
5302
+ document,
5303
+ getItems,
5304
+ variables,
5305
+ skip = false,
5306
+ pageSize = DEFAULT_PAGE_SIZE,
5307
+ getId = defaultGetId
5308
+ }) {
5309
+ if (!Number.isInteger(pageSize) || pageSize <= 0) {
5310
+ throw new Error(
5311
+ `usePaginatedList: pageSize must be a positive integer, received ${String(pageSize)}.`
5312
+ );
5313
+ }
5314
+ const [offset, setOffset] = (0, import_react.useState)(0);
5315
+ const [items, setItems] = (0, import_react.useState)([]);
5316
+ const [hasMore, setHasMore] = (0, import_react.useState)(!skip);
5317
+ const [hasSettled, setHasSettled] = (0, import_react.useState)(false);
5318
+ const variablesKey = JSON.stringify(variables ?? null);
5319
+ (0, import_react.useEffect)(() => {
5320
+ setItems([]);
5321
+ setHasMore(!skip);
5322
+ setHasSettled(false);
5323
+ setOffset(0);
5324
+ }, [variablesKey, pageSize, skip]);
5325
+ const { data, loading, error, refetch } = (0, import_client86.useQuery)(document, {
5326
+ fetchPolicy: "network-only",
5327
+ skip,
5328
+ variables: { ...variables, options: { limit: pageSize + 1, offset } }
5329
+ });
5330
+ const rawPage = getItems(data);
5331
+ const page = rawPage.length > pageSize ? rawPage.slice(0, pageSize) : rawPage;
5332
+ const hasMorePage = rawPage.length > pageSize;
5333
+ (0, import_react.useEffect)(() => {
5334
+ if (loading || skip || error) {
5335
+ return;
5336
+ }
5337
+ setItems((prev) => {
5338
+ if (!hasSettled) {
5339
+ if (page.length === 0 && prev.length === 0) {
5340
+ return prev;
5341
+ }
5342
+ return page;
5343
+ }
5344
+ return accumulateItems(prev, page, getId);
5345
+ });
5346
+ setHasSettled(true);
5347
+ setHasMore(hasMorePage);
5348
+ }, [loading, skip, error, page, hasMorePage, hasSettled, pageSize, getId]);
5349
+ const loadMore = (0, import_react.useCallback)(() => {
5350
+ if (loading || skip) {
5351
+ return;
5352
+ }
5353
+ if (error) {
5354
+ void refetch();
5355
+ return;
5356
+ }
5357
+ if (!hasSettled) {
5358
+ return;
5359
+ }
5360
+ if (!hasMore) {
5361
+ return;
5362
+ }
5363
+ setOffset(offset + pageSize);
5364
+ }, [loading, skip, error, hasSettled, hasMore, offset, pageSize, refetch]);
5365
+ const refresh = (0, import_react.useCallback)(() => {
5366
+ setItems([]);
5367
+ setHasMore(!skip);
5368
+ setHasSettled(false);
5369
+ setOffset(0);
5370
+ if (skip) {
5371
+ return Promise.resolve();
5372
+ }
5373
+ return refetch({
5374
+ ...variables,
5375
+ options: { limit: pageSize + 1, offset: 0 }
5376
+ });
5377
+ }, [refetch, variables, pageSize, skip]);
5378
+ return {
5379
+ error,
5380
+ hasMore,
5381
+ items,
5382
+ loading: loading && !hasSettled,
5383
+ loadingMore: loading && hasSettled,
5384
+ loadMore,
5385
+ refresh
5386
+ };
5387
+ }
5317
5388
  // Annotate the CommonJS export names for ESM import in node:
5318
5389
  0 && (module.exports = {
5319
5390
  ACTIVATE_VENDOR_CLAIM_MUTATION,
5320
5391
  GET_EVENT,
5392
+ GET_EVENTS,
5321
5393
  GET_EVENT_BY_SLUG,
5322
5394
  GET_EVENT_INFO,
5323
5395
  GET_OWNED_EVENT,
5324
5396
  GET_PARTNER,
5397
+ GET_PARTNERS,
5325
5398
  GET_PARTNER_BY_SLUG,
5326
5399
  GET_POST,
5400
+ GET_POSTS,
5401
+ GET_POSTS_BY_TYPE,
5327
5402
  GET_POST_BY_SLUG,
5328
5403
  GET_RESOURCE_CONNECTIONS,
5404
+ GET_USERS,
5329
5405
  GET_VENDOR,
5406
+ GET_VENDORS,
5330
5407
  GET_VENDOR_BY_SLUG,
5331
5408
  GET_VENDOR_INFO,
5332
5409
  MY_PENDING_VENDOR_CLAIM,
@@ -5395,7 +5472,6 @@ var useGetCoupon = (_id) => {
5395
5472
  useGetEventByPlaceId,
5396
5473
  useGetEventInfo,
5397
5474
  useGetEventRelations,
5398
- useGetEvents,
5399
5475
  useGetEventsByRegion,
5400
5476
  useGetEventsNearMe,
5401
5477
  useGetGame,
@@ -5405,11 +5481,8 @@ var useGetCoupon = (_id) => {
5405
5481
  useGetNotificationCountSubscription,
5406
5482
  useGetOwnedEvent,
5407
5483
  useGetPartner,
5408
- useGetPartners,
5409
5484
  useGetPartnersByRegion,
5410
5485
  useGetPost,
5411
- useGetPosts,
5412
- useGetPostsByType,
5413
5486
  useGetPrivateChats,
5414
5487
  useGetRelation,
5415
5488
  useGetRelationByEventAndVendor,
@@ -5432,12 +5505,10 @@ var useGetCoupon = (_id) => {
5432
5505
  useGetUserPartners,
5433
5506
  useGetUserResources,
5434
5507
  useGetUserVendors,
5435
- useGetUsers,
5436
5508
  useGetUsersByPromoCode,
5437
5509
  useGetVendor,
5438
5510
  useGetVendorInfo,
5439
5511
  useGetVendorRelations,
5440
- useGetVendors,
5441
5512
  useGetVendorsByRegion,
5442
5513
  useLeaveGame,
5443
5514
  useLogin,
@@ -5446,6 +5517,7 @@ var useGetCoupon = (_id) => {
5446
5517
  useMarkChatMessagesSeen,
5447
5518
  useMarkNotificationRead,
5448
5519
  useMyPendingVendorClaim,
5520
+ usePaginatedList,
5449
5521
  useRedeemAffiliateReward,
5450
5522
  useRedeemReward,
5451
5523
  useRefreshToken,