@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.
- package/dist/{chunk-3NDZHCTN.mjs → chunk-G76ILLVZ.mjs} +25 -2
- package/dist/{chunk-3NDZHCTN.mjs.map → chunk-G76ILLVZ.mjs.map} +1 -1
- package/dist/graphql/index.cjs +24 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +6 -1
- package/dist/graphql/index.d.ts +6 -1
- 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 +24 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +23 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/hooks/index.mjs
CHANGED
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,
|