@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.
- package/dist/{chunk-GK773FVL.mjs → chunk-6BK45KML.mjs} +29 -3
- package/dist/{chunk-GK773FVL.mjs.map → chunk-6BK45KML.mjs.map} +1 -1
- package/dist/{chunk-H4UY76FG.mjs → chunk-76HG44I2.mjs} +2 -2
- package/dist/{chunk-O2TNYFUH.mjs → chunk-YG7YTCX5.mjs} +1 -1
- package/dist/{chunk-O2TNYFUH.mjs.map → chunk-YG7YTCX5.mjs.map} +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/graphql/index.cjs +29 -2
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +12 -1
- package/dist/graphql/index.d.ts +12 -1
- package/dist/graphql/index.mjs +3 -1
- package/dist/hooks/index.cjs +20 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +3 -3
- package/dist/index.cjs +29 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.mjs +28 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-H4UY76FG.mjs.map → chunk-76HG44I2.mjs.map} +0 -0
|
@@ -3684,8 +3684,18 @@ var COUPON = gql36`
|
|
|
3684
3684
|
${COUPON_DATA_FIELDS_FRAGMENT}
|
|
3685
3685
|
`;
|
|
3686
3686
|
var GET_COUPONS = gql36`
|
|
3687
|
-
query getCoupons(
|
|
3688
|
-
|
|
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-
|
|
3998
|
+
//# sourceMappingURL=chunk-6BK45KML.mjs.map
|