@timardex/cluemart-shared 1.5.802 → 1.5.803

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.
@@ -12,7 +12,7 @@ import {
12
12
  EnumPostContentType,
13
13
  EnumPostType
14
14
  } from "../chunk-YVIZ4AWF.mjs";
15
- import "../chunk-3NDZHCTN.mjs";
15
+ import "../chunk-G76ILLVZ.mjs";
16
16
  import "../chunk-NPFJ2CN2.mjs";
17
17
  import "../chunk-JD7CKX4S.mjs";
18
18
  import {
package/dist/index.cjs CHANGED
@@ -385,6 +385,7 @@ __export(index_exports, {
385
385
  useMarkAllNotificationsRead: () => useMarkAllNotificationsRead,
386
386
  useMarkChatMessagesSeen: () => useMarkChatMessagesSeen,
387
387
  useMarkNotificationRead: () => useMarkNotificationRead,
388
+ useRedeemAffiliateReward: () => useRedeemAffiliateReward,
388
389
  useRedeemReward: () => useRedeemReward,
389
390
  useRefreshToken: () => useRefreshToken,
390
391
  useRegister: () => useRegister,
@@ -8742,6 +8743,14 @@ var DELETE_AFFILIATE_MUTATION = import_client76.gql`
8742
8743
  deleteAffiliate(_id: $_id)
8743
8744
  }
8744
8745
  `;
8746
+ var REDEEM_AFFILIATE_REWARD_MUTATION = import_client76.gql`
8747
+ mutation redeemAffiliateReward($affiliateId: ID!) {
8748
+ redeemAffiliateReward(affiliateId: $affiliateId) {
8749
+ ...AffiliateFields
8750
+ }
8751
+ }
8752
+ ${AFFILIATE_FIELDS_FRAGMENT}
8753
+ `;
8745
8754
 
8746
8755
  // src/graphql/hooks/affiliate/hooksMutation.ts
8747
8756
  var useUpdateAffiliateDetails = () => {
@@ -8768,6 +8777,20 @@ var useDeleteAffiliate = () => {
8768
8777
  );
8769
8778
  return { deleteAffiliate, error, loading };
8770
8779
  };
8780
+ var useRedeemAffiliateReward = () => {
8781
+ const [redeemAffiliateReward, { loading, error }] = (0, import_client77.useMutation)(
8782
+ REDEEM_AFFILIATE_REWARD_MUTATION,
8783
+ {
8784
+ awaitRefetchQueries: true,
8785
+ refetchQueries: (mutationResult) => {
8786
+ const affiliateId = mutationResult?.data?.redeemAffiliateReward?._id;
8787
+ if (!affiliateId) return [];
8788
+ return [{ query: GET_AFFILIATE, variables: { _id: affiliateId } }];
8789
+ }
8790
+ }
8791
+ );
8792
+ return { error, loading, redeemAffiliateReward };
8793
+ };
8771
8794
 
8772
8795
  // src/images/index.ts
8773
8796
  var PKG = "@timardex/cluemart-shared";
@@ -9418,6 +9441,7 @@ var fonts = {
9418
9441
  useMarkAllNotificationsRead,
9419
9442
  useMarkChatMessagesSeen,
9420
9443
  useMarkNotificationRead,
9444
+ useRedeemAffiliateReward,
9421
9445
  useRedeemReward,
9422
9446
  useRefreshToken,
9423
9447
  useRegister,