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