@timardex/cluemart-shared 1.7.62 → 1.7.64

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.
@@ -3684,8 +3684,18 @@ var COUPON = gql36`
3684
3684
  ${COUPON_DATA_FIELDS_FRAGMENT}
3685
3685
  `;
3686
3686
  var GET_COUPONS = gql36`
3687
- query getCoupons($region: String, $category: String) {
3688
- coupons(region: $region, category: $category) {
3687
+ query getCoupons(
3688
+ $region: String
3689
+ $category: String
3690
+ $resourceId: String
3691
+ $resourceType: ResourceTypeEnum
3692
+ ) {
3693
+ coupons(
3694
+ region: $region
3695
+ category: $category
3696
+ resourceId: $resourceId
3697
+ resourceType: $resourceType
3698
+ ) {
3689
3699
  active {
3690
3700
  listName
3691
3701
  data {
@@ -3764,6 +3774,14 @@ var SCAN_COUPON_MUTATION = gql37`
3764
3774
  }
3765
3775
  }
3766
3776
  `;
3777
+ var REWARD_COUPON_MUTATION = gql37`
3778
+ mutation rewardCoupon($input: ProductCouponInputType!, $userId: ID!) {
3779
+ rewardCoupon(input: $input, userId: $userId) {
3780
+ data
3781
+ message
3782
+ }
3783
+ }
3784
+ `;
3767
3785
 
3768
3786
  // src/graphql/hooks/coupon/hooksMutation.ts
3769
3787
  var useCreateCoupon = () => {
@@ -3794,6 +3812,13 @@ var useScanCoupon = () => {
3794
3812
  });
3795
3813
  return { error, loading, scanCoupon };
3796
3814
  };
3815
+ var useRewardCoupon = () => {
3816
+ const [rewardCoupon, { loading, error }] = useMutation20(REWARD_COUPON_MUTATION, {
3817
+ awaitRefetchQueries: true,
3818
+ refetchQueries: [{ query: GET_COUPONS }]
3819
+ });
3820
+ return { error, loading, rewardCoupon };
3821
+ };
3797
3822
 
3798
3823
  // src/graphql/hooks/coupon/hooksQuery.ts
3799
3824
  import { useQuery as useQuery15 } from "@apollo/client";
@@ -3966,7 +3991,8 @@ export {
3966
3991
  useUpdateCoupon,
3967
3992
  useDeleteCoupon,
3968
3993
  useScanCoupon,
3994
+ useRewardCoupon,
3969
3995
  useGetCoupons,
3970
3996
  useGetCoupon
3971
3997
  };
3972
- //# sourceMappingURL=chunk-GK773FVL.mjs.map
3998
+ //# sourceMappingURL=chunk-6BK45KML.mjs.map