@open-tender/types 0.3.11 → 0.3.13

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.
@@ -4,6 +4,7 @@ export * from './communicationPreferences';
4
4
  export * from './giftCards';
5
5
  export * from './customer';
6
6
  export * from './loyalty';
7
+ export * from './loyaltyV2';
7
8
  export * from './groupOrders';
8
9
  export * from './allergens';
9
10
  export * from './houseAccounts';
@@ -7,6 +7,7 @@ tslib_1.__exportStar(require("./communicationPreferences"), exports);
7
7
  tslib_1.__exportStar(require("./giftCards"), exports);
8
8
  tslib_1.__exportStar(require("./customer"), exports);
9
9
  tslib_1.__exportStar(require("./loyalty"), exports);
10
+ tslib_1.__exportStar(require("./loyaltyV2"), exports);
10
11
  tslib_1.__exportStar(require("./groupOrders"), exports);
11
12
  tslib_1.__exportStar(require("./allergens"), exports);
12
13
  tslib_1.__exportStar(require("./houseAccounts"), exports);
@@ -50,15 +50,15 @@ export interface LoyaltyTier {
50
50
  description: string;
51
51
  discount: LoyaltyDiscount | null;
52
52
  hex_code: string;
53
- is_current_tier: true;
53
+ is_current_tier: boolean;
54
54
  name: string;
55
55
  threshold: string;
56
56
  tier_no: number;
57
57
  }
58
58
  export interface LoyaltyStatus {
59
- days: number;
59
+ days: number | null;
60
60
  progress: Money;
61
- tier: LoyaltyTier;
61
+ tier: LoyaltyTier | null;
62
62
  }
63
63
  export declare type LoyaltyTiers = LoyaltyTier[];
64
64
  export interface LoyaltyProgram {
@@ -0,0 +1,57 @@
1
+ import { DiscountType, Money } from '../../global';
2
+ export declare type LoyaltyV2Type = 'DOLLARS' | 'ORDERS' | 'POINTS';
3
+ export interface LoyaltyV2Threshold {
4
+ description: string;
5
+ name: string;
6
+ points: number;
7
+ }
8
+ export declare type LoyaltyV2Thresholds = LoyaltyV2Threshold[];
9
+ export interface LoyaltyV2ThresholdAugmented extends LoyaltyV2Threshold {
10
+ percentage: number;
11
+ isFilled: boolean;
12
+ }
13
+ export declare type LoyaltyV2ThresholdsAugmented = LoyaltyV2ThresholdAugmented[];
14
+ export interface LoyaltyV2Reward {
15
+ amount: string;
16
+ created_at?: string;
17
+ description: string;
18
+ discount_id: number;
19
+ discount_type: DiscountType;
20
+ expires_at?: string;
21
+ name: string;
22
+ title: string;
23
+ }
24
+ export declare type LoyaltyV2Rewards = LoyaltyV2Reward[];
25
+ export interface LoyaltyV2Tier {
26
+ description: string;
27
+ hex_code: string;
28
+ is_current_tier: boolean;
29
+ name: string;
30
+ reward: LoyaltyV2Reward | null;
31
+ threshold: Money;
32
+ tier_no: number;
33
+ }
34
+ export declare type LoyaltyV2Tier2 = LoyaltyV2Tier[];
35
+ export interface LoyaltyV2Status {
36
+ progress: Money;
37
+ tiers: LoyaltyV2Tier2;
38
+ }
39
+ export declare type LoyaltyV2PerkType = 'BANKABLE_POINTS' | 'DISCRETE_REWARD' | 'DOLLARS_CREDIT';
40
+ export interface LoyaltyV2Perk {
41
+ credit: Money | null;
42
+ loyalty_perk: LoyaltyV2PerkType;
43
+ progress: Money | null;
44
+ rewards?: LoyaltyV2Rewards;
45
+ threshold: Money | null;
46
+ thresholds?: LoyaltyV2Thresholds;
47
+ }
48
+ export interface LoyaltyV2Program {
49
+ description: string;
50
+ loyalty_program_id: number;
51
+ loyalty_type: LoyaltyV2Type;
52
+ name: string;
53
+ perk: LoyaltyV2Perk | null;
54
+ spend_name: string | null;
55
+ status: LoyaltyV2Status | null;
56
+ }
57
+ export declare type LoyaltyV2Programs = LoyaltyV2Program[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,6 +4,7 @@ export * from './communicationPreferences';
4
4
  export * from './giftCards';
5
5
  export * from './customer';
6
6
  export * from './loyalty';
7
+ export * from './loyaltyV2';
7
8
  export * from './groupOrders';
8
9
  export * from './allergens';
9
10
  export * from './houseAccounts';
@@ -4,6 +4,7 @@ export * from './communicationPreferences';
4
4
  export * from './giftCards';
5
5
  export * from './customer';
6
6
  export * from './loyalty';
7
+ export * from './loyaltyV2';
7
8
  export * from './groupOrders';
8
9
  export * from './allergens';
9
10
  export * from './houseAccounts';
@@ -50,15 +50,15 @@ export interface LoyaltyTier {
50
50
  description: string;
51
51
  discount: LoyaltyDiscount | null;
52
52
  hex_code: string;
53
- is_current_tier: true;
53
+ is_current_tier: boolean;
54
54
  name: string;
55
55
  threshold: string;
56
56
  tier_no: number;
57
57
  }
58
58
  export interface LoyaltyStatus {
59
- days: number;
59
+ days: number | null;
60
60
  progress: Money;
61
- tier: LoyaltyTier;
61
+ tier: LoyaltyTier | null;
62
62
  }
63
63
  export declare type LoyaltyTiers = LoyaltyTier[];
64
64
  export interface LoyaltyProgram {
@@ -0,0 +1,57 @@
1
+ import { DiscountType, Money } from '../../global';
2
+ export declare type LoyaltyV2Type = 'DOLLARS' | 'ORDERS' | 'POINTS';
3
+ export interface LoyaltyV2Threshold {
4
+ description: string;
5
+ name: string;
6
+ points: number;
7
+ }
8
+ export declare type LoyaltyV2Thresholds = LoyaltyV2Threshold[];
9
+ export interface LoyaltyV2ThresholdAugmented extends LoyaltyV2Threshold {
10
+ percentage: number;
11
+ isFilled: boolean;
12
+ }
13
+ export declare type LoyaltyV2ThresholdsAugmented = LoyaltyV2ThresholdAugmented[];
14
+ export interface LoyaltyV2Reward {
15
+ amount: string;
16
+ created_at?: string;
17
+ description: string;
18
+ discount_id: number;
19
+ discount_type: DiscountType;
20
+ expires_at?: string;
21
+ name: string;
22
+ title: string;
23
+ }
24
+ export declare type LoyaltyV2Rewards = LoyaltyV2Reward[];
25
+ export interface LoyaltyV2Tier {
26
+ description: string;
27
+ hex_code: string;
28
+ is_current_tier: boolean;
29
+ name: string;
30
+ reward: LoyaltyV2Reward | null;
31
+ threshold: Money;
32
+ tier_no: number;
33
+ }
34
+ export declare type LoyaltyV2Tier2 = LoyaltyV2Tier[];
35
+ export interface LoyaltyV2Status {
36
+ progress: Money;
37
+ tiers: LoyaltyV2Tier2;
38
+ }
39
+ export declare type LoyaltyV2PerkType = 'BANKABLE_POINTS' | 'DISCRETE_REWARD' | 'DOLLARS_CREDIT';
40
+ export interface LoyaltyV2Perk {
41
+ credit: Money | null;
42
+ loyalty_perk: LoyaltyV2PerkType;
43
+ progress: Money | null;
44
+ rewards?: LoyaltyV2Rewards;
45
+ threshold: Money | null;
46
+ thresholds?: LoyaltyV2Thresholds;
47
+ }
48
+ export interface LoyaltyV2Program {
49
+ description: string;
50
+ loyalty_program_id: number;
51
+ loyalty_type: LoyaltyV2Type;
52
+ name: string;
53
+ perk: LoyaltyV2Perk | null;
54
+ spend_name: string | null;
55
+ status: LoyaltyV2Status | null;
56
+ }
57
+ export declare type LoyaltyV2Programs = LoyaltyV2Program[];
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/types",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "description": "A library of types for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",