@timardex/cluemart-shared 1.5.831 → 1.5.833
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-Cu-M8Xzf.d.mts → ad-BPb9_tSM.d.mts} +2 -69
- package/dist/{ad-DfqgAPOk.d.ts → ad-_mwYq2Z9.d.ts} +2 -69
- package/dist/affiliate-Dn50VDpB.d.ts +72 -0
- package/dist/affiliate-XW8pxlOC.d.mts +72 -0
- package/dist/auth/index.cjs +27 -1
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.mts +4 -1
- package/dist/auth/index.d.ts +4 -1
- package/dist/auth/index.mjs +26 -1
- package/dist/auth/index.mjs.map +1 -1
- package/dist/{chunk-YKJUZUAP.mjs → chunk-MLNJAQVM.mjs} +39 -1
- package/dist/{chunk-YKJUZUAP.mjs.map → chunk-MLNJAQVM.mjs.map} +1 -1
- package/dist/{chunk-G3CMTXQV.mjs → chunk-SP36N6U6.mjs} +64 -2
- package/dist/{chunk-G3CMTXQV.mjs.map → chunk-SP36N6U6.mjs.map} +1 -1
- package/dist/formFields/index.cjs +26 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +1 -1
- package/dist/graphql/index.cjs +64 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +13 -2
- package/dist/graphql/index.d.ts +13 -2
- package/dist/graphql/index.mjs +5 -1
- package/dist/hooks/index.cjs +58 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +2 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.cjs +104 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +47 -1
- package/dist/index.d.ts +47 -1
- package/dist/index.mjs +100 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/utils/index.cjs +40 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +39 -1
- package/dist/utils/index.d.ts +39 -1
- package/dist/utils/index.mjs +5 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.mjs';
|
|
2
2
|
import { A as BaseResourceType, L as LocationType, aw as SocialShareResourceType, B as BaseResourceTypeFormData, D as CreateFormData, as as ResourceContactDetailsType, au as ResourceImageType, av as SocialMediaType, az as TermsAgreement, a5 as OwnerType, aj as PromoCodeType } from './global-BHwZPjT8.mjs';
|
|
3
3
|
import { PosterAssetId } from './images/index.mjs';
|
|
4
|
-
import { S as SafeUserType
|
|
4
|
+
import { S as SafeUserType } from './user-Bhkd3l06.mjs';
|
|
5
5
|
|
|
6
6
|
interface PartnerFormData extends BaseResourceTypeFormData {
|
|
7
7
|
location: LocationType;
|
|
@@ -75,73 +75,6 @@ type SchoolReturnType = {
|
|
|
75
75
|
};
|
|
76
76
|
type MarketingMaterialRequestInputType = Pick<PosterInputType, "resourceId" | "posterName">;
|
|
77
77
|
|
|
78
|
-
declare enum EnumAffiliateParticipantType {
|
|
79
|
-
INDIVIDUAL = "INDIVIDUAL",
|
|
80
|
-
SOLE_TRADER = "SOLE_TRADER",
|
|
81
|
-
COMPANY = "COMPANY"
|
|
82
|
-
}
|
|
83
|
-
type AffiliateContactDetails = {
|
|
84
|
-
mobilePhone: string;
|
|
85
|
-
};
|
|
86
|
-
type AffiliateBankAccountDetailsType = {
|
|
87
|
-
accountHolderName: string;
|
|
88
|
-
accountNumber: string;
|
|
89
|
-
};
|
|
90
|
-
type AffiliateUserDefaultFields = Pick<UserFormData, "email" | "firstName" | "lastName" | "termsAgreement">;
|
|
91
|
-
type AffiliateDetailsType = AffiliateUserDefaultFields & {
|
|
92
|
-
bankAccountDetails: AffiliateBankAccountDetailsType;
|
|
93
|
-
contactDetails: AffiliateContactDetails;
|
|
94
|
-
irdNumber: string;
|
|
95
|
-
location: LocationType;
|
|
96
|
-
participantType: EnumAffiliateParticipantType;
|
|
97
|
-
region: string;
|
|
98
|
-
socialMedia: SocialMediaType[] | null;
|
|
99
|
-
};
|
|
100
|
-
declare enum EnumAffiliateRewardType {
|
|
101
|
-
ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS = "ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS",
|
|
102
|
-
ACTIVE_VENDOR_BONUS_REWARD = "ACTIVE_VENDOR_BONUS_REWARD",
|
|
103
|
-
ACTIVE_VENDOR_PRO_SUBSCRIPTION = "ACTIVE_VENDOR_PRO_SUBSCRIPTION",
|
|
104
|
-
ACTIVE_VENDOR_STANDARD_SUBSCRIPTION = "ACTIVE_VENDOR_STANDARD_SUBSCRIPTION",
|
|
105
|
-
NEW_EVENT_REGISTRATION = "NEW_EVENT_REGISTRATION",
|
|
106
|
-
NEW_VENDOR_REGISTRATION = "NEW_VENDOR_REGISTRATION"
|
|
107
|
-
}
|
|
108
|
-
type AffiliateRewardType = {
|
|
109
|
-
createdAt: Date;
|
|
110
|
-
redeemedAt: Date | null;
|
|
111
|
-
rewardDescription: string;
|
|
112
|
-
rewardType: EnumAffiliateRewardType;
|
|
113
|
-
rewardValue: number;
|
|
114
|
-
};
|
|
115
|
-
type AffiliateResourceType = {
|
|
116
|
-
resourceActive: boolean;
|
|
117
|
-
resourceDeletedAt: Date | null;
|
|
118
|
-
resourceId: string;
|
|
119
|
-
resourceName: string;
|
|
120
|
-
resourceType: EnumResourceType;
|
|
121
|
-
rewards: AffiliateRewardType[];
|
|
122
|
-
};
|
|
123
|
-
type RedeemHistoryType = {
|
|
124
|
-
redeemedAt: Date;
|
|
125
|
-
rewardValue: number;
|
|
126
|
-
};
|
|
127
|
-
interface AffiliateType {
|
|
128
|
-
_id: string;
|
|
129
|
-
active: boolean;
|
|
130
|
-
approvedAt?: Date | null;
|
|
131
|
-
affiliateBonusRewards?: AffiliateRewardType[] | null;
|
|
132
|
-
affiliateCode: PromoCodeType | null;
|
|
133
|
-
affiliateDetails: AffiliateDetailsType | null;
|
|
134
|
-
affiliateResources: AffiliateResourceType[];
|
|
135
|
-
createdAt: Date;
|
|
136
|
-
deletedAt: Date | null;
|
|
137
|
-
overallPoints: number;
|
|
138
|
-
owner: OwnerType;
|
|
139
|
-
redeemHistory?: RedeemHistoryType[] | null;
|
|
140
|
-
updatedAt: Date | null;
|
|
141
|
-
}
|
|
142
|
-
type AffiliateFormData = AffiliateDetailsType & Pick<AffiliateType, "_id">;
|
|
143
|
-
type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
|
|
144
|
-
|
|
145
78
|
declare enum EnumVerificationType {
|
|
146
79
|
REGISTER = "register",
|
|
147
80
|
RESET_PASSWORD = "resetPassword"
|
|
@@ -243,4 +176,4 @@ interface AdType extends AdFormData {
|
|
|
243
176
|
updatedAt: Date | null;
|
|
244
177
|
}
|
|
245
178
|
|
|
246
|
-
export { type AuthPayloadType as A, type
|
|
179
|
+
export { type AuthPayloadType as A, type SchoolCampaignType as B, type CreateLoginFormData as C, type SchoolRegisteredUserType as D, EnumAdStatus as E, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type PartnerType as P, type RefreshTokenPayloadType as R, type SchoolReturnType as S, type ValidateVerificationTokenFormData as V, type AdType as a, type AppSettingsType as b, type SchoolType as c, type CreateRegisterFormData as d, type CreateRequestPasswordResetFormData as e, type CreateValidateVerificationTokenFormData as f, type CreateResetPasswordFormData as g, type PartnerFormData as h, type AdFormData as i, type CreateAdFormState as j, type CreatePartnerFormData as k, type AppSettingsFormData as l, type CreateAppSettingsFormData as m, type SchoolFormData as n, type CreateSchoolFormData as o, type AdFormState as p, type AdResource as q, type CreateAdFormData as r, EnumAdShowOn as s, EnumAdStyle as t, EnumAdType as u, EnumVerificationType as v, type PosterInputType as w, type RegisterFormData as x, type RequestPasswordResetFormData as y, type ResetPasswordFormData as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.js';
|
|
2
2
|
import { A as BaseResourceType, L as LocationType, aw as SocialShareResourceType, B as BaseResourceTypeFormData, D as CreateFormData, as as ResourceContactDetailsType, au as ResourceImageType, av as SocialMediaType, az as TermsAgreement, a5 as OwnerType, aj as PromoCodeType } from './global--iSLy2cE.js';
|
|
3
3
|
import { PosterAssetId } from './images/index.js';
|
|
4
|
-
import { S as SafeUserType
|
|
4
|
+
import { S as SafeUserType } from './user-C_kCo0Fm.js';
|
|
5
5
|
|
|
6
6
|
interface PartnerFormData extends BaseResourceTypeFormData {
|
|
7
7
|
location: LocationType;
|
|
@@ -75,73 +75,6 @@ type SchoolReturnType = {
|
|
|
75
75
|
};
|
|
76
76
|
type MarketingMaterialRequestInputType = Pick<PosterInputType, "resourceId" | "posterName">;
|
|
77
77
|
|
|
78
|
-
declare enum EnumAffiliateParticipantType {
|
|
79
|
-
INDIVIDUAL = "INDIVIDUAL",
|
|
80
|
-
SOLE_TRADER = "SOLE_TRADER",
|
|
81
|
-
COMPANY = "COMPANY"
|
|
82
|
-
}
|
|
83
|
-
type AffiliateContactDetails = {
|
|
84
|
-
mobilePhone: string;
|
|
85
|
-
};
|
|
86
|
-
type AffiliateBankAccountDetailsType = {
|
|
87
|
-
accountHolderName: string;
|
|
88
|
-
accountNumber: string;
|
|
89
|
-
};
|
|
90
|
-
type AffiliateUserDefaultFields = Pick<UserFormData, "email" | "firstName" | "lastName" | "termsAgreement">;
|
|
91
|
-
type AffiliateDetailsType = AffiliateUserDefaultFields & {
|
|
92
|
-
bankAccountDetails: AffiliateBankAccountDetailsType;
|
|
93
|
-
contactDetails: AffiliateContactDetails;
|
|
94
|
-
irdNumber: string;
|
|
95
|
-
location: LocationType;
|
|
96
|
-
participantType: EnumAffiliateParticipantType;
|
|
97
|
-
region: string;
|
|
98
|
-
socialMedia: SocialMediaType[] | null;
|
|
99
|
-
};
|
|
100
|
-
declare enum EnumAffiliateRewardType {
|
|
101
|
-
ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS = "ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS",
|
|
102
|
-
ACTIVE_VENDOR_BONUS_REWARD = "ACTIVE_VENDOR_BONUS_REWARD",
|
|
103
|
-
ACTIVE_VENDOR_PRO_SUBSCRIPTION = "ACTIVE_VENDOR_PRO_SUBSCRIPTION",
|
|
104
|
-
ACTIVE_VENDOR_STANDARD_SUBSCRIPTION = "ACTIVE_VENDOR_STANDARD_SUBSCRIPTION",
|
|
105
|
-
NEW_EVENT_REGISTRATION = "NEW_EVENT_REGISTRATION",
|
|
106
|
-
NEW_VENDOR_REGISTRATION = "NEW_VENDOR_REGISTRATION"
|
|
107
|
-
}
|
|
108
|
-
type AffiliateRewardType = {
|
|
109
|
-
createdAt: Date;
|
|
110
|
-
redeemedAt: Date | null;
|
|
111
|
-
rewardDescription: string;
|
|
112
|
-
rewardType: EnumAffiliateRewardType;
|
|
113
|
-
rewardValue: number;
|
|
114
|
-
};
|
|
115
|
-
type AffiliateResourceType = {
|
|
116
|
-
resourceActive: boolean;
|
|
117
|
-
resourceDeletedAt: Date | null;
|
|
118
|
-
resourceId: string;
|
|
119
|
-
resourceName: string;
|
|
120
|
-
resourceType: EnumResourceType;
|
|
121
|
-
rewards: AffiliateRewardType[];
|
|
122
|
-
};
|
|
123
|
-
type RedeemHistoryType = {
|
|
124
|
-
redeemedAt: Date;
|
|
125
|
-
rewardValue: number;
|
|
126
|
-
};
|
|
127
|
-
interface AffiliateType {
|
|
128
|
-
_id: string;
|
|
129
|
-
active: boolean;
|
|
130
|
-
approvedAt?: Date | null;
|
|
131
|
-
affiliateBonusRewards?: AffiliateRewardType[] | null;
|
|
132
|
-
affiliateCode: PromoCodeType | null;
|
|
133
|
-
affiliateDetails: AffiliateDetailsType | null;
|
|
134
|
-
affiliateResources: AffiliateResourceType[];
|
|
135
|
-
createdAt: Date;
|
|
136
|
-
deletedAt: Date | null;
|
|
137
|
-
overallPoints: number;
|
|
138
|
-
owner: OwnerType;
|
|
139
|
-
redeemHistory?: RedeemHistoryType[] | null;
|
|
140
|
-
updatedAt: Date | null;
|
|
141
|
-
}
|
|
142
|
-
type AffiliateFormData = AffiliateDetailsType & Pick<AffiliateType, "_id">;
|
|
143
|
-
type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
|
|
144
|
-
|
|
145
78
|
declare enum EnumVerificationType {
|
|
146
79
|
REGISTER = "register",
|
|
147
80
|
RESET_PASSWORD = "resetPassword"
|
|
@@ -243,4 +176,4 @@ interface AdType extends AdFormData {
|
|
|
243
176
|
updatedAt: Date | null;
|
|
244
177
|
}
|
|
245
178
|
|
|
246
|
-
export { type AuthPayloadType as A, type
|
|
179
|
+
export { type AuthPayloadType as A, type SchoolCampaignType as B, type CreateLoginFormData as C, type SchoolRegisteredUserType as D, EnumAdStatus as E, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type PartnerType as P, type RefreshTokenPayloadType as R, type SchoolReturnType as S, type ValidateVerificationTokenFormData as V, type AdType as a, type AppSettingsType as b, type SchoolType as c, type CreateRegisterFormData as d, type CreateRequestPasswordResetFormData as e, type CreateValidateVerificationTokenFormData as f, type CreateResetPasswordFormData as g, type PartnerFormData as h, type AdFormData as i, type CreateAdFormState as j, type CreatePartnerFormData as k, type AppSettingsFormData as l, type CreateAppSettingsFormData as m, type SchoolFormData as n, type CreateSchoolFormData as o, type AdFormState as p, type AdResource as q, type CreateAdFormData as r, EnumAdShowOn as s, EnumAdStyle as t, EnumAdType as u, EnumVerificationType as v, type PosterInputType as w, type RegisterFormData as x, type RequestPasswordResetFormData as y, type ResetPasswordFormData as z };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { EnumResourceType } from './enums/index.js';
|
|
2
|
+
import { aj as PromoCodeType, L as LocationType, av as SocialMediaType, a5 as OwnerType, D as CreateFormData } from './global--iSLy2cE.js';
|
|
3
|
+
import { U as UserFormData } from './user-C_kCo0Fm.js';
|
|
4
|
+
|
|
5
|
+
declare enum EnumAffiliateParticipantType {
|
|
6
|
+
INDIVIDUAL = "INDIVIDUAL",
|
|
7
|
+
SOLE_TRADER = "SOLE_TRADER",
|
|
8
|
+
COMPANY = "COMPANY"
|
|
9
|
+
}
|
|
10
|
+
type AffiliateContactDetails = {
|
|
11
|
+
mobilePhone: string;
|
|
12
|
+
};
|
|
13
|
+
type AffiliateBankAccountDetailsType = {
|
|
14
|
+
accountHolderName: string;
|
|
15
|
+
accountNumber: string;
|
|
16
|
+
};
|
|
17
|
+
type AffiliateUserDefaultFields = Pick<UserFormData, "email" | "firstName" | "lastName" | "termsAgreement">;
|
|
18
|
+
type AffiliateDetailsType = AffiliateUserDefaultFields & {
|
|
19
|
+
bankAccountDetails: AffiliateBankAccountDetailsType;
|
|
20
|
+
contactDetails: AffiliateContactDetails;
|
|
21
|
+
irdNumber: string;
|
|
22
|
+
location: LocationType;
|
|
23
|
+
participantType: EnumAffiliateParticipantType;
|
|
24
|
+
region: string;
|
|
25
|
+
socialMedia: SocialMediaType[] | null;
|
|
26
|
+
};
|
|
27
|
+
declare enum EnumAffiliateRewardType {
|
|
28
|
+
ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS = "ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS",
|
|
29
|
+
ACTIVE_VENDOR_BONUS_REWARD = "ACTIVE_VENDOR_BONUS_REWARD",
|
|
30
|
+
ACTIVE_VENDOR_PRO_SUBSCRIPTION = "ACTIVE_VENDOR_PRO_SUBSCRIPTION",
|
|
31
|
+
ACTIVE_VENDOR_STANDARD_SUBSCRIPTION = "ACTIVE_VENDOR_STANDARD_SUBSCRIPTION",
|
|
32
|
+
NEW_EVENT_REGISTRATION = "NEW_EVENT_REGISTRATION",
|
|
33
|
+
NEW_VENDOR_REGISTRATION = "NEW_VENDOR_REGISTRATION"
|
|
34
|
+
}
|
|
35
|
+
type AffiliateRewardType = {
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
redeemedAt: Date | null;
|
|
38
|
+
rewardDescription: string;
|
|
39
|
+
rewardType: EnumAffiliateRewardType;
|
|
40
|
+
rewardValue: number;
|
|
41
|
+
};
|
|
42
|
+
type AffiliateResourceType = {
|
|
43
|
+
resourceActive: boolean;
|
|
44
|
+
resourceDeletedAt: Date | null;
|
|
45
|
+
resourceId: string;
|
|
46
|
+
resourceName: string;
|
|
47
|
+
resourceType: EnumResourceType;
|
|
48
|
+
rewards: AffiliateRewardType[];
|
|
49
|
+
};
|
|
50
|
+
type RedeemHistoryType = {
|
|
51
|
+
redeemedAt: Date;
|
|
52
|
+
rewardValue: number;
|
|
53
|
+
};
|
|
54
|
+
interface AffiliateType {
|
|
55
|
+
_id: string;
|
|
56
|
+
active: boolean;
|
|
57
|
+
approvedAt?: Date | null;
|
|
58
|
+
affiliateBonusRewards?: AffiliateRewardType[] | null;
|
|
59
|
+
affiliateCode: PromoCodeType | null;
|
|
60
|
+
affiliateDetails: AffiliateDetailsType | null;
|
|
61
|
+
affiliateResources: AffiliateResourceType[];
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
deletedAt: Date | null;
|
|
64
|
+
overallPoints: number;
|
|
65
|
+
owner: OwnerType;
|
|
66
|
+
redeemHistory?: RedeemHistoryType[] | null;
|
|
67
|
+
updatedAt: Date | null;
|
|
68
|
+
}
|
|
69
|
+
type AffiliateFormData = AffiliateDetailsType & Pick<AffiliateType, "_id">;
|
|
70
|
+
type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
|
|
71
|
+
|
|
72
|
+
export { type AffiliateType as A, type CreateAffiliateFormData as C, EnumAffiliateParticipantType as E, type RedeemHistoryType as R, type AffiliateFormData as a, type AffiliateBankAccountDetailsType as b, type AffiliateContactDetails as c, type AffiliateDetailsType as d, type AffiliateResourceType as e, type AffiliateRewardType as f, type AffiliateUserDefaultFields as g, EnumAffiliateRewardType as h };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { EnumResourceType } from './enums/index.mjs';
|
|
2
|
+
import { aj as PromoCodeType, L as LocationType, av as SocialMediaType, a5 as OwnerType, D as CreateFormData } from './global-BHwZPjT8.mjs';
|
|
3
|
+
import { U as UserFormData } from './user-Bhkd3l06.mjs';
|
|
4
|
+
|
|
5
|
+
declare enum EnumAffiliateParticipantType {
|
|
6
|
+
INDIVIDUAL = "INDIVIDUAL",
|
|
7
|
+
SOLE_TRADER = "SOLE_TRADER",
|
|
8
|
+
COMPANY = "COMPANY"
|
|
9
|
+
}
|
|
10
|
+
type AffiliateContactDetails = {
|
|
11
|
+
mobilePhone: string;
|
|
12
|
+
};
|
|
13
|
+
type AffiliateBankAccountDetailsType = {
|
|
14
|
+
accountHolderName: string;
|
|
15
|
+
accountNumber: string;
|
|
16
|
+
};
|
|
17
|
+
type AffiliateUserDefaultFields = Pick<UserFormData, "email" | "firstName" | "lastName" | "termsAgreement">;
|
|
18
|
+
type AffiliateDetailsType = AffiliateUserDefaultFields & {
|
|
19
|
+
bankAccountDetails: AffiliateBankAccountDetailsType;
|
|
20
|
+
contactDetails: AffiliateContactDetails;
|
|
21
|
+
irdNumber: string;
|
|
22
|
+
location: LocationType;
|
|
23
|
+
participantType: EnumAffiliateParticipantType;
|
|
24
|
+
region: string;
|
|
25
|
+
socialMedia: SocialMediaType[] | null;
|
|
26
|
+
};
|
|
27
|
+
declare enum EnumAffiliateRewardType {
|
|
28
|
+
ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS = "ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS",
|
|
29
|
+
ACTIVE_VENDOR_BONUS_REWARD = "ACTIVE_VENDOR_BONUS_REWARD",
|
|
30
|
+
ACTIVE_VENDOR_PRO_SUBSCRIPTION = "ACTIVE_VENDOR_PRO_SUBSCRIPTION",
|
|
31
|
+
ACTIVE_VENDOR_STANDARD_SUBSCRIPTION = "ACTIVE_VENDOR_STANDARD_SUBSCRIPTION",
|
|
32
|
+
NEW_EVENT_REGISTRATION = "NEW_EVENT_REGISTRATION",
|
|
33
|
+
NEW_VENDOR_REGISTRATION = "NEW_VENDOR_REGISTRATION"
|
|
34
|
+
}
|
|
35
|
+
type AffiliateRewardType = {
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
redeemedAt: Date | null;
|
|
38
|
+
rewardDescription: string;
|
|
39
|
+
rewardType: EnumAffiliateRewardType;
|
|
40
|
+
rewardValue: number;
|
|
41
|
+
};
|
|
42
|
+
type AffiliateResourceType = {
|
|
43
|
+
resourceActive: boolean;
|
|
44
|
+
resourceDeletedAt: Date | null;
|
|
45
|
+
resourceId: string;
|
|
46
|
+
resourceName: string;
|
|
47
|
+
resourceType: EnumResourceType;
|
|
48
|
+
rewards: AffiliateRewardType[];
|
|
49
|
+
};
|
|
50
|
+
type RedeemHistoryType = {
|
|
51
|
+
redeemedAt: Date;
|
|
52
|
+
rewardValue: number;
|
|
53
|
+
};
|
|
54
|
+
interface AffiliateType {
|
|
55
|
+
_id: string;
|
|
56
|
+
active: boolean;
|
|
57
|
+
approvedAt?: Date | null;
|
|
58
|
+
affiliateBonusRewards?: AffiliateRewardType[] | null;
|
|
59
|
+
affiliateCode: PromoCodeType | null;
|
|
60
|
+
affiliateDetails: AffiliateDetailsType | null;
|
|
61
|
+
affiliateResources: AffiliateResourceType[];
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
deletedAt: Date | null;
|
|
64
|
+
overallPoints: number;
|
|
65
|
+
owner: OwnerType;
|
|
66
|
+
redeemHistory?: RedeemHistoryType[] | null;
|
|
67
|
+
updatedAt: Date | null;
|
|
68
|
+
}
|
|
69
|
+
type AffiliateFormData = AffiliateDetailsType & Pick<AffiliateType, "_id">;
|
|
70
|
+
type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
|
|
71
|
+
|
|
72
|
+
export { type AffiliateType as A, type CreateAffiliateFormData as C, EnumAffiliateParticipantType as E, type RedeemHistoryType as R, type AffiliateFormData as a, type AffiliateBankAccountDetailsType as b, type AffiliateContactDetails as c, type AffiliateDetailsType as d, type AffiliateResourceType as e, type AffiliateRewardType as f, type AffiliateUserDefaultFields as g, EnumAffiliateRewardType as h };
|
package/dist/auth/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __export(auth_exports, {
|
|
|
24
24
|
ADMIN_APP_ROLES: () => ADMIN_APP_ROLES,
|
|
25
25
|
ADMIN_DASHBOARD_CONTEXTS: () => ADMIN_DASHBOARD_CONTEXTS,
|
|
26
26
|
DEFAULT_LIMITS: () => DEFAULT_LIMITS,
|
|
27
|
+
NO_LICENCE_FLAGS: () => NO_LICENCE_FLAGS,
|
|
27
28
|
PERMISSIONS: () => PERMISSIONS,
|
|
28
29
|
ROLE_PERMISSIONS: () => ROLE_PERMISSIONS,
|
|
29
30
|
UserProvider: () => UserProvider,
|
|
@@ -124,8 +125,29 @@ var DEFAULT_LIMITS = {
|
|
|
124
125
|
relationShare: { pro: 1, pro_plus: 1, standard: 0 },
|
|
125
126
|
statistics: { pro: 1, pro_plus: 1, standard: 0 }
|
|
126
127
|
};
|
|
128
|
+
var NO_LICENCE_FLAGS = {
|
|
129
|
+
event: {
|
|
130
|
+
pro_plus: false,
|
|
131
|
+
// eslint-disable-next-line sort-keys
|
|
132
|
+
pro: false,
|
|
133
|
+
standard: false
|
|
134
|
+
},
|
|
135
|
+
partner: {
|
|
136
|
+
pro_plus: false,
|
|
137
|
+
// eslint-disable-next-line sort-keys
|
|
138
|
+
pro: false,
|
|
139
|
+
standard: false
|
|
140
|
+
},
|
|
141
|
+
vendor: {
|
|
142
|
+
pro_plus: false,
|
|
143
|
+
// eslint-disable-next-line sort-keys
|
|
144
|
+
pro: false,
|
|
145
|
+
standard: false
|
|
146
|
+
}
|
|
147
|
+
};
|
|
127
148
|
function getLicenceFlagsByRole(licences) {
|
|
128
149
|
const normalized = licences?.map((l) => l.toLowerCase()) ?? [];
|
|
150
|
+
const hasAnyLicence = normalized.length > 0;
|
|
129
151
|
function resolve(role) {
|
|
130
152
|
const result = {
|
|
131
153
|
pro_plus: false,
|
|
@@ -139,6 +161,9 @@ function getLicenceFlagsByRole(licences) {
|
|
|
139
161
|
break;
|
|
140
162
|
}
|
|
141
163
|
}
|
|
164
|
+
if (!hasAnyLicence) {
|
|
165
|
+
result.pro = true;
|
|
166
|
+
}
|
|
142
167
|
return result;
|
|
143
168
|
}
|
|
144
169
|
return {
|
|
@@ -1487,7 +1512,7 @@ function useAuthCore(adapters) {
|
|
|
1487
1512
|
authUser?.partner ?? null,
|
|
1488
1513
|
...authUser?.events ?? []
|
|
1489
1514
|
].filter((id) => id !== null);
|
|
1490
|
-
return myResourceIds.includes(resourceId) ? getLicenceFlagsByRole(myLicences) :
|
|
1515
|
+
return myResourceIds.includes(resourceId) ? getLicenceFlagsByRole(myLicences) : NO_LICENCE_FLAGS;
|
|
1491
1516
|
},
|
|
1492
1517
|
[authUser]
|
|
1493
1518
|
);
|
|
@@ -1648,6 +1673,7 @@ var useAuthUser = () => {
|
|
|
1648
1673
|
ADMIN_APP_ROLES,
|
|
1649
1674
|
ADMIN_DASHBOARD_CONTEXTS,
|
|
1650
1675
|
DEFAULT_LIMITS,
|
|
1676
|
+
NO_LICENCE_FLAGS,
|
|
1651
1677
|
PERMISSIONS,
|
|
1652
1678
|
ROLE_PERMISSIONS,
|
|
1653
1679
|
UserProvider,
|