@timardex/cluemart-shared 1.7.24 → 1.7.26

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.
Files changed (49) hide show
  1. package/dist/{ad-DChdPAkx.d.mts → ad-BNumAVY7.d.mts} +2 -2
  2. package/dist/{ad-BZcVngc3.d.ts → ad-xMotoDzt.d.ts} +2 -2
  3. package/dist/auth/index.d.mts +3 -3
  4. package/dist/auth/index.d.ts +3 -3
  5. package/dist/auth/index.mjs +1 -1
  6. package/dist/{chunk-LZQG3BQM.mjs → chunk-336EZBSA.mjs} +159 -6
  7. package/dist/chunk-336EZBSA.mjs.map +1 -0
  8. package/dist/{chunk-3VDFBRRK.mjs → chunk-WPBHYGXW.mjs} +2 -1
  9. package/dist/{contactUs-KVN1Iw60.d.mts → contactUs-5t9rb3U4.d.mts} +1 -1
  10. package/dist/{contactUs-l3ciX1_d.d.ts → contactUs-BJiiMuGX.d.ts} +1 -1
  11. package/dist/{affiliate-BM1h7pwc.d.ts → coupon-CqCTYMW1.d.ts} +47 -3
  12. package/dist/{affiliate-C1EG9HbN.d.mts → coupon-O__x-VRW.d.mts} +47 -3
  13. package/dist/formFields/index.d.mts +1 -1
  14. package/dist/formFields/index.d.ts +1 -1
  15. package/dist/{global-D8aPAI5b.d.ts → global-B6VyEshc.d.ts} +1 -1
  16. package/dist/{global-BrnExI9t.d.mts → global-BKGlrm75.d.mts} +1 -1
  17. package/dist/graphql/index.cjs +158 -1
  18. package/dist/graphql/index.cjs.map +1 -1
  19. package/dist/graphql/index.d.mts +52 -7
  20. package/dist/graphql/index.d.ts +52 -7
  21. package/dist/graphql/index.mjs +12 -2
  22. package/dist/hooks/index.cjs +117 -0
  23. package/dist/hooks/index.cjs.map +1 -1
  24. package/dist/hooks/index.d.mts +5 -6
  25. package/dist/hooks/index.d.ts +5 -6
  26. package/dist/hooks/index.mjs +2 -2
  27. package/dist/index.cjs +158 -1
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.mts +48 -3
  30. package/dist/index.d.ts +48 -3
  31. package/dist/index.mjs +153 -1
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/map/index.d.mts +1 -1
  34. package/dist/map/index.d.ts +1 -1
  35. package/dist/{resourceActivities-DIXjrgOD.d.ts → resourceActivities-HkorPbJU.d.ts} +1 -1
  36. package/dist/{resourceActivities-DuftR4Ts.d.mts → resourceActivities-l4Q014eT.d.mts} +1 -1
  37. package/dist/sharing/index.d.mts +1 -1
  38. package/dist/sharing/index.d.ts +1 -1
  39. package/dist/types/index.d.mts +7 -8
  40. package/dist/types/index.d.ts +7 -8
  41. package/dist/{user-BY5AtgYc.d.ts → user-Cg80mIww.d.ts} +1 -1
  42. package/dist/{user-CjYZ7tJ4.d.mts → user-go-eqanx.d.mts} +1 -1
  43. package/dist/utils/index.d.mts +3 -4
  44. package/dist/utils/index.d.ts +3 -4
  45. package/package.json +1 -1
  46. package/dist/chunk-LZQG3BQM.mjs.map +0 -1
  47. package/dist/coupon-CYL-fG6W.d.ts +0 -47
  48. package/dist/coupon-DE-6YTb6.d.mts +0 -47
  49. /package/dist/{chunk-3VDFBRRK.mjs.map → chunk-WPBHYGXW.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.mjs';
2
- import { I as BaseResourceType, L as LocationType, az as SocialShareResourceType, B as BaseResourceTypeFormData, J as CreateFormData, av as ResourceContactDetailsType, ax as ResourceImageType, ay as SocialMediaType, aC as TermsAgreement, a9 as OwnerType, am as PromoCodeType, M as MutationResponse } from './global-BrnExI9t.mjs';
2
+ import { I as BaseResourceType, L as LocationType, az as SocialShareResourceType, B as BaseResourceTypeFormData, J as CreateFormData, av as ResourceContactDetailsType, ax as ResourceImageType, ay as SocialMediaType, aC as TermsAgreement, a9 as OwnerType, am as PromoCodeType, M as MutationResponse } from './global-BKGlrm75.mjs';
3
3
  import { PosterAssetId } from './images/index.mjs';
4
- import { S as SafeUserType } from './user-CjYZ7tJ4.mjs';
4
+ import { S as SafeUserType } from './user-go-eqanx.mjs';
5
5
 
6
6
  interface PartnerFormData extends BaseResourceTypeFormData {
7
7
  location: LocationType;
@@ -1,7 +1,7 @@
1
1
  import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.js';
2
- import { I as BaseResourceType, L as LocationType, az as SocialShareResourceType, B as BaseResourceTypeFormData, J as CreateFormData, av as ResourceContactDetailsType, ax as ResourceImageType, ay as SocialMediaType, aC as TermsAgreement, a9 as OwnerType, am as PromoCodeType, M as MutationResponse } from './global-D8aPAI5b.js';
2
+ import { I as BaseResourceType, L as LocationType, az as SocialShareResourceType, B as BaseResourceTypeFormData, J as CreateFormData, av as ResourceContactDetailsType, ax as ResourceImageType, ay as SocialMediaType, aC as TermsAgreement, a9 as OwnerType, am as PromoCodeType, M as MutationResponse } from './global-B6VyEshc.js';
3
3
  import { PosterAssetId } from './images/index.js';
4
- import { S as SafeUserType } from './user-BY5AtgYc.js';
4
+ import { S as SafeUserType } from './user-Cg80mIww.js';
5
5
 
6
6
  interface PartnerFormData extends BaseResourceTypeFormData {
7
7
  location: LocationType;
@@ -1,9 +1,9 @@
1
1
  import { EnumUserRole, EnumResourceType, EnumUserLicence } from '../enums/index.mjs';
2
- import { P as Permission, S as SafeUserType } from '../user-CjYZ7tJ4.mjs';
3
- export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-CjYZ7tJ4.mjs';
2
+ import { P as Permission, S as SafeUserType } from '../user-go-eqanx.mjs';
3
+ export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-go-eqanx.mjs';
4
4
  import { T as Tier } from '../subscription-bmAdrnfi.mjs';
5
5
  import React, { ReactNode } from 'react';
6
- import '../global-BrnExI9t.mjs';
6
+ import '../global-BKGlrm75.mjs';
7
7
  import 'react-hook-form';
8
8
 
9
9
  type AuthManager = {
@@ -1,9 +1,9 @@
1
1
  import { EnumUserRole, EnumResourceType, EnumUserLicence } from '../enums/index.js';
2
- import { P as Permission, S as SafeUserType } from '../user-BY5AtgYc.js';
3
- export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-BY5AtgYc.js';
2
+ import { P as Permission, S as SafeUserType } from '../user-Cg80mIww.js';
3
+ export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-Cg80mIww.js';
4
4
  import { T as Tier } from '../subscription-BU8GvH2K.js';
5
5
  import React, { ReactNode } from 'react';
6
- import '../global-D8aPAI5b.js';
6
+ import '../global-B6VyEshc.js';
7
7
  import 'react-hook-form';
8
8
 
9
9
  type AuthManager = {
@@ -27,7 +27,7 @@ import {
27
27
  import {
28
28
  useGetUser,
29
29
  useLogout
30
- } from "../chunk-3VDFBRRK.mjs";
30
+ } from "../chunk-WPBHYGXW.mjs";
31
31
  import "../chunk-X3OLM35T.mjs";
32
32
 
33
33
  // src/auth/createAuthManager.ts
@@ -42,8 +42,9 @@ import {
42
42
  UNREGISTERED_VENDOR,
43
43
  USER_FIELDS_FRAGMENT,
44
44
  VENDOR,
45
- VENDOR_INFO
46
- } from "./chunk-3VDFBRRK.mjs";
45
+ VENDOR_INFO,
46
+ VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT
47
+ } from "./chunk-WPBHYGXW.mjs";
47
48
 
48
49
  // src/graphql/mutations/vendor.ts
49
50
  import { gql } from "@apollo/client";
@@ -1764,7 +1765,7 @@ var useGetVendor = (_id) => {
1764
1765
  variables: { _id }
1765
1766
  }
1766
1767
  );
1767
- const vendor = data?.vendor;
1768
+ const vendor = data?.vendor || null;
1768
1769
  return { error, loading, refetch, vendor };
1769
1770
  };
1770
1771
  var useGetVendorsByRegion = (region, options) => {
@@ -3549,6 +3550,153 @@ var useAssignAffiliateBonusReward = () => {
3549
3550
  return { assignAffiliateBonusReward, error, loading };
3550
3551
  };
3551
3552
 
3553
+ // src/graphql/hooks/coupon/hooksMutation.ts
3554
+ import { useMutation as useMutation20 } from "@apollo/client";
3555
+
3556
+ // src/graphql/mutations/coupon.ts
3557
+ import { gql as gql37 } from "@apollo/client";
3558
+
3559
+ // src/graphql/queries/coupon.ts
3560
+ import { gql as gql36 } from "@apollo/client";
3561
+ var COUPON_CODE_FIELDS_FRAGMENT = gql36`
3562
+ fragment CouponCodeFields on CouponCodeType {
3563
+ code
3564
+ qrCode {
3565
+ ...ResourceImageFields
3566
+ }
3567
+ }
3568
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
3569
+ `;
3570
+ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql36`
3571
+ fragment CouponParticipantUserFields on CouponParticipantUserType {
3572
+ couponCount
3573
+ couponRedeemedAt
3574
+ createdAt
3575
+ updatedAt
3576
+ userId
3577
+ }
3578
+ `;
3579
+ var PRODUCT_COUPON_FIELDS_FRAGMENT = gql36`
3580
+ fragment ProductCouponFields on ProductCouponType {
3581
+ _id
3582
+ active
3583
+ couponCode {
3584
+ ...CouponCodeFields
3585
+ }
3586
+ couponDescription
3587
+ couponOption
3588
+ createdAt
3589
+ endDate
3590
+ participantProduct {
3591
+ ...VendorProductListFields
3592
+ }
3593
+ participantUsers {
3594
+ ...CouponParticipantUserFields
3595
+ }
3596
+ startDate
3597
+ updatedAt
3598
+ }
3599
+ ${COUPON_CODE_FIELDS_FRAGMENT}
3600
+ ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
3601
+ ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}
3602
+ `;
3603
+ var COUPON = gql36`
3604
+ fragment CouponFields on CouponType {
3605
+ _id
3606
+ active
3607
+ productCoupons {
3608
+ ...ProductCouponFields
3609
+ }
3610
+ createdAt
3611
+ deletedAt
3612
+ updatedAt
3613
+ }
3614
+ ${PRODUCT_COUPON_FIELDS_FRAGMENT}
3615
+ ${COUPON_CODE_FIELDS_FRAGMENT}
3616
+ ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
3617
+ `;
3618
+ var GET_COUPONS = gql36`
3619
+ query getCoupons {
3620
+ coupons {
3621
+ ...CouponFields
3622
+ }
3623
+ }
3624
+ ${COUPON}
3625
+ `;
3626
+ var GET_COUPON = gql36`
3627
+ query getCoupon($_id: ID!) {
3628
+ coupon(_id: $_id) {
3629
+ ...CouponFields
3630
+ }
3631
+ }
3632
+ ${COUPON}
3633
+ `;
3634
+
3635
+ // src/graphql/mutations/coupon.ts
3636
+ var CREATE_COUPON_MUTATION = gql37`
3637
+ mutation createCoupon($input: CouponInputType!) {
3638
+ createCoupon(input: $input) {
3639
+ data {
3640
+ ...CouponFields
3641
+ }
3642
+ message
3643
+ }
3644
+ }
3645
+ ${COUPON}
3646
+ `;
3647
+ var UPDATE_COUPON_MUTATION = gql37`
3648
+ mutation updateCoupon($_id: ID!, $input: CouponInputType!) {
3649
+ updateCoupon(_id: $_id, input: $input) {
3650
+ data {
3651
+ ...CouponFields
3652
+ }
3653
+ message
3654
+ }
3655
+ }
3656
+ ${COUPON}
3657
+ `;
3658
+ var DELETE_COUPON_MUTATION = gql37`
3659
+ mutation deleteCoupon($_id: ID!) {
3660
+ deleteCoupon(_id: $_id) {
3661
+ data
3662
+ message
3663
+ }
3664
+ }
3665
+ `;
3666
+
3667
+ // src/graphql/hooks/coupon/hooksMutation.ts
3668
+ var useCreateCoupon = () => {
3669
+ const [createCoupon, { loading, error }] = useMutation20(CREATE_COUPON_MUTATION);
3670
+ return { createCoupon, error, loading };
3671
+ };
3672
+ var useUpdateCoupon = () => {
3673
+ const [updateCoupon, { loading, error }] = useMutation20(UPDATE_COUPON_MUTATION);
3674
+ return { error, loading, updateCoupon };
3675
+ };
3676
+ var useDeleteCoupon = () => {
3677
+ const [deleteCoupon, { loading, error }] = useMutation20(DELETE_COUPON_MUTATION);
3678
+ return { deleteCoupon, error, loading };
3679
+ };
3680
+
3681
+ // src/graphql/hooks/coupon/hooksQuery.ts
3682
+ import { useQuery as useQuery15 } from "@apollo/client";
3683
+ var useGetCoupons = () => {
3684
+ const { loading, error, data, refetch } = useQuery15(GET_COUPONS, {
3685
+ fetchPolicy: "network-only"
3686
+ });
3687
+ const coupons = data?.coupons || [];
3688
+ return { coupons, error, loading, refetch };
3689
+ };
3690
+ var useGetCoupon = (_id) => {
3691
+ const { loading, error, data, refetch } = useQuery15(GET_COUPON, {
3692
+ fetchPolicy: "network-only",
3693
+ skip: !_id || _id === "",
3694
+ variables: { _id }
3695
+ });
3696
+ const coupon = data?.coupon || null;
3697
+ return { coupon, error, loading, refetch };
3698
+ };
3699
+
3552
3700
  export {
3553
3701
  ACTIVATE_VENDOR_CLAIM_MUTATION,
3554
3702
  GET_POST,
@@ -3690,6 +3838,11 @@ export {
3690
3838
  useDeleteAffiliate,
3691
3839
  useRedeemAffiliateReward,
3692
3840
  useAssignAffiliateResourceReward,
3693
- useAssignAffiliateBonusReward
3694
- };
3695
- //# sourceMappingURL=chunk-LZQG3BQM.mjs.map
3841
+ useAssignAffiliateBonusReward,
3842
+ useCreateCoupon,
3843
+ useUpdateCoupon,
3844
+ useDeleteCoupon,
3845
+ useGetCoupons,
3846
+ useGetCoupon
3847
+ };
3848
+ //# sourceMappingURL=chunk-336EZBSA.mjs.map