@pisell/pisellos 0.10.81 → 0.10.82
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/modules/Product/index.d.ts +1 -1
- package/dist/modules/ProductList/index.js +5 -0
- package/dist/modules/ResourcePlanner/planner.js +2 -1
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.js +36 -31
- package/dist/solution/ScanOrder/index.d.ts +0 -1
- package/dist/solution/ScanOrder/index.js +62 -59
- package/dist/solution/ScanOrder/types.d.ts +2 -0
- package/dist/solution/ScanOrder/types.js +2 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +9 -1
- package/dist/solution/UnifiedBookingSales/index.js +1438 -1125
- package/dist/solution/UnifiedBookingSales/types.d.ts +4 -0
- package/dist/solution/VenueBooking/index.js +111 -104
- package/dist/solution/VenueBooking/types.d.ts +2 -0
- package/dist/solution/VenueBooking/types.js +3 -1
- package/dist/solution/VenueBooking/utils/smartPricing.d.ts +1 -0
- package/dist/solution/VenueBooking/utils/smartPricing.js +6 -1
- package/dist/utils/hostLogger.d.ts +10 -0
- package/dist/utils/hostLogger.js +20 -0
- package/lib/model/strategy/adapter/promotion/index.js +46 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/ProductList/index.js +5 -0
- package/lib/modules/ResourcePlanner/planner.js +2 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +5 -4
- package/lib/solution/ScanOrder/index.d.ts +0 -1
- package/lib/solution/ScanOrder/index.js +47 -41
- package/lib/solution/ScanOrder/types.d.ts +2 -0
- package/lib/solution/ScanOrder/types.js +1 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +9 -1
- package/lib/solution/UnifiedBookingSales/index.js +232 -24
- package/lib/solution/UnifiedBookingSales/types.d.ts +4 -0
- package/lib/solution/VenueBooking/index.js +38 -47
- package/lib/solution/VenueBooking/types.d.ts +2 -0
- package/lib/solution/VenueBooking/types.js +3 -1
- package/lib/solution/VenueBooking/utils/smartPricing.d.ts +1 -0
- package/lib/solution/VenueBooking/utils/smartPricing.js +6 -1
- package/lib/utils/hostLogger.d.ts +10 -0
- package/lib/utils/hostLogger.js +25 -0
- package/package.json +1 -1
|
@@ -1 +1,46 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BUY_X_GET_Y_FREE_STRATEGY", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _examples.BUY_X_GET_Y_FREE_STRATEGY;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ITEM_REWARD_STRATEGY", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _examples.ITEM_REWARD_STRATEGY;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "PromotionAdapter", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _adapter.PromotionAdapter;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "PromotionEvaluator", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _evaluator.PromotionEvaluator;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "X_ITEMS_FOR_Y_PRICE_STRATEGY", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _examples.X_ITEMS_FOR_Y_PRICE_STRATEGY;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "default", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _adapter.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
var _evaluator = require("./evaluator");
|
|
43
|
+
var _adapter = _interopRequireWildcard(require("./adapter"));
|
|
44
|
+
var _examples = require("./examples");
|
|
45
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
46
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "normal" | "
|
|
52
|
+
getProductType(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -278,9 +278,14 @@ class ProductList extends _BaseModule.BaseModule {
|
|
|
278
278
|
};
|
|
279
279
|
const channel = this.otherParams?.channel;
|
|
280
280
|
const response = await this.request.post('/product/query', {
|
|
281
|
+
// Bypass the endpoint cache when seeding this pool; subsequent reads still
|
|
282
|
+
// reuse the venue catalog session's single local snapshot.
|
|
283
|
+
force_ignore_cache_flag: 1,
|
|
281
284
|
// The customer endpoint otherwise filters out future/variant members.
|
|
282
285
|
open_quotation: 0,
|
|
283
286
|
open_bundle: 1,
|
|
287
|
+
// Preserve the same deposit source data used by the existing sales flow.
|
|
288
|
+
open_deposit: 1,
|
|
284
289
|
with: [..._clientDataVariants.PRODUCT_QUERY_DATA_VARIANT_RELATIONS],
|
|
285
290
|
with_count: ['bundleGroup', 'optionGroup'],
|
|
286
291
|
with_schedule: 1,
|
|
@@ -162,6 +162,7 @@ function resolveCutOffPolicyIssue(policy) {
|
|
|
162
162
|
return null;
|
|
163
163
|
}
|
|
164
164
|
function addLeadWindow(base, unit, unitType, _timezoneName) {
|
|
165
|
+
// Calendar-day lead times retain the current local hour, minute and second.
|
|
165
166
|
if (unitType === 'days') return (0, _localClock.addLocalCalendarDays)(base, unit);
|
|
166
167
|
if (unitType === 'hours') return (0, _localClock.addLocalHours)(base, unit);
|
|
167
168
|
return (0, _localClock.addLocalMinutes)(base, unit);
|
|
@@ -1654,7 +1655,7 @@ function assertRangesWithinProjection(projection, ranges) {
|
|
|
1654
1655
|
}
|
|
1655
1656
|
function queryAvailabilityProjection(projection, request, runtimeOptions = {}) {
|
|
1656
1657
|
const normalizedPartySize = normalizePartySize(request.partySize);
|
|
1657
|
-
const evaluatedAt = formatDateTime((0, _localClock.localDateToScalar)(new Date()), projection.meta.timezone, (0, _localClock.extractFixedOffsetMinutes)(projection.meta.now) ?? (0, _localClock.captureRuntimeOffsetMinutes)());
|
|
1658
|
+
const evaluatedAt = runtimeOptions.evaluatedAt || formatDateTime((0, _localClock.localDateToScalar)(new Date()), projection.meta.timezone, (0, _localClock.extractFixedOffsetMinutes)(projection.meta.now) ?? (0, _localClock.captureRuntimeOffsetMinutes)());
|
|
1658
1659
|
if (request.target === 'time') {
|
|
1659
1660
|
assertTimeCandidates(request);
|
|
1660
1661
|
assertRangesWithinProjection(projection, request.candidates);
|
|
@@ -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 | 2 | 1 |
|
|
329
|
+
weekNum: 0 | 2 | 1 | 3 | 5 | 6 | 4;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -360,7 +360,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
360
360
|
* 获取当前的客户搜索条件
|
|
361
361
|
* @returns 当前搜索条件
|
|
362
362
|
*/
|
|
363
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
363
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
|
|
364
364
|
/**
|
|
365
365
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
366
366
|
* @returns 客户状态
|
|
@@ -333,13 +333,14 @@ class BookingTicketImpl extends _BaseSales.BaseSalesImpl {
|
|
|
333
333
|
return String(this.getAppData('device_id') || 0).slice(-2);
|
|
334
334
|
}
|
|
335
335
|
async configureIdGeneratorFromOpenData() {
|
|
336
|
+
// Customer storefronts use server-issued order numbers, never local sequences.
|
|
337
|
+
if ((0, _platform.isCustomerUserPlatform)(this.otherParams?.platform)) return;
|
|
338
|
+
|
|
336
339
|
// 业务码切换或配置失败时不能复用上一次初始化的短号。
|
|
337
340
|
this.setPaymentNumberDevicePrefix(null);
|
|
338
341
|
const idGenerator = this.getIdGeneratorPlugin();
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
return;
|
|
342
|
-
}
|
|
342
|
+
// Optional host capability. Do not warn or cache absence: POS may register it later.
|
|
343
|
+
if (typeof idGenerator?.configure !== 'function') return;
|
|
343
344
|
let openDataConfig = null;
|
|
344
345
|
try {
|
|
345
346
|
openDataConfig = await this.loadOpenDataConfig();
|
|
@@ -56,7 +56,6 @@ export declare class ScanOrderImpl extends BaseSalesImpl implements Module {
|
|
|
56
56
|
private refreshOrderMarketingAfterLogin;
|
|
57
57
|
constructor(name?: string, version?: string);
|
|
58
58
|
protected getRegisteredModuleNames(): readonly string[];
|
|
59
|
-
protected createSubModule(moduleName: string): Module | null;
|
|
60
59
|
/** 与 `otherParams.cacheId` 一致,供宿主在 URL 变化时判断是否需要重新注册模块 */
|
|
61
60
|
getCacheId(): string | undefined;
|
|
62
61
|
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
@@ -25,7 +25,7 @@ var _types2 = require("../../modules/Account/types");
|
|
|
25
25
|
var _types3 = require("../RegisterAndLogin/types");
|
|
26
26
|
var _decimal = _interopRequireDefault(require("decimal.js"));
|
|
27
27
|
var _utils = require("./utils");
|
|
28
|
-
var
|
|
28
|
+
var _hostLogger = require("../../utils/hostLogger");
|
|
29
29
|
var _ProductList = require("../../modules/ProductList");
|
|
30
30
|
var _getDateIsInSchedule = require("../../modules/Schedule/getDateIsInSchedule");
|
|
31
31
|
var _utils2 = require("../../modules/Order/utils");
|
|
@@ -74,7 +74,11 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
74
74
|
return {
|
|
75
75
|
cacheId: this.cacheId,
|
|
76
76
|
solutionName: this.name,
|
|
77
|
-
moduleName: 'scanOrder'
|
|
77
|
+
moduleName: 'scanOrder',
|
|
78
|
+
host: this.window?.location?.host,
|
|
79
|
+
platform: this.otherParams?.platform,
|
|
80
|
+
channel: this.otherParams?.channel,
|
|
81
|
+
businessCode: this.otherParams?.businessCode
|
|
78
82
|
};
|
|
79
83
|
}
|
|
80
84
|
safeStringify(value) {
|
|
@@ -130,20 +134,19 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
130
134
|
const extra = {
|
|
131
135
|
...(params.extra || {})
|
|
132
136
|
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
extra
|
|
137
|
+
(0, _hostLogger.writeHostLog)(this.core, {
|
|
138
|
+
type: params.level || 'info',
|
|
139
|
+
title: params.title,
|
|
140
|
+
...(params.timestamp ? {
|
|
141
|
+
date: params.timestamp
|
|
142
|
+
} : {}),
|
|
143
|
+
metadata: {
|
|
144
|
+
module: 'scanOrder',
|
|
145
|
+
action: params.payload?.method || 'addLog',
|
|
146
|
+
payload,
|
|
147
|
+
extra,
|
|
148
|
+
context: this.getScanOrderLoggerContext()
|
|
149
|
+
}
|
|
147
150
|
});
|
|
148
151
|
}
|
|
149
152
|
logMethodStart(method, payload = {}) {
|
|
@@ -272,13 +275,7 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
272
275
|
super(name, version);
|
|
273
276
|
}
|
|
274
277
|
getRegisteredModuleNames() {
|
|
275
|
-
return ['
|
|
276
|
-
}
|
|
277
|
-
createSubModule(moduleName) {
|
|
278
|
-
if (moduleName === 'scanOrderLogger') {
|
|
279
|
-
return (0, _types4.createModule)('scanOrderLogger', this.name);
|
|
280
|
-
}
|
|
281
|
-
return super.createSubModule(moduleName);
|
|
278
|
+
return ['products', 'order', 'salesSummary', 'schedule'];
|
|
282
279
|
}
|
|
283
280
|
|
|
284
281
|
/** 与 `otherParams.cacheId` 一致,供宿主在 URL 变化时判断是否需要重新注册模块 */
|
|
@@ -286,6 +283,9 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
286
283
|
return this.cacheId;
|
|
287
284
|
}
|
|
288
285
|
async initialize(core, options = {}) {
|
|
286
|
+
this.core = core;
|
|
287
|
+
this.otherParams = options.otherParams || {};
|
|
288
|
+
this.cacheId = this.otherParams.cacheId;
|
|
289
289
|
this.logMethodStart('initialize');
|
|
290
290
|
this.store = {
|
|
291
291
|
...this.store,
|
|
@@ -294,8 +294,6 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
294
294
|
this.store.entryContext = options.otherParams?.entryContext || this.store.entryContext;
|
|
295
295
|
this.store.status = 'initializing';
|
|
296
296
|
this.store.error = null;
|
|
297
|
-
this.otherParams = options.otherParams || {};
|
|
298
|
-
this.cacheId = this.otherParams?.cacheId;
|
|
299
297
|
this.itemRuleRuntimeConfig = this.otherParams?.scanOrderItemRule || this.otherParams?.itemRule || {};
|
|
300
298
|
this.itemRuleConfigs = [];
|
|
301
299
|
this.itemRuleConfigsPromise = null;
|
|
@@ -306,16 +304,6 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
306
304
|
failures: []
|
|
307
305
|
};
|
|
308
306
|
await super.initialize(core, options);
|
|
309
|
-
if (this.store.scanOrderLogger) {
|
|
310
|
-
this.store.scanOrderLogger.setProvider(this.otherParams?.scanOrderLoggerProvider || 'feishu');
|
|
311
|
-
this.store.scanOrderLogger.setProviderConfig(this.otherParams?.scanOrderLoggerConfig || {
|
|
312
|
-
feishu: {
|
|
313
|
-
webhook: 'https://open.feishu.cn/open-apis/bot/v2/hook/216b3fe6-af98-424e-8706-f0471241a7ed',
|
|
314
|
-
errorHook: 'https://open.feishu.cn/open-apis/bot/v2/hook/015b7c2a-dd3c-4c30-9898-ef0f5253111f'
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
this.store.scanOrderLogger.setContext(this.getScanOrderLoggerContext());
|
|
318
|
-
}
|
|
319
307
|
this.registerCustomerLoginListeners();
|
|
320
308
|
try {
|
|
321
309
|
await this.store.order?.recalculateSummary({
|
|
@@ -327,7 +315,14 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
327
315
|
try {
|
|
328
316
|
await this.store.schedule.loadAllSchedule();
|
|
329
317
|
} catch (scheduleError) {
|
|
330
|
-
|
|
318
|
+
void this.addScanOrderLog({
|
|
319
|
+
level: 'warning',
|
|
320
|
+
title: '[ScanOrder] loadAllSchedule failed; operating_hours check skipped',
|
|
321
|
+
payload: {
|
|
322
|
+
method: 'loadAllSchedule',
|
|
323
|
+
error: this.serializeError(scheduleError)
|
|
324
|
+
}
|
|
325
|
+
});
|
|
331
326
|
}
|
|
332
327
|
}
|
|
333
328
|
await this.refreshItemRuleQuantityLimits();
|
|
@@ -341,7 +336,6 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
341
336
|
} catch (error) {
|
|
342
337
|
this.store.status = 'error';
|
|
343
338
|
this.store.error = error instanceof Error ? error.message : '初始化失败';
|
|
344
|
-
console.error('[ScanOrder] 初始化失败', error);
|
|
345
339
|
this.logMethodError('initialize', error, {
|
|
346
340
|
status: this.store.status
|
|
347
341
|
});
|
|
@@ -358,7 +352,6 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
358
352
|
async retryInit() {
|
|
359
353
|
this.logMethodStart('retryInit');
|
|
360
354
|
// TODO: 细化重试策略(指数退避、最大重试次数)后替换当前实现
|
|
361
|
-
|
|
362
355
|
await this.core.effects.emit(_types.ScanOrderHooks.onRetryInit, {});
|
|
363
356
|
try {
|
|
364
357
|
await this.initialize(this.core, this.initializeOptions);
|
|
@@ -371,7 +364,6 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
371
364
|
async refresh() {
|
|
372
365
|
this.logMethodStart('refresh');
|
|
373
366
|
// TODO: 接入真实刷新逻辑(资源重拉取、流程重建)后替换当前实现
|
|
374
|
-
|
|
375
367
|
try {
|
|
376
368
|
this.store.status = 'initializing';
|
|
377
369
|
await this.loadRuntimeConfigs();
|
|
@@ -1945,7 +1937,14 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
1945
1937
|
try {
|
|
1946
1938
|
this.window.localStorage.setItem(key, JSON.stringify(bucket));
|
|
1947
1939
|
} catch (error) {
|
|
1948
|
-
|
|
1940
|
+
void this.addScanOrderLog({
|
|
1941
|
+
level: 'warning',
|
|
1942
|
+
title: '[ScanOrder] writeUIStateBucket failed',
|
|
1943
|
+
payload: {
|
|
1944
|
+
method: 'writeUIStateBucket',
|
|
1945
|
+
error: this.serializeError(error)
|
|
1946
|
+
}
|
|
1947
|
+
});
|
|
1949
1948
|
}
|
|
1950
1949
|
}
|
|
1951
1950
|
setUIState(key, value) {
|
|
@@ -1975,7 +1974,14 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
1975
1974
|
try {
|
|
1976
1975
|
this.window.localStorage.removeItem(key);
|
|
1977
1976
|
} catch (error) {
|
|
1978
|
-
|
|
1977
|
+
void this.addScanOrderLog({
|
|
1978
|
+
level: 'warning',
|
|
1979
|
+
title: '[ScanOrder] clearUIState failed',
|
|
1980
|
+
payload: {
|
|
1981
|
+
method: 'clearUIState',
|
|
1982
|
+
error: this.serializeError(error)
|
|
1983
|
+
}
|
|
1984
|
+
});
|
|
1979
1985
|
}
|
|
1980
1986
|
}
|
|
1981
1987
|
async setEntryPaxNumber(number) {
|
|
@@ -308,6 +308,7 @@ export interface ScanOrderState {
|
|
|
308
308
|
products?: ProductList;
|
|
309
309
|
order?: OrderModule;
|
|
310
310
|
salesSummary?: SalesSummaryModule;
|
|
311
|
+
/** @deprecated Retained for compatibility; solution logs use app.getApp().logger. */
|
|
311
312
|
scanOrderLogger?: ScanOrderLoggerModule;
|
|
312
313
|
schedule?: ScheduleModule;
|
|
313
314
|
itemRuleQuantityLimits: QuantityLimitResult[];
|
|
@@ -317,6 +318,7 @@ export interface ScanOrderState {
|
|
|
317
318
|
};
|
|
318
319
|
entryPaxNumber: number | null;
|
|
319
320
|
}
|
|
321
|
+
/** @deprecated Configure the host app logger; ScanOrder no longer selects a provider. */
|
|
320
322
|
export interface ScanOrderLoggerRuntimeConfig {
|
|
321
323
|
provider?: ScanOrderLoggerProviderType;
|
|
322
324
|
providerConfig?: ScanOrderLoggerProviderConfig;
|
|
@@ -32,4 +32,5 @@ let ScanOrderHooks = exports.ScanOrderHooks = /*#__PURE__*/function (ScanOrderHo
|
|
|
32
32
|
*/
|
|
33
33
|
/** `resource_capacity[i].capacity_list[j]` */
|
|
34
34
|
/** `/order/resource/occupy-detail` 单条 `occupy_details[i]` */
|
|
35
|
+
/** @deprecated Configure the host app logger; ScanOrder no longer selects a provider. */
|
|
35
36
|
/** ScanOrder.scanCode 对外的轻量结果(不含 discountList,UI 在 resolve 后调 getDiscountList) */
|
|
@@ -97,6 +97,7 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
97
97
|
private allergyItemRuleConfigs;
|
|
98
98
|
private allergyItemRuleConfigsPromise;
|
|
99
99
|
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
100
|
+
private initializeUnifiedSalesRuntime;
|
|
100
101
|
protected getSubmitOrderSalesChannel(): string;
|
|
101
102
|
/** Only the explicit Kiosk Sales consumer entry enables this policy; POS stays unchanged. */
|
|
102
103
|
protected isBusinessAvailabilityEnabled(): boolean;
|
|
@@ -127,6 +128,9 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
127
128
|
private cloneAvailabilityPrepareParams;
|
|
128
129
|
private getAvailabilityDurationCandidateAnchorAt;
|
|
129
130
|
private createAvailabilityContextRef;
|
|
131
|
+
private getSolutionLogContext;
|
|
132
|
+
private writeSolutionLog;
|
|
133
|
+
private logSolutionFailure;
|
|
130
134
|
private emitAvailabilityDiagnostic;
|
|
131
135
|
private touchAvailabilityContext;
|
|
132
136
|
private touchAvailabilityProjection;
|
|
@@ -329,11 +333,14 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
329
333
|
private buildAvailabilityProjectionSnapshot;
|
|
330
334
|
private getSharedPreparedAvailabilitySnapshot;
|
|
331
335
|
private refreshAvailabilityContextProjection;
|
|
336
|
+
/** Read an existing customer selection without refreshing its clock or occupancy snapshot. */
|
|
337
|
+
private getCustomerSelectionProjection;
|
|
332
338
|
private ensureAvailabilityContextProjection;
|
|
333
339
|
private tryAcquireAvailabilityCommitLock;
|
|
334
340
|
private releaseAvailabilityCommitLock;
|
|
335
341
|
/** IO boundary: loads catalog, schedules, resources, occupancies, and registers one context. */
|
|
336
342
|
prepareAvailabilityProjection(params: UnifiedBookingSalesPrepareAvailabilityProjectionParams): Promise<AvailabilityContextRef>;
|
|
343
|
+
private prepareAvailabilityContext;
|
|
337
344
|
/** Candidate calculation over the current context projection and runtime minute. */
|
|
338
345
|
getProductTimeRanges(contextId: string, request?: GetProductTimeRangesRequest): Promise<ContextualProductTimeRangeGroup[]>;
|
|
339
346
|
/** Thin facade: auto-refresh on cart drift, then delegate to the pure projection query. */
|
|
@@ -344,7 +351,8 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
344
351
|
private assertAvailabilityCommitWriteCAS;
|
|
345
352
|
private findProductLineByUid;
|
|
346
353
|
private findLinkedBooking;
|
|
347
|
-
/**
|
|
354
|
+
/** Customer snapshot writes defer availability to checkout; other callers retain cache revalidation. */
|
|
348
355
|
commitAvailabilitySelection(contextId: string, params: ContextualCommitAvailabilitySelectionParams): Promise<UnifiedBookingSalesCommitAvailabilitySelectionResult>;
|
|
356
|
+
private commitAvailabilitySelectionWithLock;
|
|
349
357
|
}
|
|
350
358
|
export declare const UnifiedBookingSales: typeof UnifiedBookingSalesImpl;
|