@pisell/pisellos 0.10.82 → 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.
@@ -1,9 +0,0 @@
1
- // 导出评估器
2
- export { PromotionEvaluator } from "./evaluator";
3
-
4
- // 导出适配器
5
- export { PromotionAdapter } from "./adapter";
6
- export { default } from "./adapter";
7
-
8
- // 导出策略配置示例常量
9
- export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, ITEM_REWARD_STRATEGY } from "./examples";
@@ -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" | "duration" | "session";
52
+ getProductType(): "duration" | "session" | "normal";
53
53
  }
@@ -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 | 3 | 5 | 6 | 4;
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<"normal" | "duration" | "session">;
376
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
377
377
  /**
378
378
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
379
379
  *
@@ -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, "skip" | "num">;
363
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
364
364
  /**
365
365
  * 获取客户列表状态(包含滚动加载相关状态)
366
366
  * @returns 客户状态
@@ -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
  /**
@@ -109,6 +109,9 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
109
109
  protected getSubModuleHooks(moduleName: string): any;
110
110
  private createAvailabilityFacadeError;
111
111
  private getAvailabilityScopeDescriptor;
112
+ /** Kiosk keeps its device/channel semantics; only explicit Venue templates opt in. */
113
+ private isVenueKioskPlatform;
114
+ private supportsVenueSelectionSnapshot;
112
115
  private normalizeAvailabilityIdList;
113
116
  private normalizeAvailabilityStringList;
114
117
  private normalizeAvailabilityPrepareDescriptor;
@@ -1595,13 +1595,29 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1595
1595
  value: function getAvailabilityScopeDescriptor() {
1596
1596
  var _ref23, _otherParams$business, _otherParams$channel, _otherParams$platform, _otherParams$business2;
1597
1597
  var otherParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.otherParams || {};
1598
- return {
1598
+ return _objectSpread({
1599
1599
  cacheId: this.cacheId || '',
1600
1600
  businessCode: String((_ref23 = (_otherParams$business = otherParams.businessCode) !== null && _otherParams$business !== void 0 ? _otherParams$business : otherParams.business_code) !== null && _ref23 !== void 0 ? _ref23 : ''),
1601
1601
  channel: String((_otherParams$channel = otherParams.channel) !== null && _otherParams$channel !== void 0 ? _otherParams$channel : ''),
1602
1602
  platform: String((_otherParams$platform = otherParams.platform) !== null && _otherParams$platform !== void 0 ? _otherParams$platform : ''),
1603
1603
  businessTimezone: String((_otherParams$business2 = otherParams.businessTimezone) !== null && _otherParams$business2 !== void 0 ? _otherParams$business2 : '')
1604
- };
1604
+ }, this.isVenueKioskPlatform(otherParams) ? {
1605
+ venueBookingMode: otherParams.venueBookingMode
1606
+ } : {});
1607
+ }
1608
+
1609
+ /** Kiosk keeps its device/channel semantics; only explicit Venue templates opt in. */
1610
+ }, {
1611
+ key: "isVenueKioskPlatform",
1612
+ value: function isVenueKioskPlatform() {
1613
+ var otherParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.otherParams || {};
1614
+ return normalizeRuntimePlatform(otherParams.platform) === 'kiosk' && (otherParams.venueBookingMode === 'tickets' || otherParams.venueBookingMode === 'party');
1615
+ }
1616
+ }, {
1617
+ key: "supportsVenueSelectionSnapshot",
1618
+ value: function supportsVenueSelectionSnapshot() {
1619
+ var _this$otherParams4;
1620
+ return isCustomerUserPlatform((_this$otherParams4 = this.otherParams) === null || _this$otherParams4 === void 0 ? void 0 : _this$otherParams4.platform) || this.isVenueKioskPlatform();
1605
1621
  }
1606
1622
  }, {
1607
1623
  key: "normalizeAvailabilityIdList",
@@ -1634,9 +1650,9 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1634
1650
  }, {
1635
1651
  key: "normalizeAvailabilityPrepareDescriptor",
1636
1652
  value: function normalizeAvailabilityPrepareDescriptor(params) {
1637
- var _this$otherParams4;
1653
+ var _this$otherParams5;
1638
1654
  this.assertAvailabilityPrepareParams(params);
1639
- var timezone = String(params.timezone || ((_this$otherParams4 = this.otherParams) === null || _this$otherParams4 === void 0 ? void 0 : _this$otherParams4.businessTimezone) || Intl.DateTimeFormat().resolvedOptions().timeZone || 'Asia/Shanghai');
1655
+ var timezone = String(params.timezone || ((_this$otherParams5 = this.otherParams) === null || _this$otherParams5 === void 0 ? void 0 : _this$otherParams5.businessTimezone) || Intl.DateTimeFormat().resolvedOptions().timeZone || 'Asia/Shanghai');
1640
1656
  assertValidAvailabilityTimezone(timezone);
1641
1657
  var dateRange = this.normalizeAvailabilityDateRange(params, timezone);
1642
1658
  var slotStepMinutes = params.slotStepMinutes || DEFAULT_AVAILABILITY_SLOT_STEP_MINUTES;
@@ -1666,7 +1682,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1666
1682
  key: "resolveAvailabilityPrepareDefaults",
1667
1683
  value: function () {
1668
1684
  var _resolveAvailabilityPrepareDefaults = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
1669
- var _ref30, _this$otherParams$bus, _this$otherParams5, _this$otherParams6, _this$otherParams$cha2, _this$otherParams7, _this$otherParams8, _openData2, _openData3, _openData4;
1685
+ var _ref30, _this$otherParams$bus, _this$otherParams6, _this$otherParams7, _this$otherParams$cha2, _this$otherParams8, _this$otherParams9, _openData2, _openData3, _openData4;
1670
1686
  var needsOperatingHours, needsTimeSlice, businessCode, channel, currentTarget, openData, logContext, operatingScheduleIds, configuredTimeSlice;
1671
1687
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1672
1688
  while (1) switch (_context3.prev = _context3.next) {
@@ -1684,10 +1700,10 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1684
1700
  }
1685
1701
  }));
1686
1702
  case 4:
1687
- businessCode = String((_ref30 = (_this$otherParams$bus = (_this$otherParams5 = this.otherParams) === null || _this$otherParams5 === void 0 ? void 0 : _this$otherParams5.businessCode) !== null && _this$otherParams$bus !== void 0 ? _this$otherParams$bus : (_this$otherParams6 = this.otherParams) === null || _this$otherParams6 === void 0 ? void 0 : _this$otherParams6.business_code) !== null && _ref30 !== void 0 ? _ref30 : '').trim();
1688
- channel = String((_this$otherParams$cha2 = (_this$otherParams7 = this.otherParams) === null || _this$otherParams7 === void 0 ? void 0 : _this$otherParams7.channel) !== null && _this$otherParams$cha2 !== void 0 ? _this$otherParams$cha2 : '').trim();
1703
+ businessCode = String((_ref30 = (_this$otherParams$bus = (_this$otherParams6 = this.otherParams) === null || _this$otherParams6 === void 0 ? void 0 : _this$otherParams6.businessCode) !== null && _this$otherParams$bus !== void 0 ? _this$otherParams$bus : (_this$otherParams7 = this.otherParams) === null || _this$otherParams7 === void 0 ? void 0 : _this$otherParams7.business_code) !== null && _ref30 !== void 0 ? _ref30 : '').trim();
1704
+ channel = String((_this$otherParams$cha2 = (_this$otherParams8 = this.otherParams) === null || _this$otherParams8 === void 0 ? void 0 : _this$otherParams8.channel) !== null && _this$otherParams$cha2 !== void 0 ? _this$otherParams$cha2 : '').trim();
1689
1705
  currentTarget = businessCode && channel ? "".concat(businessCode, "+").concat(channel) : null;
1690
- openData = (!currentTarget || this.openDataTarget === currentTarget) && (this.runtimeOpenDataScope === null || this.runtimeOpenDataScope === this.getRuntimeOpenDataScope()) ? (_this$otherParams8 = this.otherParams) === null || _this$otherParams8 === void 0 ? void 0 : _this$otherParams8.openData : null;
1706
+ openData = (!currentTarget || this.openDataTarget === currentTarget) && (this.runtimeOpenDataScope === null || this.runtimeOpenDataScope === this.getRuntimeOpenDataScope()) ? (_this$otherParams9 = this.otherParams) === null || _this$otherParams9 === void 0 ? void 0 : _this$otherParams9.openData : null;
1691
1707
  if (!(!openData && this.store.openData)) {
1692
1708
  _context3.next = 21;
1693
1709
  break;
@@ -1781,7 +1797,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1781
1797
  key: "setOtherParams",
1782
1798
  value: function () {
1783
1799
  var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
1784
- var _this$otherParams9, _this$otherParams10, _this$otherParams11, _this$otherParams12, _this$otherParams14;
1800
+ var _this$otherParams10, _this$otherParams11, _this$otherParams12, _this$otherParams13, _this$otherParams15;
1785
1801
  var _ref31,
1786
1802
  _ref31$cover,
1787
1803
  cover,
@@ -1791,7 +1807,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1791
1807
  explicitlySetsOpenData,
1792
1808
  nextParams,
1793
1809
  nextScope,
1794
- _this$otherParams13,
1810
+ _this$otherParams14,
1795
1811
  shouldResetAvailabilityState,
1796
1812
  _args4 = arguments;
1797
1813
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
@@ -1799,8 +1815,8 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1799
1815
  case 0:
1800
1816
  _ref31 = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {}, _ref31$cover = _ref31.cover, cover = _ref31$cover === void 0 ? false : _ref31$cover;
1801
1817
  previousScope = this.getAvailabilityScopeDescriptor(this.otherParams || {});
1802
- previousCatalogScope = (_this$otherParams9 = this.otherParams) === null || _this$otherParams9 === void 0 ? void 0 : _this$otherParams9.catalogScopeKey;
1803
- previousItemRuleConfig = (_this$otherParams10 = this.otherParams) === null || _this$otherParams10 === void 0 ? void 0 : _this$otherParams10.itemRule;
1818
+ previousCatalogScope = (_this$otherParams10 = this.otherParams) === null || _this$otherParams10 === void 0 ? void 0 : _this$otherParams10.catalogScopeKey;
1819
+ previousItemRuleConfig = (_this$otherParams11 = this.otherParams) === null || _this$otherParams11 === void 0 ? void 0 : _this$otherParams11.itemRule;
1804
1820
  explicitlySetsOpenData = Object.prototype.hasOwnProperty.call(params, 'openData');
1805
1821
  nextParams = cover ? params : _objectSpread(_objectSpread({}, this.otherParams), params);
1806
1822
  if (explicitlySetsOpenData || this.getRuntimeOpenDataScope() !== this.getRuntimeOpenDataScope(nextParams)) {
@@ -1811,7 +1827,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1811
1827
  cover: cover
1812
1828
  });
1813
1829
  case 9:
1814
- if (!(previousCatalogScope !== ((_this$otherParams11 = this.otherParams) === null || _this$otherParams11 === void 0 ? void 0 : _this$otherParams11.catalogScopeKey) && (previousCatalogScope || (_this$otherParams12 = this.otherParams) !== null && _this$otherParams12 !== void 0 && _this$otherParams12.catalogScopeKey))) {
1830
+ if (!(previousCatalogScope !== ((_this$otherParams12 = this.otherParams) === null || _this$otherParams12 === void 0 ? void 0 : _this$otherParams12.catalogScopeKey) && (previousCatalogScope || (_this$otherParams13 = this.otherParams) !== null && _this$otherParams13 !== void 0 && _this$otherParams13.catalogScopeKey))) {
1815
1831
  _context4.next = 13;
1816
1832
  break;
1817
1833
  }
@@ -1821,9 +1837,9 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1821
1837
  case 13:
1822
1838
  nextScope = this.getAvailabilityScopeDescriptor(this.otherParams || {});
1823
1839
  if (explicitlySetsOpenData) {
1824
- this.openDataTarget = (_this$otherParams13 = this.otherParams) !== null && _this$otherParams13 !== void 0 && _this$otherParams13.openData && nextScope.businessCode && nextScope.channel ? "".concat(nextScope.businessCode, "+").concat(nextScope.channel) : null;
1840
+ this.openDataTarget = (_this$otherParams14 = this.otherParams) !== null && _this$otherParams14 !== void 0 && _this$otherParams14.openData && nextScope.businessCode && nextScope.channel ? "".concat(nextScope.businessCode, "+").concat(nextScope.channel) : null;
1825
1841
  }
1826
- shouldResetAvailabilityState = previousScope.cacheId !== nextScope.cacheId || previousScope.businessCode !== nextScope.businessCode || previousScope.channel !== nextScope.channel || previousScope.platform !== nextScope.platform || previousScope.businessTimezone !== nextScope.businessTimezone;
1842
+ shouldResetAvailabilityState = previousScope.cacheId !== nextScope.cacheId || previousScope.businessCode !== nextScope.businessCode || previousScope.channel !== nextScope.channel || previousScope.platform !== nextScope.platform || previousScope.businessTimezone !== nextScope.businessTimezone || previousScope.venueBookingMode !== nextScope.venueBookingMode;
1827
1843
  if (!shouldResetAvailabilityState) {
1828
1844
  _context4.next = 19;
1829
1845
  break;
@@ -1831,7 +1847,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1831
1847
  _context4.next = 19;
1832
1848
  return this.resetAvailabilityProjectionState('set_other_params_reset');
1833
1849
  case 19:
1834
- if (shouldResetAvailabilityState || explicitlySetsOpenData || previousItemRuleConfig !== ((_this$otherParams14 = this.otherParams) === null || _this$otherParams14 === void 0 ? void 0 : _this$otherParams14.itemRule)) {
1850
+ if (shouldResetAvailabilityState || explicitlySetsOpenData || previousItemRuleConfig !== ((_this$otherParams15 = this.otherParams) === null || _this$otherParams15 === void 0 ? void 0 : _this$otherParams15.itemRule)) {
1835
1851
  this.resetAllergyItemRuleState();
1836
1852
  }
1837
1853
  case 20:
@@ -1940,15 +1956,15 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
1940
1956
  value: function getSolutionLogContext() {
1941
1957
  var context = {};
1942
1958
  try {
1943
- var _this$otherParams$bus2, _this$otherParams15, _this$otherParams16, _this$otherParams17, _this$otherParams18;
1959
+ var _this$otherParams$bus2, _this$otherParams16, _this$otherParams17, _this$otherParams18, _this$otherParams19;
1944
1960
  Object.assign(context, {
1945
1961
  solutionName: this.name,
1946
1962
  moduleName: this.defaultName,
1947
1963
  module: 'unifiedBookingSales',
1948
1964
  cacheId: this.cacheId,
1949
- businessCode: (_this$otherParams$bus2 = (_this$otherParams15 = this.otherParams) === null || _this$otherParams15 === void 0 ? void 0 : _this$otherParams15.businessCode) !== null && _this$otherParams$bus2 !== void 0 ? _this$otherParams$bus2 : (_this$otherParams16 = this.otherParams) === null || _this$otherParams16 === void 0 ? void 0 : _this$otherParams16.business_code,
1950
- platform: (_this$otherParams17 = this.otherParams) === null || _this$otherParams17 === void 0 ? void 0 : _this$otherParams17.platform,
1951
- channel: (_this$otherParams18 = this.otherParams) === null || _this$otherParams18 === void 0 ? void 0 : _this$otherParams18.channel
1965
+ businessCode: (_this$otherParams$bus2 = (_this$otherParams16 = this.otherParams) === null || _this$otherParams16 === void 0 ? void 0 : _this$otherParams16.businessCode) !== null && _this$otherParams$bus2 !== void 0 ? _this$otherParams$bus2 : (_this$otherParams17 = this.otherParams) === null || _this$otherParams17 === void 0 ? void 0 : _this$otherParams17.business_code,
1966
+ platform: (_this$otherParams18 = this.otherParams) === null || _this$otherParams18 === void 0 ? void 0 : _this$otherParams18.platform,
1967
+ channel: (_this$otherParams19 = this.otherParams) === null || _this$otherParams19 === void 0 ? void 0 : _this$otherParams19.channel
1952
1968
  });
1953
1969
  try {
1954
1970
  var order = this.getTempOrder();
@@ -2153,8 +2169,8 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
2153
2169
  }, {
2154
2170
  key: "isSessionStoragePersistEnabled",
2155
2171
  value: function isSessionStoragePersistEnabled() {
2156
- var _this$otherParams19;
2157
- return Boolean(this.cacheId && ((_this$otherParams19 = this.otherParams) === null || _this$otherParams19 === void 0 ? void 0 : _this$otherParams19.enableSessionStoragePersist) === true);
2172
+ var _this$otherParams20;
2173
+ return Boolean(this.cacheId && ((_this$otherParams20 = this.otherParams) === null || _this$otherParams20 === void 0 ? void 0 : _this$otherParams20.enableSessionStoragePersist) === true);
2158
2174
  }
2159
2175
  }, {
2160
2176
  key: "shouldUseSessionStorageForSubModule",
@@ -2223,10 +2239,10 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
2223
2239
  }, {
2224
2240
  key: "shouldUseCheckoutSyncTask",
2225
2241
  value: function shouldUseCheckoutSyncTask() {
2226
- var _this$otherParams20, _this$otherParams21;
2227
- var configured = (_this$otherParams20 = this.otherParams) === null || _this$otherParams20 === void 0 ? void 0 : _this$otherParams20.checkoutSyncTaskEnabled;
2242
+ var _this$otherParams21, _this$otherParams22;
2243
+ var configured = (_this$otherParams21 = this.otherParams) === null || _this$otherParams21 === void 0 ? void 0 : _this$otherParams21.checkoutSyncTaskEnabled;
2228
2244
  if (configured === true) return true;
2229
- var platform = normalizeRuntimePlatform((_this$otherParams21 = this.otherParams) === null || _this$otherParams21 === void 0 ? void 0 : _this$otherParams21.platform);
2245
+ var platform = normalizeRuntimePlatform((_this$otherParams22 = this.otherParams) === null || _this$otherParams22 === void 0 ? void 0 : _this$otherParams22.platform);
2230
2246
  return !isCustomerUserPlatform(platform) && !isSelfServicePlatform(platform);
2231
2247
  }
2232
2248
 
@@ -2382,8 +2398,8 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
2382
2398
  }, {
2383
2399
  key: "isAuthenticatedCustomerUserPlatform",
2384
2400
  value: function isAuthenticatedCustomerUserPlatform() {
2385
- var _this$otherParams22;
2386
- return isCustomerUserPlatform((_this$otherParams22 = this.otherParams) === null || _this$otherParams22 === void 0 ? void 0 : _this$otherParams22.platform);
2401
+ var _this$otherParams23;
2402
+ return isCustomerUserPlatform((_this$otherParams23 = this.otherParams) === null || _this$otherParams23 === void 0 ? void 0 : _this$otherParams23.platform);
2387
2403
  }
2388
2404
  }, {
2389
2405
  key: "resolveDiscountOrderIdentity",
@@ -2726,7 +2742,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
2726
2742
  key: "getSalesSettings",
2727
2743
  value: (function () {
2728
2744
  var _getSalesSettings = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
2729
- var _this$otherParams23;
2745
+ var _this$otherParams24;
2730
2746
  var config;
2731
2747
  return _regeneratorRuntime().wrap(function _callee17$(_context17) {
2732
2748
  while (1) switch (_context17.prev = _context17.next) {
@@ -2741,7 +2757,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
2741
2757
  }
2742
2758
  throw new Error('Sales settings are unavailable without a business context.');
2743
2759
  case 5:
2744
- return _context17.abrupt("return", normalizeSalesSettings(config, (_this$otherParams23 = this.otherParams) === null || _this$otherParams23 === void 0 ? void 0 : _this$otherParams23.platform));
2760
+ return _context17.abrupt("return", normalizeSalesSettings(config, (_this$otherParams24 = this.otherParams) === null || _this$otherParams24 === void 0 ? void 0 : _this$otherParams24.platform));
2745
2761
  case 6:
2746
2762
  case "end":
2747
2763
  return _context17.stop();
@@ -2756,11 +2772,11 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
2756
2772
  }, {
2757
2773
  key: "getLoadedSalesSettings",
2758
2774
  value: function getLoadedSalesSettings() {
2759
- var _this$otherParams24;
2775
+ var _this$otherParams25;
2760
2776
  if (!this.runtimeOpenDataSnapshot) {
2761
2777
  throw new Error('Sales settings are not loaded. Call getSalesSettings before preparing a booking.');
2762
2778
  }
2763
- return normalizeSalesSettings(this.runtimeOpenDataSnapshot, (_this$otherParams24 = this.otherParams) === null || _this$otherParams24 === void 0 ? void 0 : _this$otherParams24.platform);
2779
+ return normalizeSalesSettings(this.runtimeOpenDataSnapshot, (_this$otherParams25 = this.otherParams) === null || _this$otherParams25 === void 0 ? void 0 : _this$otherParams25.platform);
2764
2780
  }
2765
2781
  }, {
2766
2782
  key: "getProductBookingsForScheduling",
@@ -2780,8 +2796,8 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
2780
2796
  }, {
2781
2797
  key: "shouldApplyMultipleBookingScheduling",
2782
2798
  value: function shouldApplyMultipleBookingScheduling() {
2783
- var _this$otherParams25;
2784
- var platform = normalizeRuntimePlatform((_this$otherParams25 = this.otherParams) === null || _this$otherParams25 === void 0 ? void 0 : _this$otherParams25.platform);
2799
+ var _this$otherParams26;
2800
+ var platform = normalizeRuntimePlatform((_this$otherParams26 = this.otherParams) === null || _this$otherParams26 === void 0 ? void 0 : _this$otherParams26.platform);
2785
2801
  return platform === 'pos' || platform === 'webpos';
2786
2802
  }
2787
2803
  }, {
@@ -2984,13 +3000,13 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
2984
3000
  key: "loadPickupTimingOpenData",
2985
3001
  value: function () {
2986
3002
  var _loadPickupTimingOpenData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(_force) {
2987
- var _ref35, _this$otherParams$bus3, _this$otherParams26, _this$otherParams27;
3003
+ var _ref35, _this$otherParams$bus3, _this$otherParams27, _this$otherParams28;
2988
3004
  var scope, businessCode, config;
2989
3005
  return _regeneratorRuntime().wrap(function _callee20$(_context20) {
2990
3006
  while (1) switch (_context20.prev = _context20.next) {
2991
3007
  case 0:
2992
3008
  scope = this.getPickupTimingScope();
2993
- businessCode = String((_ref35 = (_this$otherParams$bus3 = (_this$otherParams26 = this.otherParams) === null || _this$otherParams26 === void 0 ? void 0 : _this$otherParams26.businessCode) !== null && _this$otherParams$bus3 !== void 0 ? _this$otherParams$bus3 : (_this$otherParams27 = this.otherParams) === null || _this$otherParams27 === void 0 ? void 0 : _this$otherParams27.business_code) !== null && _ref35 !== void 0 ? _ref35 : '').trim();
3009
+ businessCode = String((_ref35 = (_this$otherParams$bus3 = (_this$otherParams27 = this.otherParams) === null || _this$otherParams27 === void 0 ? void 0 : _this$otherParams27.businessCode) !== null && _this$otherParams$bus3 !== void 0 ? _this$otherParams$bus3 : (_this$otherParams28 = this.otherParams) === null || _this$otherParams28 === void 0 ? void 0 : _this$otherParams28.business_code) !== null && _ref35 !== void 0 ? _ref35 : '').trim();
2994
3010
  _context20.next = 4;
2995
3011
  return this.loadOpenData({
2996
3012
  businessCode: businessCode,
@@ -3157,7 +3173,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
3157
3173
  key: "resolveProductAllergyRequirement",
3158
3174
  value: (function () {
3159
3175
  var _resolveProductAllergyRequirement = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
3160
- var _this$otherParams28, _this$getOrderProduct, _runtimePax$total, _runtimePax$adult, _runtimePax$child, _ref38, _runtimeConfig$servic, _this$otherParams29, _ref39, _ref40, _params$channel, _this$otherParams30, _this$otherParams31, _runtimeConfig$submis;
3176
+ var _this$otherParams29, _this$getOrderProduct, _runtimePax$total, _runtimePax$adult, _runtimePax$child, _ref38, _runtimeConfig$servic, _this$otherParams30, _ref39, _ref40, _params$channel, _this$otherParams31, _this$otherParams32, _runtimeConfig$submis;
3161
3177
  var productId, strategyConfigs, productVariantId, runtimeConfig, runtimePax, cartItems;
3162
3178
  return _regeneratorRuntime().wrap(function _callee24$(_context24) {
3163
3179
  while (1) switch (_context24.prev = _context24.next) {
@@ -3180,7 +3196,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
3180
3196
  return _context24.abrupt("return", null);
3181
3197
  case 8:
3182
3198
  productVariantId = normalizePositiveInteger(params.productVariantId);
3183
- runtimeConfig = ((_this$otherParams28 = this.otherParams) === null || _this$otherParams28 === void 0 ? void 0 : _this$otherParams28.itemRule) || {};
3199
+ runtimeConfig = ((_this$otherParams29 = this.otherParams) === null || _this$otherParams29 === void 0 ? void 0 : _this$otherParams29.itemRule) || {};
3184
3200
  runtimePax = runtimeConfig.pax || {};
3185
3201
  cartItems = (((_this$getOrderProduct = this.getOrderProducts) === null || _this$getOrderProduct === void 0 ? void 0 : _this$getOrderProduct.call(this)) || []).map(function (item) {
3186
3202
  var _item$product_id, _item$product_variant, _ref37, _item$num;
@@ -3199,8 +3215,8 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
3199
3215
  child: Number((_runtimePax$child = runtimePax.child) !== null && _runtimePax$child !== void 0 ? _runtimePax$child : 0) || 0
3200
3216
  },
3201
3217
  cartItems: cartItems,
3202
- serviceType: String((_ref38 = (_runtimeConfig$servic = runtimeConfig.serviceType) !== null && _runtimeConfig$servic !== void 0 ? _runtimeConfig$servic : (_this$otherParams29 = this.otherParams) === null || _this$otherParams29 === void 0 ? void 0 : _this$otherParams29.serviceType) !== null && _ref38 !== void 0 ? _ref38 : ''),
3203
- channel: String((_ref39 = (_ref40 = (_params$channel = params.channel) !== null && _params$channel !== void 0 ? _params$channel : (_this$otherParams30 = this.otherParams) === null || _this$otherParams30 === void 0 ? void 0 : _this$otherParams30.channel) !== null && _ref40 !== void 0 ? _ref40 : (_this$otherParams31 = this.otherParams) === null || _this$otherParams31 === void 0 ? void 0 : _this$otherParams31.platform) !== null && _ref39 !== void 0 ? _ref39 : ''),
3218
+ serviceType: String((_ref38 = (_runtimeConfig$servic = runtimeConfig.serviceType) !== null && _runtimeConfig$servic !== void 0 ? _runtimeConfig$servic : (_this$otherParams30 = this.otherParams) === null || _this$otherParams30 === void 0 ? void 0 : _this$otherParams30.serviceType) !== null && _ref38 !== void 0 ? _ref38 : ''),
3219
+ channel: String((_ref39 = (_ref40 = (_params$channel = params.channel) !== null && _params$channel !== void 0 ? _params$channel : (_this$otherParams31 = this.otherParams) === null || _this$otherParams31 === void 0 ? void 0 : _this$otherParams31.channel) !== null && _ref40 !== void 0 ? _ref40 : (_this$otherParams32 = this.otherParams) === null || _this$otherParams32 === void 0 ? void 0 : _this$otherParams32.platform) !== null && _ref39 !== void 0 ? _ref39 : ''),
3204
3220
  currentProduct: _objectSpread({
3205
3221
  product_id: productId
3206
3222
  }, productVariantId ? {
@@ -3290,9 +3306,9 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
3290
3306
  }, {
3291
3307
  key: "isInvoiceOpenDataCacheCurrent",
3292
3308
  value: function isInvoiceOpenDataCacheCurrent() {
3293
- var _this$otherParams32, _this$otherParams33;
3294
- var businessCode = String(((_this$otherParams32 = this.otherParams) === null || _this$otherParams32 === void 0 ? void 0 : _this$otherParams32.businessCode) || '').trim();
3295
- var channel = String(((_this$otherParams33 = this.otherParams) === null || _this$otherParams33 === void 0 ? void 0 : _this$otherParams33.channel) || '').trim();
3309
+ var _this$otherParams33, _this$otherParams34;
3310
+ var businessCode = String(((_this$otherParams33 = this.otherParams) === null || _this$otherParams33 === void 0 ? void 0 : _this$otherParams33.businessCode) || '').trim();
3311
+ var channel = String(((_this$otherParams34 = this.otherParams) === null || _this$otherParams34 === void 0 ? void 0 : _this$otherParams34.channel) || '').trim();
3296
3312
  if (!businessCode || !channel) return false;
3297
3313
  return this.openDataTarget === "".concat(businessCode, "+").concat(channel) && this.runtimeOpenDataScope === this.getRuntimeOpenDataScope();
3298
3314
  }
@@ -3738,10 +3754,9 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
3738
3754
  }, {
3739
3755
  key: "createVenueCatalogSession",
3740
3756
  value: function createVenueCatalogSession(params) {
3741
- var _this$otherParams34,
3742
- _params$sessionKey,
3757
+ var _params$sessionKey,
3743
3758
  _this14 = this;
3744
- if (!isCustomerUserPlatform((_this$otherParams34 = this.otherParams) === null || _this$otherParams34 === void 0 ? void 0 : _this$otherParams34.platform)) {
3759
+ if (!this.supportsVenueSelectionSnapshot()) {
3745
3760
  throw venueCatalogError('VENUE_CATALOG_PLATFORM_UNSUPPORTED', 'Venue catalog sessions require a customer platform.');
3746
3761
  }
3747
3762
  var ids = params.menu_list_ids;
@@ -3757,6 +3772,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
3757
3772
  var generation = this.runtimeInitializationGeneration;
3758
3773
  var core = this.core;
3759
3774
  var request = this.request;
3775
+ var venueKioskMode = this.isVenueKioskPlatform() ? this.otherParams.venueBookingMode : undefined;
3760
3776
  var entry = {
3761
3777
  scope: scope,
3762
3778
  generation: generation,
@@ -3777,7 +3793,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
3777
3793
  if (!_this14.venueCatalogSessions.has(entry)) {
3778
3794
  throw venueCatalogError('VENUE_CATALOG_DISPOSED', 'The venue catalog session is closed.');
3779
3795
  }
3780
- if (_this14.runtimeOpenDataDestroyed || _this14.core !== core || _this14.request !== request || generation !== _this14.runtimeInitializationGeneration || scope !== _this14.getRuntimeOpenDataScope()) {
3796
+ if (_this14.runtimeOpenDataDestroyed || _this14.core !== core || _this14.request !== request || generation !== _this14.runtimeInitializationGeneration || scope !== _this14.getRuntimeOpenDataScope() || !_this14.supportsVenueSelectionSnapshot() || venueKioskMode !== (_this14.isVenueKioskPlatform() ? _this14.otherParams.venueBookingMode : undefined)) {
3781
3797
  throw venueCatalogError('VENUE_CATALOG_STALE', 'The venue store context changed. Reopen the booking page.');
3782
3798
  }
3783
3799
  };
@@ -3833,7 +3849,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
3833
3849
  var queryPayload = {
3834
3850
  schedule_date: datetime.slice(0, 10),
3835
3851
  schedule_datetime: datetime,
3836
- customer_id: (_ref44 = (_input$customer_id = input.customer_id) !== null && _input$customer_id !== void 0 ? _input$customer_id : (_this14$getTempOrder = _this14.getTempOrder()) === null || _this14$getTempOrder === void 0 ? void 0 : _this14$getTempOrder.customer_id) !== null && _ref44 !== void 0 ? _ref44 : user === null || user === void 0 || (_user$get = user.get) === null || _user$get === void 0 || (_user$get = _user$get.call(user)) === null || _user$get === void 0 ? void 0 : _user$get.id,
3852
+ customer_id: (_ref44 = (_input$customer_id = input.customer_id) !== null && _input$customer_id !== void 0 ? _input$customer_id : (_this14$getTempOrder = _this14.getTempOrder()) === null || _this14$getTempOrder === void 0 ? void 0 : _this14$getTempOrder.customer_id) !== null && _ref44 !== void 0 ? _ref44 : _this14.isVenueKioskPlatform() ? undefined : user === null || user === void 0 || (_user$get = user.get) === null || _user$get === void 0 || (_user$get = _user$get.call(user)) === null || _user$get === void 0 ? void 0 : _user$get.id,
3837
3853
  strategy_context: _objectSpread(_objectSpread({}, _this14.getPriceQueryStrategyContext()), input.strategy_context || {})
3838
3854
  };
3839
3855
  var result = tryResolveClientDataVariants({
@@ -6745,12 +6761,12 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
6745
6761
  key: "queryBookingAvailability",
6746
6762
  value: (function () {
6747
6763
  var _queryBookingAvailability = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee64(contextId, request) {
6748
- var _this$otherParams43, _this$otherParams$pla2, _this$otherParams44;
6764
+ var _this$otherParams$pla2, _this$otherParams43;
6749
6765
  var customerSelectionSnapshot, _ref59, context, projectionEntry, refreshed, strictAvailability, isPosAvailabilityRequest, result, contextVersion, contextualResult;
6750
6766
  return _regeneratorRuntime().wrap(function _callee64$(_context64) {
6751
6767
  while (1) switch (_context64.prev = _context64.next) {
6752
6768
  case 0:
6753
- customerSelectionSnapshot = request.target === 'resource' && request.customerSelectionSnapshot === true && isCustomerUserPlatform((_this$otherParams43 = this.otherParams) === null || _this$otherParams43 === void 0 ? void 0 : _this$otherParams43.platform);
6769
+ customerSelectionSnapshot = request.target === 'resource' && request.customerSelectionSnapshot === true && this.supportsVenueSelectionSnapshot();
6754
6770
  if (!customerSelectionSnapshot) {
6755
6771
  _context64.next = 5;
6756
6772
  break;
@@ -6770,7 +6786,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
6770
6786
  refreshed = _ref59.refreshed;
6771
6787
  this.assertContextualQueryFreshness(context, request);
6772
6788
  strictAvailability = context.prepareParams.strictAvailability === true;
6773
- isPosAvailabilityRequest = String((_this$otherParams$pla2 = (_this$otherParams44 = this.otherParams) === null || _this$otherParams44 === void 0 ? void 0 : _this$otherParams44.platform) !== null && _this$otherParams$pla2 !== void 0 ? _this$otherParams$pla2 : '').trim().toLowerCase() === 'pos';
6789
+ isPosAvailabilityRequest = String((_this$otherParams$pla2 = (_this$otherParams43 = this.otherParams) === null || _this$otherParams43 === void 0 ? void 0 : _this$otherParams43.platform) !== null && _this$otherParams$pla2 !== void 0 ? _this$otherParams$pla2 : '').trim().toLowerCase() === 'pos';
6774
6790
  result = queryAvailabilityProjection(projectionEntry.projection, request, _objectSpread(_objectSpread({}, customerSelectionSnapshot ? {
6775
6791
  evaluatedAt: projectionEntry.projection.meta.now
6776
6792
  } : {}), {}, {
@@ -6932,13 +6948,12 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
6932
6948
  key: "commitAvailabilitySelectionWithLock",
6933
6949
  value: function () {
6934
6950
  var _commitAvailabilitySelectionWithLock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee66(contextId, params) {
6935
- var _this$otherParams45,
6936
- _this$availabilityCon,
6951
+ var _this$availabilityCon,
6937
6952
  _params$availabilityC3,
6938
6953
  _this$store$order11,
6939
6954
  _this$store$order11$e,
6940
6955
  _this28 = this;
6941
- var normalizedContextId, isEditingSelection, isPartyReplacement, customerSelectionSnapshot, strictAvailability, hasCommitGuard, guardedOrder, getGuardedCommitIdentity, guardedCommitIdentity, availabilityCommitTargetGuard, guardedCommitPublished, _params$bookingCount, _ref61, _params$orderProduct$, _params$orderProduct, _params$orderProduct2, _params$orderProduct3, _params$orderProduct$2, _params$orderProduct4, _params$orderProduct5, _editingLine$product_, _baseProjection$meta$, _refreshedProjection$, _baseProjection$meta$2, _this$otherParams$pla3, _this$otherParams46, _params$orderProduct$3, _params$orderProduct6, _existingBooking$hold, _existingBooking$meta, _ref63, _params$orderProduct$4, _params$orderProduct7, _params$orderProduct8, _existingBooking$meta2, _existingBooking$meta3, _existingBooking$hold2, _transformed$metadata, _nextContext$activeVe, bookingCount, orderProductQuantity, partySize, _ref62, context, projectionEntry, refreshed, boundEditingUids, orderProductId, editingLine, _editingLine$product_2, baseProjection, commitWriteGuard, prepareParams, fallbackResources, commitSnapshot, refreshedProjection, _baseProjection$meta$3, latestContext, candidateDurationMinutes, candidateStartTime, allowPosAvailabilityOverride, refreshedRanges, refreshedCandidateBase, product, validation, forced, capacityConflict, revalidationEntry, revalidatedContext, refreshedCandidate, availabilityCommitGuard, existingBooking, existingBookingUid, booking, transformed, productLineUid, bookingUid, productLineUids, bookingUids, relatedRetailProducts, _transformed$product_, _transformed$product_2, _transformed$product_3, _ref64, _transformed$product_4, update, _this$getTempOrder5, _this$getTempOrder6, _params$salesNotes, _params$salesNotes2, _ref65, beforeProductLineUids, beforeBookingUids, products, addedLines, addedBookings, targetStillCurrent, nextContext, result, emit, release;
6956
+ var normalizedContextId, isEditingSelection, isPartyReplacement, customerSelectionSnapshot, strictAvailability, hasCommitGuard, guardedOrder, getGuardedCommitIdentity, guardedCommitIdentity, availabilityCommitTargetGuard, guardedCommitPublished, _params$bookingCount, _ref61, _params$orderProduct$, _params$orderProduct, _params$orderProduct2, _params$orderProduct3, _params$orderProduct$2, _params$orderProduct4, _params$orderProduct5, _editingLine$product_, _baseProjection$meta$, _refreshedProjection$, _baseProjection$meta$2, _this$otherParams$pla3, _this$otherParams44, _params$orderProduct$3, _params$orderProduct6, _existingBooking$hold, _existingBooking$meta, _ref63, _params$orderProduct$4, _params$orderProduct7, _params$orderProduct8, _existingBooking$meta2, _existingBooking$meta3, _existingBooking$hold2, _transformed$metadata, _nextContext$activeVe, bookingCount, orderProductQuantity, partySize, _ref62, context, projectionEntry, refreshed, boundEditingUids, orderProductId, editingLine, _editingLine$product_2, baseProjection, commitWriteGuard, prepareParams, fallbackResources, commitSnapshot, refreshedProjection, _baseProjection$meta$3, latestContext, candidateDurationMinutes, candidateStartTime, allowPosAvailabilityOverride, refreshedRanges, refreshedCandidateBase, product, validation, forced, capacityConflict, revalidationEntry, revalidatedContext, refreshedCandidate, availabilityCommitGuard, existingBooking, existingBookingUid, booking, transformed, productLineUid, bookingUid, productLineUids, bookingUids, relatedRetailProducts, _transformed$product_, _transformed$product_2, _transformed$product_3, _ref64, _transformed$product_4, update, _this$getTempOrder5, _this$getTempOrder6, _params$salesNotes, _params$salesNotes2, _ref65, beforeProductLineUids, beforeBookingUids, products, addedLines, addedBookings, targetStillCurrent, nextContext, result, emit, release;
6942
6957
  return _regeneratorRuntime().wrap(function _callee66$(_context66) {
6943
6958
  while (1) switch (_context66.prev = _context66.next) {
6944
6959
  case 0:
@@ -6959,7 +6974,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
6959
6974
  }
6960
6975
  throw new AvailabilityError('INVALID_TARGET_FILTER', 'Party replacement requires edit/replace mode and the confirmed complete extras array');
6961
6976
  case 7:
6962
- customerSelectionSnapshot = params.customerSelectionSnapshot === true && isCustomerUserPlatform((_this$otherParams45 = this.otherParams) === null || _this$otherParams45 === void 0 ? void 0 : _this$otherParams45.platform);
6977
+ customerSelectionSnapshot = params.customerSelectionSnapshot === true && this.supportsVenueSelectionSnapshot();
6963
6978
  strictAvailability = ((_this$availabilityCon = this.availabilityContextRegistry.get(normalizedContextId)) === null || _this$availabilityCon === void 0 ? void 0 : _this$availabilityCon.prepareParams.strictAvailability) === true;
6964
6979
  hasCommitGuard = customerSelectionSnapshot || strictAvailability || isPartyReplacement || Boolean(params.availabilityCommitGuard);
6965
6980
  (_params$availabilityC3 = params.availabilityCommitGuard) === null || _params$availabilityC3 === void 0 || _params$availabilityC3.call(params);
@@ -7222,7 +7237,7 @@ export var UnifiedBookingSalesImpl = /*#__PURE__*/function (_BookingTicket) {
7222
7237
  this.assertAvailabilityCommitWriteCAS(commitWriteGuard);
7223
7238
  candidateDurationMinutes = getCandidateDurationMinutes(params.candidate);
7224
7239
  candidateStartTime = getCandidateStartTime(params.candidate);
7225
- allowPosAvailabilityOverride = String((_this$otherParams$pla3 = (_this$otherParams46 = this.otherParams) === null || _this$otherParams46 === void 0 ? void 0 : _this$otherParams46.platform) !== null && _this$otherParams$pla3 !== void 0 ? _this$otherParams$pla3 : '').trim().toLowerCase() === 'pos' && !strictAvailability;
7240
+ allowPosAvailabilityOverride = String((_this$otherParams$pla3 = (_this$otherParams44 = this.otherParams) === null || _this$otherParams44 === void 0 ? void 0 : _this$otherParams44.platform) !== null && _this$otherParams$pla3 !== void 0 ? _this$otherParams$pla3 : '').trim().toLowerCase() === 'pos' && !strictAvailability;
7226
7241
  refreshedRanges = customerSelectionSnapshot ? [params.candidate] : getProjectionProductTimeRanges(refreshedProjection, _objectSpread({
7227
7242
  productIds: [params.candidate.productId],
7228
7243
  dateRange: {
@@ -59,6 +59,8 @@ export declare enum UnifiedBookingSalesHooks {
59
59
  }
60
60
  export interface UnifiedBookingSalesOtherParams extends Record<string, any> {
61
61
  enableSessionStoragePersist?: boolean;
62
+ /** Explicitly opts the real Kiosk host into the Tickets/Party self-service contracts. */
63
+ venueBookingMode?: 'tickets' | 'party';
62
64
  }
63
65
  export type UnifiedBookingSalesAllergyRequirement = AllergyRequirement;
64
66
  export interface UnifiedBookingSalesResolveProductAllergyRequirementParams {
@@ -145,7 +147,7 @@ export type ContextualAvailabilityQuery = Omit<Extract<AvailabilityQuery, {
145
147
  target: 'resource';
146
148
  }>, 'selectedRanges'> & {
147
149
  selectedRanges: ContextualProductTimeRange[];
148
- /** PC/H5 only: retain the already-selected time while choosing resources in this snapshot. */
150
+ /** PC/H5 and explicitly enabled Venue Kiosk templates retain the already-selected time. */
149
151
  customerSelectionSnapshot?: boolean;
150
152
  });
151
153
  export type ContextualTimeAvailabilityItem = Omit<TimeAvailabilityItem, keyof ProductTimeRange> & ContextualProductTimeRange;
@@ -212,7 +214,7 @@ export interface UnifiedBookingSalesAddRetailProductParams {
212
214
  }
213
215
  export interface ContextualCommitAvailabilitySelectionParams {
214
216
  mode: 'add' | 'edit' | 'replace';
215
- /** PC/H5 only: write the completed UI selection without re-querying availability; checkout is authoritative. */
217
+ /** PC/H5 and enabled Venue Kiosk templates write the selected snapshot; checkout is authoritative. */
216
218
  customerSelectionSnapshot?: boolean;
217
219
  /** Local UI intent guard, checked again immediately before the Order mutation. */
218
220
  availabilityCommitGuard?: () => void;
@@ -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" | "duration" | "session";
52
+ getProductType(): "duration" | "session" | "normal";
53
53
  }
@@ -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 | 3 | 5 | 6 | 4;
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<"normal" | "duration" | "session">;
376
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
377
377
  /**
378
378
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
379
379
  *
@@ -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, "skip" | "num">;
363
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
364
364
  /**
365
365
  * 获取客户列表状态(包含滚动加载相关状态)
366
366
  * @returns 客户状态
@@ -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
  /**
@@ -109,6 +109,9 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
109
109
  protected getSubModuleHooks(moduleName: string): any;
110
110
  private createAvailabilityFacadeError;
111
111
  private getAvailabilityScopeDescriptor;
112
+ /** Kiosk keeps its device/channel semantics; only explicit Venue templates opt in. */
113
+ private isVenueKioskPlatform;
114
+ private supportsVenueSelectionSnapshot;
112
115
  private normalizeAvailabilityIdList;
113
116
  private normalizeAvailabilityStringList;
114
117
  private normalizeAvailabilityPrepareDescriptor;
@@ -1407,9 +1407,20 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
1407
1407
  businessCode: String(otherParams.businessCode ?? otherParams.business_code ?? ''),
1408
1408
  channel: String(otherParams.channel ?? ''),
1409
1409
  platform: String(otherParams.platform ?? ''),
1410
- businessTimezone: String(otherParams.businessTimezone ?? '')
1410
+ businessTimezone: String(otherParams.businessTimezone ?? ''),
1411
+ ...(this.isVenueKioskPlatform(otherParams) ? {
1412
+ venueBookingMode: otherParams.venueBookingMode
1413
+ } : {})
1411
1414
  };
1412
1415
  }
1416
+
1417
+ /** Kiosk keeps its device/channel semantics; only explicit Venue templates opt in. */
1418
+ isVenueKioskPlatform(otherParams = this.otherParams || {}) {
1419
+ return (0, _platform.normalizeRuntimePlatform)(otherParams.platform) === 'kiosk' && (otherParams.venueBookingMode === 'tickets' || otherParams.venueBookingMode === 'party');
1420
+ }
1421
+ supportsVenueSelectionSnapshot() {
1422
+ return (0, _platform.isCustomerUserPlatform)(this.otherParams?.platform) || this.isVenueKioskPlatform();
1423
+ }
1413
1424
  normalizeAvailabilityIdList(values) {
1414
1425
  if (!Array.isArray(values) || values.length === 0) return undefined;
1415
1426
  const uniqueMap = new Map();
@@ -1555,7 +1566,7 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
1555
1566
  if (explicitlySetsOpenData) {
1556
1567
  this.openDataTarget = this.otherParams?.openData && nextScope.businessCode && nextScope.channel ? `${nextScope.businessCode}+${nextScope.channel}` : null;
1557
1568
  }
1558
- const shouldResetAvailabilityState = previousScope.cacheId !== nextScope.cacheId || previousScope.businessCode !== nextScope.businessCode || previousScope.channel !== nextScope.channel || previousScope.platform !== nextScope.platform || previousScope.businessTimezone !== nextScope.businessTimezone;
1569
+ const shouldResetAvailabilityState = previousScope.cacheId !== nextScope.cacheId || previousScope.businessCode !== nextScope.businessCode || previousScope.channel !== nextScope.channel || previousScope.platform !== nextScope.platform || previousScope.businessTimezone !== nextScope.businessTimezone || previousScope.venueBookingMode !== nextScope.venueBookingMode;
1559
1570
  if (shouldResetAvailabilityState) {
1560
1571
  await this.resetAvailabilityProjectionState('set_other_params_reset');
1561
1572
  }
@@ -2505,7 +2516,7 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
2505
2516
 
2506
2517
  /** One complete raw product query per explicitly configured pool for this page lifetime. */
2507
2518
  createVenueCatalogSession(params) {
2508
- if (!(0, _platform.isCustomerUserPlatform)(this.otherParams?.platform)) {
2519
+ if (!this.supportsVenueSelectionSnapshot()) {
2509
2520
  throw (0, _venueCatalogSession.venueCatalogError)('VENUE_CATALOG_PLATFORM_UNSUPPORTED', 'Venue catalog sessions require a customer platform.');
2510
2521
  }
2511
2522
  const ids = params.menu_list_ids;
@@ -2517,6 +2528,7 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
2517
2528
  const generation = this.runtimeInitializationGeneration;
2518
2529
  const core = this.core;
2519
2530
  const request = this.request;
2531
+ const venueKioskMode = this.isVenueKioskPlatform() ? this.otherParams.venueBookingMode : undefined;
2520
2532
  const entry = {
2521
2533
  scope,
2522
2534
  generation,
@@ -2537,7 +2549,7 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
2537
2549
  if (!this.venueCatalogSessions.has(entry)) {
2538
2550
  throw (0, _venueCatalogSession.venueCatalogError)('VENUE_CATALOG_DISPOSED', 'The venue catalog session is closed.');
2539
2551
  }
2540
- if (this.runtimeOpenDataDestroyed || this.core !== core || this.request !== request || generation !== this.runtimeInitializationGeneration || scope !== this.getRuntimeOpenDataScope()) {
2552
+ if (this.runtimeOpenDataDestroyed || this.core !== core || this.request !== request || generation !== this.runtimeInitializationGeneration || scope !== this.getRuntimeOpenDataScope() || !this.supportsVenueSelectionSnapshot() || venueKioskMode !== (this.isVenueKioskPlatform() ? this.otherParams.venueBookingMode : undefined)) {
2541
2553
  throw (0, _venueCatalogSession.venueCatalogError)('VENUE_CATALOG_STALE', 'The venue store context changed. Reopen the booking page.');
2542
2554
  }
2543
2555
  };
@@ -2574,7 +2586,7 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
2574
2586
  const queryPayload = {
2575
2587
  schedule_date: datetime.slice(0, 10),
2576
2588
  schedule_datetime: datetime,
2577
- customer_id: input.customer_id ?? this.getTempOrder()?.customer_id ?? user?.get?.()?.id,
2589
+ customer_id: input.customer_id ?? this.getTempOrder()?.customer_id ?? (this.isVenueKioskPlatform() ? undefined : user?.get?.()?.id),
2578
2590
  strategy_context: {
2579
2591
  ...this.getPriceQueryStrategyContext(),
2580
2592
  ...(input.strategy_context || {})
@@ -4263,7 +4275,7 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
4263
4275
 
4264
4276
  /** Thin facade: auto-refresh on cart drift, then delegate to the pure projection query. */
4265
4277
  async queryBookingAvailability(contextId, request) {
4266
- const customerSelectionSnapshot = request.target === 'resource' && request.customerSelectionSnapshot === true && (0, _platform.isCustomerUserPlatform)(this.otherParams?.platform);
4278
+ const customerSelectionSnapshot = request.target === 'resource' && request.customerSelectionSnapshot === true && this.supportsVenueSelectionSnapshot();
4267
4279
  const {
4268
4280
  context,
4269
4281
  projectionEntry,
@@ -4395,7 +4407,7 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
4395
4407
  if (isPartyReplacement && (!isEditingSelection || !Array.isArray(params.relatedRetailProducts))) {
4396
4408
  throw new _ResourcePlanner.AvailabilityError('INVALID_TARGET_FILTER', 'Party replacement requires edit/replace mode and the confirmed complete extras array');
4397
4409
  }
4398
- const customerSelectionSnapshot = params.customerSelectionSnapshot === true && (0, _platform.isCustomerUserPlatform)(this.otherParams?.platform);
4410
+ const customerSelectionSnapshot = params.customerSelectionSnapshot === true && this.supportsVenueSelectionSnapshot();
4399
4411
  const strictAvailability = this.availabilityContextRegistry.get(normalizedContextId)?.prepareParams.strictAvailability === true;
4400
4412
  const hasCommitGuard = customerSelectionSnapshot || strictAvailability || isPartyReplacement || Boolean(params.availabilityCommitGuard);
4401
4413
  params.availabilityCommitGuard?.();
@@ -59,6 +59,8 @@ export declare enum UnifiedBookingSalesHooks {
59
59
  }
60
60
  export interface UnifiedBookingSalesOtherParams extends Record<string, any> {
61
61
  enableSessionStoragePersist?: boolean;
62
+ /** Explicitly opts the real Kiosk host into the Tickets/Party self-service contracts. */
63
+ venueBookingMode?: 'tickets' | 'party';
62
64
  }
63
65
  export type UnifiedBookingSalesAllergyRequirement = AllergyRequirement;
64
66
  export interface UnifiedBookingSalesResolveProductAllergyRequirementParams {
@@ -145,7 +147,7 @@ export type ContextualAvailabilityQuery = Omit<Extract<AvailabilityQuery, {
145
147
  target: 'resource';
146
148
  }>, 'selectedRanges'> & {
147
149
  selectedRanges: ContextualProductTimeRange[];
148
- /** PC/H5 only: retain the already-selected time while choosing resources in this snapshot. */
150
+ /** PC/H5 and explicitly enabled Venue Kiosk templates retain the already-selected time. */
149
151
  customerSelectionSnapshot?: boolean;
150
152
  });
151
153
  export type ContextualTimeAvailabilityItem = Omit<TimeAvailabilityItem, keyof ProductTimeRange> & ContextualProductTimeRange;
@@ -212,7 +214,7 @@ export interface UnifiedBookingSalesAddRetailProductParams {
212
214
  }
213
215
  export interface ContextualCommitAvailabilitySelectionParams {
214
216
  mode: 'add' | 'edit' | 'replace';
215
- /** PC/H5 only: write the completed UI selection without re-querying availability; checkout is authoritative. */
217
+ /** PC/H5 and enabled Venue Kiosk templates write the selected snapshot; checkout is authoritative. */
216
218
  customerSelectionSnapshot?: boolean;
217
219
  /** Local UI intent guard, checked again immediately before the Order mutation. */
218
220
  availabilityCommitGuard?: () => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.10.82",
4
+ "version": "0.10.83",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",