@timardex/cluemart-shared 1.7.57 → 1.7.58
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-MGSDQSWS.mjs → chunk-WRV55PDR.mjs} +24 -1
- package/dist/{chunk-MGSDQSWS.mjs.map → chunk-WRV55PDR.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 +10 -1
- package/dist/graphql/index.d.ts +10 -1
- package/dist/graphql/index.mjs +3 -1
- package/dist/hooks/index.cjs +11 -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 +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.mjs +23 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3425,6 +3425,17 @@ import { useMutation as useMutation19 } from "@apollo/client";
|
|
|
3425
3425
|
|
|
3426
3426
|
// src/graphql/mutations/affiliate.ts
|
|
3427
3427
|
import { gql as gql35 } from "@apollo/client";
|
|
3428
|
+
var CREATE_AFFILIATE_MUTATION = gql35`
|
|
3429
|
+
mutation createAffiliate($input: AffiliateDetailsInputType!) {
|
|
3430
|
+
createAffiliate(input: $input) {
|
|
3431
|
+
data {
|
|
3432
|
+
...AffiliateFields
|
|
3433
|
+
}
|
|
3434
|
+
message
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
${AFFILIATE_FIELDS_FRAGMENT}
|
|
3438
|
+
`;
|
|
3428
3439
|
var UPDATE_AFFILIATE_DETAILS_MUTATION = gql35`
|
|
3429
3440
|
mutation updateAffiliateDetails(
|
|
3430
3441
|
$input: AffiliateDetailsInputType!
|
|
@@ -3498,6 +3509,17 @@ var ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION = gql35`
|
|
|
3498
3509
|
`;
|
|
3499
3510
|
|
|
3500
3511
|
// src/graphql/hooks/affiliate/hooksMutation.ts
|
|
3512
|
+
var useCreateAffiliate = () => {
|
|
3513
|
+
const [createAffiliate, { loading, error }] = useMutation19(CREATE_AFFILIATE_MUTATION, {
|
|
3514
|
+
awaitRefetchQueries: true,
|
|
3515
|
+
refetchQueries: (mutationResult) => {
|
|
3516
|
+
const affiliateId = mutationResult?.data?.createAffiliate?.data?._id;
|
|
3517
|
+
if (!affiliateId) return [];
|
|
3518
|
+
return [{ query: GET_AFFILIATE, variables: { _id: affiliateId } }];
|
|
3519
|
+
}
|
|
3520
|
+
});
|
|
3521
|
+
return { createAffiliate, error, loading };
|
|
3522
|
+
};
|
|
3501
3523
|
var useUpdateAffiliateDetails = () => {
|
|
3502
3524
|
const [updateAffiliateDetails, { loading, error }] = useMutation19(UPDATE_AFFILIATE_DETAILS_MUTATION, {
|
|
3503
3525
|
awaitRefetchQueries: true,
|
|
@@ -3935,6 +3957,7 @@ export {
|
|
|
3935
3957
|
useGetSchool,
|
|
3936
3958
|
useGetAffiliate,
|
|
3937
3959
|
useGetAffiliates,
|
|
3960
|
+
useCreateAffiliate,
|
|
3938
3961
|
useUpdateAffiliateDetails,
|
|
3939
3962
|
useDeleteAffiliate,
|
|
3940
3963
|
useRedeemAffiliateReward,
|
|
@@ -3947,4 +3970,4 @@ export {
|
|
|
3947
3970
|
useGetCoupons,
|
|
3948
3971
|
useGetCoupon
|
|
3949
3972
|
};
|
|
3950
|
-
//# sourceMappingURL=chunk-
|
|
3973
|
+
//# sourceMappingURL=chunk-WRV55PDR.mjs.map
|