@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/hooks/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -250,6 +250,7 @@ __export(index_exports, {
|
|
|
250
250
|
useToggleChatMessageLike: () => useToggleChatMessageLike,
|
|
251
251
|
useUpdateAd: () => useUpdateAd,
|
|
252
252
|
useUpdateAppSettings: () => useUpdateAppSettings,
|
|
253
|
+
useUpdateDailyClueGame: () => useUpdateDailyClueGame,
|
|
253
254
|
useUpdateEvent: () => useUpdateEvent,
|
|
254
255
|
useUpdateEventInfo: () => useUpdateEventInfo,
|
|
255
256
|
useUpdateGoogleImportedMarkets: () => useUpdateGoogleImportedMarkets,
|
|
@@ -6072,6 +6073,14 @@ var LEAVE_GAME_MUTATION = import_client64.gql`
|
|
|
6072
6073
|
leaveGame(_id: $_id, gameType: $gameType)
|
|
6073
6074
|
}
|
|
6074
6075
|
`;
|
|
6076
|
+
var UPDATE_DAILY_CLUE_MUTATION = import_client64.gql`
|
|
6077
|
+
mutation updateDailyClueGame($_id: ID!, $foundLetter: String!) {
|
|
6078
|
+
updateDailyClueGame(_id: $_id, foundLetter: $foundLetter) {
|
|
6079
|
+
...GameFields
|
|
6080
|
+
}
|
|
6081
|
+
}
|
|
6082
|
+
${GAME_FIELDS_FRAGMENT}
|
|
6083
|
+
`;
|
|
6075
6084
|
|
|
6076
6085
|
// src/graphql/hooks/game/hooksMutation.ts
|
|
6077
6086
|
var useStartGame = () => {
|
|
@@ -6079,12 +6088,18 @@ var useStartGame = () => {
|
|
|
6079
6088
|
awaitRefetchQueries: true,
|
|
6080
6089
|
refetchQueries: (mutationResult) => {
|
|
6081
6090
|
const gameId = mutationResult?.data?.startGame?._id;
|
|
6082
|
-
|
|
6091
|
+
const userId = mutationResult?.data?.startGame?.owner?.userId;
|
|
6092
|
+
if (!gameId || !userId) return [];
|
|
6083
6093
|
return [
|
|
6084
6094
|
{
|
|
6085
6095
|
query: GET_GAME,
|
|
6086
6096
|
variables: { _id: gameId }
|
|
6087
6097
|
// Pass the gameId for refetching
|
|
6098
|
+
},
|
|
6099
|
+
{
|
|
6100
|
+
query: GET_USER,
|
|
6101
|
+
variables: { _id: userId }
|
|
6102
|
+
// Pass the userId for refetching
|
|
6088
6103
|
}
|
|
6089
6104
|
];
|
|
6090
6105
|
}
|
|
@@ -6102,6 +6117,23 @@ var useLeaveGame = () => {
|
|
|
6102
6117
|
});
|
|
6103
6118
|
return { error, leaveGame, loading };
|
|
6104
6119
|
};
|
|
6120
|
+
var useUpdateDailyClueGame = () => {
|
|
6121
|
+
const [updateDailyClueGame, { loading, error }] = (0, import_client65.useMutation)(UPDATE_DAILY_CLUE_MUTATION, {
|
|
6122
|
+
awaitRefetchQueries: true,
|
|
6123
|
+
refetchQueries: (mutationResult) => {
|
|
6124
|
+
const gameId = mutationResult?.data?.updateDailyClueGame?._id;
|
|
6125
|
+
if (!gameId) return [];
|
|
6126
|
+
return [
|
|
6127
|
+
{
|
|
6128
|
+
query: GET_GAME,
|
|
6129
|
+
variables: { _id: gameId }
|
|
6130
|
+
// Pass the gameId for refetching
|
|
6131
|
+
}
|
|
6132
|
+
];
|
|
6133
|
+
}
|
|
6134
|
+
});
|
|
6135
|
+
return { error, loading, updateDailyClueGame };
|
|
6136
|
+
};
|
|
6105
6137
|
|
|
6106
6138
|
// src/graphql/hooks/game/hooksQuery.ts
|
|
6107
6139
|
var import_client66 = require("@apollo/client");
|
|
@@ -8168,6 +8200,7 @@ var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
|
8168
8200
|
useToggleChatMessageLike,
|
|
8169
8201
|
useUpdateAd,
|
|
8170
8202
|
useUpdateAppSettings,
|
|
8203
|
+
useUpdateDailyClueGame,
|
|
8171
8204
|
useUpdateEvent,
|
|
8172
8205
|
useUpdateEventInfo,
|
|
8173
8206
|
useUpdateGoogleImportedMarkets,
|