@nuskin/react-loyalty-elements 1.0.8-nge2-2523.2 → 1.0.8

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.
@@ -1,13 +1,5 @@
1
1
  import { CalculateMonthCompletionParams } from '../types';
2
- export type Tier = {
3
- consecutive_months: number;
4
- min_spend: number;
5
- max_spend?: number;
6
- promo_code: string;
7
- };
8
- export declare const findTierForAmount: (amount: number, tiers?: Tier[]) => Tier;
9
- export declare const extractVoucherFromPromoCode: (promoCode: string) => number;
10
- export declare const calculateMonthCompletionValues: ({ data, minAmount, tiers, initialVoucherValue, initialMonthCompletionValue, maxMonths, today, }: CalculateMonthCompletionParams) => {
2
+ export declare const calculateMonthCompletionValues: ({ data, minAmount, maxAmount, minVoucher, maxVoucher, initialVoucherValue, initialMonthCompletionValue, maxMonths, today, }: CalculateMonthCompletionParams) => {
11
3
  monthCompletionValue: number;
12
4
  voucherValue: number;
13
5
  };
@@ -1,3 +1,7 @@
1
+ export type ApproximateMonthlyTotal = {
2
+ currentMonthTotal: number;
3
+ nextMonthTotal?: number;
4
+ };
1
5
  export type StoreMonthlySubsOrder = {
2
6
  accountId?: number;
3
7
  userId?: number;
@@ -13,8 +17,8 @@ export type StoreMonthlySubsOrder = {
13
17
  export type MonthlyData = {
14
18
  approximateMonthlyTotalResponse?: {
15
19
  currentMonthTotal?: string;
16
- nextMonthTotal?: number;
17
20
  };
21
+ approximateMonthlyTotal?: ApproximateMonthlyTotal;
18
22
  csmMonthlySubsOrderTotal?: StoreMonthlySubsOrder[];
19
23
  };
20
24
  export type OrderRecord = {
@@ -101,12 +105,9 @@ export type RewardSubscriptionMonthDescriptionProps = {
101
105
  export type CalculateMonthCompletionParams = {
102
106
  data: MonthlyData | null | undefined;
103
107
  minAmount: number;
104
- tiers: {
105
- consecutive_months: number;
106
- min_spend: number;
107
- max_spend?: number;
108
- promo_code: string;
109
- }[];
108
+ maxAmount: number;
109
+ minVoucher: number;
110
+ maxVoucher: number;
110
111
  initialVoucherValue: number;
111
112
  initialMonthCompletionValue: number;
112
113
  maxMonths: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/react-loyalty-elements",
3
- "version": "1.0.8-nge2-2523.2",
3
+ "version": "1.0.8",
4
4
  "description": "A React based component library for reusable Nextgen Loyalty component",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",