@timardex/cluemart-shared 1.4.97 → 1.4.98
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/{chunk-4VZXLFSL.mjs → chunk-STGIPJMO.mjs} +34 -2
- package/dist/{chunk-4VZXLFSL.mjs.map → chunk-STGIPJMO.mjs.map} +1 -1
- package/dist/graphql/index.cjs +34 -1
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +12 -7
- package/dist/graphql/index.d.ts +12 -7
- package/dist/graphql/index.mjs +3 -1
- package/dist/hooks/index.cjs +8 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +34 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.mjs +33 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/graphql/index.cjs
CHANGED
|
@@ -133,6 +133,7 @@ __export(graphql_exports, {
|
|
|
133
133
|
useToggleChatMessageLike: () => useToggleChatMessageLike,
|
|
134
134
|
useUpdateAd: () => useUpdateAd,
|
|
135
135
|
useUpdateAppSettings: () => useUpdateAppSettings,
|
|
136
|
+
useUpdateDailyClueGame: () => useUpdateDailyClueGame,
|
|
136
137
|
useUpdateEvent: () => useUpdateEvent,
|
|
137
138
|
useUpdateEventInfo: () => useUpdateEventInfo,
|
|
138
139
|
useUpdateGoogleImportedMarkets: () => useUpdateGoogleImportedMarkets,
|
|
@@ -3656,6 +3657,14 @@ var LEAVE_GAME_MUTATION = import_client64.gql`
|
|
|
3656
3657
|
leaveGame(_id: $_id, gameType: $gameType)
|
|
3657
3658
|
}
|
|
3658
3659
|
`;
|
|
3660
|
+
var UPDATE_DAILY_CLUE_MUTATION = import_client64.gql`
|
|
3661
|
+
mutation updateDailyClueGame($_id: ID!, $foundLetter: String!) {
|
|
3662
|
+
updateDailyClueGame(_id: $_id, foundLetter: $foundLetter) {
|
|
3663
|
+
...GameFields
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
${GAME_FIELDS_FRAGMENT}
|
|
3667
|
+
`;
|
|
3659
3668
|
|
|
3660
3669
|
// src/graphql/hooks/game/hooksMutation.ts
|
|
3661
3670
|
var useStartGame = () => {
|
|
@@ -3663,12 +3672,18 @@ var useStartGame = () => {
|
|
|
3663
3672
|
awaitRefetchQueries: true,
|
|
3664
3673
|
refetchQueries: (mutationResult) => {
|
|
3665
3674
|
const gameId = mutationResult?.data?.startGame?._id;
|
|
3666
|
-
|
|
3675
|
+
const userId = mutationResult?.data?.startGame?.owner?.userId;
|
|
3676
|
+
if (!gameId || !userId) return [];
|
|
3667
3677
|
return [
|
|
3668
3678
|
{
|
|
3669
3679
|
query: GET_GAME,
|
|
3670
3680
|
variables: { _id: gameId }
|
|
3671
3681
|
// Pass the gameId for refetching
|
|
3682
|
+
},
|
|
3683
|
+
{
|
|
3684
|
+
query: GET_USER,
|
|
3685
|
+
variables: { _id: userId }
|
|
3686
|
+
// Pass the userId for refetching
|
|
3672
3687
|
}
|
|
3673
3688
|
];
|
|
3674
3689
|
}
|
|
@@ -3686,6 +3701,23 @@ var useLeaveGame = () => {
|
|
|
3686
3701
|
});
|
|
3687
3702
|
return { error, leaveGame, loading };
|
|
3688
3703
|
};
|
|
3704
|
+
var useUpdateDailyClueGame = () => {
|
|
3705
|
+
const [updateDailyClueGame, { loading, error }] = (0, import_client65.useMutation)(UPDATE_DAILY_CLUE_MUTATION, {
|
|
3706
|
+
awaitRefetchQueries: true,
|
|
3707
|
+
refetchQueries: (mutationResult) => {
|
|
3708
|
+
const gameId = mutationResult?.data?.updateDailyClueGame?._id;
|
|
3709
|
+
if (!gameId) return [];
|
|
3710
|
+
return [
|
|
3711
|
+
{
|
|
3712
|
+
query: GET_GAME,
|
|
3713
|
+
variables: { _id: gameId }
|
|
3714
|
+
// Pass the gameId for refetching
|
|
3715
|
+
}
|
|
3716
|
+
];
|
|
3717
|
+
}
|
|
3718
|
+
});
|
|
3719
|
+
return { error, loading, updateDailyClueGame };
|
|
3720
|
+
};
|
|
3689
3721
|
|
|
3690
3722
|
// src/graphql/hooks/game/hooksQuery.ts
|
|
3691
3723
|
var import_client66 = require("@apollo/client");
|
|
@@ -3820,6 +3852,7 @@ var useGetGame = (_id) => {
|
|
|
3820
3852
|
useToggleChatMessageLike,
|
|
3821
3853
|
useUpdateAd,
|
|
3822
3854
|
useUpdateAppSettings,
|
|
3855
|
+
useUpdateDailyClueGame,
|
|
3823
3856
|
useUpdateEvent,
|
|
3824
3857
|
useUpdateEventInfo,
|
|
3825
3858
|
useUpdateGoogleImportedMarkets,
|