@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.
- package/dist/{ad-6PrFQe2t.d.ts → ad-CVkVX_z5.d.ts} +3 -7
- package/dist/{ad-B8ZWiTsv.d.mts → ad-DA9ECAhK.d.mts} +3 -7
- package/dist/affiliate-1RtkLnLP.d.ts +35 -0
- package/dist/affiliate-Cos2Syz5.d.mts +35 -0
- package/dist/{chunk-VO2WRHJV.mjs → chunk-KJZFJ3LH.mjs} +95 -12
- package/dist/chunk-KJZFJ3LH.mjs.map +1 -0
- package/dist/{chunk-HASLOIIM.mjs → chunk-MVQ3CFQR.mjs} +11 -2
- package/dist/chunk-MVQ3CFQR.mjs.map +1 -0
- package/dist/{chunk-UJ7L64JJ.mjs → chunk-RKIRWZCH.mjs} +2 -2
- package/dist/{chunk-HCOZUNCK.mjs → chunk-TAECMXM4.mjs} +37 -2
- package/dist/chunk-TAECMXM4.mjs.map +1 -0
- package/dist/{chunk-CXXQBRXS.mjs → chunk-ZZJSCYJK.mjs} +2 -2
- package/dist/formFields/index.cjs +21 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +3 -3
- package/dist/graphql/index.cjs +95 -10
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +20 -2
- package/dist/graphql/index.d.ts +20 -2
- package/dist/graphql/index.mjs +5 -1
- package/dist/hooks/index.cjs +84 -10
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +5 -5
- package/dist/index.cjs +143 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +78 -6
- package/dist/index.d.ts +78 -6
- package/dist/index.mjs +136 -10
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs +21 -0
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.mjs +3 -3
- package/dist/types/index.cjs +10 -0
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.mjs +3 -1
- package/dist/utils/index.cjs +41 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +30 -1
- package/dist/utils/index.d.ts +30 -1
- package/dist/utils/index.mjs +10 -2
- package/package.json +1 -1
- package/dist/chunk-HASLOIIM.mjs.map +0 -1
- package/dist/chunk-HCOZUNCK.mjs.map +0 -1
- package/dist/chunk-VO2WRHJV.mjs.map +0 -1
- /package/dist/{chunk-UJ7L64JJ.mjs.map → chunk-RKIRWZCH.mjs.map} +0 -0
- /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,
|
|
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?:
|
|
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,
|
|
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,
|
|
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?:
|
|
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,
|
|
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-
|
|
5312
|
+
//# sourceMappingURL=chunk-KJZFJ3LH.mjs.map
|