@timardex/cluemart-shared 1.2.69 → 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-BijiW7Nn.d.ts → ad-DIpc7lyr.d.ts} +1 -1
  2. package/dist/{ad-DITy2OMe.d.mts → ad-_p1gmLNT.d.mts} +1 -1
  3. package/dist/{auth-iE9sd_mq.d.ts → auth-Bjqk92cx.d.ts} +1 -1
  4. package/dist/{auth-DCIrfDwB.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-DhZY519g.d.mts → global-B0AzhgkH.d.mts} +7 -13
  12. package/dist/{global-08vcDEuE.d.ts → global-BH6qrlBv.d.ts} +7 -13
  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 +15 -6
  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 +15 -6
  24. package/dist/hooks/index.mjs.map +1 -1
  25. package/dist/index.cjs +794 -684
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.mts +463 -221
  28. package/dist/index.d.ts +463 -221
  29. package/dist/index.mjs +593 -483
  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
@@ -1,7 +1,7 @@
1
1
  import "../chunk-DBRBH6GO.mjs";
2
2
 
3
3
  // src/graphql/hooks/admin/hooksMutation.ts
4
- import { useMutation } from "@apollo/client";
4
+ import { useMutation } from "@apollo/client/react";
5
5
 
6
6
  // src/graphql/mutations/admin.ts
7
7
  import { gql } from "@apollo/client";
@@ -82,6 +82,13 @@ var TERMS_AGREEMENT_FIELDS_FRAGMENT = gql2`
82
82
  timestamp
83
83
  }
84
84
  `;
85
+ var LICENCE_FIELDS_FRAGMENT = gql2`
86
+ fragment LicenceFields on LicenceType {
87
+ expiryDate
88
+ issuedDate
89
+ licenceType
90
+ }
91
+ `;
85
92
  var USER_ACTIVITY_FIELDS_FRAGMENT = gql2`
86
93
  fragment UserActivityFields on UserActivityType {
87
94
  favourites {
@@ -131,7 +138,9 @@ var USER_FIELDS_FRAGMENT = gql2`
131
138
  firstName
132
139
  isTester
133
140
  lastName
134
- licences
141
+ licences {
142
+ ...LicenceFields
143
+ }
135
144
  platform
136
145
  preferredRegion
137
146
  refreshToken
@@ -149,6 +158,7 @@ var USER_FIELDS_FRAGMENT = gql2`
149
158
  ${ASSOCIATES_FIELDS_FRAGMENT}
150
159
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
151
160
  ${USER_ACTIVITY_FIELDS_FRAGMENT}
161
+ ${LICENCE_FIELDS_FRAGMENT}
152
162
  `;
153
163
  var STALL_TYPE_FIELDS_FRAGMENT = gql2`
154
164
  fragment StallTypeFields on StallTypeType {
@@ -567,25 +577,22 @@ var GET_VENDOR_INFO = gql4`
567
577
 
568
578
  // src/graphql/hooks/admin/hooksMutation.ts
569
579
  var useAdminUpdateResourceType = () => {
570
- const [adminUpdateResourceType, { loading, error }] = useMutation(
571
- ADMIN_UPDATE_RESOURCE_TYPE_MUTATION,
572
- {
573
- awaitRefetchQueries: true,
574
- refetchQueries: (mutationResult) => {
575
- const adminUpdateResourceType2 = mutationResult?.data?.adminUpdateResourceType;
576
- const resourceId = adminUpdateResourceType2?.resourceId;
577
- const resourceType = adminUpdateResourceType2?.resourceType;
578
- if (!resourceId) return [];
579
- const detectQuery = resourceType === "event" /* EVENT */ ? GET_EVENT : GET_VENDOR;
580
- return [
581
- {
582
- query: detectQuery,
583
- variables: { _id: resourceId }
584
- }
585
- ];
586
- }
580
+ const [adminUpdateResourceType, { loading, error }] = useMutation(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {
581
+ awaitRefetchQueries: true,
582
+ refetchQueries: (mutationResult) => {
583
+ const adminUpdateResourceType2 = mutationResult?.data?.adminUpdateResourceType;
584
+ const resourceId = adminUpdateResourceType2?.resourceId;
585
+ const resourceType = adminUpdateResourceType2?.resourceType;
586
+ if (!resourceId) return [];
587
+ const detectQuery = resourceType === "event" /* EVENT */ ? GET_EVENT : GET_VENDOR;
588
+ return [
589
+ {
590
+ query: detectQuery,
591
+ variables: { _id: resourceId }
592
+ }
593
+ ];
587
594
  }
588
- );
595
+ });
589
596
  return {
590
597
  adminUpdateResourceType,
591
598
  error,
@@ -594,7 +601,7 @@ var useAdminUpdateResourceType = () => {
594
601
  };
595
602
 
596
603
  // src/graphql/hooks/auth.ts
597
- import { useMutation as useMutation2 } from "@apollo/client";
604
+ import { useMutation as useMutation2 } from "@apollo/client/react";
598
605
 
599
606
  // src/graphql/mutations/auth.ts
600
607
  import { gql as gql5 } from "@apollo/client";
@@ -702,7 +709,7 @@ var useResetPassword = () => {
702
709
  };
703
710
 
704
711
  // src/graphql/hooks/chat/hooksMutation.ts
705
- import { useMutation as useMutation3 } from "@apollo/client";
712
+ import { useMutation as useMutation3 } from "@apollo/client/react";
706
713
 
707
714
  // src/graphql/mutations/chat.ts
708
715
  import { gql as gql7 } from "@apollo/client";
@@ -798,21 +805,18 @@ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql7`
798
805
 
799
806
  // src/graphql/hooks/chat/hooksMutation.ts
800
807
  var useSendChatMessage = () => {
801
- const [sendChatMessage, { loading, error }] = useMutation3(
802
- SEND_CHAT_MESSAGE_MUTATION,
803
- {
804
- awaitRefetchQueries: true,
805
- refetchQueries: (mutationResult) => {
806
- const chatId = mutationResult?.data?.sendChatMessage?._id;
807
- return [
808
- {
809
- query: CHAT,
810
- variables: { _id: chatId }
811
- }
812
- ];
813
- }
808
+ const [sendChatMessage, { loading, error }] = useMutation3(SEND_CHAT_MESSAGE_MUTATION, {
809
+ awaitRefetchQueries: true,
810
+ refetchQueries: (mutationResult) => {
811
+ const chatId = mutationResult?.data?.sendChatMessage?._id;
812
+ return [
813
+ {
814
+ query: CHAT,
815
+ variables: { _id: chatId }
816
+ }
817
+ ];
814
818
  }
815
- );
819
+ });
816
820
  return { error, loading, sendChatMessage };
817
821
  };
818
822
  var useDeleteChat = () => {
@@ -823,24 +827,21 @@ var useDeleteChat = () => {
823
827
  return { deleteChat, error, loading };
824
828
  };
825
829
  var useAddParticipantToChat = () => {
826
- const [addParticipantToChat, { loading, error }] = useMutation3(
827
- ADD_PARTICIPANT_TO_CHAT_MUTATION,
828
- {
829
- awaitRefetchQueries: true,
830
- refetchQueries: (mutationResult) => {
831
- const chatId = mutationResult?.data?.addParticipantToChat?._id;
832
- return [
833
- {
834
- query: CHAT,
835
- variables: { _id: chatId }
836
- },
837
- {
838
- query: USER_CHATS
839
- }
840
- ];
841
- }
830
+ const [addParticipantToChat, { loading, error }] = useMutation3(ADD_PARTICIPANT_TO_CHAT_MUTATION, {
831
+ awaitRefetchQueries: true,
832
+ refetchQueries: (mutationResult) => {
833
+ const chatId = mutationResult?.data?.addParticipantToChat?._id;
834
+ return [
835
+ {
836
+ query: CHAT,
837
+ variables: { _id: chatId }
838
+ },
839
+ {
840
+ query: USER_CHATS
841
+ }
842
+ ];
842
843
  }
843
- );
844
+ });
844
845
  return { addParticipantToChat, error, loading };
845
846
  };
846
847
  var useRemoveParticipantFromChat = () => {
@@ -855,7 +856,7 @@ var useRemoveParticipantFromChat = () => {
855
856
  };
856
857
 
857
858
  // src/graphql/hooks/chat/hooksQuery.ts
858
- import { useQuery, useSubscription } from "@apollo/client";
859
+ import { useQuery, useSubscription } from "@apollo/client/react";
859
860
 
860
861
  // src/graphql/subscriptions/chat.ts
861
862
  import { gql as gql8 } from "@apollo/client";
@@ -879,20 +880,25 @@ var useGetChat = (_id) => {
879
880
  return { chat, error, loading, refetch };
880
881
  };
881
882
  var useGetUserChats = () => {
882
- const { loading, error, data, refetch } = useQuery(USER_CHATS, {
883
- fetchPolicy: "network-only"
884
- });
885
- const userChats = data?.userChats;
883
+ const { loading, error, data, refetch } = useQuery(
884
+ USER_CHATS,
885
+ {
886
+ fetchPolicy: "network-only"
887
+ }
888
+ );
889
+ const userChats = data?.userChats || [];
886
890
  return { error, loading, refetch, userChats };
887
891
  };
888
892
  var useGetChatSubscription = () => {
889
- const { data, loading, error } = useSubscription(GET_CHAT_MESSAGE);
893
+ const { data, loading, error } = useSubscription(
894
+ GET_CHAT_MESSAGE
895
+ );
890
896
  const chat = data?.getChat;
891
897
  return { chat, error, loading };
892
898
  };
893
899
 
894
900
  // src/graphql/hooks/contactUs.ts
895
- import { useMutation as useMutation4 } from "@apollo/client";
901
+ import { useMutation as useMutation4 } from "@apollo/client/react";
896
902
 
897
903
  // src/graphql/mutations/contactUs.ts
898
904
  import { gql as gql9 } from "@apollo/client";
@@ -911,7 +917,7 @@ var useContactUs = () => {
911
917
  };
912
918
 
913
919
  // src/graphql/hooks/event/hooksMutation.ts
914
- import { useMutation as useMutation5 } from "@apollo/client";
920
+ import { useMutation as useMutation5 } from "@apollo/client/react";
915
921
 
916
922
  // src/graphql/mutations/event.ts
917
923
  import { gql as gql10 } from "@apollo/client";
@@ -1141,73 +1147,73 @@ var useDeleteEvent = () => {
1141
1147
  return { deleteEvent, error, loading };
1142
1148
  };
1143
1149
  var useCreateEventInfo = () => {
1144
- const [createEventInfo, { loading, error }] = useMutation5(
1145
- CREATE_EVENT_INFO_MUTATION,
1146
- {
1147
- awaitRefetchQueries: true,
1148
- refetchQueries: (mutationResult) => {
1149
- const eventId = mutationResult?.data?.createEventInfo?.eventId;
1150
- if (!eventId) return [];
1151
- return [
1152
- {
1153
- query: GET_EVENT_INFO,
1154
- variables: { eventId }
1155
- // Pass the eventId for refetching
1156
- },
1157
- {
1158
- query: GET_USER_EVENTS
1159
- },
1160
- {
1161
- query: GET_EVENT,
1162
- variables: { _id: eventId }
1163
- }
1164
- ];
1165
- }
1150
+ const [createEventInfo, { loading, error }] = useMutation5(CREATE_EVENT_INFO_MUTATION, {
1151
+ awaitRefetchQueries: true,
1152
+ refetchQueries: (mutationResult) => {
1153
+ const eventId = mutationResult?.data?.createEventInfo?.eventId;
1154
+ if (!eventId) return [];
1155
+ return [
1156
+ {
1157
+ query: GET_EVENT_INFO,
1158
+ variables: { eventId }
1159
+ // Pass the eventId for refetching
1160
+ },
1161
+ {
1162
+ query: GET_USER_EVENTS
1163
+ },
1164
+ {
1165
+ query: GET_EVENT,
1166
+ variables: { _id: eventId }
1167
+ }
1168
+ ];
1166
1169
  }
1167
- );
1170
+ });
1168
1171
  return { createEventInfo, error, loading };
1169
1172
  };
1170
1173
  var useUpdateEventInfo = () => {
1171
- const [updateEventInfo, { loading, error }] = useMutation5(
1172
- UPDATE_EVENT_INFO_MUTATION,
1173
- {
1174
- awaitRefetchQueries: true,
1175
- refetchQueries: (mutationResult) => {
1176
- const eventId = mutationResult?.data?.updateEventInfo?.eventId;
1177
- if (!eventId) return [];
1178
- return [
1179
- {
1180
- query: GET_EVENT_INFO,
1181
- variables: { eventId }
1182
- // Pass the eventId for refetching
1183
- },
1184
- {
1185
- query: GET_EVENT,
1186
- variables: { _id: eventId }
1187
- // Pass the eventId for refetching
1188
- }
1189
- ];
1190
- }
1174
+ const [updateEventInfo, { loading, error }] = useMutation5(UPDATE_EVENT_INFO_MUTATION, {
1175
+ awaitRefetchQueries: true,
1176
+ refetchQueries: (mutationResult) => {
1177
+ const eventId = mutationResult?.data?.updateEventInfo?.eventId;
1178
+ if (!eventId) return [];
1179
+ return [
1180
+ {
1181
+ query: GET_EVENT_INFO,
1182
+ variables: { eventId }
1183
+ // Pass the eventId for refetching
1184
+ },
1185
+ {
1186
+ query: GET_EVENT,
1187
+ variables: { _id: eventId }
1188
+ // Pass the eventId for refetching
1189
+ }
1190
+ ];
1191
1191
  }
1192
- );
1192
+ });
1193
1193
  return { error, loading, updateEventInfo };
1194
1194
  };
1195
1195
 
1196
1196
  // src/graphql/hooks/event/hooksQuery.ts
1197
- import { useQuery as useQuery2 } from "@apollo/client";
1197
+ import { useQuery as useQuery2 } from "@apollo/client/react";
1198
1198
  var useGetEvents = () => {
1199
- const { loading, error, data, refetch } = useQuery2(GET_EVENTS, {
1200
- fetchPolicy: "network-only"
1201
- });
1202
- const events = data?.events;
1199
+ const { loading, error, data, refetch } = useQuery2(
1200
+ GET_EVENTS,
1201
+ {
1202
+ fetchPolicy: "network-only"
1203
+ }
1204
+ );
1205
+ const events = data?.events || [];
1203
1206
  return { error, events, loading, refetch };
1204
1207
  };
1205
1208
  var useGetEvent = (_id) => {
1206
- const { loading, error, data, refetch } = useQuery2(GET_EVENT, {
1207
- fetchPolicy: "network-only",
1208
- skip: !_id,
1209
- variables: { _id }
1210
- });
1209
+ const { loading, error, data, refetch } = useQuery2(
1210
+ GET_EVENT,
1211
+ {
1212
+ fetchPolicy: "network-only",
1213
+ skip: !_id,
1214
+ variables: { _id }
1215
+ }
1216
+ );
1211
1217
  const event = data?.event;
1212
1218
  return { error, event, loading, refetch };
1213
1219
  };
@@ -1217,7 +1223,7 @@ var useGetEventsByRegion = (region) => {
1217
1223
  skip: !region,
1218
1224
  variables: { region }
1219
1225
  });
1220
- const eventsByRegion = data?.eventsByRegion;
1226
+ const eventsByRegion = data?.eventsByRegion || [];
1221
1227
  return { error, eventsByRegion, loading, refetch };
1222
1228
  };
1223
1229
  var useSearchEvents = (search, region) => {
@@ -1226,7 +1232,7 @@ var useSearchEvents = (search, region) => {
1226
1232
  skip: search.length < 3,
1227
1233
  variables: { region, search }
1228
1234
  });
1229
- const eventsSearch = data?.eventsSearch;
1235
+ const eventsSearch = data?.eventsSearch || [];
1230
1236
  return { error, eventsSearch, loading, refetch };
1231
1237
  };
1232
1238
  var useGetEventsNearMe = (location) => {
@@ -1240,7 +1246,7 @@ var useGetEventsNearMe = (location) => {
1240
1246
  // Default to 10km if no radius is provided
1241
1247
  }
1242
1248
  });
1243
- const eventsNearMe = data?.eventsNearMe;
1249
+ const eventsNearMe = data?.eventsNearMe || [];
1244
1250
  return { error, eventsNearMe, loading, refetch };
1245
1251
  };
1246
1252
  var useGetEventInfo = (eventId) => {
@@ -1254,7 +1260,7 @@ var useGetEventInfo = (eventId) => {
1254
1260
  };
1255
1261
 
1256
1262
  // src/graphql/hooks/notifications/hooksMutation.ts
1257
- import { useMutation as useMutation6 } from "@apollo/client";
1263
+ import { useMutation as useMutation6 } from "@apollo/client/react";
1258
1264
 
1259
1265
  // src/graphql/mutations/notification.ts
1260
1266
  import { gql as gql14 } from "@apollo/client";
@@ -1401,7 +1407,7 @@ var useDeleteAllNotifications = () => {
1401
1407
  };
1402
1408
 
1403
1409
  // src/graphql/hooks/notifications/hooksQuery.ts
1404
- import { useQuery as useQuery3 } from "@apollo/client";
1410
+ import { useQuery as useQuery3 } from "@apollo/client/react";
1405
1411
  var useGetUserNotifications = (limit, offset) => {
1406
1412
  const { data, loading, error, refetch } = useQuery3(GET_USER_NOTIFICATIONS, {
1407
1413
  fetchPolicy: "no-cache",
@@ -1427,7 +1433,7 @@ var useGetNotificationCount = () => {
1427
1433
  };
1428
1434
 
1429
1435
  // src/graphql/hooks/notifications/hooksSubscription.ts
1430
- import { useSubscription as useSubscription2 } from "@apollo/client";
1436
+ import { useSubscription as useSubscription2 } from "@apollo/client/react";
1431
1437
 
1432
1438
  // src/graphql/subscriptions/notification.ts
1433
1439
  import { gql as gql15 } from "@apollo/client";
@@ -1473,7 +1479,7 @@ var useGetNotificationCountSubscription = () => {
1473
1479
  };
1474
1480
 
1475
1481
  // src/graphql/hooks/poster.ts
1476
- import { useMutation as useMutation7 } from "@apollo/client";
1482
+ import { useMutation as useMutation7 } from "@apollo/client/react";
1477
1483
 
1478
1484
  // src/graphql/mutations/poster.ts
1479
1485
  import { gql as gql16 } from "@apollo/client";
@@ -1501,7 +1507,7 @@ var useCreatePoster = () => {
1501
1507
  };
1502
1508
 
1503
1509
  // src/graphql/hooks/pushToken.ts
1504
- import { useMutation as useMutation8 } from "@apollo/client";
1510
+ import { useMutation as useMutation8 } from "@apollo/client/react";
1505
1511
 
1506
1512
  // src/graphql/mutations/pushToken.ts
1507
1513
  import { gql as gql17 } from "@apollo/client";
@@ -1522,7 +1528,7 @@ var useCreatePushToken = () => {
1522
1528
  };
1523
1529
 
1524
1530
  // src/graphql/hooks/relation/hooksMutation.ts
1525
- import { useMutation as useMutation9 } from "@apollo/client";
1531
+ import { useMutation as useMutation9 } from "@apollo/client/react";
1526
1532
 
1527
1533
  // src/graphql/mutations/relation.ts
1528
1534
  import { gql as gql19 } from "@apollo/client";
@@ -1624,144 +1630,135 @@ var DELETE_RELATION_MUTATION = gql19`
1624
1630
 
1625
1631
  // src/graphql/hooks/relation/hooksMutation.ts
1626
1632
  var useCreateRelation = () => {
1627
- const [createRelation, { loading, error }] = useMutation9(
1628
- CREATE_RELATION_MUTATION,
1629
- {
1630
- awaitRefetchQueries: true,
1631
- refetchQueries: (mutationResult) => {
1632
- const createRelation2 = mutationResult?.data?.createRelation;
1633
- const eventId = createRelation2?.eventId;
1634
- const vendorId = createRelation2?.vendorId;
1635
- const resourceType = createRelation2?.lastUpdateBy;
1636
- const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1637
- return [
1638
- {
1639
- query: GET_EVENT_RELATIONS,
1640
- variables: { eventId }
1641
- },
1642
- {
1643
- query: GET_EVENT,
1644
- variables: { _id: eventId }
1645
- },
1646
- {
1647
- query: GET_EVENT_INFO,
1648
- variables: { eventId }
1649
- },
1650
- {
1651
- query: GET_VENDOR_RELATIONS,
1652
- variables: { vendorId }
1653
- },
1654
- {
1655
- query: GET_VENDOR,
1656
- variables: { _id: vendorId }
1657
- },
1658
- {
1659
- query: GET_RELATION_BY_EVENT_AND_VENDOR,
1660
- variables: { eventId, vendorId }
1661
- },
1662
- {
1663
- query: GET_RESOURCE_CONNECTIONS,
1664
- variables: { resourceId, resourceType }
1665
- },
1666
- {
1667
- query: USER_CHATS
1668
- }
1669
- ];
1670
- }
1633
+ const [createRelation, { loading, error }] = useMutation9(CREATE_RELATION_MUTATION, {
1634
+ awaitRefetchQueries: true,
1635
+ refetchQueries: (mutationResult) => {
1636
+ const createRelation2 = mutationResult?.data?.createRelation;
1637
+ const eventId = createRelation2?.eventId;
1638
+ const vendorId = createRelation2?.vendorId;
1639
+ const resourceType = createRelation2?.lastUpdateBy;
1640
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1641
+ return [
1642
+ {
1643
+ query: GET_EVENT_RELATIONS,
1644
+ variables: { eventId }
1645
+ },
1646
+ {
1647
+ query: GET_EVENT,
1648
+ variables: { _id: eventId }
1649
+ },
1650
+ {
1651
+ query: GET_EVENT_INFO,
1652
+ variables: { eventId }
1653
+ },
1654
+ {
1655
+ query: GET_VENDOR_RELATIONS,
1656
+ variables: { vendorId }
1657
+ },
1658
+ {
1659
+ query: GET_VENDOR,
1660
+ variables: { _id: vendorId }
1661
+ },
1662
+ {
1663
+ query: GET_RELATION_BY_EVENT_AND_VENDOR,
1664
+ variables: { eventId, vendorId }
1665
+ },
1666
+ {
1667
+ query: GET_RESOURCE_CONNECTIONS,
1668
+ variables: { resourceId, resourceType }
1669
+ },
1670
+ {
1671
+ query: USER_CHATS
1672
+ }
1673
+ ];
1671
1674
  }
1672
- );
1675
+ });
1673
1676
  return { createRelation, error, loading };
1674
1677
  };
1675
1678
  var useUpdateRelation = () => {
1676
- const [updateRelation, { loading, error }] = useMutation9(
1677
- UPDATE_RELATION_MUTATION,
1678
- {
1679
- awaitRefetchQueries: true,
1680
- refetchQueries: (mutationResult) => {
1681
- const updateRelation2 = mutationResult?.data?.updateRelation;
1682
- const eventId = updateRelation2?.eventId;
1683
- const vendorId = updateRelation2?.vendorId;
1684
- const resourceType = updateRelation2?.lastUpdateBy;
1685
- const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1686
- return [
1687
- {
1688
- query: GET_EVENT_RELATIONS,
1689
- variables: { eventId }
1690
- },
1691
- {
1692
- query: GET_EVENT,
1693
- variables: { _id: eventId }
1694
- },
1695
- {
1696
- query: GET_EVENT_INFO,
1697
- variables: { eventId }
1698
- },
1699
- {
1700
- query: GET_VENDOR_RELATIONS,
1701
- variables: { vendorId }
1702
- },
1703
- {
1704
- query: GET_VENDOR,
1705
- variables: { _id: vendorId }
1706
- },
1707
- {
1708
- query: GET_RELATION_BY_EVENT_AND_VENDOR,
1709
- variables: { eventId, vendorId }
1710
- },
1711
- {
1712
- query: GET_RESOURCE_CONNECTIONS,
1713
- variables: { resourceId, resourceType }
1714
- }
1715
- ];
1716
- }
1679
+ const [updateRelation, { loading, error }] = useMutation9(UPDATE_RELATION_MUTATION, {
1680
+ awaitRefetchQueries: true,
1681
+ refetchQueries: (mutationResult) => {
1682
+ const updateRelation2 = mutationResult?.data?.updateRelation;
1683
+ const eventId = updateRelation2?.eventId;
1684
+ const vendorId = updateRelation2?.vendorId;
1685
+ const resourceType = updateRelation2?.lastUpdateBy;
1686
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1687
+ return [
1688
+ {
1689
+ query: GET_EVENT_RELATIONS,
1690
+ variables: { eventId }
1691
+ },
1692
+ {
1693
+ query: GET_EVENT,
1694
+ variables: { _id: eventId }
1695
+ },
1696
+ {
1697
+ query: GET_EVENT_INFO,
1698
+ variables: { eventId }
1699
+ },
1700
+ {
1701
+ query: GET_VENDOR_RELATIONS,
1702
+ variables: { vendorId }
1703
+ },
1704
+ {
1705
+ query: GET_VENDOR,
1706
+ variables: { _id: vendorId }
1707
+ },
1708
+ {
1709
+ query: GET_RELATION_BY_EVENT_AND_VENDOR,
1710
+ variables: { eventId, vendorId }
1711
+ },
1712
+ {
1713
+ query: GET_RESOURCE_CONNECTIONS,
1714
+ variables: { resourceId, resourceType }
1715
+ }
1716
+ ];
1717
1717
  }
1718
- );
1718
+ });
1719
1719
  return { error, loading, updateRelation };
1720
1720
  };
1721
1721
  var useDeleteRelation = () => {
1722
- const [deleteRelation, { loading, error }] = useMutation9(
1723
- DELETE_RELATION_MUTATION,
1724
- {
1725
- awaitRefetchQueries: true,
1726
- refetchQueries: (mutationResult) => {
1727
- const deleteRelation2 = mutationResult?.data?.deleteRelation;
1728
- const eventId = deleteRelation2?.eventId;
1729
- const vendorId = deleteRelation2?.vendorId;
1730
- const resourceType = deleteRelation2?.lastUpdateBy;
1731
- const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1732
- return [
1733
- {
1734
- query: GET_EVENT_INFO,
1735
- variables: { eventId }
1736
- },
1737
- {
1738
- query: GET_EVENT_RELATIONS,
1739
- variables: { eventId }
1740
- },
1741
- {
1742
- query: GET_VENDOR_RELATIONS,
1743
- variables: { vendorId }
1744
- },
1745
- {
1746
- query: GET_RELATION_BY_EVENT_AND_VENDOR,
1747
- variables: { eventId, vendorId }
1748
- },
1749
- {
1750
- query: GET_RESOURCE_CONNECTIONS,
1751
- variables: { resourceId, resourceType }
1752
- },
1753
- {
1754
- query: USER_CHATS
1755
- }
1756
- ];
1757
- }
1722
+ const [deleteRelation, { loading, error }] = useMutation9(DELETE_RELATION_MUTATION, {
1723
+ awaitRefetchQueries: true,
1724
+ refetchQueries: (mutationResult) => {
1725
+ const deleteRelation2 = mutationResult?.data?.deleteRelation;
1726
+ const eventId = deleteRelation2?.eventId;
1727
+ const vendorId = deleteRelation2?.vendorId;
1728
+ const resourceType = deleteRelation2?.lastUpdateBy;
1729
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
1730
+ return [
1731
+ {
1732
+ query: GET_EVENT_INFO,
1733
+ variables: { eventId }
1734
+ },
1735
+ {
1736
+ query: GET_EVENT_RELATIONS,
1737
+ variables: { eventId }
1738
+ },
1739
+ {
1740
+ query: GET_VENDOR_RELATIONS,
1741
+ variables: { vendorId }
1742
+ },
1743
+ {
1744
+ query: GET_RELATION_BY_EVENT_AND_VENDOR,
1745
+ variables: { eventId, vendorId }
1746
+ },
1747
+ {
1748
+ query: GET_RESOURCE_CONNECTIONS,
1749
+ variables: { resourceId, resourceType }
1750
+ },
1751
+ {
1752
+ query: USER_CHATS
1753
+ }
1754
+ ];
1758
1755
  }
1759
- );
1756
+ });
1760
1757
  return { deleteRelation, error, loading };
1761
1758
  };
1762
1759
 
1763
1760
  // src/graphql/hooks/relation/hooksQuery.ts
1764
- import { useQuery as useQuery4 } from "@apollo/client";
1761
+ import { useQuery as useQuery4 } from "@apollo/client/react";
1765
1762
  var useGetRelation = (_id) => {
1766
1763
  const { loading, error, data, refetch } = useQuery4(GET_RELATION, {
1767
1764
  fetchPolicy: "network-only",
@@ -1772,14 +1769,11 @@ var useGetRelation = (_id) => {
1772
1769
  return { error, loading, refetch, relation };
1773
1770
  };
1774
1771
  var useGetRelationByEventAndVendor = (eventId, vendorId) => {
1775
- const { loading, error, data, refetch } = useQuery4(
1776
- GET_RELATION_BY_EVENT_AND_VENDOR,
1777
- {
1778
- fetchPolicy: "network-only",
1779
- skip: !eventId || !vendorId,
1780
- variables: { eventId, vendorId }
1781
- }
1782
- );
1772
+ const { loading, error, data, refetch } = useQuery4(GET_RELATION_BY_EVENT_AND_VENDOR, {
1773
+ fetchPolicy: "network-only",
1774
+ skip: !eventId || !vendorId,
1775
+ variables: { eventId, vendorId }
1776
+ });
1783
1777
  const relationByEventAndVendor = data?.relationByEventAndVendor;
1784
1778
  return { error, loading, refetch, relationByEventAndVendor };
1785
1779
  };
@@ -1789,7 +1783,7 @@ var useGetEventRelations = (eventId) => {
1789
1783
  skip: !eventId,
1790
1784
  variables: { eventId }
1791
1785
  });
1792
- const eventRelations = data?.eventRelations;
1786
+ const eventRelations = data?.eventRelations || [];
1793
1787
  return { error, eventRelations, loading, refetch };
1794
1788
  };
1795
1789
  var useGetVendorRelations = (vendorId) => {
@@ -1798,7 +1792,7 @@ var useGetVendorRelations = (vendorId) => {
1798
1792
  skip: !vendorId,
1799
1793
  variables: { vendorId }
1800
1794
  });
1801
- const vendorRelations = data?.vendorRelations;
1795
+ const vendorRelations = data?.vendorRelations || [];
1802
1796
  return { error, loading, refetch, vendorRelations };
1803
1797
  };
1804
1798
  var useGetResourceConnections = (resourceId, resourceType) => {
@@ -1806,12 +1800,12 @@ var useGetResourceConnections = (resourceId, resourceType) => {
1806
1800
  fetchPolicy: "network-only",
1807
1801
  variables: { resourceId, resourceType }
1808
1802
  });
1809
- const resourceConnections = data?.resourceConnections;
1803
+ const resourceConnections = data?.resourceConnections || [];
1810
1804
  return { error, loading, refetch, resourceConnections };
1811
1805
  };
1812
1806
 
1813
1807
  // src/graphql/hooks/vendor/hooksMutation.ts
1814
- import { useMutation as useMutation10 } from "@apollo/client";
1808
+ import { useMutation as useMutation10 } from "@apollo/client/react";
1815
1809
 
1816
1810
  // src/graphql/mutations/vendor.ts
1817
1811
  import { gql as gql20 } from "@apollo/client";
@@ -1885,60 +1879,57 @@ var useDeleteVendor = () => {
1885
1879
  return { deleteVendor, error, loading };
1886
1880
  };
1887
1881
  var useCreateVendorInfo = () => {
1888
- const [createVendorInfo, { loading, error }] = useMutation10(
1889
- CREATE_VENDOR_INFO_MUTATION,
1890
- {
1891
- awaitRefetchQueries: true,
1892
- refetchQueries: (mutationResult) => {
1893
- const vendorId = mutationResult?.data?.createVendorInfo?.vendorId;
1894
- if (!vendorId) return [];
1895
- return [
1896
- {
1897
- query: GET_VENDOR_INFO,
1898
- variables: { vendorId }
1899
- // Pass the vendorId for refetching
1900
- },
1901
- {
1902
- query: GET_USER_VENDORS
1903
- },
1904
- {
1905
- query: GET_VENDOR,
1906
- variables: { _id: vendorId }
1907
- }
1908
- ];
1909
- }
1882
+ const [createVendorInfo, { loading, error }] = useMutation10(CREATE_VENDOR_INFO_MUTATION, {
1883
+ awaitRefetchQueries: true,
1884
+ refetchQueries: (mutationResult) => {
1885
+ const vendorId = mutationResult?.data?.createVendorInfo?.vendorId;
1886
+ if (!vendorId) return [];
1887
+ return [
1888
+ {
1889
+ query: GET_VENDOR_INFO,
1890
+ variables: { vendorId }
1891
+ // Pass the vendorId for refetching
1892
+ },
1893
+ {
1894
+ query: GET_USER_VENDORS
1895
+ },
1896
+ {
1897
+ query: GET_VENDOR,
1898
+ variables: { _id: vendorId }
1899
+ }
1900
+ ];
1910
1901
  }
1911
- );
1902
+ });
1912
1903
  return { createVendorInfo, error, loading };
1913
1904
  };
1914
1905
  var useUpdateVendorInfo = () => {
1915
- const [updateVendorInfo, { loading, error }] = useMutation10(
1916
- UPDATE_VENDOR_INFO_MUTATION,
1917
- {
1918
- awaitRefetchQueries: true,
1919
- refetchQueries: (mutationResult) => {
1920
- const vendorId = mutationResult?.data?.updateVendorInfo?.vendorId;
1921
- if (!vendorId) return [];
1922
- return [
1923
- {
1924
- query: GET_VENDOR_INFO,
1925
- variables: { vendorId }
1926
- // Pass the vendorId for refetching
1927
- }
1928
- ];
1929
- }
1906
+ const [updateVendorInfo, { loading, error }] = useMutation10(UPDATE_VENDOR_INFO_MUTATION, {
1907
+ awaitRefetchQueries: true,
1908
+ refetchQueries: (mutationResult) => {
1909
+ const vendorId = mutationResult?.data?.updateVendorInfo?.vendorId;
1910
+ if (!vendorId) return [];
1911
+ return [
1912
+ {
1913
+ query: GET_VENDOR_INFO,
1914
+ variables: { vendorId }
1915
+ // Pass the vendorId for refetching
1916
+ }
1917
+ ];
1930
1918
  }
1931
- );
1919
+ });
1932
1920
  return { error, loading, updateVendorInfo };
1933
1921
  };
1934
1922
 
1935
1923
  // src/graphql/hooks/vendor/hooksQuery.ts
1936
- import { useQuery as useQuery5 } from "@apollo/client";
1924
+ import { useQuery as useQuery5 } from "@apollo/client/react";
1937
1925
  var useGetVendors = () => {
1938
- const { loading, error, data, refetch } = useQuery5(GET_VENDORS, {
1939
- fetchPolicy: "network-only"
1940
- });
1941
- const vendors = data?.vendors;
1926
+ const { loading, error, data, refetch } = useQuery5(
1927
+ GET_VENDORS,
1928
+ {
1929
+ fetchPolicy: "network-only"
1930
+ }
1931
+ );
1932
+ const vendors = data?.vendors || [];
1942
1933
  return {
1943
1934
  error,
1944
1935
  loading,
@@ -1947,11 +1938,14 @@ var useGetVendors = () => {
1947
1938
  };
1948
1939
  };
1949
1940
  var useGetVendor = (_id) => {
1950
- const { loading, error, data, refetch } = useQuery5(GET_VENDOR, {
1951
- fetchPolicy: "network-only",
1952
- skip: !_id,
1953
- variables: { _id }
1954
- });
1941
+ const { loading, error, data, refetch } = useQuery5(
1942
+ GET_VENDOR,
1943
+ {
1944
+ fetchPolicy: "network-only",
1945
+ skip: !_id,
1946
+ variables: { _id }
1947
+ }
1948
+ );
1955
1949
  const vendor = data?.vendor;
1956
1950
  return { error, loading, refetch, vendor };
1957
1951
  };
@@ -1961,7 +1955,7 @@ var useGetVendorsByRegion = (region) => {
1961
1955
  skip: !region,
1962
1956
  variables: { region }
1963
1957
  });
1964
- const vendorsByRegion = data?.vendorsByRegion;
1958
+ const vendorsByRegion = data?.vendorsByRegion || [];
1965
1959
  return { error, loading, refetch, vendorsByRegion };
1966
1960
  };
1967
1961
  var useSearchVendors = (search, region) => {
@@ -1970,7 +1964,7 @@ var useSearchVendors = (search, region) => {
1970
1964
  skip: search.length < 3,
1971
1965
  variables: { region, search }
1972
1966
  });
1973
- const vendorSearch = data?.vendorSearch;
1967
+ const vendorSearch = data?.vendorSearch || [];
1974
1968
  return { error, loading, refetch, vendorSearch };
1975
1969
  };
1976
1970
  var useGetVendorInfo = (vendorId) => {
@@ -1989,7 +1983,7 @@ var useGetVendorInfo = (vendorId) => {
1989
1983
  };
1990
1984
 
1991
1985
  // src/graphql/hooks/tester/hooksMutation.ts
1992
- import { useMutation as useMutation11 } from "@apollo/client";
1986
+ import { useMutation as useMutation11 } from "@apollo/client/react";
1993
1987
 
1994
1988
  // src/graphql/mutations/tester.ts
1995
1989
  import { gql as gql22 } from "@apollo/client";
@@ -2087,10 +2081,12 @@ var useDeleteTester = () => {
2087
2081
  };
2088
2082
 
2089
2083
  // src/graphql/hooks/tester/hooksQuery.ts
2090
- import { useQuery as useQuery6 } from "@apollo/client";
2084
+ import { useQuery as useQuery6 } from "@apollo/client/react";
2091
2085
  var useGetTesters = () => {
2092
- const { data, loading, error, refetch } = useQuery6(GET_TESTERS);
2093
- const testers = data?.testers;
2086
+ const { data, loading, error, refetch } = useQuery6(
2087
+ GET_TESTERS
2088
+ );
2089
+ const testers = data?.testers || [];
2094
2090
  return {
2095
2091
  error,
2096
2092
  loading,
@@ -2099,16 +2095,19 @@ var useGetTesters = () => {
2099
2095
  };
2100
2096
  };
2101
2097
  var useGetTester = (_id) => {
2102
- const { data, loading, error, refetch } = useQuery6(GET_TESTER, {
2103
- skip: !_id,
2104
- variables: { _id }
2105
- });
2098
+ const { data, loading, error, refetch } = useQuery6(
2099
+ GET_TESTER,
2100
+ {
2101
+ skip: !_id,
2102
+ variables: { _id }
2103
+ }
2104
+ );
2106
2105
  const tester = data?.tester;
2107
2106
  return { error, loading, refetch, tester };
2108
2107
  };
2109
2108
 
2110
2109
  // src/graphql/hooks/user/hooksMutation.ts
2111
- import { useMutation as useMutation12 } from "@apollo/client";
2110
+ import { useMutation as useMutation12 } from "@apollo/client/react";
2112
2111
 
2113
2112
  // src/graphql/mutations/user.ts
2114
2113
  import { gql as gql23 } from "@apollo/client";
@@ -2170,10 +2169,13 @@ var SELECT_PACKAGE_MUTATION = gql23`
2170
2169
  selectedLicence: $selectedLicence
2171
2170
  removedLicence: $removedLicence
2172
2171
  ) {
2173
- licences
2172
+ licences {
2173
+ ...LicenceFields
2174
+ }
2174
2175
  message
2175
2176
  }
2176
2177
  }
2178
+ ${LICENCE_FIELDS_FRAGMENT}
2177
2179
  `;
2178
2180
  var ADD_USER_INTEREST_RESOURCE_MUTATION = gql23`
2179
2181
  mutation addUserInterestResource($input: UserActivityInputType!) {
@@ -2265,21 +2267,18 @@ var useRemoveUserFavouriteResource = () => {
2265
2267
  return { error, loading, removeUserFavouriteResource };
2266
2268
  };
2267
2269
  var useSelectPackage = () => {
2268
- const [selectPackage, { loading, error }] = useMutation12(
2269
- SELECT_PACKAGE_MUTATION,
2270
- {
2271
- awaitRefetchQueries: true,
2272
- refetchQueries: (mutationResult) => {
2273
- const userId = mutationResult?.data?.selectPackage?.userId;
2274
- if (!userId) return [];
2275
- return [
2276
- { query: GET_USER, variables: { _id: userId } },
2277
- { query: GET_USER_EVENTS },
2278
- { query: GET_USER_VENDORS }
2279
- ];
2280
- }
2270
+ const [selectPackage, { loading, error }] = useMutation12(SELECT_PACKAGE_MUTATION, {
2271
+ awaitRefetchQueries: true,
2272
+ refetchQueries: (mutationResult) => {
2273
+ const userId = mutationResult?.data?.selectPackage?.userId;
2274
+ if (!userId) return [];
2275
+ return [
2276
+ { query: GET_USER, variables: { _id: userId } },
2277
+ { query: GET_USER_EVENTS },
2278
+ { query: GET_USER_VENDORS }
2279
+ ];
2281
2280
  }
2282
- );
2281
+ });
2283
2282
  return { error, loading, selectPackage };
2284
2283
  };
2285
2284
  var useAddUserInterestResource = () => {
@@ -2344,18 +2343,24 @@ var useRemoveUserPresentResource = () => {
2344
2343
  };
2345
2344
 
2346
2345
  // src/graphql/hooks/user/hooksQuery.ts
2347
- import { useQuery as useQuery7 } from "@apollo/client";
2346
+ import { useQuery as useQuery7 } from "@apollo/client/react";
2348
2347
  var useGetUsers = () => {
2349
- const { loading, error, data, refetch } = useQuery7(GET_USERS, {
2350
- fetchPolicy: "network-only"
2351
- });
2352
- const users = data?.users;
2348
+ const { loading, error, data, refetch } = useQuery7(
2349
+ GET_USERS,
2350
+ {
2351
+ fetchPolicy: "network-only"
2352
+ }
2353
+ );
2354
+ const users = data?.users || [];
2353
2355
  return { error, loading, refetch, users };
2354
2356
  };
2355
2357
  var useGetUser = (_id) => {
2356
- const { loading, error, data, refetch } = useQuery7(GET_USER, {
2357
- variables: { _id }
2358
- });
2358
+ const { loading, error, data, refetch } = useQuery7(
2359
+ GET_USER,
2360
+ {
2361
+ variables: { _id }
2362
+ }
2363
+ );
2359
2364
  const user = data?.user;
2360
2365
  return { error, loading, refetch, user };
2361
2366
  };
@@ -2363,14 +2368,14 @@ var useGetUserEvents = () => {
2363
2368
  const { loading, error, data, refetch } = useQuery7(GET_USER_EVENTS, {
2364
2369
  fetchPolicy: "network-only"
2365
2370
  });
2366
- const userEvents = data?.userEvents;
2371
+ const userEvents = data?.userEvents || [];
2367
2372
  return { error, loading, refetch, userEvents };
2368
2373
  };
2369
2374
  var useGetUserVendors = () => {
2370
2375
  const { loading, error, data, refetch } = useQuery7(GET_USER_VENDORS, {
2371
2376
  fetchPolicy: "network-only"
2372
2377
  });
2373
- const userVendors = data?.userVendors;
2378
+ const userVendors = data?.userVendors || [];
2374
2379
  return { error, loading, refetch, userVendors };
2375
2380
  };
2376
2381
  var useGetUserActivities = () => {
@@ -2379,24 +2384,24 @@ var useGetUserActivities = () => {
2379
2384
  });
2380
2385
  const userActivities = {
2381
2386
  favourites: {
2382
- events: data?.userActivities.favourites.events,
2383
- vendors: data?.userActivities.favourites.vendors
2387
+ events: data?.userActivities.favourites.events || [],
2388
+ vendors: data?.userActivities.favourites.vendors || []
2384
2389
  },
2385
2390
  going: {
2386
- events: data?.userActivities.going.events
2391
+ events: data?.userActivities.going.events || []
2387
2392
  },
2388
2393
  interested: {
2389
- events: data?.userActivities.interested.events
2394
+ events: data?.userActivities.interested.events || []
2390
2395
  },
2391
2396
  present: {
2392
- events: data?.userActivities.present.events
2397
+ events: data?.userActivities.present.events || []
2393
2398
  }
2394
2399
  };
2395
2400
  return { error, loading, refetch, userActivities };
2396
2401
  };
2397
2402
 
2398
2403
  // src/graphql/hooks/ad/hooksMutation.ts
2399
- import { useMutation as useMutation13 } from "@apollo/client";
2404
+ import { useMutation as useMutation13 } from "@apollo/client/react";
2400
2405
 
2401
2406
  // src/graphql/mutations/ad.ts
2402
2407
  import { gql as gql25 } from "@apollo/client";
@@ -2515,7 +2520,7 @@ var useDeleteAd = () => {
2515
2520
  };
2516
2521
 
2517
2522
  // src/graphql/hooks/ad/hooksQuery.ts
2518
- import { useQuery as useQuery8 } from "@apollo/client";
2523
+ import { useQuery as useQuery8 } from "@apollo/client/react";
2519
2524
  var useGetAds = () => {
2520
2525
  const { data, loading, error, refetch } = useQuery8(
2521
2526
  GET_ADS,
@@ -2524,7 +2529,7 @@ var useGetAds = () => {
2524
2529
  }
2525
2530
  );
2526
2531
  return {
2527
- ads: data?.ads,
2532
+ ads: data?.ads || [],
2528
2533
  error,
2529
2534
  loading,
2530
2535
  refetch
@@ -2550,7 +2555,7 @@ var useGetAdsByRegion = (region, status) => {
2550
2555
  variables: { region, status }
2551
2556
  });
2552
2557
  return {
2553
- adsByRegion: data?.adsByRegion,
2558
+ adsByRegion: data?.adsByRegion || [],
2554
2559
  error,
2555
2560
  loading,
2556
2561
  refetch
@@ -2558,7 +2563,7 @@ var useGetAdsByRegion = (region, status) => {
2558
2563
  };
2559
2564
 
2560
2565
  // src/graphql/hooks/resourceActivities/hooksMutation.ts
2561
- import { useMutation as useMutation14 } from "@apollo/client";
2566
+ import { useMutation as useMutation14 } from "@apollo/client/react";
2562
2567
 
2563
2568
  // src/graphql/mutations/resourceActivities.ts
2564
2569
  import { gql as gql26 } from "@apollo/client";
@@ -2577,7 +2582,7 @@ var useCreateResourceActivity = () => {
2577
2582
  };
2578
2583
 
2579
2584
  // src/graphql/hooks/resourceActivities/hooksQuery.ts
2580
- import { useQuery as useQuery9 } from "@apollo/client";
2585
+ import { useQuery as useQuery9 } from "@apollo/client/react";
2581
2586
 
2582
2587
  // src/graphql/queries/resourceActivities.ts
2583
2588
  import { gql as gql27 } from "@apollo/client";
@@ -2622,12 +2627,12 @@ var useGetResourceActivities = (resourceId, resourceType) => {
2622
2627
  error,
2623
2628
  loading,
2624
2629
  refetch,
2625
- resourceActivities: data?.resourceActivities
2630
+ resourceActivities: data?.resourceActivities || []
2626
2631
  };
2627
2632
  };
2628
2633
 
2629
2634
  // src/graphql/hooks/stripe/hooksMutation.ts
2630
- import { useMutation as useMutation15 } from "@apollo/client";
2635
+ import { useMutation as useMutation15 } from "@apollo/client/react";
2631
2636
 
2632
2637
  // src/graphql/mutations/stripe.ts
2633
2638
  import { gql as gql28 } from "@apollo/client";
@@ -2676,7 +2681,7 @@ var useUpdateSubscriptionPlan = () => {
2676
2681
  };
2677
2682
 
2678
2683
  // src/graphql/hooks/stripe/hooksQuery.ts
2679
- import { useQuery as useQuery10 } from "@apollo/client";
2684
+ import { useQuery as useQuery10 } from "@apollo/client/react";
2680
2685
 
2681
2686
  // src/graphql/queries/stripe.ts
2682
2687
  import { gql as gql29 } from "@apollo/client";
@@ -2703,7 +2708,7 @@ var useGetSubscriptionStatus = () => {
2703
2708
  };
2704
2709
 
2705
2710
  // src/graphql/hooks/partner/hooksMutation.ts
2706
- import { useMutation as useMutation16 } from "@apollo/client";
2711
+ import { useMutation as useMutation16 } from "@apollo/client/react";
2707
2712
 
2708
2713
  // src/graphql/mutations/partner.ts
2709
2714
  import { gql as gql30 } from "@apollo/client";
@@ -2762,12 +2767,12 @@ var useDeletePartner = () => {
2762
2767
  };
2763
2768
 
2764
2769
  // src/graphql/hooks/partner/hooksQuery.ts
2765
- import { useQuery as useQuery11 } from "@apollo/client";
2770
+ import { useQuery as useQuery11 } from "@apollo/client/react";
2766
2771
  var useGetPartners = () => {
2767
2772
  const { loading, error, data, refetch } = useQuery11(GET_PARTNERS, {
2768
2773
  fetchPolicy: "network-only"
2769
2774
  });
2770
- const partners = data?.partners;
2775
+ const partners = data?.partners || [];
2771
2776
  return {
2772
2777
  error,
2773
2778
  loading,
@@ -2776,11 +2781,14 @@ var useGetPartners = () => {
2776
2781
  };
2777
2782
  };
2778
2783
  var useGetPartner = (_id) => {
2779
- const { loading, error, data, refetch } = useQuery11(GET_PARTNER, {
2780
- fetchPolicy: "network-only",
2781
- skip: !_id,
2782
- variables: { _id }
2783
- });
2784
+ const { loading, error, data, refetch } = useQuery11(
2785
+ GET_PARTNER,
2786
+ {
2787
+ fetchPolicy: "network-only",
2788
+ skip: !_id,
2789
+ variables: { _id }
2790
+ }
2791
+ );
2784
2792
  const partner = data?.partner;
2785
2793
  return { error, loading, partner, refetch };
2786
2794
  };
@@ -2790,7 +2798,7 @@ var useGetPartnersByRegion = (region) => {
2790
2798
  skip: !region,
2791
2799
  variables: { region }
2792
2800
  });
2793
- const partnersByRegion = data?.partnersByRegion;
2801
+ const partnersByRegion = data?.partnersByRegion || [];
2794
2802
  return { error, loading, partnersByRegion, refetch };
2795
2803
  };
2796
2804
  var useSearchPartners = (search, region) => {
@@ -2799,7 +2807,7 @@ var useSearchPartners = (search, region) => {
2799
2807
  skip: search.length < 3,
2800
2808
  variables: { region, search }
2801
2809
  });
2802
- const partnersSearch = data?.partnersSearch;
2810
+ const partnersSearch = data?.partnersSearch || [];
2803
2811
  return { error, loading, partnersSearch, refetch };
2804
2812
  };
2805
2813
  export {