@timardex/cluemart-shared 1.0.81 → 1.0.83

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.
@@ -20,20 +20,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/graphql/index.ts
21
21
  var graphql_exports = {};
22
22
  __export(graphql_exports, {
23
- CREATE_BULK_NOTIFICATIONS: () => CREATE_BULK_NOTIFICATIONS,
24
- CREATE_NOTIFICATION: () => CREATE_NOTIFICATION,
25
- GET_NOTIFICATION_COUNT: () => GET_NOTIFICATION_COUNT,
26
- GET_UNREAD_NOTIFICATIONS: () => GET_UNREAD_NOTIFICATIONS,
27
- GET_USER_NOTIFICATIONS: () => GET_USER_NOTIFICATIONS2,
28
- MARK_ALL_NOTIFICATIONS_READ: () => MARK_ALL_NOTIFICATIONS_READ,
29
- MARK_NOTIFICATION_READ: () => MARK_NOTIFICATION_READ,
23
+ GET_CHAT_MESSAGE: () => GET_CHAT_MESSAGE,
30
24
  useAddParticipantToChat: () => useAddParticipantToChat,
31
25
  useAddUserFavouriteResource: () => useAddUserFavouriteResource,
32
26
  useAdminUpdateResourceType: () => useAdminUpdateResourceType,
33
27
  useContactUs: () => useContactUs,
28
+ useCreateBulkNotifications: () => useCreateBulkNotifications,
34
29
  useCreateChat: () => useCreateChat,
35
30
  useCreateMarket: () => useCreateMarket,
36
31
  useCreateMarketInfo: () => useCreateMarketInfo,
32
+ useCreateNotification: () => useCreateNotification,
37
33
  useCreatePoster: () => useCreatePoster,
38
34
  useCreatePushToken: () => useCreatePushToken,
39
35
  useCreateRelation: () => useCreateRelation,
@@ -48,12 +44,14 @@ __export(graphql_exports, {
48
44
  useDeleteTester: () => useDeleteTester,
49
45
  useDeleteUser: () => useDeleteUser,
50
46
  useGetChat: () => useGetChat,
47
+ useGetChatSubscription: () => useGetChatSubscription,
51
48
  useGetMarket: () => useGetMarket,
52
49
  useGetMarketInfo: () => useGetMarketInfo,
53
50
  useGetMarketRelations: () => useGetMarketRelations,
54
51
  useGetMarkets: () => useGetMarkets,
55
52
  useGetMarketsByRegion: () => useGetMarketsByRegion,
56
53
  useGetMarketsNearMe: () => useGetMarketsNearMe,
54
+ useGetNotificationCount: () => useGetNotificationCount,
57
55
  useGetRelation: () => useGetRelation,
58
56
  useGetRelationByMarketAndStallholder: () => useGetRelationByMarketAndStallholder,
59
57
  useGetResourceConnections: () => useGetResourceConnections,
@@ -64,6 +62,7 @@ __export(graphql_exports, {
64
62
  useGetStallholdersByRegion: () => useGetStallholdersByRegion,
65
63
  useGetTester: () => useGetTester,
66
64
  useGetTesters: () => useGetTesters,
65
+ useGetUnreadNotifications: () => useGetUnreadNotifications,
67
66
  useGetUser: () => useGetUser,
68
67
  useGetUserChats: () => useGetUserChats,
69
68
  useGetUserFavourites: () => useGetUserFavourites,
@@ -73,6 +72,8 @@ __export(graphql_exports, {
73
72
  useGetUsers: () => useGetUsers,
74
73
  useLogin: () => useLogin,
75
74
  useLogout: () => useLogout,
75
+ useMarkAllNotificationsRead: () => useMarkAllNotificationsRead,
76
+ useMarkNotificationRead: () => useMarkNotificationRead,
76
77
  useRefreshToken: () => useRefreshToken,
77
78
  useRegister: () => useRegister,
78
79
  useRemoveParticipantFromChat: () => useRemoveParticipantFromChat,
@@ -764,9 +765,22 @@ var useRemoveParticipantFromChat = () => {
764
765
  };
765
766
 
766
767
  // src/graphql/hooks/chat/hooksQuery.ts
768
+ var import_client12 = require("@apollo/client");
769
+
770
+ // src/graphql/subscriptions/chat.ts
767
771
  var import_client11 = require("@apollo/client");
772
+ var GET_CHAT_MESSAGE = import_client11.gql`
773
+ subscription {
774
+ getChatMessage {
775
+ ...ChatFields
776
+ }
777
+ }
778
+ ${CHAT_FIELDS_FRAGMENT}
779
+ `;
780
+
781
+ // src/graphql/hooks/chat/hooksQuery.ts
768
782
  var useGetChat = (_id) => {
769
- const { loading, error, data, refetch } = (0, import_client11.useQuery)(CHAT, {
783
+ const { loading, error, data, refetch } = (0, import_client12.useQuery)(CHAT, {
770
784
  fetchPolicy: "network-only",
771
785
  skip: !_id,
772
786
  variables: { _id }
@@ -775,19 +789,24 @@ var useGetChat = (_id) => {
775
789
  return { chat, error, loading, refetch };
776
790
  };
777
791
  var useGetUserChats = () => {
778
- const { loading, error, data, refetch } = (0, import_client11.useQuery)(USER_CHATS, {
792
+ const { loading, error, data, refetch } = (0, import_client12.useQuery)(USER_CHATS, {
779
793
  fetchPolicy: "network-only"
780
794
  });
781
795
  const userChats = data?.userChats;
782
796
  return { error, loading, refetch, userChats };
783
797
  };
798
+ var useGetChatSubscription = () => {
799
+ const { data, loading, error } = (0, import_client12.useSubscription)(GET_CHAT_MESSAGE);
800
+ const chat = data?.getChat;
801
+ return { chat, error, loading };
802
+ };
784
803
 
785
804
  // src/graphql/hooks/contactUs.ts
786
- var import_client13 = require("@apollo/client");
805
+ var import_client14 = require("@apollo/client");
787
806
 
788
807
  // src/graphql/mutations/contactUs.ts
789
- var import_client12 = require("@apollo/client");
790
- var CONTACT_US_MUTATION = import_client12.gql`
808
+ var import_client13 = require("@apollo/client");
809
+ var CONTACT_US_MUTATION = import_client13.gql`
791
810
  mutation contactUs($input: ContactUsInputType!) {
792
811
  contactUs(input: $input) {
793
812
  message
@@ -797,16 +816,16 @@ var CONTACT_US_MUTATION = import_client12.gql`
797
816
 
798
817
  // src/graphql/hooks/contactUs.ts
799
818
  var useContactUs = () => {
800
- const [contactUs, { loading, error }] = (0, import_client13.useMutation)(CONTACT_US_MUTATION);
819
+ const [contactUs, { loading, error }] = (0, import_client14.useMutation)(CONTACT_US_MUTATION);
801
820
  return { contactUs, error, loading };
802
821
  };
803
822
 
804
823
  // src/graphql/hooks/market/hooksMutation.ts
805
- var import_client16 = require("@apollo/client");
824
+ var import_client17 = require("@apollo/client");
806
825
 
807
826
  // src/graphql/mutations/market.ts
808
- var import_client14 = require("@apollo/client");
809
- var CREATE_MARKET_MUTATION = import_client14.gql`
827
+ var import_client15 = require("@apollo/client");
828
+ var CREATE_MARKET_MUTATION = import_client15.gql`
810
829
  mutation createMarket($input: MarketInputType!) {
811
830
  createMarket(input: $input) {
812
831
  ...MarketFields
@@ -814,7 +833,7 @@ var CREATE_MARKET_MUTATION = import_client14.gql`
814
833
  }
815
834
  ${MARKET}
816
835
  `;
817
- var UPDATE_MARKET_MUTATION = import_client14.gql`
836
+ var UPDATE_MARKET_MUTATION = import_client15.gql`
818
837
  mutation updateMarket($_id: ID!, $input: MarketInputType!) {
819
838
  updateMarket(_id: $_id, input: $input) {
820
839
  ...MarketFields
@@ -822,12 +841,12 @@ var UPDATE_MARKET_MUTATION = import_client14.gql`
822
841
  }
823
842
  ${MARKET}
824
843
  `;
825
- var DELETE_MARKET_MUTATION = import_client14.gql`
844
+ var DELETE_MARKET_MUTATION = import_client15.gql`
826
845
  mutation deleteMarket($_id: ID!) {
827
846
  deleteMarket(_id: $_id)
828
847
  }
829
848
  `;
830
- var CREATE_MARKET_INFO_MUTATION = import_client14.gql`
849
+ var CREATE_MARKET_INFO_MUTATION = import_client15.gql`
831
850
  mutation createMarketInfo($input: MarketInfoInputType!) {
832
851
  createMarketInfo(input: $input) {
833
852
  ...MarketInfoFields
@@ -835,7 +854,7 @@ var CREATE_MARKET_INFO_MUTATION = import_client14.gql`
835
854
  }
836
855
  ${MARKET_INFO}
837
856
  `;
838
- var UPDATE_MARKET_INFO_MUTATION = import_client14.gql`
857
+ var UPDATE_MARKET_INFO_MUTATION = import_client15.gql`
839
858
  mutation updateMarketInfo($_id: ID!, $input: MarketInfoInputType!) {
840
859
  updateMarketInfo(_id: $_id, input: $input) {
841
860
  ...MarketInfoFields
@@ -845,8 +864,8 @@ var UPDATE_MARKET_INFO_MUTATION = import_client14.gql`
845
864
  `;
846
865
 
847
866
  // src/graphql/queries/user.ts
848
- var import_client15 = require("@apollo/client");
849
- var GET_USERS = import_client15.gql`
867
+ var import_client16 = require("@apollo/client");
868
+ var GET_USERS = import_client16.gql`
850
869
  query getUsers {
851
870
  users {
852
871
  ...UserFields
@@ -854,7 +873,7 @@ var GET_USERS = import_client15.gql`
854
873
  }
855
874
  ${USER_FIELDS_FRAGMENT}
856
875
  `;
857
- var GET_USER = import_client15.gql`
876
+ var GET_USER = import_client16.gql`
858
877
  query getUser($_id: ID!) {
859
878
  user(_id: $_id) {
860
879
  ...UserFields
@@ -862,7 +881,7 @@ var GET_USER = import_client15.gql`
862
881
  }
863
882
  ${USER_FIELDS_FRAGMENT}
864
883
  `;
865
- var GET_USER_MARKETS = import_client15.gql`
884
+ var GET_USER_MARKETS = import_client16.gql`
866
885
  query getUserMarkets {
867
886
  userMarkets {
868
887
  ...MarketFields
@@ -870,7 +889,7 @@ var GET_USER_MARKETS = import_client15.gql`
870
889
  }
871
890
  ${MARKET}
872
891
  `;
873
- var GET_USER_STALLHOLDER = import_client15.gql`
892
+ var GET_USER_STALLHOLDER = import_client16.gql`
874
893
  query getUserStallholder {
875
894
  userStallholder {
876
895
  ...StallholderFields
@@ -878,7 +897,7 @@ var GET_USER_STALLHOLDER = import_client15.gql`
878
897
  }
879
898
  ${STALLHOLDER}
880
899
  `;
881
- var GET_USER_FAVOURITES = import_client15.gql`
900
+ var GET_USER_FAVOURITES = import_client16.gql`
882
901
  query getUserFavourites {
883
902
  userFavourites {
884
903
  markets {
@@ -892,15 +911,10 @@ var GET_USER_FAVOURITES = import_client15.gql`
892
911
  ${MARKET}
893
912
  ${STALLHOLDER}
894
913
  `;
895
- var GET_USER_NOTIFICATIONS = import_client15.gql`
896
- query getMissedNotifications {
897
- userNotifications
898
- }
899
- `;
900
914
 
901
915
  // src/graphql/hooks/market/hooksMutation.ts
902
916
  var useCreateMarket = () => {
903
- const [createMarket, { loading, error }] = (0, import_client16.useMutation)(
917
+ const [createMarket, { loading, error }] = (0, import_client17.useMutation)(
904
918
  CREATE_MARKET_MUTATION,
905
919
  {
906
920
  awaitRefetchQueries: true,
@@ -910,7 +924,7 @@ var useCreateMarket = () => {
910
924
  return { createMarket, error, loading };
911
925
  };
912
926
  var useUpdateMarket = () => {
913
- const [updateMarket, { loading, error }] = (0, import_client16.useMutation)(
927
+ const [updateMarket, { loading, error }] = (0, import_client17.useMutation)(
914
928
  UPDATE_MARKET_MUTATION,
915
929
  {
916
930
  awaitRefetchQueries: true,
@@ -920,7 +934,7 @@ var useUpdateMarket = () => {
920
934
  return { error, loading, updateMarket };
921
935
  };
922
936
  var useDeleteMarket = () => {
923
- const [deleteMarket, { loading, error }] = (0, import_client16.useMutation)(
937
+ const [deleteMarket, { loading, error }] = (0, import_client17.useMutation)(
924
938
  DELETE_MARKET_MUTATION,
925
939
  {
926
940
  awaitRefetchQueries: true,
@@ -930,7 +944,7 @@ var useDeleteMarket = () => {
930
944
  return { deleteMarket, error, loading };
931
945
  };
932
946
  var useCreateMarketInfo = () => {
933
- const [createMarketInfo, { loading, error }] = (0, import_client16.useMutation)(
947
+ const [createMarketInfo, { loading, error }] = (0, import_client17.useMutation)(
934
948
  CREATE_MARKET_INFO_MUTATION,
935
949
  {
936
950
  awaitRefetchQueries: true,
@@ -956,7 +970,7 @@ var useCreateMarketInfo = () => {
956
970
  return { createMarketInfo, error, loading };
957
971
  };
958
972
  var useUpdateMarketInfo = () => {
959
- const [updateMarketInfo, { loading, error }] = (0, import_client16.useMutation)(
973
+ const [updateMarketInfo, { loading, error }] = (0, import_client17.useMutation)(
960
974
  UPDATE_MARKET_INFO_MUTATION,
961
975
  {
962
976
  awaitRefetchQueries: true,
@@ -982,16 +996,16 @@ var useUpdateMarketInfo = () => {
982
996
  };
983
997
 
984
998
  // src/graphql/hooks/market/hooksQuery.ts
985
- var import_client17 = require("@apollo/client");
999
+ var import_client18 = require("@apollo/client");
986
1000
  var useGetMarkets = () => {
987
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKETS, {
1001
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKETS, {
988
1002
  fetchPolicy: "network-only"
989
1003
  });
990
1004
  const markets = data?.markets;
991
1005
  return { error, loading, markets, refetch };
992
1006
  };
993
1007
  var useGetMarket = (_id) => {
994
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKET, {
1008
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKET, {
995
1009
  fetchPolicy: "network-only",
996
1010
  skip: !_id,
997
1011
  variables: { _id }
@@ -1000,7 +1014,7 @@ var useGetMarket = (_id) => {
1000
1014
  return { error, loading, market, refetch };
1001
1015
  };
1002
1016
  var useGetMarketsByRegion = (region) => {
1003
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKETS_BY_REGION, {
1017
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKETS_BY_REGION, {
1004
1018
  fetchPolicy: "no-cache",
1005
1019
  skip: !region,
1006
1020
  variables: { region }
@@ -1009,7 +1023,7 @@ var useGetMarketsByRegion = (region) => {
1009
1023
  return { error, loading, marketsByRegion, refetch };
1010
1024
  };
1011
1025
  var useSearchMarkets = (search, region) => {
1012
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(SEARCH_MARKETS, {
1026
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(SEARCH_MARKETS, {
1013
1027
  fetchPolicy: "network-only",
1014
1028
  skip: search.length < 3,
1015
1029
  variables: { region, search }
@@ -1018,7 +1032,7 @@ var useSearchMarkets = (search, region) => {
1018
1032
  return { error, loading, marketsSearch, refetch };
1019
1033
  };
1020
1034
  var useGetMarketsNearMe = (location) => {
1021
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKETS_NEAR_ME, {
1035
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKETS_NEAR_ME, {
1022
1036
  fetchPolicy: "network-only",
1023
1037
  skip: !location.latitude || !location.longitude,
1024
1038
  variables: {
@@ -1032,7 +1046,7 @@ var useGetMarketsNearMe = (location) => {
1032
1046
  return { error, loading, marketsNearMe, refetch };
1033
1047
  };
1034
1048
  var useGetMarketInfo = (marketId) => {
1035
- const { loading, error, data, refetch } = (0, import_client17.useQuery)(GET_MARKET_INFO, {
1049
+ const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_MARKET_INFO, {
1036
1050
  fetchPolicy: "network-only",
1037
1051
  skip: !marketId,
1038
1052
  variables: { marketId }
@@ -1041,12 +1055,179 @@ var useGetMarketInfo = (marketId) => {
1041
1055
  return { error, loading, marketInfo, refetch };
1042
1056
  };
1043
1057
 
1044
- // src/graphql/hooks/poster.ts
1058
+ // src/graphql/hooks/notifications/hooksMutation.ts
1059
+ var import_client21 = require("@apollo/client");
1060
+
1061
+ // src/graphql/mutations/notification.ts
1062
+ var import_client20 = require("@apollo/client");
1063
+
1064
+ // src/graphql/queries/notification.ts
1045
1065
  var import_client19 = require("@apollo/client");
1066
+ var USER_NOTIFICATION_FRAGMENT = import_client19.gql`
1067
+ fragment UserNotificationFields on Notification {
1068
+ id
1069
+ userId
1070
+ title
1071
+ message
1072
+ type
1073
+ isRead
1074
+ data
1075
+ createdAt
1076
+ updatedAt
1077
+ }
1078
+ `;
1079
+ var GET_USER_NOTIFICATIONS = import_client19.gql`
1080
+ query getUserNotifications(
1081
+ $userId: String!
1082
+ $limit: Int
1083
+ $offset: Int
1084
+ $isRead: String
1085
+ ) {
1086
+ userNotifications(
1087
+ userId: $userId
1088
+ limit: $limit
1089
+ offset: $offset
1090
+ isRead: $isRead
1091
+ ) {
1092
+ ...UserNotificationFields
1093
+ }
1094
+ }
1095
+ ${USER_NOTIFICATION_FRAGMENT}
1096
+ `;
1097
+ var GET_UNREAD_NOTIFICATIONS = import_client19.gql`
1098
+ query getUnreadNotifications($userId: String!, $limit: Int) {
1099
+ unreadNotifications(userId: $userId, limit: $limit) {
1100
+ ...UserNotificationFields
1101
+ }
1102
+ }
1103
+ ${USER_NOTIFICATION_FRAGMENT}
1104
+ `;
1105
+ var GET_NOTIFICATION_COUNT = import_client19.gql`
1106
+ query getNotificationCount($userId: String!) {
1107
+ notificationCount(userId: $userId) {
1108
+ total
1109
+ unread
1110
+ }
1111
+ }
1112
+ `;
1113
+
1114
+ // src/graphql/mutations/notification.ts
1115
+ var CREATE_NOTIFICATION = import_client20.gql`
1116
+ mutation createNotification($input: CreateNotificationInput!) {
1117
+ createNotification(input: $input) {
1118
+ ...UserNotificationFields
1119
+ }
1120
+ }
1121
+ ${USER_NOTIFICATION_FRAGMENT}
1122
+ `;
1123
+ var CREATE_BULK_NOTIFICATIONS = import_client20.gql`
1124
+ mutation createBulkNotifications($input: CreateBulkNotificationInput!) {
1125
+ createBulkNotifications(input: $input) {
1126
+ ...UserNotificationFields
1127
+ }
1128
+ }
1129
+ ${USER_NOTIFICATION_FRAGMENT}
1130
+ `;
1131
+ var MARK_NOTIFICATION_READ = import_client20.gql`
1132
+ mutation markNotificationRead($input: MarkNotificationReadInput!) {
1133
+ markNotificationRead(input: $input) {
1134
+ ...UserNotificationFields
1135
+ }
1136
+ }
1137
+ ${USER_NOTIFICATION_FRAGMENT}
1138
+ `;
1139
+ var MARK_ALL_NOTIFICATIONS_READ = import_client20.gql`
1140
+ mutation markAllNotificationsRead($input: MarkAllNotificationsReadInput!) {
1141
+ markAllNotificationsRead(input: $input)
1142
+ }
1143
+ `;
1144
+
1145
+ // src/graphql/hooks/notifications/hooksMutation.ts
1146
+ var useCreateNotification = () => {
1147
+ const [createNotification, { loading, error }] = (0, import_client21.useMutation)(CREATE_NOTIFICATION);
1148
+ return { createNotification, error, loading };
1149
+ };
1150
+ var useCreateBulkNotifications = () => {
1151
+ const [createBulkNotifications, { loading, error }] = (0, import_client21.useMutation)(
1152
+ CREATE_BULK_NOTIFICATIONS
1153
+ );
1154
+ return { createBulkNotifications, error, loading };
1155
+ };
1156
+ var useMarkNotificationRead = () => {
1157
+ const [markNotificationRead, { loading, error }] = (0, import_client21.useMutation)(
1158
+ MARK_NOTIFICATION_READ
1159
+ );
1160
+ return { error, loading, markNotificationRead };
1161
+ };
1162
+ var useMarkAllNotificationsRead = () => {
1163
+ const [markAllNotificationsRead, { loading, error }] = (0, import_client21.useMutation)(
1164
+ MARK_ALL_NOTIFICATIONS_READ
1165
+ );
1166
+ return { error, loading, markAllNotificationsRead };
1167
+ };
1168
+
1169
+ // src/graphql/hooks/notifications/hooksQuery.ts
1170
+ var import_client22 = require("@apollo/client");
1171
+ var useGetUserNotifications = (userId, limit, offset, isRead) => {
1172
+ const { data, error, loading, refetch } = (0, import_client22.useQuery)(GET_USER_NOTIFICATIONS, {
1173
+ fetchPolicy: "no-cache",
1174
+ skip: !userId,
1175
+ variables: {
1176
+ isRead,
1177
+ limit: limit ?? 50,
1178
+ offset: offset ?? 0,
1179
+ userId
1180
+ }
1181
+ });
1182
+ const notifications = data?.userNotifications;
1183
+ return {
1184
+ error,
1185
+ loading,
1186
+ notifications,
1187
+ refetch
1188
+ };
1189
+ };
1190
+ var useGetUnreadNotifications = (userId, limit) => {
1191
+ const { data, error, loading, refetch } = (0, import_client22.useQuery)(GET_UNREAD_NOTIFICATIONS, {
1192
+ fetchPolicy: "no-cache",
1193
+ skip: !userId,
1194
+ variables: {
1195
+ limit: limit ?? 50,
1196
+ offset: 0,
1197
+ userId
1198
+ }
1199
+ });
1200
+ const notifications = data?.unreadNotifications;
1201
+ return {
1202
+ error,
1203
+ loading,
1204
+ notifications,
1205
+ refetch
1206
+ };
1207
+ };
1208
+ var useGetNotificationCount = (userId) => {
1209
+ const { data, error, loading, refetch } = (0, import_client22.useQuery)(GET_NOTIFICATION_COUNT, {
1210
+ fetchPolicy: "no-cache",
1211
+ skip: !userId,
1212
+ variables: {
1213
+ userId
1214
+ }
1215
+ });
1216
+ const notificationCount = data?.notificationCount;
1217
+ return {
1218
+ error,
1219
+ loading,
1220
+ notificationCount,
1221
+ refetch
1222
+ };
1223
+ };
1224
+
1225
+ // src/graphql/hooks/poster.ts
1226
+ var import_client24 = require("@apollo/client");
1046
1227
 
1047
1228
  // src/graphql/mutations/poster.ts
1048
- var import_client18 = require("@apollo/client");
1049
- var CREATE_POSTER_MUTATION = import_client18.gql`
1229
+ var import_client23 = require("@apollo/client");
1230
+ var CREATE_POSTER_MUTATION = import_client23.gql`
1050
1231
  mutation createPoster($input: PosterInputType!) {
1051
1232
  createPoster(input: $input) {
1052
1233
  message
@@ -1056,18 +1237,18 @@ var CREATE_POSTER_MUTATION = import_client18.gql`
1056
1237
 
1057
1238
  // src/graphql/hooks/poster.ts
1058
1239
  var useCreatePoster = () => {
1059
- const [createPoster, { loading, error }] = (0, import_client19.useMutation)(
1240
+ const [createPoster, { loading, error }] = (0, import_client24.useMutation)(
1060
1241
  CREATE_POSTER_MUTATION
1061
1242
  );
1062
1243
  return { createPoster, error, loading };
1063
1244
  };
1064
1245
 
1065
1246
  // src/graphql/hooks/pushToken.ts
1066
- var import_client21 = require("@apollo/client");
1247
+ var import_client26 = require("@apollo/client");
1067
1248
 
1068
1249
  // src/graphql/mutations/pushToken.ts
1069
- var import_client20 = require("@apollo/client");
1070
- var CREATE_PUSH_TOKEN_MUTATION = import_client20.gql`
1250
+ var import_client25 = require("@apollo/client");
1251
+ var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
1071
1252
  mutation createPushToken($input: PushTokenInput!) {
1072
1253
  createPushToken(input: $input) {
1073
1254
  success
@@ -1077,21 +1258,21 @@ var CREATE_PUSH_TOKEN_MUTATION = import_client20.gql`
1077
1258
 
1078
1259
  // src/graphql/hooks/pushToken.ts
1079
1260
  var useCreatePushToken = () => {
1080
- const [createPushToken, { loading, error }] = (0, import_client21.useMutation)(
1261
+ const [createPushToken, { loading, error }] = (0, import_client26.useMutation)(
1081
1262
  CREATE_PUSH_TOKEN_MUTATION
1082
1263
  );
1083
1264
  return { createPushToken, error, loading };
1084
1265
  };
1085
1266
 
1086
1267
  // src/graphql/hooks/relation/hooksMutation.ts
1087
- var import_client24 = require("@apollo/client");
1268
+ var import_client29 = require("@apollo/client");
1088
1269
 
1089
1270
  // src/graphql/mutations/relation.ts
1090
- var import_client23 = require("@apollo/client");
1271
+ var import_client28 = require("@apollo/client");
1091
1272
 
1092
1273
  // src/graphql/queries/relation.ts
1093
- var import_client22 = require("@apollo/client");
1094
- var RELATION_DATES_FRAGMENT = import_client22.gql`
1274
+ var import_client27 = require("@apollo/client");
1275
+ var RELATION_DATES_FRAGMENT = import_client27.gql`
1095
1276
  fragment RelationDates on RelationDateType {
1096
1277
  lastUpdateBy
1097
1278
  paymentReference
@@ -1105,7 +1286,7 @@ var RELATION_DATES_FRAGMENT = import_client22.gql`
1105
1286
  status
1106
1287
  }
1107
1288
  `;
1108
- var RELATION_FIELDS_FRAGMENT = import_client22.gql`
1289
+ var RELATION_FIELDS_FRAGMENT = import_client27.gql`
1109
1290
  fragment RelationFields on RelationType {
1110
1291
  _id
1111
1292
  apiMessage
@@ -1122,7 +1303,7 @@ var RELATION_FIELDS_FRAGMENT = import_client22.gql`
1122
1303
  }
1123
1304
  ${RELATION_DATES_FRAGMENT}
1124
1305
  `;
1125
- var GET_RELATION = import_client22.gql`
1306
+ var GET_RELATION = import_client27.gql`
1126
1307
  query getRelation($id: ID!) {
1127
1308
  relation(_id: $id) {
1128
1309
  ...RelationFields
@@ -1130,7 +1311,7 @@ var GET_RELATION = import_client22.gql`
1130
1311
  }
1131
1312
  ${RELATION_FIELDS_FRAGMENT}
1132
1313
  `;
1133
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client22.gql`
1314
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
1134
1315
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
1135
1316
  relationByMarketAndStallholder(
1136
1317
  marketId: $marketId
@@ -1141,7 +1322,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client22.gql`
1141
1322
  }
1142
1323
  ${RELATION_FIELDS_FRAGMENT}
1143
1324
  `;
1144
- var GET_MARKET_RELATIONS = import_client22.gql`
1325
+ var GET_MARKET_RELATIONS = import_client27.gql`
1145
1326
  query getMarketRelations($marketId: ID!) {
1146
1327
  marketRelations(marketId: $marketId) {
1147
1328
  ...RelationFields
@@ -1149,7 +1330,7 @@ var GET_MARKET_RELATIONS = import_client22.gql`
1149
1330
  }
1150
1331
  ${RELATION_FIELDS_FRAGMENT}
1151
1332
  `;
1152
- var GET_STALLHOLDER_RELATIONS = import_client22.gql`
1333
+ var GET_STALLHOLDER_RELATIONS = import_client27.gql`
1153
1334
  query getStallholderRelations($stallholderId: ID!) {
1154
1335
  stallholderRelations(stallholderId: $stallholderId) {
1155
1336
  ...RelationFields
@@ -1157,7 +1338,7 @@ var GET_STALLHOLDER_RELATIONS = import_client22.gql`
1157
1338
  }
1158
1339
  ${RELATION_FIELDS_FRAGMENT}
1159
1340
  `;
1160
- var GET_RESOURCE_CONNECTIONS = import_client22.gql`
1341
+ var GET_RESOURCE_CONNECTIONS = import_client27.gql`
1161
1342
  query getResourceConnections(
1162
1343
  $resourceId: ID!
1163
1344
  $resourceType: ResourceTypeEnum!
@@ -1260,7 +1441,7 @@ var GET_RESOURCE_CONNECTIONS = import_client22.gql`
1260
1441
  `;
1261
1442
 
1262
1443
  // src/graphql/mutations/relation.ts
1263
- var CREATE_RELATION_MUTATION = import_client23.gql`
1444
+ var CREATE_RELATION_MUTATION = import_client28.gql`
1264
1445
  mutation createRelation($input: RelationInputType!) {
1265
1446
  createRelation(input: $input) {
1266
1447
  ...RelationFields
@@ -1268,7 +1449,7 @@ var CREATE_RELATION_MUTATION = import_client23.gql`
1268
1449
  }
1269
1450
  ${RELATION_FIELDS_FRAGMENT}
1270
1451
  `;
1271
- var UPDATE_RELATION_MUTATION = import_client23.gql`
1452
+ var UPDATE_RELATION_MUTATION = import_client28.gql`
1272
1453
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
1273
1454
  updateRelation(_id: $_id, input: $input) {
1274
1455
  ...RelationFields
@@ -1276,7 +1457,7 @@ var UPDATE_RELATION_MUTATION = import_client23.gql`
1276
1457
  }
1277
1458
  ${RELATION_FIELDS_FRAGMENT}
1278
1459
  `;
1279
- var DELETE_RELATION_MUTATION = import_client23.gql`
1460
+ var DELETE_RELATION_MUTATION = import_client28.gql`
1280
1461
  mutation deleteRelation($_id: ID!) {
1281
1462
  deleteRelation(_id: $_id) {
1282
1463
  ...RelationFields
@@ -1288,7 +1469,7 @@ var DELETE_RELATION_MUTATION = import_client23.gql`
1288
1469
  // src/graphql/hooks/relation/hooksMutation.ts
1289
1470
  var fetchPolicy = "no-cache";
1290
1471
  var useCreateRelation = () => {
1291
- const [createRelation, { loading, error }] = (0, import_client24.useMutation)(
1472
+ const [createRelation, { loading, error }] = (0, import_client29.useMutation)(
1292
1473
  CREATE_RELATION_MUTATION,
1293
1474
  {
1294
1475
  awaitRefetchQueries: true,
@@ -1340,7 +1521,7 @@ var useCreateRelation = () => {
1340
1521
  return { createRelation, error, loading };
1341
1522
  };
1342
1523
  var useUpdateRelation = () => {
1343
- const [updateRelation, { loading, error }] = (0, import_client24.useMutation)(
1524
+ const [updateRelation, { loading, error }] = (0, import_client29.useMutation)(
1344
1525
  UPDATE_RELATION_MUTATION,
1345
1526
  {
1346
1527
  awaitRefetchQueries: true,
@@ -1388,7 +1569,7 @@ var useUpdateRelation = () => {
1388
1569
  return { error, loading, updateRelation };
1389
1570
  };
1390
1571
  var useDeleteRelation = () => {
1391
- const [deleteRelation, { loading, error }] = (0, import_client24.useMutation)(
1572
+ const [deleteRelation, { loading, error }] = (0, import_client29.useMutation)(
1392
1573
  DELETE_RELATION_MUTATION,
1393
1574
  {
1394
1575
  awaitRefetchQueries: true,
@@ -1436,9 +1617,9 @@ var useDeleteRelation = () => {
1436
1617
  };
1437
1618
 
1438
1619
  // src/graphql/hooks/relation/hooksQuery.ts
1439
- var import_client25 = require("@apollo/client");
1620
+ var import_client30 = require("@apollo/client");
1440
1621
  var useGetRelation = (id) => {
1441
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_RELATION, {
1622
+ const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RELATION, {
1442
1623
  fetchPolicy: "network-only",
1443
1624
  skip: id === "",
1444
1625
  variables: { id }
@@ -1447,7 +1628,7 @@ var useGetRelation = (id) => {
1447
1628
  return { error, loading, refetch, relation };
1448
1629
  };
1449
1630
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1450
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(
1631
+ const { loading, error, data, refetch } = (0, import_client30.useQuery)(
1451
1632
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
1452
1633
  {
1453
1634
  fetchPolicy: "network-only",
@@ -1459,7 +1640,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
1459
1640
  return { error, loading, refetch, relationByMarketAndStallholder };
1460
1641
  };
1461
1642
  var useGetMarketRelations = (marketId) => {
1462
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_MARKET_RELATIONS, {
1643
+ const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_MARKET_RELATIONS, {
1463
1644
  fetchPolicy: "network-only",
1464
1645
  skip: marketId === "",
1465
1646
  variables: { marketId }
@@ -1468,7 +1649,7 @@ var useGetMarketRelations = (marketId) => {
1468
1649
  return { error, loading, marketRelations, refetch };
1469
1650
  };
1470
1651
  var useGetStallholderRelations = (stallholderId) => {
1471
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(
1652
+ const { loading, error, data, refetch } = (0, import_client30.useQuery)(
1472
1653
  GET_STALLHOLDER_RELATIONS,
1473
1654
  {
1474
1655
  fetchPolicy: "network-only",
@@ -1480,7 +1661,7 @@ var useGetStallholderRelations = (stallholderId) => {
1480
1661
  return { error, loading, refetch, stallholderRelations };
1481
1662
  };
1482
1663
  var useGetResourceConnections = (resourceId, resourceType) => {
1483
- const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_RESOURCE_CONNECTIONS, {
1664
+ const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RESOURCE_CONNECTIONS, {
1484
1665
  fetchPolicy: "network-only",
1485
1666
  variables: { resourceId, resourceType }
1486
1667
  });
@@ -1489,11 +1670,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
1489
1670
  };
1490
1671
 
1491
1672
  // src/graphql/hooks/stallholder/hooksMutation.ts
1492
- var import_client27 = require("@apollo/client");
1673
+ var import_client32 = require("@apollo/client");
1493
1674
 
1494
1675
  // src/graphql/mutations/stallholder.ts
1495
- var import_client26 = require("@apollo/client");
1496
- var CREATE_STALLHOLDER_MUTATION = import_client26.gql`
1676
+ var import_client31 = require("@apollo/client");
1677
+ var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
1497
1678
  mutation createStallholder($input: StallholderInputType!) {
1498
1679
  createStallholder(input: $input) {
1499
1680
  ...StallholderFields
@@ -1501,7 +1682,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client26.gql`
1501
1682
  }
1502
1683
  ${STALLHOLDER}
1503
1684
  `;
1504
- var UPDATE_STALLHOLDER_MUTATION = import_client26.gql`
1685
+ var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
1505
1686
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
1506
1687
  updateStallholder(_id: $_id, input: $input) {
1507
1688
  ...StallholderFields
@@ -1509,12 +1690,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client26.gql`
1509
1690
  }
1510
1691
  ${STALLHOLDER}
1511
1692
  `;
1512
- var DELETE_STALLHOLDER_MUTATION = import_client26.gql`
1693
+ var DELETE_STALLHOLDER_MUTATION = import_client31.gql`
1513
1694
  mutation deleteStallholder($_id: ID!) {
1514
1695
  deleteStallholder(_id: $_id)
1515
1696
  }
1516
1697
  `;
1517
- var CREATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
1698
+ var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1518
1699
  mutation createStallholderInfo($input: StallholderInfoInputType!) {
1519
1700
  createStallholderInfo(input: $input) {
1520
1701
  ...StallholderInfoFields
@@ -1522,7 +1703,7 @@ var CREATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
1522
1703
  }
1523
1704
  ${STALLHOLDER_INFO}
1524
1705
  `;
1525
- var UPDATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
1706
+ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
1526
1707
  mutation updateStallholderInfo($_id: ID!, $input: StallholderInfoInputType!) {
1527
1708
  updateStallholderInfo(_id: $_id, input: $input) {
1528
1709
  ...StallholderInfoFields
@@ -1533,7 +1714,7 @@ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
1533
1714
 
1534
1715
  // src/graphql/hooks/stallholder/hooksMutation.ts
1535
1716
  var useCreateStallholder = () => {
1536
- const [createStallholder, { loading, error }] = (0, import_client27.useMutation)(
1717
+ const [createStallholder, { loading, error }] = (0, import_client32.useMutation)(
1537
1718
  CREATE_STALLHOLDER_MUTATION,
1538
1719
  {
1539
1720
  awaitRefetchQueries: true,
@@ -1545,7 +1726,7 @@ var useCreateStallholder = () => {
1545
1726
  return { createStallholder, error, loading };
1546
1727
  };
1547
1728
  var useUpdateStallholder = () => {
1548
- const [updateStallholder, { loading, error }] = (0, import_client27.useMutation)(
1729
+ const [updateStallholder, { loading, error }] = (0, import_client32.useMutation)(
1549
1730
  UPDATE_STALLHOLDER_MUTATION,
1550
1731
  {
1551
1732
  awaitRefetchQueries: true,
@@ -1557,7 +1738,7 @@ var useUpdateStallholder = () => {
1557
1738
  return { error, loading, updateStallholder };
1558
1739
  };
1559
1740
  var useDeleteStallholder = () => {
1560
- const [deleteStallholder, { loading, error }] = (0, import_client27.useMutation)(
1741
+ const [deleteStallholder, { loading, error }] = (0, import_client32.useMutation)(
1561
1742
  DELETE_STALLHOLDER_MUTATION,
1562
1743
  {
1563
1744
  awaitRefetchQueries: true,
@@ -1569,7 +1750,7 @@ var useDeleteStallholder = () => {
1569
1750
  return { deleteStallholder, error, loading };
1570
1751
  };
1571
1752
  var useCreateStallholderInfo = () => {
1572
- const [createStallholderInfo, { loading, error }] = (0, import_client27.useMutation)(
1753
+ const [createStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
1573
1754
  CREATE_STALLHOLDER_INFO_MUTATION,
1574
1755
  {
1575
1756
  awaitRefetchQueries: true,
@@ -1593,7 +1774,7 @@ var useCreateStallholderInfo = () => {
1593
1774
  return { createStallholderInfo, error, loading };
1594
1775
  };
1595
1776
  var useUpdateStallholderInfo = () => {
1596
- const [updateStallholderInfo, { loading, error }] = (0, import_client27.useMutation)(
1777
+ const [updateStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
1597
1778
  UPDATE_STALLHOLDER_INFO_MUTATION,
1598
1779
  {
1599
1780
  awaitRefetchQueries: true,
@@ -1614,9 +1795,9 @@ var useUpdateStallholderInfo = () => {
1614
1795
  };
1615
1796
 
1616
1797
  // src/graphql/hooks/stallholder/hooksQuery.ts
1617
- var import_client28 = require("@apollo/client");
1798
+ var import_client33 = require("@apollo/client");
1618
1799
  var useGetStallholders = () => {
1619
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDERS, {
1800
+ const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDERS, {
1620
1801
  fetchPolicy: "network-only"
1621
1802
  });
1622
1803
  const stallholders = data?.stallholders;
@@ -1628,7 +1809,7 @@ var useGetStallholders = () => {
1628
1809
  };
1629
1810
  };
1630
1811
  var useGetStallholder = (_id) => {
1631
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDER, {
1812
+ const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER, {
1632
1813
  fetchPolicy: "network-only",
1633
1814
  skip: !_id,
1634
1815
  variables: { _id }
@@ -1637,7 +1818,7 @@ var useGetStallholder = (_id) => {
1637
1818
  return { error, loading, refetch, stallholder };
1638
1819
  };
1639
1820
  var useGetStallholdersByRegion = (region) => {
1640
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(
1821
+ const { loading, error, data, refetch } = (0, import_client33.useQuery)(
1641
1822
  GET_STALLHOLDERS_BY_REGION,
1642
1823
  {
1643
1824
  fetchPolicy: "no-cache",
@@ -1649,7 +1830,7 @@ var useGetStallholdersByRegion = (region) => {
1649
1830
  return { error, loading, refetch, stallholdersByRegion };
1650
1831
  };
1651
1832
  var useSearchStallholders = (search, region) => {
1652
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(SEARCH_STALLHOLDERS, {
1833
+ const { loading, error, data, refetch } = (0, import_client33.useQuery)(SEARCH_STALLHOLDERS, {
1653
1834
  fetchPolicy: "network-only",
1654
1835
  skip: search.length < 3,
1655
1836
  variables: { region, search }
@@ -1658,7 +1839,7 @@ var useSearchStallholders = (search, region) => {
1658
1839
  return { error, loading, refetch, stallholderSearch };
1659
1840
  };
1660
1841
  var useGetStallholderInfo = (stallholderId) => {
1661
- const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDER_INFO, {
1842
+ const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER_INFO, {
1662
1843
  fetchPolicy: "network-only",
1663
1844
  skip: !stallholderId,
1664
1845
  variables: { stallholderId }
@@ -1673,14 +1854,14 @@ var useGetStallholderInfo = (stallholderId) => {
1673
1854
  };
1674
1855
 
1675
1856
  // src/graphql/hooks/testers/hooksMutation.ts
1676
- var import_client31 = require("@apollo/client");
1857
+ var import_client36 = require("@apollo/client");
1677
1858
 
1678
1859
  // src/graphql/mutations/testers.ts
1679
- var import_client30 = require("@apollo/client");
1860
+ var import_client35 = require("@apollo/client");
1680
1861
 
1681
1862
  // src/graphql/queries/testers.ts
1682
- var import_client29 = require("@apollo/client");
1683
- var TESTER_FIELDS_FRAGMENT = import_client29.gql`
1863
+ var import_client34 = require("@apollo/client");
1864
+ var TESTER_FIELDS_FRAGMENT = import_client34.gql`
1684
1865
  fragment TesterFields on TesterType {
1685
1866
  _id
1686
1867
  active
@@ -1693,7 +1874,7 @@ var TESTER_FIELDS_FRAGMENT = import_client29.gql`
1693
1874
  updatedAt
1694
1875
  }
1695
1876
  `;
1696
- var GET_TESTERS = import_client29.gql`
1877
+ var GET_TESTERS = import_client34.gql`
1697
1878
  query getTesters {
1698
1879
  testers {
1699
1880
  ...TesterFields
@@ -1701,7 +1882,7 @@ var GET_TESTERS = import_client29.gql`
1701
1882
  }
1702
1883
  ${TESTER_FIELDS_FRAGMENT}
1703
1884
  `;
1704
- var GET_TESTER = import_client29.gql`
1885
+ var GET_TESTER = import_client34.gql`
1705
1886
  query getTester($_id: ID!) {
1706
1887
  tester(_id: $_id) {
1707
1888
  ...TesterFields
@@ -1711,7 +1892,7 @@ var GET_TESTER = import_client29.gql`
1711
1892
  `;
1712
1893
 
1713
1894
  // src/graphql/mutations/testers.ts
1714
- var CREATE_TESTER_MUTATION = import_client30.gql`
1895
+ var CREATE_TESTER_MUTATION = import_client35.gql`
1715
1896
  mutation createTester($input: TesterInputType!) {
1716
1897
  createTester(input: $input) {
1717
1898
  ...TesterFields
@@ -1719,7 +1900,7 @@ var CREATE_TESTER_MUTATION = import_client30.gql`
1719
1900
  }
1720
1901
  ${TESTER_FIELDS_FRAGMENT}
1721
1902
  `;
1722
- var UPDATE_TESTER_MUTATION = import_client30.gql`
1903
+ var UPDATE_TESTER_MUTATION = import_client35.gql`
1723
1904
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
1724
1905
  updateTester(_id: $_id, input: $input) {
1725
1906
  ...TesterFields
@@ -1727,7 +1908,7 @@ var UPDATE_TESTER_MUTATION = import_client30.gql`
1727
1908
  }
1728
1909
  ${TESTER_FIELDS_FRAGMENT}
1729
1910
  `;
1730
- var DELETE_TESTER_MUTATION = import_client30.gql`
1911
+ var DELETE_TESTER_MUTATION = import_client35.gql`
1731
1912
  mutation deleteTester($_id: ID!) {
1732
1913
  deleteTester(_id: $_id)
1733
1914
  }
@@ -1735,7 +1916,7 @@ var DELETE_TESTER_MUTATION = import_client30.gql`
1735
1916
 
1736
1917
  // src/graphql/hooks/testers/hooksMutation.ts
1737
1918
  var useCreateTester = () => {
1738
- const [createTester, { data, loading, error }] = (0, import_client31.useMutation)(
1919
+ const [createTester, { data, loading, error }] = (0, import_client36.useMutation)(
1739
1920
  CREATE_TESTER_MUTATION
1740
1921
  );
1741
1922
  return {
@@ -1746,7 +1927,7 @@ var useCreateTester = () => {
1746
1927
  };
1747
1928
  };
1748
1929
  var useUpdateTester = () => {
1749
- const [updateTester, { data, loading, error }] = (0, import_client31.useMutation)(
1930
+ const [updateTester, { data, loading, error }] = (0, import_client36.useMutation)(
1750
1931
  UPDATE_TESTER_MUTATION
1751
1932
  );
1752
1933
  return {
@@ -1757,16 +1938,16 @@ var useUpdateTester = () => {
1757
1938
  };
1758
1939
  };
1759
1940
  var useDeleteTester = () => {
1760
- const [deleteTester, { loading, error }] = (0, import_client31.useMutation)(
1941
+ const [deleteTester, { loading, error }] = (0, import_client36.useMutation)(
1761
1942
  DELETE_TESTER_MUTATION
1762
1943
  );
1763
1944
  return { deleteTester, error, loading };
1764
1945
  };
1765
1946
 
1766
1947
  // src/graphql/hooks/testers/hooksQuery.ts
1767
- var import_client32 = require("@apollo/client");
1948
+ var import_client37 = require("@apollo/client");
1768
1949
  var useGetTesters = () => {
1769
- const { data, loading, error, refetch } = (0, import_client32.useQuery)(GET_TESTERS);
1950
+ const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTERS);
1770
1951
  const testers = data?.testers;
1771
1952
  return {
1772
1953
  error,
@@ -1776,7 +1957,7 @@ var useGetTesters = () => {
1776
1957
  };
1777
1958
  };
1778
1959
  var useGetTester = (_id) => {
1779
- const { data, loading, error, refetch } = (0, import_client32.useQuery)(GET_TESTER, {
1960
+ const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTER, {
1780
1961
  skip: !_id,
1781
1962
  variables: { _id }
1782
1963
  });
@@ -1785,11 +1966,11 @@ var useGetTester = (_id) => {
1785
1966
  };
1786
1967
 
1787
1968
  // src/graphql/hooks/user/hooksMutation.ts
1788
- var import_client34 = require("@apollo/client");
1969
+ var import_client39 = require("@apollo/client");
1789
1970
 
1790
1971
  // src/graphql/mutations/user.ts
1791
- var import_client33 = require("@apollo/client");
1792
- var CREATE_USER_MUTATION = import_client33.gql`
1972
+ var import_client38 = require("@apollo/client");
1973
+ var CREATE_USER_MUTATION = import_client38.gql`
1793
1974
  mutation createUser($input: UserInputType!) {
1794
1975
  createUser(input: $input) {
1795
1976
  ...UserFields
@@ -1797,7 +1978,7 @@ var CREATE_USER_MUTATION = import_client33.gql`
1797
1978
  }
1798
1979
  ${USER_FIELDS_FRAGMENT}
1799
1980
  `;
1800
- var UPDATE_USER_MUTATION = import_client33.gql`
1981
+ var UPDATE_USER_MUTATION = import_client38.gql`
1801
1982
  mutation updateUser($_id: ID!, $input: UserInputType!) {
1802
1983
  updateUser(_id: $_id, input: $input) {
1803
1984
  ...UserFields
@@ -1805,12 +1986,12 @@ var UPDATE_USER_MUTATION = import_client33.gql`
1805
1986
  }
1806
1987
  ${USER_FIELDS_FRAGMENT}
1807
1988
  `;
1808
- var DELETE_USER_MUTATION = import_client33.gql`
1989
+ var DELETE_USER_MUTATION = import_client38.gql`
1809
1990
  mutation deleteUser($_id: ID!) {
1810
1991
  deleteUser(_id: $_id)
1811
1992
  }
1812
1993
  `;
1813
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client33.gql`
1994
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
1814
1995
  mutation addUserFavouriteResource(
1815
1996
  $resourceId: ID!
1816
1997
  $resourceType: ResourceTypeEnum!
@@ -1826,7 +2007,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client33.gql`
1826
2007
  }
1827
2008
  ${USER_FIELDS_FRAGMENT}
1828
2009
  `;
1829
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client33.gql`
2010
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
1830
2011
  mutation removeUserFavouriteResource(
1831
2012
  $resourceId: ID!
1832
2013
  $resourceType: ResourceTypeEnum!
@@ -1845,11 +2026,11 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client33.gql`
1845
2026
 
1846
2027
  // src/graphql/hooks/user/hooksMutation.ts
1847
2028
  var useCreateUser = () => {
1848
- const [createUser, { loading, error }] = (0, import_client34.useMutation)(CREATE_USER_MUTATION);
2029
+ const [createUser, { loading, error }] = (0, import_client39.useMutation)(CREATE_USER_MUTATION);
1849
2030
  return { createUser, error, loading };
1850
2031
  };
1851
2032
  var useUpdateUser = () => {
1852
- const [updateUser, { loading, error }] = (0, import_client34.useMutation)(UPDATE_USER_MUTATION, {
2033
+ const [updateUser, { loading, error }] = (0, import_client39.useMutation)(UPDATE_USER_MUTATION, {
1853
2034
  awaitRefetchQueries: true,
1854
2035
  refetchQueries: (mutationResult) => {
1855
2036
  const userId = mutationResult?.data?.updateUser?._id;
@@ -1860,11 +2041,11 @@ var useUpdateUser = () => {
1860
2041
  return { error, loading, updateUser };
1861
2042
  };
1862
2043
  var useDeleteUser = () => {
1863
- const [deleteUser, { loading, error }] = (0, import_client34.useMutation)(DELETE_USER_MUTATION);
2044
+ const [deleteUser, { loading, error }] = (0, import_client39.useMutation)(DELETE_USER_MUTATION);
1864
2045
  return { deleteUser, error, loading };
1865
2046
  };
1866
2047
  var useAddUserFavouriteResource = () => {
1867
- const [addUserFavouriteResource, { loading, error }] = (0, import_client34.useMutation)(
2048
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
1868
2049
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
1869
2050
  {
1870
2051
  awaitRefetchQueries: true,
@@ -1874,7 +2055,7 @@ var useAddUserFavouriteResource = () => {
1874
2055
  return { addUserFavouriteResource, error, loading };
1875
2056
  };
1876
2057
  var useRemoveUserFavouriteResource = () => {
1877
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client34.useMutation)(
2058
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
1878
2059
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
1879
2060
  {
1880
2061
  awaitRefetchQueries: true,
@@ -1885,37 +2066,37 @@ var useRemoveUserFavouriteResource = () => {
1885
2066
  };
1886
2067
 
1887
2068
  // src/graphql/hooks/user/hooksQuery.ts
1888
- var import_client35 = require("@apollo/client");
2069
+ var import_client40 = require("@apollo/client");
1889
2070
  var useGetUsers = () => {
1890
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USERS, {
2071
+ const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USERS, {
1891
2072
  fetchPolicy: "network-only"
1892
2073
  });
1893
2074
  const users = data?.users;
1894
2075
  return { error, loading, refetch, users };
1895
2076
  };
1896
2077
  var useGetUser = (_id) => {
1897
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER, {
2078
+ const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER, {
1898
2079
  variables: { _id }
1899
2080
  });
1900
2081
  const user = data?.user;
1901
2082
  return { error, loading, refetch, user };
1902
2083
  };
1903
2084
  var useGetUserMarkets = () => {
1904
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER_MARKETS, {
2085
+ const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_MARKETS, {
1905
2086
  fetchPolicy: "network-only"
1906
2087
  });
1907
2088
  const userMarkets = data?.userMarkets;
1908
2089
  return { error, loading, refetch, userMarkets };
1909
2090
  };
1910
2091
  var useGetUserStallholder = () => {
1911
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER_STALLHOLDER, {
2092
+ const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_STALLHOLDER, {
1912
2093
  fetchPolicy: "network-only"
1913
2094
  });
1914
2095
  const userStallholder = data?.userStallholder;
1915
2096
  return { error, loading, refetch, userStallholder };
1916
2097
  };
1917
2098
  var useGetUserFavourites = () => {
1918
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER_FAVOURITES, {
2099
+ const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_FAVOURITES, {
1919
2100
  fetchPolicy: "network-only"
1920
2101
  });
1921
2102
  const markets = data?.userFavourites.markets;
@@ -1926,133 +2107,18 @@ var useGetUserFavourites = () => {
1926
2107
  };
1927
2108
  return { error, loading, refetch, userFavourites };
1928
2109
  };
1929
- var useGetUserNotifications = () => {
1930
- const { loading, error, data, refetch } = (0, import_client35.useQuery)(GET_USER_NOTIFICATIONS, {
1931
- fetchPolicy: "network-only"
1932
- });
1933
- const userNotifications = data?.userNotifications;
1934
- return { error, loading, refetch, userNotifications };
1935
- };
1936
-
1937
- // src/graphql/queries/notificationQueries.ts
1938
- var import_client36 = require("@apollo/client");
1939
- var GET_USER_NOTIFICATIONS2 = import_client36.gql`
1940
- query GetUserNotifications(
1941
- $userId: String!
1942
- $limit: Int
1943
- $offset: Int
1944
- $isRead: String
1945
- ) {
1946
- userNotifications(
1947
- userId: $userId
1948
- limit: $limit
1949
- offset: $offset
1950
- isRead: $isRead
1951
- ) {
1952
- id
1953
- userId
1954
- title
1955
- message
1956
- type
1957
- isRead
1958
- data
1959
- createdAt
1960
- updatedAt
1961
- }
1962
- }
1963
- `;
1964
- var GET_NOTIFICATION_COUNT = import_client36.gql`
1965
- query GetNotificationCount($userId: String!) {
1966
- notificationCount(userId: $userId) {
1967
- total
1968
- unread
1969
- }
1970
- }
1971
- `;
1972
- var GET_UNREAD_NOTIFICATIONS = import_client36.gql`
1973
- query GetUnreadNotifications($userId: String!, $limit: Int) {
1974
- unreadNotifications(userId: $userId, limit: $limit) {
1975
- id
1976
- userId
1977
- title
1978
- message
1979
- type
1980
- isRead
1981
- data
1982
- createdAt
1983
- updatedAt
1984
- }
1985
- }
1986
- `;
1987
-
1988
- // src/graphql/mutations/notificationMutations.ts
1989
- var import_client37 = require("@apollo/client");
1990
- var CREATE_NOTIFICATION = import_client37.gql`
1991
- mutation CreateNotification($input: CreateNotificationInput!) {
1992
- createNotification(input: $input) {
1993
- id
1994
- userId
1995
- title
1996
- message
1997
- type
1998
- isRead
1999
- data
2000
- createdAt
2001
- updatedAt
2002
- }
2003
- }
2004
- `;
2005
- var CREATE_BULK_NOTIFICATIONS = import_client37.gql`
2006
- mutation CreateBulkNotifications($input: CreateBulkNotificationInput!) {
2007
- createBulkNotifications(input: $input) {
2008
- id
2009
- userId
2010
- title
2011
- message
2012
- type
2013
- isRead
2014
- data
2015
- createdAt
2016
- updatedAt
2017
- }
2018
- }
2019
- `;
2020
- var MARK_NOTIFICATION_READ = import_client37.gql`
2021
- mutation MarkNotificationRead($input: MarkNotificationReadInput!) {
2022
- markNotificationRead(input: $input) {
2023
- id
2024
- userId
2025
- title
2026
- message
2027
- type
2028
- isRead
2029
- data
2030
- createdAt
2031
- updatedAt
2032
- }
2033
- }
2034
- `;
2035
- var MARK_ALL_NOTIFICATIONS_READ = import_client37.gql`
2036
- mutation MarkAllNotificationsRead($input: MarkAllNotificationsReadInput!) {
2037
- markAllNotificationsRead(input: $input)
2038
- }
2039
- `;
2040
2110
  // Annotate the CommonJS export names for ESM import in node:
2041
2111
  0 && (module.exports = {
2042
- CREATE_BULK_NOTIFICATIONS,
2043
- CREATE_NOTIFICATION,
2044
- GET_NOTIFICATION_COUNT,
2045
- GET_UNREAD_NOTIFICATIONS,
2046
- GET_USER_NOTIFICATIONS,
2047
- MARK_ALL_NOTIFICATIONS_READ,
2048
- MARK_NOTIFICATION_READ,
2112
+ GET_CHAT_MESSAGE,
2049
2113
  useAddParticipantToChat,
2050
2114
  useAddUserFavouriteResource,
2051
2115
  useAdminUpdateResourceType,
2052
2116
  useContactUs,
2117
+ useCreateBulkNotifications,
2053
2118
  useCreateChat,
2054
2119
  useCreateMarket,
2055
2120
  useCreateMarketInfo,
2121
+ useCreateNotification,
2056
2122
  useCreatePoster,
2057
2123
  useCreatePushToken,
2058
2124
  useCreateRelation,
@@ -2067,12 +2133,14 @@ var MARK_ALL_NOTIFICATIONS_READ = import_client37.gql`
2067
2133
  useDeleteTester,
2068
2134
  useDeleteUser,
2069
2135
  useGetChat,
2136
+ useGetChatSubscription,
2070
2137
  useGetMarket,
2071
2138
  useGetMarketInfo,
2072
2139
  useGetMarketRelations,
2073
2140
  useGetMarkets,
2074
2141
  useGetMarketsByRegion,
2075
2142
  useGetMarketsNearMe,
2143
+ useGetNotificationCount,
2076
2144
  useGetRelation,
2077
2145
  useGetRelationByMarketAndStallholder,
2078
2146
  useGetResourceConnections,
@@ -2083,6 +2151,7 @@ var MARK_ALL_NOTIFICATIONS_READ = import_client37.gql`
2083
2151
  useGetStallholdersByRegion,
2084
2152
  useGetTester,
2085
2153
  useGetTesters,
2154
+ useGetUnreadNotifications,
2086
2155
  useGetUser,
2087
2156
  useGetUserChats,
2088
2157
  useGetUserFavourites,
@@ -2092,6 +2161,8 @@ var MARK_ALL_NOTIFICATIONS_READ = import_client37.gql`
2092
2161
  useGetUsers,
2093
2162
  useLogin,
2094
2163
  useLogout,
2164
+ useMarkAllNotificationsRead,
2165
+ useMarkNotificationRead,
2095
2166
  useRefreshToken,
2096
2167
  useRegister,
2097
2168
  useRemoveParticipantFromChat,