@timardex/cluemart-shared 1.0.84 → 1.0.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/graphql/index.cjs +101 -100
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +4 -13
- package/dist/graphql/index.d.ts +4 -13
- package/dist/graphql/index.mjs +98 -95
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/index.cjs +101 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -17
- package/dist/index.d.ts +5 -17
- package/dist/index.mjs +98 -95
- package/dist/index.mjs.map +1 -1
- package/dist/{notification-DDVH6HnE.d.mts → notification-CmjfP3gD.d.mts} +3 -6
- package/dist/{notification-DDVH6HnE.d.ts → notification-CmjfP3gD.d.ts} +3 -6
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/graphql/index.mjs
CHANGED
|
@@ -548,6 +548,14 @@ var USER_CHATS = gql6`
|
|
|
548
548
|
}
|
|
549
549
|
${CHAT_FIELDS_FRAGMENT}
|
|
550
550
|
`;
|
|
551
|
+
var GET_CHAT_MESSAGE = gql6`
|
|
552
|
+
subscription {
|
|
553
|
+
getChatMessage {
|
|
554
|
+
...ChatFields
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
${CHAT_FIELDS_FRAGMENT}
|
|
558
|
+
`;
|
|
551
559
|
|
|
552
560
|
// src/graphql/mutations/chat.ts
|
|
553
561
|
var CREATE_CHAT_MUTATION = gql7`
|
|
@@ -672,19 +680,6 @@ var useRemoveParticipantFromChat = () => {
|
|
|
672
680
|
|
|
673
681
|
// src/graphql/hooks/chat/hooksQuery.ts
|
|
674
682
|
import { useQuery, useSubscription } from "@apollo/client";
|
|
675
|
-
|
|
676
|
-
// src/graphql/subscriptions/chat.ts
|
|
677
|
-
import { gql as gql8 } from "@apollo/client";
|
|
678
|
-
var GET_CHAT_MESSAGE = gql8`
|
|
679
|
-
subscription {
|
|
680
|
-
getChatMessage {
|
|
681
|
-
...ChatFields
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
${CHAT_FIELDS_FRAGMENT}
|
|
685
|
-
`;
|
|
686
|
-
|
|
687
|
-
// src/graphql/hooks/chat/hooksQuery.ts
|
|
688
683
|
var useGetChat = (_id) => {
|
|
689
684
|
const { loading, error, data, refetch } = useQuery(CHAT, {
|
|
690
685
|
fetchPolicy: "network-only",
|
|
@@ -711,8 +706,8 @@ var useGetChatSubscription = () => {
|
|
|
711
706
|
import { useMutation as useMutation4 } from "@apollo/client";
|
|
712
707
|
|
|
713
708
|
// src/graphql/mutations/contactUs.ts
|
|
714
|
-
import { gql as
|
|
715
|
-
var CONTACT_US_MUTATION =
|
|
709
|
+
import { gql as gql8 } from "@apollo/client";
|
|
710
|
+
var CONTACT_US_MUTATION = gql8`
|
|
716
711
|
mutation contactUs($input: ContactUsInputType!) {
|
|
717
712
|
contactUs(input: $input) {
|
|
718
713
|
message
|
|
@@ -730,8 +725,8 @@ var useContactUs = () => {
|
|
|
730
725
|
import { useMutation as useMutation5 } from "@apollo/client";
|
|
731
726
|
|
|
732
727
|
// src/graphql/mutations/market.ts
|
|
733
|
-
import { gql as
|
|
734
|
-
var CREATE_MARKET_MUTATION =
|
|
728
|
+
import { gql as gql9 } from "@apollo/client";
|
|
729
|
+
var CREATE_MARKET_MUTATION = gql9`
|
|
735
730
|
mutation createMarket($input: MarketInputType!) {
|
|
736
731
|
createMarket(input: $input) {
|
|
737
732
|
...MarketFields
|
|
@@ -739,7 +734,7 @@ var CREATE_MARKET_MUTATION = gql10`
|
|
|
739
734
|
}
|
|
740
735
|
${MARKET}
|
|
741
736
|
`;
|
|
742
|
-
var UPDATE_MARKET_MUTATION =
|
|
737
|
+
var UPDATE_MARKET_MUTATION = gql9`
|
|
743
738
|
mutation updateMarket($_id: ID!, $input: MarketInputType!) {
|
|
744
739
|
updateMarket(_id: $_id, input: $input) {
|
|
745
740
|
...MarketFields
|
|
@@ -747,12 +742,12 @@ var UPDATE_MARKET_MUTATION = gql10`
|
|
|
747
742
|
}
|
|
748
743
|
${MARKET}
|
|
749
744
|
`;
|
|
750
|
-
var DELETE_MARKET_MUTATION =
|
|
745
|
+
var DELETE_MARKET_MUTATION = gql9`
|
|
751
746
|
mutation deleteMarket($_id: ID!) {
|
|
752
747
|
deleteMarket(_id: $_id)
|
|
753
748
|
}
|
|
754
749
|
`;
|
|
755
|
-
var CREATE_MARKET_INFO_MUTATION =
|
|
750
|
+
var CREATE_MARKET_INFO_MUTATION = gql9`
|
|
756
751
|
mutation createMarketInfo($input: MarketInfoInputType!) {
|
|
757
752
|
createMarketInfo(input: $input) {
|
|
758
753
|
...MarketInfoFields
|
|
@@ -760,7 +755,7 @@ var CREATE_MARKET_INFO_MUTATION = gql10`
|
|
|
760
755
|
}
|
|
761
756
|
${MARKET_INFO}
|
|
762
757
|
`;
|
|
763
|
-
var UPDATE_MARKET_INFO_MUTATION =
|
|
758
|
+
var UPDATE_MARKET_INFO_MUTATION = gql9`
|
|
764
759
|
mutation updateMarketInfo($_id: ID!, $input: MarketInfoInputType!) {
|
|
765
760
|
updateMarketInfo(_id: $_id, input: $input) {
|
|
766
761
|
...MarketInfoFields
|
|
@@ -770,8 +765,8 @@ var UPDATE_MARKET_INFO_MUTATION = gql10`
|
|
|
770
765
|
`;
|
|
771
766
|
|
|
772
767
|
// src/graphql/queries/user.ts
|
|
773
|
-
import { gql as
|
|
774
|
-
var GET_USERS =
|
|
768
|
+
import { gql as gql10 } from "@apollo/client";
|
|
769
|
+
var GET_USERS = gql10`
|
|
775
770
|
query getUsers {
|
|
776
771
|
users {
|
|
777
772
|
...UserFields
|
|
@@ -779,7 +774,7 @@ var GET_USERS = gql11`
|
|
|
779
774
|
}
|
|
780
775
|
${USER_FIELDS_FRAGMENT}
|
|
781
776
|
`;
|
|
782
|
-
var GET_USER =
|
|
777
|
+
var GET_USER = gql10`
|
|
783
778
|
query getUser($_id: ID!) {
|
|
784
779
|
user(_id: $_id) {
|
|
785
780
|
...UserFields
|
|
@@ -787,7 +782,7 @@ var GET_USER = gql11`
|
|
|
787
782
|
}
|
|
788
783
|
${USER_FIELDS_FRAGMENT}
|
|
789
784
|
`;
|
|
790
|
-
var GET_USER_MARKETS =
|
|
785
|
+
var GET_USER_MARKETS = gql10`
|
|
791
786
|
query getUserMarkets {
|
|
792
787
|
userMarkets {
|
|
793
788
|
...MarketFields
|
|
@@ -795,7 +790,7 @@ var GET_USER_MARKETS = gql11`
|
|
|
795
790
|
}
|
|
796
791
|
${MARKET}
|
|
797
792
|
`;
|
|
798
|
-
var GET_USER_STALLHOLDER =
|
|
793
|
+
var GET_USER_STALLHOLDER = gql10`
|
|
799
794
|
query getUserStallholder {
|
|
800
795
|
userStallholder {
|
|
801
796
|
...StallholderFields
|
|
@@ -803,7 +798,7 @@ var GET_USER_STALLHOLDER = gql11`
|
|
|
803
798
|
}
|
|
804
799
|
${STALLHOLDER}
|
|
805
800
|
`;
|
|
806
|
-
var GET_USER_FAVOURITES =
|
|
801
|
+
var GET_USER_FAVOURITES = gql10`
|
|
807
802
|
query getUserFavourites {
|
|
808
803
|
userFavourites {
|
|
809
804
|
markets {
|
|
@@ -965,11 +960,11 @@ var useGetMarketInfo = (marketId) => {
|
|
|
965
960
|
import { useMutation as useMutation6 } from "@apollo/client";
|
|
966
961
|
|
|
967
962
|
// src/graphql/mutations/notification.ts
|
|
968
|
-
import { gql as
|
|
963
|
+
import { gql as gql12 } from "@apollo/client";
|
|
969
964
|
|
|
970
965
|
// src/graphql/queries/notification.ts
|
|
971
|
-
import { gql as
|
|
972
|
-
var USER_NOTIFICATION_FRAGMENT =
|
|
966
|
+
import { gql as gql11 } from "@apollo/client";
|
|
967
|
+
var USER_NOTIFICATION_FRAGMENT = gql11`
|
|
973
968
|
fragment UserNotificationFields on Notification {
|
|
974
969
|
_id
|
|
975
970
|
userId
|
|
@@ -982,7 +977,7 @@ var USER_NOTIFICATION_FRAGMENT = gql12`
|
|
|
982
977
|
updatedAt
|
|
983
978
|
}
|
|
984
979
|
`;
|
|
985
|
-
var GET_USER_NOTIFICATIONS =
|
|
980
|
+
var GET_USER_NOTIFICATIONS = gql11`
|
|
986
981
|
query getUserNotifications($userId: String!, $limit: Int, $offset: Int) {
|
|
987
982
|
userNotifications(userId: $userId, limit: $limit, offset: $offset) {
|
|
988
983
|
...UserNotificationFields
|
|
@@ -990,7 +985,7 @@ var GET_USER_NOTIFICATIONS = gql12`
|
|
|
990
985
|
}
|
|
991
986
|
${USER_NOTIFICATION_FRAGMENT}
|
|
992
987
|
`;
|
|
993
|
-
var GET_NOTIFICATION_COUNT =
|
|
988
|
+
var GET_NOTIFICATION_COUNT = gql11`
|
|
994
989
|
query getNotificationCount($userId: String!) {
|
|
995
990
|
notificationCount(userId: $userId) {
|
|
996
991
|
total
|
|
@@ -1000,15 +995,7 @@ var GET_NOTIFICATION_COUNT = gql12`
|
|
|
1000
995
|
`;
|
|
1001
996
|
|
|
1002
997
|
// src/graphql/mutations/notification.ts
|
|
1003
|
-
var
|
|
1004
|
-
mutation createNotification($input: CreateNotificationInput!) {
|
|
1005
|
-
createNotification(input: $input) {
|
|
1006
|
-
...UserNotificationFields
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
${USER_NOTIFICATION_FRAGMENT}
|
|
1010
|
-
`;
|
|
1011
|
-
var CREATE_BULK_NOTIFICATIONS = gql13`
|
|
998
|
+
var CREATE_BULK_NOTIFICATIONS = gql12`
|
|
1012
999
|
mutation createBulkNotifications($input: CreateBulkNotificationInput!) {
|
|
1013
1000
|
createBulkNotifications(input: $input) {
|
|
1014
1001
|
...UserNotificationFields
|
|
@@ -1016,7 +1003,7 @@ var CREATE_BULK_NOTIFICATIONS = gql13`
|
|
|
1016
1003
|
}
|
|
1017
1004
|
${USER_NOTIFICATION_FRAGMENT}
|
|
1018
1005
|
`;
|
|
1019
|
-
var MARK_NOTIFICATION_READ =
|
|
1006
|
+
var MARK_NOTIFICATION_READ = gql12`
|
|
1020
1007
|
mutation markNotificationRead($input: MarkNotificationReadInput!) {
|
|
1021
1008
|
markNotificationRead(input: $input) {
|
|
1022
1009
|
...UserNotificationFields
|
|
@@ -1024,22 +1011,18 @@ var MARK_NOTIFICATION_READ = gql13`
|
|
|
1024
1011
|
}
|
|
1025
1012
|
${USER_NOTIFICATION_FRAGMENT}
|
|
1026
1013
|
`;
|
|
1027
|
-
var MARK_ALL_NOTIFICATIONS_READ =
|
|
1014
|
+
var MARK_ALL_NOTIFICATIONS_READ = gql12`
|
|
1028
1015
|
mutation markAllNotificationsRead($input: MarkAllNotificationsReadInput!) {
|
|
1029
1016
|
markAllNotificationsRead(input: $input)
|
|
1030
1017
|
}
|
|
1031
1018
|
`;
|
|
1032
|
-
var DELETE_NOTIFICATION =
|
|
1019
|
+
var DELETE_NOTIFICATION = gql12`
|
|
1033
1020
|
mutation deleteNotification($_id: ID!) {
|
|
1034
1021
|
deleteNotification(_id: $_id)
|
|
1035
1022
|
}
|
|
1036
1023
|
`;
|
|
1037
1024
|
|
|
1038
1025
|
// src/graphql/hooks/notifications/hooksMutation.ts
|
|
1039
|
-
var useCreateNotification = () => {
|
|
1040
|
-
const [createNotification, { loading, error }] = useMutation6(CREATE_NOTIFICATION);
|
|
1041
|
-
return { createNotification, error, loading };
|
|
1042
|
-
};
|
|
1043
1026
|
var useCreateBulkNotifications = () => {
|
|
1044
1027
|
const [createBulkNotifications, { loading, error }] = useMutation6(
|
|
1045
1028
|
CREATE_BULK_NOTIFICATIONS
|
|
@@ -1074,40 +1057,62 @@ var useDeleteNotification = () => {
|
|
|
1074
1057
|
return { deleteNotification, error, loading };
|
|
1075
1058
|
};
|
|
1076
1059
|
|
|
1077
|
-
// src/graphql/hooks/notifications/
|
|
1078
|
-
import {
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1060
|
+
// src/graphql/hooks/notifications/hooksSubscription.ts
|
|
1061
|
+
import { useSubscription as useSubscription2 } from "@apollo/client";
|
|
1062
|
+
|
|
1063
|
+
// src/graphql/subscriptions/notification.ts
|
|
1064
|
+
import { gql as gql13 } from "@apollo/client";
|
|
1065
|
+
var USER_NOTIFICATION_FRAGMENT2 = gql13`
|
|
1066
|
+
fragment UserNotificationFields on Notification {
|
|
1067
|
+
_id
|
|
1068
|
+
userId
|
|
1069
|
+
title
|
|
1070
|
+
message
|
|
1071
|
+
type
|
|
1072
|
+
isRead
|
|
1073
|
+
data
|
|
1074
|
+
createdAt
|
|
1075
|
+
updatedAt
|
|
1076
|
+
}
|
|
1077
|
+
`;
|
|
1078
|
+
var GET_USER_NOTIFICATIONS_SUBSCRIPTION = gql13`
|
|
1079
|
+
subscription getUserNotifications($userId: String!) {
|
|
1080
|
+
getUserNotifications(userId: $userId) {
|
|
1081
|
+
...UserNotificationFields
|
|
1087
1082
|
}
|
|
1083
|
+
}
|
|
1084
|
+
${USER_NOTIFICATION_FRAGMENT2}
|
|
1085
|
+
`;
|
|
1086
|
+
var GET_NOTIFICATION_COUNT_SUBSCRIPTION = gql13`
|
|
1087
|
+
subscription getNotificationCount($userId: String!) {
|
|
1088
|
+
getNotificationCount(userId: $userId) {
|
|
1089
|
+
total
|
|
1090
|
+
unread
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
`;
|
|
1094
|
+
|
|
1095
|
+
// src/graphql/hooks/notifications/hooksSubscription.ts
|
|
1096
|
+
var useGetUserNotificationsSubscription = (userId) => {
|
|
1097
|
+
const { data, loading, error } = useSubscription2(GET_USER_NOTIFICATIONS_SUBSCRIPTION, {
|
|
1098
|
+
skip: !userId,
|
|
1099
|
+
variables: { userId }
|
|
1088
1100
|
});
|
|
1089
|
-
const notifications = data?.userNotifications;
|
|
1090
1101
|
return {
|
|
1091
1102
|
error,
|
|
1092
1103
|
loading,
|
|
1093
|
-
notifications
|
|
1094
|
-
refetch
|
|
1104
|
+
notifications: data?.getUserNotifications || []
|
|
1095
1105
|
};
|
|
1096
1106
|
};
|
|
1097
|
-
var
|
|
1098
|
-
const { data,
|
|
1099
|
-
fetchPolicy: "no-cache",
|
|
1107
|
+
var useGetNotificationCountSubscription = (userId) => {
|
|
1108
|
+
const { data, loading, error } = useSubscription2(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
|
|
1100
1109
|
skip: !userId,
|
|
1101
|
-
variables: {
|
|
1102
|
-
userId
|
|
1103
|
-
}
|
|
1110
|
+
variables: { userId }
|
|
1104
1111
|
});
|
|
1105
|
-
const notificationCount = data?.notificationCount;
|
|
1106
1112
|
return {
|
|
1107
1113
|
error,
|
|
1108
1114
|
loading,
|
|
1109
|
-
notificationCount,
|
|
1110
|
-
refetch
|
|
1115
|
+
notificationCount: data?.getNotificationCount || { total: 0, unread: 0 }
|
|
1111
1116
|
};
|
|
1112
1117
|
};
|
|
1113
1118
|
|
|
@@ -1506,9 +1511,9 @@ var useDeleteRelation = () => {
|
|
|
1506
1511
|
};
|
|
1507
1512
|
|
|
1508
1513
|
// src/graphql/hooks/relation/hooksQuery.ts
|
|
1509
|
-
import { useQuery as
|
|
1514
|
+
import { useQuery as useQuery3 } from "@apollo/client";
|
|
1510
1515
|
var useGetRelation = (id) => {
|
|
1511
|
-
const { loading, error, data, refetch } =
|
|
1516
|
+
const { loading, error, data, refetch } = useQuery3(GET_RELATION, {
|
|
1512
1517
|
fetchPolicy: "network-only",
|
|
1513
1518
|
skip: id === "",
|
|
1514
1519
|
variables: { id }
|
|
@@ -1517,7 +1522,7 @@ var useGetRelation = (id) => {
|
|
|
1517
1522
|
return { error, loading, refetch, relation };
|
|
1518
1523
|
};
|
|
1519
1524
|
var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
|
|
1520
|
-
const { loading, error, data, refetch } =
|
|
1525
|
+
const { loading, error, data, refetch } = useQuery3(
|
|
1521
1526
|
GET_RELATION_BY_MARKET_AND_STALLHOLDER,
|
|
1522
1527
|
{
|
|
1523
1528
|
fetchPolicy: "network-only",
|
|
@@ -1529,7 +1534,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
|
|
|
1529
1534
|
return { error, loading, refetch, relationByMarketAndStallholder };
|
|
1530
1535
|
};
|
|
1531
1536
|
var useGetMarketRelations = (marketId) => {
|
|
1532
|
-
const { loading, error, data, refetch } =
|
|
1537
|
+
const { loading, error, data, refetch } = useQuery3(GET_MARKET_RELATIONS, {
|
|
1533
1538
|
fetchPolicy: "network-only",
|
|
1534
1539
|
skip: marketId === "",
|
|
1535
1540
|
variables: { marketId }
|
|
@@ -1538,7 +1543,7 @@ var useGetMarketRelations = (marketId) => {
|
|
|
1538
1543
|
return { error, loading, marketRelations, refetch };
|
|
1539
1544
|
};
|
|
1540
1545
|
var useGetStallholderRelations = (stallholderId) => {
|
|
1541
|
-
const { loading, error, data, refetch } =
|
|
1546
|
+
const { loading, error, data, refetch } = useQuery3(
|
|
1542
1547
|
GET_STALLHOLDER_RELATIONS,
|
|
1543
1548
|
{
|
|
1544
1549
|
fetchPolicy: "network-only",
|
|
@@ -1550,7 +1555,7 @@ var useGetStallholderRelations = (stallholderId) => {
|
|
|
1550
1555
|
return { error, loading, refetch, stallholderRelations };
|
|
1551
1556
|
};
|
|
1552
1557
|
var useGetResourceConnections = (resourceId, resourceType) => {
|
|
1553
|
-
const { loading, error, data, refetch } =
|
|
1558
|
+
const { loading, error, data, refetch } = useQuery3(GET_RESOURCE_CONNECTIONS, {
|
|
1554
1559
|
fetchPolicy: "network-only",
|
|
1555
1560
|
variables: { resourceId, resourceType }
|
|
1556
1561
|
});
|
|
@@ -1684,9 +1689,9 @@ var useUpdateStallholderInfo = () => {
|
|
|
1684
1689
|
};
|
|
1685
1690
|
|
|
1686
1691
|
// src/graphql/hooks/stallholder/hooksQuery.ts
|
|
1687
|
-
import { useQuery as
|
|
1692
|
+
import { useQuery as useQuery4 } from "@apollo/client";
|
|
1688
1693
|
var useGetStallholders = () => {
|
|
1689
|
-
const { loading, error, data, refetch } =
|
|
1694
|
+
const { loading, error, data, refetch } = useQuery4(GET_STALLHOLDERS, {
|
|
1690
1695
|
fetchPolicy: "network-only"
|
|
1691
1696
|
});
|
|
1692
1697
|
const stallholders = data?.stallholders;
|
|
@@ -1698,7 +1703,7 @@ var useGetStallholders = () => {
|
|
|
1698
1703
|
};
|
|
1699
1704
|
};
|
|
1700
1705
|
var useGetStallholder = (_id) => {
|
|
1701
|
-
const { loading, error, data, refetch } =
|
|
1706
|
+
const { loading, error, data, refetch } = useQuery4(GET_STALLHOLDER, {
|
|
1702
1707
|
fetchPolicy: "network-only",
|
|
1703
1708
|
skip: !_id,
|
|
1704
1709
|
variables: { _id }
|
|
@@ -1707,7 +1712,7 @@ var useGetStallholder = (_id) => {
|
|
|
1707
1712
|
return { error, loading, refetch, stallholder };
|
|
1708
1713
|
};
|
|
1709
1714
|
var useGetStallholdersByRegion = (region) => {
|
|
1710
|
-
const { loading, error, data, refetch } =
|
|
1715
|
+
const { loading, error, data, refetch } = useQuery4(
|
|
1711
1716
|
GET_STALLHOLDERS_BY_REGION,
|
|
1712
1717
|
{
|
|
1713
1718
|
fetchPolicy: "no-cache",
|
|
@@ -1719,7 +1724,7 @@ var useGetStallholdersByRegion = (region) => {
|
|
|
1719
1724
|
return { error, loading, refetch, stallholdersByRegion };
|
|
1720
1725
|
};
|
|
1721
1726
|
var useSearchStallholders = (search, region) => {
|
|
1722
|
-
const { loading, error, data, refetch } =
|
|
1727
|
+
const { loading, error, data, refetch } = useQuery4(SEARCH_STALLHOLDERS, {
|
|
1723
1728
|
fetchPolicy: "network-only",
|
|
1724
1729
|
skip: search.length < 3,
|
|
1725
1730
|
variables: { region, search }
|
|
@@ -1728,7 +1733,7 @@ var useSearchStallholders = (search, region) => {
|
|
|
1728
1733
|
return { error, loading, refetch, stallholderSearch };
|
|
1729
1734
|
};
|
|
1730
1735
|
var useGetStallholderInfo = (stallholderId) => {
|
|
1731
|
-
const { loading, error, data, refetch } =
|
|
1736
|
+
const { loading, error, data, refetch } = useQuery4(GET_STALLHOLDER_INFO, {
|
|
1732
1737
|
fetchPolicy: "network-only",
|
|
1733
1738
|
skip: !stallholderId,
|
|
1734
1739
|
variables: { stallholderId }
|
|
@@ -1834,9 +1839,9 @@ var useDeleteTester = () => {
|
|
|
1834
1839
|
};
|
|
1835
1840
|
|
|
1836
1841
|
// src/graphql/hooks/testers/hooksQuery.ts
|
|
1837
|
-
import { useQuery as
|
|
1842
|
+
import { useQuery as useQuery5 } from "@apollo/client";
|
|
1838
1843
|
var useGetTesters = () => {
|
|
1839
|
-
const { data, loading, error, refetch } =
|
|
1844
|
+
const { data, loading, error, refetch } = useQuery5(GET_TESTERS);
|
|
1840
1845
|
const testers = data?.testers;
|
|
1841
1846
|
return {
|
|
1842
1847
|
error,
|
|
@@ -1846,7 +1851,7 @@ var useGetTesters = () => {
|
|
|
1846
1851
|
};
|
|
1847
1852
|
};
|
|
1848
1853
|
var useGetTester = (_id) => {
|
|
1849
|
-
const { data, loading, error, refetch } =
|
|
1854
|
+
const { data, loading, error, refetch } = useQuery5(GET_TESTER, {
|
|
1850
1855
|
skip: !_id,
|
|
1851
1856
|
variables: { _id }
|
|
1852
1857
|
});
|
|
@@ -1955,37 +1960,37 @@ var useRemoveUserFavouriteResource = () => {
|
|
|
1955
1960
|
};
|
|
1956
1961
|
|
|
1957
1962
|
// src/graphql/hooks/user/hooksQuery.ts
|
|
1958
|
-
import { useQuery as
|
|
1963
|
+
import { useQuery as useQuery6 } from "@apollo/client";
|
|
1959
1964
|
var useGetUsers = () => {
|
|
1960
|
-
const { loading, error, data, refetch } =
|
|
1965
|
+
const { loading, error, data, refetch } = useQuery6(GET_USERS, {
|
|
1961
1966
|
fetchPolicy: "network-only"
|
|
1962
1967
|
});
|
|
1963
1968
|
const users = data?.users;
|
|
1964
1969
|
return { error, loading, refetch, users };
|
|
1965
1970
|
};
|
|
1966
1971
|
var useGetUser = (_id) => {
|
|
1967
|
-
const { loading, error, data, refetch } =
|
|
1972
|
+
const { loading, error, data, refetch } = useQuery6(GET_USER, {
|
|
1968
1973
|
variables: { _id }
|
|
1969
1974
|
});
|
|
1970
1975
|
const user = data?.user;
|
|
1971
1976
|
return { error, loading, refetch, user };
|
|
1972
1977
|
};
|
|
1973
1978
|
var useGetUserMarkets = () => {
|
|
1974
|
-
const { loading, error, data, refetch } =
|
|
1979
|
+
const { loading, error, data, refetch } = useQuery6(GET_USER_MARKETS, {
|
|
1975
1980
|
fetchPolicy: "network-only"
|
|
1976
1981
|
});
|
|
1977
1982
|
const userMarkets = data?.userMarkets;
|
|
1978
1983
|
return { error, loading, refetch, userMarkets };
|
|
1979
1984
|
};
|
|
1980
1985
|
var useGetUserStallholder = () => {
|
|
1981
|
-
const { loading, error, data, refetch } =
|
|
1986
|
+
const { loading, error, data, refetch } = useQuery6(GET_USER_STALLHOLDER, {
|
|
1982
1987
|
fetchPolicy: "network-only"
|
|
1983
1988
|
});
|
|
1984
1989
|
const userStallholder = data?.userStallholder;
|
|
1985
1990
|
return { error, loading, refetch, userStallholder };
|
|
1986
1991
|
};
|
|
1987
1992
|
var useGetUserFavourites = () => {
|
|
1988
|
-
const { loading, error, data, refetch } =
|
|
1993
|
+
const { loading, error, data, refetch } = useQuery6(GET_USER_FAVOURITES, {
|
|
1989
1994
|
fetchPolicy: "network-only"
|
|
1990
1995
|
});
|
|
1991
1996
|
const markets = data?.userFavourites.markets;
|
|
@@ -1997,7 +2002,6 @@ var useGetUserFavourites = () => {
|
|
|
1997
2002
|
return { error, loading, refetch, userFavourites };
|
|
1998
2003
|
};
|
|
1999
2004
|
export {
|
|
2000
|
-
GET_CHAT_MESSAGE,
|
|
2001
2005
|
useAddParticipantToChat,
|
|
2002
2006
|
useAddUserFavouriteResource,
|
|
2003
2007
|
useAdminUpdateResourceType,
|
|
@@ -2006,7 +2010,6 @@ export {
|
|
|
2006
2010
|
useCreateChat,
|
|
2007
2011
|
useCreateMarket,
|
|
2008
2012
|
useCreateMarketInfo,
|
|
2009
|
-
useCreateNotification,
|
|
2010
2013
|
useCreatePoster,
|
|
2011
2014
|
useCreatePushToken,
|
|
2012
2015
|
useCreateRelation,
|
|
@@ -2029,7 +2032,7 @@ export {
|
|
|
2029
2032
|
useGetMarkets,
|
|
2030
2033
|
useGetMarketsByRegion,
|
|
2031
2034
|
useGetMarketsNearMe,
|
|
2032
|
-
|
|
2035
|
+
useGetNotificationCountSubscription,
|
|
2033
2036
|
useGetRelation,
|
|
2034
2037
|
useGetRelationByMarketAndStallholder,
|
|
2035
2038
|
useGetResourceConnections,
|
|
@@ -2044,7 +2047,7 @@ export {
|
|
|
2044
2047
|
useGetUserChats,
|
|
2045
2048
|
useGetUserFavourites,
|
|
2046
2049
|
useGetUserMarkets,
|
|
2047
|
-
|
|
2050
|
+
useGetUserNotificationsSubscription,
|
|
2048
2051
|
useGetUserStallholder,
|
|
2049
2052
|
useGetUsers,
|
|
2050
2053
|
useLogin,
|