@timardex/cluemart-shared 1.7.40 → 1.7.41

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 (51) hide show
  1. package/dist/{ad-B4Zu7UCi.d.ts → ad-BDH4V_kC.d.ts} +2 -2
  2. package/dist/{ad-DRpL0MyF.d.mts → ad-C7ydabC3.d.mts} +2 -2
  3. package/dist/{affiliate-B3naQAiF.d.ts → affiliate-CXyxbJeB.d.ts} +2 -2
  4. package/dist/{affiliate-XkRVAydZ.d.mts → affiliate-cR8Bt-Fe.d.mts} +2 -2
  5. package/dist/auth/index.d.mts +3 -3
  6. package/dist/auth/index.d.ts +3 -3
  7. package/dist/{chunk-MULF4KLD.mjs → chunk-IVFFSG4S.mjs} +29 -8
  8. package/dist/{chunk-MULF4KLD.mjs.map → chunk-IVFFSG4S.mjs.map} +1 -1
  9. package/dist/{chunk-C4WKING5.mjs → chunk-NBKSLJIH.mjs} +2 -2
  10. package/dist/{chunk-IHNIUBCF.mjs → chunk-V3GCKBWG.mjs} +1 -1
  11. package/dist/{chunk-IHNIUBCF.mjs.map → chunk-V3GCKBWG.mjs.map} +1 -1
  12. package/dist/{contactUs-Cg-GLffM.d.mts → contactUs-BA437E5t.d.mts} +1 -1
  13. package/dist/{contactUs-BpIEnHfp.d.ts → contactUs-CWoOKyLs.d.ts} +1 -1
  14. package/dist/formFields/index.d.mts +1 -1
  15. package/dist/formFields/index.d.ts +1 -1
  16. package/dist/formFields/index.mjs +2 -2
  17. package/dist/{global-CD6ZMro5.d.ts → global-DmVf-gD-.d.ts} +6 -1
  18. package/dist/{global-CIybpEDM.d.mts → global-dGP5dUVJ.d.mts} +6 -1
  19. package/dist/graphql/index.cjs +28 -7
  20. package/dist/graphql/index.cjs.map +1 -1
  21. package/dist/graphql/index.d.mts +8 -8
  22. package/dist/graphql/index.d.ts +8 -8
  23. package/dist/graphql/index.mjs +1 -1
  24. package/dist/hooks/index.cjs +9 -1
  25. package/dist/hooks/index.cjs.map +1 -1
  26. package/dist/hooks/index.d.mts +5 -5
  27. package/dist/hooks/index.d.ts +5 -5
  28. package/dist/hooks/index.mjs +3 -3
  29. package/dist/index.cjs +28 -7
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.mts +9 -4
  32. package/dist/index.d.ts +9 -4
  33. package/dist/index.mjs +28 -7
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/map/index.d.mts +1 -1
  36. package/dist/map/index.d.ts +1 -1
  37. package/dist/{resourceActivities-CChsCKGe.d.ts → resourceActivities-D-ql8Sy7.d.ts} +1 -1
  38. package/dist/{resourceActivities-BU9CPeF_.d.mts → resourceActivities-Rb8Mvla1.d.mts} +1 -1
  39. package/dist/sharing/index.d.mts +1 -1
  40. package/dist/sharing/index.d.ts +1 -1
  41. package/dist/types/index.cjs.map +1 -1
  42. package/dist/types/index.d.mts +7 -7
  43. package/dist/types/index.d.ts +7 -7
  44. package/dist/types/index.mjs +1 -1
  45. package/dist/{user-BsmG2pSw.d.mts → user-DHIUOHzN.d.mts} +1 -1
  46. package/dist/{user-Cbi9O3PZ.d.ts → user-Ds0XnW3x.d.ts} +1 -1
  47. package/dist/utils/index.d.mts +3 -3
  48. package/dist/utils/index.d.ts +3 -3
  49. package/dist/utils/index.mjs +2 -2
  50. package/package.json +1 -1
  51. /package/dist/{chunk-C4WKING5.mjs.map → chunk-NBKSLJIH.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.js';
2
- import { N as BaseResourceType, L as LocationType, aN as SocialShareResourceType, B as BaseResourceTypeFormData, a1 as CreateFormData, aJ as ResourceContactDetailsType, aL as ResourceImageType, aM as SocialMediaType, aQ as TermsAgreement, am as OwnerType, aA as PromoCodeType, M as MutationResponse } from './global-CD6ZMro5.js';
2
+ import { Q as BaseResourceType, L as LocationType, aO as SocialShareResourceType, B as BaseResourceTypeFormData, a2 as CreateFormData, aK as ResourceContactDetailsType, aM as ResourceImageType, aN as SocialMediaType, aR as TermsAgreement, an as OwnerType, aB as PromoCodeType, M as MutationResponse } from './global-DmVf-gD-.js';
3
3
  import { PosterAssetId } from './images/index.js';
4
- import { S as SafeUserType } from './user-Cbi9O3PZ.js';
4
+ import { S as SafeUserType } from './user-Ds0XnW3x.js';
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.mjs';
2
- import { N as BaseResourceType, L as LocationType, aN as SocialShareResourceType, B as BaseResourceTypeFormData, a1 as CreateFormData, aJ as ResourceContactDetailsType, aL as ResourceImageType, aM as SocialMediaType, aQ as TermsAgreement, am as OwnerType, aA as PromoCodeType, M as MutationResponse } from './global-CIybpEDM.mjs';
2
+ import { Q as BaseResourceType, L as LocationType, aO as SocialShareResourceType, B as BaseResourceTypeFormData, a2 as CreateFormData, aK as ResourceContactDetailsType, aM as ResourceImageType, aN as SocialMediaType, aR as TermsAgreement, an as OwnerType, aB as PromoCodeType, M as MutationResponse } from './global-dGP5dUVJ.mjs';
3
3
  import { PosterAssetId } from './images/index.mjs';
4
- import { S as SafeUserType } from './user-BsmG2pSw.mjs';
4
+ import { S as SafeUserType } from './user-DHIUOHzN.mjs';
5
5
 
6
6
  interface PartnerFormData extends BaseResourceTypeFormData {
7
7
  location: LocationType;
@@ -1,6 +1,6 @@
1
1
  import { EnumResourceType } from './enums/index.js';
2
- import { aA as PromoCodeType, L as LocationType, aM as SocialMediaType, am as OwnerType, a1 as CreateFormData } from './global-CD6ZMro5.js';
3
- import { U as UserFormData } from './user-Cbi9O3PZ.js';
2
+ import { aB as PromoCodeType, L as LocationType, aN as SocialMediaType, an as OwnerType, a2 as CreateFormData } from './global-DmVf-gD-.js';
3
+ import { U as UserFormData } from './user-Ds0XnW3x.js';
4
4
 
5
5
  declare enum EnumAffiliateParticipantType {
6
6
  INDIVIDUAL = "INDIVIDUAL",
@@ -1,6 +1,6 @@
1
1
  import { EnumResourceType } from './enums/index.mjs';
2
- import { aA as PromoCodeType, L as LocationType, aM as SocialMediaType, am as OwnerType, a1 as CreateFormData } from './global-CIybpEDM.mjs';
3
- import { U as UserFormData } from './user-BsmG2pSw.mjs';
2
+ import { aB as PromoCodeType, L as LocationType, aN as SocialMediaType, an as OwnerType, a2 as CreateFormData } from './global-dGP5dUVJ.mjs';
3
+ import { U as UserFormData } from './user-DHIUOHzN.mjs';
4
4
 
5
5
  declare enum EnumAffiliateParticipantType {
6
6
  INDIVIDUAL = "INDIVIDUAL",
@@ -1,9 +1,9 @@
1
1
  import { EnumUserRole, EnumResourceType, EnumUserLicence } from '../enums/index.mjs';
2
- import { P as Permission, S as SafeUserType } from '../user-BsmG2pSw.mjs';
3
- export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-BsmG2pSw.mjs';
2
+ import { P as Permission, S as SafeUserType } from '../user-DHIUOHzN.mjs';
3
+ export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-DHIUOHzN.mjs';
4
4
  import { T as Tier } from '../subscription-bmAdrnfi.mjs';
5
5
  import React, { ReactNode } from 'react';
6
- import '../global-CIybpEDM.mjs';
6
+ import '../global-dGP5dUVJ.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-Cbi9O3PZ.js';
3
- export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-Cbi9O3PZ.js';
2
+ import { P as Permission, S as SafeUserType } from '../user-Ds0XnW3x.js';
3
+ export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-Ds0XnW3x.js';
4
4
  import { T as Tier } from '../subscription-BU8GvH2K.js';
5
5
  import React, { ReactNode } from 'react';
6
- import '../global-CD6ZMro5.js';
6
+ import '../global-DmVf-gD-.js';
7
7
  import 'react-hook-form';
8
8
 
9
9
  type AuthManager = {
@@ -3660,7 +3660,15 @@ var COUPON = gql36`
3660
3660
  var GET_COUPONS = gql36`
3661
3661
  query getCoupons {
3662
3662
  coupons {
3663
- ...CouponFields
3663
+ active {
3664
+ ...CouponFields
3665
+ }
3666
+ owned {
3667
+ ...CouponFields
3668
+ }
3669
+ scanned {
3670
+ ...CouponFields
3671
+ }
3664
3672
  }
3665
3673
  }
3666
3674
  ${COUPON}
@@ -3724,15 +3732,24 @@ var DELETE_COUPON_MUTATION = gql37`
3724
3732
 
3725
3733
  // src/graphql/hooks/coupon/hooksMutation.ts
3726
3734
  var useCreateCoupon = () => {
3727
- const [createCoupon, { loading, error }] = useMutation20(CREATE_COUPON_MUTATION);
3735
+ const [createCoupon, { loading, error }] = useMutation20(CREATE_COUPON_MUTATION, {
3736
+ awaitRefetchQueries: true,
3737
+ refetchQueries: [{ query: GET_COUPONS }]
3738
+ });
3728
3739
  return { createCoupon, error, loading };
3729
3740
  };
3730
3741
  var useUpdateCoupon = () => {
3731
- const [updateCoupon, { loading, error }] = useMutation20(UPDATE_COUPON_MUTATION);
3742
+ const [updateCoupon, { loading, error }] = useMutation20(UPDATE_COUPON_MUTATION, {
3743
+ awaitRefetchQueries: true,
3744
+ refetchQueries: [{ query: GET_COUPONS }]
3745
+ });
3732
3746
  return { error, loading, updateCoupon };
3733
3747
  };
3734
3748
  var useDeleteCoupon = () => {
3735
- const [deleteCoupon, { loading, error }] = useMutation20(DELETE_COUPON_MUTATION);
3749
+ const [deleteCoupon, { loading, error }] = useMutation20(DELETE_COUPON_MUTATION, {
3750
+ awaitRefetchQueries: true,
3751
+ refetchQueries: [{ query: GET_COUPONS }]
3752
+ });
3736
3753
  return { deleteCoupon, error, loading };
3737
3754
  };
3738
3755
 
@@ -3742,7 +3759,11 @@ var useGetCoupons = () => {
3742
3759
  const { loading, error, data, refetch } = useQuery15(GET_COUPONS, {
3743
3760
  fetchPolicy: "network-only"
3744
3761
  });
3745
- const coupons = data?.coupons || [];
3762
+ const coupons = data?.coupons || {
3763
+ active: null,
3764
+ owned: null,
3765
+ scanned: null
3766
+ };
3746
3767
  return { coupons, error, loading, refetch };
3747
3768
  };
3748
3769
  var useGetCoupon = (_id) => {
@@ -3757,11 +3778,11 @@ var useGetCoupon = (_id) => {
3757
3778
  var useGetResourceCoupons = (resourceId, resourceType) => {
3758
3779
  const { loading, error, data, refetch } = useQuery15(GET_RESOURCE_COUPONS, {
3759
3780
  fetchPolicy: "network-only",
3760
- skip: !resourceId,
3781
+ skip: !resourceId || resourceId === "" || !resourceType,
3761
3782
  variables: { resourceId, resourceType }
3762
3783
  });
3763
3784
  const resourceCoupons = data?.resourceCoupons || [];
3764
- return { resourceCoupons, error, loading, refetch };
3785
+ return { error, loading, refetch, resourceCoupons };
3765
3786
  };
3766
3787
 
3767
3788
  export {
@@ -3913,4 +3934,4 @@ export {
3913
3934
  useGetCoupon,
3914
3935
  useGetResourceCoupons
3915
3936
  };
3916
- //# sourceMappingURL=chunk-MULF4KLD.mjs.map
3937
+ //# sourceMappingURL=chunk-IVFFSG4S.mjs.map