@nuskin/react-loyalty-elements
Version:
A React based component library for reusable Nextgen Loyalty component
14 lines (13 loc) • 600 B
TypeScript
import { CalculateMonthCompletionParams } from '../types';
export type Tier = {
consecutive_months: number;
min_spend: number;
max_spend?: number;
promo_code: string;
};
export declare const findTierForAmount: (amount: number, tiers?: Tier[]) => Tier;
export declare const extractVoucherFromPromoCode: (promoCode: string) => number;
export declare const calculateMonthCompletionValues: ({ data, minAmount, tiers, initialVoucherValue, initialMonthCompletionValue, maxMonths, today, }: CalculateMonthCompletionParams) => {
monthCompletionValue: number;
voucherValue: number;
};