@timardex/cluemart-shared 1.5.832 → 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/{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 };
|
|
@@ -1494,6 +1494,42 @@ var AFFILIATE_PARTICIPANT_TYPE_LABELS = {
|
|
|
1494
1494
|
["SOLE_TRADER" /* SOLE_TRADER */]: "Sole Trader",
|
|
1495
1495
|
["COMPANY" /* COMPANY */]: "Company"
|
|
1496
1496
|
};
|
|
1497
|
+
var AFFILIATE_REWARDS = {
|
|
1498
|
+
["NEW_EVENT_REGISTRATION" /* NEW_EVENT_REGISTRATION */]: {
|
|
1499
|
+
description: "10 points for new event registration (one-time reward)",
|
|
1500
|
+
value: 10
|
|
1501
|
+
},
|
|
1502
|
+
["NEW_VENDOR_REGISTRATION" /* NEW_VENDOR_REGISTRATION */]: {
|
|
1503
|
+
description: "5 points for new vendor registration (one-time reward)",
|
|
1504
|
+
value: 5
|
|
1505
|
+
},
|
|
1506
|
+
["ACTIVE_VENDOR_PRO_SUBSCRIPTION" /* ACTIVE_VENDOR_PRO_SUBSCRIPTION */]: {
|
|
1507
|
+
description: "3 points for active vendor pro subscription (monthly reward)",
|
|
1508
|
+
value: 3
|
|
1509
|
+
},
|
|
1510
|
+
["ACTIVE_VENDOR_STANDARD_SUBSCRIPTION" /* ACTIVE_VENDOR_STANDARD_SUBSCRIPTION */]: {
|
|
1511
|
+
description: "1 point for active vendor standard subscription (monthly reward)",
|
|
1512
|
+
value: 1
|
|
1513
|
+
},
|
|
1514
|
+
["ACTIVE_VENDOR_BONUS_REWARD" /* ACTIVE_VENDOR_BONUS_REWARD */]: {
|
|
1515
|
+
description: "5 bonus points for every 10th active vendor (one-time reward)",
|
|
1516
|
+
value: 5
|
|
1517
|
+
},
|
|
1518
|
+
["ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS" /* ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS */]: {
|
|
1519
|
+
description: "40 points for active event with vendor registrations (one-time reward)",
|
|
1520
|
+
value: 40
|
|
1521
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
function createAffiliateReward(rewardType, createdAt) {
|
|
1524
|
+
const reward = AFFILIATE_REWARDS[rewardType];
|
|
1525
|
+
return {
|
|
1526
|
+
createdAt,
|
|
1527
|
+
redeemedAt: null,
|
|
1528
|
+
rewardDescription: reward.description,
|
|
1529
|
+
rewardType,
|
|
1530
|
+
rewardValue: reward.value
|
|
1531
|
+
};
|
|
1532
|
+
}
|
|
1497
1533
|
|
|
1498
1534
|
// src/utils/irdNumber.ts
|
|
1499
1535
|
var PRIMARY_WEIGHTS = [3, 2, 7, 6, 5, 4, 3, 2];
|
|
@@ -1649,6 +1685,8 @@ export {
|
|
|
1649
1685
|
getVendorEventRelationDateOptions,
|
|
1650
1686
|
getVendorEventsEmptyMessage,
|
|
1651
1687
|
AFFILIATE_PARTICIPANT_TYPE_LABELS,
|
|
1688
|
+
AFFILIATE_REWARDS,
|
|
1689
|
+
createAffiliateReward,
|
|
1652
1690
|
normalizeIrdNumber,
|
|
1653
1691
|
formatIrdNumber,
|
|
1654
1692
|
isValidIrdNumber,
|
|
@@ -1658,4 +1696,4 @@ export {
|
|
|
1658
1696
|
toUserFacingErrorMessage,
|
|
1659
1697
|
getErrorMessage
|
|
1660
1698
|
};
|
|
1661
|
-
//# sourceMappingURL=chunk-
|
|
1699
|
+
//# sourceMappingURL=chunk-MLNJAQVM.mjs.map
|