@pisell/pisellos 0.10.81 → 0.10.83
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/model/strategy/adapter/promotion/index.js +0 -9
- 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 +2 -2
- package/dist/solution/BookingTicket/index.d.ts +1 -13
- 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 +12 -1
- package/dist/solution/UnifiedBookingSales/index.js +1471 -1143
- package/dist/solution/UnifiedBookingSales/types.d.ts +6 -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 +2 -2
- package/lib/solution/BookingTicket/index.d.ts +1 -13
- 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 +12 -1
- package/lib/solution/UnifiedBookingSales/index.js +249 -29
- package/lib/solution/UnifiedBookingSales/types.d.ts +6 -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(): "
|
|
52
|
+
getProductType(): "duration" | "session" | "normal";
|
|
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 | 4 | 5 | 6;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -373,7 +373,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
373
373
|
};
|
|
374
374
|
setOtherData(key: string, value: any): void;
|
|
375
375
|
getOtherData(key: string): any;
|
|
376
|
-
getProductTypeById(id: number): Promise<"
|
|
376
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
377
377
|
/**
|
|
378
378
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
379
379
|
*
|
|
@@ -479,19 +479,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
479
479
|
* 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
|
|
480
480
|
* 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
|
|
481
481
|
*/
|
|
482
|
-
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>):
|
|
483
|
-
action: "reloadCatalog";
|
|
484
|
-
} | {
|
|
485
|
-
action: "add";
|
|
486
|
-
cacheItem: any;
|
|
487
|
-
} | {
|
|
488
|
-
action: "requiresDetail";
|
|
489
|
-
payload: AddProductRequiresDetailPayload;
|
|
490
|
-
} | {
|
|
491
|
-
action: "requiresBookingEdit";
|
|
492
|
-
cacheItem: any;
|
|
493
|
-
payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
|
|
494
|
-
};
|
|
482
|
+
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
495
483
|
/** 规格弹窗 callback 后的第二段决策。 */
|
|
496
484
|
decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
497
485
|
/**
|
|
@@ -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;
|
|
@@ -108,6 +109,9 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
108
109
|
protected getSubModuleHooks(moduleName: string): any;
|
|
109
110
|
private createAvailabilityFacadeError;
|
|
110
111
|
private getAvailabilityScopeDescriptor;
|
|
112
|
+
/** Kiosk keeps its device/channel semantics; only explicit Venue templates opt in. */
|
|
113
|
+
private isVenueKioskPlatform;
|
|
114
|
+
private supportsVenueSelectionSnapshot;
|
|
111
115
|
private normalizeAvailabilityIdList;
|
|
112
116
|
private normalizeAvailabilityStringList;
|
|
113
117
|
private normalizeAvailabilityPrepareDescriptor;
|
|
@@ -127,6 +131,9 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
127
131
|
private cloneAvailabilityPrepareParams;
|
|
128
132
|
private getAvailabilityDurationCandidateAnchorAt;
|
|
129
133
|
private createAvailabilityContextRef;
|
|
134
|
+
private getSolutionLogContext;
|
|
135
|
+
private writeSolutionLog;
|
|
136
|
+
private logSolutionFailure;
|
|
130
137
|
private emitAvailabilityDiagnostic;
|
|
131
138
|
private touchAvailabilityContext;
|
|
132
139
|
private touchAvailabilityProjection;
|
|
@@ -329,11 +336,14 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
329
336
|
private buildAvailabilityProjectionSnapshot;
|
|
330
337
|
private getSharedPreparedAvailabilitySnapshot;
|
|
331
338
|
private refreshAvailabilityContextProjection;
|
|
339
|
+
/** Read an existing customer selection without refreshing its clock or occupancy snapshot. */
|
|
340
|
+
private getCustomerSelectionProjection;
|
|
332
341
|
private ensureAvailabilityContextProjection;
|
|
333
342
|
private tryAcquireAvailabilityCommitLock;
|
|
334
343
|
private releaseAvailabilityCommitLock;
|
|
335
344
|
/** IO boundary: loads catalog, schedules, resources, occupancies, and registers one context. */
|
|
336
345
|
prepareAvailabilityProjection(params: UnifiedBookingSalesPrepareAvailabilityProjectionParams): Promise<AvailabilityContextRef>;
|
|
346
|
+
private prepareAvailabilityContext;
|
|
337
347
|
/** Candidate calculation over the current context projection and runtime minute. */
|
|
338
348
|
getProductTimeRanges(contextId: string, request?: GetProductTimeRangesRequest): Promise<ContextualProductTimeRangeGroup[]>;
|
|
339
349
|
/** Thin facade: auto-refresh on cart drift, then delegate to the pure projection query. */
|
|
@@ -344,7 +354,8 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
344
354
|
private assertAvailabilityCommitWriteCAS;
|
|
345
355
|
private findProductLineByUid;
|
|
346
356
|
private findLinkedBooking;
|
|
347
|
-
/**
|
|
357
|
+
/** Customer snapshot writes defer availability to checkout; other callers retain cache revalidation. */
|
|
348
358
|
commitAvailabilitySelection(contextId: string, params: ContextualCommitAvailabilitySelectionParams): Promise<UnifiedBookingSalesCommitAvailabilitySelectionResult>;
|
|
359
|
+
private commitAvailabilitySelectionWithLock;
|
|
349
360
|
}
|
|
350
361
|
export declare const UnifiedBookingSales: typeof UnifiedBookingSalesImpl;
|