@open-tender/types 0.2.1 → 0.2.3
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.
- package/dist/cjs/types/api/cart.d.ts +31 -5
- package/dist/cjs/types/api/creditCards.d.ts +7 -1
- package/dist/cjs/types/api/customer/account.d.ts +0 -2
- package/dist/cjs/types/api/customer/loyalty.d.ts +10 -3
- package/dist/cjs/types/api/order.d.ts +15 -1
- package/dist/cjs/types/api/revenueCenter.d.ts +1 -1
- package/dist/cjs/types/api/theme.d.ts +8 -0
- package/dist/cjs/types/inputs.d.ts +3 -3
- package/dist/esm/types/api/cart.d.ts +31 -5
- package/dist/esm/types/api/creditCards.d.ts +7 -1
- package/dist/esm/types/api/customer/account.d.ts +0 -2
- package/dist/esm/types/api/customer/loyalty.d.ts +10 -3
- package/dist/esm/types/api/order.d.ts +15 -1
- package/dist/esm/types/api/revenueCenter.d.ts +1 -1
- package/dist/esm/types/api/theme.d.ts +8 -0
- package/dist/esm/types/inputs.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { NutritionalInfo } from './menu';
|
|
2
|
+
import { OrderItemPoints } from './order';
|
|
3
|
+
export interface BaseItemGroup {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
options: BaseItem[];
|
|
7
|
+
}
|
|
8
|
+
export declare type BaseItemGroups = BaseItemGroup[];
|
|
9
|
+
export interface BaseItem {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
quantity: number;
|
|
13
|
+
price: string | number;
|
|
14
|
+
groups: BaseItemGroups;
|
|
15
|
+
}
|
|
16
|
+
export declare type BaseItems = BaseItem[];
|
|
2
17
|
export interface CartItemOption {
|
|
3
18
|
allergens: string[];
|
|
4
19
|
cals: number | null;
|
|
@@ -25,6 +40,7 @@ export interface CartItemOption {
|
|
|
25
40
|
totalPoints: number | null;
|
|
26
41
|
totalPrice: number | null;
|
|
27
42
|
}
|
|
43
|
+
export declare type CartItemOptions = CartItemOption[];
|
|
28
44
|
export interface CartItemOptionWithIndex extends CartItemOption {
|
|
29
45
|
index: number;
|
|
30
46
|
}
|
|
@@ -38,7 +54,10 @@ export interface CartItem extends Omit<CartItemOption, 'isDefault'> {
|
|
|
38
54
|
similarItems: number[];
|
|
39
55
|
upsellItems: number[];
|
|
40
56
|
}
|
|
41
|
-
export
|
|
57
|
+
export interface CartItemWithPoints extends Omit<CartItem, 'points'> {
|
|
58
|
+
points: OrderItemPoints | null;
|
|
59
|
+
}
|
|
60
|
+
export declare type CartWithPoints = CartItemWithPoints[];
|
|
42
61
|
export interface CartItemGroup {
|
|
43
62
|
description: string | null;
|
|
44
63
|
id: number;
|
|
@@ -56,15 +75,22 @@ export declare type CartItemGroups = CartItemGroup[];
|
|
|
56
75
|
export declare type Cart = CartItem[];
|
|
57
76
|
export declare type CartLevels = number[][];
|
|
58
77
|
export declare type CartCounts = Record<string, number>;
|
|
59
|
-
export interface CartErrors extends Record<string, Cart> {
|
|
60
|
-
missingItems: Cart;
|
|
61
|
-
invalidItems: Cart;
|
|
62
|
-
}
|
|
63
78
|
export declare type CartItemOptionLookup = Record<string, CartItemOption>;
|
|
64
79
|
export declare type CartItemGroupLookupOptions = Omit<CartItemGroup, 'options'> & {
|
|
65
80
|
options: CartItemOptionLookup;
|
|
66
81
|
};
|
|
67
82
|
export declare type CartItemGroupLookup = Record<string, CartItemGroupLookupOptions>;
|
|
83
|
+
export interface CartItemWithErrors extends CartItem {
|
|
84
|
+
missingGroups: CartItemGroupLookupOptions[];
|
|
85
|
+
invalidGroups: CartItemGroups;
|
|
86
|
+
missingOptions: CartItemOptions;
|
|
87
|
+
invalidOptions: CartItemOptions;
|
|
88
|
+
}
|
|
89
|
+
export declare type CartWithErrors = CartItemWithErrors[];
|
|
90
|
+
export interface CartErrors {
|
|
91
|
+
missingItems: Cart;
|
|
92
|
+
invalidItems: CartWithErrors;
|
|
93
|
+
}
|
|
68
94
|
export interface PosCartItem extends CartItem {
|
|
69
95
|
item_no: number;
|
|
70
96
|
line_no: number;
|
|
@@ -21,8 +21,14 @@ export interface CreditCardData {
|
|
|
21
21
|
is_default?: boolean;
|
|
22
22
|
token?: string;
|
|
23
23
|
}
|
|
24
|
+
export interface CreditCardErrors {
|
|
25
|
+
acct?: string;
|
|
26
|
+
exp?: string;
|
|
27
|
+
cvv?: string;
|
|
28
|
+
zip?: string;
|
|
29
|
+
}
|
|
24
30
|
export interface CreditCardValidate {
|
|
25
31
|
card: CreditCardData;
|
|
26
32
|
cardType: CardType;
|
|
27
|
-
errors:
|
|
33
|
+
errors: CreditCardErrors | null;
|
|
28
34
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CustomerLoyalty } from './loyalty';
|
|
2
1
|
export interface Auth {
|
|
3
2
|
access_token: string;
|
|
4
3
|
expires_in: number;
|
|
@@ -16,7 +15,6 @@ export interface Profile {
|
|
|
16
15
|
is_verified: boolean;
|
|
17
16
|
last_name: string;
|
|
18
17
|
phone: string;
|
|
19
|
-
program: CustomerLoyalty;
|
|
20
18
|
}
|
|
21
19
|
export interface LoginData {
|
|
22
20
|
email: string;
|
|
@@ -37,6 +37,12 @@ export interface LoyaltyThreshold {
|
|
|
37
37
|
points: number;
|
|
38
38
|
description: string;
|
|
39
39
|
}
|
|
40
|
+
export declare type LoyaltyThresholds = LoyaltyThreshold[];
|
|
41
|
+
export interface LoyaltyThresholdAugmented extends LoyaltyThreshold {
|
|
42
|
+
percentage: number;
|
|
43
|
+
isFilled: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare type LoyaltyThresholdsAugmented = LoyaltyThresholdAugmented[];
|
|
40
46
|
export interface LoyaltyDiscount {
|
|
41
47
|
amount: string;
|
|
42
48
|
description: string;
|
|
@@ -54,6 +60,7 @@ export interface LoyaltyTier {
|
|
|
54
60
|
points: any;
|
|
55
61
|
value: any;
|
|
56
62
|
}
|
|
63
|
+
export declare type LoyaltyTiers = LoyaltyTier[];
|
|
57
64
|
export interface CustomerLoyalty {
|
|
58
65
|
credit: LoyaltyCredit | null;
|
|
59
66
|
description: string;
|
|
@@ -64,8 +71,8 @@ export interface CustomerLoyalty {
|
|
|
64
71
|
remaining: string | null;
|
|
65
72
|
spend: LoyaltySpend;
|
|
66
73
|
status: LoyaltyStatus;
|
|
67
|
-
thresholds:
|
|
68
|
-
tiers:
|
|
74
|
+
thresholds: LoyaltyThresholds;
|
|
75
|
+
tiers: LoyaltyTiers;
|
|
69
76
|
towards: string | null;
|
|
70
77
|
}
|
|
71
|
-
export declare type CustomerLoyalties =
|
|
78
|
+
export declare type CustomerLoyalties = CustomerLoyalty[];
|
|
@@ -4,6 +4,13 @@ import { CreditCard } from './creditCards';
|
|
|
4
4
|
import { Address } from './customer';
|
|
5
5
|
import { PrepStatus } from './kds';
|
|
6
6
|
import { NutritionalInfo } from './menu';
|
|
7
|
+
export interface OrderItemPoints {
|
|
8
|
+
applied: number;
|
|
9
|
+
available: number;
|
|
10
|
+
index?: number;
|
|
11
|
+
per: number;
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
7
14
|
export interface OrderItem {
|
|
8
15
|
allergens: string[];
|
|
9
16
|
description: string | null;
|
|
@@ -15,7 +22,7 @@ export interface OrderItem {
|
|
|
15
22
|
name: string;
|
|
16
23
|
notes?: string | null;
|
|
17
24
|
nutritional_info: NutritionalInfo | null;
|
|
18
|
-
points?:
|
|
25
|
+
points?: OrderItemPoints | null;
|
|
19
26
|
price: Money;
|
|
20
27
|
price_total: Money;
|
|
21
28
|
quantity: number;
|
|
@@ -138,6 +145,13 @@ export interface OrderRating {
|
|
|
138
145
|
comments: string | null;
|
|
139
146
|
rating: number;
|
|
140
147
|
}
|
|
148
|
+
export interface OrderRating {
|
|
149
|
+
comments: string | null;
|
|
150
|
+
rating: number;
|
|
151
|
+
}
|
|
152
|
+
export interface OrderRatingWithOrder extends OrderRating {
|
|
153
|
+
order_id: number;
|
|
154
|
+
}
|
|
141
155
|
export interface OrderRevenueCenterAddress {
|
|
142
156
|
city: string;
|
|
143
157
|
lat: number;
|
|
@@ -7,7 +7,7 @@ export interface RevenueCenterParams {
|
|
|
7
7
|
lng?: number;
|
|
8
8
|
requestedAt?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare type RevenueCenterType = '
|
|
10
|
+
export declare type RevenueCenterType = 'OLO' | 'CATERING';
|
|
11
11
|
export interface RevenueCenterAddress {
|
|
12
12
|
city: string;
|
|
13
13
|
cross_streets: string;
|
|
@@ -492,3 +492,11 @@ export interface Theme {
|
|
|
492
492
|
toast: ThemeAlert;
|
|
493
493
|
welcome: ThemeWelcome;
|
|
494
494
|
}
|
|
495
|
+
export interface ThemeWelcomeStylesApp extends Omit<ThemeWelcomeStyles, 'titleLineHeight' | 'subtitleLineHeight'> {
|
|
496
|
+
titleLineHeight: string;
|
|
497
|
+
subtitleLineHeight: string;
|
|
498
|
+
}
|
|
499
|
+
export interface AppTheme extends Omit<Theme, 'welcome' | 'item'> {
|
|
500
|
+
welcome: ThemeWelcomeStylesApp;
|
|
501
|
+
item: ThemeItemStyles;
|
|
502
|
+
}
|
|
@@ -15,7 +15,7 @@ export interface Input {
|
|
|
15
15
|
autoComplete?: string;
|
|
16
16
|
children?: JSX.Element;
|
|
17
17
|
disabled?: boolean;
|
|
18
|
-
error?: string;
|
|
18
|
+
error?: string | null;
|
|
19
19
|
icon?: JSX.Element;
|
|
20
20
|
label?: string;
|
|
21
21
|
max?: number;
|
|
@@ -34,7 +34,7 @@ export interface Input {
|
|
|
34
34
|
}
|
|
35
35
|
export interface Select {
|
|
36
36
|
disabled?: boolean;
|
|
37
|
-
error
|
|
37
|
+
error?: string | null;
|
|
38
38
|
label: string;
|
|
39
39
|
name: string;
|
|
40
40
|
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
@@ -59,7 +59,7 @@ export interface Switch {
|
|
|
59
59
|
}
|
|
60
60
|
export interface Textarea {
|
|
61
61
|
disabled?: boolean;
|
|
62
|
-
error?: string;
|
|
62
|
+
error?: string | null;
|
|
63
63
|
icon?: JSX.Element;
|
|
64
64
|
label: string;
|
|
65
65
|
name: string;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { NutritionalInfo } from './menu';
|
|
2
|
+
import { OrderItemPoints } from './order';
|
|
3
|
+
export interface BaseItemGroup {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
options: BaseItem[];
|
|
7
|
+
}
|
|
8
|
+
export declare type BaseItemGroups = BaseItemGroup[];
|
|
9
|
+
export interface BaseItem {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
quantity: number;
|
|
13
|
+
price: string | number;
|
|
14
|
+
groups: BaseItemGroups;
|
|
15
|
+
}
|
|
16
|
+
export declare type BaseItems = BaseItem[];
|
|
2
17
|
export interface CartItemOption {
|
|
3
18
|
allergens: string[];
|
|
4
19
|
cals: number | null;
|
|
@@ -25,6 +40,7 @@ export interface CartItemOption {
|
|
|
25
40
|
totalPoints: number | null;
|
|
26
41
|
totalPrice: number | null;
|
|
27
42
|
}
|
|
43
|
+
export declare type CartItemOptions = CartItemOption[];
|
|
28
44
|
export interface CartItemOptionWithIndex extends CartItemOption {
|
|
29
45
|
index: number;
|
|
30
46
|
}
|
|
@@ -38,7 +54,10 @@ export interface CartItem extends Omit<CartItemOption, 'isDefault'> {
|
|
|
38
54
|
similarItems: number[];
|
|
39
55
|
upsellItems: number[];
|
|
40
56
|
}
|
|
41
|
-
export
|
|
57
|
+
export interface CartItemWithPoints extends Omit<CartItem, 'points'> {
|
|
58
|
+
points: OrderItemPoints | null;
|
|
59
|
+
}
|
|
60
|
+
export declare type CartWithPoints = CartItemWithPoints[];
|
|
42
61
|
export interface CartItemGroup {
|
|
43
62
|
description: string | null;
|
|
44
63
|
id: number;
|
|
@@ -56,15 +75,22 @@ export declare type CartItemGroups = CartItemGroup[];
|
|
|
56
75
|
export declare type Cart = CartItem[];
|
|
57
76
|
export declare type CartLevels = number[][];
|
|
58
77
|
export declare type CartCounts = Record<string, number>;
|
|
59
|
-
export interface CartErrors extends Record<string, Cart> {
|
|
60
|
-
missingItems: Cart;
|
|
61
|
-
invalidItems: Cart;
|
|
62
|
-
}
|
|
63
78
|
export declare type CartItemOptionLookup = Record<string, CartItemOption>;
|
|
64
79
|
export declare type CartItemGroupLookupOptions = Omit<CartItemGroup, 'options'> & {
|
|
65
80
|
options: CartItemOptionLookup;
|
|
66
81
|
};
|
|
67
82
|
export declare type CartItemGroupLookup = Record<string, CartItemGroupLookupOptions>;
|
|
83
|
+
export interface CartItemWithErrors extends CartItem {
|
|
84
|
+
missingGroups: CartItemGroupLookupOptions[];
|
|
85
|
+
invalidGroups: CartItemGroups;
|
|
86
|
+
missingOptions: CartItemOptions;
|
|
87
|
+
invalidOptions: CartItemOptions;
|
|
88
|
+
}
|
|
89
|
+
export declare type CartWithErrors = CartItemWithErrors[];
|
|
90
|
+
export interface CartErrors {
|
|
91
|
+
missingItems: Cart;
|
|
92
|
+
invalidItems: CartWithErrors;
|
|
93
|
+
}
|
|
68
94
|
export interface PosCartItem extends CartItem {
|
|
69
95
|
item_no: number;
|
|
70
96
|
line_no: number;
|
|
@@ -21,8 +21,14 @@ export interface CreditCardData {
|
|
|
21
21
|
is_default?: boolean;
|
|
22
22
|
token?: string;
|
|
23
23
|
}
|
|
24
|
+
export interface CreditCardErrors {
|
|
25
|
+
acct?: string;
|
|
26
|
+
exp?: string;
|
|
27
|
+
cvv?: string;
|
|
28
|
+
zip?: string;
|
|
29
|
+
}
|
|
24
30
|
export interface CreditCardValidate {
|
|
25
31
|
card: CreditCardData;
|
|
26
32
|
cardType: CardType;
|
|
27
|
-
errors:
|
|
33
|
+
errors: CreditCardErrors | null;
|
|
28
34
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CustomerLoyalty } from './loyalty';
|
|
2
1
|
export interface Auth {
|
|
3
2
|
access_token: string;
|
|
4
3
|
expires_in: number;
|
|
@@ -16,7 +15,6 @@ export interface Profile {
|
|
|
16
15
|
is_verified: boolean;
|
|
17
16
|
last_name: string;
|
|
18
17
|
phone: string;
|
|
19
|
-
program: CustomerLoyalty;
|
|
20
18
|
}
|
|
21
19
|
export interface LoginData {
|
|
22
20
|
email: string;
|
|
@@ -37,6 +37,12 @@ export interface LoyaltyThreshold {
|
|
|
37
37
|
points: number;
|
|
38
38
|
description: string;
|
|
39
39
|
}
|
|
40
|
+
export declare type LoyaltyThresholds = LoyaltyThreshold[];
|
|
41
|
+
export interface LoyaltyThresholdAugmented extends LoyaltyThreshold {
|
|
42
|
+
percentage: number;
|
|
43
|
+
isFilled: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare type LoyaltyThresholdsAugmented = LoyaltyThresholdAugmented[];
|
|
40
46
|
export interface LoyaltyDiscount {
|
|
41
47
|
amount: string;
|
|
42
48
|
description: string;
|
|
@@ -54,6 +60,7 @@ export interface LoyaltyTier {
|
|
|
54
60
|
points: any;
|
|
55
61
|
value: any;
|
|
56
62
|
}
|
|
63
|
+
export declare type LoyaltyTiers = LoyaltyTier[];
|
|
57
64
|
export interface CustomerLoyalty {
|
|
58
65
|
credit: LoyaltyCredit | null;
|
|
59
66
|
description: string;
|
|
@@ -64,8 +71,8 @@ export interface CustomerLoyalty {
|
|
|
64
71
|
remaining: string | null;
|
|
65
72
|
spend: LoyaltySpend;
|
|
66
73
|
status: LoyaltyStatus;
|
|
67
|
-
thresholds:
|
|
68
|
-
tiers:
|
|
74
|
+
thresholds: LoyaltyThresholds;
|
|
75
|
+
tiers: LoyaltyTiers;
|
|
69
76
|
towards: string | null;
|
|
70
77
|
}
|
|
71
|
-
export declare type CustomerLoyalties =
|
|
78
|
+
export declare type CustomerLoyalties = CustomerLoyalty[];
|
|
@@ -4,6 +4,13 @@ import { CreditCard } from './creditCards';
|
|
|
4
4
|
import { Address } from './customer';
|
|
5
5
|
import { PrepStatus } from './kds';
|
|
6
6
|
import { NutritionalInfo } from './menu';
|
|
7
|
+
export interface OrderItemPoints {
|
|
8
|
+
applied: number;
|
|
9
|
+
available: number;
|
|
10
|
+
index?: number;
|
|
11
|
+
per: number;
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
7
14
|
export interface OrderItem {
|
|
8
15
|
allergens: string[];
|
|
9
16
|
description: string | null;
|
|
@@ -15,7 +22,7 @@ export interface OrderItem {
|
|
|
15
22
|
name: string;
|
|
16
23
|
notes?: string | null;
|
|
17
24
|
nutritional_info: NutritionalInfo | null;
|
|
18
|
-
points?:
|
|
25
|
+
points?: OrderItemPoints | null;
|
|
19
26
|
price: Money;
|
|
20
27
|
price_total: Money;
|
|
21
28
|
quantity: number;
|
|
@@ -138,6 +145,13 @@ export interface OrderRating {
|
|
|
138
145
|
comments: string | null;
|
|
139
146
|
rating: number;
|
|
140
147
|
}
|
|
148
|
+
export interface OrderRating {
|
|
149
|
+
comments: string | null;
|
|
150
|
+
rating: number;
|
|
151
|
+
}
|
|
152
|
+
export interface OrderRatingWithOrder extends OrderRating {
|
|
153
|
+
order_id: number;
|
|
154
|
+
}
|
|
141
155
|
export interface OrderRevenueCenterAddress {
|
|
142
156
|
city: string;
|
|
143
157
|
lat: number;
|
|
@@ -7,7 +7,7 @@ export interface RevenueCenterParams {
|
|
|
7
7
|
lng?: number;
|
|
8
8
|
requestedAt?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare type RevenueCenterType = '
|
|
10
|
+
export declare type RevenueCenterType = 'OLO' | 'CATERING';
|
|
11
11
|
export interface RevenueCenterAddress {
|
|
12
12
|
city: string;
|
|
13
13
|
cross_streets: string;
|
|
@@ -492,3 +492,11 @@ export interface Theme {
|
|
|
492
492
|
toast: ThemeAlert;
|
|
493
493
|
welcome: ThemeWelcome;
|
|
494
494
|
}
|
|
495
|
+
export interface ThemeWelcomeStylesApp extends Omit<ThemeWelcomeStyles, 'titleLineHeight' | 'subtitleLineHeight'> {
|
|
496
|
+
titleLineHeight: string;
|
|
497
|
+
subtitleLineHeight: string;
|
|
498
|
+
}
|
|
499
|
+
export interface AppTheme extends Omit<Theme, 'welcome' | 'item'> {
|
|
500
|
+
welcome: ThemeWelcomeStylesApp;
|
|
501
|
+
item: ThemeItemStyles;
|
|
502
|
+
}
|
|
@@ -15,7 +15,7 @@ export interface Input {
|
|
|
15
15
|
autoComplete?: string;
|
|
16
16
|
children?: JSX.Element;
|
|
17
17
|
disabled?: boolean;
|
|
18
|
-
error?: string;
|
|
18
|
+
error?: string | null;
|
|
19
19
|
icon?: JSX.Element;
|
|
20
20
|
label?: string;
|
|
21
21
|
max?: number;
|
|
@@ -34,7 +34,7 @@ export interface Input {
|
|
|
34
34
|
}
|
|
35
35
|
export interface Select {
|
|
36
36
|
disabled?: boolean;
|
|
37
|
-
error
|
|
37
|
+
error?: string | null;
|
|
38
38
|
label: string;
|
|
39
39
|
name: string;
|
|
40
40
|
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
@@ -59,7 +59,7 @@ export interface Switch {
|
|
|
59
59
|
}
|
|
60
60
|
export interface Textarea {
|
|
61
61
|
disabled?: boolean;
|
|
62
|
-
error?: string;
|
|
62
|
+
error?: string | null;
|
|
63
63
|
icon?: JSX.Element;
|
|
64
64
|
label: string;
|
|
65
65
|
name: string;
|
package/package.json
CHANGED