@open-tender/types 0.3.13 → 0.3.14

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,7 +4,6 @@ export * from './communicationPreferences';
4
4
  export * from './giftCards';
5
5
  export * from './customer';
6
6
  export * from './loyalty';
7
- export * from './loyaltyV2';
8
7
  export * from './groupOrders';
9
8
  export * from './allergens';
10
9
  export * from './houseAccounts';
@@ -7,7 +7,6 @@ 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);
11
10
  tslib_1.__exportStar(require("./groupOrders"), exports);
12
11
  tslib_1.__exportStar(require("./allergens"), exports);
13
12
  tslib_1.__exportStar(require("./houseAccounts"), exports);
@@ -1,36 +1,9 @@
1
- import { Money, OrderType } from '../../global';
2
- export interface LoyaltyCredit {
3
- current: string;
4
- total: string;
5
- }
1
+ import { DiscountType, Money } from '../../global';
6
2
  export declare type LoyaltyType = 'DOLLARS' | 'ORDERS' | 'POINTS';
7
- export interface LoyaltyPoints {
8
- expiration_days: number;
9
- name: string;
10
- points: number;
11
- points_per_dollar: number;
12
- remaining?: number;
13
- balance?: number;
14
- index?: number;
15
- available?: number;
16
- applied?: number;
17
- }
18
- export interface LoyaltyRedemption {
19
- order_type: OrderType;
20
- reward: string;
21
- threshold: string;
22
- type: string;
23
- }
24
- export interface LoyaltySpend {
25
- current: string | null;
26
- order_type: OrderType;
27
- total: string;
28
- type: string;
29
- }
30
3
  export interface LoyaltyThreshold {
4
+ description: string;
31
5
  name: string;
32
6
  points: number;
33
- description: string;
34
7
  }
35
8
  export declare type LoyaltyThresholds = LoyaltyThreshold[];
36
9
  export interface LoyaltyThresholdAugmented extends LoyaltyThreshold {
@@ -38,41 +11,47 @@ export interface LoyaltyThresholdAugmented extends LoyaltyThreshold {
38
11
  isFilled: boolean;
39
12
  }
40
13
  export declare type LoyaltyThresholdsAugmented = LoyaltyThresholdAugmented[];
41
- export interface LoyaltyDiscount {
14
+ export interface LoyaltyReward {
42
15
  amount: string;
16
+ created_at?: string;
43
17
  description: string;
44
18
  discount_id: number;
45
- discount_type: string;
19
+ discount_type: DiscountType;
20
+ expires_at?: string;
46
21
  name: string;
47
22
  title: string;
48
23
  }
24
+ export declare type LoyaltyRewards = LoyaltyReward[];
49
25
  export interface LoyaltyTier {
50
26
  description: string;
51
- discount: LoyaltyDiscount | null;
52
27
  hex_code: string;
53
28
  is_current_tier: boolean;
54
29
  name: string;
55
- threshold: string;
30
+ reward: LoyaltyReward | null;
31
+ threshold: Money;
56
32
  tier_no: number;
57
33
  }
34
+ export declare type LoyaltyTier2 = LoyaltyTier[];
58
35
  export interface LoyaltyStatus {
59
- days: number | null;
60
36
  progress: Money;
61
- tier: LoyaltyTier | null;
37
+ tiers: LoyaltyTier2;
38
+ }
39
+ export declare type LoyaltyPerkType = 'BANKABLE_POINTS' | 'DISCRETE_REWARD' | 'DOLLARS_CREDIT';
40
+ export interface LoyaltyPerk {
41
+ credit: Money | null;
42
+ loyalty_perk: LoyaltyPerkType;
43
+ progress: Money | null;
44
+ rewards?: LoyaltyRewards;
45
+ threshold: Money | null;
46
+ thresholds?: LoyaltyThresholds;
62
47
  }
63
- export declare type LoyaltyTiers = LoyaltyTier[];
64
48
  export interface LoyaltyProgram {
65
- credit: LoyaltyCredit | null;
66
49
  description: string;
50
+ loyalty_program_id: number;
67
51
  loyalty_type: LoyaltyType;
68
52
  name: string;
69
- points: LoyaltyPoints | null;
70
- redemption: LoyaltyRedemption | null;
71
- remaining: string | null;
72
- spend: LoyaltySpend;
73
- status: LoyaltyStatus;
74
- thresholds: LoyaltyThresholds;
75
- tiers: LoyaltyTiers;
76
- towards: string | null;
53
+ perk: LoyaltyPerk | null;
54
+ spend_name: string | null;
55
+ status: LoyaltyStatus | null;
77
56
  }
78
57
  export declare type LoyaltyPrograms = LoyaltyProgram[];
@@ -4,7 +4,6 @@ export * from './communicationPreferences';
4
4
  export * from './giftCards';
5
5
  export * from './customer';
6
6
  export * from './loyalty';
7
- export * from './loyaltyV2';
8
7
  export * from './groupOrders';
9
8
  export * from './allergens';
10
9
  export * from './houseAccounts';
@@ -4,7 +4,6 @@ export * from './communicationPreferences';
4
4
  export * from './giftCards';
5
5
  export * from './customer';
6
6
  export * from './loyalty';
7
- export * from './loyaltyV2';
8
7
  export * from './groupOrders';
9
8
  export * from './allergens';
10
9
  export * from './houseAccounts';
@@ -1,36 +1,9 @@
1
- import { Money, OrderType } from '../../global';
2
- export interface LoyaltyCredit {
3
- current: string;
4
- total: string;
5
- }
1
+ import { DiscountType, Money } from '../../global';
6
2
  export declare type LoyaltyType = 'DOLLARS' | 'ORDERS' | 'POINTS';
7
- export interface LoyaltyPoints {
8
- expiration_days: number;
9
- name: string;
10
- points: number;
11
- points_per_dollar: number;
12
- remaining?: number;
13
- balance?: number;
14
- index?: number;
15
- available?: number;
16
- applied?: number;
17
- }
18
- export interface LoyaltyRedemption {
19
- order_type: OrderType;
20
- reward: string;
21
- threshold: string;
22
- type: string;
23
- }
24
- export interface LoyaltySpend {
25
- current: string | null;
26
- order_type: OrderType;
27
- total: string;
28
- type: string;
29
- }
30
3
  export interface LoyaltyThreshold {
4
+ description: string;
31
5
  name: string;
32
6
  points: number;
33
- description: string;
34
7
  }
35
8
  export declare type LoyaltyThresholds = LoyaltyThreshold[];
36
9
  export interface LoyaltyThresholdAugmented extends LoyaltyThreshold {
@@ -38,41 +11,47 @@ export interface LoyaltyThresholdAugmented extends LoyaltyThreshold {
38
11
  isFilled: boolean;
39
12
  }
40
13
  export declare type LoyaltyThresholdsAugmented = LoyaltyThresholdAugmented[];
41
- export interface LoyaltyDiscount {
14
+ export interface LoyaltyReward {
42
15
  amount: string;
16
+ created_at?: string;
43
17
  description: string;
44
18
  discount_id: number;
45
- discount_type: string;
19
+ discount_type: DiscountType;
20
+ expires_at?: string;
46
21
  name: string;
47
22
  title: string;
48
23
  }
24
+ export declare type LoyaltyRewards = LoyaltyReward[];
49
25
  export interface LoyaltyTier {
50
26
  description: string;
51
- discount: LoyaltyDiscount | null;
52
27
  hex_code: string;
53
28
  is_current_tier: boolean;
54
29
  name: string;
55
- threshold: string;
30
+ reward: LoyaltyReward | null;
31
+ threshold: Money;
56
32
  tier_no: number;
57
33
  }
34
+ export declare type LoyaltyTier2 = LoyaltyTier[];
58
35
  export interface LoyaltyStatus {
59
- days: number | null;
60
36
  progress: Money;
61
- tier: LoyaltyTier | null;
37
+ tiers: LoyaltyTier2;
38
+ }
39
+ export declare type LoyaltyPerkType = 'BANKABLE_POINTS' | 'DISCRETE_REWARD' | 'DOLLARS_CREDIT';
40
+ export interface LoyaltyPerk {
41
+ credit: Money | null;
42
+ loyalty_perk: LoyaltyPerkType;
43
+ progress: Money | null;
44
+ rewards?: LoyaltyRewards;
45
+ threshold: Money | null;
46
+ thresholds?: LoyaltyThresholds;
62
47
  }
63
- export declare type LoyaltyTiers = LoyaltyTier[];
64
48
  export interface LoyaltyProgram {
65
- credit: LoyaltyCredit | null;
66
49
  description: string;
50
+ loyalty_program_id: number;
67
51
  loyalty_type: LoyaltyType;
68
52
  name: string;
69
- points: LoyaltyPoints | null;
70
- redemption: LoyaltyRedemption | null;
71
- remaining: string | null;
72
- spend: LoyaltySpend;
73
- status: LoyaltyStatus;
74
- thresholds: LoyaltyThresholds;
75
- tiers: LoyaltyTiers;
76
- towards: string | null;
53
+ perk: LoyaltyPerk | null;
54
+ spend_name: string | null;
55
+ status: LoyaltyStatus | null;
77
56
  }
78
57
  export declare type LoyaltyPrograms = LoyaltyProgram[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/types",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
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",
@@ -1,57 +0,0 @@
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[];
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,57 +0,0 @@
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[];
@@ -1 +0,0 @@
1
- export {};