@timardex/cluemart-shared 1.1.78 → 1.1.79

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