@timardex/cluemart-shared 1.4.95 → 1.4.97
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-AO6V6GMT.mjs → chunk-4VZXLFSL.mjs} +12 -21
- package/dist/chunk-4VZXLFSL.mjs.map +1 -0
- package/dist/graphql/index.cjs +11 -20
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +3 -11
- package/dist/graphql/index.d.ts +3 -11
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +4 -6
- 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 +1 -1
- package/dist/index.cjs +11 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -11
- package/dist/index.d.ts +3 -11
- package/dist/index.mjs +11 -20
- package/dist/index.mjs.map +1 -1
- package/dist/{post-D_AB5f0f.d.ts → post-DdQKmJ86.d.ts} +1 -1
- package/dist/{post-BAUVZFAG.d.mts → post-XlgaT3Yb.d.mts} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-AO6V6GMT.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -840,7 +840,7 @@ interface UserType {
|
|
|
840
840
|
email: string;
|
|
841
841
|
events: string[] | null;
|
|
842
842
|
firstName: string;
|
|
843
|
-
|
|
843
|
+
game: string | null;
|
|
844
844
|
isTester: boolean;
|
|
845
845
|
lastName: string;
|
|
846
846
|
licences: UserLicenceType[] | null;
|
|
@@ -2155,19 +2155,11 @@ declare const useStartGame: () => {
|
|
|
2155
2155
|
};
|
|
2156
2156
|
declare const useLeaveGame: () => {
|
|
2157
2157
|
error: _apollo_client.ApolloError | undefined;
|
|
2158
|
-
leaveGame: (options?: _apollo_client.MutationFunctionOptions<
|
|
2159
|
-
leaveGame: {
|
|
2160
|
-
userId: string;
|
|
2161
|
-
};
|
|
2162
|
-
}, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
|
|
2163
|
-
leaveGame: {
|
|
2164
|
-
userId: string;
|
|
2165
|
-
};
|
|
2166
|
-
}>>;
|
|
2158
|
+
leaveGame: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
2167
2159
|
loading: boolean;
|
|
2168
2160
|
};
|
|
2169
2161
|
|
|
2170
|
-
declare const useGetGames: (
|
|
2162
|
+
declare const useGetGames: () => {
|
|
2171
2163
|
error: _apollo_client.ApolloError | undefined;
|
|
2172
2164
|
games: GameType[];
|
|
2173
2165
|
loading: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -840,7 +840,7 @@ interface UserType {
|
|
|
840
840
|
email: string;
|
|
841
841
|
events: string[] | null;
|
|
842
842
|
firstName: string;
|
|
843
|
-
|
|
843
|
+
game: string | null;
|
|
844
844
|
isTester: boolean;
|
|
845
845
|
lastName: string;
|
|
846
846
|
licences: UserLicenceType[] | null;
|
|
@@ -2155,19 +2155,11 @@ declare const useStartGame: () => {
|
|
|
2155
2155
|
};
|
|
2156
2156
|
declare const useLeaveGame: () => {
|
|
2157
2157
|
error: _apollo_client.ApolloError | undefined;
|
|
2158
|
-
leaveGame: (options?: _apollo_client.MutationFunctionOptions<
|
|
2159
|
-
leaveGame: {
|
|
2160
|
-
userId: string;
|
|
2161
|
-
};
|
|
2162
|
-
}, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
|
|
2163
|
-
leaveGame: {
|
|
2164
|
-
userId: string;
|
|
2165
|
-
};
|
|
2166
|
-
}>>;
|
|
2158
|
+
leaveGame: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
2167
2159
|
loading: boolean;
|
|
2168
2160
|
};
|
|
2169
2161
|
|
|
2170
|
-
declare const useGetGames: (
|
|
2162
|
+
declare const useGetGames: () => {
|
|
2171
2163
|
error: _apollo_client.ApolloError | undefined;
|
|
2172
2164
|
games: GameType[];
|
|
2173
2165
|
loading: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -2444,7 +2444,7 @@ var USER_FIELDS_FRAGMENT = gql2`
|
|
|
2444
2444
|
email
|
|
2445
2445
|
events
|
|
2446
2446
|
firstName
|
|
2447
|
-
|
|
2447
|
+
game
|
|
2448
2448
|
isTester
|
|
2449
2449
|
lastName
|
|
2450
2450
|
licences {
|
|
@@ -5516,8 +5516,8 @@ var GAME_FIELDS_FRAGMENT = gql29`
|
|
|
5516
5516
|
${OWNER_FIELDS_FRAGMENT}
|
|
5517
5517
|
`;
|
|
5518
5518
|
var GET_GAMES = gql29`
|
|
5519
|
-
query getGames
|
|
5520
|
-
games
|
|
5519
|
+
query getGames {
|
|
5520
|
+
games {
|
|
5521
5521
|
...GameFields
|
|
5522
5522
|
}
|
|
5523
5523
|
}
|
|
@@ -5781,9 +5781,7 @@ var START_GAME_MUTATION = gql34`
|
|
|
5781
5781
|
`;
|
|
5782
5782
|
var LEAVE_GAME_MUTATION = gql34`
|
|
5783
5783
|
mutation leaveGame($_id: ID!, $gameType: GameTypeEnumType!) {
|
|
5784
|
-
leaveGame(_id: $_id, gameType: $gameType)
|
|
5785
|
-
userId
|
|
5786
|
-
}
|
|
5784
|
+
leaveGame(_id: $_id, gameType: $gameType)
|
|
5787
5785
|
}
|
|
5788
5786
|
`;
|
|
5789
5787
|
|
|
@@ -5808,27 +5806,20 @@ var useStartGame = () => {
|
|
|
5808
5806
|
var useLeaveGame = () => {
|
|
5809
5807
|
const [leaveGame, { loading, error }] = useMutation18(LEAVE_GAME_MUTATION, {
|
|
5810
5808
|
awaitRefetchQueries: true,
|
|
5811
|
-
refetchQueries:
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
query: GET_GAMES,
|
|
5817
|
-
variables: { userId }
|
|
5818
|
-
// Pass the userId for refetching
|
|
5819
|
-
}
|
|
5820
|
-
];
|
|
5821
|
-
}
|
|
5809
|
+
refetchQueries: [
|
|
5810
|
+
{
|
|
5811
|
+
query: GET_GAMES
|
|
5812
|
+
}
|
|
5813
|
+
]
|
|
5822
5814
|
});
|
|
5823
5815
|
return { error, leaveGame, loading };
|
|
5824
5816
|
};
|
|
5825
5817
|
|
|
5826
5818
|
// src/graphql/hooks/game/hooksQuery.ts
|
|
5827
5819
|
import { useQuery as useQuery13 } from "@apollo/client";
|
|
5828
|
-
var useGetGames = (
|
|
5820
|
+
var useGetGames = () => {
|
|
5829
5821
|
const { loading, error, data, refetch } = useQuery13(GET_GAMES, {
|
|
5830
|
-
fetchPolicy: "network-only"
|
|
5831
|
-
variables: { userId }
|
|
5822
|
+
fetchPolicy: "network-only"
|
|
5832
5823
|
});
|
|
5833
5824
|
const games = data?.games || [];
|
|
5834
5825
|
return { error, games, loading, refetch };
|