@timardex/cluemart-shared 1.7.90 → 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 (67) hide show
  1. package/dist/{ad-BX_Da-0Q.d.ts → ad-C7jlZyUd.d.ts} +2 -2
  2. package/dist/{ad-MA6buSLw.d.mts → ad-tNoTBv3n.d.mts} +2 -2
  3. package/dist/{affiliate-Cb8BLoQc.d.mts → affiliate-BL1ZN-4t.d.mts} +2 -2
  4. package/dist/{affiliate-DXpSgV4o.d.ts → affiliate-DStyY84o.d.ts} +2 -2
  5. package/dist/auth/index.cjs +18 -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/{billingCatalog-Bca0IZG_.d.mts → billingCatalog-DDAU9BWV.d.mts} +1 -1
  11. package/dist/{billingCatalog-Rh9yvue3.d.ts → billingCatalog-oWAfZX95.d.ts} +1 -1
  12. package/dist/chunk-7DQBUZXY.mjs +41 -0
  13. package/dist/chunk-7DQBUZXY.mjs.map +1 -0
  14. package/dist/{chunk-TD52IH52.mjs → chunk-JJQL6LZE.mjs} +1 -1
  15. package/dist/chunk-JJQL6LZE.mjs.map +1 -0
  16. package/dist/{chunk-D3U4LBOQ.mjs → chunk-L3SNS6OJ.mjs} +2 -2
  17. package/dist/{chunk-GA6E5NK3.mjs → chunk-OUWKLNHZ.mjs} +21 -23
  18. package/dist/chunk-OUWKLNHZ.mjs.map +1 -0
  19. package/dist/{chunk-6VTX7IPF.mjs → chunk-XPUYQ7GB.mjs} +150 -86
  20. package/dist/chunk-XPUYQ7GB.mjs.map +1 -0
  21. package/dist/{contactUs-TEAbhwp9.d.mts → contactUs-BYm-iDIH.d.mts} +1 -1
  22. package/dist/{contactUs-Dm-0Qua3.d.ts → contactUs-_BHRXUrv.d.ts} +1 -1
  23. package/dist/formFields/index.cjs.map +1 -1
  24. package/dist/formFields/index.d.mts +1 -1
  25. package/dist/formFields/index.d.ts +1 -1
  26. package/dist/formFields/index.mjs +3 -2
  27. package/dist/{global-CDYmiqmd.d.mts → global-C7-KDYqg.d.mts} +6 -3
  28. package/dist/{global-DTXnm4Ok.d.ts → global-D_et_d2Y.d.ts} +6 -3
  29. package/dist/graphql/index.cjs +389 -290
  30. package/dist/graphql/index.cjs.map +1 -1
  31. package/dist/graphql/index.d.mts +59 -70
  32. package/dist/graphql/index.d.ts +59 -70
  33. package/dist/graphql/index.mjs +17 -14
  34. package/dist/hooks/index.cjs +233 -199
  35. package/dist/hooks/index.cjs.map +1 -1
  36. package/dist/hooks/index.d.mts +5 -5
  37. package/dist/hooks/index.d.ts +5 -5
  38. package/dist/hooks/index.mjs +5 -4
  39. package/dist/hooks/index.mjs.map +1 -1
  40. package/dist/index.cjs +398 -290
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.mts +93 -71
  43. package/dist/index.d.ts +93 -71
  44. package/dist/index.mjs +357 -254
  45. package/dist/index.mjs.map +1 -1
  46. package/dist/map/index.d.mts +1 -1
  47. package/dist/map/index.d.ts +1 -1
  48. package/dist/{resourceActivities-e3GkUqTN.d.mts → resourceActivities-BvejCLh9.d.mts} +2 -2
  49. package/dist/{resourceActivities-CAr2chXT.d.ts → resourceActivities-Smsl03Je.d.ts} +2 -2
  50. package/dist/sharing/index.d.mts +1 -1
  51. package/dist/sharing/index.d.ts +1 -1
  52. package/dist/types/index.cjs.map +1 -1
  53. package/dist/types/index.d.mts +8 -8
  54. package/dist/types/index.d.ts +8 -8
  55. package/dist/types/index.mjs +1 -1
  56. package/dist/{user-D6Mt35k0.d.ts → user-BA7TT2yB.d.mts} +20 -6
  57. package/dist/{user-BTzwLwJl.d.mts → user-nHjaLZoG.d.ts} +20 -6
  58. package/dist/utils/index.cjs +42 -0
  59. package/dist/utils/index.cjs.map +1 -1
  60. package/dist/utils/index.d.mts +21 -5
  61. package/dist/utils/index.d.ts +21 -5
  62. package/dist/utils/index.mjs +12 -2
  63. package/package.json +4 -1
  64. package/dist/chunk-6VTX7IPF.mjs.map +0 -1
  65. package/dist/chunk-GA6E5NK3.mjs.map +0 -1
  66. package/dist/chunk-TD52IH52.mjs.map +0 -1
  67. /package/dist/{chunk-D3U4LBOQ.mjs.map → chunk-L3SNS6OJ.mjs.map} +0 -0
package/dist/index.cjs CHANGED
@@ -42,6 +42,7 @@ __export(index_exports, {
42
42
  CLUEMART_MAIN_DOMAIN_URL: () => CLUEMART_MAIN_DOMAIN_URL,
43
43
  CM_AFFILIATE_PROMO_CODE: () => CM_AFFILIATE_PROMO_CODE,
44
44
  CM_SCHOOL_PROMO_CODE: () => CM_SCHOOL_PROMO_CODE,
45
+ DEFAULT_PAGE_SIZE: () => DEFAULT_PAGE_SIZE,
45
46
  DEFAULT_RESOURCES_RETURN_LIMIT: () => DEFAULT_RESOURCES_RETURN_LIMIT,
46
47
  DEFAULT_RESOURCES_RETURN_OFFSET: () => DEFAULT_RESOURCES_RETURN_OFFSET,
47
48
  DEFAULT_SHARE_OG_IMAGE: () => DEFAULT_SHARE_OG_IMAGE,
@@ -84,15 +85,21 @@ __export(index_exports, {
84
85
  EnumVendorType: () => EnumVendorType,
85
86
  EnumVerificationType: () => EnumVerificationType,
86
87
  GET_EVENT: () => GET_EVENT,
88
+ GET_EVENTS: () => GET_EVENTS,
87
89
  GET_EVENT_BY_SLUG: () => GET_EVENT_BY_SLUG,
88
90
  GET_EVENT_INFO: () => GET_EVENT_INFO,
89
91
  GET_OWNED_EVENT: () => GET_OWNED_EVENT,
90
92
  GET_PARTNER: () => GET_PARTNER,
93
+ GET_PARTNERS: () => GET_PARTNERS,
91
94
  GET_PARTNER_BY_SLUG: () => GET_PARTNER_BY_SLUG,
92
95
  GET_POST: () => GET_POST,
96
+ GET_POSTS: () => GET_POSTS,
97
+ GET_POSTS_BY_TYPE: () => GET_POSTS_BY_TYPE,
93
98
  GET_POST_BY_SLUG: () => GET_POST_BY_SLUG,
94
99
  GET_RESOURCE_CONNECTIONS: () => GET_RESOURCE_CONNECTIONS,
100
+ GET_USERS: () => GET_USERS,
95
101
  GET_VENDOR: () => GET_VENDOR,
102
+ GET_VENDORS: () => GET_VENDORS,
96
103
  GET_VENDOR_BY_SLUG: () => GET_VENDOR_BY_SLUG,
97
104
  GET_VENDOR_INFO: () => GET_VENDOR_INFO,
98
105
  IMAGE_EXTENSION: () => IMAGE_EXTENSION,
@@ -149,6 +156,7 @@ __export(index_exports, {
149
156
  TIER_FROM_LICENCE: () => TIER_FROM_LICENCE,
150
157
  USER_STORAGE_KEY: () => USER_STORAGE_KEY,
151
158
  WILDCARD_PERMISSION: () => WILDCARD_PERMISSION,
159
+ accumulateItems: () => accumulateItems,
152
160
  appendShareMoreInfoLine: () => appendShareMoreInfoLine,
153
161
  availableCategories: () => availableCategories,
154
162
  availableRegionOptions: () => availableRegionOptions,
@@ -182,10 +190,12 @@ __export(index_exports, {
182
190
  collectVendorEventRelationDateTimes: () => collectVendorEventRelationDateTimes,
183
191
  companyContactFields: () => companyContactFields,
184
192
  computeDailyClueState: () => computeDailyClueState,
193
+ computeHasMore: () => computeHasMore,
185
194
  contactUsFields: () => contactUsFields,
186
195
  createAffiliateReward: () => createAffiliateReward,
187
196
  darkColors: () => darkColors,
188
197
  dateFormat: () => dateFormat,
198
+ defaultGetId: () => defaultGetId,
189
199
  emailField: () => emailField,
190
200
  eventBasicInfoFields: () => eventBasicInfoFields,
191
201
  eventEndDateFields: () => eventEndDateFields,
@@ -390,7 +400,6 @@ __export(index_exports, {
390
400
  useGetEventByPlaceId: () => useGetEventByPlaceId,
391
401
  useGetEventInfo: () => useGetEventInfo,
392
402
  useGetEventRelations: () => useGetEventRelations,
393
- useGetEvents: () => useGetEvents,
394
403
  useGetEventsByRegion: () => useGetEventsByRegion,
395
404
  useGetEventsNearMe: () => useGetEventsNearMe,
396
405
  useGetGame: () => useGetGame,
@@ -400,11 +409,8 @@ __export(index_exports, {
400
409
  useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
401
410
  useGetOwnedEvent: () => useGetOwnedEvent,
402
411
  useGetPartner: () => useGetPartner,
403
- useGetPartners: () => useGetPartners,
404
412
  useGetPartnersByRegion: () => useGetPartnersByRegion,
405
413
  useGetPost: () => useGetPost,
406
- useGetPosts: () => useGetPosts,
407
- useGetPostsByType: () => useGetPostsByType,
408
414
  useGetPrivateChats: () => useGetPrivateChats,
409
415
  useGetRelation: () => useGetRelation,
410
416
  useGetRelationByEventAndVendor: () => useGetRelationByEventAndVendor,
@@ -427,12 +433,10 @@ __export(index_exports, {
427
433
  useGetUserPartners: () => useGetUserPartners,
428
434
  useGetUserResources: () => useGetUserResources,
429
435
  useGetUserVendors: () => useGetUserVendors,
430
- useGetUsers: () => useGetUsers,
431
436
  useGetUsersByPromoCode: () => useGetUsersByPromoCode,
432
437
  useGetVendor: () => useGetVendor,
433
438
  useGetVendorInfo: () => useGetVendorInfo,
434
439
  useGetVendorRelations: () => useGetVendorRelations,
435
- useGetVendors: () => useGetVendors,
436
440
  useGetVendorsByRegion: () => useGetVendorsByRegion,
437
441
  useLeaveGame: () => useLeaveGame,
438
442
  useLogin: () => useLogin,
@@ -441,6 +445,7 @@ __export(index_exports, {
441
445
  useMarkChatMessagesSeen: () => useMarkChatMessagesSeen,
442
446
  useMarkNotificationRead: () => useMarkNotificationRead,
443
447
  useMyPendingVendorClaim: () => useMyPendingVendorClaim,
448
+ usePaginatedList: () => usePaginatedList,
444
449
  useRedeemAffiliateReward: () => useRedeemAffiliateReward,
445
450
  useRedeemReward: () => useRedeemReward,
446
451
  useRefreshToken: () => useRefreshToken,
@@ -1249,6 +1254,40 @@ function computeDailyClueState(dailyClue) {
1249
1254
  };
1250
1255
  }
1251
1256
 
1257
+ // src/utils/pagination.ts
1258
+ var DEFAULT_PAGE_SIZE = 50;
1259
+ function defaultGetId(item) {
1260
+ const id = item?._id;
1261
+ return id != null ? String(id) : "";
1262
+ }
1263
+ function accumulateItems(items, page, getId) {
1264
+ if (page.length === 0) {
1265
+ return items;
1266
+ }
1267
+ const seen = /* @__PURE__ */ new Set();
1268
+ for (const item of items) {
1269
+ const id = getId(item);
1270
+ if (id !== "") {
1271
+ seen.add(id);
1272
+ }
1273
+ }
1274
+ const fresh = page.filter((item) => {
1275
+ const id = getId(item);
1276
+ if (id === "") {
1277
+ return true;
1278
+ }
1279
+ if (seen.has(id)) {
1280
+ return false;
1281
+ }
1282
+ seen.add(id);
1283
+ return true;
1284
+ });
1285
+ return fresh.length === 0 ? items : [...items, ...fresh];
1286
+ }
1287
+ function computeHasMore(pageLength, pageSize) {
1288
+ return pageLength === pageSize;
1289
+ }
1290
+
1252
1291
  // src/sharing/relationShareTypes.ts
1253
1292
  var RELATION_SHARE_INVITATION = "invitation";
1254
1293
  var RELATION_SHARE_APPLICATION = "application";
@@ -4039,12 +4078,19 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = import_client.gql`
4039
4078
  `;
4040
4079
  var STRIPE_FIELDS_FRAGMENT = import_client.gql`
4041
4080
  fragment StripeSubscriptionFields on StripeSubscriptionType {
4081
+ billingPeriod
4082
+ cancelAtPeriodEnd
4042
4083
  customerId
4043
4084
  subscriptionId
4044
4085
  status
4045
4086
  currentPlan
4046
4087
  startDate
4047
4088
  endDate
4089
+ pendingPlan
4090
+ pendingBillingPeriod
4091
+ pendingChangeEffectiveAt
4092
+ priceId
4093
+ scheduleId
4048
4094
  }
4049
4095
  `;
4050
4096
  var USER_FIELDS_FRAGMENT = import_client.gql`
@@ -4323,8 +4369,11 @@ var EVENT = import_client2.gql`
4323
4369
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
4324
4370
  `;
4325
4371
  var GET_EVENTS = import_client2.gql`
4326
- query getEvents($dateStatus: EventDateStatusEnumType) {
4327
- events(dateStatus: $dateStatus) {
4372
+ query getEvents(
4373
+ $dateStatus: EventDateStatusEnumType
4374
+ $options: PaginationOptions
4375
+ ) {
4376
+ events(dateStatus: $dateStatus, options: $options) {
4328
4377
  ...EventListItemFields
4329
4378
  }
4330
4379
  }
@@ -4629,8 +4678,8 @@ var UNREGISTERED_VENDOR = import_client3.gql`
4629
4678
  ${UNREGISTERED_VENDOR_INVITATION_FRAGMENT}
4630
4679
  `;
4631
4680
  var GET_VENDORS = import_client3.gql`
4632
- query getVendors {
4633
- vendors {
4681
+ query getVendors($options: PaginationOptions) {
4682
+ vendors(options: $options) {
4634
4683
  ...VendorFields
4635
4684
  }
4636
4685
  }
@@ -4873,8 +4922,8 @@ var PARTNER = import_client5.gql`
4873
4922
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
4874
4923
  `;
4875
4924
  var GET_PARTNERS = import_client5.gql`
4876
- query getPartners {
4877
- partners {
4925
+ query getPartners($options: PaginationOptions) {
4926
+ partners(options: $options) {
4878
4927
  ...PartnerFields
4879
4928
  }
4880
4929
  }
@@ -5090,8 +5139,8 @@ var POST_FIELDS_FRAGMENT = import_client8.gql`
5090
5139
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
5091
5140
  `;
5092
5141
  var GET_POSTS = import_client8.gql`
5093
- query getPosts {
5094
- posts {
5142
+ query getPosts($options: PaginationOptions) {
5143
+ posts(options: $options) {
5095
5144
  ...PostFields
5096
5145
  }
5097
5146
  }
@@ -5106,38 +5155,142 @@ var GET_POST = import_client8.gql`
5106
5155
  ${POST_FIELDS_FRAGMENT}
5107
5156
  `;
5108
5157
  var GET_POSTS_BY_TYPE = import_client8.gql`
5109
- query getPostsByType($postType: PostTypeEnum!) {
5110
- postsByType(postType: $postType) {
5158
+ query getPostsByType($postType: PostTypeEnum!, $options: PaginationOptions) {
5159
+ postsByType(postType: $postType, options: $options) {
5111
5160
  ...PostFields
5112
5161
  }
5113
5162
  }
5114
5163
  ${POST_FIELDS_FRAGMENT}
5115
5164
  `;
5116
5165
 
5117
- // src/graphql/queries/shareSlug.ts
5166
+ // src/graphql/queries/user.ts
5118
5167
  var import_client9 = require("@apollo/client");
5119
- var GET_EVENT_BY_SLUG = import_client9.gql`
5168
+ var GET_USERS = import_client9.gql`
5169
+ query getUsers($options: PaginationOptions) {
5170
+ users(options: $options) {
5171
+ ...UserFields
5172
+ }
5173
+ }
5174
+ ${USER_FIELDS_FRAGMENT}
5175
+ `;
5176
+ var GET_USER = import_client9.gql`
5177
+ query getUser($_id: ID!) {
5178
+ user(_id: $_id) {
5179
+ ...UserFields
5180
+ }
5181
+ }
5182
+ ${USER_FIELDS_FRAGMENT}
5183
+ `;
5184
+ var GET_USER_EVENTS = import_client9.gql`
5185
+ query getUserEvents {
5186
+ userEvents {
5187
+ ...EventFields
5188
+ }
5189
+ }
5190
+ ${EVENT}
5191
+ `;
5192
+ var GET_USER_VENDORS = import_client9.gql`
5193
+ query getUserVendors {
5194
+ userVendors {
5195
+ ...VendorFields
5196
+ }
5197
+ }
5198
+ ${VENDOR}
5199
+ `;
5200
+ var GET_USER_PARTNERS = import_client9.gql`
5201
+ query getUserPartners {
5202
+ userPartners {
5203
+ ...PartnerFields
5204
+ }
5205
+ }
5206
+ ${PARTNER}
5207
+ `;
5208
+ var GET_USER_ACTIVITIES = import_client9.gql`
5209
+ query getUserActivities {
5210
+ userActivities {
5211
+ favourites {
5212
+ events {
5213
+ ...EventListItemFields
5214
+ }
5215
+ partners {
5216
+ ...PartnerFields
5217
+ }
5218
+ vendors {
5219
+ ...VendorFields
5220
+ }
5221
+ }
5222
+ going {
5223
+ events {
5224
+ ...EventListItemFields
5225
+ }
5226
+ }
5227
+ interested {
5228
+ events {
5229
+ ...EventListItemFields
5230
+ }
5231
+ }
5232
+ present {
5233
+ events {
5234
+ ...EventListItemFields
5235
+ }
5236
+ }
5237
+ }
5238
+ }
5239
+ ${EVENT_LIST_ITEM}
5240
+ ${VENDOR}
5241
+ ${PARTNER}
5242
+ `;
5243
+ var GET_USER_RESOURCES = import_client9.gql`
5244
+ query getUserResources($userId: ID!) {
5245
+ userResources(userId: $userId) {
5246
+ resources {
5247
+ _id
5248
+ logo
5249
+ name
5250
+ resourceType
5251
+ }
5252
+ }
5253
+ }
5254
+ `;
5255
+ var GET_USERS_BY_PROMO_CODE = import_client9.gql`
5256
+ query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
5257
+ usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
5258
+ active
5259
+ avatar {
5260
+ ...ResourceImageFields
5261
+ }
5262
+ deletedAt
5263
+ nickName
5264
+ userId
5265
+ }
5266
+ }
5267
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5268
+ `;
5269
+
5270
+ // src/graphql/queries/shareSlug.ts
5271
+ var import_client10 = require("@apollo/client");
5272
+ var GET_EVENT_BY_SLUG = import_client10.gql`
5120
5273
  query getEventBySlug($slug: String!) {
5121
5274
  eventBySlug(slug: $slug) {
5122
5275
  _id
5123
5276
  }
5124
5277
  }
5125
5278
  `;
5126
- var GET_VENDOR_BY_SLUG = import_client9.gql`
5279
+ var GET_VENDOR_BY_SLUG = import_client10.gql`
5127
5280
  query getVendorBySlug($slug: String!) {
5128
5281
  vendorBySlug(slug: $slug) {
5129
5282
  _id
5130
5283
  }
5131
5284
  }
5132
5285
  `;
5133
- var GET_PARTNER_BY_SLUG = import_client9.gql`
5286
+ var GET_PARTNER_BY_SLUG = import_client10.gql`
5134
5287
  query getPartnerBySlug($slug: String!) {
5135
5288
  partnerBySlug(slug: $slug) {
5136
5289
  _id
5137
5290
  }
5138
5291
  }
5139
5292
  `;
5140
- var GET_POST_BY_SLUG = import_client9.gql`
5293
+ var GET_POST_BY_SLUG = import_client10.gql`
5141
5294
  query getPostBySlug($slug: String!, $postType: PostTypeEnum!) {
5142
5295
  postBySlug(slug: $slug, postType: $postType) {
5143
5296
  _id
@@ -5146,8 +5299,8 @@ var GET_POST_BY_SLUG = import_client9.gql`
5146
5299
  `;
5147
5300
 
5148
5301
  // src/graphql/queries/relation.ts
5149
- var import_client10 = require("@apollo/client");
5150
- var RELATION_FIELDS_FRAGMENT = import_client10.gql`
5302
+ var import_client11 = require("@apollo/client");
5303
+ var RELATION_FIELDS_FRAGMENT = import_client11.gql`
5151
5304
  fragment RelationFields on RelationType {
5152
5305
  _id
5153
5306
  active
@@ -5164,7 +5317,7 @@ var RELATION_FIELDS_FRAGMENT = import_client10.gql`
5164
5317
  }
5165
5318
  ${RELATION_DATES_FRAGMENT}
5166
5319
  `;
5167
- var GET_RELATION = import_client10.gql`
5320
+ var GET_RELATION = import_client11.gql`
5168
5321
  query getRelation($_id: ID!) {
5169
5322
  relation(_id: $_id) {
5170
5323
  ...RelationFields
@@ -5172,7 +5325,7 @@ var GET_RELATION = import_client10.gql`
5172
5325
  }
5173
5326
  ${RELATION_FIELDS_FRAGMENT}
5174
5327
  `;
5175
- var GET_RELATION_BY_EVENT_AND_VENDOR = import_client10.gql`
5328
+ var GET_RELATION_BY_EVENT_AND_VENDOR = import_client11.gql`
5176
5329
  query getRelationByEventAndVendor($eventId: ID!, $vendorId: ID!) {
5177
5330
  relationByEventAndVendor(eventId: $eventId, vendorId: $vendorId) {
5178
5331
  ...RelationFields
@@ -5180,7 +5333,7 @@ var GET_RELATION_BY_EVENT_AND_VENDOR = import_client10.gql`
5180
5333
  }
5181
5334
  ${RELATION_FIELDS_FRAGMENT}
5182
5335
  `;
5183
- var GET_EVENT_RELATIONS = import_client10.gql`
5336
+ var GET_EVENT_RELATIONS = import_client11.gql`
5184
5337
  query getEventRelations($eventId: ID!) {
5185
5338
  eventRelations(eventId: $eventId) {
5186
5339
  ...RelationFields
@@ -5188,7 +5341,7 @@ var GET_EVENT_RELATIONS = import_client10.gql`
5188
5341
  }
5189
5342
  ${RELATION_FIELDS_FRAGMENT}
5190
5343
  `;
5191
- var GET_VENDOR_RELATIONS = import_client10.gql`
5344
+ var GET_VENDOR_RELATIONS = import_client11.gql`
5192
5345
  query getVendorRelations($vendorId: ID!) {
5193
5346
  vendorRelations(vendorId: $vendorId) {
5194
5347
  ...RelationFields
@@ -5196,7 +5349,7 @@ var GET_VENDOR_RELATIONS = import_client10.gql`
5196
5349
  }
5197
5350
  ${RELATION_FIELDS_FRAGMENT}
5198
5351
  `;
5199
- var GET_RESOURCE_CONNECTIONS = import_client10.gql`
5352
+ var GET_RESOURCE_CONNECTIONS = import_client11.gql`
5200
5353
  query getResourceConnections(
5201
5354
  $resourceId: ID!
5202
5355
  $resourceType: ResourceTypeEnum!
@@ -5221,11 +5374,11 @@ function toGraphqlQueryString(query) {
5221
5374
  }
5222
5375
 
5223
5376
  // src/graphql/hooks/admin/hooksMutation.ts
5224
- var import_client12 = require("@apollo/client");
5377
+ var import_client13 = require("@apollo/client");
5225
5378
 
5226
5379
  // src/graphql/mutations/admin.ts
5227
- var import_client11 = require("@apollo/client");
5228
- var ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = import_client11.gql`
5380
+ var import_client12 = require("@apollo/client");
5381
+ var ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = import_client12.gql`
5229
5382
  mutation adminUpdateResourceType($input: AdminUpdateResourceInputType!) {
5230
5383
  adminUpdateResourceType(input: $input) {
5231
5384
  data {
@@ -5237,7 +5390,7 @@ var ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = import_client11.gql`
5237
5390
  }
5238
5391
  }
5239
5392
  `;
5240
- var ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = import_client11.gql`
5393
+ var ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = import_client12.gql`
5241
5394
  mutation adminResendUserVerificationEmail($userId: ID!) {
5242
5395
  adminResendUserVerificationEmail(userId: $userId) {
5243
5396
  data
@@ -5245,7 +5398,7 @@ var ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = import_client11.gql`
5245
5398
  }
5246
5399
  }
5247
5400
  `;
5248
- var ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION = import_client11.gql`
5401
+ var ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION = import_client12.gql`
5249
5402
  mutation adminPermanentlyDeleteResource(
5250
5403
  $resourceId: ID!
5251
5404
  $resourceType: ResourceTypeEnum!
@@ -5262,7 +5415,7 @@ var ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION = import_client11.gql`
5262
5415
 
5263
5416
  // src/graphql/hooks/admin/hooksMutation.ts
5264
5417
  var useAdminUpdateResourceType = () => {
5265
- const [adminUpdateResourceType, { loading, error }] = (0, import_client12.useMutation)(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {
5418
+ const [adminUpdateResourceType, { loading, error }] = (0, import_client13.useMutation)(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {
5266
5419
  awaitRefetchQueries: true,
5267
5420
  refetchQueries: (mutationResult) => {
5268
5421
  const adminUpdateResourceType2 = mutationResult?.data?.adminUpdateResourceType?.data;
@@ -5285,7 +5438,7 @@ var useAdminUpdateResourceType = () => {
5285
5438
  };
5286
5439
  };
5287
5440
  var useAdminResendUserVerificationEmail = () => {
5288
- const [adminResendUserVerificationEmail, { loading, error }] = (0, import_client12.useMutation)(ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION);
5441
+ const [adminResendUserVerificationEmail, { loading, error }] = (0, import_client13.useMutation)(ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION);
5289
5442
  return {
5290
5443
  adminResendUserVerificationEmail,
5291
5444
  error,
@@ -5293,7 +5446,7 @@ var useAdminResendUserVerificationEmail = () => {
5293
5446
  };
5294
5447
  };
5295
5448
  var useAdminPermanentlyDeleteResource = () => {
5296
- const [adminPermanentlyDeleteResource, { loading, error }] = (0, import_client12.useMutation)(ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION);
5449
+ const [adminPermanentlyDeleteResource, { loading, error }] = (0, import_client13.useMutation)(ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION);
5297
5450
  return {
5298
5451
  adminPermanentlyDeleteResource,
5299
5452
  error,
@@ -5302,11 +5455,11 @@ var useAdminPermanentlyDeleteResource = () => {
5302
5455
  };
5303
5456
 
5304
5457
  // src/graphql/hooks/auth.ts
5305
- var import_client14 = require("@apollo/client");
5458
+ var import_client15 = require("@apollo/client");
5306
5459
 
5307
5460
  // src/graphql/mutations/auth.ts
5308
- var import_client13 = require("@apollo/client");
5309
- var REGISTER_MUTATION = import_client13.gql`
5461
+ var import_client14 = require("@apollo/client");
5462
+ var REGISTER_MUTATION = import_client14.gql`
5310
5463
  mutation register($input: RegisterInputType!) {
5311
5464
  register(input: $input) {
5312
5465
  data {
@@ -5321,7 +5474,7 @@ var REGISTER_MUTATION = import_client13.gql`
5321
5474
  }
5322
5475
  ${USER_FIELDS_FRAGMENT}
5323
5476
  `;
5324
- var LOGIN_MUTATION = import_client13.gql`
5477
+ var LOGIN_MUTATION = import_client14.gql`
5325
5478
  mutation login($input: LoginInputType!) {
5326
5479
  login(input: $input) {
5327
5480
  data {
@@ -5336,7 +5489,7 @@ var LOGIN_MUTATION = import_client13.gql`
5336
5489
  }
5337
5490
  ${USER_FIELDS_FRAGMENT}
5338
5491
  `;
5339
- var LOGOUT_MUTATION = import_client13.gql`
5492
+ var LOGOUT_MUTATION = import_client14.gql`
5340
5493
  mutation logout {
5341
5494
  logout {
5342
5495
  data
@@ -5344,7 +5497,7 @@ var LOGOUT_MUTATION = import_client13.gql`
5344
5497
  }
5345
5498
  }
5346
5499
  `;
5347
- var REFRESH_TOKEN_MUTATION = import_client13.gql`
5500
+ var REFRESH_TOKEN_MUTATION = import_client14.gql`
5348
5501
  mutation refreshToken($input: RefreshTokenInputType!) {
5349
5502
  refreshToken(input: $input) {
5350
5503
  data {
@@ -5355,7 +5508,7 @@ var REFRESH_TOKEN_MUTATION = import_client13.gql`
5355
5508
  }
5356
5509
  }
5357
5510
  `;
5358
- var RESET_PASSWORD_MUTATION = import_client13.gql`
5511
+ var RESET_PASSWORD_MUTATION = import_client14.gql`
5359
5512
  mutation resetPassword($input: ResetPasswordInputType!) {
5360
5513
  resetPassword(input: $input) {
5361
5514
  data
@@ -5363,7 +5516,7 @@ var RESET_PASSWORD_MUTATION = import_client13.gql`
5363
5516
  }
5364
5517
  }
5365
5518
  `;
5366
- var REQUEST_PASSWORD_RESET_MUTATION = import_client13.gql`
5519
+ var REQUEST_PASSWORD_RESET_MUTATION = import_client14.gql`
5367
5520
  mutation requestPasswordReset($input: RequestPasswordResetInputType!) {
5368
5521
  requestPasswordReset(input: $input) {
5369
5522
  data
@@ -5371,7 +5524,7 @@ var REQUEST_PASSWORD_RESET_MUTATION = import_client13.gql`
5371
5524
  }
5372
5525
  }
5373
5526
  `;
5374
- var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client13.gql`
5527
+ var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client14.gql`
5375
5528
  mutation validateVerificationToken(
5376
5529
  $input: ValidateVerificationTokenInputType!
5377
5530
  ) {
@@ -5384,43 +5537,43 @@ var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client13.gql`
5384
5537
 
5385
5538
  // src/graphql/hooks/auth.ts
5386
5539
  var useRegister = () => {
5387
- const [register, { loading, error }] = (0, import_client14.useMutation)(REGISTER_MUTATION);
5540
+ const [register, { loading, error }] = (0, import_client15.useMutation)(REGISTER_MUTATION);
5388
5541
  return { error, loading, register };
5389
5542
  };
5390
5543
  var useLogin = () => {
5391
- const [login, { loading, error }] = (0, import_client14.useMutation)(LOGIN_MUTATION);
5544
+ const [login, { loading, error }] = (0, import_client15.useMutation)(LOGIN_MUTATION);
5392
5545
  return { error, loading, login };
5393
5546
  };
5394
5547
  var useLogout = () => {
5395
- const [logout, { loading, error }] = (0, import_client14.useMutation)(LOGOUT_MUTATION);
5548
+ const [logout, { loading, error }] = (0, import_client15.useMutation)(LOGOUT_MUTATION);
5396
5549
  return { error, loading, logout };
5397
5550
  };
5398
5551
  var useRefreshToken = () => {
5399
- const [refreshToken, { loading, error }] = (0, import_client14.useMutation)(REFRESH_TOKEN_MUTATION);
5552
+ const [refreshToken, { loading, error }] = (0, import_client15.useMutation)(REFRESH_TOKEN_MUTATION);
5400
5553
  return { error, loading, refreshToken };
5401
5554
  };
5402
5555
  var useRequestPasswordReset = () => {
5403
- const [requestPasswordReset, { loading, error }] = (0, import_client14.useMutation)(REQUEST_PASSWORD_RESET_MUTATION);
5556
+ const [requestPasswordReset, { loading, error }] = (0, import_client15.useMutation)(REQUEST_PASSWORD_RESET_MUTATION);
5404
5557
  return { error, loading, requestPasswordReset };
5405
5558
  };
5406
5559
  var useValidateVerificationToken = () => {
5407
- const [validateVerificationToken, { loading, error }] = (0, import_client14.useMutation)(VALIDATE_VERIFICATION_TOKEN_MUTATION);
5560
+ const [validateVerificationToken, { loading, error }] = (0, import_client15.useMutation)(VALIDATE_VERIFICATION_TOKEN_MUTATION);
5408
5561
  return { error, loading, validateVerificationToken };
5409
5562
  };
5410
5563
  var useResetPassword = () => {
5411
- const [resetPassword, { loading, error }] = (0, import_client14.useMutation)(RESET_PASSWORD_MUTATION);
5564
+ const [resetPassword, { loading, error }] = (0, import_client15.useMutation)(RESET_PASSWORD_MUTATION);
5412
5565
  return { error, loading, resetPassword };
5413
5566
  };
5414
5567
 
5415
5568
  // src/graphql/hooks/chat/hooksMutation.ts
5416
- var import_client17 = require("@apollo/client");
5569
+ var import_client18 = require("@apollo/client");
5417
5570
 
5418
5571
  // src/graphql/mutations/chat.ts
5419
- var import_client16 = require("@apollo/client");
5572
+ var import_client17 = require("@apollo/client");
5420
5573
 
5421
5574
  // src/graphql/queries/chat.ts
5422
- var import_client15 = require("@apollo/client");
5423
- var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client15.gql`
5575
+ var import_client16 = require("@apollo/client");
5576
+ var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client16.gql`
5424
5577
  fragment ChatMessageFields on ChatMessageType {
5425
5578
  _id
5426
5579
  content
@@ -5443,7 +5596,7 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client15.gql`
5443
5596
  updatedAt
5444
5597
  }
5445
5598
  `;
5446
- var CHAT_PARTICIPANT = import_client15.gql`
5599
+ var CHAT_PARTICIPANT = import_client16.gql`
5447
5600
  fragment ChatParticipantFields on ChatParticipantType {
5448
5601
  active
5449
5602
  userAvatar
@@ -5452,7 +5605,7 @@ var CHAT_PARTICIPANT = import_client15.gql`
5452
5605
  userName
5453
5606
  }
5454
5607
  `;
5455
- var CHAT_FIELDS_FRAGMENT = import_client15.gql`
5608
+ var CHAT_FIELDS_FRAGMENT = import_client16.gql`
5456
5609
  fragment ChatFields on ChatType {
5457
5610
  _id
5458
5611
  active
@@ -5473,7 +5626,7 @@ var CHAT_FIELDS_FRAGMENT = import_client15.gql`
5473
5626
  ${CHAT_MESSAGE_FIELDS_FRAGMENT}
5474
5627
  ${CHAT_PARTICIPANT}
5475
5628
  `;
5476
- var CHAT = import_client15.gql`
5629
+ var CHAT = import_client16.gql`
5477
5630
  query chat($_id: ID!) {
5478
5631
  chat(_id: $_id) {
5479
5632
  ...ChatFields
@@ -5481,7 +5634,7 @@ var CHAT = import_client15.gql`
5481
5634
  }
5482
5635
  ${CHAT_FIELDS_FRAGMENT}
5483
5636
  `;
5484
- var PRIVATE_CHATS = import_client15.gql`
5637
+ var PRIVATE_CHATS = import_client16.gql`
5485
5638
  query privateChats {
5486
5639
  privateChats {
5487
5640
  ...ChatFields
@@ -5489,7 +5642,7 @@ var PRIVATE_CHATS = import_client15.gql`
5489
5642
  }
5490
5643
  ${CHAT_FIELDS_FRAGMENT}
5491
5644
  `;
5492
- var RELATION_CHATS = import_client15.gql`
5645
+ var RELATION_CHATS = import_client16.gql`
5493
5646
  query relationChats {
5494
5647
  relationChats {
5495
5648
  ...ChatFields
@@ -5497,7 +5650,7 @@ var RELATION_CHATS = import_client15.gql`
5497
5650
  }
5498
5651
  ${CHAT_FIELDS_FRAGMENT}
5499
5652
  `;
5500
- var GET_CHATS_BY_REGION = import_client15.gql`
5653
+ var GET_CHATS_BY_REGION = import_client16.gql`
5501
5654
  query getChatsByRegion($region: String!) {
5502
5655
  chatsByRegion(region: $region) {
5503
5656
  ...ChatFields
@@ -5505,7 +5658,7 @@ var GET_CHATS_BY_REGION = import_client15.gql`
5505
5658
  }
5506
5659
  ${CHAT_FIELDS_FRAGMENT}
5507
5660
  `;
5508
- var CHAT_REPORT_FIELDS_FRAGMENT = import_client15.gql`
5661
+ var CHAT_REPORT_FIELDS_FRAGMENT = import_client16.gql`
5509
5662
  fragment ChatReportFields on ReportChatUserType {
5510
5663
  _id
5511
5664
  chatId
@@ -5520,7 +5673,7 @@ var CHAT_REPORT_FIELDS_FRAGMENT = import_client15.gql`
5520
5673
  updatedAt
5521
5674
  }
5522
5675
  `;
5523
- var GET_REPORTED_CHAT_USERS = import_client15.gql`
5676
+ var GET_REPORTED_CHAT_USERS = import_client16.gql`
5524
5677
  query getReportedChatUsers {
5525
5678
  reportedChatUsers {
5526
5679
  ...ChatReportFields
@@ -5530,7 +5683,7 @@ var GET_REPORTED_CHAT_USERS = import_client15.gql`
5530
5683
  `;
5531
5684
 
5532
5685
  // src/graphql/mutations/chat.ts
5533
- var CREATE_PRIVATE_CHAT_MUTATION = import_client16.gql`
5686
+ var CREATE_PRIVATE_CHAT_MUTATION = import_client17.gql`
5534
5687
  mutation createPrivateChat($userId: ID!) {
5535
5688
  createPrivateChat(userId: $userId) {
5536
5689
  data {
@@ -5541,7 +5694,7 @@ var CREATE_PRIVATE_CHAT_MUTATION = import_client16.gql`
5541
5694
  }
5542
5695
  ${CHAT_FIELDS_FRAGMENT}
5543
5696
  `;
5544
- var SEND_CHAT_MESSAGE_MUTATION = import_client16.gql`
5697
+ var SEND_CHAT_MESSAGE_MUTATION = import_client17.gql`
5545
5698
  mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
5546
5699
  sendChatMessage(_id: $_id, input: $input) {
5547
5700
  data {
@@ -5552,7 +5705,7 @@ var SEND_CHAT_MESSAGE_MUTATION = import_client16.gql`
5552
5705
  }
5553
5706
  ${CHAT_FIELDS_FRAGMENT}
5554
5707
  `;
5555
- var DELETE_CHAT_MUTATION = import_client16.gql`
5708
+ var DELETE_CHAT_MUTATION = import_client17.gql`
5556
5709
  mutation deleteChat($_id: ID!) {
5557
5710
  deleteChat(_id: $_id) {
5558
5711
  data
@@ -5560,7 +5713,7 @@ var DELETE_CHAT_MUTATION = import_client16.gql`
5560
5713
  }
5561
5714
  }
5562
5715
  `;
5563
- var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client16.gql`
5716
+ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client17.gql`
5564
5717
  mutation addParticipantToChat($chatId: ID!, $userId: ID!) {
5565
5718
  addParticipantToChat(chatId: $chatId, userId: $userId) {
5566
5719
  data {
@@ -5571,7 +5724,7 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client16.gql`
5571
5724
  }
5572
5725
  ${CHAT_FIELDS_FRAGMENT}
5573
5726
  `;
5574
- var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client16.gql`
5727
+ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client17.gql`
5575
5728
  mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {
5576
5729
  removeParticipantFromChat(chatId: $chatId, userId: $userId) {
5577
5730
  data {
@@ -5582,7 +5735,7 @@ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client16.gql`
5582
5735
  }
5583
5736
  }
5584
5737
  `;
5585
- var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = import_client16.gql`
5738
+ var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = import_client17.gql`
5586
5739
  mutation toggleChatMessageLike($chatId: ID!, $messageId: ID!) {
5587
5740
  toggleChatMessageLike(chatId: $chatId, messageId: $messageId) {
5588
5741
  data {
@@ -5593,7 +5746,7 @@ var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = import_client16.gql`
5593
5746
  }
5594
5747
  ${CHAT_FIELDS_FRAGMENT}
5595
5748
  `;
5596
- var MARK_CHAT_MESSAGES_SEEN_MUTATION = import_client16.gql`
5749
+ var MARK_CHAT_MESSAGES_SEEN_MUTATION = import_client17.gql`
5597
5750
  mutation markChatMessagesSeen($chatId: ID!, $messageIds: [ID!]!) {
5598
5751
  markChatMessagesSeen(chatId: $chatId, messageIds: $messageIds) {
5599
5752
  data {
@@ -5604,7 +5757,7 @@ var MARK_CHAT_MESSAGES_SEEN_MUTATION = import_client16.gql`
5604
5757
  }
5605
5758
  ${CHAT_FIELDS_FRAGMENT}
5606
5759
  `;
5607
- var REPORT_CHAT_USER_MUTATION = import_client16.gql`
5760
+ var REPORT_CHAT_USER_MUTATION = import_client17.gql`
5608
5761
  mutation reportChatUser($input: ReportChatUserInputType!) {
5609
5762
  reportChatUser(input: $input) {
5610
5763
  data {
@@ -5618,14 +5771,14 @@ var REPORT_CHAT_USER_MUTATION = import_client16.gql`
5618
5771
 
5619
5772
  // src/graphql/hooks/chat/hooksMutation.ts
5620
5773
  var useCreatePrivateChat = () => {
5621
- const [createPrivateChat, { loading, error }] = (0, import_client17.useMutation)(CREATE_PRIVATE_CHAT_MUTATION, {
5774
+ const [createPrivateChat, { loading, error }] = (0, import_client18.useMutation)(CREATE_PRIVATE_CHAT_MUTATION, {
5622
5775
  awaitRefetchQueries: true,
5623
5776
  refetchQueries: [{ query: PRIVATE_CHATS }]
5624
5777
  });
5625
5778
  return { createPrivateChat, error, loading };
5626
5779
  };
5627
5780
  var useSendChatMessage = () => {
5628
- const [sendChatMessage, { loading, error }] = (0, import_client17.useMutation)(SEND_CHAT_MESSAGE_MUTATION, {
5781
+ const [sendChatMessage, { loading, error }] = (0, import_client18.useMutation)(SEND_CHAT_MESSAGE_MUTATION, {
5629
5782
  awaitRefetchQueries: true,
5630
5783
  refetchQueries: (mutationResult) => {
5631
5784
  const chatId = mutationResult?.data?.sendChatMessage?.data?._id;
@@ -5640,14 +5793,14 @@ var useSendChatMessage = () => {
5640
5793
  return { error, loading, sendChatMessage };
5641
5794
  };
5642
5795
  var useDeleteChat = () => {
5643
- const [deleteChat, { loading, error }] = (0, import_client17.useMutation)(DELETE_CHAT_MUTATION, {
5796
+ const [deleteChat, { loading, error }] = (0, import_client18.useMutation)(DELETE_CHAT_MUTATION, {
5644
5797
  awaitRefetchQueries: true,
5645
5798
  refetchQueries: [{ query: PRIVATE_CHATS }, { query: RELATION_CHATS }]
5646
5799
  });
5647
5800
  return { deleteChat, error, loading };
5648
5801
  };
5649
5802
  var useAddParticipantToChat = () => {
5650
- const [addParticipantToChat, { loading, error }] = (0, import_client17.useMutation)(ADD_PARTICIPANT_TO_CHAT_MUTATION, {
5803
+ const [addParticipantToChat, { loading, error }] = (0, import_client18.useMutation)(ADD_PARTICIPANT_TO_CHAT_MUTATION, {
5651
5804
  awaitRefetchQueries: true,
5652
5805
  refetchQueries: (mutationResult) => {
5653
5806
  const chatId = mutationResult?.data?.addParticipantToChat?.data?._id;
@@ -5668,7 +5821,7 @@ var useAddParticipantToChat = () => {
5668
5821
  return { addParticipantToChat, error, loading };
5669
5822
  };
5670
5823
  var useRemoveParticipantFromChat = () => {
5671
- const [removeParticipantFromChat, { loading, error }] = (0, import_client17.useMutation)(REMOVE_PARTICIPANT_FROM_CHAT_MUTATION, {
5824
+ const [removeParticipantFromChat, { loading, error }] = (0, import_client18.useMutation)(REMOVE_PARTICIPANT_FROM_CHAT_MUTATION, {
5672
5825
  awaitRefetchQueries: true,
5673
5826
  refetchQueries: (mutationResult) => {
5674
5827
  const region = mutationResult?.data?.removeParticipantFromChat?.data?.region;
@@ -5688,7 +5841,7 @@ var useRemoveParticipantFromChat = () => {
5688
5841
  return { error, loading, removeParticipantFromChat };
5689
5842
  };
5690
5843
  var useToggleChatMessageLike = () => {
5691
- const [toggleChatMessageLike, { loading, error }] = (0, import_client17.useMutation)(TOGGLE_CHAT_MESSAGE_LIKE_MUTATION, {
5844
+ const [toggleChatMessageLike, { loading, error }] = (0, import_client18.useMutation)(TOGGLE_CHAT_MESSAGE_LIKE_MUTATION, {
5692
5845
  awaitRefetchQueries: true,
5693
5846
  refetchQueries: (mutationResult) => {
5694
5847
  const chatId = mutationResult?.data?.toggleChatMessageLike?.data?._id;
@@ -5703,7 +5856,7 @@ var useToggleChatMessageLike = () => {
5703
5856
  return { error, loading, toggleChatMessageLike };
5704
5857
  };
5705
5858
  var useMarkChatMessagesSeen = () => {
5706
- const [markChatMessagesSeen, { loading, error }] = (0, import_client17.useMutation)(MARK_CHAT_MESSAGES_SEEN_MUTATION, {
5859
+ const [markChatMessagesSeen, { loading, error }] = (0, import_client18.useMutation)(MARK_CHAT_MESSAGES_SEEN_MUTATION, {
5707
5860
  awaitRefetchQueries: true,
5708
5861
  refetchQueries: (mutationResult) => {
5709
5862
  const chatId = mutationResult?.data?.markChatMessagesSeen?.data?._id;
@@ -5718,16 +5871,16 @@ var useMarkChatMessagesSeen = () => {
5718
5871
  return { error, loading, markChatMessagesSeen };
5719
5872
  };
5720
5873
  var useReportChatUser = () => {
5721
- const [reportChatUser, { loading, error }] = (0, import_client17.useMutation)(REPORT_CHAT_USER_MUTATION);
5874
+ const [reportChatUser, { loading, error }] = (0, import_client18.useMutation)(REPORT_CHAT_USER_MUTATION);
5722
5875
  return { error, loading, reportChatUser };
5723
5876
  };
5724
5877
 
5725
5878
  // src/graphql/hooks/chat/hooksQuery.ts
5726
- var import_client19 = require("@apollo/client");
5879
+ var import_client20 = require("@apollo/client");
5727
5880
 
5728
5881
  // src/graphql/subscriptions/chat.ts
5729
- var import_client18 = require("@apollo/client");
5730
- var GET_CHAT_MESSAGE = import_client18.gql`
5882
+ var import_client19 = require("@apollo/client");
5883
+ var GET_CHAT_MESSAGE = import_client19.gql`
5731
5884
  subscription {
5732
5885
  getChatMessage {
5733
5886
  ...ChatFields
@@ -5738,7 +5891,7 @@ var GET_CHAT_MESSAGE = import_client18.gql`
5738
5891
 
5739
5892
  // src/graphql/hooks/chat/hooksQuery.ts
5740
5893
  var useGetChat = (_id) => {
5741
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(CHAT, {
5894
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(CHAT, {
5742
5895
  fetchPolicy: "network-only",
5743
5896
  skip: !_id || _id === "",
5744
5897
  variables: { _id }
@@ -5747,28 +5900,28 @@ var useGetChat = (_id) => {
5747
5900
  return { chat, error, loading, refetch };
5748
5901
  };
5749
5902
  var useGetPrivateChats = () => {
5750
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(PRIVATE_CHATS, {
5903
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(PRIVATE_CHATS, {
5751
5904
  fetchPolicy: "network-only"
5752
5905
  });
5753
5906
  const privateChats = data?.privateChats || [];
5754
5907
  return { error, loading, privateChats, refetch };
5755
5908
  };
5756
5909
  var useGetRelationChats = () => {
5757
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(RELATION_CHATS, {
5910
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(RELATION_CHATS, {
5758
5911
  fetchPolicy: "network-only"
5759
5912
  });
5760
5913
  const relationChats = data?.relationChats || [];
5761
5914
  return { error, loading, refetch, relationChats };
5762
5915
  };
5763
5916
  var useGetChatSubscription = () => {
5764
- const { data, loading, error } = (0, import_client19.useSubscription)(
5917
+ const { data, loading, error } = (0, import_client20.useSubscription)(
5765
5918
  GET_CHAT_MESSAGE
5766
5919
  );
5767
5920
  const chat = data?.getChat;
5768
5921
  return { chat, error, loading };
5769
5922
  };
5770
5923
  var useGetChatsByRegion = (region) => {
5771
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_CHATS_BY_REGION, {
5924
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(GET_CHATS_BY_REGION, {
5772
5925
  fetchPolicy: "network-only",
5773
5926
  variables: { region }
5774
5927
  });
@@ -5776,7 +5929,7 @@ var useGetChatsByRegion = (region) => {
5776
5929
  return { chatsByRegion, error, loading, refetch };
5777
5930
  };
5778
5931
  var useGetReportedChatUsers = () => {
5779
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_REPORTED_CHAT_USERS, {
5932
+ const { loading, error, data, refetch } = (0, import_client20.useQuery)(GET_REPORTED_CHAT_USERS, {
5780
5933
  fetchPolicy: "network-only"
5781
5934
  });
5782
5935
  const reportedChatUsers = data?.reportedChatUsers || [];
@@ -5784,11 +5937,11 @@ var useGetReportedChatUsers = () => {
5784
5937
  };
5785
5938
 
5786
5939
  // src/graphql/hooks/contactUs.ts
5787
- var import_client21 = require("@apollo/client");
5940
+ var import_client22 = require("@apollo/client");
5788
5941
 
5789
5942
  // src/graphql/mutations/contactUs.ts
5790
- var import_client20 = require("@apollo/client");
5791
- var CONTACT_US_MUTATION = import_client20.gql`
5943
+ var import_client21 = require("@apollo/client");
5944
+ var CONTACT_US_MUTATION = import_client21.gql`
5792
5945
  mutation contactUs($input: ContactUsInputType!) {
5793
5946
  contactUs(input: $input) {
5794
5947
  data
@@ -5799,7 +5952,7 @@ var CONTACT_US_MUTATION = import_client20.gql`
5799
5952
 
5800
5953
  // src/graphql/hooks/contactUs.ts
5801
5954
  var useContactUs = () => {
5802
- const [contactUs, { loading, error }] = (0, import_client21.useMutation)(CONTACT_US_MUTATION);
5955
+ const [contactUs, { loading, error }] = (0, import_client22.useMutation)(CONTACT_US_MUTATION);
5803
5956
  return { contactUs, error, loading };
5804
5957
  };
5805
5958
 
@@ -5807,8 +5960,8 @@ var useContactUs = () => {
5807
5960
  var import_client24 = require("@apollo/client");
5808
5961
 
5809
5962
  // src/graphql/mutations/event.ts
5810
- var import_client22 = require("@apollo/client");
5811
- var CREATE_EVENT_MUTATION = import_client22.gql`
5963
+ var import_client23 = require("@apollo/client");
5964
+ var CREATE_EVENT_MUTATION = import_client23.gql`
5812
5965
  mutation createEvent($input: EventInputType!) {
5813
5966
  createEvent(input: $input) {
5814
5967
  data {
@@ -5819,7 +5972,7 @@ var CREATE_EVENT_MUTATION = import_client22.gql`
5819
5972
  }
5820
5973
  ${EVENT}
5821
5974
  `;
5822
- var UPDATE_EVENT_MUTATION = import_client22.gql`
5975
+ var UPDATE_EVENT_MUTATION = import_client23.gql`
5823
5976
  mutation updateEvent($_id: ID!, $input: EventInputType!) {
5824
5977
  updateEvent(_id: $_id, input: $input) {
5825
5978
  data {
@@ -5830,7 +5983,7 @@ var UPDATE_EVENT_MUTATION = import_client22.gql`
5830
5983
  }
5831
5984
  ${EVENT}
5832
5985
  `;
5833
- var DELETE_EVENT_MUTATION = import_client22.gql`
5986
+ var DELETE_EVENT_MUTATION = import_client23.gql`
5834
5987
  mutation deleteEvent($_id: ID!) {
5835
5988
  deleteEvent(_id: $_id) {
5836
5989
  data
@@ -5838,7 +5991,7 @@ var DELETE_EVENT_MUTATION = import_client22.gql`
5838
5991
  }
5839
5992
  }
5840
5993
  `;
5841
- var CREATE_EVENT_INFO_MUTATION = import_client22.gql`
5994
+ var CREATE_EVENT_INFO_MUTATION = import_client23.gql`
5842
5995
  mutation createEventInfo($input: EventInfoInputType!) {
5843
5996
  createEventInfo(input: $input) {
5844
5997
  data {
@@ -5849,7 +6002,7 @@ var CREATE_EVENT_INFO_MUTATION = import_client22.gql`
5849
6002
  }
5850
6003
  ${EVENT_INFO}
5851
6004
  `;
5852
- var UPDATE_EVENT_INFO_MUTATION = import_client22.gql`
6005
+ var UPDATE_EVENT_INFO_MUTATION = import_client23.gql`
5853
6006
  mutation updateEventInfo($_id: ID!, $input: EventInfoInputType!) {
5854
6007
  updateEventInfo(_id: $_id, input: $input) {
5855
6008
  data {
@@ -5861,110 +6014,6 @@ var UPDATE_EVENT_INFO_MUTATION = import_client22.gql`
5861
6014
  ${EVENT_INFO}
5862
6015
  `;
5863
6016
 
5864
- // src/graphql/queries/user.ts
5865
- var import_client23 = require("@apollo/client");
5866
- var GET_USERS = import_client23.gql`
5867
- query getUsers {
5868
- users {
5869
- ...UserFields
5870
- }
5871
- }
5872
- ${USER_FIELDS_FRAGMENT}
5873
- `;
5874
- var GET_USER = import_client23.gql`
5875
- query getUser($_id: ID!) {
5876
- user(_id: $_id) {
5877
- ...UserFields
5878
- }
5879
- }
5880
- ${USER_FIELDS_FRAGMENT}
5881
- `;
5882
- var GET_USER_EVENTS = import_client23.gql`
5883
- query getUserEvents {
5884
- userEvents {
5885
- ...EventFields
5886
- }
5887
- }
5888
- ${EVENT}
5889
- `;
5890
- var GET_USER_VENDORS = import_client23.gql`
5891
- query getUserVendors {
5892
- userVendors {
5893
- ...VendorFields
5894
- }
5895
- }
5896
- ${VENDOR}
5897
- `;
5898
- var GET_USER_PARTNERS = import_client23.gql`
5899
- query getUserPartners {
5900
- userPartners {
5901
- ...PartnerFields
5902
- }
5903
- }
5904
- ${PARTNER}
5905
- `;
5906
- var GET_USER_ACTIVITIES = import_client23.gql`
5907
- query getUserActivities {
5908
- userActivities {
5909
- favourites {
5910
- events {
5911
- ...EventListItemFields
5912
- }
5913
- partners {
5914
- ...PartnerFields
5915
- }
5916
- vendors {
5917
- ...VendorFields
5918
- }
5919
- }
5920
- going {
5921
- events {
5922
- ...EventListItemFields
5923
- }
5924
- }
5925
- interested {
5926
- events {
5927
- ...EventListItemFields
5928
- }
5929
- }
5930
- present {
5931
- events {
5932
- ...EventListItemFields
5933
- }
5934
- }
5935
- }
5936
- }
5937
- ${EVENT_LIST_ITEM}
5938
- ${VENDOR}
5939
- ${PARTNER}
5940
- `;
5941
- var GET_USER_RESOURCES = import_client23.gql`
5942
- query getUserResources($userId: ID!) {
5943
- userResources(userId: $userId) {
5944
- resources {
5945
- _id
5946
- logo
5947
- name
5948
- resourceType
5949
- }
5950
- }
5951
- }
5952
- `;
5953
- var GET_USERS_BY_PROMO_CODE = import_client23.gql`
5954
- query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
5955
- usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
5956
- active
5957
- avatar {
5958
- ...ResourceImageFields
5959
- }
5960
- deletedAt
5961
- nickName
5962
- userId
5963
- }
5964
- }
5965
- ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5966
- `;
5967
-
5968
6017
  // src/graphql/hooks/event/hooksMutation.ts
5969
6018
  var useCreateEvent = () => {
5970
6019
  const [createEvent, { loading, error }] = (0, import_client24.useMutation)(CREATE_EVENT_MUTATION, {
@@ -6053,14 +6102,6 @@ var useUpdateEventInfo = () => {
6053
6102
 
6054
6103
  // src/graphql/hooks/event/hooksQuery.ts
6055
6104
  var import_client25 = require("@apollo/client");
6056
- var useGetEvents = (dateStatus) => {
6057
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_EVENTS, {
6058
- fetchPolicy: "network-only",
6059
- variables: { dateStatus }
6060
- });
6061
- const events = data?.events || [];
6062
- return { error, events, loading, refetch };
6063
- };
6064
6105
  var useGetEvent = (_id) => {
6065
6106
  const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_EVENT, {
6066
6107
  fetchPolicy: "network-only",
@@ -6109,10 +6150,10 @@ var useGetEventsByRegion = (region, options, dateStatus, tags) => {
6109
6150
  refetch
6110
6151
  };
6111
6152
  };
6112
- var useSearchEvents = (region, searchQuery, tags, dateStatus) => {
6113
- const normalizedSearch = searchQuery?.trim() ?? "";
6153
+ var useSearchEvents = (search, region, tags, dateStatus) => {
6154
+ const normalizedSearch = search.trim();
6114
6155
  const normalizedTags = (tags ?? []).filter(Boolean);
6115
- const shouldRunQuery = normalizedSearch.length > 3 || normalizedTags.length > 0;
6156
+ const shouldRunQuery = normalizedSearch.length >= 3 || normalizedTags.length > 0;
6116
6157
  const { loading, error, data, refetch } = (0, import_client25.useQuery)(SEARCH_EVENTS, {
6117
6158
  fetchPolicy: "network-only",
6118
6159
  skip: !shouldRunQuery,
@@ -6732,21 +6773,6 @@ var useActivateVendorClaim = () => {
6732
6773
 
6733
6774
  // src/graphql/hooks/vendor/hooksQuery.ts
6734
6775
  var import_client40 = require("@apollo/client");
6735
- var useGetVendors = () => {
6736
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(
6737
- GET_VENDORS,
6738
- {
6739
- fetchPolicy: "network-only"
6740
- }
6741
- );
6742
- const vendors = data?.vendors || [];
6743
- return {
6744
- error,
6745
- loading,
6746
- refetch,
6747
- vendors
6748
- };
6749
- };
6750
6776
  var useGetVendor = (_id) => {
6751
6777
  const { loading, error, data, refetch } = (0, import_client40.useQuery)(
6752
6778
  GET_VENDOR,
@@ -6778,10 +6804,11 @@ var useGetVendorsByRegion = (region, options) => {
6778
6804
  };
6779
6805
  };
6780
6806
  var useSearchVendors = (search, region) => {
6807
+ const normalizedSearch = search.trim();
6781
6808
  const { loading, error, data, refetch } = (0, import_client40.useQuery)(SEARCH_VENDORS, {
6782
6809
  fetchPolicy: "network-only",
6783
- skip: search.length < 3,
6784
- variables: { region, search }
6810
+ skip: normalizedSearch.length < 3,
6811
+ variables: { region, search: normalizedSearch }
6785
6812
  });
6786
6813
  const vendorSearch = data?.vendorSearch || [];
6787
6814
  return { error, loading, refetch, vendorSearch };
@@ -7115,16 +7142,6 @@ var useSelectStandardPackage = () => {
7115
7142
 
7116
7143
  // src/graphql/hooks/user/hooksQuery.ts
7117
7144
  var import_client43 = require("@apollo/client");
7118
- var useGetUsers = () => {
7119
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(
7120
- GET_USERS,
7121
- {
7122
- fetchPolicy: "network-only"
7123
- }
7124
- );
7125
- const users = data?.users || [];
7126
- return { error, loading, refetch, users };
7127
- };
7128
7145
  var useGetUser = (_id) => {
7129
7146
  const { loading, error, data, refetch } = (0, import_client43.useQuery)(
7130
7147
  GET_USER,
@@ -7462,25 +7479,38 @@ var CREATE_CHECKOUT_SESSION_MUTATION = import_client52.gql`
7462
7479
  var CANCEL_SUBSCRIPTION_MUTATION = import_client52.gql`
7463
7480
  mutation cancelSubscription {
7464
7481
  cancelSubscription {
7465
- data
7482
+ data {
7483
+ billingPeriod
7484
+ cancelAtPeriodEnd
7485
+ currentPlan
7486
+ endDate
7487
+ pendingBillingPeriod
7488
+ pendingChangeEffectiveAt
7489
+ pendingPlan
7490
+ priceId
7491
+ scheduleId
7492
+ status
7493
+ subscriptionId
7494
+ }
7466
7495
  message
7467
7496
  }
7468
7497
  }
7469
7498
  `;
7470
7499
  var UPDATE_SUBSCRIPTION_PLAN_MUTATION = import_client52.gql`
7471
- mutation updateSubscriptionPlan(
7472
- $newPlanId: LicencesEnumType!
7473
- $billingPeriod: BillingPeriodEnumType
7474
- ) {
7475
- updateSubscriptionPlan(
7476
- newPlanId: $newPlanId
7477
- billingPeriod: $billingPeriod
7478
- ) {
7500
+ mutation updateSubscriptionPlan($input: UpdateSubscriptionPlanInputType!) {
7501
+ updateSubscriptionPlan(input: $input) {
7479
7502
  data {
7480
- subscriptionId
7481
- status
7482
- priceId
7503
+ billingPeriod
7504
+ cancelAtPeriodEnd
7483
7505
  currentPlan
7506
+ endDate
7507
+ pendingBillingPeriod
7508
+ pendingChangeEffectiveAt
7509
+ pendingPlan
7510
+ priceId
7511
+ scheduleId
7512
+ status
7513
+ subscriptionId
7484
7514
  }
7485
7515
  message
7486
7516
  }
@@ -7523,10 +7553,17 @@ var import_client54 = require("@apollo/client");
7523
7553
  var GET_SUBSCRIPTION_STATUS = import_client54.gql`
7524
7554
  query getSubscriptionStatus {
7525
7555
  getSubscriptionStatus {
7526
- subscriptionId
7527
- status
7528
- priceId
7556
+ billingPeriod
7557
+ cancelAtPeriodEnd
7529
7558
  currentPlan
7559
+ endDate
7560
+ pendingBillingPeriod
7561
+ pendingChangeEffectiveAt
7562
+ pendingPlan
7563
+ priceId
7564
+ scheduleId
7565
+ status
7566
+ subscriptionId
7530
7567
  }
7531
7568
  }
7532
7569
  `;
@@ -7646,18 +7683,6 @@ var useDeletePartner = () => {
7646
7683
 
7647
7684
  // src/graphql/hooks/partner/hooksQuery.ts
7648
7685
  var import_client58 = require("@apollo/client");
7649
- var useGetPartners = () => {
7650
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(GET_PARTNERS, {
7651
- fetchPolicy: "network-only"
7652
- });
7653
- const partners = data?.partners || [];
7654
- return {
7655
- error,
7656
- loading,
7657
- partners,
7658
- refetch
7659
- };
7660
- };
7661
7686
  var useGetPartner = (_id) => {
7662
7687
  const { loading, error, data, refetch } = (0, import_client58.useQuery)(
7663
7688
  GET_PARTNER,
@@ -7689,10 +7714,11 @@ var useGetPartnersByRegion = (region, options) => {
7689
7714
  };
7690
7715
  };
7691
7716
  var useSearchPartners = (search, region) => {
7717
+ const normalizedSearch = search.trim();
7692
7718
  const { loading, error, data, refetch } = (0, import_client58.useQuery)(SEARCH_PARTNERS, {
7693
7719
  fetchPolicy: "network-only",
7694
- skip: search.length < 3,
7695
- variables: { region, search }
7720
+ skip: normalizedSearch.length < 3,
7721
+ variables: { region, search: normalizedSearch }
7696
7722
  });
7697
7723
  const partnersSearch = data?.partnersSearch || [];
7698
7724
  return { error, loading, partnersSearch, refetch };
@@ -7759,12 +7785,6 @@ var useDeletePost = () => {
7759
7785
 
7760
7786
  // src/graphql/hooks/post/hooksQuery.ts
7761
7787
  var import_client61 = require("@apollo/client");
7762
- var useGetPosts = () => {
7763
- const { data, loading, error, refetch } = (0, import_client61.useQuery)(GET_POSTS, {
7764
- fetchPolicy: "network-only"
7765
- });
7766
- return { error, loading, posts: data?.posts || [], refetch };
7767
- };
7768
7788
  var useGetPost = (_id) => {
7769
7789
  const { data, loading, error, refetch } = (0, import_client61.useQuery)(GET_POST, {
7770
7790
  fetchPolicy: "network-only",
@@ -7773,14 +7793,6 @@ var useGetPost = (_id) => {
7773
7793
  });
7774
7794
  return { error, loading, post: data?.post, refetch };
7775
7795
  };
7776
- var useGetPostsByType = (postType) => {
7777
- const { data, loading, error, refetch } = (0, import_client61.useQuery)(GET_POSTS_BY_TYPE, {
7778
- fetchPolicy: "network-only",
7779
- skip: !postType,
7780
- variables: { postType }
7781
- });
7782
- return { error, loading, postsByType: data?.postsByType || [], refetch };
7783
- };
7784
7796
 
7785
7797
  // src/graphql/hooks/appSettings/hooksMutation.ts
7786
7798
  var import_client64 = require("@apollo/client");
@@ -8984,6 +8996,97 @@ var useGetCoupon = (_id) => {
8984
8996
  return { coupon, error, loading, refetch };
8985
8997
  };
8986
8998
 
8999
+ // src/graphql/hooks/usePaginatedList.ts
9000
+ var import_client86 = require("@apollo/client");
9001
+ var import_react = require("react");
9002
+ function usePaginatedList({
9003
+ document,
9004
+ getItems,
9005
+ variables,
9006
+ skip = false,
9007
+ pageSize = DEFAULT_PAGE_SIZE,
9008
+ getId = defaultGetId
9009
+ }) {
9010
+ if (!Number.isInteger(pageSize) || pageSize <= 0) {
9011
+ throw new Error(
9012
+ `usePaginatedList: pageSize must be a positive integer, received ${String(pageSize)}.`
9013
+ );
9014
+ }
9015
+ const [offset, setOffset] = (0, import_react.useState)(0);
9016
+ const [items, setItems] = (0, import_react.useState)([]);
9017
+ const [hasMore, setHasMore] = (0, import_react.useState)(!skip);
9018
+ const [hasSettled, setHasSettled] = (0, import_react.useState)(false);
9019
+ const variablesKey = JSON.stringify(variables ?? null);
9020
+ (0, import_react.useEffect)(() => {
9021
+ setItems([]);
9022
+ setHasMore(!skip);
9023
+ setHasSettled(false);
9024
+ setOffset(0);
9025
+ }, [variablesKey, pageSize, skip]);
9026
+ const { data, loading, error, refetch } = (0, import_client86.useQuery)(document, {
9027
+ fetchPolicy: "network-only",
9028
+ skip,
9029
+ variables: { ...variables, options: { limit: pageSize + 1, offset } }
9030
+ });
9031
+ const rawPage = getItems(data);
9032
+ const page = rawPage.length > pageSize ? rawPage.slice(0, pageSize) : rawPage;
9033
+ const hasMorePage = rawPage.length > pageSize;
9034
+ (0, import_react.useEffect)(() => {
9035
+ if (loading || skip || error) {
9036
+ return;
9037
+ }
9038
+ setItems((prev) => {
9039
+ if (!hasSettled) {
9040
+ if (page.length === 0 && prev.length === 0) {
9041
+ return prev;
9042
+ }
9043
+ return page;
9044
+ }
9045
+ return accumulateItems(prev, page, getId);
9046
+ });
9047
+ setHasSettled(true);
9048
+ setHasMore(hasMorePage);
9049
+ }, [loading, skip, error, page, hasMorePage, hasSettled, pageSize, getId]);
9050
+ const loadMore = (0, import_react.useCallback)(() => {
9051
+ if (loading || skip) {
9052
+ return;
9053
+ }
9054
+ if (error) {
9055
+ void refetch();
9056
+ return;
9057
+ }
9058
+ if (!hasSettled) {
9059
+ return;
9060
+ }
9061
+ if (!hasMore) {
9062
+ return;
9063
+ }
9064
+ setOffset(offset + pageSize);
9065
+ }, [loading, skip, error, hasSettled, hasMore, offset, pageSize, refetch]);
9066
+ const refresh = (0, import_react.useCallback)(() => {
9067
+ setItems([]);
9068
+ setHasMore(!skip);
9069
+ setHasSettled(false);
9070
+ setOffset(0);
9071
+ if (skip) {
9072
+ return Promise.resolve();
9073
+ }
9074
+ return refetch({
9075
+ ...variables,
9076
+ options: { limit: pageSize + 1, offset: 0 }
9077
+ });
9078
+ }, [refetch, variables, pageSize, skip]);
9079
+ return {
9080
+ error,
9081
+ hasMore,
9082
+ items,
9083
+ loading: loading && !hasSettled,
9084
+ loadingMore: loading && hasSettled,
9085
+ loadMore,
9086
+ refresh
9087
+ };
9088
+ }
9089
+
8987
9090
  // src/images/index.ts
8988
9091
  var PKG = "@timardex/cluemart-shared";
8989
9092
  var IMAGE_EXTENSION = ".webp";
@@ -9551,6 +9654,7 @@ function canAccessAdminPath(roles, pathname) {
9551
9654
  CLUEMART_MAIN_DOMAIN_URL,
9552
9655
  CM_AFFILIATE_PROMO_CODE,
9553
9656
  CM_SCHOOL_PROMO_CODE,
9657
+ DEFAULT_PAGE_SIZE,
9554
9658
  DEFAULT_RESOURCES_RETURN_LIMIT,
9555
9659
  DEFAULT_RESOURCES_RETURN_OFFSET,
9556
9660
  DEFAULT_SHARE_OG_IMAGE,
@@ -9593,15 +9697,21 @@ function canAccessAdminPath(roles, pathname) {
9593
9697
  EnumVendorType,
9594
9698
  EnumVerificationType,
9595
9699
  GET_EVENT,
9700
+ GET_EVENTS,
9596
9701
  GET_EVENT_BY_SLUG,
9597
9702
  GET_EVENT_INFO,
9598
9703
  GET_OWNED_EVENT,
9599
9704
  GET_PARTNER,
9705
+ GET_PARTNERS,
9600
9706
  GET_PARTNER_BY_SLUG,
9601
9707
  GET_POST,
9708
+ GET_POSTS,
9709
+ GET_POSTS_BY_TYPE,
9602
9710
  GET_POST_BY_SLUG,
9603
9711
  GET_RESOURCE_CONNECTIONS,
9712
+ GET_USERS,
9604
9713
  GET_VENDOR,
9714
+ GET_VENDORS,
9605
9715
  GET_VENDOR_BY_SLUG,
9606
9716
  GET_VENDOR_INFO,
9607
9717
  IMAGE_EXTENSION,
@@ -9658,6 +9768,7 @@ function canAccessAdminPath(roles, pathname) {
9658
9768
  TIER_FROM_LICENCE,
9659
9769
  USER_STORAGE_KEY,
9660
9770
  WILDCARD_PERMISSION,
9771
+ accumulateItems,
9661
9772
  appendShareMoreInfoLine,
9662
9773
  availableCategories,
9663
9774
  availableRegionOptions,
@@ -9691,10 +9802,12 @@ function canAccessAdminPath(roles, pathname) {
9691
9802
  collectVendorEventRelationDateTimes,
9692
9803
  companyContactFields,
9693
9804
  computeDailyClueState,
9805
+ computeHasMore,
9694
9806
  contactUsFields,
9695
9807
  createAffiliateReward,
9696
9808
  darkColors,
9697
9809
  dateFormat,
9810
+ defaultGetId,
9698
9811
  emailField,
9699
9812
  eventBasicInfoFields,
9700
9813
  eventEndDateFields,
@@ -9899,7 +10012,6 @@ function canAccessAdminPath(roles, pathname) {
9899
10012
  useGetEventByPlaceId,
9900
10013
  useGetEventInfo,
9901
10014
  useGetEventRelations,
9902
- useGetEvents,
9903
10015
  useGetEventsByRegion,
9904
10016
  useGetEventsNearMe,
9905
10017
  useGetGame,
@@ -9909,11 +10021,8 @@ function canAccessAdminPath(roles, pathname) {
9909
10021
  useGetNotificationCountSubscription,
9910
10022
  useGetOwnedEvent,
9911
10023
  useGetPartner,
9912
- useGetPartners,
9913
10024
  useGetPartnersByRegion,
9914
10025
  useGetPost,
9915
- useGetPosts,
9916
- useGetPostsByType,
9917
10026
  useGetPrivateChats,
9918
10027
  useGetRelation,
9919
10028
  useGetRelationByEventAndVendor,
@@ -9936,12 +10045,10 @@ function canAccessAdminPath(roles, pathname) {
9936
10045
  useGetUserPartners,
9937
10046
  useGetUserResources,
9938
10047
  useGetUserVendors,
9939
- useGetUsers,
9940
10048
  useGetUsersByPromoCode,
9941
10049
  useGetVendor,
9942
10050
  useGetVendorInfo,
9943
10051
  useGetVendorRelations,
9944
- useGetVendors,
9945
10052
  useGetVendorsByRegion,
9946
10053
  useLeaveGame,
9947
10054
  useLogin,
@@ -9950,6 +10057,7 @@ function canAccessAdminPath(roles, pathname) {
9950
10057
  useMarkChatMessagesSeen,
9951
10058
  useMarkNotificationRead,
9952
10059
  useMyPendingVendorClaim,
10060
+ usePaginatedList,
9953
10061
  useRedeemAffiliateReward,
9954
10062
  useRedeemReward,
9955
10063
  useRefreshToken,