@orderingstack/ordering-types 1.1.7 → 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.
- package/dist/cjs/index.d.ts +20 -0
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/kiosk.d.ts +10 -6
- package/dist/esm/index.d.ts +20 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/kiosk.d.ts +10 -6
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -488,3 +488,23 @@ export interface IFiscalizeData {
|
|
|
488
488
|
}
|
|
489
489
|
declare const sizes: readonly [48, 57, 70, 100, 160, 250, 300, 500, 600, 900, 1000, 1920, 1080, 900];
|
|
490
490
|
export type TMediaSize = typeof sizes[number];
|
|
491
|
+
export declare enum ENotificationType {
|
|
492
|
+
ORDER_EVENT_ERROR = "OrderEventError",
|
|
493
|
+
ORDER_APPLIED_EVENTS = "OrderAppliedEvents",
|
|
494
|
+
ORDER_EVENT_FISCAL = "OrderEventFiscal",
|
|
495
|
+
ORDER_UPSELL = "OrderUpsell"
|
|
496
|
+
}
|
|
497
|
+
export type TUpsellKind = 'ANY' | 'POPUP' | 'SIDE' | 'BASKET';
|
|
498
|
+
export interface IUpsellNotification {
|
|
499
|
+
details: {
|
|
500
|
+
literals?: Record<string, string>;
|
|
501
|
+
media?: {
|
|
502
|
+
url?: string;
|
|
503
|
+
name: string;
|
|
504
|
+
}[];
|
|
505
|
+
};
|
|
506
|
+
orderId: string;
|
|
507
|
+
items: string[];
|
|
508
|
+
showAs: TUpsellKind;
|
|
509
|
+
type: ENotificationType.ORDER_UPSELL;
|
|
510
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.EChannelName = exports.EOrderProductKind = exports.EOrderLineStatus = exports.EOrderSource = exports.EOrderPaymentType = exports.EOrderStatus = exports.EOrderType = exports.EProductKindBucket = exports.EProductKind = exports.ECouponViewType = void 0;
|
|
17
|
+
exports.ENotificationType = exports.EChannelName = exports.EOrderProductKind = exports.EOrderLineStatus = exports.EOrderSource = exports.EOrderPaymentType = exports.EOrderStatus = exports.EOrderType = exports.EProductKindBucket = exports.EProductKind = exports.ECouponViewType = void 0;
|
|
18
18
|
__exportStar(require("./kiosk"), exports);
|
|
19
19
|
__exportStar(require("./kioskErrors"), exports);
|
|
20
20
|
var ECouponViewType;
|
|
@@ -130,3 +130,10 @@ var EChannelName;
|
|
|
130
130
|
const sizes = [
|
|
131
131
|
48, 57, 70, 100, 160, 250, 300, 500, 600, 900, 1000, 1920, 1080, 900,
|
|
132
132
|
];
|
|
133
|
+
var ENotificationType;
|
|
134
|
+
(function (ENotificationType) {
|
|
135
|
+
ENotificationType["ORDER_EVENT_ERROR"] = "OrderEventError";
|
|
136
|
+
ENotificationType["ORDER_APPLIED_EVENTS"] = "OrderAppliedEvents";
|
|
137
|
+
ENotificationType["ORDER_EVENT_FISCAL"] = "OrderEventFiscal";
|
|
138
|
+
ENotificationType["ORDER_UPSELL"] = "OrderUpsell";
|
|
139
|
+
})(ENotificationType = exports.ENotificationType || (exports.ENotificationType = {}));
|
package/dist/cjs/kiosk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactElement } from "react";
|
|
2
2
|
import { UseFormRegisterReturn } from "react-hook-form";
|
|
3
3
|
import { UseTransitionProps } from "react-spring";
|
|
4
|
-
import { IProduct, IOrder, IProductStateSelected, IProductStateFilter, EOrderPaymentType, IKioskError } from "./index";
|
|
4
|
+
import { IProduct, IOrder, IProductStateSelected, IProductStateFilter, EOrderPaymentType, IKioskError, TUpsellKind } from "./index";
|
|
5
5
|
import { IOrderLine } from "./index";
|
|
6
6
|
export declare enum EPaymentStatus {
|
|
7
7
|
UNINITIALIZED = "UNINITIALIZED",
|
|
@@ -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;
|
|
@@ -191,7 +191,7 @@ export interface IMenuComponentProps {
|
|
|
191
191
|
menu: IProduct[];
|
|
192
192
|
onMenuCategoryViewed?: (category: IProduct) => void;
|
|
193
193
|
goToCheckout: (state?: any) => void;
|
|
194
|
-
goToStart: (state?: any) => void;
|
|
194
|
+
goToStart: (state?: any, statusInfo?: string, inactivity?: boolean) => void;
|
|
195
195
|
order?: IOrder;
|
|
196
196
|
changeQuantity: (line: IOrderLine, quantity: number) => void;
|
|
197
197
|
components: IMenuComponents & {
|
|
@@ -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?: 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/dist/esm/index.d.ts
CHANGED
|
@@ -488,3 +488,23 @@ export interface IFiscalizeData {
|
|
|
488
488
|
}
|
|
489
489
|
declare const sizes: readonly [48, 57, 70, 100, 160, 250, 300, 500, 600, 900, 1000, 1920, 1080, 900];
|
|
490
490
|
export type TMediaSize = typeof sizes[number];
|
|
491
|
+
export declare enum ENotificationType {
|
|
492
|
+
ORDER_EVENT_ERROR = "OrderEventError",
|
|
493
|
+
ORDER_APPLIED_EVENTS = "OrderAppliedEvents",
|
|
494
|
+
ORDER_EVENT_FISCAL = "OrderEventFiscal",
|
|
495
|
+
ORDER_UPSELL = "OrderUpsell"
|
|
496
|
+
}
|
|
497
|
+
export type TUpsellKind = 'ANY' | 'POPUP' | 'SIDE' | 'BASKET';
|
|
498
|
+
export interface IUpsellNotification {
|
|
499
|
+
details: {
|
|
500
|
+
literals?: Record<string, string>;
|
|
501
|
+
media?: {
|
|
502
|
+
url?: string;
|
|
503
|
+
name: string;
|
|
504
|
+
}[];
|
|
505
|
+
};
|
|
506
|
+
orderId: string;
|
|
507
|
+
items: string[];
|
|
508
|
+
showAs: TUpsellKind;
|
|
509
|
+
type: ENotificationType.ORDER_UPSELL;
|
|
510
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -113,3 +113,10 @@ export var EChannelName;
|
|
|
113
113
|
const sizes = [
|
|
114
114
|
48, 57, 70, 100, 160, 250, 300, 500, 600, 900, 1000, 1920, 1080, 900,
|
|
115
115
|
];
|
|
116
|
+
export var ENotificationType;
|
|
117
|
+
(function (ENotificationType) {
|
|
118
|
+
ENotificationType["ORDER_EVENT_ERROR"] = "OrderEventError";
|
|
119
|
+
ENotificationType["ORDER_APPLIED_EVENTS"] = "OrderAppliedEvents";
|
|
120
|
+
ENotificationType["ORDER_EVENT_FISCAL"] = "OrderEventFiscal";
|
|
121
|
+
ENotificationType["ORDER_UPSELL"] = "OrderUpsell";
|
|
122
|
+
})(ENotificationType || (ENotificationType = {}));
|
package/dist/esm/kiosk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactElement } from "react";
|
|
2
2
|
import { UseFormRegisterReturn } from "react-hook-form";
|
|
3
3
|
import { UseTransitionProps } from "react-spring";
|
|
4
|
-
import { IProduct, IOrder, IProductStateSelected, IProductStateFilter, EOrderPaymentType, IKioskError } from "./index";
|
|
4
|
+
import { IProduct, IOrder, IProductStateSelected, IProductStateFilter, EOrderPaymentType, IKioskError, TUpsellKind } from "./index";
|
|
5
5
|
import { IOrderLine } from "./index";
|
|
6
6
|
export declare enum EPaymentStatus {
|
|
7
7
|
UNINITIALIZED = "UNINITIALIZED",
|
|
@@ -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;
|
|
@@ -191,7 +191,7 @@ export interface IMenuComponentProps {
|
|
|
191
191
|
menu: IProduct[];
|
|
192
192
|
onMenuCategoryViewed?: (category: IProduct) => void;
|
|
193
193
|
goToCheckout: (state?: any) => void;
|
|
194
|
-
goToStart: (state?: any) => void;
|
|
194
|
+
goToStart: (state?: any, statusInfo?: string, inactivity?: boolean) => void;
|
|
195
195
|
order?: IOrder;
|
|
196
196
|
changeQuantity: (line: IOrderLine, quantity: number) => void;
|
|
197
197
|
components: IMenuComponents & {
|
|
@@ -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?: 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
|
+
}
|