@timardex/cluemart-shared 1.2.70 → 1.2.71

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 (35) hide show
  1. package/dist/{ad-CJBWZnb9.d.ts → ad-DIpc7lyr.d.ts} +1 -1
  2. package/dist/{ad-BdK9N1Fw.d.mts → ad-_p1gmLNT.d.mts} +1 -1
  3. package/dist/{auth-Dxb3_Ak-.d.ts → auth-Bjqk92cx.d.ts} +1 -1
  4. package/dist/{auth-BKpylbaZ.d.mts → auth-CcX2zTDU.d.mts} +1 -1
  5. package/dist/formFields/index.cjs +198 -105
  6. package/dist/formFields/index.cjs.map +1 -1
  7. package/dist/formFields/index.d.mts +1 -1
  8. package/dist/formFields/index.d.ts +1 -1
  9. package/dist/formFields/index.mjs +198 -105
  10. package/dist/formFields/index.mjs.map +1 -1
  11. package/dist/{global-CfX05e2q.d.mts → global-B0AzhgkH.d.mts} +4 -4
  12. package/dist/{global-flZOvt2w.d.ts → global-BH6qrlBv.d.ts} +4 -4
  13. package/dist/graphql/index.cjs +573 -565
  14. package/dist/graphql/index.cjs.map +1 -1
  15. package/dist/graphql/index.d.mts +459 -211
  16. package/dist/graphql/index.d.ts +459 -211
  17. package/dist/graphql/index.mjs +378 -370
  18. package/dist/graphql/index.mjs.map +1 -1
  19. package/dist/hooks/index.cjs +10 -5
  20. package/dist/hooks/index.cjs.map +1 -1
  21. package/dist/hooks/index.d.mts +3 -3
  22. package/dist/hooks/index.d.ts +3 -3
  23. package/dist/hooks/index.mjs +10 -5
  24. package/dist/hooks/index.mjs.map +1 -1
  25. package/dist/index.cjs +787 -681
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.mts +460 -212
  28. package/dist/index.d.ts +460 -212
  29. package/dist/index.mjs +586 -480
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/types/index.d.mts +3 -3
  32. package/dist/types/index.d.ts +3 -3
  33. package/dist/utils/index.d.mts +1 -1
  34. package/dist/utils/index.d.ts +1 -1
  35. package/package.json +24 -24
@@ -121,7 +121,7 @@ __export(graphql_exports, {
121
121
  module.exports = __toCommonJS(graphql_exports);
122
122
 
123
123
  // src/graphql/hooks/admin/hooksMutation.ts
124
- var import_client5 = require("@apollo/client");
124
+ var import_react = require("@apollo/client/react");
125
125
 
126
126
  // src/graphql/mutations/admin.ts
127
127
  var import_client = require("@apollo/client");
@@ -202,6 +202,13 @@ var TERMS_AGREEMENT_FIELDS_FRAGMENT = import_client2.gql`
202
202
  timestamp
203
203
  }
204
204
  `;
205
+ var LICENCE_FIELDS_FRAGMENT = import_client2.gql`
206
+ fragment LicenceFields on LicenceType {
207
+ expiryDate
208
+ issuedDate
209
+ licenceType
210
+ }
211
+ `;
205
212
  var USER_ACTIVITY_FIELDS_FRAGMENT = import_client2.gql`
206
213
  fragment UserActivityFields on UserActivityType {
207
214
  favourites {
@@ -251,7 +258,9 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
251
258
  firstName
252
259
  isTester
253
260
  lastName
254
- licences
261
+ licences {
262
+ ...LicenceFields
263
+ }
255
264
  platform
256
265
  preferredRegion
257
266
  refreshToken
@@ -269,6 +278,7 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
269
278
  ${ASSOCIATES_FIELDS_FRAGMENT}
270
279
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
271
280
  ${USER_ACTIVITY_FIELDS_FRAGMENT}
281
+ ${LICENCE_FIELDS_FRAGMENT}
272
282
  `;
273
283
  var STALL_TYPE_FIELDS_FRAGMENT = import_client2.gql`
274
284
  fragment StallTypeFields on StallTypeType {
@@ -687,25 +697,22 @@ var GET_VENDOR_INFO = import_client4.gql`
687
697
 
688
698
  // src/graphql/hooks/admin/hooksMutation.ts
689
699
  var useAdminUpdateResourceType = () => {
690
- const [adminUpdateResourceType, { loading, error }] = (0, import_client5.useMutation)(
691
- ADMIN_UPDATE_RESOURCE_TYPE_MUTATION,
692
- {
693
- awaitRefetchQueries: true,
694
- refetchQueries: (mutationResult) => {
695
- const adminUpdateResourceType2 = mutationResult?.data?.adminUpdateResourceType;
696
- const resourceId = adminUpdateResourceType2?.resourceId;
697
- const resourceType = adminUpdateResourceType2?.resourceType;
698
- if (!resourceId) return [];
699
- const detectQuery = resourceType === "event" /* EVENT */ ? GET_EVENT : GET_VENDOR;
700
- return [
701
- {
702
- query: detectQuery,
703
- variables: { _id: resourceId }
704
- }
705
- ];
706
- }
700
+ const [adminUpdateResourceType, { loading, error }] = (0, import_react.useMutation)(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {
701
+ awaitRefetchQueries: true,
702
+ refetchQueries: (mutationResult) => {
703
+ const adminUpdateResourceType2 = mutationResult?.data?.adminUpdateResourceType;
704
+ const resourceId = adminUpdateResourceType2?.resourceId;
705
+ const resourceType = adminUpdateResourceType2?.resourceType;
706
+ if (!resourceId) return [];
707
+ const detectQuery = resourceType === "event" /* EVENT */ ? GET_EVENT : GET_VENDOR;
708
+ return [
709
+ {
710
+ query: detectQuery,
711
+ variables: { _id: resourceId }
712
+ }
713
+ ];
707
714
  }
708
- );
715
+ });
709
716
  return {
710
717
  adminUpdateResourceType,
711
718
  error,
@@ -714,11 +721,11 @@ var useAdminUpdateResourceType = () => {
714
721
  };
715
722
 
716
723
  // src/graphql/hooks/auth.ts
717
- var import_client7 = require("@apollo/client");
724
+ var import_react2 = require("@apollo/client/react");
718
725
 
719
726
  // src/graphql/mutations/auth.ts
720
- var import_client6 = require("@apollo/client");
721
- var REGISTER_MUTATION = import_client6.gql`
727
+ var import_client5 = require("@apollo/client");
728
+ var REGISTER_MUTATION = import_client5.gql`
722
729
  mutation register($input: RegisterInputType!) {
723
730
  register(input: $input) {
724
731
  message
@@ -731,7 +738,7 @@ var REGISTER_MUTATION = import_client6.gql`
731
738
  }
732
739
  ${USER_FIELDS_FRAGMENT}
733
740
  `;
734
- var LOGIN_MUTATION = import_client6.gql`
741
+ var LOGIN_MUTATION = import_client5.gql`
735
742
  mutation login($input: LoginInputType!) {
736
743
  login(input: $input) {
737
744
  message
@@ -744,14 +751,14 @@ var LOGIN_MUTATION = import_client6.gql`
744
751
  }
745
752
  ${USER_FIELDS_FRAGMENT}
746
753
  `;
747
- var LOGOUT_MUTATION = import_client6.gql`
754
+ var LOGOUT_MUTATION = import_client5.gql`
748
755
  mutation logout {
749
756
  logout {
750
757
  message
751
758
  }
752
759
  }
753
760
  `;
754
- var REFRESH_TOKEN_MUTATION = import_client6.gql`
761
+ var REFRESH_TOKEN_MUTATION = import_client5.gql`
755
762
  mutation refreshToken($input: RefreshTokenInputType!) {
756
763
  refreshToken(input: $input) {
757
764
  refreshToken
@@ -759,21 +766,21 @@ var REFRESH_TOKEN_MUTATION = import_client6.gql`
759
766
  }
760
767
  }
761
768
  `;
762
- var RESET_PASSWORD_MUTATION = import_client6.gql`
769
+ var RESET_PASSWORD_MUTATION = import_client5.gql`
763
770
  mutation resetPassword($input: ResetPasswordInputType!) {
764
771
  resetPassword(input: $input) {
765
772
  message
766
773
  }
767
774
  }
768
775
  `;
769
- var REQUEST_PASSWORD_RESET_MUTATION = import_client6.gql`
776
+ var REQUEST_PASSWORD_RESET_MUTATION = import_client5.gql`
770
777
  mutation requestPasswordReset($input: RequestPasswordResetInputType!) {
771
778
  requestPasswordReset(input: $input) {
772
779
  message
773
780
  }
774
781
  }
775
782
  `;
776
- var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client6.gql`
783
+ var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client5.gql`
777
784
  mutation validateVerificationToken(
778
785
  $input: ValidateVerificationTokenInputType!
779
786
  ) {
@@ -785,51 +792,51 @@ var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client6.gql`
785
792
 
786
793
  // src/graphql/hooks/auth.ts
787
794
  var useRegister = () => {
788
- const [register, { loading, error }] = (0, import_client7.useMutation)(REGISTER_MUTATION);
795
+ const [register, { loading, error }] = (0, import_react2.useMutation)(REGISTER_MUTATION);
789
796
  return { error, loading, register };
790
797
  };
791
798
  var useLogin = () => {
792
- const [login, { loading, error }] = (0, import_client7.useMutation)(LOGIN_MUTATION);
799
+ const [login, { loading, error }] = (0, import_react2.useMutation)(LOGIN_MUTATION);
793
800
  return { error, loading, login };
794
801
  };
795
802
  var useLogout = () => {
796
- const [logout, { loading, error }] = (0, import_client7.useMutation)(LOGOUT_MUTATION);
803
+ const [logout, { loading, error }] = (0, import_react2.useMutation)(LOGOUT_MUTATION);
797
804
  return { error, loading, logout };
798
805
  };
799
806
  var useRefreshToken = () => {
800
- const [refreshToken, { loading, error }] = (0, import_client7.useMutation)(
807
+ const [refreshToken, { loading, error }] = (0, import_react2.useMutation)(
801
808
  REFRESH_TOKEN_MUTATION
802
809
  );
803
810
  return { error, loading, refreshToken };
804
811
  };
805
812
  var useRequestPasswordReset = () => {
806
- const [requestPasswordReset, { loading, error }] = (0, import_client7.useMutation)(
813
+ const [requestPasswordReset, { loading, error }] = (0, import_react2.useMutation)(
807
814
  REQUEST_PASSWORD_RESET_MUTATION
808
815
  );
809
816
  return { error, loading, requestPasswordReset };
810
817
  };
811
818
  var useValidateVerificationToken = () => {
812
- const [validateVerificationToken, { loading, error }] = (0, import_client7.useMutation)(
819
+ const [validateVerificationToken, { loading, error }] = (0, import_react2.useMutation)(
813
820
  VALIDATE_VERIFICATION_TOKEN_MUTATION
814
821
  );
815
822
  return { error, loading, validateVerificationToken };
816
823
  };
817
824
  var useResetPassword = () => {
818
- const [resetPassword, { loading, error }] = (0, import_client7.useMutation)(
825
+ const [resetPassword, { loading, error }] = (0, import_react2.useMutation)(
819
826
  RESET_PASSWORD_MUTATION
820
827
  );
821
828
  return { error, loading, resetPassword };
822
829
  };
823
830
 
824
831
  // src/graphql/hooks/chat/hooksMutation.ts
825
- var import_client10 = require("@apollo/client");
832
+ var import_react3 = require("@apollo/client/react");
826
833
 
827
834
  // src/graphql/mutations/chat.ts
828
- var import_client9 = require("@apollo/client");
835
+ var import_client7 = require("@apollo/client");
829
836
 
830
837
  // src/graphql/queries/chat.ts
831
- var import_client8 = require("@apollo/client");
832
- var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client8.gql`
838
+ var import_client6 = require("@apollo/client");
839
+ var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client6.gql`
833
840
  fragment ChatMessageFields on ChatMessageType {
834
841
  _id
835
842
  content
@@ -838,7 +845,7 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client8.gql`
838
845
  updatedAt
839
846
  }
840
847
  `;
841
- var CHAT_PARTICIPANT = import_client8.gql`
848
+ var CHAT_PARTICIPANT = import_client6.gql`
842
849
  fragment ChatParticipantFields on ChatParticipantType {
843
850
  active
844
851
  userAvatar
@@ -847,7 +854,7 @@ var CHAT_PARTICIPANT = import_client8.gql`
847
854
  userName
848
855
  }
849
856
  `;
850
- var CHAT_FIELDS_FRAGMENT = import_client8.gql`
857
+ var CHAT_FIELDS_FRAGMENT = import_client6.gql`
851
858
  fragment ChatFields on ChatType {
852
859
  _id
853
860
  active
@@ -871,7 +878,7 @@ var CHAT_FIELDS_FRAGMENT = import_client8.gql`
871
878
  ${CHAT_MESSAGE_FIELDS_FRAGMENT}
872
879
  ${CHAT_PARTICIPANT}
873
880
  `;
874
- var CHAT = import_client8.gql`
881
+ var CHAT = import_client6.gql`
875
882
  query chat($_id: ID!) {
876
883
  chat(_id: $_id) {
877
884
  ...ChatFields
@@ -879,7 +886,7 @@ var CHAT = import_client8.gql`
879
886
  }
880
887
  ${CHAT_FIELDS_FRAGMENT}
881
888
  `;
882
- var USER_CHATS = import_client8.gql`
889
+ var USER_CHATS = import_client6.gql`
883
890
  query userChats {
884
891
  userChats {
885
892
  ...ChatFields
@@ -889,7 +896,7 @@ var USER_CHATS = import_client8.gql`
889
896
  `;
890
897
 
891
898
  // src/graphql/mutations/chat.ts
892
- var SEND_CHAT_MESSAGE_MUTATION = import_client9.gql`
899
+ var SEND_CHAT_MESSAGE_MUTATION = import_client7.gql`
893
900
  mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
894
901
  sendChatMessage(_id: $_id, input: $input) {
895
902
  ...ChatFields
@@ -897,12 +904,12 @@ var SEND_CHAT_MESSAGE_MUTATION = import_client9.gql`
897
904
  }
898
905
  ${CHAT_FIELDS_FRAGMENT}
899
906
  `;
900
- var DELETE_CHAT_MUTATION = import_client9.gql`
907
+ var DELETE_CHAT_MUTATION = import_client7.gql`
901
908
  mutation deleteChat($_id: ID!) {
902
909
  deleteChat(_id: $_id)
903
910
  }
904
911
  `;
905
- var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client9.gql`
912
+ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client7.gql`
906
913
  mutation addParticipantToChat($chatId: ID!, $userId: ID!) {
907
914
  addParticipantToChat(chatId: $chatId, userId: $userId) {
908
915
  ...ChatFields
@@ -910,7 +917,7 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client9.gql`
910
917
  }
911
918
  ${CHAT_FIELDS_FRAGMENT}
912
919
  `;
913
- var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client9.gql`
920
+ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client7.gql`
914
921
  mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {
915
922
  removeParticipantFromChat(chatId: $chatId, userId: $userId)
916
923
  }
@@ -918,53 +925,47 @@ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client9.gql`
918
925
 
919
926
  // src/graphql/hooks/chat/hooksMutation.ts
920
927
  var useSendChatMessage = () => {
921
- const [sendChatMessage, { loading, error }] = (0, import_client10.useMutation)(
922
- SEND_CHAT_MESSAGE_MUTATION,
923
- {
924
- awaitRefetchQueries: true,
925
- refetchQueries: (mutationResult) => {
926
- const chatId = mutationResult?.data?.sendChatMessage?._id;
927
- return [
928
- {
929
- query: CHAT,
930
- variables: { _id: chatId }
931
- }
932
- ];
933
- }
928
+ const [sendChatMessage, { loading, error }] = (0, import_react3.useMutation)(SEND_CHAT_MESSAGE_MUTATION, {
929
+ awaitRefetchQueries: true,
930
+ refetchQueries: (mutationResult) => {
931
+ const chatId = mutationResult?.data?.sendChatMessage?._id;
932
+ return [
933
+ {
934
+ query: CHAT,
935
+ variables: { _id: chatId }
936
+ }
937
+ ];
934
938
  }
935
- );
939
+ });
936
940
  return { error, loading, sendChatMessage };
937
941
  };
938
942
  var useDeleteChat = () => {
939
- const [deleteChat, { loading, error }] = (0, import_client10.useMutation)(DELETE_CHAT_MUTATION, {
943
+ const [deleteChat, { loading, error }] = (0, import_react3.useMutation)(DELETE_CHAT_MUTATION, {
940
944
  awaitRefetchQueries: true,
941
945
  refetchQueries: [{ query: USER_CHATS }]
942
946
  });
943
947
  return { deleteChat, error, loading };
944
948
  };
945
949
  var useAddParticipantToChat = () => {
946
- const [addParticipantToChat, { loading, error }] = (0, import_client10.useMutation)(
947
- ADD_PARTICIPANT_TO_CHAT_MUTATION,
948
- {
949
- awaitRefetchQueries: true,
950
- refetchQueries: (mutationResult) => {
951
- const chatId = mutationResult?.data?.addParticipantToChat?._id;
952
- return [
953
- {
954
- query: CHAT,
955
- variables: { _id: chatId }
956
- },
957
- {
958
- query: USER_CHATS
959
- }
960
- ];
961
- }
950
+ const [addParticipantToChat, { loading, error }] = (0, import_react3.useMutation)(ADD_PARTICIPANT_TO_CHAT_MUTATION, {
951
+ awaitRefetchQueries: true,
952
+ refetchQueries: (mutationResult) => {
953
+ const chatId = mutationResult?.data?.addParticipantToChat?._id;
954
+ return [
955
+ {
956
+ query: CHAT,
957
+ variables: { _id: chatId }
958
+ },
959
+ {
960
+ query: USER_CHATS
961
+ }
962
+ ];
962
963
  }
963
- );
964
+ });
964
965
  return { addParticipantToChat, error, loading };
965
966
  };
966
967
  var useRemoveParticipantFromChat = () => {
967
- const [removeParticipantFromChat, { loading, error }] = (0, import_client10.useMutation)(
968
+ const [removeParticipantFromChat, { loading, error }] = (0, import_react3.useMutation)(
968
969
  REMOVE_PARTICIPANT_FROM_CHAT_MUTATION,
969
970
  {
970
971
  awaitRefetchQueries: true,
@@ -975,11 +976,11 @@ var useRemoveParticipantFromChat = () => {
975
976
  };
976
977
 
977
978
  // src/graphql/hooks/chat/hooksQuery.ts
978
- var import_client12 = require("@apollo/client");
979
+ var import_react4 = require("@apollo/client/react");
979
980
 
980
981
  // src/graphql/subscriptions/chat.ts
981
- var import_client11 = require("@apollo/client");
982
- var GET_CHAT_MESSAGE = import_client11.gql`
982
+ var import_client8 = require("@apollo/client");
983
+ var GET_CHAT_MESSAGE = import_client8.gql`
983
984
  subscription {
984
985
  getChatMessage {
985
986
  ...ChatFields
@@ -990,7 +991,7 @@ var GET_CHAT_MESSAGE = import_client11.gql`
990
991
 
991
992
  // src/graphql/hooks/chat/hooksQuery.ts
992
993
  var useGetChat = (_id) => {
993
- const { loading, error, data, refetch } = (0, import_client12.useQuery)(CHAT, {
994
+ const { loading, error, data, refetch } = (0, import_react4.useQuery)(CHAT, {
994
995
  fetchPolicy: "network-only",
995
996
  skip: !_id,
996
997
  variables: { _id }
@@ -999,24 +1000,29 @@ var useGetChat = (_id) => {
999
1000
  return { chat, error, loading, refetch };
1000
1001
  };
1001
1002
  var useGetUserChats = () => {
1002
- const { loading, error, data, refetch } = (0, import_client12.useQuery)(USER_CHATS, {
1003
- fetchPolicy: "network-only"
1004
- });
1005
- const userChats = data?.userChats;
1003
+ const { loading, error, data, refetch } = (0, import_react4.useQuery)(
1004
+ USER_CHATS,
1005
+ {
1006
+ fetchPolicy: "network-only"
1007
+ }
1008
+ );
1009
+ const userChats = data?.userChats || [];
1006
1010
  return { error, loading, refetch, userChats };
1007
1011
  };
1008
1012
  var useGetChatSubscription = () => {
1009
- const { data, loading, error } = (0, import_client12.useSubscription)(GET_CHAT_MESSAGE);
1013
+ const { data, loading, error } = (0, import_react4.useSubscription)(
1014
+ GET_CHAT_MESSAGE
1015
+ );
1010
1016
  const chat = data?.getChat;
1011
1017
  return { chat, error, loading };
1012
1018
  };
1013
1019
 
1014
1020
  // src/graphql/hooks/contactUs.ts
1015
- var import_client14 = require("@apollo/client");
1021
+ var import_react5 = require("@apollo/client/react");
1016
1022
 
1017
1023
  // src/graphql/mutations/contactUs.ts
1018
- var import_client13 = require("@apollo/client");
1019
- var CONTACT_US_MUTATION = import_client13.gql`
1024
+ var import_client9 = require("@apollo/client");
1025
+ var CONTACT_US_MUTATION = import_client9.gql`
1020
1026
  mutation contactUs($input: ContactUsInputType!) {
1021
1027
  contactUs(input: $input) {
1022
1028
  message
@@ -1026,16 +1032,16 @@ var CONTACT_US_MUTATION = import_client13.gql`
1026
1032
 
1027
1033
  // src/graphql/hooks/contactUs.ts
1028
1034
  var useContactUs = () => {
1029
- const [contactUs, { loading, error }] = (0, import_client14.useMutation)(CONTACT_US_MUTATION);
1035
+ const [contactUs, { loading, error }] = (0, import_react5.useMutation)(CONTACT_US_MUTATION);
1030
1036
  return { contactUs, error, loading };
1031
1037
  };
1032
1038
 
1033
1039
  // src/graphql/hooks/event/hooksMutation.ts
1034
- var import_client18 = require("@apollo/client");
1040
+ var import_react6 = require("@apollo/client/react");
1035
1041
 
1036
1042
  // src/graphql/mutations/event.ts
1037
- var import_client15 = require("@apollo/client");
1038
- var CREATE_EVENT_MUTATION = import_client15.gql`
1043
+ var import_client10 = require("@apollo/client");
1044
+ var CREATE_EVENT_MUTATION = import_client10.gql`
1039
1045
  mutation createEvent($input: EventInputType!) {
1040
1046
  createEvent(input: $input) {
1041
1047
  ...EventFields
@@ -1043,7 +1049,7 @@ var CREATE_EVENT_MUTATION = import_client15.gql`
1043
1049
  }
1044
1050
  ${EVENT}
1045
1051
  `;
1046
- var UPDATE_EVENT_MUTATION = import_client15.gql`
1052
+ var UPDATE_EVENT_MUTATION = import_client10.gql`
1047
1053
  mutation updateEvent($_id: ID!, $input: EventInputType!) {
1048
1054
  updateEvent(_id: $_id, input: $input) {
1049
1055
  ...EventFields
@@ -1051,12 +1057,12 @@ var UPDATE_EVENT_MUTATION = import_client15.gql`
1051
1057
  }
1052
1058
  ${EVENT}
1053
1059
  `;
1054
- var DELETE_EVENT_MUTATION = import_client15.gql`
1060
+ var DELETE_EVENT_MUTATION = import_client10.gql`
1055
1061
  mutation deleteEvent($_id: ID!) {
1056
1062
  deleteEvent(_id: $_id)
1057
1063
  }
1058
1064
  `;
1059
- var CREATE_EVENT_INFO_MUTATION = import_client15.gql`
1065
+ var CREATE_EVENT_INFO_MUTATION = import_client10.gql`
1060
1066
  mutation createEventInfo($input: EventInfoInputType!) {
1061
1067
  createEventInfo(input: $input) {
1062
1068
  ...EventInfoFields
@@ -1064,7 +1070,7 @@ var CREATE_EVENT_INFO_MUTATION = import_client15.gql`
1064
1070
  }
1065
1071
  ${EVENT_INFO}
1066
1072
  `;
1067
- var UPDATE_EVENT_INFO_MUTATION = import_client15.gql`
1073
+ var UPDATE_EVENT_INFO_MUTATION = import_client10.gql`
1068
1074
  mutation updateEventInfo($_id: ID!, $input: EventInfoInputType!) {
1069
1075
  updateEventInfo(_id: $_id, input: $input) {
1070
1076
  ...EventInfoFields
@@ -1074,11 +1080,11 @@ var UPDATE_EVENT_INFO_MUTATION = import_client15.gql`
1074
1080
  `;
1075
1081
 
1076
1082
  // src/graphql/queries/user.ts
1077
- var import_client17 = require("@apollo/client");
1083
+ var import_client12 = require("@apollo/client");
1078
1084
 
1079
1085
  // src/graphql/queries/partner.ts
1080
- var import_client16 = require("@apollo/client");
1081
- var PARTNER = import_client16.gql`
1086
+ var import_client11 = require("@apollo/client");
1087
+ var PARTNER = import_client11.gql`
1082
1088
  fragment PartnerFields on PartnerType {
1083
1089
  _id
1084
1090
  active
@@ -1132,7 +1138,7 @@ var PARTNER = import_client16.gql`
1132
1138
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
1133
1139
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
1134
1140
  `;
1135
- var GET_PARTNERS = import_client16.gql`
1141
+ var GET_PARTNERS = import_client11.gql`
1136
1142
  query getPartners {
1137
1143
  partners {
1138
1144
  ...PartnerFields
@@ -1140,7 +1146,7 @@ var GET_PARTNERS = import_client16.gql`
1140
1146
  }
1141
1147
  ${PARTNER}
1142
1148
  `;
1143
- var GET_PARTNER = import_client16.gql`
1149
+ var GET_PARTNER = import_client11.gql`
1144
1150
  query getPartner($_id: ID!) {
1145
1151
  partner(_id: $_id) {
1146
1152
  ...PartnerFields
@@ -1148,7 +1154,7 @@ var GET_PARTNER = import_client16.gql`
1148
1154
  }
1149
1155
  ${PARTNER}
1150
1156
  `;
1151
- var GET_PARTNERS_BY_REGION = import_client16.gql`
1157
+ var GET_PARTNERS_BY_REGION = import_client11.gql`
1152
1158
  query getPartnersByRegion($region: String!) {
1153
1159
  partnersByRegion(region: $region) {
1154
1160
  ...PartnerFields
@@ -1156,7 +1162,7 @@ var GET_PARTNERS_BY_REGION = import_client16.gql`
1156
1162
  }
1157
1163
  ${PARTNER}
1158
1164
  `;
1159
- var SEARCH_PARTNERS = import_client16.gql`
1165
+ var SEARCH_PARTNERS = import_client11.gql`
1160
1166
  query searchPartners($search: String!, $region: String) {
1161
1167
  partnersSearch(search: $search, region: $region) {
1162
1168
  ...PartnerFields
@@ -1166,7 +1172,7 @@ var SEARCH_PARTNERS = import_client16.gql`
1166
1172
  `;
1167
1173
 
1168
1174
  // src/graphql/queries/user.ts
1169
- var GET_USERS = import_client17.gql`
1175
+ var GET_USERS = import_client12.gql`
1170
1176
  query getUsers {
1171
1177
  users {
1172
1178
  ...UserFields
@@ -1174,7 +1180,7 @@ var GET_USERS = import_client17.gql`
1174
1180
  }
1175
1181
  ${USER_FIELDS_FRAGMENT}
1176
1182
  `;
1177
- var GET_USER = import_client17.gql`
1183
+ var GET_USER = import_client12.gql`
1178
1184
  query getUser($_id: ID!) {
1179
1185
  user(_id: $_id) {
1180
1186
  ...UserFields
@@ -1182,7 +1188,7 @@ var GET_USER = import_client17.gql`
1182
1188
  }
1183
1189
  ${USER_FIELDS_FRAGMENT}
1184
1190
  `;
1185
- var GET_USER_EVENTS = import_client17.gql`
1191
+ var GET_USER_EVENTS = import_client12.gql`
1186
1192
  query getUserEvents {
1187
1193
  userEvents {
1188
1194
  ...EventFields
@@ -1190,7 +1196,7 @@ var GET_USER_EVENTS = import_client17.gql`
1190
1196
  }
1191
1197
  ${EVENT}
1192
1198
  `;
1193
- var GET_USER_VENDORS = import_client17.gql`
1199
+ var GET_USER_VENDORS = import_client12.gql`
1194
1200
  query getUserVendors {
1195
1201
  userVendors {
1196
1202
  ...VendorFields
@@ -1198,7 +1204,7 @@ var GET_USER_VENDORS = import_client17.gql`
1198
1204
  }
1199
1205
  ${VENDOR}
1200
1206
  `;
1201
- var GET_USER_PARTNERS = import_client17.gql`
1207
+ var GET_USER_PARTNERS = import_client12.gql`
1202
1208
  query getUserPartners {
1203
1209
  userPartners {
1204
1210
  ...PartnerFields
@@ -1206,7 +1212,7 @@ var GET_USER_PARTNERS = import_client17.gql`
1206
1212
  }
1207
1213
  ${PARTNER}
1208
1214
  `;
1209
- var GET_USER_ACTIVITIES = import_client17.gql`
1215
+ var GET_USER_ACTIVITIES = import_client12.gql`
1210
1216
  query getUserActivities {
1211
1217
  userActivities {
1212
1218
  favourites {
@@ -1240,117 +1246,117 @@ var GET_USER_ACTIVITIES = import_client17.gql`
1240
1246
 
1241
1247
  // src/graphql/hooks/event/hooksMutation.ts
1242
1248
  var useCreateEvent = () => {
1243
- const [createEvent, { loading, error }] = (0, import_client18.useMutation)(CREATE_EVENT_MUTATION, {
1249
+ const [createEvent, { loading, error }] = (0, import_react6.useMutation)(CREATE_EVENT_MUTATION, {
1244
1250
  awaitRefetchQueries: true,
1245
1251
  refetchQueries: [{ query: GET_USER_EVENTS }]
1246
1252
  });
1247
1253
  return { createEvent, error, loading };
1248
1254
  };
1249
1255
  var useUpdateEvent = () => {
1250
- const [updateEvent, { loading, error }] = (0, import_client18.useMutation)(UPDATE_EVENT_MUTATION, {
1256
+ const [updateEvent, { loading, error }] = (0, import_react6.useMutation)(UPDATE_EVENT_MUTATION, {
1251
1257
  awaitRefetchQueries: true,
1252
1258
  refetchQueries: [{ query: GET_USER_EVENTS }]
1253
1259
  });
1254
1260
  return { error, loading, updateEvent };
1255
1261
  };
1256
1262
  var useDeleteEvent = () => {
1257
- const [deleteEvent, { loading, error }] = (0, import_client18.useMutation)(DELETE_EVENT_MUTATION, {
1263
+ const [deleteEvent, { loading, error }] = (0, import_react6.useMutation)(DELETE_EVENT_MUTATION, {
1258
1264
  awaitRefetchQueries: true,
1259
1265
  refetchQueries: [{ query: GET_USER_EVENTS }]
1260
1266
  });
1261
1267
  return { deleteEvent, error, loading };
1262
1268
  };
1263
1269
  var useCreateEventInfo = () => {
1264
- const [createEventInfo, { loading, error }] = (0, import_client18.useMutation)(
1265
- CREATE_EVENT_INFO_MUTATION,
1266
- {
1267
- awaitRefetchQueries: true,
1268
- refetchQueries: (mutationResult) => {
1269
- const eventId = mutationResult?.data?.createEventInfo?.eventId;
1270
- if (!eventId) return [];
1271
- return [
1272
- {
1273
- query: GET_EVENT_INFO,
1274
- variables: { eventId }
1275
- // Pass the eventId for refetching
1276
- },
1277
- {
1278
- query: GET_USER_EVENTS
1279
- },
1280
- {
1281
- query: GET_EVENT,
1282
- variables: { _id: eventId }
1283
- }
1284
- ];
1285
- }
1270
+ const [createEventInfo, { loading, error }] = (0, import_react6.useMutation)(CREATE_EVENT_INFO_MUTATION, {
1271
+ awaitRefetchQueries: true,
1272
+ refetchQueries: (mutationResult) => {
1273
+ const eventId = mutationResult?.data?.createEventInfo?.eventId;
1274
+ if (!eventId) return [];
1275
+ return [
1276
+ {
1277
+ query: GET_EVENT_INFO,
1278
+ variables: { eventId }
1279
+ // Pass the eventId for refetching
1280
+ },
1281
+ {
1282
+ query: GET_USER_EVENTS
1283
+ },
1284
+ {
1285
+ query: GET_EVENT,
1286
+ variables: { _id: eventId }
1287
+ }
1288
+ ];
1286
1289
  }
1287
- );
1290
+ });
1288
1291
  return { createEventInfo, error, loading };
1289
1292
  };
1290
1293
  var useUpdateEventInfo = () => {
1291
- const [updateEventInfo, { loading, error }] = (0, import_client18.useMutation)(
1292
- UPDATE_EVENT_INFO_MUTATION,
1293
- {
1294
- awaitRefetchQueries: true,
1295
- refetchQueries: (mutationResult) => {
1296
- const eventId = mutationResult?.data?.updateEventInfo?.eventId;
1297
- if (!eventId) return [];
1298
- return [
1299
- {
1300
- query: GET_EVENT_INFO,
1301
- variables: { eventId }
1302
- // Pass the eventId for refetching
1303
- },
1304
- {
1305
- query: GET_EVENT,
1306
- variables: { _id: eventId }
1307
- // Pass the eventId for refetching
1308
- }
1309
- ];
1310
- }
1294
+ const [updateEventInfo, { loading, error }] = (0, import_react6.useMutation)(UPDATE_EVENT_INFO_MUTATION, {
1295
+ awaitRefetchQueries: true,
1296
+ refetchQueries: (mutationResult) => {
1297
+ const eventId = mutationResult?.data?.updateEventInfo?.eventId;
1298
+ if (!eventId) return [];
1299
+ return [
1300
+ {
1301
+ query: GET_EVENT_INFO,
1302
+ variables: { eventId }
1303
+ // Pass the eventId for refetching
1304
+ },
1305
+ {
1306
+ query: GET_EVENT,
1307
+ variables: { _id: eventId }
1308
+ // Pass the eventId for refetching
1309
+ }
1310
+ ];
1311
1311
  }
1312
- );
1312
+ });
1313
1313
  return { error, loading, updateEventInfo };
1314
1314
  };
1315
1315
 
1316
1316
  // src/graphql/hooks/event/hooksQuery.ts
1317
- var import_client19 = require("@apollo/client");
1317
+ var import_react7 = require("@apollo/client/react");
1318
1318
  var useGetEvents = () => {
1319
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENTS, {
1320
- fetchPolicy: "network-only"
1321
- });
1322
- const events = data?.events;
1319
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(
1320
+ GET_EVENTS,
1321
+ {
1322
+ fetchPolicy: "network-only"
1323
+ }
1324
+ );
1325
+ const events = data?.events || [];
1323
1326
  return { error, events, loading, refetch };
1324
1327
  };
1325
1328
  var useGetEvent = (_id) => {
1326
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENT, {
1327
- fetchPolicy: "network-only",
1328
- skip: !_id,
1329
- variables: { _id }
1330
- });
1329
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(
1330
+ GET_EVENT,
1331
+ {
1332
+ fetchPolicy: "network-only",
1333
+ skip: !_id,
1334
+ variables: { _id }
1335
+ }
1336
+ );
1331
1337
  const event = data?.event;
1332
1338
  return { error, event, loading, refetch };
1333
1339
  };
1334
1340
  var useGetEventsByRegion = (region) => {
1335
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENTS_BY_REGION, {
1341
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(GET_EVENTS_BY_REGION, {
1336
1342
  fetchPolicy: "no-cache",
1337
1343
  skip: !region,
1338
1344
  variables: { region }
1339
1345
  });
1340
- const eventsByRegion = data?.eventsByRegion;
1346
+ const eventsByRegion = data?.eventsByRegion || [];
1341
1347
  return { error, eventsByRegion, loading, refetch };
1342
1348
  };
1343
1349
  var useSearchEvents = (search, region) => {
1344
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(SEARCH_EVENTS, {
1350
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(SEARCH_EVENTS, {
1345
1351
  fetchPolicy: "network-only",
1346
1352
  skip: search.length < 3,
1347
1353
  variables: { region, search }
1348
1354
  });
1349
- const eventsSearch = data?.eventsSearch;
1355
+ const eventsSearch = data?.eventsSearch || [];
1350
1356
  return { error, eventsSearch, loading, refetch };
1351
1357
  };
1352
1358
  var useGetEventsNearMe = (location) => {
1353
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENTS_NEAR_ME, {
1359
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(GET_EVENTS_NEAR_ME, {
1354
1360
  fetchPolicy: "network-only",
1355
1361
  skip: !location.latitude || !location.longitude,
1356
1362
  variables: {
@@ -1360,11 +1366,11 @@ var useGetEventsNearMe = (location) => {
1360
1366
  // Default to 10km if no radius is provided
1361
1367
  }
1362
1368
  });
1363
- const eventsNearMe = data?.eventsNearMe;
1369
+ const eventsNearMe = data?.eventsNearMe || [];
1364
1370
  return { error, eventsNearMe, loading, refetch };
1365
1371
  };
1366
1372
  var useGetEventInfo = (eventId) => {
1367
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENT_INFO, {
1373
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(GET_EVENT_INFO, {
1368
1374
  fetchPolicy: "network-only",
1369
1375
  skip: !eventId,
1370
1376
  variables: { eventId }
@@ -1374,14 +1380,14 @@ var useGetEventInfo = (eventId) => {
1374
1380
  };
1375
1381
 
1376
1382
  // src/graphql/hooks/notifications/hooksMutation.ts
1377
- var import_client22 = require("@apollo/client");
1383
+ var import_react8 = require("@apollo/client/react");
1378
1384
 
1379
1385
  // src/graphql/mutations/notification.ts
1380
- var import_client21 = require("@apollo/client");
1386
+ var import_client14 = require("@apollo/client");
1381
1387
 
1382
1388
  // src/graphql/queries/notification.ts
1383
- var import_client20 = require("@apollo/client");
1384
- var NOTIFICATION_FRAGMENT = import_client20.gql`
1389
+ var import_client13 = require("@apollo/client");
1390
+ var NOTIFICATION_FRAGMENT = import_client13.gql`
1385
1391
  fragment NotificationFields on Notification {
1386
1392
  _id
1387
1393
  userId
@@ -1398,7 +1404,7 @@ var NOTIFICATION_FRAGMENT = import_client20.gql`
1398
1404
  updatedAt
1399
1405
  }
1400
1406
  `;
1401
- var GET_USER_NOTIFICATIONS = import_client20.gql`
1407
+ var GET_USER_NOTIFICATIONS = import_client13.gql`
1402
1408
  query getUserNotifications($limit: Int, $offset: Int) {
1403
1409
  userNotifications(limit: $limit, offset: $offset) {
1404
1410
  ...NotificationFields
@@ -1406,7 +1412,7 @@ var GET_USER_NOTIFICATIONS = import_client20.gql`
1406
1412
  }
1407
1413
  ${NOTIFICATION_FRAGMENT}
1408
1414
  `;
1409
- var GET_NOTIFICATION_COUNT = import_client20.gql`
1415
+ var GET_NOTIFICATION_COUNT = import_client13.gql`
1410
1416
  query getNotificationCount {
1411
1417
  notificationCount {
1412
1418
  total
@@ -1416,7 +1422,7 @@ var GET_NOTIFICATION_COUNT = import_client20.gql`
1416
1422
  `;
1417
1423
 
1418
1424
  // src/graphql/mutations/notification.ts
1419
- var CREATE_BULK_NOTIFICATIONS = import_client21.gql`
1425
+ var CREATE_BULK_NOTIFICATIONS = import_client14.gql`
1420
1426
  mutation createBulkNotifications($input: CreateBulkNotificationInput!) {
1421
1427
  createBulkNotifications(input: $input) {
1422
1428
  ...NotificationFields
@@ -1424,7 +1430,7 @@ var CREATE_BULK_NOTIFICATIONS = import_client21.gql`
1424
1430
  }
1425
1431
  ${NOTIFICATION_FRAGMENT}
1426
1432
  `;
1427
- var MARK_NOTIFICATION_READ = import_client21.gql`
1433
+ var MARK_NOTIFICATION_READ = import_client14.gql`
1428
1434
  mutation markNotificationRead($_id: ID!) {
1429
1435
  markNotificationRead(_id: $_id) {
1430
1436
  ...NotificationFields
@@ -1432,17 +1438,17 @@ var MARK_NOTIFICATION_READ = import_client21.gql`
1432
1438
  }
1433
1439
  ${NOTIFICATION_FRAGMENT}
1434
1440
  `;
1435
- var MARK_ALL_NOTIFICATIONS_READ = import_client21.gql`
1441
+ var MARK_ALL_NOTIFICATIONS_READ = import_client14.gql`
1436
1442
  mutation markAllNotificationsRead {
1437
1443
  markAllNotificationsRead
1438
1444
  }
1439
1445
  `;
1440
- var DELETE_NOTIFICATION = import_client21.gql`
1446
+ var DELETE_NOTIFICATION = import_client14.gql`
1441
1447
  mutation deleteNotification($_id: ID!) {
1442
1448
  deleteNotification(_id: $_id)
1443
1449
  }
1444
1450
  `;
1445
- var DELETE_ALL_NOTIFICATIONS = import_client21.gql`
1451
+ var DELETE_ALL_NOTIFICATIONS = import_client14.gql`
1446
1452
  mutation deleteAllNotifications {
1447
1453
  deleteAllNotifications
1448
1454
  }
@@ -1450,13 +1456,13 @@ var DELETE_ALL_NOTIFICATIONS = import_client21.gql`
1450
1456
 
1451
1457
  // src/graphql/hooks/notifications/hooksMutation.ts
1452
1458
  var useCreateBulkNotifications = () => {
1453
- const [createBulkNotifications, { loading, error }] = (0, import_client22.useMutation)(
1459
+ const [createBulkNotifications, { loading, error }] = (0, import_react8.useMutation)(
1454
1460
  CREATE_BULK_NOTIFICATIONS
1455
1461
  );
1456
1462
  return { createBulkNotifications, error, loading };
1457
1463
  };
1458
1464
  var useMarkNotificationRead = () => {
1459
- const [markNotificationRead, { loading, error }] = (0, import_client22.useMutation)(
1465
+ const [markNotificationRead, { loading, error }] = (0, import_react8.useMutation)(
1460
1466
  MARK_NOTIFICATION_READ,
1461
1467
  {
1462
1468
  refetchQueries: [
@@ -1472,7 +1478,7 @@ var useMarkNotificationRead = () => {
1472
1478
  return { error, loading, markNotificationRead };
1473
1479
  };
1474
1480
  var useMarkAllNotificationsRead = () => {
1475
- const [markAllNotificationsRead, { loading, error }] = (0, import_client22.useMutation)(
1481
+ const [markAllNotificationsRead, { loading, error }] = (0, import_react8.useMutation)(
1476
1482
  MARK_ALL_NOTIFICATIONS_READ,
1477
1483
  {
1478
1484
  refetchQueries: [
@@ -1488,7 +1494,7 @@ var useMarkAllNotificationsRead = () => {
1488
1494
  return { error, loading, markAllNotificationsRead };
1489
1495
  };
1490
1496
  var useDeleteNotification = () => {
1491
- const [deleteNotification, { loading, error }] = (0, import_client22.useMutation)(
1497
+ const [deleteNotification, { loading, error }] = (0, import_react8.useMutation)(
1492
1498
  DELETE_NOTIFICATION,
1493
1499
  {
1494
1500
  refetchQueries: [
@@ -1504,7 +1510,7 @@ var useDeleteNotification = () => {
1504
1510
  return { deleteNotification, error, loading };
1505
1511
  };
1506
1512
  var useDeleteAllNotifications = () => {
1507
- const [deleteAllNotifications, { loading, error }] = (0, import_client22.useMutation)(
1513
+ const [deleteAllNotifications, { loading, error }] = (0, import_react8.useMutation)(
1508
1514
  DELETE_ALL_NOTIFICATIONS,
1509
1515
  {
1510
1516
  refetchQueries: [
@@ -1521,9 +1527,9 @@ var useDeleteAllNotifications = () => {
1521
1527
  };
1522
1528
 
1523
1529
  // src/graphql/hooks/notifications/hooksQuery.ts
1524
- var import_client23 = require("@apollo/client");
1530
+ var import_react9 = require("@apollo/client/react");
1525
1531
  var useGetUserNotifications = (limit, offset) => {
1526
- const { data, loading, error, refetch } = (0, import_client23.useQuery)(GET_USER_NOTIFICATIONS, {
1532
+ const { data, loading, error, refetch } = (0, import_react9.useQuery)(GET_USER_NOTIFICATIONS, {
1527
1533
  fetchPolicy: "no-cache",
1528
1534
  variables: { limit, offset }
1529
1535
  });
@@ -1535,7 +1541,7 @@ var useGetUserNotifications = (limit, offset) => {
1535
1541
  };
1536
1542
  };
1537
1543
  var useGetNotificationCount = () => {
1538
- const { data, loading, error, refetch } = (0, import_client23.useQuery)(GET_NOTIFICATION_COUNT, {
1544
+ const { data, loading, error, refetch } = (0, import_react9.useQuery)(GET_NOTIFICATION_COUNT, {
1539
1545
  fetchPolicy: "no-cache"
1540
1546
  });
1541
1547
  return {
@@ -1547,11 +1553,11 @@ var useGetNotificationCount = () => {
1547
1553
  };
1548
1554
 
1549
1555
  // src/graphql/hooks/notifications/hooksSubscription.ts
1550
- var import_client25 = require("@apollo/client");
1556
+ var import_react10 = require("@apollo/client/react");
1551
1557
 
1552
1558
  // src/graphql/subscriptions/notification.ts
1553
- var import_client24 = require("@apollo/client");
1554
- var GET_NOTIFICATIONS_SUBSCRIPTION = import_client24.gql`
1559
+ var import_client15 = require("@apollo/client");
1560
+ var GET_NOTIFICATIONS_SUBSCRIPTION = import_client15.gql`
1555
1561
  subscription {
1556
1562
  getUserNotifications {
1557
1563
  ...NotificationFields
@@ -1559,7 +1565,7 @@ var GET_NOTIFICATIONS_SUBSCRIPTION = import_client24.gql`
1559
1565
  }
1560
1566
  ${NOTIFICATION_FRAGMENT}
1561
1567
  `;
1562
- var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client24.gql`
1568
+ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client15.gql`
1563
1569
  subscription {
1564
1570
  getNotificationCount {
1565
1571
  total
@@ -1570,7 +1576,7 @@ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client24.gql`
1570
1576
 
1571
1577
  // src/graphql/hooks/notifications/hooksSubscription.ts
1572
1578
  var useGetUserNotificationsSubscription = () => {
1573
- const { data, loading, error } = (0, import_client25.useSubscription)(GET_NOTIFICATIONS_SUBSCRIPTION, {
1579
+ const { data, loading, error } = (0, import_react10.useSubscription)(GET_NOTIFICATIONS_SUBSCRIPTION, {
1574
1580
  fetchPolicy: "no-cache",
1575
1581
  shouldResubscribe: true
1576
1582
  });
@@ -1581,7 +1587,7 @@ var useGetUserNotificationsSubscription = () => {
1581
1587
  };
1582
1588
  };
1583
1589
  var useGetNotificationCountSubscription = () => {
1584
- const { data, loading, error } = (0, import_client25.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
1590
+ const { data, loading, error } = (0, import_react10.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
1585
1591
  fetchPolicy: "no-cache",
1586
1592
  shouldResubscribe: true
1587
1593
  });
@@ -1593,11 +1599,11 @@ var useGetNotificationCountSubscription = () => {
1593
1599
  };
1594
1600
 
1595
1601
  // src/graphql/hooks/poster.ts
1596
- var import_client27 = require("@apollo/client");
1602
+ var import_react11 = require("@apollo/client/react");
1597
1603
 
1598
1604
  // src/graphql/mutations/poster.ts
1599
- var import_client26 = require("@apollo/client");
1600
- var CREATE_POSTER_MUTATION = import_client26.gql`
1605
+ var import_client16 = require("@apollo/client");
1606
+ var CREATE_POSTER_MUTATION = import_client16.gql`
1601
1607
  mutation createPoster($input: PosterInputType!) {
1602
1608
  createPoster(input: $input) {
1603
1609
  message
@@ -1611,7 +1617,7 @@ var CREATE_POSTER_MUTATION = import_client26.gql`
1611
1617
 
1612
1618
  // src/graphql/hooks/poster.ts
1613
1619
  var useCreatePoster = () => {
1614
- const [createPoster, { loading, error }] = (0, import_client27.useMutation)(
1620
+ const [createPoster, { loading, error }] = (0, import_react11.useMutation)(
1615
1621
  CREATE_POSTER_MUTATION,
1616
1622
  {
1617
1623
  refetchQueries: [{ query: GET_USER_EVENTS }, { query: GET_USER_VENDORS }]
@@ -1621,11 +1627,11 @@ var useCreatePoster = () => {
1621
1627
  };
1622
1628
 
1623
1629
  // src/graphql/hooks/pushToken.ts
1624
- var import_client29 = require("@apollo/client");
1630
+ var import_react12 = require("@apollo/client/react");
1625
1631
 
1626
1632
  // src/graphql/mutations/pushToken.ts
1627
- var import_client28 = require("@apollo/client");
1628
- var CREATE_PUSH_TOKEN_MUTATION = import_client28.gql`
1633
+ var import_client17 = require("@apollo/client");
1634
+ var CREATE_PUSH_TOKEN_MUTATION = import_client17.gql`
1629
1635
  mutation createPushToken($input: PushTokenInput!) {
1630
1636
  createPushToken(input: $input) {
1631
1637
  success
@@ -1635,21 +1641,21 @@ var CREATE_PUSH_TOKEN_MUTATION = import_client28.gql`
1635
1641
 
1636
1642
  // src/graphql/hooks/pushToken.ts
1637
1643
  var useCreatePushToken = () => {
1638
- const [createPushToken, { loading, error }] = (0, import_client29.useMutation)(
1644
+ const [createPushToken, { loading, error }] = (0, import_react12.useMutation)(
1639
1645
  CREATE_PUSH_TOKEN_MUTATION
1640
1646
  );
1641
1647
  return { createPushToken, error, loading };
1642
1648
  };
1643
1649
 
1644
1650
  // src/graphql/hooks/relation/hooksMutation.ts
1645
- var import_client32 = require("@apollo/client");
1651
+ var import_react13 = require("@apollo/client/react");
1646
1652
 
1647
1653
  // src/graphql/mutations/relation.ts
1648
- var import_client31 = require("@apollo/client");
1654
+ var import_client19 = require("@apollo/client");
1649
1655
 
1650
1656
  // src/graphql/queries/relation.ts
1651
- var import_client30 = require("@apollo/client");
1652
- var RELATION_FIELDS_FRAGMENT = import_client30.gql`
1657
+ var import_client18 = require("@apollo/client");
1658
+ var RELATION_FIELDS_FRAGMENT = import_client18.gql`
1653
1659
  fragment RelationFields on RelationType {
1654
1660
  _id
1655
1661
  active
@@ -1666,7 +1672,7 @@ var RELATION_FIELDS_FRAGMENT = import_client30.gql`
1666
1672
  }
1667
1673
  ${RELATION_DATES_FRAGMENT}
1668
1674
  `;
1669
- var GET_RELATION = import_client30.gql`
1675
+ var GET_RELATION = import_client18.gql`
1670
1676
  query getRelation($_id: ID!) {
1671
1677
  relation(_id: $_id) {
1672
1678
  ...RelationFields
@@ -1674,7 +1680,7 @@ var GET_RELATION = import_client30.gql`
1674
1680
  }
1675
1681
  ${RELATION_FIELDS_FRAGMENT}
1676
1682
  `;
1677
- var GET_RELATION_BY_EVENT_AND_VENDOR = import_client30.gql`
1683
+ var GET_RELATION_BY_EVENT_AND_VENDOR = import_client18.gql`
1678
1684
  query getRelationByEventAndVendor($eventId: ID!, $vendorId: ID!) {
1679
1685
  relationByEventAndVendor(eventId: $eventId, vendorId: $vendorId) {
1680
1686
  ...RelationFields
@@ -1682,7 +1688,7 @@ var GET_RELATION_BY_EVENT_AND_VENDOR = import_client30.gql`
1682
1688
  }
1683
1689
  ${RELATION_FIELDS_FRAGMENT}
1684
1690
  `;
1685
- var GET_EVENT_RELATIONS = import_client30.gql`
1691
+ var GET_EVENT_RELATIONS = import_client18.gql`
1686
1692
  query getEventRelations($eventId: ID!) {
1687
1693
  eventRelations(eventId: $eventId) {
1688
1694
  ...RelationFields
@@ -1690,7 +1696,7 @@ var GET_EVENT_RELATIONS = import_client30.gql`
1690
1696
  }
1691
1697
  ${RELATION_FIELDS_FRAGMENT}
1692
1698
  `;
1693
- var GET_VENDOR_RELATIONS = import_client30.gql`
1699
+ var GET_VENDOR_RELATIONS = import_client18.gql`
1694
1700
  query getVendorRelations($vendorId: ID!) {
1695
1701
  vendorRelations(vendorId: $vendorId) {
1696
1702
  ...RelationFields
@@ -1698,7 +1704,7 @@ var GET_VENDOR_RELATIONS = import_client30.gql`
1698
1704
  }
1699
1705
  ${RELATION_FIELDS_FRAGMENT}
1700
1706
  `;
1701
- var GET_RESOURCE_CONNECTIONS = import_client30.gql`
1707
+ var GET_RESOURCE_CONNECTIONS = import_client18.gql`
1702
1708
  query getResourceConnections(
1703
1709
  $resourceId: ID!
1704
1710
  $resourceType: ResourceTypeEnum!
@@ -1717,7 +1723,7 @@ var GET_RESOURCE_CONNECTIONS = import_client30.gql`
1717
1723
  `;
1718
1724
 
1719
1725
  // src/graphql/mutations/relation.ts
1720
- var CREATE_RELATION_MUTATION = import_client31.gql`
1726
+ var CREATE_RELATION_MUTATION = import_client19.gql`
1721
1727
  mutation createRelation($input: RelationInputType!) {
1722
1728
  createRelation(input: $input) {
1723
1729
  ...RelationFields
@@ -1725,7 +1731,7 @@ var CREATE_RELATION_MUTATION = import_client31.gql`
1725
1731
  }
1726
1732
  ${RELATION_FIELDS_FRAGMENT}
1727
1733
  `;
1728
- var UPDATE_RELATION_MUTATION = import_client31.gql`
1734
+ var UPDATE_RELATION_MUTATION = import_client19.gql`
1729
1735
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
1730
1736
  updateRelation(_id: $_id, input: $input) {
1731
1737
  ...RelationFields
@@ -1733,7 +1739,7 @@ var UPDATE_RELATION_MUTATION = import_client31.gql`
1733
1739
  }
1734
1740
  ${RELATION_FIELDS_FRAGMENT}
1735
1741
  `;
1736
- var DELETE_RELATION_MUTATION = import_client31.gql`
1742
+ var DELETE_RELATION_MUTATION = import_client19.gql`
1737
1743
  mutation deleteRelation($_id: ID!) {
1738
1744
  deleteRelation(_id: $_id) {
1739
1745
  ...RelationFields
@@ -1744,146 +1750,137 @@ var DELETE_RELATION_MUTATION = import_client31.gql`
1744
1750
 
1745
1751
  // src/graphql/hooks/relation/hooksMutation.ts
1746
1752
  var useCreateRelation = () => {
1747
- const [createRelation, { loading, error }] = (0, import_client32.useMutation)(
1748
- CREATE_RELATION_MUTATION,
1749
- {
1750
- awaitRefetchQueries: true,
1751
- refetchQueries: (mutationResult) => {
1752
- const createRelation2 = mutationResult?.data?.createRelation;
1753
- const eventId = createRelation2?.eventId;
1754
- const vendorId = createRelation2?.vendorId;
1755
- const resourceType = createRelation2?.lastUpdateBy;
1756
- const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1757
- return [
1758
- {
1759
- query: GET_EVENT_RELATIONS,
1760
- variables: { eventId }
1761
- },
1762
- {
1763
- query: GET_EVENT,
1764
- variables: { _id: eventId }
1765
- },
1766
- {
1767
- query: GET_EVENT_INFO,
1768
- variables: { eventId }
1769
- },
1770
- {
1771
- query: GET_VENDOR_RELATIONS,
1772
- variables: { vendorId }
1773
- },
1774
- {
1775
- query: GET_VENDOR,
1776
- variables: { _id: vendorId }
1777
- },
1778
- {
1779
- query: GET_RELATION_BY_EVENT_AND_VENDOR,
1780
- variables: { eventId, vendorId }
1781
- },
1782
- {
1783
- query: GET_RESOURCE_CONNECTIONS,
1784
- variables: { resourceId, resourceType }
1785
- },
1786
- {
1787
- query: USER_CHATS
1788
- }
1789
- ];
1790
- }
1753
+ const [createRelation, { loading, error }] = (0, import_react13.useMutation)(CREATE_RELATION_MUTATION, {
1754
+ awaitRefetchQueries: true,
1755
+ refetchQueries: (mutationResult) => {
1756
+ const createRelation2 = mutationResult?.data?.createRelation;
1757
+ const eventId = createRelation2?.eventId;
1758
+ const vendorId = createRelation2?.vendorId;
1759
+ const resourceType = createRelation2?.lastUpdateBy;
1760
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1761
+ return [
1762
+ {
1763
+ query: GET_EVENT_RELATIONS,
1764
+ variables: { eventId }
1765
+ },
1766
+ {
1767
+ query: GET_EVENT,
1768
+ variables: { _id: eventId }
1769
+ },
1770
+ {
1771
+ query: GET_EVENT_INFO,
1772
+ variables: { eventId }
1773
+ },
1774
+ {
1775
+ query: GET_VENDOR_RELATIONS,
1776
+ variables: { vendorId }
1777
+ },
1778
+ {
1779
+ query: GET_VENDOR,
1780
+ variables: { _id: vendorId }
1781
+ },
1782
+ {
1783
+ query: GET_RELATION_BY_EVENT_AND_VENDOR,
1784
+ variables: { eventId, vendorId }
1785
+ },
1786
+ {
1787
+ query: GET_RESOURCE_CONNECTIONS,
1788
+ variables: { resourceId, resourceType }
1789
+ },
1790
+ {
1791
+ query: USER_CHATS
1792
+ }
1793
+ ];
1791
1794
  }
1792
- );
1795
+ });
1793
1796
  return { createRelation, error, loading };
1794
1797
  };
1795
1798
  var useUpdateRelation = () => {
1796
- const [updateRelation, { loading, error }] = (0, import_client32.useMutation)(
1797
- UPDATE_RELATION_MUTATION,
1798
- {
1799
- awaitRefetchQueries: true,
1800
- refetchQueries: (mutationResult) => {
1801
- const updateRelation2 = mutationResult?.data?.updateRelation;
1802
- const eventId = updateRelation2?.eventId;
1803
- const vendorId = updateRelation2?.vendorId;
1804
- const resourceType = updateRelation2?.lastUpdateBy;
1805
- const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1806
- return [
1807
- {
1808
- query: GET_EVENT_RELATIONS,
1809
- variables: { eventId }
1810
- },
1811
- {
1812
- query: GET_EVENT,
1813
- variables: { _id: eventId }
1814
- },
1815
- {
1816
- query: GET_EVENT_INFO,
1817
- variables: { eventId }
1818
- },
1819
- {
1820
- query: GET_VENDOR_RELATIONS,
1821
- variables: { vendorId }
1822
- },
1823
- {
1824
- query: GET_VENDOR,
1825
- variables: { _id: vendorId }
1826
- },
1827
- {
1828
- query: GET_RELATION_BY_EVENT_AND_VENDOR,
1829
- variables: { eventId, vendorId }
1830
- },
1831
- {
1832
- query: GET_RESOURCE_CONNECTIONS,
1833
- variables: { resourceId, resourceType }
1834
- }
1835
- ];
1836
- }
1799
+ const [updateRelation, { loading, error }] = (0, import_react13.useMutation)(UPDATE_RELATION_MUTATION, {
1800
+ awaitRefetchQueries: true,
1801
+ refetchQueries: (mutationResult) => {
1802
+ const updateRelation2 = mutationResult?.data?.updateRelation;
1803
+ const eventId = updateRelation2?.eventId;
1804
+ const vendorId = updateRelation2?.vendorId;
1805
+ const resourceType = updateRelation2?.lastUpdateBy;
1806
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1807
+ return [
1808
+ {
1809
+ query: GET_EVENT_RELATIONS,
1810
+ variables: { eventId }
1811
+ },
1812
+ {
1813
+ query: GET_EVENT,
1814
+ variables: { _id: eventId }
1815
+ },
1816
+ {
1817
+ query: GET_EVENT_INFO,
1818
+ variables: { eventId }
1819
+ },
1820
+ {
1821
+ query: GET_VENDOR_RELATIONS,
1822
+ variables: { vendorId }
1823
+ },
1824
+ {
1825
+ query: GET_VENDOR,
1826
+ variables: { _id: vendorId }
1827
+ },
1828
+ {
1829
+ query: GET_RELATION_BY_EVENT_AND_VENDOR,
1830
+ variables: { eventId, vendorId }
1831
+ },
1832
+ {
1833
+ query: GET_RESOURCE_CONNECTIONS,
1834
+ variables: { resourceId, resourceType }
1835
+ }
1836
+ ];
1837
1837
  }
1838
- );
1838
+ });
1839
1839
  return { error, loading, updateRelation };
1840
1840
  };
1841
1841
  var useDeleteRelation = () => {
1842
- const [deleteRelation, { loading, error }] = (0, import_client32.useMutation)(
1843
- DELETE_RELATION_MUTATION,
1844
- {
1845
- awaitRefetchQueries: true,
1846
- refetchQueries: (mutationResult) => {
1847
- const deleteRelation2 = mutationResult?.data?.deleteRelation;
1848
- const eventId = deleteRelation2?.eventId;
1849
- const vendorId = deleteRelation2?.vendorId;
1850
- const resourceType = deleteRelation2?.lastUpdateBy;
1851
- const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1852
- return [
1853
- {
1854
- query: GET_EVENT_INFO,
1855
- variables: { eventId }
1856
- },
1857
- {
1858
- query: GET_EVENT_RELATIONS,
1859
- variables: { eventId }
1860
- },
1861
- {
1862
- query: GET_VENDOR_RELATIONS,
1863
- variables: { vendorId }
1864
- },
1865
- {
1866
- query: GET_RELATION_BY_EVENT_AND_VENDOR,
1867
- variables: { eventId, vendorId }
1868
- },
1869
- {
1870
- query: GET_RESOURCE_CONNECTIONS,
1871
- variables: { resourceId, resourceType }
1872
- },
1873
- {
1874
- query: USER_CHATS
1875
- }
1876
- ];
1877
- }
1842
+ const [deleteRelation, { loading, error }] = (0, import_react13.useMutation)(DELETE_RELATION_MUTATION, {
1843
+ awaitRefetchQueries: true,
1844
+ refetchQueries: (mutationResult) => {
1845
+ const deleteRelation2 = mutationResult?.data?.deleteRelation;
1846
+ const eventId = deleteRelation2?.eventId;
1847
+ const vendorId = deleteRelation2?.vendorId;
1848
+ const resourceType = deleteRelation2?.lastUpdateBy;
1849
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1850
+ return [
1851
+ {
1852
+ query: GET_EVENT_INFO,
1853
+ variables: { eventId }
1854
+ },
1855
+ {
1856
+ query: GET_EVENT_RELATIONS,
1857
+ variables: { eventId }
1858
+ },
1859
+ {
1860
+ query: GET_VENDOR_RELATIONS,
1861
+ variables: { vendorId }
1862
+ },
1863
+ {
1864
+ query: GET_RELATION_BY_EVENT_AND_VENDOR,
1865
+ variables: { eventId, vendorId }
1866
+ },
1867
+ {
1868
+ query: GET_RESOURCE_CONNECTIONS,
1869
+ variables: { resourceId, resourceType }
1870
+ },
1871
+ {
1872
+ query: USER_CHATS
1873
+ }
1874
+ ];
1878
1875
  }
1879
- );
1876
+ });
1880
1877
  return { deleteRelation, error, loading };
1881
1878
  };
1882
1879
 
1883
1880
  // src/graphql/hooks/relation/hooksQuery.ts
1884
- var import_client33 = require("@apollo/client");
1881
+ var import_react14 = require("@apollo/client/react");
1885
1882
  var useGetRelation = (_id) => {
1886
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_RELATION, {
1883
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_RELATION, {
1887
1884
  fetchPolicy: "network-only",
1888
1885
  skip: !_id,
1889
1886
  variables: { _id }
@@ -1892,50 +1889,47 @@ var useGetRelation = (_id) => {
1892
1889
  return { error, loading, refetch, relation };
1893
1890
  };
1894
1891
  var useGetRelationByEventAndVendor = (eventId, vendorId) => {
1895
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(
1896
- GET_RELATION_BY_EVENT_AND_VENDOR,
1897
- {
1898
- fetchPolicy: "network-only",
1899
- skip: !eventId || !vendorId,
1900
- variables: { eventId, vendorId }
1901
- }
1902
- );
1892
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_RELATION_BY_EVENT_AND_VENDOR, {
1893
+ fetchPolicy: "network-only",
1894
+ skip: !eventId || !vendorId,
1895
+ variables: { eventId, vendorId }
1896
+ });
1903
1897
  const relationByEventAndVendor = data?.relationByEventAndVendor;
1904
1898
  return { error, loading, refetch, relationByEventAndVendor };
1905
1899
  };
1906
1900
  var useGetEventRelations = (eventId) => {
1907
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_EVENT_RELATIONS, {
1901
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_EVENT_RELATIONS, {
1908
1902
  fetchPolicy: "network-only",
1909
1903
  skip: !eventId,
1910
1904
  variables: { eventId }
1911
1905
  });
1912
- const eventRelations = data?.eventRelations;
1906
+ const eventRelations = data?.eventRelations || [];
1913
1907
  return { error, eventRelations, loading, refetch };
1914
1908
  };
1915
1909
  var useGetVendorRelations = (vendorId) => {
1916
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_VENDOR_RELATIONS, {
1910
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_VENDOR_RELATIONS, {
1917
1911
  fetchPolicy: "network-only",
1918
1912
  skip: !vendorId,
1919
1913
  variables: { vendorId }
1920
1914
  });
1921
- const vendorRelations = data?.vendorRelations;
1915
+ const vendorRelations = data?.vendorRelations || [];
1922
1916
  return { error, loading, refetch, vendorRelations };
1923
1917
  };
1924
1918
  var useGetResourceConnections = (resourceId, resourceType) => {
1925
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_RESOURCE_CONNECTIONS, {
1919
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_RESOURCE_CONNECTIONS, {
1926
1920
  fetchPolicy: "network-only",
1927
1921
  variables: { resourceId, resourceType }
1928
1922
  });
1929
- const resourceConnections = data?.resourceConnections;
1923
+ const resourceConnections = data?.resourceConnections || [];
1930
1924
  return { error, loading, refetch, resourceConnections };
1931
1925
  };
1932
1926
 
1933
1927
  // src/graphql/hooks/vendor/hooksMutation.ts
1934
- var import_client35 = require("@apollo/client");
1928
+ var import_react15 = require("@apollo/client/react");
1935
1929
 
1936
1930
  // src/graphql/mutations/vendor.ts
1937
- var import_client34 = require("@apollo/client");
1938
- var CREATE_VENDOR_MUTATION = import_client34.gql`
1931
+ var import_client20 = require("@apollo/client");
1932
+ var CREATE_VENDOR_MUTATION = import_client20.gql`
1939
1933
  mutation createVendor($input: VendorInputType!) {
1940
1934
  createVendor(input: $input) {
1941
1935
  ...VendorFields
@@ -1943,7 +1937,7 @@ var CREATE_VENDOR_MUTATION = import_client34.gql`
1943
1937
  }
1944
1938
  ${VENDOR}
1945
1939
  `;
1946
- var UPDATE_VENDOR_MUTATION = import_client34.gql`
1940
+ var UPDATE_VENDOR_MUTATION = import_client20.gql`
1947
1941
  mutation updateVendor($_id: ID!, $input: VendorInputType!) {
1948
1942
  updateVendor(_id: $_id, input: $input) {
1949
1943
  ...VendorFields
@@ -1951,12 +1945,12 @@ var UPDATE_VENDOR_MUTATION = import_client34.gql`
1951
1945
  }
1952
1946
  ${VENDOR}
1953
1947
  `;
1954
- var DELETE_VENDOR_MUTATION = import_client34.gql`
1948
+ var DELETE_VENDOR_MUTATION = import_client20.gql`
1955
1949
  mutation deleteVendor($_id: ID!) {
1956
1950
  deleteVendor(_id: $_id)
1957
1951
  }
1958
1952
  `;
1959
- var CREATE_VENDOR_INFO_MUTATION = import_client34.gql`
1953
+ var CREATE_VENDOR_INFO_MUTATION = import_client20.gql`
1960
1954
  mutation createVendorInfo($input: VendorInfoInputType!) {
1961
1955
  createVendorInfo(input: $input) {
1962
1956
  ...VendorInfoFields
@@ -1964,7 +1958,7 @@ var CREATE_VENDOR_INFO_MUTATION = import_client34.gql`
1964
1958
  }
1965
1959
  ${VENDOR_INFO}
1966
1960
  `;
1967
- var UPDATE_VENDOR_INFO_MUTATION = import_client34.gql`
1961
+ var UPDATE_VENDOR_INFO_MUTATION = import_client20.gql`
1968
1962
  mutation updateVendorInfo($_id: ID!, $input: VendorInfoInputType!) {
1969
1963
  updateVendorInfo(_id: $_id, input: $input) {
1970
1964
  ...VendorInfoFields
@@ -1975,7 +1969,7 @@ var UPDATE_VENDOR_INFO_MUTATION = import_client34.gql`
1975
1969
 
1976
1970
  // src/graphql/hooks/vendor/hooksMutation.ts
1977
1971
  var useCreateVendor = () => {
1978
- const [createVendor, { loading, error }] = (0, import_client35.useMutation)(
1972
+ const [createVendor, { loading, error }] = (0, import_react15.useMutation)(
1979
1973
  CREATE_VENDOR_MUTATION,
1980
1974
  {
1981
1975
  awaitRefetchQueries: true,
@@ -1985,7 +1979,7 @@ var useCreateVendor = () => {
1985
1979
  return { createVendor, error, loading };
1986
1980
  };
1987
1981
  var useUpdateVendor = () => {
1988
- const [updateVendor, { loading, error }] = (0, import_client35.useMutation)(
1982
+ const [updateVendor, { loading, error }] = (0, import_react15.useMutation)(
1989
1983
  UPDATE_VENDOR_MUTATION,
1990
1984
  {
1991
1985
  awaitRefetchQueries: true,
@@ -1995,7 +1989,7 @@ var useUpdateVendor = () => {
1995
1989
  return { error, loading, updateVendor };
1996
1990
  };
1997
1991
  var useDeleteVendor = () => {
1998
- const [deleteVendor, { loading, error }] = (0, import_client35.useMutation)(
1992
+ const [deleteVendor, { loading, error }] = (0, import_react15.useMutation)(
1999
1993
  DELETE_VENDOR_MUTATION,
2000
1994
  {
2001
1995
  awaitRefetchQueries: true,
@@ -2005,60 +1999,57 @@ var useDeleteVendor = () => {
2005
1999
  return { deleteVendor, error, loading };
2006
2000
  };
2007
2001
  var useCreateVendorInfo = () => {
2008
- const [createVendorInfo, { loading, error }] = (0, import_client35.useMutation)(
2009
- CREATE_VENDOR_INFO_MUTATION,
2010
- {
2011
- awaitRefetchQueries: true,
2012
- refetchQueries: (mutationResult) => {
2013
- const vendorId = mutationResult?.data?.createVendorInfo?.vendorId;
2014
- if (!vendorId) return [];
2015
- return [
2016
- {
2017
- query: GET_VENDOR_INFO,
2018
- variables: { vendorId }
2019
- // Pass the vendorId for refetching
2020
- },
2021
- {
2022
- query: GET_USER_VENDORS
2023
- },
2024
- {
2025
- query: GET_VENDOR,
2026
- variables: { _id: vendorId }
2027
- }
2028
- ];
2029
- }
2002
+ const [createVendorInfo, { loading, error }] = (0, import_react15.useMutation)(CREATE_VENDOR_INFO_MUTATION, {
2003
+ awaitRefetchQueries: true,
2004
+ refetchQueries: (mutationResult) => {
2005
+ const vendorId = mutationResult?.data?.createVendorInfo?.vendorId;
2006
+ if (!vendorId) return [];
2007
+ return [
2008
+ {
2009
+ query: GET_VENDOR_INFO,
2010
+ variables: { vendorId }
2011
+ // Pass the vendorId for refetching
2012
+ },
2013
+ {
2014
+ query: GET_USER_VENDORS
2015
+ },
2016
+ {
2017
+ query: GET_VENDOR,
2018
+ variables: { _id: vendorId }
2019
+ }
2020
+ ];
2030
2021
  }
2031
- );
2022
+ });
2032
2023
  return { createVendorInfo, error, loading };
2033
2024
  };
2034
2025
  var useUpdateVendorInfo = () => {
2035
- const [updateVendorInfo, { loading, error }] = (0, import_client35.useMutation)(
2036
- UPDATE_VENDOR_INFO_MUTATION,
2037
- {
2038
- awaitRefetchQueries: true,
2039
- refetchQueries: (mutationResult) => {
2040
- const vendorId = mutationResult?.data?.updateVendorInfo?.vendorId;
2041
- if (!vendorId) return [];
2042
- return [
2043
- {
2044
- query: GET_VENDOR_INFO,
2045
- variables: { vendorId }
2046
- // Pass the vendorId for refetching
2047
- }
2048
- ];
2049
- }
2026
+ const [updateVendorInfo, { loading, error }] = (0, import_react15.useMutation)(UPDATE_VENDOR_INFO_MUTATION, {
2027
+ awaitRefetchQueries: true,
2028
+ refetchQueries: (mutationResult) => {
2029
+ const vendorId = mutationResult?.data?.updateVendorInfo?.vendorId;
2030
+ if (!vendorId) return [];
2031
+ return [
2032
+ {
2033
+ query: GET_VENDOR_INFO,
2034
+ variables: { vendorId }
2035
+ // Pass the vendorId for refetching
2036
+ }
2037
+ ];
2050
2038
  }
2051
- );
2039
+ });
2052
2040
  return { error, loading, updateVendorInfo };
2053
2041
  };
2054
2042
 
2055
2043
  // src/graphql/hooks/vendor/hooksQuery.ts
2056
- var import_client36 = require("@apollo/client");
2044
+ var import_react16 = require("@apollo/client/react");
2057
2045
  var useGetVendors = () => {
2058
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_VENDORS, {
2059
- fetchPolicy: "network-only"
2060
- });
2061
- const vendors = data?.vendors;
2046
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(
2047
+ GET_VENDORS,
2048
+ {
2049
+ fetchPolicy: "network-only"
2050
+ }
2051
+ );
2052
+ const vendors = data?.vendors || [];
2062
2053
  return {
2063
2054
  error,
2064
2055
  loading,
@@ -2067,34 +2058,37 @@ var useGetVendors = () => {
2067
2058
  };
2068
2059
  };
2069
2060
  var useGetVendor = (_id) => {
2070
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_VENDOR, {
2071
- fetchPolicy: "network-only",
2072
- skip: !_id,
2073
- variables: { _id }
2074
- });
2061
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(
2062
+ GET_VENDOR,
2063
+ {
2064
+ fetchPolicy: "network-only",
2065
+ skip: !_id,
2066
+ variables: { _id }
2067
+ }
2068
+ );
2075
2069
  const vendor = data?.vendor;
2076
2070
  return { error, loading, refetch, vendor };
2077
2071
  };
2078
2072
  var useGetVendorsByRegion = (region) => {
2079
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_VENDORS_BY_REGION, {
2073
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(GET_VENDORS_BY_REGION, {
2080
2074
  fetchPolicy: "no-cache",
2081
2075
  skip: !region,
2082
2076
  variables: { region }
2083
2077
  });
2084
- const vendorsByRegion = data?.vendorsByRegion;
2078
+ const vendorsByRegion = data?.vendorsByRegion || [];
2085
2079
  return { error, loading, refetch, vendorsByRegion };
2086
2080
  };
2087
2081
  var useSearchVendors = (search, region) => {
2088
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(SEARCH_VENDORS, {
2082
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(SEARCH_VENDORS, {
2089
2083
  fetchPolicy: "network-only",
2090
2084
  skip: search.length < 3,
2091
2085
  variables: { region, search }
2092
2086
  });
2093
- const vendorSearch = data?.vendorSearch;
2087
+ const vendorSearch = data?.vendorSearch || [];
2094
2088
  return { error, loading, refetch, vendorSearch };
2095
2089
  };
2096
2090
  var useGetVendorInfo = (vendorId) => {
2097
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_VENDOR_INFO, {
2091
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(GET_VENDOR_INFO, {
2098
2092
  fetchPolicy: "network-only",
2099
2093
  skip: !vendorId,
2100
2094
  variables: { vendorId }
@@ -2109,14 +2103,14 @@ var useGetVendorInfo = (vendorId) => {
2109
2103
  };
2110
2104
 
2111
2105
  // src/graphql/hooks/tester/hooksMutation.ts
2112
- var import_client39 = require("@apollo/client");
2106
+ var import_react17 = require("@apollo/client/react");
2113
2107
 
2114
2108
  // src/graphql/mutations/tester.ts
2115
- var import_client38 = require("@apollo/client");
2109
+ var import_client22 = require("@apollo/client");
2116
2110
 
2117
2111
  // src/graphql/queries/tester.ts
2118
- var import_client37 = require("@apollo/client");
2119
- var TESTER_FIELDS_FRAGMENT = import_client37.gql`
2112
+ var import_client21 = require("@apollo/client");
2113
+ var TESTER_FIELDS_FRAGMENT = import_client21.gql`
2120
2114
  fragment TesterFields on TesterType {
2121
2115
  _id
2122
2116
  active
@@ -2136,7 +2130,7 @@ var TESTER_FIELDS_FRAGMENT = import_client37.gql`
2136
2130
  }
2137
2131
  ${CATEGORY_FIELDS_FRAGMENT}
2138
2132
  `;
2139
- var GET_TESTERS = import_client37.gql`
2133
+ var GET_TESTERS = import_client21.gql`
2140
2134
  query getTesters {
2141
2135
  testers {
2142
2136
  ...TesterFields
@@ -2144,7 +2138,7 @@ var GET_TESTERS = import_client37.gql`
2144
2138
  }
2145
2139
  ${TESTER_FIELDS_FRAGMENT}
2146
2140
  `;
2147
- var GET_TESTER = import_client37.gql`
2141
+ var GET_TESTER = import_client21.gql`
2148
2142
  query getTester($_id: ID!) {
2149
2143
  tester(_id: $_id) {
2150
2144
  ...TesterFields
@@ -2154,7 +2148,7 @@ var GET_TESTER = import_client37.gql`
2154
2148
  `;
2155
2149
 
2156
2150
  // src/graphql/mutations/tester.ts
2157
- var CREATE_TESTER_MUTATION = import_client38.gql`
2151
+ var CREATE_TESTER_MUTATION = import_client22.gql`
2158
2152
  mutation createTester($input: TesterInputType!) {
2159
2153
  createTester(input: $input) {
2160
2154
  ...TesterFields
@@ -2162,7 +2156,7 @@ var CREATE_TESTER_MUTATION = import_client38.gql`
2162
2156
  }
2163
2157
  ${TESTER_FIELDS_FRAGMENT}
2164
2158
  `;
2165
- var UPDATE_TESTER_MUTATION = import_client38.gql`
2159
+ var UPDATE_TESTER_MUTATION = import_client22.gql`
2166
2160
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
2167
2161
  updateTester(_id: $_id, input: $input) {
2168
2162
  ...TesterFields
@@ -2170,7 +2164,7 @@ var UPDATE_TESTER_MUTATION = import_client38.gql`
2170
2164
  }
2171
2165
  ${TESTER_FIELDS_FRAGMENT}
2172
2166
  `;
2173
- var DELETE_TESTER_MUTATION = import_client38.gql`
2167
+ var DELETE_TESTER_MUTATION = import_client22.gql`
2174
2168
  mutation deleteTester($_id: ID!) {
2175
2169
  deleteTester(_id: $_id)
2176
2170
  }
@@ -2178,7 +2172,7 @@ var DELETE_TESTER_MUTATION = import_client38.gql`
2178
2172
 
2179
2173
  // src/graphql/hooks/tester/hooksMutation.ts
2180
2174
  var useCreateTester = () => {
2181
- const [createTester, { data, loading, error }] = (0, import_client39.useMutation)(
2175
+ const [createTester, { data, loading, error }] = (0, import_react17.useMutation)(
2182
2176
  CREATE_TESTER_MUTATION
2183
2177
  );
2184
2178
  return {
@@ -2189,7 +2183,7 @@ var useCreateTester = () => {
2189
2183
  };
2190
2184
  };
2191
2185
  var useUpdateTester = () => {
2192
- const [updateTester, { data, loading, error }] = (0, import_client39.useMutation)(
2186
+ const [updateTester, { data, loading, error }] = (0, import_react17.useMutation)(
2193
2187
  UPDATE_TESTER_MUTATION
2194
2188
  );
2195
2189
  return {
@@ -2200,17 +2194,19 @@ var useUpdateTester = () => {
2200
2194
  };
2201
2195
  };
2202
2196
  var useDeleteTester = () => {
2203
- const [deleteTester, { loading, error }] = (0, import_client39.useMutation)(
2197
+ const [deleteTester, { loading, error }] = (0, import_react17.useMutation)(
2204
2198
  DELETE_TESTER_MUTATION
2205
2199
  );
2206
2200
  return { deleteTester, error, loading };
2207
2201
  };
2208
2202
 
2209
2203
  // src/graphql/hooks/tester/hooksQuery.ts
2210
- var import_client40 = require("@apollo/client");
2204
+ var import_react18 = require("@apollo/client/react");
2211
2205
  var useGetTesters = () => {
2212
- const { data, loading, error, refetch } = (0, import_client40.useQuery)(GET_TESTERS);
2213
- const testers = data?.testers;
2206
+ const { data, loading, error, refetch } = (0, import_react18.useQuery)(
2207
+ GET_TESTERS
2208
+ );
2209
+ const testers = data?.testers || [];
2214
2210
  return {
2215
2211
  error,
2216
2212
  loading,
@@ -2219,20 +2215,23 @@ var useGetTesters = () => {
2219
2215
  };
2220
2216
  };
2221
2217
  var useGetTester = (_id) => {
2222
- const { data, loading, error, refetch } = (0, import_client40.useQuery)(GET_TESTER, {
2223
- skip: !_id,
2224
- variables: { _id }
2225
- });
2218
+ const { data, loading, error, refetch } = (0, import_react18.useQuery)(
2219
+ GET_TESTER,
2220
+ {
2221
+ skip: !_id,
2222
+ variables: { _id }
2223
+ }
2224
+ );
2226
2225
  const tester = data?.tester;
2227
2226
  return { error, loading, refetch, tester };
2228
2227
  };
2229
2228
 
2230
2229
  // src/graphql/hooks/user/hooksMutation.ts
2231
- var import_client42 = require("@apollo/client");
2230
+ var import_react19 = require("@apollo/client/react");
2232
2231
 
2233
2232
  // src/graphql/mutations/user.ts
2234
- var import_client41 = require("@apollo/client");
2235
- var CREATE_USER_MUTATION = import_client41.gql`
2233
+ var import_client23 = require("@apollo/client");
2234
+ var CREATE_USER_MUTATION = import_client23.gql`
2236
2235
  mutation createUser($input: UserInputType!) {
2237
2236
  createUser(input: $input) {
2238
2237
  ...UserFields
@@ -2240,7 +2239,7 @@ var CREATE_USER_MUTATION = import_client41.gql`
2240
2239
  }
2241
2240
  ${USER_FIELDS_FRAGMENT}
2242
2241
  `;
2243
- var UPDATE_USER_MUTATION = import_client41.gql`
2242
+ var UPDATE_USER_MUTATION = import_client23.gql`
2244
2243
  mutation updateUser($_id: ID!, $input: UserInputType!) {
2245
2244
  updateUser(_id: $_id, input: $input) {
2246
2245
  ...UserFields
@@ -2248,12 +2247,12 @@ var UPDATE_USER_MUTATION = import_client41.gql`
2248
2247
  }
2249
2248
  ${USER_FIELDS_FRAGMENT}
2250
2249
  `;
2251
- var DELETE_USER_MUTATION = import_client41.gql`
2250
+ var DELETE_USER_MUTATION = import_client23.gql`
2252
2251
  mutation deleteUser($email: String!) {
2253
2252
  deleteUser(email: $email)
2254
2253
  }
2255
2254
  `;
2256
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client41.gql`
2255
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client23.gql`
2257
2256
  mutation addUserFavouriteResource(
2258
2257
  $resourceId: ID!
2259
2258
  $resourceType: ResourceTypeEnum!
@@ -2267,7 +2266,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client41.gql`
2267
2266
  }
2268
2267
  ${USER_FIELDS_FRAGMENT}
2269
2268
  `;
2270
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client41.gql`
2269
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client23.gql`
2271
2270
  mutation removeUserFavouriteResource(
2272
2271
  $resourceId: ID!
2273
2272
  $resourceType: ResourceTypeEnum!
@@ -2281,7 +2280,7 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client41.gql`
2281
2280
  }
2282
2281
  ${USER_FIELDS_FRAGMENT}
2283
2282
  `;
2284
- var SELECT_PACKAGE_MUTATION = import_client41.gql`
2283
+ var SELECT_PACKAGE_MUTATION = import_client23.gql`
2285
2284
  mutation selectPackage(
2286
2285
  $selectedLicence: LicencesEnumType!
2287
2286
  $removedLicence: LicencesEnumType
@@ -2290,12 +2289,15 @@ var SELECT_PACKAGE_MUTATION = import_client41.gql`
2290
2289
  selectedLicence: $selectedLicence
2291
2290
  removedLicence: $removedLicence
2292
2291
  ) {
2293
- licences
2292
+ licences {
2293
+ ...LicenceFields
2294
+ }
2294
2295
  message
2295
2296
  }
2296
2297
  }
2298
+ ${LICENCE_FIELDS_FRAGMENT}
2297
2299
  `;
2298
- var ADD_USER_INTEREST_RESOURCE_MUTATION = import_client41.gql`
2300
+ var ADD_USER_INTEREST_RESOURCE_MUTATION = import_client23.gql`
2299
2301
  mutation addUserInterestResource($input: UserActivityInputType!) {
2300
2302
  addUserInterestResource(input: $input) {
2301
2303
  ...UserFields
@@ -2303,7 +2305,7 @@ var ADD_USER_INTEREST_RESOURCE_MUTATION = import_client41.gql`
2303
2305
  }
2304
2306
  ${USER_FIELDS_FRAGMENT}
2305
2307
  `;
2306
- var REMOVE_USER_INTEREST_RESOURCE_MUTATION = import_client41.gql`
2308
+ var REMOVE_USER_INTEREST_RESOURCE_MUTATION = import_client23.gql`
2307
2309
  mutation removeUserInterestResource($input: UserActivityInputType!) {
2308
2310
  removeUserInterestResource(input: $input) {
2309
2311
  ...UserFields
@@ -2311,7 +2313,7 @@ var REMOVE_USER_INTEREST_RESOURCE_MUTATION = import_client41.gql`
2311
2313
  }
2312
2314
  ${USER_FIELDS_FRAGMENT}
2313
2315
  `;
2314
- var ADD_USER_GOING_RESOURCE_MUTATION = import_client41.gql`
2316
+ var ADD_USER_GOING_RESOURCE_MUTATION = import_client23.gql`
2315
2317
  mutation addUserGoingResource($input: UserActivityInputType!) {
2316
2318
  addUserGoingResource(input: $input) {
2317
2319
  ...UserFields
@@ -2319,7 +2321,7 @@ var ADD_USER_GOING_RESOURCE_MUTATION = import_client41.gql`
2319
2321
  }
2320
2322
  ${USER_FIELDS_FRAGMENT}
2321
2323
  `;
2322
- var REMOVE_USER_GOING_RESOURCE_MUTATION = import_client41.gql`
2324
+ var REMOVE_USER_GOING_RESOURCE_MUTATION = import_client23.gql`
2323
2325
  mutation removeUserGoingResource($input: UserActivityInputType!) {
2324
2326
  removeUserGoingResource(input: $input) {
2325
2327
  ...UserFields
@@ -2327,7 +2329,7 @@ var REMOVE_USER_GOING_RESOURCE_MUTATION = import_client41.gql`
2327
2329
  }
2328
2330
  ${USER_FIELDS_FRAGMENT}
2329
2331
  `;
2330
- var ADD_USER_PRESENT_RESOURCE_MUTATION = import_client41.gql`
2332
+ var ADD_USER_PRESENT_RESOURCE_MUTATION = import_client23.gql`
2331
2333
  mutation addUserPresentResource($input: UserActivityInputType!) {
2332
2334
  addUserPresentResource(input: $input) {
2333
2335
  ...UserFields
@@ -2335,7 +2337,7 @@ var ADD_USER_PRESENT_RESOURCE_MUTATION = import_client41.gql`
2335
2337
  }
2336
2338
  ${USER_FIELDS_FRAGMENT}
2337
2339
  `;
2338
- var REMOVE_USER_PRESENT_RESOURCE_MUTATION = import_client41.gql`
2340
+ var REMOVE_USER_PRESENT_RESOURCE_MUTATION = import_client23.gql`
2339
2341
  mutation removeUserPresentResource($input: UserActivityInputType!) {
2340
2342
  removeUserPresentResource(input: $input) {
2341
2343
  ...UserFields
@@ -2346,11 +2348,11 @@ var REMOVE_USER_PRESENT_RESOURCE_MUTATION = import_client41.gql`
2346
2348
 
2347
2349
  // src/graphql/hooks/user/hooksMutation.ts
2348
2350
  var useCreateUser = () => {
2349
- const [createUser, { loading, error }] = (0, import_client42.useMutation)(CREATE_USER_MUTATION);
2351
+ const [createUser, { loading, error }] = (0, import_react19.useMutation)(CREATE_USER_MUTATION);
2350
2352
  return { createUser, error, loading };
2351
2353
  };
2352
2354
  var useUpdateUser = () => {
2353
- const [updateUser, { loading, error }] = (0, import_client42.useMutation)(UPDATE_USER_MUTATION, {
2355
+ const [updateUser, { loading, error }] = (0, import_react19.useMutation)(UPDATE_USER_MUTATION, {
2354
2356
  awaitRefetchQueries: true,
2355
2357
  refetchQueries: (mutationResult) => {
2356
2358
  const userId = mutationResult?.data?.updateUser?._id;
@@ -2361,11 +2363,11 @@ var useUpdateUser = () => {
2361
2363
  return { error, loading, updateUser };
2362
2364
  };
2363
2365
  var useDeleteUser = () => {
2364
- const [deleteUser, { loading, error }] = (0, import_client42.useMutation)(DELETE_USER_MUTATION);
2366
+ const [deleteUser, { loading, error }] = (0, import_react19.useMutation)(DELETE_USER_MUTATION);
2365
2367
  return { deleteUser, error, loading };
2366
2368
  };
2367
2369
  var useAddUserFavouriteResource = () => {
2368
- const [addUserFavouriteResource, { loading, error }] = (0, import_client42.useMutation)(
2370
+ const [addUserFavouriteResource, { loading, error }] = (0, import_react19.useMutation)(
2369
2371
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
2370
2372
  {
2371
2373
  awaitRefetchQueries: true,
@@ -2375,7 +2377,7 @@ var useAddUserFavouriteResource = () => {
2375
2377
  return { addUserFavouriteResource, error, loading };
2376
2378
  };
2377
2379
  var useRemoveUserFavouriteResource = () => {
2378
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client42.useMutation)(
2380
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_react19.useMutation)(
2379
2381
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
2380
2382
  {
2381
2383
  awaitRefetchQueries: true,
@@ -2385,25 +2387,22 @@ var useRemoveUserFavouriteResource = () => {
2385
2387
  return { error, loading, removeUserFavouriteResource };
2386
2388
  };
2387
2389
  var useSelectPackage = () => {
2388
- const [selectPackage, { loading, error }] = (0, import_client42.useMutation)(
2389
- SELECT_PACKAGE_MUTATION,
2390
- {
2391
- awaitRefetchQueries: true,
2392
- refetchQueries: (mutationResult) => {
2393
- const userId = mutationResult?.data?.selectPackage?.userId;
2394
- if (!userId) return [];
2395
- return [
2396
- { query: GET_USER, variables: { _id: userId } },
2397
- { query: GET_USER_EVENTS },
2398
- { query: GET_USER_VENDORS }
2399
- ];
2400
- }
2390
+ const [selectPackage, { loading, error }] = (0, import_react19.useMutation)(SELECT_PACKAGE_MUTATION, {
2391
+ awaitRefetchQueries: true,
2392
+ refetchQueries: (mutationResult) => {
2393
+ const userId = mutationResult?.data?.selectPackage?.userId;
2394
+ if (!userId) return [];
2395
+ return [
2396
+ { query: GET_USER, variables: { _id: userId } },
2397
+ { query: GET_USER_EVENTS },
2398
+ { query: GET_USER_VENDORS }
2399
+ ];
2401
2400
  }
2402
- );
2401
+ });
2403
2402
  return { error, loading, selectPackage };
2404
2403
  };
2405
2404
  var useAddUserInterestResource = () => {
2406
- const [addUserInterestResource, { loading, error }] = (0, import_client42.useMutation)(
2405
+ const [addUserInterestResource, { loading, error }] = (0, import_react19.useMutation)(
2407
2406
  ADD_USER_INTEREST_RESOURCE_MUTATION,
2408
2407
  {
2409
2408
  awaitRefetchQueries: true,
@@ -2413,7 +2412,7 @@ var useAddUserInterestResource = () => {
2413
2412
  return { addUserInterestResource, error, loading };
2414
2413
  };
2415
2414
  var useRemoveUserInterestResource = () => {
2416
- const [removeUserInterestResource, { loading, error }] = (0, import_client42.useMutation)(
2415
+ const [removeUserInterestResource, { loading, error }] = (0, import_react19.useMutation)(
2417
2416
  REMOVE_USER_INTEREST_RESOURCE_MUTATION,
2418
2417
  {
2419
2418
  awaitRefetchQueries: true,
@@ -2423,7 +2422,7 @@ var useRemoveUserInterestResource = () => {
2423
2422
  return { error, loading, removeUserInterestResource };
2424
2423
  };
2425
2424
  var useAddUserGoingResource = () => {
2426
- const [addUserGoingResource, { loading, error }] = (0, import_client42.useMutation)(
2425
+ const [addUserGoingResource, { loading, error }] = (0, import_react19.useMutation)(
2427
2426
  ADD_USER_GOING_RESOURCE_MUTATION,
2428
2427
  {
2429
2428
  awaitRefetchQueries: true,
@@ -2433,7 +2432,7 @@ var useAddUserGoingResource = () => {
2433
2432
  return { addUserGoingResource, error, loading };
2434
2433
  };
2435
2434
  var useRemoveUserGoingResource = () => {
2436
- const [removeUserGoingResource, { loading, error }] = (0, import_client42.useMutation)(
2435
+ const [removeUserGoingResource, { loading, error }] = (0, import_react19.useMutation)(
2437
2436
  REMOVE_USER_GOING_RESOURCE_MUTATION,
2438
2437
  {
2439
2438
  awaitRefetchQueries: true,
@@ -2443,7 +2442,7 @@ var useRemoveUserGoingResource = () => {
2443
2442
  return { error, loading, removeUserGoingResource };
2444
2443
  };
2445
2444
  var useAddUserPresentResource = () => {
2446
- const [addUserPresentResource, { loading, error }] = (0, import_client42.useMutation)(
2445
+ const [addUserPresentResource, { loading, error }] = (0, import_react19.useMutation)(
2447
2446
  ADD_USER_PRESENT_RESOURCE_MUTATION,
2448
2447
  {
2449
2448
  awaitRefetchQueries: true,
@@ -2453,7 +2452,7 @@ var useAddUserPresentResource = () => {
2453
2452
  return { addUserPresentResource, error, loading };
2454
2453
  };
2455
2454
  var useRemoveUserPresentResource = () => {
2456
- const [removeUserPresentResource, { loading, error }] = (0, import_client42.useMutation)(
2455
+ const [removeUserPresentResource, { loading, error }] = (0, import_react19.useMutation)(
2457
2456
  REMOVE_USER_PRESENT_RESOURCE_MUTATION,
2458
2457
  {
2459
2458
  awaitRefetchQueries: true,
@@ -2464,66 +2463,72 @@ var useRemoveUserPresentResource = () => {
2464
2463
  };
2465
2464
 
2466
2465
  // src/graphql/hooks/user/hooksQuery.ts
2467
- var import_client43 = require("@apollo/client");
2466
+ var import_react20 = require("@apollo/client/react");
2468
2467
  var useGetUsers = () => {
2469
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USERS, {
2470
- fetchPolicy: "network-only"
2471
- });
2472
- const users = data?.users;
2468
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(
2469
+ GET_USERS,
2470
+ {
2471
+ fetchPolicy: "network-only"
2472
+ }
2473
+ );
2474
+ const users = data?.users || [];
2473
2475
  return { error, loading, refetch, users };
2474
2476
  };
2475
2477
  var useGetUser = (_id) => {
2476
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USER, {
2477
- variables: { _id }
2478
- });
2478
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(
2479
+ GET_USER,
2480
+ {
2481
+ variables: { _id }
2482
+ }
2483
+ );
2479
2484
  const user = data?.user;
2480
2485
  return { error, loading, refetch, user };
2481
2486
  };
2482
2487
  var useGetUserEvents = () => {
2483
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USER_EVENTS, {
2488
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(GET_USER_EVENTS, {
2484
2489
  fetchPolicy: "network-only"
2485
2490
  });
2486
- const userEvents = data?.userEvents;
2491
+ const userEvents = data?.userEvents || [];
2487
2492
  return { error, loading, refetch, userEvents };
2488
2493
  };
2489
2494
  var useGetUserVendors = () => {
2490
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USER_VENDORS, {
2495
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(GET_USER_VENDORS, {
2491
2496
  fetchPolicy: "network-only"
2492
2497
  });
2493
- const userVendors = data?.userVendors;
2498
+ const userVendors = data?.userVendors || [];
2494
2499
  return { error, loading, refetch, userVendors };
2495
2500
  };
2496
2501
  var useGetUserActivities = () => {
2497
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USER_ACTIVITIES, {
2502
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(GET_USER_ACTIVITIES, {
2498
2503
  fetchPolicy: "network-only"
2499
2504
  });
2500
2505
  const userActivities = {
2501
2506
  favourites: {
2502
- events: data?.userActivities.favourites.events,
2503
- vendors: data?.userActivities.favourites.vendors
2507
+ events: data?.userActivities.favourites.events || [],
2508
+ vendors: data?.userActivities.favourites.vendors || []
2504
2509
  },
2505
2510
  going: {
2506
- events: data?.userActivities.going.events
2511
+ events: data?.userActivities.going.events || []
2507
2512
  },
2508
2513
  interested: {
2509
- events: data?.userActivities.interested.events
2514
+ events: data?.userActivities.interested.events || []
2510
2515
  },
2511
2516
  present: {
2512
- events: data?.userActivities.present.events
2517
+ events: data?.userActivities.present.events || []
2513
2518
  }
2514
2519
  };
2515
2520
  return { error, loading, refetch, userActivities };
2516
2521
  };
2517
2522
 
2518
2523
  // src/graphql/hooks/ad/hooksMutation.ts
2519
- var import_client46 = require("@apollo/client");
2524
+ var import_react21 = require("@apollo/client/react");
2520
2525
 
2521
2526
  // src/graphql/mutations/ad.ts
2522
- var import_client45 = require("@apollo/client");
2527
+ var import_client25 = require("@apollo/client");
2523
2528
 
2524
2529
  // src/graphql/queries/ad.ts
2525
- var import_client44 = require("@apollo/client");
2526
- var AD_FIELDS_FRAGMENT = import_client44.gql`
2530
+ var import_client24 = require("@apollo/client");
2531
+ var AD_FIELDS_FRAGMENT = import_client24.gql`
2527
2532
  fragment AdFields on AdType {
2528
2533
  _id
2529
2534
  active
@@ -2551,7 +2556,7 @@ var AD_FIELDS_FRAGMENT = import_client44.gql`
2551
2556
  }
2552
2557
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
2553
2558
  `;
2554
- var GET_ADS = import_client44.gql`
2559
+ var GET_ADS = import_client24.gql`
2555
2560
  query getAds {
2556
2561
  ads {
2557
2562
  ...AdFields
@@ -2559,7 +2564,7 @@ var GET_ADS = import_client44.gql`
2559
2564
  }
2560
2565
  ${AD_FIELDS_FRAGMENT}
2561
2566
  `;
2562
- var GET_AD = import_client44.gql`
2567
+ var GET_AD = import_client24.gql`
2563
2568
  query getAd($_id: ID!) {
2564
2569
  ad(_id: $_id) {
2565
2570
  ...AdFields
@@ -2567,7 +2572,7 @@ var GET_AD = import_client44.gql`
2567
2572
  }
2568
2573
  ${AD_FIELDS_FRAGMENT}
2569
2574
  `;
2570
- var GET_ADS_BY_REGION = import_client44.gql`
2575
+ var GET_ADS_BY_REGION = import_client24.gql`
2571
2576
  query getAdsByRegion($region: String!, $status: AdStatusTypeEnum) {
2572
2577
  adsByRegion(region: $region, status: $status) {
2573
2578
  ...AdFields
@@ -2577,7 +2582,7 @@ var GET_ADS_BY_REGION = import_client44.gql`
2577
2582
  `;
2578
2583
 
2579
2584
  // src/graphql/mutations/ad.ts
2580
- var CREATE_AD_MUTATION = import_client45.gql`
2585
+ var CREATE_AD_MUTATION = import_client25.gql`
2581
2586
  mutation createAd($input: AdInputType!) {
2582
2587
  createAd(input: $input) {
2583
2588
  ...AdFields
@@ -2585,7 +2590,7 @@ var CREATE_AD_MUTATION = import_client45.gql`
2585
2590
  }
2586
2591
  ${AD_FIELDS_FRAGMENT}
2587
2592
  `;
2588
- var UPDATE_AD_MUTATION = import_client45.gql`
2593
+ var UPDATE_AD_MUTATION = import_client25.gql`
2589
2594
  mutation updateAd($_id: ID!, $input: AdInputType!) {
2590
2595
  updateAd(_id: $_id, input: $input) {
2591
2596
  ...AdFields
@@ -2593,7 +2598,7 @@ var UPDATE_AD_MUTATION = import_client45.gql`
2593
2598
  }
2594
2599
  ${AD_FIELDS_FRAGMENT}
2595
2600
  `;
2596
- var DELETE_AD_MUTATION = import_client45.gql`
2601
+ var DELETE_AD_MUTATION = import_client25.gql`
2597
2602
  mutation deleteAd($_id: ID!) {
2598
2603
  deleteAd(_id: $_id)
2599
2604
  }
@@ -2601,7 +2606,7 @@ var DELETE_AD_MUTATION = import_client45.gql`
2601
2606
 
2602
2607
  // src/graphql/hooks/ad/hooksMutation.ts
2603
2608
  var useCreateAd = () => {
2604
- const [createAd, { loading, error }] = (0, import_client46.useMutation)(CREATE_AD_MUTATION, {
2609
+ const [createAd, { loading, error }] = (0, import_react21.useMutation)(CREATE_AD_MUTATION, {
2605
2610
  awaitRefetchQueries: true,
2606
2611
  refetchQueries: [{ query: GET_ADS }]
2607
2612
  });
@@ -2612,7 +2617,7 @@ var useCreateAd = () => {
2612
2617
  };
2613
2618
  };
2614
2619
  var useUpdateAd = () => {
2615
- const [updateAd, { loading, error }] = (0, import_client46.useMutation)(UPDATE_AD_MUTATION, {
2620
+ const [updateAd, { loading, error }] = (0, import_react21.useMutation)(UPDATE_AD_MUTATION, {
2616
2621
  awaitRefetchQueries: true,
2617
2622
  refetchQueries: [{ query: GET_ADS }]
2618
2623
  });
@@ -2623,7 +2628,7 @@ var useUpdateAd = () => {
2623
2628
  };
2624
2629
  };
2625
2630
  var useDeleteAd = () => {
2626
- const [deleteAd, { loading, error }] = (0, import_client46.useMutation)(DELETE_AD_MUTATION, {
2631
+ const [deleteAd, { loading, error }] = (0, import_react21.useMutation)(DELETE_AD_MUTATION, {
2627
2632
  awaitRefetchQueries: true,
2628
2633
  refetchQueries: [{ query: GET_ADS }]
2629
2634
  });
@@ -2635,23 +2640,23 @@ var useDeleteAd = () => {
2635
2640
  };
2636
2641
 
2637
2642
  // src/graphql/hooks/ad/hooksQuery.ts
2638
- var import_client47 = require("@apollo/client");
2643
+ var import_react22 = require("@apollo/client/react");
2639
2644
  var useGetAds = () => {
2640
- const { data, loading, error, refetch } = (0, import_client47.useQuery)(
2645
+ const { data, loading, error, refetch } = (0, import_react22.useQuery)(
2641
2646
  GET_ADS,
2642
2647
  {
2643
2648
  fetchPolicy: "no-cache"
2644
2649
  }
2645
2650
  );
2646
2651
  return {
2647
- ads: data?.ads,
2652
+ ads: data?.ads || [],
2648
2653
  error,
2649
2654
  loading,
2650
2655
  refetch
2651
2656
  };
2652
2657
  };
2653
2658
  var useGetAd = (_id) => {
2654
- const { data, loading, error, refetch } = (0, import_client47.useQuery)(GET_AD, {
2659
+ const { data, loading, error, refetch } = (0, import_react22.useQuery)(GET_AD, {
2655
2660
  fetchPolicy: "no-cache",
2656
2661
  skip: !_id,
2657
2662
  variables: { _id }
@@ -2664,13 +2669,13 @@ var useGetAd = (_id) => {
2664
2669
  };
2665
2670
  };
2666
2671
  var useGetAdsByRegion = (region, status) => {
2667
- const { data, loading, error, refetch } = (0, import_client47.useQuery)(GET_ADS_BY_REGION, {
2672
+ const { data, loading, error, refetch } = (0, import_react22.useQuery)(GET_ADS_BY_REGION, {
2668
2673
  fetchPolicy: "no-cache",
2669
2674
  skip: !region,
2670
2675
  variables: { region, status }
2671
2676
  });
2672
2677
  return {
2673
- adsByRegion: data?.adsByRegion,
2678
+ adsByRegion: data?.adsByRegion || [],
2674
2679
  error,
2675
2680
  loading,
2676
2681
  refetch
@@ -2678,11 +2683,11 @@ var useGetAdsByRegion = (region, status) => {
2678
2683
  };
2679
2684
 
2680
2685
  // src/graphql/hooks/resourceActivities/hooksMutation.ts
2681
- var import_client49 = require("@apollo/client");
2686
+ var import_react23 = require("@apollo/client/react");
2682
2687
 
2683
2688
  // src/graphql/mutations/resourceActivities.ts
2684
- var import_client48 = require("@apollo/client");
2685
- var CREATE_RESOURCE_ACTIVITY_MUTATION = import_client48.gql`
2689
+ var import_client26 = require("@apollo/client");
2690
+ var CREATE_RESOURCE_ACTIVITY_MUTATION = import_client26.gql`
2686
2691
  mutation createResourceActivity($input: ResourceActivityInputType!) {
2687
2692
  createResourceActivity(input: $input)
2688
2693
  }
@@ -2690,18 +2695,18 @@ var CREATE_RESOURCE_ACTIVITY_MUTATION = import_client48.gql`
2690
2695
 
2691
2696
  // src/graphql/hooks/resourceActivities/hooksMutation.ts
2692
2697
  var useCreateResourceActivity = () => {
2693
- const [createResourceActivity, { loading, error }] = (0, import_client49.useMutation)(
2698
+ const [createResourceActivity, { loading, error }] = (0, import_react23.useMutation)(
2694
2699
  CREATE_RESOURCE_ACTIVITY_MUTATION
2695
2700
  );
2696
2701
  return { createResourceActivity, error, loading };
2697
2702
  };
2698
2703
 
2699
2704
  // src/graphql/hooks/resourceActivities/hooksQuery.ts
2700
- var import_client51 = require("@apollo/client");
2705
+ var import_react24 = require("@apollo/client/react");
2701
2706
 
2702
2707
  // src/graphql/queries/resourceActivities.ts
2703
- var import_client50 = require("@apollo/client");
2704
- var RESOURCE_ACTIVITIES_FIELDS_FRAGMENT = import_client50.gql`
2708
+ var import_client27 = require("@apollo/client");
2709
+ var RESOURCE_ACTIVITIES_FIELDS_FRAGMENT = import_client27.gql`
2705
2710
  fragment ResourceActivitiesFields on ResourceActivitiesType {
2706
2711
  resourceId
2707
2712
  resourceType
@@ -2720,7 +2725,7 @@ var RESOURCE_ACTIVITIES_FIELDS_FRAGMENT = import_client50.gql`
2720
2725
  }
2721
2726
  }
2722
2727
  `;
2723
- var GET_RESOURCE_ACTIVITIES = import_client50.gql`
2728
+ var GET_RESOURCE_ACTIVITIES = import_client27.gql`
2724
2729
  query getResourceActivities(
2725
2730
  $resourceType: ResourceTypeEnum!
2726
2731
  $resourceId: ID!
@@ -2734,7 +2739,7 @@ var GET_RESOURCE_ACTIVITIES = import_client50.gql`
2734
2739
 
2735
2740
  // src/graphql/hooks/resourceActivities/hooksQuery.ts
2736
2741
  var useGetResourceActivities = (resourceId, resourceType) => {
2737
- const { data, loading, error, refetch } = (0, import_client51.useQuery)(GET_RESOURCE_ACTIVITIES, {
2742
+ const { data, loading, error, refetch } = (0, import_react24.useQuery)(GET_RESOURCE_ACTIVITIES, {
2738
2743
  fetchPolicy: "network-only",
2739
2744
  variables: { resourceId, resourceType }
2740
2745
  });
@@ -2742,16 +2747,16 @@ var useGetResourceActivities = (resourceId, resourceType) => {
2742
2747
  error,
2743
2748
  loading,
2744
2749
  refetch,
2745
- resourceActivities: data?.resourceActivities
2750
+ resourceActivities: data?.resourceActivities || []
2746
2751
  };
2747
2752
  };
2748
2753
 
2749
2754
  // src/graphql/hooks/stripe/hooksMutation.ts
2750
- var import_client53 = require("@apollo/client");
2755
+ var import_react25 = require("@apollo/client/react");
2751
2756
 
2752
2757
  // src/graphql/mutations/stripe.ts
2753
- var import_client52 = require("@apollo/client");
2754
- var CREATE_CHECKOUT_SESSION_MUTATION = import_client52.gql`
2758
+ var import_client28 = require("@apollo/client");
2759
+ var CREATE_CHECKOUT_SESSION_MUTATION = import_client28.gql`
2755
2760
  mutation createCheckoutSession($planId: LicencesEnumType!) {
2756
2761
  createCheckoutSession(planId: $planId) {
2757
2762
  sessionId
@@ -2759,12 +2764,12 @@ var CREATE_CHECKOUT_SESSION_MUTATION = import_client52.gql`
2759
2764
  }
2760
2765
  }
2761
2766
  `;
2762
- var CANCEL_SUBSCRIPTION_MUTATION = import_client52.gql`
2767
+ var CANCEL_SUBSCRIPTION_MUTATION = import_client28.gql`
2763
2768
  mutation cancelSubscription {
2764
2769
  cancelSubscription
2765
2770
  }
2766
2771
  `;
2767
- var UPDATE_SUBSCRIPTION_PLAN_MUTATION = import_client52.gql`
2772
+ var UPDATE_SUBSCRIPTION_PLAN_MUTATION = import_client28.gql`
2768
2773
  mutation updateSubscriptionPlan($newPlanId: LicencesEnumType!) {
2769
2774
  updateSubscriptionPlan(newPlanId: $newPlanId) {
2770
2775
  subscriptionId
@@ -2777,30 +2782,30 @@ var UPDATE_SUBSCRIPTION_PLAN_MUTATION = import_client52.gql`
2777
2782
 
2778
2783
  // src/graphql/hooks/stripe/hooksMutation.ts
2779
2784
  var useCreateCheckoutSession = () => {
2780
- const [createCheckoutSession, { loading, error }] = (0, import_client53.useMutation)(
2785
+ const [createCheckoutSession, { loading, error }] = (0, import_react25.useMutation)(
2781
2786
  CREATE_CHECKOUT_SESSION_MUTATION
2782
2787
  );
2783
2788
  return { createCheckoutSession, error, loading };
2784
2789
  };
2785
2790
  var useCancelSubscription = () => {
2786
- const [cancelSubscription, { loading, error }] = (0, import_client53.useMutation)(
2791
+ const [cancelSubscription, { loading, error }] = (0, import_react25.useMutation)(
2787
2792
  CANCEL_SUBSCRIPTION_MUTATION
2788
2793
  );
2789
2794
  return { cancelSubscription, error, loading };
2790
2795
  };
2791
2796
  var useUpdateSubscriptionPlan = () => {
2792
- const [updateSubscriptionPlan, { loading, error }] = (0, import_client53.useMutation)(
2797
+ const [updateSubscriptionPlan, { loading, error }] = (0, import_react25.useMutation)(
2793
2798
  UPDATE_SUBSCRIPTION_PLAN_MUTATION
2794
2799
  );
2795
2800
  return { error, loading, updateSubscriptionPlan };
2796
2801
  };
2797
2802
 
2798
2803
  // src/graphql/hooks/stripe/hooksQuery.ts
2799
- var import_client55 = require("@apollo/client");
2804
+ var import_react26 = require("@apollo/client/react");
2800
2805
 
2801
2806
  // src/graphql/queries/stripe.ts
2802
- var import_client54 = require("@apollo/client");
2803
- var GET_SUBSCRIPTION_STATUS = import_client54.gql`
2807
+ var import_client29 = require("@apollo/client");
2808
+ var GET_SUBSCRIPTION_STATUS = import_client29.gql`
2804
2809
  query getSubscriptionStatus {
2805
2810
  getSubscriptionStatus {
2806
2811
  subscriptionId
@@ -2813,7 +2818,7 @@ var GET_SUBSCRIPTION_STATUS = import_client54.gql`
2813
2818
 
2814
2819
  // src/graphql/hooks/stripe/hooksQuery.ts
2815
2820
  var useGetSubscriptionStatus = () => {
2816
- const { data, loading, error, refetch } = (0, import_client55.useQuery)(GET_SUBSCRIPTION_STATUS);
2821
+ const { data, loading, error, refetch } = (0, import_react26.useQuery)(GET_SUBSCRIPTION_STATUS);
2817
2822
  return {
2818
2823
  data: data?.getSubscriptionStatus,
2819
2824
  error,
@@ -2823,11 +2828,11 @@ var useGetSubscriptionStatus = () => {
2823
2828
  };
2824
2829
 
2825
2830
  // src/graphql/hooks/partner/hooksMutation.ts
2826
- var import_client57 = require("@apollo/client");
2831
+ var import_react27 = require("@apollo/client/react");
2827
2832
 
2828
2833
  // src/graphql/mutations/partner.ts
2829
- var import_client56 = require("@apollo/client");
2830
- var CREATE_PARTNER_MUTATION = import_client56.gql`
2834
+ var import_client30 = require("@apollo/client");
2835
+ var CREATE_PARTNER_MUTATION = import_client30.gql`
2831
2836
  mutation createPartner($input: PartnerInputType!) {
2832
2837
  createPartner(input: $input) {
2833
2838
  ...PartnerFields
@@ -2835,7 +2840,7 @@ var CREATE_PARTNER_MUTATION = import_client56.gql`
2835
2840
  }
2836
2841
  ${PARTNER}
2837
2842
  `;
2838
- var UPDATE_PARTNER_MUTATION = import_client56.gql`
2843
+ var UPDATE_PARTNER_MUTATION = import_client30.gql`
2839
2844
  mutation updatePartner($_id: ID!, $input: PartnerInputType!) {
2840
2845
  updatePartner(_id: $_id, input: $input) {
2841
2846
  ...PartnerFields
@@ -2843,7 +2848,7 @@ var UPDATE_PARTNER_MUTATION = import_client56.gql`
2843
2848
  }
2844
2849
  ${PARTNER}
2845
2850
  `;
2846
- var DELETE_PARTNER_MUTATION = import_client56.gql`
2851
+ var DELETE_PARTNER_MUTATION = import_client30.gql`
2847
2852
  mutation deletePartner($_id: ID!) {
2848
2853
  deletePartner(_id: $_id)
2849
2854
  }
@@ -2851,7 +2856,7 @@ var DELETE_PARTNER_MUTATION = import_client56.gql`
2851
2856
 
2852
2857
  // src/graphql/hooks/partner/hooksMutation.ts
2853
2858
  var useCreatePartner = () => {
2854
- const [createPartner, { loading, error }] = (0, import_client57.useMutation)(
2859
+ const [createPartner, { loading, error }] = (0, import_react27.useMutation)(
2855
2860
  CREATE_PARTNER_MUTATION,
2856
2861
  {
2857
2862
  awaitRefetchQueries: true,
@@ -2861,7 +2866,7 @@ var useCreatePartner = () => {
2861
2866
  return { createPartner, error, loading };
2862
2867
  };
2863
2868
  var useUpdatePartner = () => {
2864
- const [updatePartner, { loading, error }] = (0, import_client57.useMutation)(
2869
+ const [updatePartner, { loading, error }] = (0, import_react27.useMutation)(
2865
2870
  UPDATE_PARTNER_MUTATION,
2866
2871
  {
2867
2872
  awaitRefetchQueries: true,
@@ -2871,7 +2876,7 @@ var useUpdatePartner = () => {
2871
2876
  return { error, loading, updatePartner };
2872
2877
  };
2873
2878
  var useDeletePartner = () => {
2874
- const [deletePartner, { loading, error }] = (0, import_client57.useMutation)(
2879
+ const [deletePartner, { loading, error }] = (0, import_react27.useMutation)(
2875
2880
  DELETE_PARTNER_MUTATION,
2876
2881
  {
2877
2882
  awaitRefetchQueries: true,
@@ -2882,12 +2887,12 @@ var useDeletePartner = () => {
2882
2887
  };
2883
2888
 
2884
2889
  // src/graphql/hooks/partner/hooksQuery.ts
2885
- var import_client58 = require("@apollo/client");
2890
+ var import_react28 = require("@apollo/client/react");
2886
2891
  var useGetPartners = () => {
2887
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(GET_PARTNERS, {
2892
+ const { loading, error, data, refetch } = (0, import_react28.useQuery)(GET_PARTNERS, {
2888
2893
  fetchPolicy: "network-only"
2889
2894
  });
2890
- const partners = data?.partners;
2895
+ const partners = data?.partners || [];
2891
2896
  return {
2892
2897
  error,
2893
2898
  loading,
@@ -2896,30 +2901,33 @@ var useGetPartners = () => {
2896
2901
  };
2897
2902
  };
2898
2903
  var useGetPartner = (_id) => {
2899
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(GET_PARTNER, {
2900
- fetchPolicy: "network-only",
2901
- skip: !_id,
2902
- variables: { _id }
2903
- });
2904
+ const { loading, error, data, refetch } = (0, import_react28.useQuery)(
2905
+ GET_PARTNER,
2906
+ {
2907
+ fetchPolicy: "network-only",
2908
+ skip: !_id,
2909
+ variables: { _id }
2910
+ }
2911
+ );
2904
2912
  const partner = data?.partner;
2905
2913
  return { error, loading, partner, refetch };
2906
2914
  };
2907
2915
  var useGetPartnersByRegion = (region) => {
2908
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(GET_PARTNERS_BY_REGION, {
2916
+ const { loading, error, data, refetch } = (0, import_react28.useQuery)(GET_PARTNERS_BY_REGION, {
2909
2917
  fetchPolicy: "no-cache",
2910
2918
  skip: !region,
2911
2919
  variables: { region }
2912
2920
  });
2913
- const partnersByRegion = data?.partnersByRegion;
2921
+ const partnersByRegion = data?.partnersByRegion || [];
2914
2922
  return { error, loading, partnersByRegion, refetch };
2915
2923
  };
2916
2924
  var useSearchPartners = (search, region) => {
2917
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(SEARCH_PARTNERS, {
2925
+ const { loading, error, data, refetch } = (0, import_react28.useQuery)(SEARCH_PARTNERS, {
2918
2926
  fetchPolicy: "network-only",
2919
2927
  skip: search.length < 3,
2920
2928
  variables: { region, search }
2921
2929
  });
2922
- const partnersSearch = data?.partnersSearch;
2930
+ const partnersSearch = data?.partnersSearch || [];
2923
2931
  return { error, loading, partnersSearch, refetch };
2924
2932
  };
2925
2933
  // Annotate the CommonJS export names for ESM import in node: