@nuskin/react-loyalty-elements
Version:
A React based component library for reusable Nextgen Loyalty component
99 lines (98 loc) • 3 kB
TypeScript
export type ApproximateMonthlyTotal = {
currentMonthTotal: number;
nextMonthTotal?: number;
};
export type StoreMonthlySubsOrder = {
accountId?: number;
userId?: number;
nuskinAccountId?: string;
year: number;
month: number;
storeId?: number;
totalAmount: number;
promocode: string | null;
createdTime?: string;
updatedTime?: string;
};
export type MonthlyData = {
approximateMonthlyTotalResponse?: {
currentMonthTotal?: string;
};
approximateMonthlyTotal?: ApproximateMonthlyTotal;
csmMonthlySubsOrderTotal?: StoreMonthlySubsOrder[];
};
export type TranslationConfig = {
header?: string | undefined;
voucherTargetAmount: string;
monthsComplete: string;
voucherEarned: string;
learnMore: string;
learn3xMore: string;
callToAction: string;
notQualify: string;
approximateMonthly: string;
approximateTotal: string;
currentlyTrack: string;
loyaltyLogoBlack: string;
estimateDisclaimer?: string | undefined;
};
export type LearnMoreConfig = {
tagLine: string;
cardOneDescription: string;
cardOneVoucherAmount: string;
cardTwoDescription: string;
cardTwoVoucherAmount: string;
header: string;
loyaltyLogoWhite: string;
loyaltyBanner: string;
learnMore: string;
};
export type RewardProgressBarProps = {
value?: number;
title?: string;
amountShow?: number | undefined;
voucherValue?: number | null;
monthCompletionValue?: number;
minAmount?: number;
maxMonths?: number;
approximateMonthlyTotalResponse?: object;
subscriptionData?: null | MonthlyData;
handleOpenSubscriptionRewardPopup?: () => void;
notQualifyForRewardThisMonth?: boolean;
translationConfig: TranslationConfig;
learnMoreConfig: LearnMoreConfig;
storeConfig: {
tiers?: [
{
consecutive_months: number;
min_spend: number;
max_spend: number;
promo_code: string;
},
{
consecutive_months: number;
min_spend: number;
promo_code: string;
}
];
currencyAbbreviate?: boolean;
};
currencyAbbreviate?: boolean;
currencyFormat?: (price: number, currencyWithoutDecimal: boolean, currencyAbbreviate: boolean) => void;
};
export type RewardSubscriptionMonthDescriptionProps = {
value: number;
amountShow?: number;
voucherValue: number | null;
monthCompletionValue?: number;
minAmount?: number;
maxMonths: number;
approximateMonthlyTotalResponse?: object;
subscriptionData?: MonthlyData;
handleOpenSubscriptionRewardPopup: () => void;
notQualifyForRewardThisMonth: boolean;
translationConfig?: TranslationConfig;
learnMoreConfig?: LearnMoreConfig;
currencyAbbreviate?: boolean;
currencyFormat?: (price: number, currencyWithoutDecimal: boolean, currencyAbbreviate: boolean) => void;
};