@pisell/pisellos 2.2.147 → 2.2.149
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/apis/picoding.d.ts +0 -0
- package/dist/apis/picoding.js +1 -0
- package/dist/model/strategy/adapter/index.d.ts +2 -0
- package/dist/model/strategy/adapter/index.js +3 -1
- package/dist/model/strategy/adapter/itemRule/adapter.d.ts +67 -0
- package/dist/model/strategy/adapter/itemRule/adapter.js +483 -0
- package/dist/model/strategy/adapter/itemRule/evaluator.d.ts +43 -0
- package/dist/model/strategy/adapter/itemRule/evaluator.js +169 -0
- package/dist/model/strategy/adapter/itemRule/examples.d.ts +79 -0
- package/dist/model/strategy/adapter/itemRule/examples.js +382 -0
- package/dist/model/strategy/adapter/itemRule/index.d.ts +5 -0
- package/dist/model/strategy/adapter/itemRule/index.js +5 -0
- package/dist/model/strategy/adapter/itemRule/type.d.ts +225 -0
- package/dist/model/strategy/adapter/itemRule/type.js +101 -0
- package/dist/modules/Cart/types.d.ts +2 -0
- package/dist/modules/Cart/utils/cartProduct.js +22 -1
- package/dist/modules/Cart/utils/changePrice.js +6 -0
- package/dist/modules/Date/index.d.ts +1 -1
- package/dist/modules/Date/index.js +16 -8
- package/dist/modules/Date/types.d.ts +3 -1
- package/dist/modules/OpenData/index.d.ts +24 -0
- package/dist/modules/OpenData/index.js +173 -0
- package/dist/modules/OpenData/types.d.ts +73 -0
- package/dist/modules/OpenData/types.js +1 -0
- package/dist/modules/OpenData/utils.d.ts +2 -0
- package/dist/modules/OpenData/utils.js +75 -0
- package/dist/modules/Order/index.d.ts +171 -1
- package/dist/modules/Order/index.js +2052 -112
- package/dist/modules/Order/types.d.ts +441 -20
- package/dist/modules/Order/types.js +23 -0
- package/dist/modules/Order/utils.d.ts +120 -0
- package/dist/modules/Order/utils.js +653 -2
- package/dist/modules/Product/utils.js +2 -2
- package/dist/modules/ProductList/index.js +2 -1
- package/dist/modules/Quotation/index.d.ts +8 -1
- package/dist/modules/Quotation/index.js +40 -10
- package/dist/modules/Quotation/types.d.ts +5 -0
- package/dist/modules/Rules/index.d.ts +3 -1
- package/dist/modules/Rules/index.js +136 -50
- package/dist/modules/Rules/types.d.ts +6 -0
- package/dist/modules/Rules/types.js +8 -0
- package/dist/modules/SalesSummary/index.d.ts +70 -0
- package/dist/modules/SalesSummary/index.js +175 -0
- package/dist/modules/SalesSummary/types.d.ts +64 -0
- package/dist/modules/SalesSummary/types.js +1 -0
- package/dist/modules/SalesSummary/utils.d.ts +34 -0
- package/dist/modules/SalesSummary/utils.js +488 -0
- package/dist/modules/ScanOrderLogger/index.d.ts +21 -0
- package/dist/modules/ScanOrderLogger/index.js +161 -0
- package/dist/modules/ScanOrderLogger/providers/feishu.d.ts +2 -0
- package/dist/modules/ScanOrderLogger/providers/feishu.js +203 -0
- package/dist/modules/ScanOrderLogger/providers/grafana.d.ts +2 -0
- package/dist/modules/ScanOrderLogger/providers/grafana.js +50 -0
- package/dist/modules/ScanOrderLogger/types.d.ts +52 -0
- package/dist/modules/ScanOrderLogger/types.js +1 -0
- package/dist/modules/Schedule/getDateIsInSchedule.js +7 -7
- package/dist/modules/Schedule/index.d.ts +4 -13
- package/dist/modules/Schedule/index.js +6 -23
- package/dist/modules/Schedule/utils.d.ts +1 -1
- package/dist/modules/Summary/index.d.ts +3 -0
- package/dist/modules/Summary/index.js +134 -15
- package/dist/modules/Summary/types.d.ts +7 -0
- package/dist/modules/Summary/utils.d.ts +104 -1
- package/dist/modules/Summary/utils.js +1116 -13
- package/dist/modules/index.d.ts +4 -0
- package/dist/modules/index.js +5 -1
- package/dist/server/index.d.ts +41 -4
- package/dist/server/index.js +900 -405
- package/dist/server/modules/order/index.d.ts +10 -2
- package/dist/server/modules/order/index.js +251 -196
- package/dist/server/modules/products/index.d.ts +26 -0
- package/dist/server/modules/products/index.js +618 -338
- package/dist/server/modules/products/types.d.ts +5 -1
- package/dist/solution/BaseSales/index.d.ts +175 -0
- package/dist/solution/BaseSales/index.js +1293 -0
- package/dist/solution/BaseSales/types.d.ts +305 -0
- package/dist/solution/BaseSales/types.js +38 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +143 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.js +159 -0
- package/dist/solution/BaseSales/utils.d.ts +40 -0
- package/dist/solution/BaseSales/utils.js +222 -0
- package/dist/solution/BookingByStep/index.d.ts +14 -0
- package/dist/solution/BookingByStep/index.js +699 -212
- package/dist/solution/BookingByStep/types.d.ts +3 -1
- package/dist/solution/BookingByStep/types.js +5 -1
- package/dist/solution/BookingByStep/utils/capacity.js +1 -1
- package/dist/solution/BookingByStep/utils/resources.js +6 -1
- package/dist/solution/BookingTicket/index.d.ts +113 -15
- package/dist/solution/BookingTicket/index.js +534 -196
- package/dist/solution/BookingTicket/types.d.ts +69 -6
- package/dist/solution/BookingTicket/types.js +40 -9
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +37 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.js +66 -0
- package/dist/solution/BookingTicket/utils/cartView.d.ts +26 -0
- package/dist/solution/BookingTicket/utils/cartView.js +84 -0
- package/dist/solution/Sales/index.d.ts +1 -0
- package/dist/solution/Sales/index.js +1 -0
- package/dist/solution/ScanOrder/index.d.ts +146 -0
- package/dist/solution/ScanOrder/index.js +3029 -0
- package/dist/solution/ScanOrder/types.d.ts +305 -0
- package/dist/solution/ScanOrder/types.js +35 -0
- package/dist/solution/ScanOrder/utils.d.ts +167 -0
- package/dist/solution/ScanOrder/utils.js +768 -0
- package/dist/solution/ShopDiscount/index.d.ts +2 -0
- package/dist/solution/ShopDiscount/index.js +9 -5
- package/dist/solution/ShopDiscount/types.d.ts +4 -0
- package/dist/solution/VenueBooking/index.d.ts +197 -0
- package/dist/solution/VenueBooking/index.js +3411 -0
- package/dist/solution/VenueBooking/sales-section-4-annotated.json +343 -0
- package/dist/solution/VenueBooking/types.d.ts +153 -0
- package/dist/solution/VenueBooking/types.js +21 -0
- package/dist/solution/VenueBooking/utils/dateSummary.d.ts +11 -0
- package/dist/solution/VenueBooking/utils/dateSummary.js +104 -0
- package/dist/solution/VenueBooking/utils/resource.d.ts +14 -0
- package/dist/solution/VenueBooking/utils/resource.js +130 -0
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +34 -0
- package/dist/solution/VenueBooking/utils/slotMerge.js +224 -0
- package/dist/solution/VenueBooking/utils/timeSlot.d.ts +32 -0
- package/dist/solution/VenueBooking/utils/timeSlot.js +453 -0
- package/dist/solution/VenueBooking/utils.d.ts +1 -0
- package/dist/solution/VenueBooking/utils.js +1 -0
- package/dist/solution/index.d.ts +3 -0
- package/dist/solution/index.js +4 -1
- package/lib/apis/picoding.d.ts +0 -0
- package/lib/apis/picoding.js +0 -0
- package/lib/model/strategy/adapter/index.d.ts +2 -0
- package/lib/model/strategy/adapter/index.js +6 -0
- package/lib/model/strategy/adapter/itemRule/adapter.d.ts +67 -0
- package/lib/model/strategy/adapter/itemRule/adapter.js +377 -0
- package/lib/model/strategy/adapter/itemRule/evaluator.d.ts +43 -0
- package/lib/model/strategy/adapter/itemRule/evaluator.js +124 -0
- package/lib/model/strategy/adapter/itemRule/examples.d.ts +79 -0
- package/lib/model/strategy/adapter/itemRule/examples.js +316 -0
- package/lib/model/strategy/adapter/itemRule/index.d.ts +5 -0
- package/lib/model/strategy/adapter/itemRule/index.js +60 -0
- package/lib/model/strategy/adapter/itemRule/type.d.ts +225 -0
- package/lib/model/strategy/adapter/itemRule/type.js +46 -0
- package/lib/model/strategy/adapter/promotion/index.js +49 -0
- package/lib/modules/Cart/types.d.ts +2 -0
- package/lib/modules/Cart/utils/cartProduct.js +17 -1
- package/lib/modules/Cart/utils/changePrice.js +5 -0
- package/lib/modules/Date/index.d.ts +1 -1
- package/lib/modules/Date/index.js +7 -1
- package/lib/modules/Date/types.d.ts +3 -1
- package/lib/modules/OpenData/index.d.ts +24 -0
- package/lib/modules/OpenData/index.js +119 -0
- package/lib/modules/OpenData/types.d.ts +73 -0
- package/lib/modules/OpenData/types.js +17 -0
- package/lib/modules/OpenData/utils.d.ts +2 -0
- package/lib/modules/OpenData/utils.js +111 -0
- package/lib/modules/Order/index.d.ts +171 -1
- package/lib/modules/Order/index.js +1396 -5
- package/lib/modules/Order/types.d.ts +441 -20
- package/lib/modules/Order/types.js +1 -0
- package/lib/modules/Order/utils.d.ts +120 -0
- package/lib/modules/Order/utils.js +562 -2
- package/lib/modules/Product/utils.js +2 -2
- package/lib/modules/ProductList/index.js +2 -1
- package/lib/modules/Quotation/index.d.ts +8 -1
- package/lib/modules/Quotation/index.js +33 -4
- package/lib/modules/Quotation/types.d.ts +5 -0
- package/lib/modules/Rules/index.d.ts +3 -1
- package/lib/modules/Rules/index.js +46 -6
- package/lib/modules/Rules/types.d.ts +6 -0
- package/lib/modules/Rules/types.js +11 -2
- package/lib/modules/SalesSummary/index.d.ts +70 -0
- package/lib/modules/SalesSummary/index.js +106 -0
- package/lib/modules/SalesSummary/types.d.ts +64 -0
- package/lib/modules/SalesSummary/types.js +17 -0
- package/lib/modules/SalesSummary/utils.d.ts +34 -0
- package/lib/modules/SalesSummary/utils.js +430 -0
- package/lib/modules/ScanOrderLogger/index.d.ts +21 -0
- package/lib/modules/ScanOrderLogger/index.js +135 -0
- package/lib/modules/ScanOrderLogger/providers/feishu.d.ts +2 -0
- package/lib/modules/ScanOrderLogger/providers/feishu.js +148 -0
- package/lib/modules/ScanOrderLogger/providers/grafana.d.ts +2 -0
- package/lib/modules/ScanOrderLogger/providers/grafana.js +52 -0
- package/lib/modules/ScanOrderLogger/types.d.ts +52 -0
- package/lib/modules/ScanOrderLogger/types.js +17 -0
- package/lib/modules/Schedule/getDateIsInSchedule.js +5 -5
- package/lib/modules/Schedule/index.d.ts +4 -13
- package/lib/modules/Schedule/index.js +4 -15
- package/lib/modules/Schedule/utils.d.ts +1 -1
- package/lib/modules/Summary/index.d.ts +3 -0
- package/lib/modules/Summary/index.js +61 -2
- package/lib/modules/Summary/types.d.ts +7 -0
- package/lib/modules/Summary/utils.d.ts +104 -1
- package/lib/modules/Summary/utils.js +659 -8
- package/lib/modules/index.d.ts +4 -0
- package/lib/modules/index.js +9 -1
- package/lib/server/index.d.ts +41 -4
- package/lib/server/index.js +272 -10
- package/lib/server/modules/order/index.d.ts +10 -2
- package/lib/server/modules/order/index.js +31 -4
- package/lib/server/modules/products/index.d.ts +26 -0
- package/lib/server/modules/products/index.js +174 -22
- package/lib/server/modules/products/types.d.ts +5 -1
- package/lib/solution/BaseSales/index.d.ts +175 -0
- package/lib/solution/BaseSales/index.js +655 -0
- package/lib/solution/BaseSales/types.d.ts +305 -0
- package/lib/solution/BaseSales/types.js +40 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +143 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.js +160 -0
- package/lib/solution/BaseSales/utils.d.ts +40 -0
- package/lib/solution/BaseSales/utils.js +200 -0
- package/lib/solution/BookingByStep/index.d.ts +14 -0
- package/lib/solution/BookingByStep/index.js +469 -91
- package/lib/solution/BookingByStep/types.d.ts +3 -1
- package/lib/solution/BookingByStep/types.js +10 -0
- package/lib/solution/BookingByStep/utils/capacity.js +1 -1
- package/lib/solution/BookingByStep/utils/resources.js +5 -2
- package/lib/solution/BookingTicket/index.d.ts +113 -15
- package/lib/solution/BookingTicket/index.js +253 -61
- package/lib/solution/BookingTicket/types.d.ts +69 -6
- package/lib/solution/BookingTicket/types.js +16 -14
- package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +37 -0
- package/lib/solution/BookingTicket/utils/bookingStatus.js +65 -0
- package/lib/solution/BookingTicket/utils/cartView.d.ts +26 -0
- package/lib/solution/BookingTicket/utils/cartView.js +103 -0
- package/lib/solution/Sales/index.d.ts +1 -0
- package/lib/solution/ScanOrder/index.d.ts +146 -0
- package/lib/solution/ScanOrder/index.js +1820 -0
- package/lib/solution/ScanOrder/types.d.ts +305 -0
- package/lib/solution/ScanOrder/types.js +36 -0
- package/lib/solution/ScanOrder/utils.d.ts +167 -0
- package/lib/solution/ScanOrder/utils.js +639 -0
- package/lib/solution/ShopDiscount/index.d.ts +2 -0
- package/lib/solution/ShopDiscount/index.js +9 -4
- package/lib/solution/ShopDiscount/types.d.ts +4 -0
- package/lib/solution/VenueBooking/index.d.ts +197 -0
- package/lib/solution/VenueBooking/index.js +1892 -0
- package/lib/solution/VenueBooking/sales-section-4-annotated.json +343 -0
- package/lib/solution/VenueBooking/types.d.ts +153 -0
- package/lib/solution/VenueBooking/types.js +44 -0
- package/lib/solution/VenueBooking/utils/dateSummary.d.ts +11 -0
- package/lib/solution/VenueBooking/utils/dateSummary.js +110 -0
- package/lib/solution/VenueBooking/utils/resource.d.ts +14 -0
- package/lib/solution/VenueBooking/utils/resource.js +91 -0
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +34 -0
- package/lib/solution/VenueBooking/utils/slotMerge.js +225 -0
- package/lib/solution/VenueBooking/utils/timeSlot.d.ts +32 -0
- package/lib/solution/VenueBooking/utils/timeSlot.js +339 -0
- package/lib/solution/VenueBooking/utils.d.ts +1 -0
- package/lib/solution/VenueBooking/utils.js +69 -0
- package/lib/solution/index.d.ts +3 -0
- package/lib/solution/index.js +7 -1
- package/package.json +1 -1
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import { ProductList,
|
|
1
|
+
import { ProductList, OrderModule } from '../../modules';
|
|
2
2
|
import { CustomerModule } from '../../modules/Customer';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { SalesSummaryModule } from '../../modules/SalesSummary';
|
|
4
|
+
import { ScheduleModule } from '../../modules/Schedule';
|
|
5
|
+
import type { BaseSalesState } from '../BaseSales';
|
|
6
|
+
import type { BaseSalesOrderProduct } from '../BaseSales';
|
|
7
|
+
import type { ISalesBooking } from '../BaseSales/utils/parseSalesResponse';
|
|
8
|
+
import type { ProductData } from '../../modules/Product/types';
|
|
9
|
+
/**
|
|
10
|
+
* BookingTicket 子模块清单:在 BaseSales 自带的 products/order/salesSummary/schedule 之上
|
|
11
|
+
* 追加业务向的 customer 模块;不再注册 cart/accountList(无外部消费)。
|
|
12
|
+
*/
|
|
13
|
+
export interface BookingTicketState extends BaseSalesState {
|
|
5
14
|
products: ProductList;
|
|
6
|
-
accountList: AccountListModule;
|
|
7
|
-
customer: CustomerModule;
|
|
8
15
|
order: OrderModule;
|
|
16
|
+
salesSummary: SalesSummaryModule;
|
|
17
|
+
schedule: ScheduleModule;
|
|
18
|
+
customer: CustomerModule;
|
|
9
19
|
}
|
|
10
|
-
export declare function
|
|
20
|
+
export declare function createBookingTicketModule<T extends keyof BookingTicketState>(moduleName: T, solutionName: string, name?: string, version?: string): BookingTicketState[T] | null;
|
|
11
21
|
export declare enum BookingTicketHooks {
|
|
12
22
|
onInited = "bookingTicket:onInited",
|
|
13
23
|
onDestroy = "bookingTicket:onDestroy",
|
|
@@ -48,6 +58,12 @@ export interface ICustomer {
|
|
|
48
58
|
* 加载商品列表的参数
|
|
49
59
|
*/
|
|
50
60
|
export interface ILoadProductsParams {
|
|
61
|
+
/** 商品分类ID */
|
|
62
|
+
category_ids?: number[];
|
|
63
|
+
/** 商品ID */
|
|
64
|
+
product_ids?: number[];
|
|
65
|
+
/** 商品集合ID */
|
|
66
|
+
collection?: number | string[];
|
|
51
67
|
/** 日期 格式:YYYY-MM-DD */
|
|
52
68
|
schedule_date?: string;
|
|
53
69
|
/** 客户ID */
|
|
@@ -56,6 +72,17 @@ export interface ILoadProductsParams {
|
|
|
56
72
|
menu_list_ids?: number[];
|
|
57
73
|
/** 时间 格式:YYYY-MM-DD HH:mm:ss*/
|
|
58
74
|
schedule_datetime?: string;
|
|
75
|
+
/** 关联统计字段 */
|
|
76
|
+
with_count?: string[];
|
|
77
|
+
/** 是否返回日程信息 */
|
|
78
|
+
with_schedule?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 加载商品详情的参数
|
|
82
|
+
*/
|
|
83
|
+
export interface ILoadProductDetailParams extends Omit<ILoadProductsParams, 'product_ids'> {
|
|
84
|
+
/** 商品ID */
|
|
85
|
+
product_id: number;
|
|
59
86
|
}
|
|
60
87
|
/**
|
|
61
88
|
* 扫描结果
|
|
@@ -66,3 +93,39 @@ export interface IScanResult {
|
|
|
66
93
|
scanCode: string;
|
|
67
94
|
result: any;
|
|
68
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* BookingTicket 面向 UI 的购物车行视图。
|
|
98
|
+
*
|
|
99
|
+
* tempOrder.products 仍保持 Sales checkout 协议结构;展示字段在 Solution 层合并后输出,
|
|
100
|
+
* 避免 UI 直接读取 booking/detail/catalog 等原始来源。
|
|
101
|
+
*/
|
|
102
|
+
export interface BookingTicketCartItemView extends BaseSalesOrderProduct {
|
|
103
|
+
/** UI 运行态扩展,不进入 tempOrder 提交协议。 */
|
|
104
|
+
_extend: {
|
|
105
|
+
booking: ISalesBooking | null;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* BookingTicket 面向 UI 的购物车视图。
|
|
110
|
+
*/
|
|
111
|
+
export interface BookingTicketCartView {
|
|
112
|
+
items: BookingTicketCartItemView[];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* BookingTicket 面向 UI 的客户展示视图。
|
|
116
|
+
*/
|
|
117
|
+
export interface BookingTicketCustomerView {
|
|
118
|
+
id: number | string;
|
|
119
|
+
name: string;
|
|
120
|
+
phone?: string;
|
|
121
|
+
email?: string;
|
|
122
|
+
country_calling_code?: string;
|
|
123
|
+
cover?: string;
|
|
124
|
+
isWalkIn: boolean;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* BookingTicket 当前已加载的商品池视图。
|
|
128
|
+
*/
|
|
129
|
+
export interface BookingTicketProductCatalogView {
|
|
130
|
+
products: ProductData[];
|
|
131
|
+
}
|
|
@@ -20,40 +20,42 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var types_exports = {};
|
|
21
21
|
__export(types_exports, {
|
|
22
22
|
BookingTicketHooks: () => BookingTicketHooks,
|
|
23
|
-
|
|
23
|
+
createBookingTicketModule: () => createBookingTicketModule
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(types_exports);
|
|
26
26
|
var import_modules = require("../../modules");
|
|
27
27
|
var import_Customer = require("../../modules/Customer");
|
|
28
|
-
|
|
28
|
+
var import_SalesSummary = require("../../modules/SalesSummary");
|
|
29
|
+
var import_Schedule = require("../../modules/Schedule");
|
|
30
|
+
function createBookingTicketModule(moduleName, solutionName, name, version) {
|
|
29
31
|
switch (moduleName) {
|
|
30
|
-
case "
|
|
31
|
-
return new import_modules.
|
|
32
|
+
case "products":
|
|
33
|
+
return new import_modules.ProductList(
|
|
32
34
|
`${solutionName}_${name || moduleName}`,
|
|
33
35
|
version
|
|
34
36
|
);
|
|
35
|
-
case "
|
|
36
|
-
return new import_modules.
|
|
37
|
+
case "order":
|
|
38
|
+
return new import_modules.OrderModule(
|
|
37
39
|
`${solutionName}_${name || moduleName}`,
|
|
38
40
|
version
|
|
39
41
|
);
|
|
40
|
-
case "
|
|
41
|
-
return new
|
|
42
|
+
case "salesSummary":
|
|
43
|
+
return new import_SalesSummary.SalesSummaryModule(
|
|
42
44
|
`${solutionName}_${name || moduleName}`,
|
|
43
45
|
version
|
|
44
46
|
);
|
|
45
|
-
case "
|
|
46
|
-
return new
|
|
47
|
+
case "schedule":
|
|
48
|
+
return new import_Schedule.ScheduleModule(
|
|
47
49
|
`${solutionName}_${name || moduleName}`,
|
|
48
50
|
version
|
|
49
51
|
);
|
|
50
|
-
case "
|
|
51
|
-
return new
|
|
52
|
+
case "customer":
|
|
53
|
+
return new import_Customer.CustomerModule(
|
|
52
54
|
`${solutionName}_${name || moduleName}`,
|
|
53
55
|
version
|
|
54
56
|
);
|
|
55
57
|
default:
|
|
56
|
-
|
|
58
|
+
return null;
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
var BookingTicketHooks = /* @__PURE__ */ ((BookingTicketHooks2) => {
|
|
@@ -68,5 +70,5 @@ var BookingTicketHooks = /* @__PURE__ */ ((BookingTicketHooks2) => {
|
|
|
68
70
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
71
|
0 && (module.exports = {
|
|
70
72
|
BookingTicketHooks,
|
|
71
|
-
|
|
73
|
+
createBookingTicketModule
|
|
72
74
|
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BookingTicket - 预约状态相关纯函数。
|
|
3
|
+
*
|
|
4
|
+
* 该文件不持有任何运行时引用(无 request / store / effects),
|
|
5
|
+
* 只做字段解析与本地数组的原地写入/回滚,便于独立单测与未来其他
|
|
6
|
+
* booking 写操作(editBooking / cancelBooking 等)复用。
|
|
7
|
+
*
|
|
8
|
+
* 设计依据:参考 .cursor/rules/data-field-semantics.mdc,
|
|
9
|
+
* 字段含义严格对齐既有协议(OrderTempOrder / parseSalesResponse),
|
|
10
|
+
* 不发明等价关系。
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 从 tempOrder 解析用于调用 appointment-status 接口的 schedule id。
|
|
14
|
+
*
|
|
15
|
+
* 优先级:
|
|
16
|
+
* 1. `tempOrder.metadata.appointment_booking_parent_schedule_id`
|
|
17
|
+
* 2. `tempOrder.bookings` 中 `parent_id === 0` 的 `schedule_event_id`
|
|
18
|
+
*
|
|
19
|
+
* 都缺失时返回 null,由调用方决定如何抛错。
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveScheduleId(tempOrder: {
|
|
22
|
+
bookings?: any[];
|
|
23
|
+
metadata?: Record<string, any> | null;
|
|
24
|
+
} | null | undefined): number | string | null;
|
|
25
|
+
/**
|
|
26
|
+
* 原地把所有 bookings 的 `appointment_status` 覆盖为新值,
|
|
27
|
+
* 返回原 status 数组用于回滚(顺序与 bookings 一一对应)。
|
|
28
|
+
*
|
|
29
|
+
* - 元素为 null/undefined 时跳过写入(但占位仍保留以保证回滚下标对齐)
|
|
30
|
+
* - 不会克隆 booking 对象,保持与 OrderModule.tempOrder 引用一致
|
|
31
|
+
*/
|
|
32
|
+
export declare function applyBookingsStatus(bookings: any[] | null | undefined, status: string): Array<string | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* 把 applyBookingsStatus 的返回值原地写回,撤销乐观更新。
|
|
35
|
+
* 长度不一致时按较短一方对齐(防御式编程,正常路径不会发生)。
|
|
36
|
+
*/
|
|
37
|
+
export declare function restoreBookingsStatus(bookings: any[] | null | undefined, previous: Array<string | undefined>): void;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/solution/BookingTicket/utils/bookingStatus.ts
|
|
20
|
+
var bookingStatus_exports = {};
|
|
21
|
+
__export(bookingStatus_exports, {
|
|
22
|
+
applyBookingsStatus: () => applyBookingsStatus,
|
|
23
|
+
resolveScheduleId: () => resolveScheduleId,
|
|
24
|
+
restoreBookingsStatus: () => restoreBookingsStatus
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(bookingStatus_exports);
|
|
27
|
+
function resolveScheduleId(tempOrder) {
|
|
28
|
+
var _a;
|
|
29
|
+
if (!tempOrder)
|
|
30
|
+
return null;
|
|
31
|
+
const metaScheduleId = (_a = tempOrder.metadata) == null ? void 0 : _a.appointment_booking_parent_schedule_id;
|
|
32
|
+
if (metaScheduleId !== void 0 && metaScheduleId !== null) {
|
|
33
|
+
return metaScheduleId;
|
|
34
|
+
}
|
|
35
|
+
const bookings = Array.isArray(tempOrder.bookings) ? tempOrder.bookings : [];
|
|
36
|
+
const rootBooking = bookings.find((b) => (b == null ? void 0 : b.parent_id) === 0);
|
|
37
|
+
const fallback = rootBooking == null ? void 0 : rootBooking.schedule_event_id;
|
|
38
|
+
return fallback !== void 0 && fallback !== null ? fallback : null;
|
|
39
|
+
}
|
|
40
|
+
function applyBookingsStatus(bookings, status) {
|
|
41
|
+
if (!Array.isArray(bookings))
|
|
42
|
+
return [];
|
|
43
|
+
const previous = bookings.map((b) => b == null ? void 0 : b.appointment_status);
|
|
44
|
+
bookings.forEach((b) => {
|
|
45
|
+
if (b)
|
|
46
|
+
b.appointment_status = status;
|
|
47
|
+
});
|
|
48
|
+
return previous;
|
|
49
|
+
}
|
|
50
|
+
function restoreBookingsStatus(bookings, previous) {
|
|
51
|
+
if (!Array.isArray(bookings))
|
|
52
|
+
return;
|
|
53
|
+
const len = Math.min(bookings.length, previous.length);
|
|
54
|
+
for (let i = 0; i < len; i += 1) {
|
|
55
|
+
const b = bookings[i];
|
|
56
|
+
if (b)
|
|
57
|
+
b.appointment_status = previous[i];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
+
0 && (module.exports = {
|
|
62
|
+
applyBookingsStatus,
|
|
63
|
+
resolveScheduleId,
|
|
64
|
+
restoreBookingsStatus
|
|
65
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { BaseSalesOrderProduct } from '../../BaseSales';
|
|
2
|
+
import type { ISalesBooking } from '../../BaseSales/utils/parseSalesResponse';
|
|
3
|
+
import type { ProductData } from '../../../modules/Product/types';
|
|
4
|
+
import type { BookingTicketCartItemView, BookingTicketCustomerView, ICustomer } from '../types';
|
|
5
|
+
import type { ScanOrderTempOrder } from '../../ScanOrder/types';
|
|
6
|
+
/**
|
|
7
|
+
* 仅按 booking.product_uid 建索引,避免发明 booking 与商品行之间的其它等价关系。
|
|
8
|
+
*/
|
|
9
|
+
export declare function indexBookingsByProductUid(bookings: ISalesBooking[] | undefined | null): Record<string, ISalesBooking[]>;
|
|
10
|
+
/**
|
|
11
|
+
* 合并购物车行展示字段。协议字段仍来自 tempOrder.products,
|
|
12
|
+
* 展示字段按 booking detail/product 优先,商品池 catalog 兜底。
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildCartItemView(line: BaseSalesOrderProduct, ctx: {
|
|
15
|
+
bookingDetailMap?: Record<string, ISalesBooking[]>;
|
|
16
|
+
productsCatalog: ProductData[];
|
|
17
|
+
}): BookingTicketCartItemView;
|
|
18
|
+
export declare function buildCartItemViews(lines: BaseSalesOrderProduct[] | undefined | null, ctx: {
|
|
19
|
+
bookingDetailMap?: Record<string, ISalesBooking[]>;
|
|
20
|
+
productsCatalog: ProductData[];
|
|
21
|
+
}): BookingTicketCartItemView[];
|
|
22
|
+
export declare function isWalkInCustomer(customer: Pick<ICustomer, 'id'> | null | undefined): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* selected 优先,缺失时回退 tempOrder.customer_*,统一输出 UI 客户视图。
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildCustomerView(selected: ICustomer | null | undefined, tempOrder: ScanOrderTempOrder | null | undefined): BookingTicketCustomerView | null;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/solution/BookingTicket/utils/cartView.ts
|
|
20
|
+
var cartView_exports = {};
|
|
21
|
+
__export(cartView_exports, {
|
|
22
|
+
buildCartItemView: () => buildCartItemView,
|
|
23
|
+
buildCartItemViews: () => buildCartItemViews,
|
|
24
|
+
buildCustomerView: () => buildCustomerView,
|
|
25
|
+
indexBookingsByProductUid: () => indexBookingsByProductUid,
|
|
26
|
+
isWalkInCustomer: () => isWalkInCustomer
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(cartView_exports);
|
|
29
|
+
function indexBookingsByProductUid(bookings) {
|
|
30
|
+
if (!Array.isArray(bookings) || bookings.length === 0)
|
|
31
|
+
return {};
|
|
32
|
+
return bookings.reduce((acc, booking) => {
|
|
33
|
+
const uid = booking == null ? void 0 : booking.product_uid;
|
|
34
|
+
if (uid === void 0 || uid === null || uid === "")
|
|
35
|
+
return acc;
|
|
36
|
+
const key = String(uid);
|
|
37
|
+
if (!acc[key])
|
|
38
|
+
acc[key] = [];
|
|
39
|
+
acc[key].push(booking);
|
|
40
|
+
return acc;
|
|
41
|
+
}, {});
|
|
42
|
+
}
|
|
43
|
+
function buildCartItemView(line, ctx) {
|
|
44
|
+
var _a, _b, _c;
|
|
45
|
+
const productUid = (_a = line.metadata) == null ? void 0 : _a.unique_identification_number;
|
|
46
|
+
const matched = productUid ? (_c = (_b = ctx.bookingDetailMap) == null ? void 0 : _b[String(productUid)]) == null ? void 0 : _c[0] : void 0;
|
|
47
|
+
return {
|
|
48
|
+
...line,
|
|
49
|
+
_extend: {
|
|
50
|
+
booking: matched ?? null
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function buildCartItemViews(lines, ctx) {
|
|
55
|
+
if (!Array.isArray(lines) || lines.length === 0)
|
|
56
|
+
return [];
|
|
57
|
+
return lines.map((line) => buildCartItemView(line, ctx));
|
|
58
|
+
}
|
|
59
|
+
function isWalkInCustomer(customer) {
|
|
60
|
+
if (!customer)
|
|
61
|
+
return true;
|
|
62
|
+
const id = customer.id;
|
|
63
|
+
if (id === void 0 || id === null)
|
|
64
|
+
return true;
|
|
65
|
+
if (typeof id === "string") {
|
|
66
|
+
return ["", "0", "1"].includes(id);
|
|
67
|
+
}
|
|
68
|
+
return [0, 1].includes(id);
|
|
69
|
+
}
|
|
70
|
+
function buildCustomerView(selected, tempOrder) {
|
|
71
|
+
if (selected && selected.id !== void 0 && selected.id !== null && selected.id !== "" && selected.id !== 0) {
|
|
72
|
+
return {
|
|
73
|
+
id: selected.id,
|
|
74
|
+
name: selected.name ?? "",
|
|
75
|
+
phone: selected.phone,
|
|
76
|
+
email: selected.email,
|
|
77
|
+
country_calling_code: selected.country_calling_code,
|
|
78
|
+
cover: selected.cover,
|
|
79
|
+
isWalkIn: isWalkInCustomer(selected)
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
if (tempOrder && (tempOrder.customer_id != null || tempOrder.customer_name)) {
|
|
83
|
+
const id = tempOrder.customer_id ?? "";
|
|
84
|
+
return {
|
|
85
|
+
id,
|
|
86
|
+
name: tempOrder.customer_name ?? "",
|
|
87
|
+
phone: tempOrder.phone,
|
|
88
|
+
email: tempOrder.email,
|
|
89
|
+
country_calling_code: tempOrder.country_calling_code,
|
|
90
|
+
cover: void 0,
|
|
91
|
+
isWalkIn: isWalkInCustomer({ id })
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
+
0 && (module.exports = {
|
|
98
|
+
buildCartItemView,
|
|
99
|
+
buildCartItemViews,
|
|
100
|
+
buildCustomerView,
|
|
101
|
+
indexBookingsByProductUid,
|
|
102
|
+
isWalkInCustomer
|
|
103
|
+
});
|
|
@@ -14,6 +14,7 @@ export * from './types';
|
|
|
14
14
|
* - 基础生命周期占位
|
|
15
15
|
*
|
|
16
16
|
* 不提前实现 store 编排、初始化流程细节、状态计算逻辑。
|
|
17
|
+
* TIPS:这块应该改名叫 ReservationModule 更合适一些,目前这边只服务于 Reservation 的 floormap 展示。
|
|
17
18
|
*/
|
|
18
19
|
export declare class SalesImpl extends BaseModule implements Module, SalesModuleAPI {
|
|
19
20
|
protected defaultName: string;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { Module, ModuleOptions, PisellCore } from '../../types';
|
|
2
|
+
import { BaseModule } from '../../modules/BaseModule';
|
|
3
|
+
import { ScanOrderAddLogParams, ScanOrderAvailabilityInfo, ScanOrderOrderProduct, ScanOrderOrderProductIdentity, ScanOrderScanCodeResult } from './types';
|
|
4
|
+
import type { UpdateProductInOrderParams } from '../../modules/Order/types';
|
|
5
|
+
import type { Discount } from '../../modules/Discount/types';
|
|
6
|
+
import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
|
|
7
|
+
import type { StrategyConfig } from '../../model/strategy/type';
|
|
8
|
+
export * from './types';
|
|
9
|
+
interface ScanOrderItemRuleRuntimeConfig {
|
|
10
|
+
strategyConfigs?: StrategyConfig[];
|
|
11
|
+
pax?: Partial<PaxInfo>;
|
|
12
|
+
historicalItems?: CartItemSummary[];
|
|
13
|
+
serviceType?: string;
|
|
14
|
+
submissionIndex?: number;
|
|
15
|
+
custom?: Record<string, any>;
|
|
16
|
+
}
|
|
17
|
+
export declare class ScanOrderImpl extends BaseModule implements Module {
|
|
18
|
+
protected defaultName: string;
|
|
19
|
+
protected defaultVersion: string;
|
|
20
|
+
isSolution: boolean;
|
|
21
|
+
private initializeOptions;
|
|
22
|
+
private store;
|
|
23
|
+
private otherParams;
|
|
24
|
+
private cacheId;
|
|
25
|
+
private window;
|
|
26
|
+
private request;
|
|
27
|
+
private itemRuleEvaluator;
|
|
28
|
+
private itemRuleConfigs;
|
|
29
|
+
private itemRuleConfigsPromise;
|
|
30
|
+
private itemRulePrefillApplied;
|
|
31
|
+
private itemRuleRuntimeConfig;
|
|
32
|
+
/** 最近一次 checkResourceAvailable 从预约规则 link 拉取的商品快照 */
|
|
33
|
+
private enabledReservationRuleProducts;
|
|
34
|
+
private loginEffectDisposers;
|
|
35
|
+
private customerLoginRefreshInFlight;
|
|
36
|
+
private customerLoginRefreshIdInFlight;
|
|
37
|
+
private static readonly PISELL1_LOGIN_SUCCESS;
|
|
38
|
+
private getScanOrderLoggerContext;
|
|
39
|
+
private serializeError;
|
|
40
|
+
private addScanOrderLog;
|
|
41
|
+
private logMethodStart;
|
|
42
|
+
private logMethodSuccess;
|
|
43
|
+
private logMethodError;
|
|
44
|
+
addLog(params: ScanOrderAddLogParams): Promise<void>;
|
|
45
|
+
private normalizeCustomerId;
|
|
46
|
+
private resolveCustomerIdFromLoginPayload;
|
|
47
|
+
private clearLoginEffectListeners;
|
|
48
|
+
private registerLoginEffect;
|
|
49
|
+
private registerCustomerLoginListeners;
|
|
50
|
+
private refreshOrderMarketingAfterLogin;
|
|
51
|
+
constructor(name?: string, version?: string);
|
|
52
|
+
/** 与 `otherParams.cacheId` 一致,供宿主在 URL 变化时判断是否需要重新注册模块 */
|
|
53
|
+
getCacheId(): string | undefined;
|
|
54
|
+
private destroyRegisteredChildModules;
|
|
55
|
+
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
56
|
+
destroy(): Promise<void>;
|
|
57
|
+
retryInit(): Promise<void>;
|
|
58
|
+
refresh(): Promise<void>;
|
|
59
|
+
getStatus(): import("./types").ScanOrderStatus;
|
|
60
|
+
getEntryContext(): import("./types").ScanOrderEntryContext | null;
|
|
61
|
+
getConfig(): Record<string, any>;
|
|
62
|
+
getItemRuleQuantityLimits(): QuantityLimitResult[];
|
|
63
|
+
getCartValidationPassed(): boolean | null;
|
|
64
|
+
getCartValidation(): {
|
|
65
|
+
passed: boolean | null;
|
|
66
|
+
failures: QuantityCheckResult[];
|
|
67
|
+
};
|
|
68
|
+
getTempOrder(): import("../../modules/Order/types").OrderTempOrder | null;
|
|
69
|
+
updateTempOrderNote(note: string): string;
|
|
70
|
+
setPickupReferenceMode(mode: 'counter_pickup' | 'table_service'): {
|
|
71
|
+
service_type: 'dine_in';
|
|
72
|
+
pickup_reference_mode: 'counter_pickup' | 'table_service';
|
|
73
|
+
};
|
|
74
|
+
setPickupRef(buzzer: string): string;
|
|
75
|
+
private ensureTempOrder;
|
|
76
|
+
addNewOrder(): Promise<import("../../modules/Order/types").OrderTempOrder>;
|
|
77
|
+
restoreOrder(): Promise<import("../../modules/Order/types").OrderTempOrder>;
|
|
78
|
+
getOrderProducts(): import("../../modules/Order/types").OrderProduct[];
|
|
79
|
+
getSummary(): Promise<import("../../modules/Order/types").OrderSummary>;
|
|
80
|
+
getDiscountList(): Discount[];
|
|
81
|
+
scanCode(code: string, customerId?: number): Promise<ScanOrderScanCodeResult>;
|
|
82
|
+
setDiscountSelected(params: {
|
|
83
|
+
discountId: number;
|
|
84
|
+
isSelected: boolean;
|
|
85
|
+
}): Promise<void>;
|
|
86
|
+
onCustomerLogin(params: {
|
|
87
|
+
customerId: number;
|
|
88
|
+
}): Promise<void>;
|
|
89
|
+
private buildSubmitPayloadEnhancer;
|
|
90
|
+
submitScanOrder<T = any>(): Promise<T>;
|
|
91
|
+
addProductToOrder(product: Partial<ScanOrderOrderProduct> & ScanOrderOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
92
|
+
updateProductInOrder(params: UpdateProductInOrderParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
93
|
+
/**
|
|
94
|
+
* 设置单行商品备注(与整单 `updateTempOrderNote` 区分)。
|
|
95
|
+
* 多行同 SKU 时必须传入与删除/更新一致的 identity(如 `identity_key`)。
|
|
96
|
+
*/
|
|
97
|
+
setOrderProductLineNote(identity: ScanOrderOrderProductIdentity, note: string): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
98
|
+
removeProductFromOrder(identity: ScanOrderOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
99
|
+
private loadRuntimeConfigs;
|
|
100
|
+
private syncItemRuleConfigsFromDineInConfig;
|
|
101
|
+
private fetchItemRuleConfigsByModelIds;
|
|
102
|
+
private buildPrefillProductSourceMap;
|
|
103
|
+
private getItemRuleRuntimeConfig;
|
|
104
|
+
private ensureItemRuleConfigsLoaded;
|
|
105
|
+
private refreshItemRuleQuantityLimits;
|
|
106
|
+
private applyPrefillByItemRule;
|
|
107
|
+
applyItemRulePrefill(): Promise<void>;
|
|
108
|
+
private evaluateCartValidationByItemRule;
|
|
109
|
+
private validateBeforeSubmitByItemRule;
|
|
110
|
+
private refreshCartValidationPassed;
|
|
111
|
+
setItemRuleRuntimeConfig(config?: ScanOrderItemRuleRuntimeConfig): Promise<void>;
|
|
112
|
+
private normalizeResourceState;
|
|
113
|
+
private resolveResourceSelectType;
|
|
114
|
+
private fetchResourceOccupyDetailByResourceId;
|
|
115
|
+
checkResourceAvailable(resourceId: string, hasOrderId: boolean): Promise<ScanOrderAvailabilityInfo>;
|
|
116
|
+
getAdditionalOrderInfo(): Promise<{
|
|
117
|
+
orderId: string;
|
|
118
|
+
orderStatus: 'pending' | 'processing' | 'completed' | 'cancelled';
|
|
119
|
+
orderTime: string;
|
|
120
|
+
orderAmount: number;
|
|
121
|
+
orderItems: any[];
|
|
122
|
+
}>;
|
|
123
|
+
getProductList(): Promise<any>;
|
|
124
|
+
getOtherParams(): Record<string, any>;
|
|
125
|
+
setOtherParams(params: Record<string, any>, { cover }?: {
|
|
126
|
+
cover?: boolean;
|
|
127
|
+
}): Promise<void>;
|
|
128
|
+
private static readonly UI_STATE_KEY_PREFIX;
|
|
129
|
+
private getUIStateBucketKey;
|
|
130
|
+
private readUIStateBucket;
|
|
131
|
+
private writeUIStateBucket;
|
|
132
|
+
setUIState(key: string, value: any): void;
|
|
133
|
+
getUIState<T = any>(key: string): T | undefined;
|
|
134
|
+
deleteUIState(key: string): void;
|
|
135
|
+
clearUIState(): void;
|
|
136
|
+
setEntryPaxNumber(number: number): Promise<void>;
|
|
137
|
+
getEntryPaxNumber(): number | null;
|
|
138
|
+
getFulfillmentModes(): {
|
|
139
|
+
enablePickup: boolean;
|
|
140
|
+
enableTableService: boolean;
|
|
141
|
+
};
|
|
142
|
+
checkManualPickupRef(): {
|
|
143
|
+
enabled: boolean;
|
|
144
|
+
manualInputType?: string;
|
|
145
|
+
};
|
|
146
|
+
}
|