@timardex/cluemart-shared 1.0.81 → 1.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -30,8 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
- CREATE_BULK_NOTIFICATIONS: () => CREATE_BULK_NOTIFICATIONS,
34
- CREATE_NOTIFICATION: () => CREATE_NOTIFICATION,
35
33
  EnumInviteStatus: () => EnumInviteStatus,
36
34
  EnumNotification: () => EnumNotification,
37
35
  EnumOSType: () => EnumOSType,
@@ -43,12 +41,8 @@ __export(index_exports, {
43
41
  EnumSocialMedia: () => EnumSocialMedia,
44
42
  EnumUserLicence: () => EnumUserLicence,
45
43
  EnumUserRole: () => EnumUserRole,
46
- GET_NOTIFICATION_COUNT: () => GET_NOTIFICATION_COUNT,
47
- GET_UNREAD_NOTIFICATIONS: () => GET_UNREAD_NOTIFICATIONS,
48
- GET_USER_NOTIFICATIONS: () => GET_USER_NOTIFICATIONS2,
44
+ GET_CHAT_MESSAGE: () => GET_CHAT_MESSAGE,
49
45
  ImageTypeEnum: () => ImageTypeEnum,
50
- MARK_ALL_NOTIFICATIONS_READ: () => MARK_ALL_NOTIFICATIONS_READ,
51
- MARK_NOTIFICATION_READ: () => MARK_NOTIFICATION_READ,
52
46
  SAVED_EMAIL_KEY: () => SAVED_EMAIL_KEY,
53
47
  SAVED_PASSWORD_KEY: () => SAVED_PASSWORD_KEY,
54
48
  SAVED_REFRESH_TOKEN_KEY: () => SAVED_REFRESH_TOKEN_KEY,
@@ -138,6 +132,7 @@ __export(index_exports, {
138
132
  useDeleteTester: () => useDeleteTester,
139
133
  useDeleteUser: () => useDeleteUser,
140
134
  useGetChat: () => useGetChat,
135
+ useGetChatSubscription: () => useGetChatSubscription,
141
136
  useGetMarket: () => useGetMarket,
142
137
  useGetMarketInfo: () => useGetMarketInfo,
143
138
  useGetMarketRelations: () => useGetMarketRelations,
@@ -2668,9 +2663,22 @@ var useRemoveParticipantFromChat = () => {
2668
2663
  };
2669
2664
 
2670
2665
  // src/graphql/hooks/chat/hooksQuery.ts
2666
+ var import_client12 = require("@apollo/client");
2667
+
2668
+ // src/graphql/subscriptions/chat.ts
2671
2669
  var import_client11 = require("@apollo/client");
2670
+ var GET_CHAT_MESSAGE = import_client11.gql`
2671
+ subscription {
2672
+ getChatMessage {
2673
+ ...ChatFields
2674
+ }
2675
+ }
2676
+ ${CHAT_FIELDS_FRAGMENT}
2677
+ `;
2678
+
2679
+ // src/graphql/hooks/chat/hooksQuery.ts
2672
2680
  var useGetChat = (_id) => {
2673
- const { loading, error, data, refetch } = (0, import_client11.useQuery)(CHAT, {
2681
+ const { loading, error, data, refetch } = (0, import_client12.useQuery)(CHAT, {
2674
2682
  fetchPolicy: "network-only",
2675
2683
  skip: !_id,
2676
2684
  variables: { _id }
@@ -2679,19 +2687,24 @@ var useGetChat = (_id) => {
2679
2687
  return { chat, error, loading, refetch };
2680
2688
  };
2681
2689
  var useGetUserChats = () => {
2682
- const { loading, error, data, refetch } = (0, import_client11.useQuery)(USER_CHATS, {
2690
+ const { loading, error, data, refetch } = (0, import_client12.useQuery)(USER_CHATS, {
2683
2691
  fetchPolicy: "network-only"
2684
2692
  });
2685
2693
  const userChats = data?.userChats;
2686
2694
  return { error, loading, refetch, userChats };
2687
2695
  };
2696
+ var useGetChatSubscription = () => {
2697
+ const { data, loading, error } = (0, import_client12.useSubscription)(GET_CHAT_MESSAGE);
2698
+ const chat = data?.getChat;
2699
+ return { chat, error, loading };
2700
+ };
2688
2701
 
2689
2702
  // src/graphql/hooks/contactUs.ts
2690
- var import_client13 = require("@apollo/client");
2703
+ var import_client14 = require("@apollo/client");
2691
2704
 
2692
2705
  // src/graphql/mutations/contactUs.ts
2693
- var import_client12 = require("@apollo/client");
2694
- var CONTACT_US_MUTATION = import_client12.gql`
2706
+ var import_client13 = require("@apollo/client");
2707
+ var CONTACT_US_MUTATION = import_client13.gql`
2695
2708
  mutation contactUs($input: ContactUsInputType!) {
2696
2709
  contactUs(input: $input) {
2697
2710
  message
@@ -2701,16 +2714,16 @@ var CONTACT_US_MUTATION = import_client12.gql`
2701
2714
 
2702
2715
  // src/graphql/hooks/contactUs.ts
2703
2716
  var useContactUs = () => {
2704
- const [contactUs, { loading, error }] = (0, import_client13.useMutation)(CONTACT_US_MUTATION);
2717
+ const [contactUs, { loading, error }] = (0, import_client14.useMutation)(CONTACT_US_MUTATION);
2705
2718
  return { contactUs, error, loading };
2706
2719
  };
2707
2720
 
2708
2721
  // src/graphql/hooks/market/hooksMutation.ts
2709
- var import_client16 = require("@apollo/client");
2722
+ var import_client17 = require("@apollo/client");
2710
2723
 
2711
2724
  // src/graphql/mutations/market.ts
2712
- var import_client14 = require("@apollo/client");
2713
- var CREATE_MARKET_MUTATION = import_client14.gql`
2725
+ var import_client15 = require("@apollo/client");
2726
+ var CREATE_MARKET_MUTATION = import_client15.gql`
2714
2727
  mutation createMarket($input: MarketInputType!) {
2715
2728
  createMarket(input: $input) {
2716
2729
  ...MarketFields
@@ -2718,7 +2731,7 @@ var CREATE_MARKET_MUTATION = import_client14.gql`
2718
2731
  }
2719
2732
  ${MARKET}
2720
2733
  `;
2721
- var UPDATE_MARKET_MUTATION = import_client14.gql`
2734
+ var UPDATE_MARKET_MUTATION = import_client15.gql`
2722
2735
  mutation updateMarket($_id: ID!, $input: MarketInputType!) {
2723
2736
  updateMarket(_id: $_id, input: $input) {
2724
2737
  ...MarketFields
@@ -2726,12 +2739,12 @@ var UPDATE_MARKET_MUTATION = import_client14.gql`
2726
2739
  }
2727
2740
  ${MARKET}
2728
2741
  `;
2729
- var DELETE_MARKET_MUTATION = import_client14.gql`
2742
+ var DELETE_MARKET_MUTATION = import_client15.gql`
2730
2743
  mutation deleteMarket($_id: ID!) {
2731
2744
  deleteMarket(_id: $_id)
2732
2745
  }
2733
2746
  `;
2734
- var CREATE_MARKET_INFO_MUTATION = import_client14.gql`
2747
+ var CREATE_MARKET_INFO_MUTATION = import_client15.gql`
2735
2748
  mutation createMarketInfo($input: MarketInfoInputType!) {
2736
2749
  createMarketInfo(input: $input) {
2737
2750
  ...MarketInfoFields
@@ -2739,7 +2752,7 @@ var CREATE_MARKET_INFO_MUTATION = import_client14.gql`
2739
2752
  }
2740
2753
  ${MARKET_INFO}
2741
2754
  `;
2742
- var UPDATE_MARKET_INFO_MUTATION = import_client14.gql`
2755
+ var UPDATE_MARKET_INFO_MUTATION = import_client15.gql`
2743
2756
  mutation updateMarketInfo($_id: ID!, $input: MarketInfoInputType!) {
2744
2757
  updateMarketInfo(_id: $_id, input: $input) {
2745
2758
  ...MarketInfoFields
@@ -2749,8 +2762,8 @@ var UPDATE_MARKET_INFO_MUTATION = import_client14.gql`
2749
2762
  `;
2750
2763
 
2751
2764
  // src/graphql/queries/user.ts
2752
- var import_client15 = require("@apollo/client");
2753
- var GET_USERS = import_client15.gql`
2765
+ var import_client16 = require("@apollo/client");
2766
+ var GET_USERS = import_client16.gql`
2754
2767
  query getUsers {
2755
2768
  users {
2756
2769
  ...UserFields
@@ -2758,7 +2771,7 @@ var GET_USERS = import_client15.gql`
2758
2771
  }
2759
2772
  ${USER_FIELDS_FRAGMENT}
2760
2773
  `;
2761
- var GET_USER = import_client15.gql`
2774
+ var GET_USER = import_client16.gql`
2762
2775
  query getUser($_id: ID!) {
2763
2776
  user(_id: $_id) {
2764
2777
  ...UserFields
@@ -2766,7 +2779,7 @@ var GET_USER = import_client15.gql`
2766
2779
  }
2767
2780
  ${USER_FIELDS_FRAGMENT}
2768
2781
  `;
2769
- var GET_USER_MARKETS = import_client15.gql`
2782
+ var GET_USER_MARKETS = import_client16.gql`
2770
2783
  query getUserMarkets {
2771
2784
  userMarkets {
2772
2785
  ...MarketFields
@@ -2774,7 +2787,7 @@ var GET_USER_MARKETS = import_client15.gql`
2774
2787
  }
2775
2788
  ${MARKET}
2776
2789
  `;
2777
- var GET_USER_STALLHOLDER = import_client15.gql`
2790
+ var GET_USER_STALLHOLDER = import_client16.gql`
2778
2791
  query getUserStallholder {
2779
2792
  userStallholder {
2780
2793
  ...StallholderFields
@@ -2782,7 +2795,7 @@ var GET_USER_STALLHOLDER = import_client15.gql`
2782
2795
  }
2783
2796
  ${STALLHOLDER}
2784
2797
  `;
2785
- var GET_USER_FAVOURITES = import_client15.gql`
2798
+ var GET_USER_FAVOURITES = import_client16.gql`
2786
2799
  query getUserFavourites {
2787
2800
  userFavourites {
2788
2801
  markets {
@@ -2796,7 +2809,7 @@ var GET_USER_FAVOURITES = import_client15.gql`
2796
2809
  ${MARKET}
2797
2810
  ${STALLHOLDER}
2798
2811
  `;
2799
- var GET_USER_NOTIFICATIONS = import_client15.gql`
2812
+ var GET_USER_NOTIFICATIONS = import_client16.gql`
2800
2813
  query getMissedNotifications {
2801
2814
  userNotifications
2802
2815
  }
@@ -2804,7 +2817,7 @@ var GET_USER_NOTIFICATIONS = import_client15.gql`
2804
2817
 
2805
2818
  // src/graphql/hooks/market/hooksMutation.ts
2806
2819
  var useCreateMarket = () => {
2807
- const [createMarket, { loading, error }] = (0, import_client16.useMutation)(
2820
+ const [createMarket, { loading, error }] = (0, import_client17.useMutation)(
2808
2821
  CREATE_MARKET_MUTATION,
2809
2822
  {
2810
2823
  awaitRefetchQueries: true,
@@ -2814,7 +2827,7 @@ var useCreateMarket = () => {
2814
2827
  return { createMarket, error, loading };
2815
2828
  };
2816
2829
  var useUpdateMarket = () => {
2817
- const [updateMarket, { loading, error }] = (0, import_client16.useMutation)(
2830
+ const [updateMarket, { loading, error }] = (0, import_client17.useMutation)(
2818
2831
  UPDATE_MARKET_MUTATION,
2819
2832
  {
2820
2833
  awaitRefetchQueries: true,
@@ -2824,7 +2837,7 @@ var useUpdateMarket = () => {
2824
2837
  return { error, loading, updateMarket };
2825
2838
  };
2826
2839
  var useDeleteMarket = () => {
2827
- const [deleteMarket, { loading, error }] = (0, import_client16.useMutation)(
2840
+ const [deleteMarket, { loading, error }] = (0, import_client17.useMutation)(
2828
2841
  DELETE_MARKET_MUTATION,
2829
2842
  {
2830
2843
  awaitRefetchQueries: true,
@@ -2834,7 +2847,7 @@ var useDeleteMarket = () => {
2834
2847
  return { deleteMarket, error, loading };
2835
2848
  };
2836
2849
  var useCreateMarketInfo = () => {
2837
- const [createMarketInfo, { loading, error }] = (0, import_client16.useMutation)(
2850
+ const [createMarketInfo, { loading, error }] = (0, import_client17.useMutation)(
2838
2851
  CREATE_MARKET_INFO_MUTATION,
2839
2852
  {
2840
2853
  awaitRefetchQueries: true,
@@ -2860,7 +2873,7 @@ var useCreateMarketInfo = () => {
2860
2873
  return { createMarketInfo, error, loading };
2861
2874
  };
2862
2875
  var useUpdateMarketInfo = () => {
2863
- const [updateMarketInfo, { loading, error }] = (0, import_client16.useMutation)(
2876
+ const [updateMarketInfo, { loading, error }] = (0, import_client17.useMutation)(
2864
2877
  UPDATE_MARKET_INFO_MUTATION,
2865
2878
  {
2866
2879
  awaitRefetchQueries: true,
@@ -2886,16 +2899,16 @@ var useUpdateMarketInfo = () => {
2886
2899
  };
2887
2900
 
2888
2901
  // src/graphql/hooks/market/hooksQuery.ts
2889
- var import_client17 = require("@apollo/client");
2902
+ var import_client18 = require("@apollo/client");
2890
2903
  var useGetMarkets = () => {
2891
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKETS, {
2904
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKETS, {
2892
2905
  fetchPolicy: "network-only"
2893
2906
  });
2894
2907
  const markets = data?.markets;
2895
2908
  return { error, loading, markets, refetch };
2896
2909
  };
2897
2910
  var useGetMarket = (_id) => {
2898
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKET, {
2911
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKET, {
2899
2912
  fetchPolicy: "network-only",
2900
2913
  skip: !_id,
2901
2914
  variables: { _id }
@@ -2904,7 +2917,7 @@ var useGetMarket = (_id) => {
2904
2917
  return { error, loading, market, refetch };
2905
2918
  };
2906
2919
  var useGetMarketsByRegion = (region) => {
2907
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKETS_BY_REGION, {
2920
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKETS_BY_REGION, {
2908
2921
  fetchPolicy: "no-cache",
2909
2922
  skip: !region,
2910
2923
  variables: { region }
@@ -2913,7 +2926,7 @@ var useGetMarketsByRegion = (region) => {
2913
2926
  return { error, loading, marketsByRegion, refetch };
2914
2927
  };
2915
2928
  var useSearchMarkets = (search, region) => {
2916
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(SEARCH_MARKETS, {
2929
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(SEARCH_MARKETS, {
2917
2930
  fetchPolicy: "network-only",
2918
2931
  skip: search.length < 3,
2919
2932
  variables: { region, search }
@@ -2922,7 +2935,7 @@ var useSearchMarkets = (search, region) => {
2922
2935
  return { error, loading, marketsSearch, refetch };
2923
2936
  };
2924
2937
  var useGetMarketsNearMe = (location) => {
2925
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKETS_NEAR_ME, {
2938
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKETS_NEAR_ME, {
2926
2939
  fetchPolicy: "network-only",
2927
2940
  skip: !location.latitude || !location.longitude,
2928
2941
  variables: {
@@ -2936,7 +2949,7 @@ var useGetMarketsNearMe = (location) => {
2936
2949
  return { error, loading, marketsNearMe, refetch };
2937
2950
  };
2938
2951
  var useGetMarketInfo = (marketId) => {
2939
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKET_INFO, {
2952
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKET_INFO, {
2940
2953
  fetchPolicy: "network-only",
2941
2954
  skip: !marketId,
2942
2955
  variables: { marketId }
@@ -2946,11 +2959,11 @@ var useGetMarketInfo = (marketId) => {
2946
2959
  };
2947
2960
 
2948
2961
  // src/graphql/hooks/poster.ts
2949
- var import_client19 = require("@apollo/client");
2962
+ var import_client20 = require("@apollo/client");
2950
2963
 
2951
2964
  // src/graphql/mutations/poster.ts
2952
- var import_client18 = require("@apollo/client");
2953
- var CREATE_POSTER_MUTATION = import_client18.gql`
2965
+ var import_client19 = require("@apollo/client");
2966
+ var CREATE_POSTER_MUTATION = import_client19.gql`
2954
2967
  mutation createPoster($input: PosterInputType!) {
2955
2968
  createPoster(input: $input) {
2956
2969
  message
@@ -2960,18 +2973,18 @@ var CREATE_POSTER_MUTATION = import_client18.gql`
2960
2973
 
2961
2974
  // src/graphql/hooks/poster.ts
2962
2975
  var useCreatePoster = () => {
2963
- const [createPoster, { loading, error }] = (0, import_client19.useMutation)(
2976
+ const [createPoster, { loading, error }] = (0, import_client20.useMutation)(
2964
2977
  CREATE_POSTER_MUTATION
2965
2978
  );
2966
2979
  return { createPoster, error, loading };
2967
2980
  };
2968
2981
 
2969
2982
  // src/graphql/hooks/pushToken.ts
2970
- var import_client21 = require("@apollo/client");
2983
+ var import_client22 = require("@apollo/client");
2971
2984
 
2972
2985
  // src/graphql/mutations/pushToken.ts
2973
- var import_client20 = require("@apollo/client");
2974
- var CREATE_PUSH_TOKEN_MUTATION = import_client20.gql`
2986
+ var import_client21 = require("@apollo/client");
2987
+ var CREATE_PUSH_TOKEN_MUTATION = import_client21.gql`
2975
2988
  mutation createPushToken($input: PushTokenInput!) {
2976
2989
  createPushToken(input: $input) {
2977
2990
  success
@@ -2981,21 +2994,21 @@ var CREATE_PUSH_TOKEN_MUTATION = import_client20.gql`
2981
2994
 
2982
2995
  // src/graphql/hooks/pushToken.ts
2983
2996
  var useCreatePushToken = () => {
2984
- const [createPushToken, { loading, error }] = (0, import_client21.useMutation)(
2997
+ const [createPushToken, { loading, error }] = (0, import_client22.useMutation)(
2985
2998
  CREATE_PUSH_TOKEN_MUTATION
2986
2999
  );
2987
3000
  return { createPushToken, error, loading };
2988
3001
  };
2989
3002
 
2990
3003
  // src/graphql/hooks/relation/hooksMutation.ts
2991
- var import_client24 = require("@apollo/client");
3004
+ var import_client25 = require("@apollo/client");
2992
3005
 
2993
3006
  // src/graphql/mutations/relation.ts
2994
- var import_client23 = require("@apollo/client");
3007
+ var import_client24 = require("@apollo/client");
2995
3008
 
2996
3009
  // src/graphql/queries/relation.ts
2997
- var import_client22 = require("@apollo/client");
2998
- var RELATION_DATES_FRAGMENT = import_client22.gql`
3010
+ var import_client23 = require("@apollo/client");
3011
+ var RELATION_DATES_FRAGMENT = import_client23.gql`
2999
3012
  fragment RelationDates on RelationDateType {
3000
3013
  lastUpdateBy
3001
3014
  paymentReference
@@ -3009,7 +3022,7 @@ var RELATION_DATES_FRAGMENT = import_client22.gql`
3009
3022
  status
3010
3023
  }
3011
3024
  `;
3012
- var RELATION_FIELDS_FRAGMENT = import_client22.gql`
3025
+ var RELATION_FIELDS_FRAGMENT = import_client23.gql`
3013
3026
  fragment RelationFields on RelationType {
3014
3027
  _id
3015
3028
  apiMessage
@@ -3026,7 +3039,7 @@ var RELATION_FIELDS_FRAGMENT = import_client22.gql`
3026
3039
  }
3027
3040
  ${RELATION_DATES_FRAGMENT}
3028
3041
  `;
3029
- var GET_RELATION = import_client22.gql`
3042
+ var GET_RELATION = import_client23.gql`
3030
3043
  query getRelation($id: ID!) {
3031
3044
  relation(_id: $id) {
3032
3045
  ...RelationFields
@@ -3034,7 +3047,7 @@ var GET_RELATION = import_client22.gql`
3034
3047
  }
3035
3048
  ${RELATION_FIELDS_FRAGMENT}
3036
3049
  `;
3037
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client22.gql`
3050
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client23.gql`
3038
3051
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
3039
3052
  relationByMarketAndStallholder(
3040
3053
  marketId: $marketId
@@ -3045,7 +3058,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client22.gql`
3045
3058
  }
3046
3059
  ${RELATION_FIELDS_FRAGMENT}
3047
3060
  `;
3048
- var GET_MARKET_RELATIONS = import_client22.gql`
3061
+ var GET_MARKET_RELATIONS = import_client23.gql`
3049
3062
  query getMarketRelations($marketId: ID!) {
3050
3063
  marketRelations(marketId: $marketId) {
3051
3064
  ...RelationFields
@@ -3053,7 +3066,7 @@ var GET_MARKET_RELATIONS = import_client22.gql`
3053
3066
  }
3054
3067
  ${RELATION_FIELDS_FRAGMENT}
3055
3068
  `;
3056
- var GET_STALLHOLDER_RELATIONS = import_client22.gql`
3069
+ var GET_STALLHOLDER_RELATIONS = import_client23.gql`
3057
3070
  query getStallholderRelations($stallholderId: ID!) {
3058
3071
  stallholderRelations(stallholderId: $stallholderId) {
3059
3072
  ...RelationFields
@@ -3061,7 +3074,7 @@ var GET_STALLHOLDER_RELATIONS = import_client22.gql`
3061
3074
  }
3062
3075
  ${RELATION_FIELDS_FRAGMENT}
3063
3076
  `;
3064
- var GET_RESOURCE_CONNECTIONS = import_client22.gql`
3077
+ var GET_RESOURCE_CONNECTIONS = import_client23.gql`
3065
3078
  query getResourceConnections(
3066
3079
  $resourceId: ID!
3067
3080
  $resourceType: ResourceTypeEnum!
@@ -3164,7 +3177,7 @@ var GET_RESOURCE_CONNECTIONS = import_client22.gql`
3164
3177
  `;
3165
3178
 
3166
3179
  // src/graphql/mutations/relation.ts
3167
- var CREATE_RELATION_MUTATION = import_client23.gql`
3180
+ var CREATE_RELATION_MUTATION = import_client24.gql`
3168
3181
  mutation createRelation($input: RelationInputType!) {
3169
3182
  createRelation(input: $input) {
3170
3183
  ...RelationFields
@@ -3172,7 +3185,7 @@ var CREATE_RELATION_MUTATION = import_client23.gql`
3172
3185
  }
3173
3186
  ${RELATION_FIELDS_FRAGMENT}
3174
3187
  `;
3175
- var UPDATE_RELATION_MUTATION = import_client23.gql`
3188
+ var UPDATE_RELATION_MUTATION = import_client24.gql`
3176
3189
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
3177
3190
  updateRelation(_id: $_id, input: $input) {
3178
3191
  ...RelationFields
@@ -3180,7 +3193,7 @@ var UPDATE_RELATION_MUTATION = import_client23.gql`
3180
3193
  }
3181
3194
  ${RELATION_FIELDS_FRAGMENT}
3182
3195
  `;
3183
- var DELETE_RELATION_MUTATION = import_client23.gql`
3196
+ var DELETE_RELATION_MUTATION = import_client24.gql`
3184
3197
  mutation deleteRelation($_id: ID!) {
3185
3198
  deleteRelation(_id: $_id) {
3186
3199
  ...RelationFields
@@ -3192,7 +3205,7 @@ var DELETE_RELATION_MUTATION = import_client23.gql`
3192
3205
  // src/graphql/hooks/relation/hooksMutation.ts
3193
3206
  var fetchPolicy = "no-cache";
3194
3207
  var useCreateRelation = () => {
3195
- const [createRelation, { loading, error }] = (0, import_client24.useMutation)(
3208
+ const [createRelation, { loading, error }] = (0, import_client25.useMutation)(
3196
3209
  CREATE_RELATION_MUTATION,
3197
3210
  {
3198
3211
  awaitRefetchQueries: true,
@@ -3244,7 +3257,7 @@ var useCreateRelation = () => {
3244
3257
  return { createRelation, error, loading };
3245
3258
  };
3246
3259
  var useUpdateRelation = () => {
3247
- const [updateRelation, { loading, error }] = (0, import_client24.useMutation)(
3260
+ const [updateRelation, { loading, error }] = (0, import_client25.useMutation)(
3248
3261
  UPDATE_RELATION_MUTATION,
3249
3262
  {
3250
3263
  awaitRefetchQueries: true,
@@ -3292,7 +3305,7 @@ var useUpdateRelation = () => {
3292
3305
  return { error, loading, updateRelation };
3293
3306
  };
3294
3307
  var useDeleteRelation = () => {
3295
- const [deleteRelation, { loading, error }] = (0, import_client24.useMutation)(
3308
+ const [deleteRelation, { loading, error }] = (0, import_client25.useMutation)(
3296
3309
  DELETE_RELATION_MUTATION,
3297
3310
  {
3298
3311
  awaitRefetchQueries: true,
@@ -3340,9 +3353,9 @@ var useDeleteRelation = () => {
3340
3353
  };
3341
3354
 
3342
3355
  // src/graphql/hooks/relation/hooksQuery.ts
3343
- var import_client25 = require("@apollo/client");
3356
+ var import_client26 = require("@apollo/client");
3344
3357
  var useGetRelation = (id) => {
3345
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_RELATION, {
3358
+ const { loading, error, data, refetch } = (0, import_client26.useQuery)(GET_RELATION, {
3346
3359
  fetchPolicy: "network-only",
3347
3360
  skip: id === "",
3348
3361
  variables: { id }
@@ -3351,7 +3364,7 @@ var useGetRelation = (id) => {
3351
3364
  return { error, loading, refetch, relation };
3352
3365
  };
3353
3366
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
3354
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(
3367
+ const { loading, error, data, refetch } = (0, import_client26.useQuery)(
3355
3368
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
3356
3369
  {
3357
3370
  fetchPolicy: "network-only",
@@ -3363,7 +3376,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
3363
3376
  return { error, loading, refetch, relationByMarketAndStallholder };
3364
3377
  };
3365
3378
  var useGetMarketRelations = (marketId) => {
3366
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_MARKET_RELATIONS, {
3379
+ const { loading, error, data, refetch } = (0, import_client26.useQuery)(GET_MARKET_RELATIONS, {
3367
3380
  fetchPolicy: "network-only",
3368
3381
  skip: marketId === "",
3369
3382
  variables: { marketId }
@@ -3372,7 +3385,7 @@ var useGetMarketRelations = (marketId) => {
3372
3385
  return { error, loading, marketRelations, refetch };
3373
3386
  };
3374
3387
  var useGetStallholderRelations = (stallholderId) => {
3375
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(
3388
+ const { loading, error, data, refetch } = (0, import_client26.useQuery)(
3376
3389
  GET_STALLHOLDER_RELATIONS,
3377
3390
  {
3378
3391
  fetchPolicy: "network-only",
@@ -3384,7 +3397,7 @@ var useGetStallholderRelations = (stallholderId) => {
3384
3397
  return { error, loading, refetch, stallholderRelations };
3385
3398
  };
3386
3399
  var useGetResourceConnections = (resourceId, resourceType) => {
3387
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_RESOURCE_CONNECTIONS, {
3400
+ const { loading, error, data, refetch } = (0, import_client26.useQuery)(GET_RESOURCE_CONNECTIONS, {
3388
3401
  fetchPolicy: "network-only",
3389
3402
  variables: { resourceId, resourceType }
3390
3403
  });
@@ -3393,11 +3406,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
3393
3406
  };
3394
3407
 
3395
3408
  // src/graphql/hooks/stallholder/hooksMutation.ts
3396
- var import_client27 = require("@apollo/client");
3409
+ var import_client28 = require("@apollo/client");
3397
3410
 
3398
3411
  // src/graphql/mutations/stallholder.ts
3399
- var import_client26 = require("@apollo/client");
3400
- var CREATE_STALLHOLDER_MUTATION = import_client26.gql`
3412
+ var import_client27 = require("@apollo/client");
3413
+ var CREATE_STALLHOLDER_MUTATION = import_client27.gql`
3401
3414
  mutation createStallholder($input: StallholderInputType!) {
3402
3415
  createStallholder(input: $input) {
3403
3416
  ...StallholderFields
@@ -3405,7 +3418,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client26.gql`
3405
3418
  }
3406
3419
  ${STALLHOLDER}
3407
3420
  `;
3408
- var UPDATE_STALLHOLDER_MUTATION = import_client26.gql`
3421
+ var UPDATE_STALLHOLDER_MUTATION = import_client27.gql`
3409
3422
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
3410
3423
  updateStallholder(_id: $_id, input: $input) {
3411
3424
  ...StallholderFields
@@ -3413,12 +3426,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client26.gql`
3413
3426
  }
3414
3427
  ${STALLHOLDER}
3415
3428
  `;
3416
- var DELETE_STALLHOLDER_MUTATION = import_client26.gql`
3429
+ var DELETE_STALLHOLDER_MUTATION = import_client27.gql`
3417
3430
  mutation deleteStallholder($_id: ID!) {
3418
3431
  deleteStallholder(_id: $_id)
3419
3432
  }
3420
3433
  `;
3421
- var CREATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
3434
+ var CREATE_STALLHOLDER_INFO_MUTATION = import_client27.gql`
3422
3435
  mutation createStallholderInfo($input: StallholderInfoInputType!) {
3423
3436
  createStallholderInfo(input: $input) {
3424
3437
  ...StallholderInfoFields
@@ -3426,7 +3439,7 @@ var CREATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
3426
3439
  }
3427
3440
  ${STALLHOLDER_INFO}
3428
3441
  `;
3429
- var UPDATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
3442
+ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client27.gql`
3430
3443
  mutation updateStallholderInfo($_id: ID!, $input: StallholderInfoInputType!) {
3431
3444
  updateStallholderInfo(_id: $_id, input: $input) {
3432
3445
  ...StallholderInfoFields
@@ -3437,7 +3450,7 @@ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
3437
3450
 
3438
3451
  // src/graphql/hooks/stallholder/hooksMutation.ts
3439
3452
  var useCreateStallholder = () => {
3440
- const [createStallholder, { loading, error }] = (0, import_client27.useMutation)(
3453
+ const [createStallholder, { loading, error }] = (0, import_client28.useMutation)(
3441
3454
  CREATE_STALLHOLDER_MUTATION,
3442
3455
  {
3443
3456
  awaitRefetchQueries: true,
@@ -3449,7 +3462,7 @@ var useCreateStallholder = () => {
3449
3462
  return { createStallholder, error, loading };
3450
3463
  };
3451
3464
  var useUpdateStallholder = () => {
3452
- const [updateStallholder, { loading, error }] = (0, import_client27.useMutation)(
3465
+ const [updateStallholder, { loading, error }] = (0, import_client28.useMutation)(
3453
3466
  UPDATE_STALLHOLDER_MUTATION,
3454
3467
  {
3455
3468
  awaitRefetchQueries: true,
@@ -3461,7 +3474,7 @@ var useUpdateStallholder = () => {
3461
3474
  return { error, loading, updateStallholder };
3462
3475
  };
3463
3476
  var useDeleteStallholder = () => {
3464
- const [deleteStallholder, { loading, error }] = (0, import_client27.useMutation)(
3477
+ const [deleteStallholder, { loading, error }] = (0, import_client28.useMutation)(
3465
3478
  DELETE_STALLHOLDER_MUTATION,
3466
3479
  {
3467
3480
  awaitRefetchQueries: true,
@@ -3473,7 +3486,7 @@ var useDeleteStallholder = () => {
3473
3486
  return { deleteStallholder, error, loading };
3474
3487
  };
3475
3488
  var useCreateStallholderInfo = () => {
3476
- const [createStallholderInfo, { loading, error }] = (0, import_client27.useMutation)(
3489
+ const [createStallholderInfo, { loading, error }] = (0, import_client28.useMutation)(
3477
3490
  CREATE_STALLHOLDER_INFO_MUTATION,
3478
3491
  {
3479
3492
  awaitRefetchQueries: true,
@@ -3497,7 +3510,7 @@ var useCreateStallholderInfo = () => {
3497
3510
  return { createStallholderInfo, error, loading };
3498
3511
  };
3499
3512
  var useUpdateStallholderInfo = () => {
3500
- const [updateStallholderInfo, { loading, error }] = (0, import_client27.useMutation)(
3513
+ const [updateStallholderInfo, { loading, error }] = (0, import_client28.useMutation)(
3501
3514
  UPDATE_STALLHOLDER_INFO_MUTATION,
3502
3515
  {
3503
3516
  awaitRefetchQueries: true,
@@ -3518,9 +3531,9 @@ var useUpdateStallholderInfo = () => {
3518
3531
  };
3519
3532
 
3520
3533
  // src/graphql/hooks/stallholder/hooksQuery.ts
3521
- var import_client28 = require("@apollo/client");
3534
+ var import_client29 = require("@apollo/client");
3522
3535
  var useGetStallholders = () => {
3523
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDERS, {
3536
+ const { loading, error, data, refetch } = (0, import_client29.useQuery)(GET_STALLHOLDERS, {
3524
3537
  fetchPolicy: "network-only"
3525
3538
  });
3526
3539
  const stallholders = data?.stallholders;
@@ -3532,7 +3545,7 @@ var useGetStallholders = () => {
3532
3545
  };
3533
3546
  };
3534
3547
  var useGetStallholder = (_id) => {
3535
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDER, {
3548
+ const { loading, error, data, refetch } = (0, import_client29.useQuery)(GET_STALLHOLDER, {
3536
3549
  fetchPolicy: "network-only",
3537
3550
  skip: !_id,
3538
3551
  variables: { _id }
@@ -3541,7 +3554,7 @@ var useGetStallholder = (_id) => {
3541
3554
  return { error, loading, refetch, stallholder };
3542
3555
  };
3543
3556
  var useGetStallholdersByRegion = (region) => {
3544
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(
3557
+ const { loading, error, data, refetch } = (0, import_client29.useQuery)(
3545
3558
  GET_STALLHOLDERS_BY_REGION,
3546
3559
  {
3547
3560
  fetchPolicy: "no-cache",
@@ -3553,7 +3566,7 @@ var useGetStallholdersByRegion = (region) => {
3553
3566
  return { error, loading, refetch, stallholdersByRegion };
3554
3567
  };
3555
3568
  var useSearchStallholders = (search, region) => {
3556
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(SEARCH_STALLHOLDERS, {
3569
+ const { loading, error, data, refetch } = (0, import_client29.useQuery)(SEARCH_STALLHOLDERS, {
3557
3570
  fetchPolicy: "network-only",
3558
3571
  skip: search.length < 3,
3559
3572
  variables: { region, search }
@@ -3562,7 +3575,7 @@ var useSearchStallholders = (search, region) => {
3562
3575
  return { error, loading, refetch, stallholderSearch };
3563
3576
  };
3564
3577
  var useGetStallholderInfo = (stallholderId) => {
3565
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDER_INFO, {
3578
+ const { loading, error, data, refetch } = (0, import_client29.useQuery)(GET_STALLHOLDER_INFO, {
3566
3579
  fetchPolicy: "network-only",
3567
3580
  skip: !stallholderId,
3568
3581
  variables: { stallholderId }
@@ -3577,14 +3590,14 @@ var useGetStallholderInfo = (stallholderId) => {
3577
3590
  };
3578
3591
 
3579
3592
  // src/graphql/hooks/testers/hooksMutation.ts
3580
- var import_client31 = require("@apollo/client");
3593
+ var import_client32 = require("@apollo/client");
3581
3594
 
3582
3595
  // src/graphql/mutations/testers.ts
3583
- var import_client30 = require("@apollo/client");
3596
+ var import_client31 = require("@apollo/client");
3584
3597
 
3585
3598
  // src/graphql/queries/testers.ts
3586
- var import_client29 = require("@apollo/client");
3587
- var TESTER_FIELDS_FRAGMENT = import_client29.gql`
3599
+ var import_client30 = require("@apollo/client");
3600
+ var TESTER_FIELDS_FRAGMENT = import_client30.gql`
3588
3601
  fragment TesterFields on TesterType {
3589
3602
  _id
3590
3603
  active
@@ -3597,7 +3610,7 @@ var TESTER_FIELDS_FRAGMENT = import_client29.gql`
3597
3610
  updatedAt
3598
3611
  }
3599
3612
  `;
3600
- var GET_TESTERS = import_client29.gql`
3613
+ var GET_TESTERS = import_client30.gql`
3601
3614
  query getTesters {
3602
3615
  testers {
3603
3616
  ...TesterFields
@@ -3605,7 +3618,7 @@ var GET_TESTERS = import_client29.gql`
3605
3618
  }
3606
3619
  ${TESTER_FIELDS_FRAGMENT}
3607
3620
  `;
3608
- var GET_TESTER = import_client29.gql`
3621
+ var GET_TESTER = import_client30.gql`
3609
3622
  query getTester($_id: ID!) {
3610
3623
  tester(_id: $_id) {
3611
3624
  ...TesterFields
@@ -3615,7 +3628,7 @@ var GET_TESTER = import_client29.gql`
3615
3628
  `;
3616
3629
 
3617
3630
  // src/graphql/mutations/testers.ts
3618
- var CREATE_TESTER_MUTATION = import_client30.gql`
3631
+ var CREATE_TESTER_MUTATION = import_client31.gql`
3619
3632
  mutation createTester($input: TesterInputType!) {
3620
3633
  createTester(input: $input) {
3621
3634
  ...TesterFields
@@ -3623,7 +3636,7 @@ var CREATE_TESTER_MUTATION = import_client30.gql`
3623
3636
  }
3624
3637
  ${TESTER_FIELDS_FRAGMENT}
3625
3638
  `;
3626
- var UPDATE_TESTER_MUTATION = import_client30.gql`
3639
+ var UPDATE_TESTER_MUTATION = import_client31.gql`
3627
3640
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
3628
3641
  updateTester(_id: $_id, input: $input) {
3629
3642
  ...TesterFields
@@ -3631,7 +3644,7 @@ var UPDATE_TESTER_MUTATION = import_client30.gql`
3631
3644
  }
3632
3645
  ${TESTER_FIELDS_FRAGMENT}
3633
3646
  `;
3634
- var DELETE_TESTER_MUTATION = import_client30.gql`
3647
+ var DELETE_TESTER_MUTATION = import_client31.gql`
3635
3648
  mutation deleteTester($_id: ID!) {
3636
3649
  deleteTester(_id: $_id)
3637
3650
  }
@@ -3639,7 +3652,7 @@ var DELETE_TESTER_MUTATION = import_client30.gql`
3639
3652
 
3640
3653
  // src/graphql/hooks/testers/hooksMutation.ts
3641
3654
  var useCreateTester = () => {
3642
- const [createTester, { data, loading, error }] = (0, import_client31.useMutation)(
3655
+ const [createTester, { data, loading, error }] = (0, import_client32.useMutation)(
3643
3656
  CREATE_TESTER_MUTATION
3644
3657
  );
3645
3658
  return {
@@ -3650,7 +3663,7 @@ var useCreateTester = () => {
3650
3663
  };
3651
3664
  };
3652
3665
  var useUpdateTester = () => {
3653
- const [updateTester, { data, loading, error }] = (0, import_client31.useMutation)(
3666
+ const [updateTester, { data, loading, error }] = (0, import_client32.useMutation)(
3654
3667
  UPDATE_TESTER_MUTATION
3655
3668
  );
3656
3669
  return {
@@ -3661,16 +3674,16 @@ var useUpdateTester = () => {
3661
3674
  };
3662
3675
  };
3663
3676
  var useDeleteTester = () => {
3664
- const [deleteTester, { loading, error }] = (0, import_client31.useMutation)(
3677
+ const [deleteTester, { loading, error }] = (0, import_client32.useMutation)(
3665
3678
  DELETE_TESTER_MUTATION
3666
3679
  );
3667
3680
  return { deleteTester, error, loading };
3668
3681
  };
3669
3682
 
3670
3683
  // src/graphql/hooks/testers/hooksQuery.ts
3671
- var import_client32 = require("@apollo/client");
3684
+ var import_client33 = require("@apollo/client");
3672
3685
  var useGetTesters = () => {
3673
- const { data, loading, error, refetch } = (0, import_client32.useQuery)(GET_TESTERS);
3686
+ const { data, loading, error, refetch } = (0, import_client33.useQuery)(GET_TESTERS);
3674
3687
  const testers = data?.testers;
3675
3688
  return {
3676
3689
  error,
@@ -3680,7 +3693,7 @@ var useGetTesters = () => {
3680
3693
  };
3681
3694
  };
3682
3695
  var useGetTester = (_id) => {
3683
- const { data, loading, error, refetch } = (0, import_client32.useQuery)(GET_TESTER, {
3696
+ const { data, loading, error, refetch } = (0, import_client33.useQuery)(GET_TESTER, {
3684
3697
  skip: !_id,
3685
3698
  variables: { _id }
3686
3699
  });
@@ -3689,11 +3702,11 @@ var useGetTester = (_id) => {
3689
3702
  };
3690
3703
 
3691
3704
  // src/graphql/hooks/user/hooksMutation.ts
3692
- var import_client34 = require("@apollo/client");
3705
+ var import_client35 = require("@apollo/client");
3693
3706
 
3694
3707
  // src/graphql/mutations/user.ts
3695
- var import_client33 = require("@apollo/client");
3696
- var CREATE_USER_MUTATION = import_client33.gql`
3708
+ var import_client34 = require("@apollo/client");
3709
+ var CREATE_USER_MUTATION = import_client34.gql`
3697
3710
  mutation createUser($input: UserInputType!) {
3698
3711
  createUser(input: $input) {
3699
3712
  ...UserFields
@@ -3701,7 +3714,7 @@ var CREATE_USER_MUTATION = import_client33.gql`
3701
3714
  }
3702
3715
  ${USER_FIELDS_FRAGMENT}
3703
3716
  `;
3704
- var UPDATE_USER_MUTATION = import_client33.gql`
3717
+ var UPDATE_USER_MUTATION = import_client34.gql`
3705
3718
  mutation updateUser($_id: ID!, $input: UserInputType!) {
3706
3719
  updateUser(_id: $_id, input: $input) {
3707
3720
  ...UserFields
@@ -3709,12 +3722,12 @@ var UPDATE_USER_MUTATION = import_client33.gql`
3709
3722
  }
3710
3723
  ${USER_FIELDS_FRAGMENT}
3711
3724
  `;
3712
- var DELETE_USER_MUTATION = import_client33.gql`
3725
+ var DELETE_USER_MUTATION = import_client34.gql`
3713
3726
  mutation deleteUser($_id: ID!) {
3714
3727
  deleteUser(_id: $_id)
3715
3728
  }
3716
3729
  `;
3717
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client33.gql`
3730
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
3718
3731
  mutation addUserFavouriteResource(
3719
3732
  $resourceId: ID!
3720
3733
  $resourceType: ResourceTypeEnum!
@@ -3730,7 +3743,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client33.gql`
3730
3743
  }
3731
3744
  ${USER_FIELDS_FRAGMENT}
3732
3745
  `;
3733
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client33.gql`
3746
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
3734
3747
  mutation removeUserFavouriteResource(
3735
3748
  $resourceId: ID!
3736
3749
  $resourceType: ResourceTypeEnum!
@@ -3749,11 +3762,11 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client33.gql`
3749
3762
 
3750
3763
  // src/graphql/hooks/user/hooksMutation.ts
3751
3764
  var useCreateUser = () => {
3752
- const [createUser, { loading, error }] = (0, import_client34.useMutation)(CREATE_USER_MUTATION);
3765
+ const [createUser, { loading, error }] = (0, import_client35.useMutation)(CREATE_USER_MUTATION);
3753
3766
  return { createUser, error, loading };
3754
3767
  };
3755
3768
  var useUpdateUser = () => {
3756
- const [updateUser, { loading, error }] = (0, import_client34.useMutation)(UPDATE_USER_MUTATION, {
3769
+ const [updateUser, { loading, error }] = (0, import_client35.useMutation)(UPDATE_USER_MUTATION, {
3757
3770
  awaitRefetchQueries: true,
3758
3771
  refetchQueries: (mutationResult) => {
3759
3772
  const userId = mutationResult?.data?.updateUser?._id;
@@ -3764,11 +3777,11 @@ var useUpdateUser = () => {
3764
3777
  return { error, loading, updateUser };
3765
3778
  };
3766
3779
  var useDeleteUser = () => {
3767
- const [deleteUser, { loading, error }] = (0, import_client34.useMutation)(DELETE_USER_MUTATION);
3780
+ const [deleteUser, { loading, error }] = (0, import_client35.useMutation)(DELETE_USER_MUTATION);
3768
3781
  return { deleteUser, error, loading };
3769
3782
  };
3770
3783
  var useAddUserFavouriteResource = () => {
3771
- const [addUserFavouriteResource, { loading, error }] = (0, import_client34.useMutation)(
3784
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client35.useMutation)(
3772
3785
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
3773
3786
  {
3774
3787
  awaitRefetchQueries: true,
@@ -3778,7 +3791,7 @@ var useAddUserFavouriteResource = () => {
3778
3791
  return { addUserFavouriteResource, error, loading };
3779
3792
  };
3780
3793
  var useRemoveUserFavouriteResource = () => {
3781
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client34.useMutation)(
3794
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client35.useMutation)(
3782
3795
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
3783
3796
  {
3784
3797
  awaitRefetchQueries: true,
@@ -3789,37 +3802,37 @@ var useRemoveUserFavouriteResource = () => {
3789
3802
  };
3790
3803
 
3791
3804
  // src/graphql/hooks/user/hooksQuery.ts
3792
- var import_client35 = require("@apollo/client");
3805
+ var import_client36 = require("@apollo/client");
3793
3806
  var useGetUsers = () => {
3794
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USERS, {
3807
+ const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USERS, {
3795
3808
  fetchPolicy: "network-only"
3796
3809
  });
3797
3810
  const users = data?.users;
3798
3811
  return { error, loading, refetch, users };
3799
3812
  };
3800
3813
  var useGetUser = (_id) => {
3801
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER, {
3814
+ const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER, {
3802
3815
  variables: { _id }
3803
3816
  });
3804
3817
  const user = data?.user;
3805
3818
  return { error, loading, refetch, user };
3806
3819
  };
3807
3820
  var useGetUserMarkets = () => {
3808
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER_MARKETS, {
3821
+ const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_MARKETS, {
3809
3822
  fetchPolicy: "network-only"
3810
3823
  });
3811
3824
  const userMarkets = data?.userMarkets;
3812
3825
  return { error, loading, refetch, userMarkets };
3813
3826
  };
3814
3827
  var useGetUserStallholder = () => {
3815
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER_STALLHOLDER, {
3828
+ const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_STALLHOLDER, {
3816
3829
  fetchPolicy: "network-only"
3817
3830
  });
3818
3831
  const userStallholder = data?.userStallholder;
3819
3832
  return { error, loading, refetch, userStallholder };
3820
3833
  };
3821
3834
  var useGetUserFavourites = () => {
3822
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER_FAVOURITES, {
3835
+ const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_FAVOURITES, {
3823
3836
  fetchPolicy: "network-only"
3824
3837
  });
3825
3838
  const markets = data?.userFavourites.markets;
@@ -3831,28 +3844,21 @@ var useGetUserFavourites = () => {
3831
3844
  return { error, loading, refetch, userFavourites };
3832
3845
  };
3833
3846
  var useGetUserNotifications = () => {
3834
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER_NOTIFICATIONS, {
3847
+ const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_NOTIFICATIONS, {
3835
3848
  fetchPolicy: "network-only"
3836
3849
  });
3837
3850
  const userNotifications = data?.userNotifications;
3838
3851
  return { error, loading, refetch, userNotifications };
3839
3852
  };
3840
3853
 
3841
- // src/graphql/queries/notificationQueries.ts
3842
- var import_client36 = require("@apollo/client");
3843
- var GET_USER_NOTIFICATIONS2 = import_client36.gql`
3844
- query GetUserNotifications(
3845
- $userId: String!
3846
- $limit: Int
3847
- $offset: Int
3848
- $isRead: String
3849
- ) {
3850
- userNotifications(
3851
- userId: $userId
3852
- limit: $limit
3853
- offset: $offset
3854
- isRead: $isRead
3855
- ) {
3854
+ // src/graphql/hooks/notifications.ts
3855
+ var import_client39 = require("@apollo/client");
3856
+
3857
+ // src/graphql/mutations/notification.ts
3858
+ var import_client37 = require("@apollo/client");
3859
+ var CREATE_NOTIFICATION = import_client37.gql`
3860
+ mutation CreateNotification($input: CreateNotificationInput!) {
3861
+ createNotification(input: $input) {
3856
3862
  id
3857
3863
  userId
3858
3864
  title
@@ -3865,17 +3871,9 @@ var GET_USER_NOTIFICATIONS2 = import_client36.gql`
3865
3871
  }
3866
3872
  }
3867
3873
  `;
3868
- var GET_NOTIFICATION_COUNT = import_client36.gql`
3869
- query GetNotificationCount($userId: String!) {
3870
- notificationCount(userId: $userId) {
3871
- total
3872
- unread
3873
- }
3874
- }
3875
- `;
3876
- var GET_UNREAD_NOTIFICATIONS = import_client36.gql`
3877
- query GetUnreadNotifications($userId: String!, $limit: Int) {
3878
- unreadNotifications(userId: $userId, limit: $limit) {
3874
+ var CREATE_BULK_NOTIFICATIONS = import_client37.gql`
3875
+ mutation CreateBulkNotifications($input: CreateBulkNotificationInput!) {
3876
+ createBulkNotifications(input: $input) {
3879
3877
  id
3880
3878
  userId
3881
3879
  title
@@ -3888,12 +3886,9 @@ var GET_UNREAD_NOTIFICATIONS = import_client36.gql`
3888
3886
  }
3889
3887
  }
3890
3888
  `;
3891
-
3892
- // src/graphql/mutations/notificationMutations.ts
3893
- var import_client37 = require("@apollo/client");
3894
- var CREATE_NOTIFICATION = import_client37.gql`
3895
- mutation CreateNotification($input: CreateNotificationInput!) {
3896
- createNotification(input: $input) {
3889
+ var MARK_NOTIFICATION_READ = import_client37.gql`
3890
+ mutation MarkNotificationRead($input: MarkNotificationReadInput!) {
3891
+ markNotificationRead(input: $input) {
3897
3892
  id
3898
3893
  userId
3899
3894
  title
@@ -3906,9 +3901,27 @@ var CREATE_NOTIFICATION = import_client37.gql`
3906
3901
  }
3907
3902
  }
3908
3903
  `;
3909
- var CREATE_BULK_NOTIFICATIONS = import_client37.gql`
3910
- mutation CreateBulkNotifications($input: CreateBulkNotificationInput!) {
3911
- createBulkNotifications(input: $input) {
3904
+ var MARK_ALL_NOTIFICATIONS_READ = import_client37.gql`
3905
+ mutation MarkAllNotificationsRead($input: MarkAllNotificationsReadInput!) {
3906
+ markAllNotificationsRead(input: $input)
3907
+ }
3908
+ `;
3909
+
3910
+ // src/graphql/queries/notification.ts
3911
+ var import_client38 = require("@apollo/client");
3912
+ var GET_USER_NOTIFICATIONS2 = import_client38.gql`
3913
+ query GetUserNotifications(
3914
+ $userId: String!
3915
+ $limit: Int
3916
+ $offset: Int
3917
+ $isRead: String
3918
+ ) {
3919
+ userNotifications(
3920
+ userId: $userId
3921
+ limit: $limit
3922
+ offset: $offset
3923
+ isRead: $isRead
3924
+ ) {
3912
3925
  id
3913
3926
  userId
3914
3927
  title
@@ -3921,9 +3934,17 @@ var CREATE_BULK_NOTIFICATIONS = import_client37.gql`
3921
3934
  }
3922
3935
  }
3923
3936
  `;
3924
- var MARK_NOTIFICATION_READ = import_client37.gql`
3925
- mutation MarkNotificationRead($input: MarkNotificationReadInput!) {
3926
- markNotificationRead(input: $input) {
3937
+ var GET_NOTIFICATION_COUNT = import_client38.gql`
3938
+ query GetNotificationCount($userId: String!) {
3939
+ notificationCount(userId: $userId) {
3940
+ total
3941
+ unread
3942
+ }
3943
+ }
3944
+ `;
3945
+ var GET_UNREAD_NOTIFICATIONS = import_client38.gql`
3946
+ query GetUnreadNotifications($userId: String!, $limit: Int) {
3947
+ unreadNotifications(userId: $userId, limit: $limit) {
3927
3948
  id
3928
3949
  userId
3929
3950
  title
@@ -3936,11 +3957,104 @@ var MARK_NOTIFICATION_READ = import_client37.gql`
3936
3957
  }
3937
3958
  }
3938
3959
  `;
3939
- var MARK_ALL_NOTIFICATIONS_READ = import_client37.gql`
3940
- mutation MarkAllNotificationsRead($input: MarkAllNotificationsReadInput!) {
3941
- markAllNotificationsRead(input: $input)
3942
- }
3943
- `;
3960
+
3961
+ // src/graphql/hooks/notifications.ts
3962
+ var useNotifications = (userId) => {
3963
+ const client = (0, import_client39.useApolloClient)();
3964
+ const {
3965
+ data: notificationsData,
3966
+ loading: notificationsLoading,
3967
+ error: notificationsError,
3968
+ refetch: refetchNotifications
3969
+ } = (0, import_client39.useQuery)(GET_USER_NOTIFICATIONS2, {
3970
+ variables: { userId, limit: 50, offset: 0 },
3971
+ fetchPolicy: "cache-and-network",
3972
+ skip: !userId
3973
+ });
3974
+ const {
3975
+ data: countData,
3976
+ loading: countLoading,
3977
+ error: countError,
3978
+ refetch: refetchCount
3979
+ } = (0, import_client39.useQuery)(GET_NOTIFICATION_COUNT, {
3980
+ variables: { userId },
3981
+ fetchPolicy: "cache-and-network",
3982
+ skip: !userId
3983
+ });
3984
+ const {
3985
+ data: unreadData,
3986
+ loading: unreadLoading,
3987
+ error: unreadError,
3988
+ refetch: refetchUnread
3989
+ } = (0, import_client39.useQuery)(GET_UNREAD_NOTIFICATIONS, {
3990
+ variables: { userId, limit: 20 },
3991
+ fetchPolicy: "cache-and-network",
3992
+ skip: !userId
3993
+ });
3994
+ const [createNotification, { loading: createLoading }] = (0, import_client39.useMutation)(CREATE_NOTIFICATION);
3995
+ const [createBulkNotifications, { loading: createBulkLoading }] = (0, import_client39.useMutation)(
3996
+ CREATE_BULK_NOTIFICATIONS
3997
+ );
3998
+ const [markNotificationRead, { loading: markReadLoading }] = (0, import_client39.useMutation)(
3999
+ MARK_NOTIFICATION_READ
4000
+ );
4001
+ const [markAllNotificationsRead, { loading: markAllReadLoading }] = (0, import_client39.useMutation)(MARK_ALL_NOTIFICATIONS_READ);
4002
+ const refetchAll = () => {
4003
+ if (userId) {
4004
+ refetchNotifications();
4005
+ refetchCount();
4006
+ refetchUnread();
4007
+ }
4008
+ };
4009
+ const invalidateCache = () => {
4010
+ client.cache.evict({ fieldName: "userNotifications" });
4011
+ client.cache.evict({ fieldName: "notificationCount" });
4012
+ client.cache.evict({ fieldName: "unreadNotifications" });
4013
+ client.cache.gc();
4014
+ };
4015
+ return {
4016
+ // Data
4017
+ notifications: notificationsData?.userNotifications || [],
4018
+ count: countData?.notificationCount || { total: 0, unread: 0 },
4019
+ unreadNotifications: unreadData?.unreadNotifications || [],
4020
+ // Loading states
4021
+ notificationsLoading,
4022
+ countLoading,
4023
+ unreadLoading,
4024
+ createLoading,
4025
+ createBulkLoading,
4026
+ markReadLoading,
4027
+ markAllReadLoading,
4028
+ // Errors
4029
+ notificationsError,
4030
+ countError,
4031
+ unreadError,
4032
+ // Actions
4033
+ createNotification: async (input) => {
4034
+ const result = await createNotification({ variables: { input } });
4035
+ refetchAll();
4036
+ return result;
4037
+ },
4038
+ createBulkNotifications: async (input) => {
4039
+ const result = await createBulkNotifications({ variables: { input } });
4040
+ refetchAll();
4041
+ return result;
4042
+ },
4043
+ markNotificationRead: async (input) => {
4044
+ const result = await markNotificationRead({ variables: { input } });
4045
+ refetchAll();
4046
+ return result;
4047
+ },
4048
+ markAllNotificationsRead: async (input) => {
4049
+ const result = await markAllNotificationsRead({ variables: { input } });
4050
+ refetchAll();
4051
+ return result;
4052
+ },
4053
+ // Utilities
4054
+ refetchAll,
4055
+ invalidateCache
4056
+ };
4057
+ };
3944
4058
 
3945
4059
  // src/hooks/useLocationSearch.ts
3946
4060
  var handleApiError = (error, message) => {
@@ -5122,100 +5236,6 @@ function useContactUsForm(data) {
5122
5236
  };
5123
5237
  }
5124
5238
 
5125
- // src/hooks/useNotifications.ts
5126
- var import_client38 = require("@apollo/client");
5127
- var useNotifications = (userId) => {
5128
- const client = (0, import_client38.useApolloClient)();
5129
- const {
5130
- data: notificationsData,
5131
- loading: notificationsLoading,
5132
- error: notificationsError,
5133
- refetch: refetchNotifications
5134
- } = (0, import_client38.useQuery)(GET_USER_NOTIFICATIONS2, {
5135
- variables: { userId, limit: 50, offset: 0 },
5136
- fetchPolicy: "cache-and-network"
5137
- });
5138
- const {
5139
- data: countData,
5140
- loading: countLoading,
5141
- error: countError,
5142
- refetch: refetchCount
5143
- } = (0, import_client38.useQuery)(GET_NOTIFICATION_COUNT, {
5144
- variables: { userId },
5145
- fetchPolicy: "cache-and-network"
5146
- });
5147
- const {
5148
- data: unreadData,
5149
- loading: unreadLoading,
5150
- error: unreadError,
5151
- refetch: refetchUnread
5152
- } = (0, import_client38.useQuery)(GET_UNREAD_NOTIFICATIONS, {
5153
- variables: { userId, limit: 20 },
5154
- fetchPolicy: "cache-and-network"
5155
- });
5156
- const [createNotification, { loading: createLoading }] = (0, import_client38.useMutation)(CREATE_NOTIFICATION);
5157
- const [createBulkNotifications, { loading: createBulkLoading }] = (0, import_client38.useMutation)(
5158
- CREATE_BULK_NOTIFICATIONS
5159
- );
5160
- const [markNotificationRead, { loading: markReadLoading }] = (0, import_client38.useMutation)(
5161
- MARK_NOTIFICATION_READ
5162
- );
5163
- const [markAllNotificationsRead, { loading: markAllReadLoading }] = (0, import_client38.useMutation)(MARK_ALL_NOTIFICATIONS_READ);
5164
- const refetchAll = () => {
5165
- refetchNotifications();
5166
- refetchCount();
5167
- refetchUnread();
5168
- };
5169
- const invalidateCache = () => {
5170
- client.cache.evict({ fieldName: "userNotifications" });
5171
- client.cache.evict({ fieldName: "notificationCount" });
5172
- client.cache.evict({ fieldName: "unreadNotifications" });
5173
- client.cache.gc();
5174
- };
5175
- return {
5176
- // Data
5177
- notifications: notificationsData?.userNotifications || [],
5178
- count: countData?.notificationCount || { total: 0, unread: 0 },
5179
- unreadNotifications: unreadData?.unreadNotifications || [],
5180
- // Loading states
5181
- notificationsLoading,
5182
- countLoading,
5183
- unreadLoading,
5184
- createLoading,
5185
- createBulkLoading,
5186
- markReadLoading,
5187
- markAllReadLoading,
5188
- // Errors
5189
- notificationsError,
5190
- countError,
5191
- unreadError,
5192
- // Actions
5193
- createNotification: async (input) => {
5194
- const result = await createNotification({ variables: { input } });
5195
- refetchAll();
5196
- return result;
5197
- },
5198
- createBulkNotifications: async (input) => {
5199
- const result = await createBulkNotifications({ variables: { input } });
5200
- refetchAll();
5201
- return result;
5202
- },
5203
- markNotificationRead: async (input) => {
5204
- const result = await markNotificationRead({ variables: { input } });
5205
- refetchAll();
5206
- return result;
5207
- },
5208
- markAllNotificationsRead: async (input) => {
5209
- const result = await markAllNotificationsRead({ variables: { input } });
5210
- refetchAll();
5211
- return result;
5212
- },
5213
- // Utilities
5214
- refetchAll,
5215
- invalidateCache
5216
- };
5217
- };
5218
-
5219
5239
  // src/storage/index.ts
5220
5240
  var SAVED_PASSWORD_KEY = "savedPassword";
5221
5241
  var SAVED_EMAIL_KEY = "savedEmail";
@@ -5262,8 +5282,6 @@ var fonts = {
5262
5282
  };
5263
5283
  // Annotate the CommonJS export names for ESM import in node:
5264
5284
  0 && (module.exports = {
5265
- CREATE_BULK_NOTIFICATIONS,
5266
- CREATE_NOTIFICATION,
5267
5285
  EnumInviteStatus,
5268
5286
  EnumNotification,
5269
5287
  EnumOSType,
@@ -5275,12 +5293,8 @@ var fonts = {
5275
5293
  EnumSocialMedia,
5276
5294
  EnumUserLicence,
5277
5295
  EnumUserRole,
5278
- GET_NOTIFICATION_COUNT,
5279
- GET_UNREAD_NOTIFICATIONS,
5280
- GET_USER_NOTIFICATIONS,
5296
+ GET_CHAT_MESSAGE,
5281
5297
  ImageTypeEnum,
5282
- MARK_ALL_NOTIFICATIONS_READ,
5283
- MARK_NOTIFICATION_READ,
5284
5298
  SAVED_EMAIL_KEY,
5285
5299
  SAVED_PASSWORD_KEY,
5286
5300
  SAVED_REFRESH_TOKEN_KEY,
@@ -5370,6 +5384,7 @@ var fonts = {
5370
5384
  useDeleteTester,
5371
5385
  useDeleteUser,
5372
5386
  useGetChat,
5387
+ useGetChatSubscription,
5373
5388
  useGetMarket,
5374
5389
  useGetMarketInfo,
5375
5390
  useGetMarketRelations,