@timardex/cluemart-shared 1.4.6 → 1.4.8

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.
@@ -116,7 +116,17 @@ declare const useAddParticipantToChat: () => {
116
116
  declare const useRemoveParticipantFromChat: () => {
117
117
  error: _apollo_client.ApolloError | undefined;
118
118
  loading: boolean;
119
- removeParticipantFromChat: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
119
+ removeParticipantFromChat: (options?: _apollo_client.MutationFunctionOptions<{
120
+ removeParticipantFromChat: {
121
+ success: boolean;
122
+ region?: string | null;
123
+ };
124
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
125
+ removeParticipantFromChat: {
126
+ success: boolean;
127
+ region?: string | null;
128
+ };
129
+ }>>;
120
130
  };
121
131
  declare const useToggleChatMessageLike: () => {
122
132
  error: _apollo_client.ApolloError | undefined;
@@ -116,7 +116,17 @@ declare const useAddParticipantToChat: () => {
116
116
  declare const useRemoveParticipantFromChat: () => {
117
117
  error: _apollo_client.ApolloError | undefined;
118
118
  loading: boolean;
119
- removeParticipantFromChat: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
119
+ removeParticipantFromChat: (options?: _apollo_client.MutationFunctionOptions<{
120
+ removeParticipantFromChat: {
121
+ success: boolean;
122
+ region?: string | null;
123
+ };
124
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
125
+ removeParticipantFromChat: {
126
+ success: boolean;
127
+ region?: string | null;
128
+ };
129
+ }>>;
120
130
  };
121
131
  declare const useToggleChatMessageLike: () => {
122
132
  error: _apollo_client.ApolloError | undefined;
@@ -1081,7 +1081,10 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = gql8`
1081
1081
  `;
1082
1082
  var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql8`
1083
1083
  mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {
1084
- removeParticipantFromChat(chatId: $chatId, userId: $userId)
1084
+ removeParticipantFromChat(chatId: $chatId, userId: $userId) {
1085
+ success
1086
+ region
1087
+ }
1085
1088
  }
1086
1089
  `;
1087
1090
  var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = gql8`
@@ -1143,13 +1146,16 @@ var useAddParticipantToChat = () => {
1143
1146
  return { addParticipantToChat, error, loading };
1144
1147
  };
1145
1148
  var useRemoveParticipantFromChat = () => {
1146
- const [removeParticipantFromChat, { loading, error }] = useMutation3(
1147
- REMOVE_PARTICIPANT_FROM_CHAT_MUTATION,
1148
- {
1149
- awaitRefetchQueries: true,
1150
- refetchQueries: [{ query: USER_CHATS }]
1149
+ const [removeParticipantFromChat, { loading, error }] = useMutation3(REMOVE_PARTICIPANT_FROM_CHAT_MUTATION, {
1150
+ awaitRefetchQueries: true,
1151
+ refetchQueries: (mutationResult) => {
1152
+ const region = mutationResult?.data?.removeParticipantFromChat?.region;
1153
+ return [
1154
+ { query: USER_CHATS },
1155
+ { query: GET_CHATS_BY_REGION, variables: { region } }
1156
+ ];
1151
1157
  }
1152
- );
1158
+ });
1153
1159
  return { error, loading, removeParticipantFromChat };
1154
1160
  };
1155
1161
  var useToggleChatMessageLike = () => {