@timardex/cluemart-shared 1.5.770 → 1.5.772

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 (50) hide show
  1. package/dist/{ad-6PrFQe2t.d.ts → ad-CVkVX_z5.d.ts} +3 -7
  2. package/dist/{ad-B8ZWiTsv.d.mts → ad-DA9ECAhK.d.mts} +3 -7
  3. package/dist/affiliate-1RtkLnLP.d.ts +35 -0
  4. package/dist/affiliate-Cos2Syz5.d.mts +35 -0
  5. package/dist/{chunk-VO2WRHJV.mjs → chunk-KJZFJ3LH.mjs} +95 -12
  6. package/dist/chunk-KJZFJ3LH.mjs.map +1 -0
  7. package/dist/{chunk-HASLOIIM.mjs → chunk-MVQ3CFQR.mjs} +11 -2
  8. package/dist/chunk-MVQ3CFQR.mjs.map +1 -0
  9. package/dist/{chunk-UJ7L64JJ.mjs → chunk-RKIRWZCH.mjs} +2 -2
  10. package/dist/{chunk-HCOZUNCK.mjs → chunk-TAECMXM4.mjs} +37 -2
  11. package/dist/chunk-TAECMXM4.mjs.map +1 -0
  12. package/dist/{chunk-CXXQBRXS.mjs → chunk-ZZJSCYJK.mjs} +2 -2
  13. package/dist/formFields/index.cjs +21 -0
  14. package/dist/formFields/index.cjs.map +1 -1
  15. package/dist/formFields/index.mjs +3 -3
  16. package/dist/graphql/index.cjs +95 -10
  17. package/dist/graphql/index.cjs.map +1 -1
  18. package/dist/graphql/index.d.mts +20 -2
  19. package/dist/graphql/index.d.ts +20 -2
  20. package/dist/graphql/index.mjs +5 -1
  21. package/dist/hooks/index.cjs +84 -10
  22. package/dist/hooks/index.cjs.map +1 -1
  23. package/dist/hooks/index.d.mts +1 -1
  24. package/dist/hooks/index.d.ts +1 -1
  25. package/dist/hooks/index.mjs +5 -5
  26. package/dist/index.cjs +143 -10
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.mts +78 -6
  29. package/dist/index.d.ts +78 -6
  30. package/dist/index.mjs +136 -10
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/sharing/index.cjs +21 -0
  33. package/dist/sharing/index.cjs.map +1 -1
  34. package/dist/sharing/index.mjs +3 -3
  35. package/dist/types/index.cjs +10 -0
  36. package/dist/types/index.cjs.map +1 -1
  37. package/dist/types/index.d.mts +2 -1
  38. package/dist/types/index.d.ts +2 -1
  39. package/dist/types/index.mjs +3 -1
  40. package/dist/utils/index.cjs +41 -0
  41. package/dist/utils/index.cjs.map +1 -1
  42. package/dist/utils/index.d.mts +30 -1
  43. package/dist/utils/index.d.ts +30 -1
  44. package/dist/utils/index.mjs +10 -2
  45. package/package.json +1 -1
  46. package/dist/chunk-HASLOIIM.mjs.map +0 -1
  47. package/dist/chunk-HCOZUNCK.mjs.map +0 -1
  48. package/dist/chunk-VO2WRHJV.mjs.map +0 -1
  49. /package/dist/{chunk-UJ7L64JJ.mjs.map → chunk-RKIRWZCH.mjs.map} +0 -0
  50. /package/dist/{chunk-CXXQBRXS.mjs.map → chunk-ZZJSCYJK.mjs.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { EnumOSPlatform, EnumUserRole, EnumReward, EnumSubscriptionStatus, EnumUserLicence, EnumResourceType, EnumPartnerType } from './enums/index.js';
2
- import { av as ResourceImageType, L as LocationType, aA as TermsAgreement, ak as PromoCodeType, A as AssociateType, i as UserLicenceType, K as DateTimeType, H as CreateFormData, D as BaseResourceType, ax as SocialShareResourceType, B as BaseResourceTypeFormData, at as ResourceContactDetailsType, aw as SocialMediaType, a6 as OwnerType } from './global-fKbMmluy.js';
2
+ import { av as ResourceImageType, L as LocationType, aA as TermsAgreement, A as AssociateType, i as UserLicenceType, ak as PromoCodeType, K as DateTimeType, H as CreateFormData, D as BaseResourceType, ax as SocialShareResourceType, B as BaseResourceTypeFormData, at as ResourceContactDetailsType, aw as SocialMediaType, a6 as OwnerType } from './global-fKbMmluy.js';
3
3
  import { PosterAssetId } from './images/index.js';
4
4
 
5
5
  type UserFormData = {
@@ -92,13 +92,9 @@ type RedeemedReward = {
92
92
  pointsUsed: number;
93
93
  redeemedAt: Date;
94
94
  };
95
- type AffiliateType = {
96
- affiliateCode: PromoCodeType;
97
- pointsAvailable: number;
98
- };
99
95
  type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> & {
100
96
  _id: string;
101
- affiliate?: AffiliateType | null;
97
+ affiliate?: string | null;
102
98
  associates?: AssociateType[] | null;
103
99
  createdAt: Date;
104
100
  deletedAt: Date | null;
@@ -297,4 +293,4 @@ interface AdType extends AdFormData {
297
293
  updatedAt: Date | null;
298
294
  }
299
295
 
300
- export { type AuthPayloadType as A, EnumAdStyle as B, type CreateUserFormData as C, EnumAdType as D, EnumAdStatus as E, EnumVerificationType as F, type PosterInputType as G, type RedeemRewardInput as H, type RedeemedReward as I, type RegisterFormData as J, type RequestPasswordResetFormData as K, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type ResetPasswordFormData as N, type SchoolCampaignType as O, type PartnerType as P, type SchoolRegisteredUserType as Q, type RefreshTokenPayloadType as R, type SafeUserType as S, type StripeSubscription as T, type UserFormData as U, type SubscriptionPlanData as V, type SubscriptionPricingData as W, type UserActivity as X, type UserActivityEvent as Y, type UserType as Z, type ValidateVerificationTokenFormData as _, type RedeemRewardResponse as a, type ResourceByUser as b, type AdType as c, type SubscriptionPlansResponse as d, type SubscriptionStatusData as e, type AppSettingsType as f, type SchoolReturnType as g, type SchoolType as h, type CreateLoginFormData as i, type CreateRegisterFormData as j, type CreateRequestPasswordResetFormData as k, type CreateValidateVerificationTokenFormData as l, type CreateResetPasswordFormData as m, type PartnerFormData as n, type AdFormData as o, type CreateAdFormState as p, type CreatePartnerFormData as q, type AppSettingsFormData as r, type CreateAppSettingsFormData as s, type SchoolFormData as t, type CreateSchoolFormData as u, type AdFormState as v, type AdResource as w, type AffiliateType as x, type CreateAdFormData as y, EnumAdShowOn as z };
296
+ export { type AuthPayloadType as A, EnumAdType as B, type CreateUserFormData as C, EnumVerificationType as D, EnumAdStatus as E, type PosterInputType as F, type RedeemRewardInput as G, type RedeemedReward as H, type RegisterFormData as I, type RequestPasswordResetFormData as J, type ResetPasswordFormData as K, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type SchoolCampaignType as N, type SchoolRegisteredUserType as O, type PartnerType as P, type StripeSubscription as Q, type RefreshTokenPayloadType as R, type SafeUserType as S, type SubscriptionPlanData as T, type UserFormData as U, type SubscriptionPricingData as V, type UserActivity as W, type UserActivityEvent as X, type UserType as Y, type ValidateVerificationTokenFormData as Z, type RedeemRewardResponse as a, type ResourceByUser as b, type AdType as c, type SubscriptionPlansResponse as d, type SubscriptionStatusData as e, type AppSettingsType as f, type SchoolReturnType as g, type SchoolType as h, type CreateLoginFormData as i, type CreateRegisterFormData as j, type CreateRequestPasswordResetFormData as k, type CreateValidateVerificationTokenFormData as l, type CreateResetPasswordFormData as m, type PartnerFormData as n, type AdFormData as o, type CreateAdFormState as p, type CreatePartnerFormData as q, type AppSettingsFormData as r, type CreateAppSettingsFormData as s, type SchoolFormData as t, type CreateSchoolFormData as u, type AdFormState as v, type AdResource as w, type CreateAdFormData as x, EnumAdShowOn as y, EnumAdStyle as z };
@@ -1,5 +1,5 @@
1
1
  import { EnumOSPlatform, EnumUserRole, EnumReward, EnumSubscriptionStatus, EnumUserLicence, EnumResourceType, EnumPartnerType } from './enums/index.mjs';
2
- import { av as ResourceImageType, L as LocationType, aA as TermsAgreement, ak as PromoCodeType, A as AssociateType, i as UserLicenceType, K as DateTimeType, H as CreateFormData, D as BaseResourceType, ax as SocialShareResourceType, B as BaseResourceTypeFormData, at as ResourceContactDetailsType, aw as SocialMediaType, a6 as OwnerType } from './global-BUUfmCo7.mjs';
2
+ import { av as ResourceImageType, L as LocationType, aA as TermsAgreement, A as AssociateType, i as UserLicenceType, ak as PromoCodeType, K as DateTimeType, H as CreateFormData, D as BaseResourceType, ax as SocialShareResourceType, B as BaseResourceTypeFormData, at as ResourceContactDetailsType, aw as SocialMediaType, a6 as OwnerType } from './global-BUUfmCo7.mjs';
3
3
  import { PosterAssetId } from './images/index.mjs';
4
4
 
5
5
  type UserFormData = {
@@ -92,13 +92,9 @@ type RedeemedReward = {
92
92
  pointsUsed: number;
93
93
  redeemedAt: Date;
94
94
  };
95
- type AffiliateType = {
96
- affiliateCode: PromoCodeType;
97
- pointsAvailable: number;
98
- };
99
95
  type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> & {
100
96
  _id: string;
101
- affiliate?: AffiliateType | null;
97
+ affiliate?: string | null;
102
98
  associates?: AssociateType[] | null;
103
99
  createdAt: Date;
104
100
  deletedAt: Date | null;
@@ -297,4 +293,4 @@ interface AdType extends AdFormData {
297
293
  updatedAt: Date | null;
298
294
  }
299
295
 
300
- export { type AuthPayloadType as A, EnumAdStyle as B, type CreateUserFormData as C, EnumAdType as D, EnumAdStatus as E, EnumVerificationType as F, type PosterInputType as G, type RedeemRewardInput as H, type RedeemedReward as I, type RegisterFormData as J, type RequestPasswordResetFormData as K, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type ResetPasswordFormData as N, type SchoolCampaignType as O, type PartnerType as P, type SchoolRegisteredUserType as Q, type RefreshTokenPayloadType as R, type SafeUserType as S, type StripeSubscription as T, type UserFormData as U, type SubscriptionPlanData as V, type SubscriptionPricingData as W, type UserActivity as X, type UserActivityEvent as Y, type UserType as Z, type ValidateVerificationTokenFormData as _, type RedeemRewardResponse as a, type ResourceByUser as b, type AdType as c, type SubscriptionPlansResponse as d, type SubscriptionStatusData as e, type AppSettingsType as f, type SchoolReturnType as g, type SchoolType as h, type CreateLoginFormData as i, type CreateRegisterFormData as j, type CreateRequestPasswordResetFormData as k, type CreateValidateVerificationTokenFormData as l, type CreateResetPasswordFormData as m, type PartnerFormData as n, type AdFormData as o, type CreateAdFormState as p, type CreatePartnerFormData as q, type AppSettingsFormData as r, type CreateAppSettingsFormData as s, type SchoolFormData as t, type CreateSchoolFormData as u, type AdFormState as v, type AdResource as w, type AffiliateType as x, type CreateAdFormData as y, EnumAdShowOn as z };
296
+ export { type AuthPayloadType as A, EnumAdType as B, type CreateUserFormData as C, EnumVerificationType as D, EnumAdStatus as E, type PosterInputType as F, type RedeemRewardInput as G, type RedeemedReward as H, type RegisterFormData as I, type RequestPasswordResetFormData as J, type ResetPasswordFormData as K, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type SchoolCampaignType as N, type SchoolRegisteredUserType as O, type PartnerType as P, type StripeSubscription as Q, type RefreshTokenPayloadType as R, type SafeUserType as S, type SubscriptionPlanData as T, type UserFormData as U, type SubscriptionPricingData as V, type UserActivity as W, type UserActivityEvent as X, type UserType as Y, type ValidateVerificationTokenFormData as Z, type RedeemRewardResponse as a, type ResourceByUser as b, type AdType as c, type SubscriptionPlansResponse as d, type SubscriptionStatusData as e, type AppSettingsType as f, type SchoolReturnType as g, type SchoolType as h, type CreateLoginFormData as i, type CreateRegisterFormData as j, type CreateRequestPasswordResetFormData as k, type CreateValidateVerificationTokenFormData as l, type CreateResetPasswordFormData as m, type PartnerFormData as n, type AdFormData as o, type CreateAdFormState as p, type CreatePartnerFormData as q, type AppSettingsFormData as r, type CreateAppSettingsFormData as s, type SchoolFormData as t, type CreateSchoolFormData as u, type AdFormState as v, type AdResource as w, type CreateAdFormData as x, EnumAdShowOn as y, EnumAdStyle as z };
@@ -0,0 +1,35 @@
1
+ import { EnumResourceType } from './enums/index.js';
2
+ import { ak as PromoCodeType, a6 as OwnerType } from './global-fKbMmluy.js';
3
+
4
+ declare enum EnumAffiliateRewardType {
5
+ NEW_EVENT_REGISTRATION = "NEW_EVENT_REGISTRATION",
6
+ NEW_VENDOR_REGISTRATION = "NEW_VENDOR_REGISTRATION",
7
+ NEW_PARTNER_REGISTRATION = "NEW_PARTNER_REGISTRATION"
8
+ }
9
+ type AffiliateReward = {
10
+ createdAt: Date;
11
+ deletedAt: Date | null;
12
+ redeemedAt: Date | null;
13
+ rewardDescription: string;
14
+ rewardType: EnumAffiliateRewardType;
15
+ rewardValue: number;
16
+ updatedAt: Date | null;
17
+ };
18
+ type AffiliateResourceType = {
19
+ resourceActive: boolean;
20
+ resourceId: string;
21
+ resourceType: EnumResourceType;
22
+ rewards: AffiliateReward[];
23
+ };
24
+ type AffiliateType = {
25
+ _id: string;
26
+ affiliateCode: PromoCodeType;
27
+ affiliateResources: AffiliateResourceType[];
28
+ createdAt: Date;
29
+ deletedAt: Date | null;
30
+ overallPoints: number;
31
+ owner: OwnerType;
32
+ updatedAt: Date | null;
33
+ };
34
+
35
+ export { type AffiliateType as A, EnumAffiliateRewardType as E, type AffiliateResourceType as a, type AffiliateReward as b };
@@ -0,0 +1,35 @@
1
+ import { EnumResourceType } from './enums/index.mjs';
2
+ import { ak as PromoCodeType, a6 as OwnerType } from './global-BUUfmCo7.mjs';
3
+
4
+ declare enum EnumAffiliateRewardType {
5
+ NEW_EVENT_REGISTRATION = "NEW_EVENT_REGISTRATION",
6
+ NEW_VENDOR_REGISTRATION = "NEW_VENDOR_REGISTRATION",
7
+ NEW_PARTNER_REGISTRATION = "NEW_PARTNER_REGISTRATION"
8
+ }
9
+ type AffiliateReward = {
10
+ createdAt: Date;
11
+ deletedAt: Date | null;
12
+ redeemedAt: Date | null;
13
+ rewardDescription: string;
14
+ rewardType: EnumAffiliateRewardType;
15
+ rewardValue: number;
16
+ updatedAt: Date | null;
17
+ };
18
+ type AffiliateResourceType = {
19
+ resourceActive: boolean;
20
+ resourceId: string;
21
+ resourceType: EnumResourceType;
22
+ rewards: AffiliateReward[];
23
+ };
24
+ type AffiliateType = {
25
+ _id: string;
26
+ affiliateCode: PromoCodeType;
27
+ affiliateResources: AffiliateResourceType[];
28
+ createdAt: Date;
29
+ deletedAt: Date | null;
30
+ overallPoints: number;
31
+ owner: OwnerType;
32
+ updatedAt: Date | null;
33
+ };
34
+
35
+ export { type AffiliateType as A, EnumAffiliateRewardType as E, type AffiliateResourceType as a, type AffiliateReward as b };
@@ -147,12 +147,6 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = gql`
147
147
  redeemedAt
148
148
  }
149
149
  `;
150
- var AFFILIATE_FIELDS_FRAGMENT = gql`
151
- fragment AffiliateFields on AffiliateType {
152
- affiliateCode
153
- pointsAvailable
154
- }
155
- `;
156
150
  var USER_FIELDS_FRAGMENT = gql`
157
151
  fragment UserFields on UserType {
158
152
  _id
@@ -160,9 +154,7 @@ var USER_FIELDS_FRAGMENT = gql`
160
154
  associates {
161
155
  ...AssociatesFields
162
156
  }
163
- affiliate {
164
- ...AffiliateFields
165
- }
157
+ affiliate
166
158
  avatar {
167
159
  ...ResourceImageFields
168
160
  }
@@ -206,7 +198,6 @@ var USER_FIELDS_FRAGMENT = gql`
206
198
  ${LICENCE_FIELDS_FRAGMENT}
207
199
  ${LOCATION_FIELDS_FRAGMENT}
208
200
  ${REDEEMED_REWARD_FIELDS_FRAGMENT}
209
- ${AFFILIATE_FIELDS_FRAGMENT}
210
201
  `;
211
202
  var STALL_TYPE_FIELDS_FRAGMENT = gql`
212
203
  fragment StallTypeFields on StallTypeType {
@@ -5075,6 +5066,96 @@ var useGetSchool = (_id) => {
5075
5066
  };
5076
5067
  };
5077
5068
 
5069
+ // src/graphql/hooks/affiliate/hooksQuery.ts
5070
+ import { useQuery as useQuery15 } from "@apollo/client";
5071
+
5072
+ // src/graphql/queries/affiliate.ts
5073
+ import { gql as gql40 } from "@apollo/client";
5074
+ var AFFILIATE_REWARD_FIELDS_FRAGMENT = gql40`
5075
+ fragment AffiliateRewardFields on AffiliateRewardType {
5076
+ createdAt
5077
+ deletedAt
5078
+ redeemedAt
5079
+ rewardDescription
5080
+ rewardType
5081
+ rewardValue
5082
+ updatedAt
5083
+ }
5084
+ `;
5085
+ var AFFILIATE_RESOURCE_FIELDS_FRAGMENT = gql40`
5086
+ fragment AffiliateResourceFields on AffiliateResourceType {
5087
+ resourceActive
5088
+ resourceId
5089
+ resourceType
5090
+ rewards {
5091
+ ...AffiliateRewardFields
5092
+ }
5093
+ }
5094
+ ${AFFILIATE_REWARD_FIELDS_FRAGMENT}
5095
+ `;
5096
+ var AFFILIATE_FIELDS_FRAGMENT = gql40`
5097
+ fragment AffiliateFields on AffiliateType {
5098
+ _id
5099
+ affiliateCode
5100
+ affiliateResources {
5101
+ ...AffiliateResourceFields
5102
+ }
5103
+ createdAt
5104
+ deletedAt
5105
+ overallPoints
5106
+ owner {
5107
+ ...OwnerFields
5108
+ }
5109
+ updatedAt
5110
+ }
5111
+ ${AFFILIATE_RESOURCE_FIELDS_FRAGMENT}
5112
+ ${OWNER_FIELDS_FRAGMENT}
5113
+ `;
5114
+ var GET_AFFILIATE = gql40`
5115
+ query getAffiliate($_id: ID!) {
5116
+ affiliate(_id: $_id) {
5117
+ ...AffiliateFields
5118
+ }
5119
+ }
5120
+ ${AFFILIATE_FIELDS_FRAGMENT}
5121
+ `;
5122
+ var GET_AFFILIATES = gql40`
5123
+ query getAffiliates {
5124
+ affiliates {
5125
+ ...AffiliateFields
5126
+ }
5127
+ }
5128
+ ${AFFILIATE_FIELDS_FRAGMENT}
5129
+ `;
5130
+
5131
+ // src/graphql/hooks/affiliate/hooksQuery.ts
5132
+ var useGetAffiliate = (_id) => {
5133
+ const { data, loading, error, refetch } = useQuery15(GET_AFFILIATE, {
5134
+ fetchPolicy: "network-only",
5135
+ skip: !_id || _id === "",
5136
+ variables: { _id }
5137
+ });
5138
+ const affiliate = data?.affiliate;
5139
+ return {
5140
+ affiliate,
5141
+ error,
5142
+ loading,
5143
+ refetch
5144
+ };
5145
+ };
5146
+ var useGetAffiliates = () => {
5147
+ const { data, loading, error, refetch } = useQuery15(GET_AFFILIATES, {
5148
+ fetchPolicy: "network-only"
5149
+ });
5150
+ const affiliates = data?.affiliates || [];
5151
+ return {
5152
+ affiliates,
5153
+ error,
5154
+ loading,
5155
+ refetch
5156
+ };
5157
+ };
5158
+
5078
5159
  export {
5079
5160
  GET_EVENT,
5080
5161
  GET_EVENT_INFO,
@@ -5224,6 +5305,8 @@ export {
5224
5305
  useDeleteSchool,
5225
5306
  useRequestMarketingMaterial,
5226
5307
  useGetSchools,
5227
- useGetSchool
5308
+ useGetSchool,
5309
+ useGetAffiliate,
5310
+ useGetAffiliates
5228
5311
  };
5229
- //# sourceMappingURL=chunk-VO2WRHJV.mjs.map
5312
+ //# sourceMappingURL=chunk-KJZFJ3LH.mjs.map