@open-tender/types 0.4.30 → 0.4.32
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,7 +1,7 @@
|
|
|
1
1
|
import { RequestedAt } from '../datetimes';
|
|
2
2
|
import { CardType, CardTypeName, DeviceType, Money, OrderType, PrepType, ServiceType, TenderStatus, TenderType } from '../global';
|
|
3
3
|
import { CheckoutErrorParams } from '../request';
|
|
4
|
-
import { Cart } from './cart';
|
|
4
|
+
import { Cart, CartItemWithPoints } from './cart';
|
|
5
5
|
import { Address, CustomerIdentify } from './customer';
|
|
6
6
|
import { Order, OrderCustomer, OrderDiscounts, OrderFulfillment, OrderSurcharge } from './order';
|
|
7
7
|
export interface SimpleCartOption {
|
|
@@ -63,7 +63,7 @@ export interface CheckoutConfigCurbside {
|
|
|
63
63
|
export interface CheckoutConfigLoyalty {
|
|
64
64
|
balance: Money;
|
|
65
65
|
name: string;
|
|
66
|
-
per:
|
|
66
|
+
per: number;
|
|
67
67
|
remaining: Money;
|
|
68
68
|
}
|
|
69
69
|
export interface CheckoutConfigSurcharge extends OrderSurcharge {
|
|
@@ -271,3 +271,9 @@ export interface OrderCreate {
|
|
|
271
271
|
export interface OrderCreatePos extends Omit<OrderCreate, 'customer'> {
|
|
272
272
|
customer: CustomerIdentify | null;
|
|
273
273
|
}
|
|
274
|
+
export interface CheckoutPoints {
|
|
275
|
+
points: CheckoutConfigLoyalty;
|
|
276
|
+
applied: OrderCreatePoints;
|
|
277
|
+
apply: (item: CartItemWithPoints) => void;
|
|
278
|
+
remove: (item: CartItemWithPoints) => void;
|
|
279
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { DateString } from '../../datetimes';
|
|
2
2
|
import { Gender, OrderNotifications } from '../../global';
|
|
3
3
|
import { Allergens } from '../allergens';
|
|
4
|
+
import { Discounts } from '../discounts';
|
|
4
5
|
import { Favorites } from '../favorite';
|
|
6
|
+
import { Orders } from '../order';
|
|
5
7
|
import { CustomerNotificationPrefs, NotificationChannel } from './communicationPreferences';
|
|
6
8
|
import { GiftCards } from './giftCards';
|
|
9
|
+
import { LoyaltyPrograms } from './loyalty';
|
|
7
10
|
export interface CustomerCreate {
|
|
8
11
|
birth_date?: DateString | null;
|
|
9
12
|
communications?: NotificationChannel[];
|
|
@@ -37,3 +40,14 @@ export interface Brand {
|
|
|
37
40
|
name: string;
|
|
38
41
|
}
|
|
39
42
|
export declare type Brands = Brand[];
|
|
43
|
+
declare type CustomerEndpoint = 'ACCOUNT' | 'GIFT_CARDS' | 'FAVORITES' | 'LOYALTY' | 'REWARDS' | 'ORDERS';
|
|
44
|
+
export declare type CustomerEndpoints = CustomerEndpoint[];
|
|
45
|
+
export interface CustomerEntities {
|
|
46
|
+
ACCOUNT?: Customer;
|
|
47
|
+
GIFT_CARDS?: GiftCards;
|
|
48
|
+
FAVORITES?: Favorites;
|
|
49
|
+
LOYALTY?: LoyaltyPrograms;
|
|
50
|
+
REWARDS?: Discounts;
|
|
51
|
+
ORDERS?: Orders;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RequestedAt } from '../datetimes';
|
|
2
2
|
import { CardType, CardTypeName, DeviceType, Money, OrderType, PrepType, ServiceType, TenderStatus, TenderType } from '../global';
|
|
3
3
|
import { CheckoutErrorParams } from '../request';
|
|
4
|
-
import { Cart } from './cart';
|
|
4
|
+
import { Cart, CartItemWithPoints } from './cart';
|
|
5
5
|
import { Address, CustomerIdentify } from './customer';
|
|
6
6
|
import { Order, OrderCustomer, OrderDiscounts, OrderFulfillment, OrderSurcharge } from './order';
|
|
7
7
|
export interface SimpleCartOption {
|
|
@@ -63,7 +63,7 @@ export interface CheckoutConfigCurbside {
|
|
|
63
63
|
export interface CheckoutConfigLoyalty {
|
|
64
64
|
balance: Money;
|
|
65
65
|
name: string;
|
|
66
|
-
per:
|
|
66
|
+
per: number;
|
|
67
67
|
remaining: Money;
|
|
68
68
|
}
|
|
69
69
|
export interface CheckoutConfigSurcharge extends OrderSurcharge {
|
|
@@ -271,3 +271,9 @@ export interface OrderCreate {
|
|
|
271
271
|
export interface OrderCreatePos extends Omit<OrderCreate, 'customer'> {
|
|
272
272
|
customer: CustomerIdentify | null;
|
|
273
273
|
}
|
|
274
|
+
export interface CheckoutPoints {
|
|
275
|
+
points: CheckoutConfigLoyalty;
|
|
276
|
+
applied: OrderCreatePoints;
|
|
277
|
+
apply: (item: CartItemWithPoints) => void;
|
|
278
|
+
remove: (item: CartItemWithPoints) => void;
|
|
279
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { DateString } from '../../datetimes';
|
|
2
2
|
import { Gender, OrderNotifications } from '../../global';
|
|
3
3
|
import { Allergens } from '../allergens';
|
|
4
|
+
import { Discounts } from '../discounts';
|
|
4
5
|
import { Favorites } from '../favorite';
|
|
6
|
+
import { Orders } from '../order';
|
|
5
7
|
import { CustomerNotificationPrefs, NotificationChannel } from './communicationPreferences';
|
|
6
8
|
import { GiftCards } from './giftCards';
|
|
9
|
+
import { LoyaltyPrograms } from './loyalty';
|
|
7
10
|
export interface CustomerCreate {
|
|
8
11
|
birth_date?: DateString | null;
|
|
9
12
|
communications?: NotificationChannel[];
|
|
@@ -37,3 +40,14 @@ export interface Brand {
|
|
|
37
40
|
name: string;
|
|
38
41
|
}
|
|
39
42
|
export declare type Brands = Brand[];
|
|
43
|
+
declare type CustomerEndpoint = 'ACCOUNT' | 'GIFT_CARDS' | 'FAVORITES' | 'LOYALTY' | 'REWARDS' | 'ORDERS';
|
|
44
|
+
export declare type CustomerEndpoints = CustomerEndpoint[];
|
|
45
|
+
export interface CustomerEntities {
|
|
46
|
+
ACCOUNT?: Customer;
|
|
47
|
+
GIFT_CARDS?: GiftCards;
|
|
48
|
+
FAVORITES?: Favorites;
|
|
49
|
+
LOYALTY?: LoyaltyPrograms;
|
|
50
|
+
REWARDS?: Discounts;
|
|
51
|
+
ORDERS?: Orders;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
package/package.json
CHANGED