@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.
@@ -1,5 +1,5 @@
1
1
  import { L as LocationType, i as VendorFormData, j as CreateVendorFormData, k as VendorInfoFormData, l as CreateVendorInfoFormData, m as EventFormData, n as CreateEventFormData, o as EventInfoFormData, p as CreateEventInfoFormData, q as UnregisteredVendorFormData, B as BaseResourceTypeFormData } from '../global-MMBYi34A.mjs';
2
- import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-XlgaT3Yb.mjs';
2
+ import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-DCtZdyYx.mjs';
3
3
  import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-DtPfNKc4.mjs';
4
4
  import 'react-hook-form';
5
5
  import '../enums/index.mjs';
@@ -1,5 +1,5 @@
1
1
  import { L as LocationType, i as VendorFormData, j as CreateVendorFormData, k as VendorInfoFormData, l as CreateVendorInfoFormData, m as EventFormData, n as CreateEventFormData, o as EventInfoFormData, p as CreateEventInfoFormData, q as UnregisteredVendorFormData, B as BaseResourceTypeFormData } from '../global-B0WdAD-8.js';
2
- import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-DdQKmJ86.js';
2
+ import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-DVWX_kia.js';
3
3
  import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-B5tprOIL.js';
4
4
  import 'react-hook-form';
5
5
  import '../enums/index.js';
@@ -1,5 +1,5 @@
1
1
  import "../chunk-4LT5GOOP.mjs";
2
- import "../chunk-4VZXLFSL.mjs";
2
+ import "../chunk-X52YRYVX.mjs";
3
3
  import "../chunk-DWO35OY4.mjs";
4
4
  import "../chunk-I7WE3EBR.mjs";
5
5
  import {
@@ -9,7 +9,7 @@ import {
9
9
  EnumAdType,
10
10
  EnumPostContentType,
11
11
  EnumPostType
12
- } from "../chunk-DQNJKQTY.mjs";
12
+ } from "../chunk-DMNIELEW.mjs";
13
13
  import {
14
14
  dateFormat,
15
15
  normalizeUrl,
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,
@@ -5768,7 +5769,6 @@ var BASE_GAME_FIELDS_FRAGMENT = import_client55.gql`
5768
5769
  }
5769
5770
  gameSolution
5770
5771
  gameType
5771
- title
5772
5772
  }
5773
5773
  `;
5774
5774
  var DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = import_client55.gql`
@@ -6072,6 +6072,14 @@ var LEAVE_GAME_MUTATION = import_client64.gql`
6072
6072
  leaveGame(_id: $_id, gameType: $gameType)
6073
6073
  }
6074
6074
  `;
6075
+ var UPDATE_DAILY_CLUE_MUTATION = import_client64.gql`
6076
+ mutation updateDailyClueGame($_id: ID!, $foundLetter: String!) {
6077
+ updateDailyClueGame(_id: $_id, foundLetter: $foundLetter) {
6078
+ ...GameFields
6079
+ }
6080
+ }
6081
+ ${GAME_FIELDS_FRAGMENT}
6082
+ `;
6075
6083
 
6076
6084
  // src/graphql/hooks/game/hooksMutation.ts
6077
6085
  var useStartGame = () => {
@@ -6079,12 +6087,18 @@ var useStartGame = () => {
6079
6087
  awaitRefetchQueries: true,
6080
6088
  refetchQueries: (mutationResult) => {
6081
6089
  const gameId = mutationResult?.data?.startGame?._id;
6082
- if (!gameId) return [];
6090
+ const userId = mutationResult?.data?.startGame?.owner?.userId;
6091
+ if (!gameId || !userId) return [];
6083
6092
  return [
6084
6093
  {
6085
6094
  query: GET_GAME,
6086
6095
  variables: { _id: gameId }
6087
6096
  // Pass the gameId for refetching
6097
+ },
6098
+ {
6099
+ query: GET_USER,
6100
+ variables: { _id: userId }
6101
+ // Pass the userId for refetching
6088
6102
  }
6089
6103
  ];
6090
6104
  }
@@ -6102,6 +6116,23 @@ var useLeaveGame = () => {
6102
6116
  });
6103
6117
  return { error, leaveGame, loading };
6104
6118
  };
6119
+ var useUpdateDailyClueGame = () => {
6120
+ const [updateDailyClueGame, { loading, error }] = (0, import_client65.useMutation)(UPDATE_DAILY_CLUE_MUTATION, {
6121
+ awaitRefetchQueries: true,
6122
+ refetchQueries: (mutationResult) => {
6123
+ const gameId = mutationResult?.data?.updateDailyClueGame?._id;
6124
+ if (!gameId) return [];
6125
+ return [
6126
+ {
6127
+ query: GET_GAME,
6128
+ variables: { _id: gameId }
6129
+ // Pass the gameId for refetching
6130
+ }
6131
+ ];
6132
+ }
6133
+ });
6134
+ return { error, loading, updateDailyClueGame };
6135
+ };
6105
6136
 
6106
6137
  // src/graphql/hooks/game/hooksQuery.ts
6107
6138
  var import_client66 = require("@apollo/client");
@@ -8168,6 +8199,7 @@ var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
8168
8199
  useToggleChatMessageLike,
8169
8200
  useUpdateAd,
8170
8201
  useUpdateAppSettings,
8202
+ useUpdateDailyClueGame,
8171
8203
  useUpdateEvent,
8172
8204
  useUpdateEventInfo,
8173
8205
  useUpdateGoogleImportedMarkets,