@timardex/cluemart-shared 1.5.832 → 1.5.834
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 +3 -3
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.mjs +3 -3
- 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
|
@@ -1504,9 +1504,6 @@ function useAuthCore(adapters) {
|
|
|
1504
1504
|
const licences = (0, import_react.useCallback)(
|
|
1505
1505
|
(resourceId) => {
|
|
1506
1506
|
const myLicences = authUser?.licences?.map((licence) => licence.licenceType) ?? [];
|
|
1507
|
-
if (resourceId === "") {
|
|
1508
|
-
return getLicenceFlagsByRole(myLicences);
|
|
1509
|
-
}
|
|
1510
1507
|
const myResourceIds = [
|
|
1511
1508
|
authUser?.vendor ?? null,
|
|
1512
1509
|
authUser?.partner ?? null,
|
|
@@ -1521,6 +1518,9 @@ function useAuthCore(adapters) {
|
|
|
1521
1518
|
if (!isLicencedResourceType(resourceType)) {
|
|
1522
1519
|
return 0;
|
|
1523
1520
|
}
|
|
1521
|
+
if (!resourceId) {
|
|
1522
|
+
return DEFAULT_LIMITS[limitType].pro;
|
|
1523
|
+
}
|
|
1524
1524
|
const roleLicences = licences(resourceId)[resourceType];
|
|
1525
1525
|
if (roleLicences.pro_plus) return DEFAULT_LIMITS[limitType].pro_plus;
|
|
1526
1526
|
if (roleLicences.pro) return DEFAULT_LIMITS[limitType].pro;
|