@orderingstack/ordering-types 1.1.8 → 1.1.9

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.
@@ -182,7 +182,7 @@ export interface IMenuItemsUIProps {
182
182
  parentProduct: IProduct;
183
183
  renderMenuItem: (item: IProduct) => ReactElement;
184
184
  }
185
- export interface IMenuComponentProps {
185
+ export interface IMenuComponentProps extends IHandleUpsells {
186
186
  addedLine: IOrderLine | undefined;
187
187
  dismissAddedLine: () => void;
188
188
  addProductToOrder: (product: IProduct) => void;
@@ -200,7 +200,7 @@ export interface IMenuComponentProps {
200
200
  currency?: string;
201
201
  timeZone?: string;
202
202
  }
203
- export interface ICheckoutComponentProps {
203
+ export interface ICheckoutComponentProps extends IHandleUpsells {
204
204
  checkoutStatus?: EPaymentStatus;
205
205
  checkoutError?: IKioskError;
206
206
  initializePayment: (type: EOrderPaymentType) => void;
@@ -210,9 +210,13 @@ export interface ICheckoutComponentProps {
210
210
  changeQuantity: (line: IOrderLine, quantity: number) => void;
211
211
  order?: IOrder;
212
212
  addProduct: (product: IProduct, data: IAddToCartData) => void;
213
- getUpsellProducts: () => Promise<IProduct[]>;
214
- haveUpsellProducts: (kind?: TUpsellKind) => boolean;
215
213
  onCheckoutBegun: () => void;
216
214
  abandonOrder: (statusInfo?: string) => void;
217
215
  currency: string;
218
216
  }
217
+ export interface IHandleUpsells {
218
+ getUpsellProducts: (kind: TUpsellKind) => Promise<IProduct[]>;
219
+ haveUpsellProducts: (kind: TUpsellKind) => boolean;
220
+ clearUpsell: (kind: TUpsellKind) => void;
221
+ clearUpsells: () => void;
222
+ }
@@ -182,7 +182,7 @@ export interface IMenuItemsUIProps {
182
182
  parentProduct: IProduct;
183
183
  renderMenuItem: (item: IProduct) => ReactElement;
184
184
  }
185
- export interface IMenuComponentProps {
185
+ export interface IMenuComponentProps extends IHandleUpsells {
186
186
  addedLine: IOrderLine | undefined;
187
187
  dismissAddedLine: () => void;
188
188
  addProductToOrder: (product: IProduct) => void;
@@ -200,7 +200,7 @@ export interface IMenuComponentProps {
200
200
  currency?: string;
201
201
  timeZone?: string;
202
202
  }
203
- export interface ICheckoutComponentProps {
203
+ export interface ICheckoutComponentProps extends IHandleUpsells {
204
204
  checkoutStatus?: EPaymentStatus;
205
205
  checkoutError?: IKioskError;
206
206
  initializePayment: (type: EOrderPaymentType) => void;
@@ -210,9 +210,13 @@ export interface ICheckoutComponentProps {
210
210
  changeQuantity: (line: IOrderLine, quantity: number) => void;
211
211
  order?: IOrder;
212
212
  addProduct: (product: IProduct, data: IAddToCartData) => void;
213
- getUpsellProducts: () => Promise<IProduct[]>;
214
- haveUpsellProducts: (kind?: TUpsellKind) => boolean;
215
213
  onCheckoutBegun: () => void;
216
214
  abandonOrder: (statusInfo?: string) => void;
217
215
  currency: string;
218
216
  }
217
+ export interface IHandleUpsells {
218
+ getUpsellProducts: (kind: TUpsellKind) => Promise<IProduct[]>;
219
+ haveUpsellProducts: (kind: TUpsellKind) => boolean;
220
+ clearUpsell: (kind: TUpsellKind) => void;
221
+ clearUpsells: () => void;
222
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",