@pisell/pisellos 2.2.291 → 2.2.293
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/core/index.d.ts +7 -0
- package/dist/core/index.js +108 -65
- package/dist/model/strategy/adapter/itemRule/adapter.d.ts +4 -1
- package/dist/model/strategy/adapter/itemRule/adapter.js +135 -35
- package/dist/model/strategy/adapter/itemRule/evaluator.d.ts +8 -1
- package/dist/model/strategy/adapter/itemRule/evaluator.js +25 -1
- package/dist/model/strategy/adapter/itemRule/type.d.ts +44 -0
- package/dist/model/strategy/adapter/itemRule/type.js +19 -1
- package/dist/model/strategy/adapter/promotion/index.js +0 -9
- package/dist/modules/BookingContext/index.d.ts +3 -0
- package/dist/modules/BookingContext/index.js +42 -13
- package/dist/modules/BookingContext/types.d.ts +4 -4
- package/dist/modules/BookingContext/types.js +3 -3
- package/dist/modules/OpenData/types.d.ts +1 -0
- package/dist/modules/Order/index.d.ts +18 -3
- package/dist/modules/Order/index.js +885 -485
- package/dist/modules/Order/salesNotes.d.ts +31 -0
- package/dist/modules/Order/salesNotes.js +492 -0
- package/dist/modules/Order/types.d.ts +93 -5
- package/dist/modules/Order/types.js +5 -0
- package/dist/modules/Order/utils.d.ts +12 -0
- package/dist/modules/Order/utils.js +96 -31
- package/dist/modules/Product/types.d.ts +2 -0
- package/dist/modules/ProductList/clientDataVariants.d.ts +50 -0
- package/dist/modules/ProductList/clientDataVariants.js +216 -0
- package/dist/modules/ProductList/index.d.ts +18 -3
- package/dist/modules/ProductList/index.js +220 -38
- package/dist/modules/ProductList/types.d.ts +10 -0
- package/dist/modules/Quotation/index.d.ts +22 -0
- package/dist/modules/Quotation/index.js +293 -28
- package/dist/modules/ResourcePlanner/index.d.ts +0 -22
- package/dist/modules/ResourcePlanner/index.js +1 -180
- package/dist/modules/ResourcePlanner/localClock.d.ts +33 -0
- package/dist/modules/ResourcePlanner/localClock.js +183 -0
- package/dist/modules/ResourcePlanner/planner.d.ts +5 -14
- package/dist/modules/ResourcePlanner/planner.js +2111 -958
- package/dist/modules/ResourcePlanner/types.d.ts +359 -187
- package/dist/modules/ResourcePlanner/types.js +33 -1
- package/dist/plugins/request.d.ts +1 -0
- package/dist/server/index.d.ts +17 -2
- package/dist/server/index.js +1134 -932
- package/dist/server/modules/floor-plan/index.d.ts +4 -0
- package/dist/server/modules/floor-plan/index.js +240 -98
- package/dist/server/modules/menu/index.js +48 -23
- package/dist/server/modules/order/index.d.ts +17 -7
- package/dist/server/modules/order/index.js +419 -207
- package/dist/server/modules/products/index.d.ts +10 -4
- package/dist/server/modules/products/index.js +177 -84
- package/dist/server/modules/resource/index.js +21 -13
- package/dist/server/utils/product.d.ts +1 -1
- package/dist/server/utils/product.js +186 -22
- package/dist/server/utils/small-ticket.d.ts +9 -1
- package/dist/server/utils/small-ticket.js +131 -84
- package/dist/solution/BaseSales/index.d.ts +26 -3
- package/dist/solution/BaseSales/index.js +1384 -905
- package/dist/solution/BaseSales/types.d.ts +2 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +3 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +10 -3
- package/dist/solution/BaseSales/utils.js +6 -3
- package/dist/solution/BookingByStep/index.d.ts +4 -4
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.js +4 -2
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +2 -1
- package/dist/solution/BookingTicket/utils/addProductDecision.js +6 -3
- package/dist/solution/BookingTicket/utils/orderCustomer.js +3 -2
- package/dist/solution/RegisterAndLogin/config.d.ts +9 -3
- package/dist/solution/RegisterAndLogin/config.js +95 -40
- package/dist/solution/RegisterAndLogin/index.js +4 -1
- package/dist/solution/ScanOrder/index.d.ts +1 -0
- package/dist/solution/ScanOrder/index.js +31 -27
- package/dist/solution/ScanOrder/types.d.ts +2 -0
- package/dist/solution/ScanOrder/utils.d.ts +1 -0
- package/dist/solution/ScanOrder/utils.js +8 -3
- package/dist/solution/UnifiedBookingSales/index.d.ts +128 -74
- package/dist/solution/UnifiedBookingSales/index.js +3877 -963
- package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +49 -0
- package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.js +430 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts +161 -77
- package/dist/solution/UnifiedBookingSales/types.js +4 -9
- package/dist/solution/VenueBooking/index.d.ts +3 -0
- package/dist/solution/VenueBooking/index.js +549 -497
- package/dist/solution/VenueBooking/utils/dateSummary.d.ts +1 -0
- package/dist/solution/VenueBooking/utils/dateSummary.js +3 -1
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +2 -0
- package/dist/solution/VenueBooking/utils/slotMerge.js +3 -1
- package/dist/utils/platform.d.ts +8 -0
- package/dist/utils/platform.js +15 -0
- package/lib/core/index.d.ts +7 -0
- package/lib/core/index.js +20 -2
- package/lib/model/strategy/adapter/itemRule/adapter.d.ts +4 -1
- package/lib/model/strategy/adapter/itemRule/adapter.js +73 -4
- package/lib/model/strategy/adapter/itemRule/evaluator.d.ts +8 -1
- package/lib/model/strategy/adapter/itemRule/evaluator.js +23 -1
- package/lib/model/strategy/adapter/itemRule/type.d.ts +44 -0
- package/lib/model/strategy/adapter/itemRule/type.js +19 -1
- package/lib/modules/BookingContext/index.d.ts +3 -0
- package/lib/modules/BookingContext/index.js +35 -8
- package/lib/modules/BookingContext/types.d.ts +4 -4
- package/lib/modules/BookingContext/types.js +3 -3
- package/lib/modules/OpenData/types.d.ts +1 -0
- package/lib/modules/Order/index.d.ts +18 -3
- package/lib/modules/Order/index.js +325 -28
- package/lib/modules/Order/salesNotes.d.ts +31 -0
- package/lib/modules/Order/salesNotes.js +382 -0
- package/lib/modules/Order/types.d.ts +93 -5
- package/lib/modules/Order/types.js +4 -0
- package/lib/modules/Order/utils.d.ts +12 -0
- package/lib/modules/Order/utils.js +85 -16
- package/lib/modules/Product/types.d.ts +2 -0
- package/lib/modules/ProductList/clientDataVariants.d.ts +50 -0
- package/lib/modules/ProductList/clientDataVariants.js +204 -0
- package/lib/modules/ProductList/index.d.ts +18 -3
- package/lib/modules/ProductList/index.js +137 -8
- package/lib/modules/ProductList/types.d.ts +10 -0
- package/lib/modules/Quotation/index.d.ts +22 -0
- package/lib/modules/Quotation/index.js +158 -11
- package/lib/modules/ResourcePlanner/index.d.ts +0 -22
- package/lib/modules/ResourcePlanner/index.js +9 -129
- package/lib/modules/ResourcePlanner/localClock.d.ts +33 -0
- package/lib/modules/ResourcePlanner/localClock.js +205 -0
- package/lib/modules/ResourcePlanner/planner.d.ts +5 -14
- package/lib/modules/ResourcePlanner/planner.js +1807 -783
- package/lib/modules/ResourcePlanner/types.d.ts +359 -187
- package/lib/modules/ResourcePlanner/types.js +13 -1
- package/lib/plugins/request.d.ts +1 -0
- package/lib/server/index.d.ts +17 -2
- package/lib/server/index.js +149 -21
- package/lib/server/modules/floor-plan/index.d.ts +4 -0
- package/lib/server/modules/floor-plan/index.js +60 -7
- package/lib/server/modules/menu/index.js +26 -4
- package/lib/server/modules/order/index.d.ts +17 -7
- package/lib/server/modules/order/index.js +194 -57
- package/lib/server/modules/products/index.d.ts +10 -4
- package/lib/server/modules/products/index.js +93 -23
- package/lib/server/modules/resource/index.js +12 -2
- package/lib/server/utils/product.d.ts +1 -1
- package/lib/server/utils/product.js +163 -3
- package/lib/server/utils/small-ticket.d.ts +9 -1
- package/lib/server/utils/small-ticket.js +123 -79
- package/lib/solution/BaseSales/index.d.ts +26 -3
- package/lib/solution/BaseSales/index.js +396 -70
- package/lib/solution/BaseSales/types.d.ts +2 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +3 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +9 -2
- package/lib/solution/BaseSales/utils.js +3 -0
- package/lib/solution/BookingByStep/index.d.ts +4 -4
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +2 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +2 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.js +5 -2
- package/lib/solution/BookingTicket/utils/orderCustomer.js +2 -1
- package/lib/solution/RegisterAndLogin/config.d.ts +9 -3
- package/lib/solution/RegisterAndLogin/config.js +49 -8
- package/lib/solution/RegisterAndLogin/index.js +4 -1
- package/lib/solution/ScanOrder/index.d.ts +1 -0
- package/lib/solution/ScanOrder/index.js +5 -1
- package/lib/solution/ScanOrder/types.d.ts +2 -0
- package/lib/solution/ScanOrder/utils.d.ts +1 -0
- package/lib/solution/ScanOrder/utils.js +4 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +128 -74
- package/lib/solution/UnifiedBookingSales/index.js +2592 -424
- package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +49 -0
- package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +316 -0
- package/lib/solution/UnifiedBookingSales/types.d.ts +161 -77
- package/lib/solution/UnifiedBookingSales/types.js +4 -6
- package/lib/solution/VenueBooking/index.d.ts +3 -0
- package/lib/solution/VenueBooking/index.js +33 -9
- package/lib/solution/VenueBooking/utils/dateSummary.d.ts +1 -0
- package/lib/solution/VenueBooking/utils/dateSummary.js +3 -1
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +2 -0
- package/lib/solution/VenueBooking/utils/slotMerge.js +3 -1
- package/lib/utils/platform.d.ts +8 -0
- package/lib/utils/platform.js +22 -0
- package/package.json +1 -1
|
@@ -257,6 +257,9 @@ function normalizeOrderProduct(product) {
|
|
|
257
257
|
product_id: product.product_id,
|
|
258
258
|
num: getSafeProductNum(product.num),
|
|
259
259
|
product_variant_id: product.product_variant_id,
|
|
260
|
+
...(product.production_code !== undefined && product.production_code !== null ? {
|
|
261
|
+
production_code: String(product.production_code).trim()
|
|
262
|
+
} : {}),
|
|
260
263
|
product_sku: productSku,
|
|
261
264
|
selling_price: composedSellingPrice,
|
|
262
265
|
original_price: finalOriginalPrice,
|
|
@@ -67,7 +67,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
67
67
|
product_ids?: number[];
|
|
68
68
|
collection?: number | string[];
|
|
69
69
|
schedule_date?: string;
|
|
70
|
-
}): Promise<
|
|
70
|
+
}): Promise<ProductData[]>;
|
|
71
71
|
/**
|
|
72
72
|
* 通过 schedule 来读取商品,适用于 session 类商品
|
|
73
73
|
*
|
|
@@ -87,7 +87,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
87
87
|
date: string;
|
|
88
88
|
product_ids?: number[];
|
|
89
89
|
category_ids?: number[];
|
|
90
|
-
}): Promise<
|
|
90
|
+
}): Promise<ProductData[]>;
|
|
91
91
|
/**
|
|
92
92
|
* 更新完商品数据、切换日期、或者在较后的流程里登录了,检测当前购物车里是否有商品,如果有,则需要更新购物车里的商品价格
|
|
93
93
|
*
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 |
|
|
329
|
+
weekNum: 0 | 5 | 3 | 1 | 2 | 4 | 6;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -345,7 +345,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
345
345
|
count: number;
|
|
346
346
|
left: number;
|
|
347
347
|
summaryCount: number;
|
|
348
|
-
status: "
|
|
348
|
+
status: "sold_out" | "lots_of_space" | "filling_up_fast";
|
|
349
349
|
}[];
|
|
350
350
|
/**
|
|
351
351
|
* 找到多个资源的公共可用时间段
|
|
@@ -128,7 +128,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
128
128
|
loadProducts(params?: ILoadProductsParams, options?: {
|
|
129
129
|
callback?: (result: any) => void;
|
|
130
130
|
subscriberId?: string;
|
|
131
|
-
}): Promise<
|
|
131
|
+
}): Promise<ProductData[]>;
|
|
132
132
|
/**
|
|
133
133
|
* 获取加时商品列表。
|
|
134
134
|
*
|
|
@@ -1475,7 +1475,8 @@ class BookingTicketImpl extends _BaseSales.BaseSalesImpl {
|
|
|
1475
1475
|
date,
|
|
1476
1476
|
presetStartTime: extra?.presetStartTime ?? (0, _BookingContext.derivePresetStartTimeFromDate)(date),
|
|
1477
1477
|
customerId: orderCustomerId,
|
|
1478
|
-
...(extra || {})
|
|
1478
|
+
...(extra || {}),
|
|
1479
|
+
channel: this.getSubmitOrderSalesChannel()
|
|
1479
1480
|
};
|
|
1480
1481
|
}
|
|
1481
1482
|
|
|
@@ -5,7 +5,7 @@ import type { OrderProduct, OrderProductIdentity, AddProductBookingInput } from
|
|
|
5
5
|
* cart.addProduct 两阶段决策(与 ticketBooking `handleSelectProduct` 对齐):
|
|
6
6
|
*
|
|
7
7
|
* 1. `requiresDetail`:规格 / SKU / 套餐 / Session / 称重弹窗(门禁:`isOpenDetailModal` / `cartDetailValue` / `open_sold_weight`)
|
|
8
|
-
* 2. `requiresBookingEdit`:资源 /
|
|
8
|
+
* 2. `requiresBookingEdit`:资源 / 时间编辑抽屉(kiosk 强制进入;其他渠道由 `getIsAutoClose` 决定)
|
|
9
9
|
* 3. `add`:两关均通过,直接 transform + 加车
|
|
10
10
|
*/
|
|
11
11
|
export type AddProductDecision = {
|
|
@@ -65,6 +65,7 @@ export interface AddProductDecideContext extends BookingCalcContext {
|
|
|
65
65
|
type?: 'select' | 'detail';
|
|
66
66
|
quantity?: number;
|
|
67
67
|
customerId?: number | string;
|
|
68
|
+
channel?: string;
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
71
|
* 统一补齐预约商品的运行态字段。
|
|
@@ -22,7 +22,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
22
22
|
* cart.addProduct 两阶段决策(与 ticketBooking `handleSelectProduct` 对齐):
|
|
23
23
|
*
|
|
24
24
|
* 1. `requiresDetail`:规格 / SKU / 套餐 / Session / 称重弹窗(门禁:`isOpenDetailModal` / `cartDetailValue` / `open_sold_weight`)
|
|
25
|
-
* 2. `requiresBookingEdit`:资源 /
|
|
25
|
+
* 2. `requiresBookingEdit`:资源 / 时间编辑抽屉(kiosk 强制进入;其他渠道由 `getIsAutoClose` 决定)
|
|
26
26
|
* 3. `add`:两关均通过,直接 transform + 加车
|
|
27
27
|
*/
|
|
28
28
|
|
|
@@ -39,10 +39,11 @@ function needsSpecDetailModal(item) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* 第二段:预约商品是否仍需打开资源 /
|
|
42
|
+
* 第二段:预约商品是否仍需打开资源 / 时间编辑(kiosk 强制打开,其他渠道与 info2 `cacheItem.autoClose` 等价)。
|
|
43
43
|
*/
|
|
44
44
|
function needsBookingEdit(cacheItem, ctx) {
|
|
45
45
|
if (isNormalBookingProduct(cacheItem)) return false;
|
|
46
|
+
if (ctx?.channel === 'kiosk') return true;
|
|
46
47
|
const isAutoAllocationOn = ctx?.isAutoAllocationOn || (() => true);
|
|
47
48
|
return !(0, _BookingContext.getIsAutoClose)(cacheItem, isAutoAllocationOn);
|
|
48
49
|
}
|
|
@@ -335,6 +336,8 @@ function buildBasePayloadFromCacheItem(cacheItem, ctx) {
|
|
|
335
336
|
id: cacheItem?.id ?? cacheItem?.product_id,
|
|
336
337
|
product_id: resolvedPid,
|
|
337
338
|
variant_id: other?.product_variant_id ?? other?.variant_id ?? 0,
|
|
339
|
+
// SKUOptionsSelection 已按 Product / Variant 解析好主商品编码;显式空串也需保留。
|
|
340
|
+
production_code: other?.production_code ?? cacheItem?.production_code,
|
|
338
341
|
quantity,
|
|
339
342
|
// 规格弹窗本次选择是 option 权威源,避免目录/旧订单里的空 option 覆盖它。
|
|
340
343
|
product_sku: productSku ? {
|
|
@@ -23,7 +23,8 @@ function resolveCustomerDisplayName(customer) {
|
|
|
23
23
|
|
|
24
24
|
/** 将 ICustomer 格式化为写入 tempOrder 的协议字段。 */
|
|
25
25
|
function formatOrderCustomerPatch(customer) {
|
|
26
|
-
const
|
|
26
|
+
const c = customer;
|
|
27
|
+
const rawId = c.customer_id ?? c.customerId ?? customer.id;
|
|
27
28
|
const numericId = typeof rawId === 'number' ? rawId : rawId !== undefined && rawId !== null && rawId !== '' ? Number(rawId) : null;
|
|
28
29
|
return {
|
|
29
30
|
customer_id: Number.isFinite(numericId) ? numericId : null,
|
|
@@ -10,7 +10,11 @@ export interface ApiConfig {
|
|
|
10
10
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
11
11
|
transformParams?: (params: any) => any;
|
|
12
12
|
transformResponse?: (response: any) => any;
|
|
13
|
-
options?: Record<string, any
|
|
13
|
+
options?: Record<string, any> | ((params: any) => Record<string, any>);
|
|
14
|
+
}
|
|
15
|
+
export interface ApiCallerOptions {
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
shopDomain?: string;
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
16
20
|
* 渠道配置接口
|
|
@@ -65,12 +69,14 @@ export declare function getChannelConfig(channel: string): ChannelConfig;
|
|
|
65
69
|
export declare class ApiCaller {
|
|
66
70
|
private request;
|
|
67
71
|
private config;
|
|
72
|
+
private options;
|
|
68
73
|
constructor(request: {
|
|
69
74
|
get: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
|
|
70
75
|
post: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
|
|
71
76
|
put: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
|
|
72
77
|
delete: <T = any>(url: string, options?: any) => Promise<T>;
|
|
73
|
-
}, config: ChannelConfig);
|
|
78
|
+
}, config: ChannelConfig, options?: ApiCallerOptions);
|
|
79
|
+
private resolveUrl;
|
|
74
80
|
/**
|
|
75
81
|
* 执行 API 调用
|
|
76
82
|
*/
|
|
@@ -84,4 +90,4 @@ export declare function createApiCaller(request: {
|
|
|
84
90
|
post: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
|
|
85
91
|
put: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
|
|
86
92
|
delete: <T = any>(url: string, options?: any) => Promise<T>;
|
|
87
|
-
}, channel: string): ApiCaller;
|
|
93
|
+
}, channel: string, options?: ApiCallerOptions): ApiCaller;
|
|
@@ -15,6 +15,8 @@ exports.getChannelConfig = getChannelConfig;
|
|
|
15
15
|
* API 配置接口
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
const h5CustomerAuthApiNames = new Set(['sendEmailVerificationCode', 'sendEmailLoginCode', 'sendSmsRegisterCode', 'sendEmailRegisterLink', 'verifyEmailRegistrationLink', 'emailPasswordLogin', 'emailCodeRegister', 'phoneCodeRegister', 'resendEmailRegisterLink', 'checkEmailLinkCode', 'sendSmsLoginCode', 'phoneCodeLogin', 'guestLogin', 'checkEmailExists', 'checkEmailCode', 'checkMobileCode', 'phonePasswordLogin', 'sendPasswordResetEmail', 'sendPasswordResetSms', 'sendResetPasswordLink', 'checkResetPasswordCode', 'resetPasswordByCode', 'resetPasswordByEmail', 'resetPasswordByPhone', 'verifyCode', 'register', 'login', 'oauthLogin', 'facebookLogin', 'appleLogin']);
|
|
19
|
+
|
|
18
20
|
/**
|
|
19
21
|
* 渠道配置接口
|
|
20
22
|
*/
|
|
@@ -278,6 +280,31 @@ const onlineStoreConfig = {
|
|
|
278
280
|
})
|
|
279
281
|
}
|
|
280
282
|
};
|
|
283
|
+
function withH5AuthPrefix(config) {
|
|
284
|
+
const nextConfig = {};
|
|
285
|
+
Object.entries(config).forEach(([key, apiConfig]) => {
|
|
286
|
+
if (!apiConfig.url.startsWith('/auth/')) {
|
|
287
|
+
nextConfig[key] = apiConfig;
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
nextConfig[key] = {
|
|
291
|
+
...apiConfig,
|
|
292
|
+
url: apiConfig.url.startsWith('/h5/') ? apiConfig.url : `/h5${apiConfig.url}`,
|
|
293
|
+
options: params => {
|
|
294
|
+
const {
|
|
295
|
+
withCredentials,
|
|
296
|
+
...baseOptions
|
|
297
|
+
} = (typeof apiConfig.options === 'function' ? apiConfig.options(params) : apiConfig.options) || {};
|
|
298
|
+
return {
|
|
299
|
+
...baseOptions,
|
|
300
|
+
prefix: false
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
});
|
|
305
|
+
return nextConfig;
|
|
306
|
+
}
|
|
307
|
+
const h5OnlineStoreConfig = withH5AuthPrefix(onlineStoreConfig);
|
|
281
308
|
|
|
282
309
|
/**
|
|
283
310
|
* 默认配置(通用配置)
|
|
@@ -1066,6 +1093,7 @@ const shopWebposConfig = {
|
|
|
1066
1093
|
*/
|
|
1067
1094
|
const channelConfigMap = exports.channelConfigMap = {
|
|
1068
1095
|
'online-store': onlineStoreConfig,
|
|
1096
|
+
'online-store-h5': h5OnlineStoreConfig,
|
|
1069
1097
|
'default': defaultConfig,
|
|
1070
1098
|
'webpos': webposConfig,
|
|
1071
1099
|
'shop.webpos': shopWebposConfig
|
|
@@ -1083,9 +1111,16 @@ function getChannelConfig(channel) {
|
|
|
1083
1111
|
* 负责根据配置执行 API 调用
|
|
1084
1112
|
*/
|
|
1085
1113
|
class ApiCaller {
|
|
1086
|
-
constructor(request, config) {
|
|
1114
|
+
constructor(request, config, options = {}) {
|
|
1087
1115
|
this.request = request;
|
|
1088
1116
|
this.config = config;
|
|
1117
|
+
this.options = options;
|
|
1118
|
+
}
|
|
1119
|
+
resolveUrl(url) {
|
|
1120
|
+
if (!this.options.baseUrl || !url.startsWith('/h5/auth/')) {
|
|
1121
|
+
return url;
|
|
1122
|
+
}
|
|
1123
|
+
return `${this.options.baseUrl.replace(/\/$/, '')}${url}`;
|
|
1089
1124
|
}
|
|
1090
1125
|
|
|
1091
1126
|
/**
|
|
@@ -1111,6 +1146,12 @@ class ApiCaller {
|
|
|
1111
1146
|
...options,
|
|
1112
1147
|
...additionalOptions
|
|
1113
1148
|
};
|
|
1149
|
+
if (apiConfig.url.startsWith('/h5/auth/') && h5CustomerAuthApiNames.has(apiName)) {
|
|
1150
|
+
requestOptions.h5CustomerAuth = true;
|
|
1151
|
+
if (this.options.shopDomain) {
|
|
1152
|
+
requestOptions.h5AuthShopDomain = this.options.shopDomain;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1114
1155
|
|
|
1115
1156
|
// 处理动态 headers
|
|
1116
1157
|
if (requestOptions.headers && typeof requestOptions.headers === 'function') {
|
|
@@ -1123,19 +1164,19 @@ class ApiCaller {
|
|
|
1123
1164
|
switch (apiConfig.method) {
|
|
1124
1165
|
case 'GET':
|
|
1125
1166
|
if (transformedParams && Object.keys(transformedParams).length > 0) {
|
|
1126
|
-
response = await this.request.get(apiConfig.url, transformedParams, requestOptions);
|
|
1167
|
+
response = await this.request.get(this.resolveUrl(apiConfig.url), transformedParams, requestOptions);
|
|
1127
1168
|
} else {
|
|
1128
|
-
response = await this.request.get(apiConfig.url, undefined, requestOptions);
|
|
1169
|
+
response = await this.request.get(this.resolveUrl(apiConfig.url), undefined, requestOptions);
|
|
1129
1170
|
}
|
|
1130
1171
|
break;
|
|
1131
1172
|
case 'POST':
|
|
1132
|
-
response = await this.request.post(apiConfig.url, transformedParams, requestOptions);
|
|
1173
|
+
response = await this.request.post(this.resolveUrl(apiConfig.url), transformedParams, requestOptions);
|
|
1133
1174
|
break;
|
|
1134
1175
|
case 'PUT':
|
|
1135
|
-
response = await this.request.put(apiConfig.url, transformedParams, requestOptions);
|
|
1176
|
+
response = await this.request.put(this.resolveUrl(apiConfig.url), transformedParams, requestOptions);
|
|
1136
1177
|
break;
|
|
1137
1178
|
case 'DELETE':
|
|
1138
|
-
response = await this.request.delete(apiConfig.url, requestOptions);
|
|
1179
|
+
response = await this.request.delete(this.resolveUrl(apiConfig.url), requestOptions);
|
|
1139
1180
|
break;
|
|
1140
1181
|
default:
|
|
1141
1182
|
throw new Error(`不支持的 HTTP 方法: ${apiConfig.method}`);
|
|
@@ -1150,7 +1191,7 @@ class ApiCaller {
|
|
|
1150
1191
|
* 创建 API 调用器
|
|
1151
1192
|
*/
|
|
1152
1193
|
exports.ApiCaller = ApiCaller;
|
|
1153
|
-
function createApiCaller(request, channel) {
|
|
1194
|
+
function createApiCaller(request, channel, options) {
|
|
1154
1195
|
const config = getChannelConfig(channel);
|
|
1155
|
-
return new ApiCaller(request, config);
|
|
1196
|
+
return new ApiCaller(request, config, options);
|
|
1156
1197
|
}
|
|
@@ -227,7 +227,10 @@ class RegisterAndLoginImpl extends _BaseModule.BaseModule {
|
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
// 创建 API 调用器
|
|
230
|
-
this.apiCaller = (0, _config.createApiCaller)(this.request, this.channel
|
|
230
|
+
this.apiCaller = (0, _config.createApiCaller)(this.request, this.channel, {
|
|
231
|
+
baseUrl: this.otherParams.h5AuthBaseUrl,
|
|
232
|
+
shopDomain: this.otherParams.h5AuthShopDomain
|
|
233
|
+
});
|
|
231
234
|
|
|
232
235
|
// 尝试从本地存储恢复登录状态
|
|
233
236
|
await this.restoreLoginState();
|
|
@@ -1200,7 +1200,11 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
1200
1200
|
return sourceMap;
|
|
1201
1201
|
}
|
|
1202
1202
|
getItemRuleRuntimeConfig() {
|
|
1203
|
-
|
|
1203
|
+
const runtimeConfig = this.itemRuleRuntimeConfig || {};
|
|
1204
|
+
return {
|
|
1205
|
+
...runtimeConfig,
|
|
1206
|
+
channel: runtimeConfig.channel ?? runtimeConfig.custom?.channel ?? this.otherParams?.channel
|
|
1207
|
+
};
|
|
1204
1208
|
}
|
|
1205
1209
|
async ensureItemRuleConfigsLoaded() {
|
|
1206
1210
|
if (this.itemRuleConfigs.length > 0) return this.itemRuleConfigs;
|
|
@@ -44,6 +44,8 @@ export interface ScanOrderProductSku {
|
|
|
44
44
|
export interface ScanOrderOrderProduct extends ScanOrderOrderProductIdentity {
|
|
45
45
|
order_detail_id: number | null;
|
|
46
46
|
num: number;
|
|
47
|
+
/** Product 或当前 Variant 的生产编码 */
|
|
48
|
+
production_code?: string;
|
|
47
49
|
product_sku: ScanOrderProductSku;
|
|
48
50
|
/**
|
|
49
51
|
* 券后 **行 composite 单价** = `metadata.main_product_selling_price`
|
|
@@ -333,6 +333,7 @@ function buildItemRuleBusinessData(params) {
|
|
|
333
333
|
cartItems,
|
|
334
334
|
historicalItems,
|
|
335
335
|
serviceType: runtimeConfig.serviceType || 'dine-in',
|
|
336
|
+
channel: runtimeConfig.channel ?? runtimeConfig.custom?.channel,
|
|
336
337
|
submissionIndex: typeof runtimeConfig.submissionIndex === 'number' ? toNonNegativeInt(runtimeConfig.submissionIndex) : tempOrder.order_id ? 1 : 0,
|
|
337
338
|
custom: runtimeConfig.custom || {},
|
|
338
339
|
strategyConfigs: itemRuleConfigs
|
|
@@ -633,6 +634,9 @@ function normalizeOrderProduct(product) {
|
|
|
633
634
|
product_id: product.product_id,
|
|
634
635
|
num: getSafeProductNum(product.num),
|
|
635
636
|
product_variant_id: product.product_variant_id,
|
|
637
|
+
...(product.production_code !== undefined && product.production_code !== null ? {
|
|
638
|
+
production_code: String(product.production_code).trim()
|
|
639
|
+
} : {}),
|
|
636
640
|
product_sku: productSku,
|
|
637
641
|
selling_price: composedSellingPrice,
|
|
638
642
|
original_price: manualOriginalPrice,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import type { Module } from '../../types';
|
|
1
|
+
import type { Module, ModuleOptions, PisellCore } from '../../types';
|
|
2
2
|
import type { ProductData } from '../../modules';
|
|
3
3
|
import type { OpenDataConfig } from '../../modules/OpenData';
|
|
4
4
|
import type { LoadScheduleAvailableDateParams, ScheduleItem } from '../../modules/Schedule/types';
|
|
5
|
-
import type { ProductListLoadProductsParams } from '../../modules/ProductList';
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
5
|
+
import type { ProductListLoadProductsParams, ProductListStoreQueryParams } from '../../modules/ProductList';
|
|
6
|
+
import type { AvailabilityDateRange, AvailabilityOccupancy, AvailabilityProduct, AvailabilityResource, GetProductTimeRangesRequest } from '../../modules/ResourcePlanner';
|
|
7
|
+
import type { AvailabilityContextRef, ContextualAvailabilityQuery, ContextualAvailabilityQueryResult, ContextualCommitAvailabilitySelectionParams, ContextualProductTimeRangeGroup, UnifiedBookingSalesAddRetailProductParams, UnifiedBookingSalesApplyPlannerDiscountsParams, UnifiedBookingSalesCommitAvailabilitySelectionResult, UnifiedBookingSalesDiscountResult, UnifiedBookingSalesLoadProductsByScheduleDateParams, UnifiedBookingSalesLoadOpenDataParams, UnifiedBookingSalesPrepareAvailabilityProjectionParams, UnifiedBookingSalesPolicyResponse, UnifiedBookingSalesResolveProductAllergyRequirementParams, UnifiedBookingSalesStageRetailProductsParams, UnifiedBookingSalesState } from './types';
|
|
8
8
|
import { BookingTicket } from '../BookingTicket';
|
|
9
|
+
import type { AllergyRequirement } from '../../model/strategy/adapter/itemRule';
|
|
9
10
|
export * from './types';
|
|
11
|
+
export { AvailabilityError } from '../../modules/ResourcePlanner';
|
|
10
12
|
/**
|
|
11
13
|
* Converts Rules/Order discount internals into a small UI-facing diagnostic. The result keeps
|
|
12
14
|
* candidate-card state separate from line-level applications: a selected card is not proof that
|
|
@@ -22,39 +24,37 @@ export declare function buildPlannerDiscountResult(params: {
|
|
|
22
24
|
preferredDiscountId?: number | string;
|
|
23
25
|
preferredDiscountFound?: boolean;
|
|
24
26
|
}): UnifiedBookingSalesDiscountResult;
|
|
25
|
-
/** Converts
|
|
26
|
-
export declare function
|
|
27
|
+
/** Converts ProductList and schedule records into the pure Availability vocabulary. */
|
|
28
|
+
export declare function normalizeProductForAvailability(product: ProductData | Record<string, any>, scheduleList?: ScheduleItem[], fixedOffsetMinutes?: number): AvailabilityProduct;
|
|
27
29
|
/**
|
|
28
30
|
* Materializes resource work windows locally from v2's schedule ids, then keeps its flat
|
|
29
|
-
* event_list as
|
|
31
|
+
* event_list as resource occupancy records. This deliberately avoids the older API's times -> event_list
|
|
30
32
|
* response nesting and lets one resource response serve any requested date range.
|
|
31
33
|
*/
|
|
32
|
-
export declare function
|
|
34
|
+
export declare function buildAvailabilityResourcesFromV2(params: {
|
|
33
35
|
rawResources: Record<string, any>[];
|
|
34
36
|
scheduleList: ScheduleItem[];
|
|
35
|
-
dateRange?:
|
|
37
|
+
dateRange?: AvailabilityDateRange;
|
|
38
|
+
fixedOffsetMinutes?: number;
|
|
36
39
|
}): {
|
|
37
|
-
resources:
|
|
38
|
-
|
|
40
|
+
resources: AvailabilityResource[];
|
|
41
|
+
resourceOccupancies: AvailabilityOccupancy[];
|
|
39
42
|
};
|
|
40
43
|
/** Combines URL-locked resources with every resource referenced by the selected products. */
|
|
41
|
-
export declare function
|
|
42
|
-
|
|
43
|
-
export declare function
|
|
44
|
-
assignment:
|
|
45
|
-
product:
|
|
44
|
+
export declare function collectAvailabilityResourceIds(products: AvailabilityProduct[], explicitResourceIds?: Array<number | string>): Array<number | string>;
|
|
45
|
+
export declare function buildAvailabilityLineIdentity(product: Record<string, any>): Record<string, any>;
|
|
46
|
+
export declare function buildBookingFromAvailabilityAssignment(params: {
|
|
47
|
+
assignment: Record<string, any>;
|
|
48
|
+
product: AvailabilityProduct;
|
|
49
|
+
timezone?: string;
|
|
50
|
+
fixedOffsetMinutes?: number;
|
|
46
51
|
}): Record<string, any>;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
export declare function buildBookingFromAssignments(params: {
|
|
53
|
-
assignments: ResourcePlannerAssignment[];
|
|
54
|
-
product: ResourcePlannerProduct;
|
|
52
|
+
export declare function buildBookingFromAvailabilityAssignments(params: {
|
|
53
|
+
assignments: Record<string, any>[];
|
|
54
|
+
product: AvailabilityProduct;
|
|
55
|
+
timezone?: string;
|
|
56
|
+
fixedOffsetMinutes?: number;
|
|
55
57
|
}): Record<string, any>;
|
|
56
|
-
/** Builds the exact identity BaseSales needs to remove only this solution's order lines. */
|
|
57
|
-
export declare function buildPlannerLineIdentity(product: Record<string, any>): Record<string, any>;
|
|
58
58
|
export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
59
59
|
protected defaultName: string;
|
|
60
60
|
protected defaultVersion: string;
|
|
@@ -63,7 +63,55 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
63
63
|
private openDataTarget;
|
|
64
64
|
private loadOpenDataInFlight;
|
|
65
65
|
private loadOpenDataInFlightTarget;
|
|
66
|
+
private availabilityRuntimeOffsetMinutes;
|
|
67
|
+
private availabilityScheduleCatalog;
|
|
68
|
+
private availabilityProjectionSequence;
|
|
69
|
+
private availabilityContextSequence;
|
|
70
|
+
private availabilityLifecycleGeneration;
|
|
71
|
+
private availabilityContextRegistry;
|
|
72
|
+
private availabilityProjectionPool;
|
|
73
|
+
private availabilityPrepareInFlight;
|
|
74
|
+
private availabilityProjectionRefreshInFlight;
|
|
75
|
+
private availabilityRemoteOccupancyCache;
|
|
76
|
+
private availabilityRemoteResourceQueryInFlight;
|
|
77
|
+
private availabilityRemoteResourceQuerySequence;
|
|
78
|
+
private availabilityRemoteResourceEpoch;
|
|
79
|
+
private availabilityCommitLocks;
|
|
80
|
+
private allergyItemRuleEvaluator;
|
|
81
|
+
private allergyItemRuleConfigs;
|
|
82
|
+
private allergyItemRuleConfigsPromise;
|
|
83
|
+
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
66
84
|
protected getSubmitOrderSalesChannel(): string;
|
|
85
|
+
private createAvailabilityFacadeError;
|
|
86
|
+
private getAvailabilityScopeDescriptor;
|
|
87
|
+
private normalizeAvailabilityIdList;
|
|
88
|
+
private normalizeAvailabilityStringList;
|
|
89
|
+
private normalizeAvailabilityPrepareDescriptor;
|
|
90
|
+
private resolveAvailabilityPrepareDefaults;
|
|
91
|
+
private buildAvailabilityPrepareKey;
|
|
92
|
+
private clearAvailabilityRemoteResourceState;
|
|
93
|
+
private buildAvailabilityRemoteResourceScopeKey;
|
|
94
|
+
private buildAvailabilityRemoteResourceQueryKey;
|
|
95
|
+
setOtherParams(params: Record<string, any>, { cover }?: {
|
|
96
|
+
cover?: boolean;
|
|
97
|
+
}): Promise<void>;
|
|
98
|
+
destroy(): Promise<void>;
|
|
99
|
+
private createAvailabilityContextId;
|
|
100
|
+
private buildAvailabilityProjectionKey;
|
|
101
|
+
private getAvailabilityRuntimeOffsetMinutes;
|
|
102
|
+
private getAvailabilityRuntimeDateTime;
|
|
103
|
+
private cloneAvailabilityPrepareParams;
|
|
104
|
+
private getAvailabilityDurationCandidateAnchorAt;
|
|
105
|
+
private createAvailabilityContextRef;
|
|
106
|
+
private emitAvailabilityDiagnostic;
|
|
107
|
+
private touchAvailabilityContext;
|
|
108
|
+
private touchAvailabilityProjection;
|
|
109
|
+
private removeAvailabilityProjection;
|
|
110
|
+
private removeAvailabilityContext;
|
|
111
|
+
private evictAvailabilityProjectionPool;
|
|
112
|
+
private evictAvailabilityContextRegistry;
|
|
113
|
+
private invalidateAvailabilityContextsAfterCommit;
|
|
114
|
+
private resetAvailabilityProjectionState;
|
|
67
115
|
protected isSessionStoragePersistEnabled(): boolean;
|
|
68
116
|
protected shouldUseSessionStorageForSubModule(moduleName?: string): boolean;
|
|
69
117
|
/**
|
|
@@ -103,6 +151,18 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
103
151
|
*/
|
|
104
152
|
loadOpenData(params: UnifiedBookingSalesLoadOpenDataParams): Promise<OpenDataConfig>;
|
|
105
153
|
getOpenData(): Promise<OpenDataConfig | null>;
|
|
154
|
+
private resetAllergyItemRuleState;
|
|
155
|
+
private fetchAllergyItemRuleConfigs;
|
|
156
|
+
private ensureAllergyItemRuleConfigsLoaded;
|
|
157
|
+
/**
|
|
158
|
+
* 评估当前渠道与商品是否命中 ALLERGY_CHECK。
|
|
159
|
+
* 只返回优先级最高 Action 中当前商品 Target 的 dataSource,不跨商品或 Action 合并。
|
|
160
|
+
*/
|
|
161
|
+
resolveProductAllergyRequirement(params: UnifiedBookingSalesResolveProductAllergyRequirementParams): Promise<AllergyRequirement | null>;
|
|
162
|
+
/**
|
|
163
|
+
* Load a resource policy without depending on the legacy appointmentBooking solution.
|
|
164
|
+
*/
|
|
165
|
+
getProtocol(policyId: string | number): Promise<UnifiedBookingSalesPolicyResponse>;
|
|
106
166
|
/**
|
|
107
167
|
* Loads the product catalog used by both UI and Planner. Schedule data is requested with each
|
|
108
168
|
* product because session products carry their fixed intervals there.
|
|
@@ -111,6 +171,7 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
111
171
|
callback?: (result: any) => void;
|
|
112
172
|
subscriberId?: string;
|
|
113
173
|
}): Promise<ProductData[]>;
|
|
174
|
+
queryProducts(params?: ProductListStoreQueryParams): Promise<ProductData[]>;
|
|
114
175
|
/** Date-first entry point. It delegates protocol details and cache ownership to ScheduleModule. */
|
|
115
176
|
loadScheduleAvailableDate(params: LoadScheduleAvailableDateParams): Promise<import("../../modules/Date/types").ITime[]>;
|
|
116
177
|
/**
|
|
@@ -133,17 +194,10 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
133
194
|
* diagnostic boundary for new booking skins: no pricing logic is duplicated in the planner.
|
|
134
195
|
*/
|
|
135
196
|
applyPlannerDiscounts(params?: UnifiedBookingSalesApplyPlannerDiscountsParams): Promise<UnifiedBookingSalesDiscountResult>;
|
|
136
|
-
/** ResourcePlanner is a required child module; fail early instead of producing partial availability. */
|
|
137
|
-
private getPlanner;
|
|
138
197
|
private buildUnifiedOrderProduct;
|
|
139
198
|
/** Replacing a staged selection is idempotent and never removes unrelated cart lines. */
|
|
140
199
|
private removeExistingStagedLines;
|
|
141
200
|
private stageProducts;
|
|
142
|
-
/**
|
|
143
|
-
* Adds the current product choice to an otherwise clean planner cart without creating bookings.
|
|
144
|
-
* This separates "what the customer wants" from the later time/resource confirmation step.
|
|
145
|
-
*/
|
|
146
|
-
stagePlannerProducts(params: UnifiedBookingSalesStagePlannerProductsParams): Promise<Record<string, any> | null>;
|
|
147
201
|
/**
|
|
148
202
|
* Adds ordinary retail products without asking ResourcePlanner for booking facts.
|
|
149
203
|
* Its staged lines have separate ownership so planner and retail skins can coexist safely.
|
|
@@ -155,50 +209,50 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
155
209
|
* "replace the staged selection" for demo and wizard-like callers.
|
|
156
210
|
*/
|
|
157
211
|
addRetailProduct(params: UnifiedBookingSalesAddRetailProductParams): Promise<Record<string, any>[]>;
|
|
158
|
-
|
|
159
|
-
private
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
*/
|
|
166
|
-
private ensurePlannerSchedulesForResources;
|
|
212
|
+
private normalizeAvailabilityDateRange;
|
|
213
|
+
private assertAvailabilityPrepareParams;
|
|
214
|
+
private captureAvailabilityScheduleCatalog;
|
|
215
|
+
/** Returns the solution-lifetime schedule snapshot captured after initialization. */
|
|
216
|
+
private getAvailabilityScheduleCatalog;
|
|
217
|
+
private buildAvailabilityOperatingHoursSnapshot;
|
|
218
|
+
private loadAvailabilityProducts;
|
|
167
219
|
/**
|
|
168
220
|
* Fetches resource metadata plus flat occupied events. Work windows are intentionally derived
|
|
169
|
-
* locally in
|
|
221
|
+
* locally in buildAvailabilityResourcesFromV2 from /schedule, rather than requested from the legacy
|
|
170
222
|
* resource dates endpoint.
|
|
171
223
|
*/
|
|
172
|
-
private
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
private
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
224
|
+
private fetchAvailabilityResourcesV2;
|
|
225
|
+
private fetchAndPublishAvailabilityResourcesV2;
|
|
226
|
+
private refreshAvailabilityRemoteResourceQuery;
|
|
227
|
+
private loadAvailabilityResources;
|
|
228
|
+
private resolveEditingOccupancyExclusions;
|
|
229
|
+
private occupancyIsExcluded;
|
|
230
|
+
private collectCartResourceOccupancies;
|
|
231
|
+
private getCurrentOrderRevision;
|
|
232
|
+
private getAvailabilityContextEntry;
|
|
233
|
+
private getAvailabilityProjectionByKey;
|
|
234
|
+
private getActiveAvailabilityProjectionEntry;
|
|
235
|
+
private decorateAvailabilityCandidate;
|
|
236
|
+
private assertAvailabilityCandidateFreshness;
|
|
237
|
+
private assertContextualQueryFreshness;
|
|
238
|
+
private storeAvailabilityProjectionEntry;
|
|
239
|
+
private buildAvailabilityProjectionSnapshot;
|
|
240
|
+
private getSharedPreparedAvailabilitySnapshot;
|
|
241
|
+
private refreshAvailabilityContextProjection;
|
|
242
|
+
private ensureAvailabilityContextProjection;
|
|
243
|
+
private tryAcquireAvailabilityCommitLock;
|
|
244
|
+
private releaseAvailabilityCommitLock;
|
|
245
|
+
/** IO boundary: loads catalog, schedules, resources, occupancies, and registers one context. */
|
|
246
|
+
prepareAvailabilityProjection(params: UnifiedBookingSalesPrepareAvailabilityProjectionParams): Promise<AvailabilityContextRef>;
|
|
247
|
+
/** Candidate calculation over the current context projection and runtime minute. */
|
|
248
|
+
getProductTimeRanges(contextId: string, request?: GetProductTimeRangesRequest): Promise<ContextualProductTimeRangeGroup[]>;
|
|
249
|
+
/** Thin facade: auto-refresh on cart drift, then delegate to the pure projection query. */
|
|
250
|
+
queryBookingAvailability(contextId: string, request: ContextualAvailabilityQuery): Promise<ContextualAvailabilityQueryResult>;
|
|
251
|
+
releaseAvailabilityContext(contextId: string): void;
|
|
252
|
+
private assertAvailabilityCommitWriteCAS;
|
|
253
|
+
private findProductLineByUid;
|
|
254
|
+
private findLinkedBooking;
|
|
255
|
+
/** Revalidates against the latest landed occupancy cache, then mutates exactly one product line. */
|
|
256
|
+
commitAvailabilitySelection(contextId: string, params: ContextualCommitAvailabilitySelectionParams): Promise<UnifiedBookingSalesCommitAvailabilitySelectionResult>;
|
|
203
257
|
}
|
|
204
258
|
export declare const UnifiedBookingSales: typeof UnifiedBookingSalesImpl;
|