@timardex/cluemart-shared 1.1.78 → 1.1.80

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 (55) hide show
  1. package/dist/{ad-BoyPTKzO.d.mts → ad-5mNvL58V.d.mts} +4 -4
  2. package/dist/{ad-ByaFgKCJ.d.ts → ad-DrHJhh2M.d.ts} +4 -4
  3. package/dist/{auth-CsMldwsP.d.mts → auth-C0eE66vz.d.mts} +1 -1
  4. package/dist/{auth-CatvNkT_.d.ts → auth-Csul8lXc.d.ts} +1 -1
  5. package/dist/{chunk-ERBPRUAF.mjs → chunk-AXCOUPK2.mjs} +20 -12
  6. package/dist/chunk-AXCOUPK2.mjs.map +1 -0
  7. package/dist/{chunk-JZMSWUO5.mjs → chunk-CCBDLLRT.mjs} +2 -2
  8. package/dist/{chunk-JFIG6CV2.mjs → chunk-YOGSPGDV.mjs} +2 -2
  9. package/dist/chunk-YOGSPGDV.mjs.map +1 -0
  10. package/dist/enums/index.cjs +20 -11
  11. package/dist/enums/index.cjs.map +1 -1
  12. package/dist/enums/index.d.mts +18 -12
  13. package/dist/enums/index.d.ts +18 -12
  14. package/dist/enums/index.mjs +3 -1
  15. package/dist/formFields/index.cjs +26 -26
  16. package/dist/formFields/index.cjs.map +1 -1
  17. package/dist/formFields/index.d.mts +7 -7
  18. package/dist/formFields/index.d.ts +7 -7
  19. package/dist/formFields/index.mjs +23 -23
  20. package/dist/formFields/index.mjs.map +1 -1
  21. package/dist/{global-Dt-vAIF9.d.mts → global-2SIDtEJn.d.ts} +17 -15
  22. package/dist/{global-BsANkXhj.d.ts → global-CNtWgZW4.d.mts} +17 -15
  23. package/dist/graphql/index.cjs +251 -248
  24. package/dist/graphql/index.cjs.map +1 -1
  25. package/dist/graphql/index.d.mts +33 -33
  26. package/dist/graphql/index.d.ts +33 -33
  27. package/dist/graphql/index.mjs +238 -235
  28. package/dist/graphql/index.mjs.map +1 -1
  29. package/dist/hooks/index.cjs +48 -36
  30. package/dist/hooks/index.cjs.map +1 -1
  31. package/dist/hooks/index.d.mts +15 -15
  32. package/dist/hooks/index.d.ts +15 -15
  33. package/dist/hooks/index.mjs +39 -33
  34. package/dist/hooks/index.mjs.map +1 -1
  35. package/dist/index.cjs +337 -320
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.mts +82 -74
  38. package/dist/index.d.ts +82 -74
  39. package/dist/index.mjs +313 -297
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/{resourceViews-ja9Qif1X.d.mts → resourceViews-COYpf0aX.d.mts} +2 -2
  42. package/dist/{resourceViews-C2CYUMC0.d.ts → resourceViews-DEKze3fc.d.ts} +2 -2
  43. package/dist/types/index.cjs +1 -1
  44. package/dist/types/index.cjs.map +1 -1
  45. package/dist/types/index.d.mts +4 -4
  46. package/dist/types/index.d.ts +4 -4
  47. package/dist/types/index.mjs +1 -1
  48. package/dist/utils/index.cjs.map +1 -1
  49. package/dist/utils/index.d.mts +1 -1
  50. package/dist/utils/index.d.ts +1 -1
  51. package/dist/utils/index.mjs +2 -2
  52. package/package.json +1 -1
  53. package/dist/chunk-ERBPRUAF.mjs.map +0 -1
  54. package/dist/chunk-JFIG6CV2.mjs.map +0 -1
  55. /package/dist/{chunk-JZMSWUO5.mjs.map → chunk-CCBDLLRT.mjs.map} +0 -0
@@ -26,8 +26,8 @@ __export(graphql_exports, {
26
26
  useContactUs: () => useContactUs,
27
27
  useCreateAd: () => useCreateAd,
28
28
  useCreateBulkNotifications: () => useCreateBulkNotifications,
29
- useCreateMarket: () => useCreateMarket,
30
- useCreateMarketInfo: () => useCreateMarketInfo,
29
+ useCreateEvent: () => useCreateEvent,
30
+ useCreateEventInfo: () => useCreateEventInfo,
31
31
  useCreatePoster: () => useCreatePoster,
32
32
  useCreatePushToken: () => useCreatePushToken,
33
33
  useCreateRelation: () => useCreateRelation,
@@ -39,7 +39,7 @@ __export(graphql_exports, {
39
39
  useDeleteAd: () => useDeleteAd,
40
40
  useDeleteAllNotifications: () => useDeleteAllNotifications,
41
41
  useDeleteChat: () => useDeleteChat,
42
- useDeleteMarket: () => useDeleteMarket,
42
+ useDeleteEvent: () => useDeleteEvent,
43
43
  useDeleteNotification: () => useDeleteNotification,
44
44
  useDeleteRelation: () => useDeleteRelation,
45
45
  useDeleteStallholder: () => useDeleteStallholder,
@@ -50,16 +50,16 @@ __export(graphql_exports, {
50
50
  useGetAdsByRegion: () => useGetAdsByRegion,
51
51
  useGetChat: () => useGetChat,
52
52
  useGetChatSubscription: () => useGetChatSubscription,
53
- useGetMarket: () => useGetMarket,
54
- useGetMarketInfo: () => useGetMarketInfo,
55
- useGetMarketRelations: () => useGetMarketRelations,
56
- useGetMarkets: () => useGetMarkets,
57
- useGetMarketsByRegion: () => useGetMarketsByRegion,
58
- useGetMarketsNearMe: () => useGetMarketsNearMe,
53
+ useGetEvent: () => useGetEvent,
54
+ useGetEventInfo: () => useGetEventInfo,
55
+ useGetEventRelations: () => useGetEventRelations,
56
+ useGetEvents: () => useGetEvents,
57
+ useGetEventsByRegion: () => useGetEventsByRegion,
58
+ useGetEventsNearMe: () => useGetEventsNearMe,
59
59
  useGetNotificationCount: () => useGetNotificationCount,
60
60
  useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
61
61
  useGetRelation: () => useGetRelation,
62
- useGetRelationByMarketAndStallholder: () => useGetRelationByMarketAndStallholder,
62
+ useGetRelationByEventAndStallholder: () => useGetRelationByEventAndStallholder,
63
63
  useGetResourceConnections: () => useGetResourceConnections,
64
64
  useGetResourceViews: () => useGetResourceViews,
65
65
  useGetStallholder: () => useGetStallholder,
@@ -71,8 +71,8 @@ __export(graphql_exports, {
71
71
  useGetTesters: () => useGetTesters,
72
72
  useGetUser: () => useGetUser,
73
73
  useGetUserChats: () => useGetUserChats,
74
+ useGetUserEvents: () => useGetUserEvents,
74
75
  useGetUserFavourites: () => useGetUserFavourites,
75
- useGetUserMarkets: () => useGetUserMarkets,
76
76
  useGetUserNotifications: () => useGetUserNotifications,
77
77
  useGetUserNotificationsSubscription: () => useGetUserNotificationsSubscription,
78
78
  useGetUserStallholder: () => useGetUserStallholder,
@@ -87,13 +87,13 @@ __export(graphql_exports, {
87
87
  useRemoveUserFavouriteResource: () => useRemoveUserFavouriteResource,
88
88
  useRequestPasswordReset: () => useRequestPasswordReset,
89
89
  useResetPassword: () => useResetPassword,
90
- useSearchMarkets: () => useSearchMarkets,
90
+ useSearchEvents: () => useSearchEvents,
91
91
  useSearchStallholders: () => useSearchStallholders,
92
92
  useSelectPackage: () => useSelectPackage,
93
93
  useSendChatMessage: () => useSendChatMessage,
94
94
  useUpdateAd: () => useUpdateAd,
95
- useUpdateMarket: () => useUpdateMarket,
96
- useUpdateMarketInfo: () => useUpdateMarketInfo,
95
+ useUpdateEvent: () => useUpdateEvent,
96
+ useUpdateEventInfo: () => useUpdateEventInfo,
97
97
  useUpdateRelation: () => useUpdateRelation,
98
98
  useUpdateStallholder: () => useUpdateStallholder,
99
99
  useUpdateStallholderInfo: () => useUpdateStallholderInfo,
@@ -118,7 +118,7 @@ var ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = import_client.gql`
118
118
  }
119
119
  `;
120
120
 
121
- // src/graphql/queries/market.ts
121
+ // src/graphql/queries/event.ts
122
122
  var import_client3 = require("@apollo/client");
123
123
 
124
124
  // src/graphql/queries/global.ts
@@ -174,13 +174,13 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
174
174
  email
175
175
  isTester
176
176
  favourites {
177
- markets
177
+ events
178
178
  stallholders
179
179
  }
180
180
  firstName
181
181
  lastName
182
182
  licences
183
- markets
183
+ events
184
184
  platform
185
185
  preferredRegion
186
186
  refreshToken
@@ -202,17 +202,17 @@ var STALL_TYPE_FIELDS_FRAGMENT = import_client2.gql`
202
202
  }
203
203
  `;
204
204
 
205
- // src/graphql/queries/market.ts
206
- var MARKET_DATETIME_FIELDS_FRAGMENT = import_client3.gql`
207
- fragment MarketDateTimeFields on MarketDateTimeType {
205
+ // src/graphql/queries/event.ts
206
+ var EVENT_DATETIME_FIELDS_FRAGMENT = import_client3.gql`
207
+ fragment EventDateTimeFields on EventDateTimeType {
208
208
  endDate
209
209
  endTime
210
210
  startDate
211
211
  startTime
212
212
  }
213
213
  `;
214
- var MARKET_LOCATION_FIELDS_FRAGMENT = import_client3.gql`
215
- fragment MarketLocationFields on MarketLocationType {
214
+ var EVENT_LOCATION_FIELDS_FRAGMENT = import_client3.gql`
215
+ fragment EventLocationFields on EventLocationType {
216
216
  city
217
217
  coordinates
218
218
  country
@@ -223,8 +223,8 @@ var MARKET_LOCATION_FIELDS_FRAGMENT = import_client3.gql`
223
223
  type
224
224
  }
225
225
  `;
226
- var MARKET_INFO = import_client3.gql`
227
- fragment MarketInfoFields on MarketInfoType {
226
+ var EVENT_INFO = import_client3.gql`
227
+ fragment EventInfoFields on EventInfoType {
228
228
  _id
229
229
  applicationDeadlineHours
230
230
  contactDetails {
@@ -241,7 +241,7 @@ var MARKET_INFO = import_client3.gql`
241
241
  startDate
242
242
  startTime
243
243
  }
244
- marketId
244
+ eventId
245
245
  packInTime
246
246
  paymentDueHours
247
247
  paymentInfo {
@@ -258,8 +258,8 @@ var MARKET_INFO = import_client3.gql`
258
258
  }
259
259
  ${STALL_TYPE_FIELDS_FRAGMENT}
260
260
  `;
261
- var MARKET = import_client3.gql`
262
- fragment MarketFields on MarketType {
261
+ var EVENT = import_client3.gql`
262
+ fragment EventFields on EventType {
263
263
  _id
264
264
  active
265
265
  adIds
@@ -268,20 +268,21 @@ var MARKET = import_client3.gql`
268
268
  }
269
269
  createdAt
270
270
  dateTime {
271
- ...MarketDateTimeFields
271
+ ...EventDateTimeFields
272
272
  }
273
273
  description
274
274
  deletedAt
275
275
  images {
276
276
  ...ResourceImageFields
277
277
  }
278
+ eventType
278
279
  location {
279
- ...MarketLocationFields
280
+ ...EventLocationFields
280
281
  }
281
282
  logo {
282
283
  ...ResourceImageFields
283
284
  }
284
- marketInfoId
285
+ eventInfoId
285
286
  name
286
287
  owner {
287
288
  ...OwnerFields
@@ -300,60 +301,60 @@ var MARKET = import_client3.gql`
300
301
  tags
301
302
  updatedAt
302
303
  }
303
- ${MARKET_DATETIME_FIELDS_FRAGMENT}
304
- ${MARKET_LOCATION_FIELDS_FRAGMENT}
304
+ ${EVENT_DATETIME_FIELDS_FRAGMENT}
305
+ ${EVENT_LOCATION_FIELDS_FRAGMENT}
305
306
  ${OWNER_FIELDS_FRAGMENT}
306
307
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
307
308
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
308
309
  ${POSTER_USAGE_FIELDS_FRAGMENT}
309
310
  `;
310
- var GET_MARKETS = import_client3.gql`
311
- query getMarkets {
312
- markets {
313
- ...MarketFields
311
+ var GET_EVENTS = import_client3.gql`
312
+ query getEvents {
313
+ events {
314
+ ...EventFields
314
315
  }
315
316
  }
316
- ${MARKET}
317
+ ${EVENT}
317
318
  `;
318
- var GET_MARKET = import_client3.gql`
319
- query getMarket($_id: ID!) {
320
- market(_id: $_id) {
321
- ...MarketFields
319
+ var GET_EVENT = import_client3.gql`
320
+ query getEvent($_id: ID!) {
321
+ event(_id: $_id) {
322
+ ...EventFields
322
323
  }
323
324
  }
324
- ${MARKET}
325
+ ${EVENT}
325
326
  `;
326
- var GET_MARKETS_BY_REGION = import_client3.gql`
327
- query getMarketsByRegion($region: String!) {
328
- marketsByRegion(region: $region) {
329
- ...MarketFields
327
+ var GET_EVENTS_BY_REGION = import_client3.gql`
328
+ query getEventsByRegion($region: String!) {
329
+ eventsByRegion(region: $region) {
330
+ ...EventFields
330
331
  }
331
332
  }
332
- ${MARKET}
333
+ ${EVENT}
333
334
  `;
334
- var SEARCH_MARKETS = import_client3.gql`
335
- query searchMarkets($search: String!, $region: String) {
336
- marketSearch(search: $search, region: $region) {
337
- ...MarketFields
335
+ var SEARCH_EVENTS = import_client3.gql`
336
+ query searchEvents($search: String!, $region: String) {
337
+ eventSearch(search: $search, region: $region) {
338
+ ...EventFields
338
339
  }
339
340
  }
340
- ${MARKET}
341
+ ${EVENT}
341
342
  `;
342
- var GET_MARKETS_NEAR_ME = import_client3.gql`
343
- query getMarketsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
344
- marketsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
345
- ...MarketFields
343
+ var GET_EVENTS_NEAR_ME = import_client3.gql`
344
+ query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
345
+ eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
346
+ ...EventFields
346
347
  }
347
348
  }
348
- ${MARKET}
349
+ ${EVENT}
349
350
  `;
350
- var GET_MARKET_INFO = import_client3.gql`
351
- query getMarketInfo($marketId: ID!) {
352
- marketInfo(marketId: $marketId) {
353
- ...MarketInfoFields
351
+ var GET_EVENT_INFO = import_client3.gql`
352
+ query getEventInfo($eventId: ID!) {
353
+ eventInfo(eventId: $eventId) {
354
+ ...EventInfoFields
354
355
  }
355
356
  }
356
- ${MARKET_INFO}
357
+ ${EVENT_INFO}
357
358
  `;
358
359
 
359
360
  // src/graphql/queries/stallholder.ts
@@ -520,7 +521,7 @@ var useAdminUpdateResourceType = () => {
520
521
  const resourceId = adminUpdateResourceType2?.resourceId;
521
522
  const resourceType = adminUpdateResourceType2?.resourceType;
522
523
  if (!resourceId) return [];
523
- const detectQuery = resourceType === "market" /* MARKET */ ? GET_MARKET : GET_STALLHOLDER;
524
+ const detectQuery = resourceType === "event" /* EVENT */ ? GET_EVENT : GET_STALLHOLDER;
524
525
  return [
525
526
  {
526
527
  query: detectQuery,
@@ -686,7 +687,7 @@ var CHAT_FIELDS_FRAGMENT = import_client8.gql`
686
687
  ...ChatParticipantFields
687
688
  }
688
689
  resourceInfo {
689
- marketId
690
+ eventId
690
691
  stallholderId
691
692
  }
692
693
  updatedAt
@@ -867,47 +868,47 @@ var useContactUs = () => {
867
868
  return { contactUs, error, loading };
868
869
  };
869
870
 
870
- // src/graphql/hooks/market/hooksMutation.ts
871
+ // src/graphql/hooks/event/hooksMutation.ts
871
872
  var import_client17 = require("@apollo/client");
872
873
 
873
- // src/graphql/mutations/market.ts
874
+ // src/graphql/mutations/event.ts
874
875
  var import_client15 = require("@apollo/client");
875
- var CREATE_MARKET_MUTATION = import_client15.gql`
876
- mutation createMarket($input: MarketInputType!) {
877
- createMarket(input: $input) {
878
- ...MarketFields
876
+ var CREATE_EVENT_MUTATION = import_client15.gql`
877
+ mutation createEvent($input: EventInputType!) {
878
+ createEvent(input: $input) {
879
+ ...EventFields
879
880
  }
880
881
  }
881
- ${MARKET}
882
+ ${EVENT}
882
883
  `;
883
- var UPDATE_MARKET_MUTATION = import_client15.gql`
884
- mutation updateMarket($_id: ID!, $input: MarketInputType!) {
885
- updateMarket(_id: $_id, input: $input) {
886
- ...MarketFields
884
+ var UPDATE_EVENT_MUTATION = import_client15.gql`
885
+ mutation updateEvent($_id: ID!, $input: EventInputType!) {
886
+ updateEvent(_id: $_id, input: $input) {
887
+ ...EventFields
887
888
  }
888
889
  }
889
- ${MARKET}
890
+ ${EVENT}
890
891
  `;
891
- var DELETE_MARKET_MUTATION = import_client15.gql`
892
- mutation deleteMarket($_id: ID!) {
893
- deleteMarket(_id: $_id)
892
+ var DELETE_EVENT_MUTATION = import_client15.gql`
893
+ mutation deleteEvent($_id: ID!) {
894
+ deleteEvent(_id: $_id)
894
895
  }
895
896
  `;
896
- var CREATE_MARKET_INFO_MUTATION = import_client15.gql`
897
- mutation createMarketInfo($input: MarketInfoInputType!) {
898
- createMarketInfo(input: $input) {
899
- ...MarketInfoFields
897
+ var CREATE_EVENT_INFO_MUTATION = import_client15.gql`
898
+ mutation createEventInfo($input: EventInfoInputType!) {
899
+ createEventInfo(input: $input) {
900
+ ...EventInfoFields
900
901
  }
901
902
  }
902
- ${MARKET_INFO}
903
+ ${EVENT_INFO}
903
904
  `;
904
- var UPDATE_MARKET_INFO_MUTATION = import_client15.gql`
905
- mutation updateMarketInfo($_id: ID!, $input: MarketInfoInputType!) {
906
- updateMarketInfo(_id: $_id, input: $input) {
907
- ...MarketInfoFields
905
+ var UPDATE_EVENT_INFO_MUTATION = import_client15.gql`
906
+ mutation updateEventInfo($_id: ID!, $input: EventInfoInputType!) {
907
+ updateEventInfo(_id: $_id, input: $input) {
908
+ ...EventInfoFields
908
909
  }
909
910
  }
910
- ${MARKET_INFO}
911
+ ${EVENT_INFO}
911
912
  `;
912
913
 
913
914
  // src/graphql/queries/user.ts
@@ -928,13 +929,13 @@ var GET_USER = import_client16.gql`
928
929
  }
929
930
  ${USER_FIELDS_FRAGMENT}
930
931
  `;
931
- var GET_USER_MARKETS = import_client16.gql`
932
- query getUserMarkets {
933
- userMarkets {
934
- ...MarketFields
932
+ var GET_USER_EVENTS = import_client16.gql`
933
+ query getUserEvents {
934
+ userEvents {
935
+ ...EventFields
935
936
  }
936
937
  }
937
- ${MARKET}
938
+ ${EVENT}
938
939
  `;
939
940
  var GET_USER_STALLHOLDER = import_client16.gql`
940
941
  query getUserStallholder {
@@ -947,139 +948,130 @@ var GET_USER_STALLHOLDER = import_client16.gql`
947
948
  var GET_USER_FAVOURITES = import_client16.gql`
948
949
  query getUserFavourites {
949
950
  userFavourites {
950
- markets {
951
- ...MarketFields
951
+ events {
952
+ ...EventFields
952
953
  }
953
954
  stallholders {
954
955
  ...StallholderFields
955
956
  }
956
957
  }
957
958
  }
958
- ${MARKET}
959
+ ${EVENT}
959
960
  ${STALLHOLDER}
960
961
  `;
961
962
 
962
- // src/graphql/hooks/market/hooksMutation.ts
963
- var useCreateMarket = () => {
964
- const [createMarket, { loading, error }] = (0, import_client17.useMutation)(
965
- CREATE_MARKET_MUTATION,
966
- {
967
- awaitRefetchQueries: true,
968
- refetchQueries: [{ fetchPolicy: "no-cache", query: GET_USER_MARKETS }]
969
- }
970
- );
971
- return { createMarket, error, loading };
963
+ // src/graphql/hooks/event/hooksMutation.ts
964
+ var useCreateEvent = () => {
965
+ const [createEvent, { loading, error }] = (0, import_client17.useMutation)(CREATE_EVENT_MUTATION, {
966
+ awaitRefetchQueries: true,
967
+ refetchQueries: [{ fetchPolicy: "no-cache", query: GET_USER_EVENTS }]
968
+ });
969
+ return { createEvent, error, loading };
972
970
  };
973
- var useUpdateMarket = () => {
974
- const [updateMarket, { loading, error }] = (0, import_client17.useMutation)(
975
- UPDATE_MARKET_MUTATION,
976
- {
977
- awaitRefetchQueries: true,
978
- refetchQueries: [{ fetchPolicy: "no-cache", query: GET_USER_MARKETS }]
979
- }
980
- );
981
- return { error, loading, updateMarket };
971
+ var useUpdateEvent = () => {
972
+ const [updateEvent, { loading, error }] = (0, import_client17.useMutation)(UPDATE_EVENT_MUTATION, {
973
+ awaitRefetchQueries: true,
974
+ refetchQueries: [{ fetchPolicy: "no-cache", query: GET_USER_EVENTS }]
975
+ });
976
+ return { error, loading, updateEvent };
982
977
  };
983
- var useDeleteMarket = () => {
984
- const [deleteMarket, { loading, error }] = (0, import_client17.useMutation)(
985
- DELETE_MARKET_MUTATION,
986
- {
987
- awaitRefetchQueries: true,
988
- refetchQueries: [{ fetchPolicy: "no-cache", query: GET_USER_MARKETS }]
989
- }
990
- );
991
- return { deleteMarket, error, loading };
978
+ var useDeleteEvent = () => {
979
+ const [deleteEvent, { loading, error }] = (0, import_client17.useMutation)(DELETE_EVENT_MUTATION, {
980
+ awaitRefetchQueries: true,
981
+ refetchQueries: [{ fetchPolicy: "no-cache", query: GET_USER_EVENTS }]
982
+ });
983
+ return { deleteEvent, error, loading };
992
984
  };
993
- var useCreateMarketInfo = () => {
994
- const [createMarketInfo, { loading, error }] = (0, import_client17.useMutation)(
995
- CREATE_MARKET_INFO_MUTATION,
985
+ var useCreateEventInfo = () => {
986
+ const [createEventInfo, { loading, error }] = (0, import_client17.useMutation)(
987
+ CREATE_EVENT_INFO_MUTATION,
996
988
  {
997
989
  awaitRefetchQueries: true,
998
990
  refetchQueries: (mutationResult) => {
999
- const marketId = mutationResult?.data?.createMarketInfo?.marketId;
1000
- if (!marketId) return [];
991
+ const eventId = mutationResult?.data?.createEventInfo?.eventId;
992
+ if (!eventId) return [];
1001
993
  return [
1002
994
  {
1003
- query: GET_MARKET_INFO,
1004
- variables: { marketId }
1005
- // Pass the marketId for refetching
995
+ query: GET_EVENT_INFO,
996
+ variables: { eventId }
997
+ // Pass the eventId for refetching
1006
998
  },
1007
999
  {
1008
1000
  fetchPolicy: "no-cache",
1009
- query: GET_MARKET,
1010
- variables: { _id: marketId }
1011
- // Pass the marketId for refetching
1001
+ query: GET_EVENT,
1002
+ variables: { _id: eventId }
1003
+ // Pass the eventId for refetching
1012
1004
  }
1013
1005
  ];
1014
1006
  }
1015
1007
  }
1016
1008
  );
1017
- return { createMarketInfo, error, loading };
1009
+ return { createEventInfo, error, loading };
1018
1010
  };
1019
- var useUpdateMarketInfo = () => {
1020
- const [updateMarketInfo, { loading, error }] = (0, import_client17.useMutation)(
1021
- UPDATE_MARKET_INFO_MUTATION,
1011
+ var useUpdateEventInfo = () => {
1012
+ const [updateEventInfo, { loading, error }] = (0, import_client17.useMutation)(
1013
+ UPDATE_EVENT_INFO_MUTATION,
1022
1014
  {
1023
1015
  awaitRefetchQueries: true,
1024
1016
  refetchQueries: (mutationResult) => {
1025
- const marketId = mutationResult?.data?.updateMarketInfo?.marketId;
1026
- if (!marketId) return [];
1017
+ const eventId = mutationResult?.data?.updateEventInfo?.eventId;
1018
+ if (!eventId) return [];
1027
1019
  return [
1028
1020
  {
1029
- query: GET_MARKET_INFO,
1030
- variables: { marketId }
1031
- // Pass the marketId for refetching
1021
+ query: GET_EVENT_INFO,
1022
+ variables: { eventId }
1023
+ // Pass the eventId for refetching
1032
1024
  },
1033
1025
  {
1034
- query: GET_MARKET,
1035
- variables: { _id: marketId }
1036
- // Pass the marketId for refetching
1026
+ query: GET_EVENT,
1027
+ variables: { _id: eventId }
1028
+ // Pass the eventId for refetching
1037
1029
  }
1038
1030
  ];
1039
1031
  }
1040
1032
  }
1041
1033
  );
1042
- return { error, loading, updateMarketInfo };
1034
+ return { error, loading, updateEventInfo };
1043
1035
  };
1044
1036
 
1045
- // src/graphql/hooks/market/hooksQuery.ts
1037
+ // src/graphql/hooks/event/hooksQuery.ts
1046
1038
  var import_client18 = require("@apollo/client");
1047
- var useGetMarkets = () => {
1048
- const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKETS, {
1039
+ var useGetEvents = () => {
1040
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENTS, {
1049
1041
  fetchPolicy: "network-only"
1050
1042
  });
1051
- const markets = data?.markets;
1052
- return { error, loading, markets, refetch };
1043
+ const events = data?.events;
1044
+ return { error, events, loading, refetch };
1053
1045
  };
1054
- var useGetMarket = (_id) => {
1055
- const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKET, {
1046
+ var useGetEvent = (_id) => {
1047
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENT, {
1056
1048
  fetchPolicy: "network-only",
1057
1049
  skip: !_id,
1058
1050
  variables: { _id }
1059
1051
  });
1060
- const market = data?.market;
1061
- return { error, loading, market, refetch };
1052
+ const event = data?.event;
1053
+ return { error, event, loading, refetch };
1062
1054
  };
1063
- var useGetMarketsByRegion = (region) => {
1064
- const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKETS_BY_REGION, {
1055
+ var useGetEventsByRegion = (region) => {
1056
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENTS_BY_REGION, {
1065
1057
  fetchPolicy: "no-cache",
1066
1058
  skip: !region,
1067
1059
  variables: { region }
1068
1060
  });
1069
- const marketsByRegion = data?.marketsByRegion;
1070
- return { error, loading, marketsByRegion, refetch };
1061
+ const eventsByRegion = data?.eventsByRegion;
1062
+ return { error, eventsByRegion, loading, refetch };
1071
1063
  };
1072
- var useSearchMarkets = (search, region) => {
1073
- const { loading, error, data, refetch } = (0, import_client18.useQuery)(SEARCH_MARKETS, {
1064
+ var useSearchEvents = (search, region) => {
1065
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(SEARCH_EVENTS, {
1074
1066
  fetchPolicy: "network-only",
1075
1067
  skip: search.length < 3,
1076
1068
  variables: { region, search }
1077
1069
  });
1078
- const marketsSearch = data?.marketSearch;
1079
- return { error, loading, marketsSearch, refetch };
1070
+ const eventsSearch = data?.eventsSearch;
1071
+ return { error, eventsSearch, loading, refetch };
1080
1072
  };
1081
- var useGetMarketsNearMe = (location) => {
1082
- const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKETS_NEAR_ME, {
1073
+ var useGetEventsNearMe = (location) => {
1074
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENTS_NEAR_ME, {
1083
1075
  fetchPolicy: "network-only",
1084
1076
  skip: !location.latitude || !location.longitude,
1085
1077
  variables: {
@@ -1089,17 +1081,17 @@ var useGetMarketsNearMe = (location) => {
1089
1081
  // Default to 10km if no radius is provided
1090
1082
  }
1091
1083
  });
1092
- const marketsNearMe = data?.marketsNearMe;
1093
- return { error, loading, marketsNearMe, refetch };
1084
+ const eventsNearMe = data?.eventsNearMe;
1085
+ return { error, eventsNearMe, loading, refetch };
1094
1086
  };
1095
- var useGetMarketInfo = (marketId) => {
1096
- const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKET_INFO, {
1087
+ var useGetEventInfo = (eventId) => {
1088
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENT_INFO, {
1097
1089
  fetchPolicy: "network-only",
1098
- skip: !marketId,
1099
- variables: { marketId }
1090
+ skip: !eventId,
1091
+ variables: { eventId }
1100
1092
  });
1101
- const marketInfo = data?.marketInfo;
1102
- return { error, loading, marketInfo, refetch };
1093
+ const eventInfo = data?.eventInfo;
1094
+ return { error, eventInfo, loading, refetch };
1103
1095
  };
1104
1096
 
1105
1097
  // src/graphql/hooks/notifications/hooksMutation.ts
@@ -1349,7 +1341,7 @@ var useCreatePoster = () => {
1349
1341
  {
1350
1342
  fetchPolicy: "no-cache",
1351
1343
  refetchQueries: [
1352
- { query: GET_USER_MARKETS },
1344
+ { query: GET_USER_EVENTS },
1353
1345
  { query: GET_USER_STALLHOLDER }
1354
1346
  ]
1355
1347
  }
@@ -1407,7 +1399,7 @@ var RELATION_FIELDS_FRAGMENT = import_client29.gql`
1407
1399
  chatId
1408
1400
  createdAt
1409
1401
  lastUpdateBy
1410
- marketId
1402
+ eventId
1411
1403
  relationDates {
1412
1404
  ...RelationDates
1413
1405
  }
@@ -1425,10 +1417,10 @@ var GET_RELATION = import_client29.gql`
1425
1417
  }
1426
1418
  ${RELATION_FIELDS_FRAGMENT}
1427
1419
  `;
1428
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client29.gql`
1429
- query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
1430
- relationByMarketAndStallholder(
1431
- marketId: $marketId
1420
+ var GET_RELATION_BY_EVENT_AND_STALLHOLDER = import_client29.gql`
1421
+ query getRelationByEventAndStallholder($eventId: ID!, $stallholderId: ID!) {
1422
+ relationByEventAndStallholder(
1423
+ eventId: $eventId
1432
1424
  stallholderId: $stallholderId
1433
1425
  ) {
1434
1426
  ...RelationFields
@@ -1436,9 +1428,9 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client29.gql`
1436
1428
  }
1437
1429
  ${RELATION_FIELDS_FRAGMENT}
1438
1430
  `;
1439
- var GET_MARKET_RELATIONS = import_client29.gql`
1440
- query getMarketRelations($marketId: ID!) {
1441
- marketRelations(marketId: $marketId) {
1431
+ var GET_EVENT_RELATIONS = import_client29.gql`
1432
+ query getEventRelations($eventId: ID!) {
1433
+ eventRelations(eventId: $eventId) {
1442
1434
  ...RelationFields
1443
1435
  }
1444
1436
  }
@@ -1458,7 +1450,7 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
1458
1450
  $resourceType: ResourceTypeEnum!
1459
1451
  ) {
1460
1452
  resourceConnections(resourceId: $resourceId, resourceType: $resourceType) {
1461
- markets {
1453
+ events {
1462
1454
  _id
1463
1455
  active
1464
1456
  adIds
@@ -1467,20 +1459,21 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
1467
1459
  }
1468
1460
  createdAt
1469
1461
  dateTime {
1470
- ...MarketDateTimeFields
1462
+ ...EventDateTimeFields
1471
1463
  }
1472
1464
  description
1473
1465
  deletedAt
1474
1466
  images {
1475
1467
  ...ResourceImageFields
1476
1468
  }
1469
+ eventType
1477
1470
  location {
1478
- ...MarketLocationFields
1471
+ ...EventLocationFields
1479
1472
  }
1480
1473
  logo {
1481
1474
  ...ResourceImageFields
1482
1475
  }
1483
- marketInfoId
1476
+ eventInfoId
1484
1477
  name
1485
1478
  owner {
1486
1479
  ...OwnerFields
@@ -1554,8 +1547,8 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
1554
1547
  }
1555
1548
  }
1556
1549
  }
1557
- ${MARKET_DATETIME_FIELDS_FRAGMENT}
1558
- ${MARKET_LOCATION_FIELDS_FRAGMENT}
1550
+ ${EVENT_DATETIME_FIELDS_FRAGMENT}
1551
+ ${EVENT_LOCATION_FIELDS_FRAGMENT}
1559
1552
  ${OWNER_FIELDS_FRAGMENT}
1560
1553
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
1561
1554
  ${CATEGORY_FIELDS_FRAGMENT}
@@ -1601,20 +1594,25 @@ var useCreateRelation = () => {
1601
1594
  awaitRefetchQueries: true,
1602
1595
  refetchQueries: (mutationResult) => {
1603
1596
  const createRelation2 = mutationResult?.data?.createRelation;
1604
- const marketId = createRelation2?.marketId;
1597
+ const eventId = createRelation2?.eventId;
1605
1598
  const stallholderId = createRelation2?.stallholderId;
1606
1599
  const resourceType = createRelation2?.lastUpdateBy;
1607
- const resourceId = resourceType === "market" /* MARKET */ ? marketId : stallholderId;
1600
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : stallholderId;
1608
1601
  return [
1609
1602
  {
1610
1603
  fetchPolicy,
1611
- query: GET_MARKET_RELATIONS,
1612
- variables: { marketId }
1604
+ query: GET_EVENT_RELATIONS,
1605
+ variables: { eventId }
1613
1606
  },
1614
1607
  {
1615
1608
  fetchPolicy,
1616
- query: GET_MARKET,
1617
- variables: { _id: marketId }
1609
+ query: GET_EVENT,
1610
+ variables: { _id: eventId }
1611
+ },
1612
+ {
1613
+ fetchPolicy,
1614
+ query: GET_EVENT_INFO,
1615
+ variables: { eventId }
1618
1616
  },
1619
1617
  {
1620
1618
  fetchPolicy,
@@ -1628,8 +1626,8 @@ var useCreateRelation = () => {
1628
1626
  },
1629
1627
  {
1630
1628
  fetchPolicy,
1631
- query: GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1632
- variables: { marketId, stallholderId }
1629
+ query: GET_RELATION_BY_EVENT_AND_STALLHOLDER,
1630
+ variables: { eventId, stallholderId }
1633
1631
  },
1634
1632
  {
1635
1633
  fetchPolicy,
@@ -1653,20 +1651,25 @@ var useUpdateRelation = () => {
1653
1651
  awaitRefetchQueries: true,
1654
1652
  refetchQueries: (mutationResult) => {
1655
1653
  const updateRelation2 = mutationResult?.data?.updateRelation;
1656
- const marketId = updateRelation2?.marketId;
1654
+ const eventId = updateRelation2?.eventId;
1657
1655
  const stallholderId = updateRelation2?.stallholderId;
1658
1656
  const resourceType = updateRelation2?.lastUpdateBy;
1659
- const resourceId = resourceType === "market" /* MARKET */ ? marketId : stallholderId;
1657
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : stallholderId;
1660
1658
  return [
1661
1659
  {
1662
1660
  fetchPolicy,
1663
- query: GET_MARKET_RELATIONS,
1664
- variables: { marketId }
1661
+ query: GET_EVENT_RELATIONS,
1662
+ variables: { eventId }
1663
+ },
1664
+ {
1665
+ fetchPolicy,
1666
+ query: GET_EVENT,
1667
+ variables: { _id: eventId }
1665
1668
  },
1666
1669
  {
1667
1670
  fetchPolicy,
1668
- query: GET_MARKET,
1669
- variables: { _id: marketId }
1671
+ query: GET_EVENT_INFO,
1672
+ variables: { eventId }
1670
1673
  },
1671
1674
  {
1672
1675
  fetchPolicy,
@@ -1680,8 +1683,8 @@ var useUpdateRelation = () => {
1680
1683
  },
1681
1684
  {
1682
1685
  fetchPolicy,
1683
- query: GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1684
- variables: { marketId, stallholderId }
1686
+ query: GET_RELATION_BY_EVENT_AND_STALLHOLDER,
1687
+ variables: { eventId, stallholderId }
1685
1688
  },
1686
1689
  {
1687
1690
  fetchPolicy,
@@ -1701,20 +1704,20 @@ var useDeleteRelation = () => {
1701
1704
  awaitRefetchQueries: true,
1702
1705
  refetchQueries: (mutationResult) => {
1703
1706
  const deleteRelation2 = mutationResult?.data?.deleteRelation;
1704
- const marketId = deleteRelation2?.marketId;
1707
+ const eventId = deleteRelation2?.eventId;
1705
1708
  const stallholderId = deleteRelation2?.stallholderId;
1706
1709
  const resourceType = deleteRelation2?.lastUpdateBy;
1707
- const resourceId = resourceType === "market" /* MARKET */ ? marketId : stallholderId;
1710
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : stallholderId;
1708
1711
  return [
1709
1712
  {
1710
1713
  fetchPolicy,
1711
- query: GET_MARKET_INFO,
1712
- variables: { marketId }
1714
+ query: GET_EVENT_INFO,
1715
+ variables: { eventId }
1713
1716
  },
1714
1717
  {
1715
1718
  fetchPolicy,
1716
- query: GET_MARKET_RELATIONS,
1717
- variables: { marketId }
1719
+ query: GET_EVENT_RELATIONS,
1720
+ variables: { eventId }
1718
1721
  },
1719
1722
  {
1720
1723
  fetchPolicy,
@@ -1723,8 +1726,8 @@ var useDeleteRelation = () => {
1723
1726
  },
1724
1727
  {
1725
1728
  fetchPolicy,
1726
- query: GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1727
- variables: { marketId, stallholderId }
1729
+ query: GET_RELATION_BY_EVENT_AND_STALLHOLDER,
1730
+ variables: { eventId, stallholderId }
1728
1731
  },
1729
1732
  {
1730
1733
  fetchPolicy,
@@ -1753,26 +1756,26 @@ var useGetRelation = (_id) => {
1753
1756
  const relation = data?.relation;
1754
1757
  return { error, loading, refetch, relation };
1755
1758
  };
1756
- var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1759
+ var useGetRelationByEventAndStallholder = (eventId, stallholderId) => {
1757
1760
  const { loading, error, data, refetch } = (0, import_client32.useQuery)(
1758
- GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1761
+ GET_RELATION_BY_EVENT_AND_STALLHOLDER,
1759
1762
  {
1760
1763
  fetchPolicy: "network-only",
1761
- skip: !marketId || !stallholderId,
1762
- variables: { marketId, stallholderId }
1764
+ skip: !eventId || !stallholderId,
1765
+ variables: { eventId, stallholderId }
1763
1766
  }
1764
1767
  );
1765
- const relationByMarketAndStallholder = data?.relationByMarketAndStallholder;
1766
- return { error, loading, refetch, relationByMarketAndStallholder };
1768
+ const relationByEventAndStallholder = data?.relationByEventAndStallholder;
1769
+ return { error, loading, refetch, relationByEventAndStallholder };
1767
1770
  };
1768
- var useGetMarketRelations = (marketId) => {
1769
- const { loading, error, data, refetch } = (0, import_client32.useQuery)(GET_MARKET_RELATIONS, {
1771
+ var useGetEventRelations = (eventId) => {
1772
+ const { loading, error, data, refetch } = (0, import_client32.useQuery)(GET_EVENT_RELATIONS, {
1770
1773
  fetchPolicy: "network-only",
1771
- skip: !marketId,
1772
- variables: { marketId }
1774
+ skip: !eventId,
1775
+ variables: { eventId }
1773
1776
  });
1774
- const marketRelations = data?.marketRelations;
1775
- return { error, loading, marketRelations, refetch };
1777
+ const eventRelations = data?.eventRelations;
1778
+ return { error, eventRelations, loading, refetch };
1776
1779
  };
1777
1780
  var useGetStallholderRelations = (stallholderId) => {
1778
1781
  const { loading, error, data, refetch } = (0, import_client32.useQuery)(
@@ -2222,7 +2225,7 @@ var useSelectPackage = () => {
2222
2225
  if (!userId) return [];
2223
2226
  return [
2224
2227
  { query: GET_USER, variables: { _id: userId } },
2225
- { query: GET_USER_MARKETS },
2228
+ { query: GET_USER_EVENTS },
2226
2229
  { query: GET_USER_STALLHOLDER }
2227
2230
  ];
2228
2231
  }
@@ -2247,12 +2250,12 @@ var useGetUser = (_id) => {
2247
2250
  const user = data?.user;
2248
2251
  return { error, loading, refetch, user };
2249
2252
  };
2250
- var useGetUserMarkets = () => {
2251
- const { loading, error, data, refetch } = (0, import_client42.useQuery)(GET_USER_MARKETS, {
2253
+ var useGetUserEvents = () => {
2254
+ const { loading, error, data, refetch } = (0, import_client42.useQuery)(GET_USER_EVENTS, {
2252
2255
  fetchPolicy: "network-only"
2253
2256
  });
2254
- const userMarkets = data?.userMarkets;
2255
- return { error, loading, refetch, userMarkets };
2257
+ const userEvents = data?.userEvents;
2258
+ return { error, loading, refetch, userEvents };
2256
2259
  };
2257
2260
  var useGetUserStallholder = () => {
2258
2261
  const { loading, error, data, refetch } = (0, import_client42.useQuery)(GET_USER_STALLHOLDER, {
@@ -2265,10 +2268,10 @@ var useGetUserFavourites = () => {
2265
2268
  const { loading, error, data, refetch } = (0, import_client42.useQuery)(GET_USER_FAVOURITES, {
2266
2269
  fetchPolicy: "network-only"
2267
2270
  });
2268
- const markets = data?.userFavourites.markets;
2271
+ const events = data?.userFavourites.events;
2269
2272
  const stallholders = data?.userFavourites.stallholders;
2270
2273
  const userFavourites = {
2271
- markets,
2274
+ events,
2272
2275
  stallholders
2273
2276
  };
2274
2277
  return { error, loading, refetch, userFavourites };
@@ -2504,8 +2507,8 @@ var useGetResourceViews = (resourceId, resourceType) => {
2504
2507
  useContactUs,
2505
2508
  useCreateAd,
2506
2509
  useCreateBulkNotifications,
2507
- useCreateMarket,
2508
- useCreateMarketInfo,
2510
+ useCreateEvent,
2511
+ useCreateEventInfo,
2509
2512
  useCreatePoster,
2510
2513
  useCreatePushToken,
2511
2514
  useCreateRelation,
@@ -2517,7 +2520,7 @@ var useGetResourceViews = (resourceId, resourceType) => {
2517
2520
  useDeleteAd,
2518
2521
  useDeleteAllNotifications,
2519
2522
  useDeleteChat,
2520
- useDeleteMarket,
2523
+ useDeleteEvent,
2521
2524
  useDeleteNotification,
2522
2525
  useDeleteRelation,
2523
2526
  useDeleteStallholder,
@@ -2528,16 +2531,16 @@ var useGetResourceViews = (resourceId, resourceType) => {
2528
2531
  useGetAdsByRegion,
2529
2532
  useGetChat,
2530
2533
  useGetChatSubscription,
2531
- useGetMarket,
2532
- useGetMarketInfo,
2533
- useGetMarketRelations,
2534
- useGetMarkets,
2535
- useGetMarketsByRegion,
2536
- useGetMarketsNearMe,
2534
+ useGetEvent,
2535
+ useGetEventInfo,
2536
+ useGetEventRelations,
2537
+ useGetEvents,
2538
+ useGetEventsByRegion,
2539
+ useGetEventsNearMe,
2537
2540
  useGetNotificationCount,
2538
2541
  useGetNotificationCountSubscription,
2539
2542
  useGetRelation,
2540
- useGetRelationByMarketAndStallholder,
2543
+ useGetRelationByEventAndStallholder,
2541
2544
  useGetResourceConnections,
2542
2545
  useGetResourceViews,
2543
2546
  useGetStallholder,
@@ -2549,8 +2552,8 @@ var useGetResourceViews = (resourceId, resourceType) => {
2549
2552
  useGetTesters,
2550
2553
  useGetUser,
2551
2554
  useGetUserChats,
2555
+ useGetUserEvents,
2552
2556
  useGetUserFavourites,
2553
- useGetUserMarkets,
2554
2557
  useGetUserNotifications,
2555
2558
  useGetUserNotificationsSubscription,
2556
2559
  useGetUserStallholder,
@@ -2565,13 +2568,13 @@ var useGetResourceViews = (resourceId, resourceType) => {
2565
2568
  useRemoveUserFavouriteResource,
2566
2569
  useRequestPasswordReset,
2567
2570
  useResetPassword,
2568
- useSearchMarkets,
2571
+ useSearchEvents,
2569
2572
  useSearchStallholders,
2570
2573
  useSelectPackage,
2571
2574
  useSendChatMessage,
2572
2575
  useUpdateAd,
2573
- useUpdateMarket,
2574
- useUpdateMarketInfo,
2576
+ useUpdateEvent,
2577
+ useUpdateEventInfo,
2575
2578
  useUpdateRelation,
2576
2579
  useUpdateStallholder,
2577
2580
  useUpdateStallholderInfo,