@pisell/pisellos 2.2.291 → 2.2.293
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +108 -65
- package/dist/model/strategy/adapter/itemRule/adapter.d.ts +4 -1
- package/dist/model/strategy/adapter/itemRule/adapter.js +135 -35
- package/dist/model/strategy/adapter/itemRule/evaluator.d.ts +8 -1
- package/dist/model/strategy/adapter/itemRule/evaluator.js +25 -1
- package/dist/model/strategy/adapter/itemRule/type.d.ts +44 -0
- package/dist/model/strategy/adapter/itemRule/type.js +19 -1
- package/dist/model/strategy/adapter/promotion/index.js +0 -9
- package/dist/modules/BookingContext/index.d.ts +3 -0
- package/dist/modules/BookingContext/index.js +42 -13
- package/dist/modules/BookingContext/types.d.ts +4 -4
- package/dist/modules/BookingContext/types.js +3 -3
- package/dist/modules/OpenData/types.d.ts +1 -0
- package/dist/modules/Order/index.d.ts +18 -3
- package/dist/modules/Order/index.js +885 -485
- package/dist/modules/Order/salesNotes.d.ts +31 -0
- package/dist/modules/Order/salesNotes.js +492 -0
- package/dist/modules/Order/types.d.ts +93 -5
- package/dist/modules/Order/types.js +5 -0
- package/dist/modules/Order/utils.d.ts +12 -0
- package/dist/modules/Order/utils.js +96 -31
- package/dist/modules/Product/types.d.ts +2 -0
- package/dist/modules/ProductList/clientDataVariants.d.ts +50 -0
- package/dist/modules/ProductList/clientDataVariants.js +216 -0
- package/dist/modules/ProductList/index.d.ts +18 -3
- package/dist/modules/ProductList/index.js +220 -38
- package/dist/modules/ProductList/types.d.ts +10 -0
- package/dist/modules/Quotation/index.d.ts +22 -0
- package/dist/modules/Quotation/index.js +293 -28
- package/dist/modules/ResourcePlanner/index.d.ts +0 -22
- package/dist/modules/ResourcePlanner/index.js +1 -180
- package/dist/modules/ResourcePlanner/localClock.d.ts +33 -0
- package/dist/modules/ResourcePlanner/localClock.js +183 -0
- package/dist/modules/ResourcePlanner/planner.d.ts +5 -14
- package/dist/modules/ResourcePlanner/planner.js +2111 -958
- package/dist/modules/ResourcePlanner/types.d.ts +359 -187
- package/dist/modules/ResourcePlanner/types.js +33 -1
- package/dist/plugins/request.d.ts +1 -0
- package/dist/server/index.d.ts +17 -2
- package/dist/server/index.js +1134 -932
- package/dist/server/modules/floor-plan/index.d.ts +4 -0
- package/dist/server/modules/floor-plan/index.js +240 -98
- package/dist/server/modules/menu/index.js +48 -23
- package/dist/server/modules/order/index.d.ts +17 -7
- package/dist/server/modules/order/index.js +419 -207
- package/dist/server/modules/products/index.d.ts +10 -4
- package/dist/server/modules/products/index.js +177 -84
- package/dist/server/modules/resource/index.js +21 -13
- package/dist/server/utils/product.d.ts +1 -1
- package/dist/server/utils/product.js +186 -22
- package/dist/server/utils/small-ticket.d.ts +9 -1
- package/dist/server/utils/small-ticket.js +131 -84
- package/dist/solution/BaseSales/index.d.ts +26 -3
- package/dist/solution/BaseSales/index.js +1384 -905
- package/dist/solution/BaseSales/types.d.ts +2 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +3 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +10 -3
- package/dist/solution/BaseSales/utils.js +6 -3
- package/dist/solution/BookingByStep/index.d.ts +4 -4
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.js +4 -2
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +2 -1
- package/dist/solution/BookingTicket/utils/addProductDecision.js +6 -3
- package/dist/solution/BookingTicket/utils/orderCustomer.js +3 -2
- package/dist/solution/RegisterAndLogin/config.d.ts +9 -3
- package/dist/solution/RegisterAndLogin/config.js +95 -40
- package/dist/solution/RegisterAndLogin/index.js +4 -1
- package/dist/solution/ScanOrder/index.d.ts +1 -0
- package/dist/solution/ScanOrder/index.js +31 -27
- package/dist/solution/ScanOrder/types.d.ts +2 -0
- package/dist/solution/ScanOrder/utils.d.ts +1 -0
- package/dist/solution/ScanOrder/utils.js +8 -3
- package/dist/solution/UnifiedBookingSales/index.d.ts +128 -74
- package/dist/solution/UnifiedBookingSales/index.js +3877 -963
- package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +49 -0
- package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.js +430 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts +161 -77
- package/dist/solution/UnifiedBookingSales/types.js +4 -9
- package/dist/solution/VenueBooking/index.d.ts +3 -0
- package/dist/solution/VenueBooking/index.js +549 -497
- package/dist/solution/VenueBooking/utils/dateSummary.d.ts +1 -0
- package/dist/solution/VenueBooking/utils/dateSummary.js +3 -1
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +2 -0
- package/dist/solution/VenueBooking/utils/slotMerge.js +3 -1
- package/dist/utils/platform.d.ts +8 -0
- package/dist/utils/platform.js +15 -0
- package/lib/core/index.d.ts +7 -0
- package/lib/core/index.js +20 -2
- package/lib/model/strategy/adapter/itemRule/adapter.d.ts +4 -1
- package/lib/model/strategy/adapter/itemRule/adapter.js +73 -4
- package/lib/model/strategy/adapter/itemRule/evaluator.d.ts +8 -1
- package/lib/model/strategy/adapter/itemRule/evaluator.js +23 -1
- package/lib/model/strategy/adapter/itemRule/type.d.ts +44 -0
- package/lib/model/strategy/adapter/itemRule/type.js +19 -1
- package/lib/modules/BookingContext/index.d.ts +3 -0
- package/lib/modules/BookingContext/index.js +35 -8
- package/lib/modules/BookingContext/types.d.ts +4 -4
- package/lib/modules/BookingContext/types.js +3 -3
- package/lib/modules/OpenData/types.d.ts +1 -0
- package/lib/modules/Order/index.d.ts +18 -3
- package/lib/modules/Order/index.js +325 -28
- package/lib/modules/Order/salesNotes.d.ts +31 -0
- package/lib/modules/Order/salesNotes.js +382 -0
- package/lib/modules/Order/types.d.ts +93 -5
- package/lib/modules/Order/types.js +4 -0
- package/lib/modules/Order/utils.d.ts +12 -0
- package/lib/modules/Order/utils.js +85 -16
- package/lib/modules/Product/types.d.ts +2 -0
- package/lib/modules/ProductList/clientDataVariants.d.ts +50 -0
- package/lib/modules/ProductList/clientDataVariants.js +204 -0
- package/lib/modules/ProductList/index.d.ts +18 -3
- package/lib/modules/ProductList/index.js +137 -8
- package/lib/modules/ProductList/types.d.ts +10 -0
- package/lib/modules/Quotation/index.d.ts +22 -0
- package/lib/modules/Quotation/index.js +158 -11
- package/lib/modules/ResourcePlanner/index.d.ts +0 -22
- package/lib/modules/ResourcePlanner/index.js +9 -129
- package/lib/modules/ResourcePlanner/localClock.d.ts +33 -0
- package/lib/modules/ResourcePlanner/localClock.js +205 -0
- package/lib/modules/ResourcePlanner/planner.d.ts +5 -14
- package/lib/modules/ResourcePlanner/planner.js +1807 -783
- package/lib/modules/ResourcePlanner/types.d.ts +359 -187
- package/lib/modules/ResourcePlanner/types.js +13 -1
- package/lib/plugins/request.d.ts +1 -0
- package/lib/server/index.d.ts +17 -2
- package/lib/server/index.js +149 -21
- package/lib/server/modules/floor-plan/index.d.ts +4 -0
- package/lib/server/modules/floor-plan/index.js +60 -7
- package/lib/server/modules/menu/index.js +26 -4
- package/lib/server/modules/order/index.d.ts +17 -7
- package/lib/server/modules/order/index.js +194 -57
- package/lib/server/modules/products/index.d.ts +10 -4
- package/lib/server/modules/products/index.js +93 -23
- package/lib/server/modules/resource/index.js +12 -2
- package/lib/server/utils/product.d.ts +1 -1
- package/lib/server/utils/product.js +163 -3
- package/lib/server/utils/small-ticket.d.ts +9 -1
- package/lib/server/utils/small-ticket.js +123 -79
- package/lib/solution/BaseSales/index.d.ts +26 -3
- package/lib/solution/BaseSales/index.js +396 -70
- package/lib/solution/BaseSales/types.d.ts +2 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +3 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +9 -2
- package/lib/solution/BaseSales/utils.js +3 -0
- package/lib/solution/BookingByStep/index.d.ts +4 -4
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +2 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +2 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.js +5 -2
- package/lib/solution/BookingTicket/utils/orderCustomer.js +2 -1
- package/lib/solution/RegisterAndLogin/config.d.ts +9 -3
- package/lib/solution/RegisterAndLogin/config.js +49 -8
- package/lib/solution/RegisterAndLogin/index.js +4 -1
- package/lib/solution/ScanOrder/index.d.ts +1 -0
- package/lib/solution/ScanOrder/index.js +5 -1
- package/lib/solution/ScanOrder/types.d.ts +2 -0
- package/lib/solution/ScanOrder/utils.d.ts +1 -0
- package/lib/solution/ScanOrder/utils.js +4 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +128 -74
- package/lib/solution/UnifiedBookingSales/index.js +2592 -424
- package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +49 -0
- package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +316 -0
- package/lib/solution/UnifiedBookingSales/types.d.ts +161 -77
- package/lib/solution/UnifiedBookingSales/types.js +4 -6
- package/lib/solution/VenueBooking/index.d.ts +3 -0
- package/lib/solution/VenueBooking/index.js +33 -9
- package/lib/solution/VenueBooking/utils/dateSummary.d.ts +1 -0
- package/lib/solution/VenueBooking/utils/dateSummary.js +3 -1
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +2 -0
- package/lib/solution/VenueBooking/utils/slotMerge.js +3 -1
- package/lib/utils/platform.d.ts +8 -0
- package/lib/utils/platform.js +22 -0
- package/package.json +1 -1
|
@@ -2023,7 +2023,11 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2023
2023
|
}, {
|
|
2024
2024
|
key: "getItemRuleRuntimeConfig",
|
|
2025
2025
|
value: function getItemRuleRuntimeConfig() {
|
|
2026
|
-
|
|
2026
|
+
var _ref7, _runtimeConfig$channe, _runtimeConfig$custom, _this$otherParams13;
|
|
2027
|
+
var runtimeConfig = this.itemRuleRuntimeConfig || {};
|
|
2028
|
+
return _objectSpread(_objectSpread({}, runtimeConfig), {}, {
|
|
2029
|
+
channel: (_ref7 = (_runtimeConfig$channe = runtimeConfig.channel) !== null && _runtimeConfig$channe !== void 0 ? _runtimeConfig$channe : (_runtimeConfig$custom = runtimeConfig.custom) === null || _runtimeConfig$custom === void 0 ? void 0 : _runtimeConfig$custom.channel) !== null && _ref7 !== void 0 ? _ref7 : (_this$otherParams13 = this.otherParams) === null || _this$otherParams13 === void 0 ? void 0 : _this$otherParams13.channel
|
|
2030
|
+
});
|
|
2027
2031
|
}
|
|
2028
2032
|
}, {
|
|
2029
2033
|
key: "ensureItemRuleConfigsLoaded",
|
|
@@ -2510,14 +2514,14 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2510
2514
|
}, {
|
|
2511
2515
|
key: "normalizeResourceState",
|
|
2512
2516
|
value: function normalizeResourceState(detail, resourceSelectType, hasOrderId) {
|
|
2513
|
-
var _detail$form_record, _this$
|
|
2517
|
+
var _detail$form_record, _this$otherParams14, _detail$resource_capa, _detail$resource_capa2;
|
|
2514
2518
|
var currentOrderId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.order_id);
|
|
2515
2519
|
var lastOrderId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.last_order_id);
|
|
2516
2520
|
var relationId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.form_record_id);
|
|
2517
2521
|
var tableFormId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.form_id);
|
|
2518
2522
|
var formRecord = (_detail$form_record = detail === null || detail === void 0 ? void 0 : detail.form_record) !== null && _detail$form_record !== void 0 ? _detail$form_record : null;
|
|
2519
2523
|
// 是否允许加餐
|
|
2520
|
-
var allowSnack = ((_this$
|
|
2524
|
+
var allowSnack = ((_this$otherParams14 = this.otherParams) === null || _this$otherParams14 === void 0 || (_this$otherParams14 = _this$otherParams14.dineInConfig) === null || _this$otherParams14 === void 0 ? void 0 : _this$otherParams14['sale.allow_add_items']) || false;
|
|
2521
2525
|
// 开启同桌验证 - 本期没有这个配置,默认关掉
|
|
2522
2526
|
var deskmateValid = false;
|
|
2523
2527
|
var isExclusive = resourceSelectType === 'single';
|
|
@@ -2600,7 +2604,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2600
2604
|
key: "fetchResourceOccupyDetailsByResourceId",
|
|
2601
2605
|
value: function () {
|
|
2602
2606
|
var _fetchResourceOccupyDetailsByResourceId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(resourceId) {
|
|
2603
|
-
var _this$
|
|
2607
|
+
var _this$otherParams15, _this$otherParams15$g, _response$data$occupy, _response$data;
|
|
2604
2608
|
var formRecordId, shopId, response;
|
|
2605
2609
|
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
|
|
2606
2610
|
while (1) switch (_context36.prev = _context36.next) {
|
|
@@ -2612,7 +2616,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2612
2616
|
}
|
|
2613
2617
|
throw new Error("[ScanOrder] \u975E\u6CD5\u684C\u53F0 resourceId: ".concat(resourceId));
|
|
2614
2618
|
case 3:
|
|
2615
|
-
shopId = (_this$
|
|
2619
|
+
shopId = (_this$otherParams15 = this.otherParams) === null || _this$otherParams15 === void 0 || (_this$otherParams15$g = _this$otherParams15.getStateData) === null || _this$otherParams15$g === void 0 ? void 0 : _this$otherParams15$g.call(_this$otherParams15, 'shop_id');
|
|
2616
2620
|
if (shopId) {
|
|
2617
2621
|
_context36.next = 6;
|
|
2618
2622
|
break;
|
|
@@ -2706,18 +2710,18 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2706
2710
|
var hasOrderId,
|
|
2707
2711
|
normalizedResourceId,
|
|
2708
2712
|
_this$otherParams$bus,
|
|
2709
|
-
_this$otherParams15,
|
|
2710
|
-
_this$otherParams$cha,
|
|
2711
2713
|
_this$otherParams16,
|
|
2714
|
+
_this$otherParams$cha,
|
|
2712
2715
|
_this$otherParams17,
|
|
2713
|
-
_this$
|
|
2716
|
+
_this$otherParams18,
|
|
2717
|
+
_this$otherParams18$g,
|
|
2714
2718
|
_occupyDetails$,
|
|
2715
2719
|
_occupyDetail$form_re,
|
|
2716
2720
|
_occupyDetail$form_re2,
|
|
2717
2721
|
_this$store$order6,
|
|
2718
2722
|
_this$store$order7,
|
|
2719
2723
|
_this$store$order7$ge,
|
|
2720
|
-
_this$
|
|
2724
|
+
_this$otherParams19,
|
|
2721
2725
|
_this$store$resource3,
|
|
2722
2726
|
_this$store$resource4,
|
|
2723
2727
|
businessCode,
|
|
@@ -2775,11 +2779,11 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2775
2779
|
resourceId: normalizedResourceId
|
|
2776
2780
|
});
|
|
2777
2781
|
_context37.prev = 3;
|
|
2778
|
-
businessCode = String((_this$otherParams$bus = (_this$
|
|
2779
|
-
channel = String((_this$otherParams$cha = (_this$
|
|
2782
|
+
businessCode = String((_this$otherParams$bus = (_this$otherParams16 = this.otherParams) === null || _this$otherParams16 === void 0 ? void 0 : _this$otherParams16.businessCode) !== null && _this$otherParams$bus !== void 0 ? _this$otherParams$bus : '').trim();
|
|
2783
|
+
channel = String((_this$otherParams$cha = (_this$otherParams17 = this.otherParams) === null || _this$otherParams17 === void 0 ? void 0 : _this$otherParams17.channel) !== null && _this$otherParams$cha !== void 0 ? _this$otherParams$cha : '').trim();
|
|
2780
2784
|
openDataTarget = businessCode && channel ? "".concat(businessCode, "+").concat(channel) : 'dine_in+scan_to_order';
|
|
2781
2785
|
_context37.next = 9;
|
|
2782
|
-
return (_this$
|
|
2786
|
+
return (_this$otherParams18 = this.otherParams) === null || _this$otherParams18 === void 0 || (_this$otherParams18$g = _this$otherParams18.getOpenData) === null || _this$otherParams18$g === void 0 ? void 0 : _this$otherParams18$g.call(_this$otherParams18, {
|
|
2783
2787
|
scope: 'board',
|
|
2784
2788
|
target: openDataTarget,
|
|
2785
2789
|
section_code: ['basic', 'fulfillment', 'reservation', 'sale', 'menu', 'availability', 'workflow']
|
|
@@ -3043,7 +3047,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3043
3047
|
}, []) : []; // pax 由 setEntryPaxNumber 负责写入 itemRuleRuntimeConfig.pax
|
|
3044
3048
|
_context37.next = 79;
|
|
3045
3049
|
return this.setItemRuleRuntimeConfig({
|
|
3046
|
-
serviceType: (_this$
|
|
3050
|
+
serviceType: (_this$otherParams19 = this.otherParams) === null || _this$otherParams19 === void 0 ? void 0 : _this$otherParams19.businessCode,
|
|
3047
3051
|
submissionIndex: isAdditionalOrderMode ? 1 : 0,
|
|
3048
3052
|
historicalItems: historicalItems
|
|
3049
3053
|
});
|
|
@@ -3169,14 +3173,14 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3169
3173
|
key: "getProductList",
|
|
3170
3174
|
value: function () {
|
|
3171
3175
|
var _getProductList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
|
|
3172
|
-
var _this$
|
|
3176
|
+
var _this$otherParams20;
|
|
3173
3177
|
var associatedMenus, menu_list_ids, res, productList, formattedRes;
|
|
3174
3178
|
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
|
|
3175
3179
|
while (1) switch (_context40.prev = _context40.next) {
|
|
3176
3180
|
case 0:
|
|
3177
3181
|
this.logMethodStart('getProductList');
|
|
3178
3182
|
// 可以直接通过配置里的 menu 读取
|
|
3179
|
-
associatedMenus = (_this$
|
|
3183
|
+
associatedMenus = (_this$otherParams20 = this.otherParams) === null || _this$otherParams20 === void 0 || (_this$otherParams20 = _this$otherParams20.dineInConfig) === null || _this$otherParams20 === void 0 ? void 0 : _this$otherParams20['menu.associated_menus'];
|
|
3180
3184
|
menu_list_ids = associatedMenus.map(function (n) {
|
|
3181
3185
|
return Number(n.value);
|
|
3182
3186
|
}) || [];
|
|
@@ -3235,14 +3239,14 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3235
3239
|
key: "setOtherParams",
|
|
3236
3240
|
value: function () {
|
|
3237
3241
|
var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(params) {
|
|
3238
|
-
var
|
|
3239
|
-
|
|
3242
|
+
var _ref9,
|
|
3243
|
+
_ref9$cover,
|
|
3240
3244
|
cover,
|
|
3241
3245
|
_args41 = arguments;
|
|
3242
3246
|
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
|
|
3243
3247
|
while (1) switch (_context41.prev = _context41.next) {
|
|
3244
3248
|
case 0:
|
|
3245
|
-
|
|
3249
|
+
_ref9 = _args41.length > 1 && _args41[1] !== undefined ? _args41[1] : {}, _ref9$cover = _ref9.cover, cover = _ref9$cover === void 0 ? false : _ref9$cover;
|
|
3246
3250
|
if (cover) {
|
|
3247
3251
|
this.otherParams = params;
|
|
3248
3252
|
} else {
|
|
@@ -3393,7 +3397,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3393
3397
|
key: "syncAdditionalOrderFromResource",
|
|
3394
3398
|
value: function () {
|
|
3395
3399
|
var _syncAdditionalOrderFromResource = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(resourceId) {
|
|
3396
|
-
var
|
|
3400
|
+
var _ref10, _ref11, _ref12, _this$store$resource5, _this$store$resource6, _occupyDetails$2, _this$store$resource7, _this$otherParams21, _this$store$order8;
|
|
3397
3401
|
var tempOrder, normalizedResourceId, _result, occupyDetails, occupyDetail, resourceSelectType, allowAddItems, result;
|
|
3398
3402
|
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
|
|
3399
3403
|
while (1) switch (_context43.prev = _context43.next) {
|
|
@@ -3405,7 +3409,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3405
3409
|
throw new Error('order 模块未初始化');
|
|
3406
3410
|
case 2:
|
|
3407
3411
|
tempOrder = this.store.order.ensureTempOrder();
|
|
3408
|
-
normalizedResourceId = String((
|
|
3412
|
+
normalizedResourceId = String((_ref10 = (_ref11 = (_ref12 = resourceId !== null && resourceId !== void 0 ? resourceId : tempOrder.resource_id) !== null && _ref12 !== void 0 ? _ref12 : (_this$store$resource5 = this.store.resource) === null || _this$store$resource5 === void 0 ? void 0 : _this$store$resource5.relationId) !== null && _ref11 !== void 0 ? _ref11 : (_this$store$resource6 = this.store.resource) === null || _this$store$resource6 === void 0 ? void 0 : _this$store$resource6.relation_id) !== null && _ref10 !== void 0 ? _ref10 : '').trim();
|
|
3409
3413
|
this.logMethodStart('syncAdditionalOrderFromResource', {
|
|
3410
3414
|
resourceId: normalizedResourceId
|
|
3411
3415
|
});
|
|
@@ -3426,7 +3430,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3426
3430
|
occupyDetails = _context43.sent;
|
|
3427
3431
|
occupyDetail = (_occupyDetails$2 = occupyDetails[0]) !== null && _occupyDetails$2 !== void 0 ? _occupyDetails$2 : null;
|
|
3428
3432
|
resourceSelectType = ((_this$store$resource7 = this.store.resource) === null || _this$store$resource7 === void 0 ? void 0 : _this$store$resource7.resourceSelectType) || this.resolveResourceSelectType(toPositiveString(occupyDetail === null || occupyDetail === void 0 ? void 0 : occupyDetail.form_id));
|
|
3429
|
-
allowAddItems = toBoolean((_this$
|
|
3433
|
+
allowAddItems = toBoolean((_this$otherParams21 = this.otherParams) === null || _this$otherParams21 === void 0 || (_this$otherParams21 = _this$otherParams21.dineInConfig) === null || _this$otherParams21 === void 0 ? void 0 : _this$otherParams21['sale.allow_add_items']);
|
|
3430
3434
|
result = this.resolveAdditionalOrderFromOccupyDetail(occupyDetail, resourceSelectType, allowAddItems);
|
|
3431
3435
|
if (!(!result.matched || !result.order_id)) {
|
|
3432
3436
|
_context43.next = 19;
|
|
@@ -3484,9 +3488,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3484
3488
|
}, {
|
|
3485
3489
|
key: "checkAllowAddItems",
|
|
3486
3490
|
value: function checkAllowAddItems() {
|
|
3487
|
-
var _this$
|
|
3491
|
+
var _this$otherParams22;
|
|
3488
3492
|
this.logMethodStart('checkAllowAddItems');
|
|
3489
|
-
var dineInConfig = ((_this$
|
|
3493
|
+
var dineInConfig = ((_this$otherParams22 = this.otherParams) === null || _this$otherParams22 === void 0 ? void 0 : _this$otherParams22.dineInConfig) || {};
|
|
3490
3494
|
var result = {
|
|
3491
3495
|
enabled: toBoolean(dineInConfig['sale.allow_add_items'])
|
|
3492
3496
|
};
|
|
@@ -3499,9 +3503,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3499
3503
|
}, {
|
|
3500
3504
|
key: "getFulfillmentModes",
|
|
3501
3505
|
value: function getFulfillmentModes() {
|
|
3502
|
-
var _this$
|
|
3506
|
+
var _this$otherParams23;
|
|
3503
3507
|
this.logMethodStart('getFulfillmentModes');
|
|
3504
|
-
var dineInConfig = ((_this$
|
|
3508
|
+
var dineInConfig = ((_this$otherParams23 = this.otherParams) === null || _this$otherParams23 === void 0 ? void 0 : _this$otherParams23.dineInConfig) || {};
|
|
3505
3509
|
var result = {
|
|
3506
3510
|
enablePickup: Boolean(dineInConfig['fulfillment.enable_pickup']),
|
|
3507
3511
|
enableTableService: Boolean(dineInConfig['fulfillment.enable_table_service'])
|
|
@@ -3515,9 +3519,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3515
3519
|
}, {
|
|
3516
3520
|
key: "checkManualPickupRef",
|
|
3517
3521
|
value: function checkManualPickupRef() {
|
|
3518
|
-
var _this$
|
|
3522
|
+
var _this$otherParams24;
|
|
3519
3523
|
this.logMethodStart('checkManualPickupRef');
|
|
3520
|
-
var dineInConfig = ((_this$
|
|
3524
|
+
var dineInConfig = ((_this$otherParams24 = this.otherParams) === null || _this$otherParams24 === void 0 ? void 0 : _this$otherParams24.dineInConfig) || {};
|
|
3521
3525
|
var refMode = dineInConfig['fulfillment.fulfillment_ref_mode'];
|
|
3522
3526
|
var manualInputType = dineInConfig['fulfillment.manual_input_type'];
|
|
3523
3527
|
var enabled = refMode === 'manual_input';
|
|
@@ -44,6 +44,8 @@ export interface ScanOrderProductSku {
|
|
|
44
44
|
export interface ScanOrderOrderProduct extends ScanOrderOrderProductIdentity {
|
|
45
45
|
order_detail_id: number | null;
|
|
46
46
|
num: number;
|
|
47
|
+
/** Product 或当前 Variant 的生产编码 */
|
|
48
|
+
production_code?: string;
|
|
47
49
|
product_sku: ScanOrderProductSku;
|
|
48
50
|
/**
|
|
49
51
|
* 券后 **行 composite 单价** = `metadata.main_product_selling_price`
|
|
@@ -309,6 +309,7 @@ export function aggregateItemRuleLimit(matchedLimits) {
|
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
311
|
export function buildItemRuleBusinessData(params) {
|
|
312
|
+
var _runtimeConfig$channe, _runtimeConfig$custom;
|
|
312
313
|
var tempOrder = params.tempOrder,
|
|
313
314
|
runtimeConfig = params.runtimeConfig,
|
|
314
315
|
itemRuleConfigs = params.itemRuleConfigs;
|
|
@@ -345,6 +346,7 @@ export function buildItemRuleBusinessData(params) {
|
|
|
345
346
|
cartItems: cartItems,
|
|
346
347
|
historicalItems: historicalItems,
|
|
347
348
|
serviceType: runtimeConfig.serviceType || 'dine-in',
|
|
349
|
+
channel: (_runtimeConfig$channe = runtimeConfig.channel) !== null && _runtimeConfig$channe !== void 0 ? _runtimeConfig$channe : (_runtimeConfig$custom = runtimeConfig.custom) === null || _runtimeConfig$custom === void 0 ? void 0 : _runtimeConfig$custom.channel,
|
|
348
350
|
submissionIndex: typeof runtimeConfig.submissionIndex === 'number' ? toNonNegativeInt(runtimeConfig.submissionIndex) : tempOrder.order_id ? 1 : 0,
|
|
349
351
|
custom: runtimeConfig.custom || {},
|
|
350
352
|
strategyConfigs: itemRuleConfigs
|
|
@@ -660,11 +662,14 @@ export function normalizeOrderProduct(product) {
|
|
|
660
662
|
sellingPrice: composedSellingPrice,
|
|
661
663
|
quantity: getSafeProductNum(product.num)
|
|
662
664
|
});
|
|
663
|
-
return {
|
|
665
|
+
return _objectSpread(_objectSpread({
|
|
664
666
|
order_detail_id: product.order_detail_id || null,
|
|
665
667
|
product_id: product.product_id,
|
|
666
668
|
num: getSafeProductNum(product.num),
|
|
667
|
-
product_variant_id: product.product_variant_id
|
|
669
|
+
product_variant_id: product.product_variant_id
|
|
670
|
+
}, product.production_code !== undefined && product.production_code !== null ? {
|
|
671
|
+
production_code: String(product.production_code).trim()
|
|
672
|
+
} : {}), {}, {
|
|
668
673
|
product_sku: productSku,
|
|
669
674
|
selling_price: composedSellingPrice,
|
|
670
675
|
original_price: manualOriginalPrice,
|
|
@@ -674,7 +679,7 @@ export function normalizeOrderProduct(product) {
|
|
|
674
679
|
product_bundle: normalizedBundle,
|
|
675
680
|
metadata: metadata,
|
|
676
681
|
note: product.note != null ? String(product.note) : ''
|
|
677
|
-
};
|
|
682
|
+
});
|
|
678
683
|
}
|
|
679
684
|
|
|
680
685
|
/**
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import type { Module } from '../../types';
|
|
1
|
+
import type { Module, ModuleOptions, PisellCore } from '../../types';
|
|
2
2
|
import type { ProductData } from '../../modules';
|
|
3
3
|
import type { OpenDataConfig } from '../../modules/OpenData';
|
|
4
4
|
import type { LoadScheduleAvailableDateParams, ScheduleItem } from '../../modules/Schedule/types';
|
|
5
|
-
import type { ProductListLoadProductsParams } from '../../modules/ProductList';
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
5
|
+
import type { ProductListLoadProductsParams, ProductListStoreQueryParams } from '../../modules/ProductList';
|
|
6
|
+
import type { AvailabilityDateRange, AvailabilityOccupancy, AvailabilityProduct, AvailabilityResource, GetProductTimeRangesRequest } from '../../modules/ResourcePlanner';
|
|
7
|
+
import type { AvailabilityContextRef, ContextualAvailabilityQuery, ContextualAvailabilityQueryResult, ContextualCommitAvailabilitySelectionParams, ContextualProductTimeRangeGroup, UnifiedBookingSalesAddRetailProductParams, UnifiedBookingSalesApplyPlannerDiscountsParams, UnifiedBookingSalesCommitAvailabilitySelectionResult, UnifiedBookingSalesDiscountResult, UnifiedBookingSalesLoadProductsByScheduleDateParams, UnifiedBookingSalesLoadOpenDataParams, UnifiedBookingSalesPrepareAvailabilityProjectionParams, UnifiedBookingSalesPolicyResponse, UnifiedBookingSalesResolveProductAllergyRequirementParams, UnifiedBookingSalesStageRetailProductsParams, UnifiedBookingSalesState } from './types';
|
|
8
8
|
import { BookingTicket } from '../BookingTicket';
|
|
9
|
+
import type { AllergyRequirement } from '../../model/strategy/adapter/itemRule';
|
|
9
10
|
export * from './types';
|
|
11
|
+
export { AvailabilityError } from '../../modules/ResourcePlanner';
|
|
10
12
|
/**
|
|
11
13
|
* Converts Rules/Order discount internals into a small UI-facing diagnostic. The result keeps
|
|
12
14
|
* candidate-card state separate from line-level applications: a selected card is not proof that
|
|
@@ -22,39 +24,37 @@ export declare function buildPlannerDiscountResult(params: {
|
|
|
22
24
|
preferredDiscountId?: number | string;
|
|
23
25
|
preferredDiscountFound?: boolean;
|
|
24
26
|
}): UnifiedBookingSalesDiscountResult;
|
|
25
|
-
/** Converts
|
|
26
|
-
export declare function
|
|
27
|
+
/** Converts ProductList and schedule records into the pure Availability vocabulary. */
|
|
28
|
+
export declare function normalizeProductForAvailability(product: ProductData | Record<string, any>, scheduleList?: ScheduleItem[], fixedOffsetMinutes?: number): AvailabilityProduct;
|
|
27
29
|
/**
|
|
28
30
|
* Materializes resource work windows locally from v2's schedule ids, then keeps its flat
|
|
29
|
-
* event_list as
|
|
31
|
+
* event_list as resource occupancy records. This deliberately avoids the older API's times -> event_list
|
|
30
32
|
* response nesting and lets one resource response serve any requested date range.
|
|
31
33
|
*/
|
|
32
|
-
export declare function
|
|
34
|
+
export declare function buildAvailabilityResourcesFromV2(params: {
|
|
33
35
|
rawResources: Record<string, any>[];
|
|
34
36
|
scheduleList: ScheduleItem[];
|
|
35
|
-
dateRange?:
|
|
37
|
+
dateRange?: AvailabilityDateRange;
|
|
38
|
+
fixedOffsetMinutes?: number;
|
|
36
39
|
}): {
|
|
37
|
-
resources:
|
|
38
|
-
|
|
40
|
+
resources: AvailabilityResource[];
|
|
41
|
+
resourceOccupancies: AvailabilityOccupancy[];
|
|
39
42
|
};
|
|
40
43
|
/** Combines URL-locked resources with every resource referenced by the selected products. */
|
|
41
|
-
export declare function
|
|
42
|
-
|
|
43
|
-
export declare function
|
|
44
|
-
assignment:
|
|
45
|
-
product:
|
|
44
|
+
export declare function collectAvailabilityResourceIds(products: AvailabilityProduct[], explicitResourceIds?: Array<number | string>): Array<number | string>;
|
|
45
|
+
export declare function buildAvailabilityLineIdentity(product: Record<string, any>): Record<string, any>;
|
|
46
|
+
export declare function buildBookingFromAvailabilityAssignment(params: {
|
|
47
|
+
assignment: Record<string, any>;
|
|
48
|
+
product: AvailabilityProduct;
|
|
49
|
+
timezone?: string;
|
|
50
|
+
fixedOffsetMinutes?: number;
|
|
46
51
|
}): Record<string, any>;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
export declare function buildBookingFromAssignments(params: {
|
|
53
|
-
assignments: ResourcePlannerAssignment[];
|
|
54
|
-
product: ResourcePlannerProduct;
|
|
52
|
+
export declare function buildBookingFromAvailabilityAssignments(params: {
|
|
53
|
+
assignments: Record<string, any>[];
|
|
54
|
+
product: AvailabilityProduct;
|
|
55
|
+
timezone?: string;
|
|
56
|
+
fixedOffsetMinutes?: number;
|
|
55
57
|
}): Record<string, any>;
|
|
56
|
-
/** Builds the exact identity BaseSales needs to remove only this solution's order lines. */
|
|
57
|
-
export declare function buildPlannerLineIdentity(product: Record<string, any>): Record<string, any>;
|
|
58
58
|
export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
59
59
|
protected defaultName: string;
|
|
60
60
|
protected defaultVersion: string;
|
|
@@ -63,7 +63,55 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
63
63
|
private openDataTarget;
|
|
64
64
|
private loadOpenDataInFlight;
|
|
65
65
|
private loadOpenDataInFlightTarget;
|
|
66
|
+
private availabilityRuntimeOffsetMinutes;
|
|
67
|
+
private availabilityScheduleCatalog;
|
|
68
|
+
private availabilityProjectionSequence;
|
|
69
|
+
private availabilityContextSequence;
|
|
70
|
+
private availabilityLifecycleGeneration;
|
|
71
|
+
private availabilityContextRegistry;
|
|
72
|
+
private availabilityProjectionPool;
|
|
73
|
+
private availabilityPrepareInFlight;
|
|
74
|
+
private availabilityProjectionRefreshInFlight;
|
|
75
|
+
private availabilityRemoteOccupancyCache;
|
|
76
|
+
private availabilityRemoteResourceQueryInFlight;
|
|
77
|
+
private availabilityRemoteResourceQuerySequence;
|
|
78
|
+
private availabilityRemoteResourceEpoch;
|
|
79
|
+
private availabilityCommitLocks;
|
|
80
|
+
private allergyItemRuleEvaluator;
|
|
81
|
+
private allergyItemRuleConfigs;
|
|
82
|
+
private allergyItemRuleConfigsPromise;
|
|
83
|
+
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
66
84
|
protected getSubmitOrderSalesChannel(): string;
|
|
85
|
+
private createAvailabilityFacadeError;
|
|
86
|
+
private getAvailabilityScopeDescriptor;
|
|
87
|
+
private normalizeAvailabilityIdList;
|
|
88
|
+
private normalizeAvailabilityStringList;
|
|
89
|
+
private normalizeAvailabilityPrepareDescriptor;
|
|
90
|
+
private resolveAvailabilityPrepareDefaults;
|
|
91
|
+
private buildAvailabilityPrepareKey;
|
|
92
|
+
private clearAvailabilityRemoteResourceState;
|
|
93
|
+
private buildAvailabilityRemoteResourceScopeKey;
|
|
94
|
+
private buildAvailabilityRemoteResourceQueryKey;
|
|
95
|
+
setOtherParams(params: Record<string, any>, { cover }?: {
|
|
96
|
+
cover?: boolean;
|
|
97
|
+
}): Promise<void>;
|
|
98
|
+
destroy(): Promise<void>;
|
|
99
|
+
private createAvailabilityContextId;
|
|
100
|
+
private buildAvailabilityProjectionKey;
|
|
101
|
+
private getAvailabilityRuntimeOffsetMinutes;
|
|
102
|
+
private getAvailabilityRuntimeDateTime;
|
|
103
|
+
private cloneAvailabilityPrepareParams;
|
|
104
|
+
private getAvailabilityDurationCandidateAnchorAt;
|
|
105
|
+
private createAvailabilityContextRef;
|
|
106
|
+
private emitAvailabilityDiagnostic;
|
|
107
|
+
private touchAvailabilityContext;
|
|
108
|
+
private touchAvailabilityProjection;
|
|
109
|
+
private removeAvailabilityProjection;
|
|
110
|
+
private removeAvailabilityContext;
|
|
111
|
+
private evictAvailabilityProjectionPool;
|
|
112
|
+
private evictAvailabilityContextRegistry;
|
|
113
|
+
private invalidateAvailabilityContextsAfterCommit;
|
|
114
|
+
private resetAvailabilityProjectionState;
|
|
67
115
|
protected isSessionStoragePersistEnabled(): boolean;
|
|
68
116
|
protected shouldUseSessionStorageForSubModule(moduleName?: string): boolean;
|
|
69
117
|
/**
|
|
@@ -103,6 +151,18 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
103
151
|
*/
|
|
104
152
|
loadOpenData(params: UnifiedBookingSalesLoadOpenDataParams): Promise<OpenDataConfig>;
|
|
105
153
|
getOpenData(): Promise<OpenDataConfig | null>;
|
|
154
|
+
private resetAllergyItemRuleState;
|
|
155
|
+
private fetchAllergyItemRuleConfigs;
|
|
156
|
+
private ensureAllergyItemRuleConfigsLoaded;
|
|
157
|
+
/**
|
|
158
|
+
* 评估当前渠道与商品是否命中 ALLERGY_CHECK。
|
|
159
|
+
* 只返回优先级最高 Action 中当前商品 Target 的 dataSource,不跨商品或 Action 合并。
|
|
160
|
+
*/
|
|
161
|
+
resolveProductAllergyRequirement(params: UnifiedBookingSalesResolveProductAllergyRequirementParams): Promise<AllergyRequirement | null>;
|
|
162
|
+
/**
|
|
163
|
+
* Load a resource policy without depending on the legacy appointmentBooking solution.
|
|
164
|
+
*/
|
|
165
|
+
getProtocol(policyId: string | number): Promise<UnifiedBookingSalesPolicyResponse>;
|
|
106
166
|
/**
|
|
107
167
|
* Loads the product catalog used by both UI and Planner. Schedule data is requested with each
|
|
108
168
|
* product because session products carry their fixed intervals there.
|
|
@@ -111,6 +171,7 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
111
171
|
callback?: (result: any) => void;
|
|
112
172
|
subscriberId?: string;
|
|
113
173
|
}): Promise<ProductData[]>;
|
|
174
|
+
queryProducts(params?: ProductListStoreQueryParams): Promise<ProductData[]>;
|
|
114
175
|
/** Date-first entry point. It delegates protocol details and cache ownership to ScheduleModule. */
|
|
115
176
|
loadScheduleAvailableDate(params: LoadScheduleAvailableDateParams): Promise<import("../../modules/Date/types").ITime[]>;
|
|
116
177
|
/**
|
|
@@ -133,17 +194,10 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
133
194
|
* diagnostic boundary for new booking skins: no pricing logic is duplicated in the planner.
|
|
134
195
|
*/
|
|
135
196
|
applyPlannerDiscounts(params?: UnifiedBookingSalesApplyPlannerDiscountsParams): Promise<UnifiedBookingSalesDiscountResult>;
|
|
136
|
-
/** ResourcePlanner is a required child module; fail early instead of producing partial availability. */
|
|
137
|
-
private getPlanner;
|
|
138
197
|
private buildUnifiedOrderProduct;
|
|
139
198
|
/** Replacing a staged selection is idempotent and never removes unrelated cart lines. */
|
|
140
199
|
private removeExistingStagedLines;
|
|
141
200
|
private stageProducts;
|
|
142
|
-
/**
|
|
143
|
-
* Adds the current product choice to an otherwise clean planner cart without creating bookings.
|
|
144
|
-
* This separates "what the customer wants" from the later time/resource confirmation step.
|
|
145
|
-
*/
|
|
146
|
-
stagePlannerProducts(params: UnifiedBookingSalesStagePlannerProductsParams): Promise<Record<string, any> | null>;
|
|
147
201
|
/**
|
|
148
202
|
* Adds ordinary retail products without asking ResourcePlanner for booking facts.
|
|
149
203
|
* Its staged lines have separate ownership so planner and retail skins can coexist safely.
|
|
@@ -155,50 +209,50 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
155
209
|
* "replace the staged selection" for demo and wizard-like callers.
|
|
156
210
|
*/
|
|
157
211
|
addRetailProduct(params: UnifiedBookingSalesAddRetailProductParams): Promise<Record<string, any>[]>;
|
|
158
|
-
|
|
159
|
-
private
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
*/
|
|
166
|
-
private ensurePlannerSchedulesForResources;
|
|
212
|
+
private normalizeAvailabilityDateRange;
|
|
213
|
+
private assertAvailabilityPrepareParams;
|
|
214
|
+
private captureAvailabilityScheduleCatalog;
|
|
215
|
+
/** Returns the solution-lifetime schedule snapshot captured after initialization. */
|
|
216
|
+
private getAvailabilityScheduleCatalog;
|
|
217
|
+
private buildAvailabilityOperatingHoursSnapshot;
|
|
218
|
+
private loadAvailabilityProducts;
|
|
167
219
|
/**
|
|
168
220
|
* Fetches resource metadata plus flat occupied events. Work windows are intentionally derived
|
|
169
|
-
* locally in
|
|
221
|
+
* locally in buildAvailabilityResourcesFromV2 from /schedule, rather than requested from the legacy
|
|
170
222
|
* resource dates endpoint.
|
|
171
223
|
*/
|
|
172
|
-
private
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
private
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
224
|
+
private fetchAvailabilityResourcesV2;
|
|
225
|
+
private fetchAndPublishAvailabilityResourcesV2;
|
|
226
|
+
private refreshAvailabilityRemoteResourceQuery;
|
|
227
|
+
private loadAvailabilityResources;
|
|
228
|
+
private resolveEditingOccupancyExclusions;
|
|
229
|
+
private occupancyIsExcluded;
|
|
230
|
+
private collectCartResourceOccupancies;
|
|
231
|
+
private getCurrentOrderRevision;
|
|
232
|
+
private getAvailabilityContextEntry;
|
|
233
|
+
private getAvailabilityProjectionByKey;
|
|
234
|
+
private getActiveAvailabilityProjectionEntry;
|
|
235
|
+
private decorateAvailabilityCandidate;
|
|
236
|
+
private assertAvailabilityCandidateFreshness;
|
|
237
|
+
private assertContextualQueryFreshness;
|
|
238
|
+
private storeAvailabilityProjectionEntry;
|
|
239
|
+
private buildAvailabilityProjectionSnapshot;
|
|
240
|
+
private getSharedPreparedAvailabilitySnapshot;
|
|
241
|
+
private refreshAvailabilityContextProjection;
|
|
242
|
+
private ensureAvailabilityContextProjection;
|
|
243
|
+
private tryAcquireAvailabilityCommitLock;
|
|
244
|
+
private releaseAvailabilityCommitLock;
|
|
245
|
+
/** IO boundary: loads catalog, schedules, resources, occupancies, and registers one context. */
|
|
246
|
+
prepareAvailabilityProjection(params: UnifiedBookingSalesPrepareAvailabilityProjectionParams): Promise<AvailabilityContextRef>;
|
|
247
|
+
/** Candidate calculation over the current context projection and runtime minute. */
|
|
248
|
+
getProductTimeRanges(contextId: string, request?: GetProductTimeRangesRequest): Promise<ContextualProductTimeRangeGroup[]>;
|
|
249
|
+
/** Thin facade: auto-refresh on cart drift, then delegate to the pure projection query. */
|
|
250
|
+
queryBookingAvailability(contextId: string, request: ContextualAvailabilityQuery): Promise<ContextualAvailabilityQueryResult>;
|
|
251
|
+
releaseAvailabilityContext(contextId: string): void;
|
|
252
|
+
private assertAvailabilityCommitWriteCAS;
|
|
253
|
+
private findProductLineByUid;
|
|
254
|
+
private findLinkedBooking;
|
|
255
|
+
/** Revalidates against the latest landed occupancy cache, then mutates exactly one product line. */
|
|
256
|
+
commitAvailabilitySelection(contextId: string, params: ContextualCommitAvailabilitySelectionParams): Promise<UnifiedBookingSalesCommitAvailabilitySelectionResult>;
|
|
203
257
|
}
|
|
204
258
|
export declare const UnifiedBookingSales: typeof UnifiedBookingSalesImpl;
|