@pisell/pisellos 2.3.190 → 2.3.192

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.
Files changed (63) hide show
  1. package/dist/model/strategy/adapter/promotion/index.js +0 -9
  2. package/dist/modules/BookingContext/index.d.ts +2 -2
  3. package/dist/modules/BookingContext/index.js +55 -25
  4. package/dist/modules/BookingContext/types.d.ts +2 -0
  5. package/dist/modules/Order/index.d.ts +13 -5
  6. package/dist/modules/Order/index.js +1053 -554
  7. package/dist/modules/Order/types.d.ts +20 -1
  8. package/dist/modules/Order/types.js +4 -0
  9. package/dist/modules/Product/index.d.ts +1 -1
  10. package/dist/modules/ProductList/clientDataVariants.js +6 -2
  11. package/dist/modules/ProductList/index.d.ts +2 -0
  12. package/dist/modules/ProductList/index.js +125 -39
  13. package/dist/modules/ResourcePlanner/planner.js +5 -0
  14. package/dist/server/index.d.ts +3 -0
  15. package/dist/server/index.js +1105 -976
  16. package/dist/shared/receipt/small-ticket.js +33 -5
  17. package/dist/solution/BaseSales/index.d.ts +14 -3
  18. package/dist/solution/BaseSales/index.js +285 -195
  19. package/dist/solution/BookingByStep/index.d.ts +2 -2
  20. package/dist/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
  21. package/dist/solution/UnifiedBookingSales/catalogQueryBatch.js +202 -0
  22. package/dist/solution/UnifiedBookingSales/index.d.ts +49 -1
  23. package/dist/solution/UnifiedBookingSales/index.js +2276 -902
  24. package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
  25. package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.js +4 -0
  26. package/dist/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
  27. package/dist/solution/UnifiedBookingSales/sessionResourceCache.js +271 -0
  28. package/dist/solution/UnifiedBookingSales/types.d.ts +64 -1
  29. package/dist/solution/UnifiedBookingSales/types.js +7 -1
  30. package/dist/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
  31. package/dist/solution/UnifiedBookingSales/venueCatalogSession.js +277 -0
  32. package/lib/model/strategy/adapter/promotion/index.js +46 -1
  33. package/lib/modules/BookingContext/index.d.ts +2 -2
  34. package/lib/modules/BookingContext/index.js +42 -10
  35. package/lib/modules/BookingContext/types.d.ts +2 -0
  36. package/lib/modules/Order/index.d.ts +13 -5
  37. package/lib/modules/Order/index.js +208 -7
  38. package/lib/modules/Order/types.d.ts +20 -1
  39. package/lib/modules/Order/types.js +2 -0
  40. package/lib/modules/Product/index.d.ts +1 -1
  41. package/lib/modules/ProductList/clientDataVariants.js +6 -2
  42. package/lib/modules/ProductList/index.d.ts +2 -0
  43. package/lib/modules/ProductList/index.js +56 -0
  44. package/lib/modules/ResourcePlanner/planner.js +4 -0
  45. package/lib/server/index.d.ts +3 -0
  46. package/lib/server/index.js +86 -5
  47. package/lib/shared/receipt/small-ticket.js +30 -5
  48. package/lib/solution/BaseSales/index.d.ts +14 -3
  49. package/lib/solution/BaseSales/index.js +67 -2
  50. package/lib/solution/BookingByStep/index.d.ts +2 -2
  51. package/lib/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
  52. package/lib/solution/UnifiedBookingSales/catalogQueryBatch.js +109 -0
  53. package/lib/solution/UnifiedBookingSales/index.d.ts +49 -1
  54. package/lib/solution/UnifiedBookingSales/index.js +872 -55
  55. package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
  56. package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +2 -0
  57. package/lib/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
  58. package/lib/solution/UnifiedBookingSales/sessionResourceCache.js +199 -0
  59. package/lib/solution/UnifiedBookingSales/types.d.ts +64 -1
  60. package/lib/solution/UnifiedBookingSales/types.js +4 -1
  61. package/lib/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
  62. package/lib/solution/UnifiedBookingSales/venueCatalogSession.js +151 -0
  63. package/package.json +1 -1
@@ -487,11 +487,22 @@ export interface AddProductToOrderOptions {
487
487
  /** 发布后的订单/业务归属检查;只用于阻止旧异步收尾写入新单,不再校验截止或 revision。 */
488
488
  availabilityCommitTargetGuard?: () => boolean;
489
489
  }
490
+ /** Atomic replacement of one unsubmitted Party booking and its explicitly confirmed retail children. */
491
+ export interface ReplaceBookingProductWithRelatedRetailParams {
492
+ productLineUid: string;
493
+ product: Partial<OrderProduct> & OrderProductIdentity;
494
+ booking: AddProductBookingInput;
495
+ relatedRetailProducts: Array<Partial<OrderProduct> & OrderProductIdentity>;
496
+ availabilityCommitGuard: () => void;
497
+ availabilityCommitTargetGuard?: () => boolean;
498
+ }
490
499
  /**
491
500
  * 删除商品后的可选位置保持策略。
492
501
  * 预约合并行减量时仍删除最新真实行,再把剩余代表行移动到被删除代表行原位置。
493
502
  */
494
503
  export interface RemoveProductsFromOrderOptions {
504
+ /** Validate the selected row/cascade snapshot before mutation; may throw. Not called during finalization. */
505
+ beforeApply?: () => void;
495
506
  /** 自动购物车写入的订单归属检查;失效时不再变更或发布异步收尾结果。 */
496
507
  isCurrentOrder?: () => boolean;
497
508
  preserveDisplayPosition?: {
@@ -536,6 +547,13 @@ export interface UpdateOrderProductParams {
536
547
  */
537
548
  allow_booking_discount_reapply?: boolean;
538
549
  }
550
+ /** Opt-in atomic draft update for asynchronous re-quotation callers. */
551
+ export interface UpdateOrderProductsOptions {
552
+ /** Validate the quoted source snapshot immediately before publication; may throw. */
553
+ beforeApply?: () => void;
554
+ /** Order/business ownership only. Called after publication too; exclude old prices/quantities. */
555
+ isCurrentOrder?: () => boolean;
556
+ }
539
557
  /** 仅更新购物车行数量;行定位语义与 updateOrderProduct / removeProductFromOrder 保持一致 */
540
558
  export interface UpdateOrderProductQuantityParams extends OrderProductIdentity {
541
559
  num: number;
@@ -932,6 +950,7 @@ export interface OrderModuleAPI {
932
950
  updateTempOrderBuzzer: (buzzer: string) => string;
933
951
  updateTempOrderContactsInfo: (contactsInfo: Record<string, any> | null) => Record<string, any> | null;
934
952
  addProductToOrder: (product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput, options?: AddProductToOrderOptions) => Promise<OrderProduct[]>;
953
+ replaceBookingProductWithRelatedRetail: (params: ReplaceBookingProductWithRelatedRetailParams) => Promise<OrderProduct[]>;
935
954
  getSalesNotes: () => SalesNote[];
936
955
  createSalesNotesMutationSnapshot: () => SalesNotesMutationSnapshot;
937
956
  restoreSalesNotesMutationSnapshot: (snapshot: SalesNotesMutationSnapshot) => void;
@@ -940,7 +959,7 @@ export interface OrderModuleAPI {
940
959
  clearSalesNotes: () => Promise<void>;
941
960
  updateOrderProduct: (params: UpdateOrderProductParams) => Promise<OrderProduct[]>;
942
961
  /** 批量更新购物车行,末尾仅触发一次促销重算与 summary 刷新 */
943
- updateOrderProducts: (paramsList: UpdateOrderProductParams[]) => Promise<OrderProduct[]>;
962
+ updateOrderProducts: (paramsList: UpdateOrderProductParams[], options?: UpdateOrderProductsOptions) => Promise<OrderProduct[]>;
944
963
  updateOrderProductQuantity: (params: UpdateOrderProductQuantityParams, options?: {
945
964
  isCurrentOrder?: () => boolean;
946
965
  }) => Promise<OrderProduct[]>;
@@ -77,6 +77,8 @@ export var OrderHooks = /*#__PURE__*/function (OrderHooks) {
77
77
  * 避免步进器修改数量改变该组展示位置。
78
78
  */
79
79
 
80
+ /** Atomic replacement of one unsubmitted Party booking and its explicitly confirmed retail children. */
81
+
80
82
  /**
81
83
  * 删除商品后的可选位置保持策略。
82
84
  * 预约合并行减量时仍删除最新真实行,再把剩余代表行移动到被删除代表行原位置。
@@ -84,6 +86,8 @@ export var OrderHooks = /*#__PURE__*/function (OrderHooks) {
84
86
 
85
87
  /** 更新购物车行:仅传 SKU 时命中同 SKU 第一行;多行同 SKU 须传 unique_identification_number / 选项指纹等 */
86
88
 
89
+ /** Opt-in atomic draft update for asynchronous re-quotation callers. */
90
+
87
91
  /** 仅更新购物车行数量;行定位语义与 updateOrderProduct / removeProductFromOrder 保持一致 */
88
92
 
89
93
  /**
@@ -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(): "duration" | "normal" | "session";
52
+ getProductType(): "normal" | "duration" | "session";
53
53
  }
@@ -39,7 +39,9 @@ function collectReferencedRuleIds(products) {
39
39
  variants.forEach(function (variant) {
40
40
  var _variant$data_variant;
41
41
  var id = String((_variant$data_variant = variant === null || variant === void 0 ? void 0 : variant.data_variant_rule_id) !== null && _variant$data_variant !== void 0 ? _variant$data_variant : '').trim();
42
- if (id) ids.add(id);
42
+ // Rule 0 is the default-variant sentinel, not a strategy to load.
43
+ // Keep the evaluator responsible for its pricing/settlement semantics.
44
+ if (id && Number(id) !== 0) ids.add(id);
43
45
  });
44
46
  };
45
47
  products.forEach(function (product) {
@@ -60,13 +62,15 @@ function isEvaluatorReady(evaluator, products) {
60
62
  // A referenced Data Variant cannot be evaluated authoritatively until those
61
63
  // configs have arrived. Evaluators without this capability remain compatible.
62
64
  if (typeof evaluator.getStrategyConfigs === 'function') {
65
+ var referencedRuleIds = collectReferencedRuleIds(products);
66
+ if (referencedRuleIds.size === 0) return true;
63
67
  var configs = evaluator.getStrategyConfigs();
64
68
  if (!Array.isArray(configs) || configs.length === 0) return false;
65
69
  var availableRuleIds = new Set(configs.map(function (config) {
66
70
  var _config$metadata$id, _config$metadata;
67
71
  return String((_config$metadata$id = config === null || config === void 0 || (_config$metadata = config.metadata) === null || _config$metadata === void 0 ? void 0 : _config$metadata.id) !== null && _config$metadata$id !== void 0 ? _config$metadata$id : '').trim();
68
72
  }).filter(Boolean));
69
- return Array.from(collectReferencedRuleIds(products)).every(function (id) {
73
+ return Array.from(referencedRuleIds).every(function (id) {
70
74
  return availableRuleIds.has(id);
71
75
  });
72
76
  }
@@ -37,6 +37,8 @@ export declare class ProductList extends BaseModule implements Module {
37
37
  schedule_date?: string;
38
38
  channel?: string;
39
39
  }): Promise<any>;
40
+ /** Venue-only raw, complete pool load. No date/customer evaluation and no shared catalog publication. */
41
+ loadVenueCatalogPool(params?: Pick<ProductListLoadProductsParams, 'product_ids' | 'collection' | 'category_ids' | 'extension_type' | 'cacheId'>): Promise<ProductData[]>;
40
42
  /**
41
43
  * Remember raw remote product records before client-side Data Variant
42
44
  * evaluation. Quote-only reads can then always start from a clean baseline.
@@ -411,11 +411,97 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
411
411
  return _loadProductsPrice.apply(this, arguments);
412
412
  }
413
413
  return loadProductsPrice;
414
+ }() /** Venue-only raw, complete pool load. No date/customer evaluation and no shared catalog publication. */
415
+ }, {
416
+ key: "loadVenueCatalogPool",
417
+ value: (function () {
418
+ var _loadVenueCatalogPool = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
419
+ var _this$otherParams5, _params$product_ids, _params$category_ids, _params$extension_typ, _ref4, _data$total;
420
+ var params,
421
+ channelMap,
422
+ channel,
423
+ response,
424
+ data,
425
+ total,
426
+ _args7 = arguments;
427
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
428
+ while (1) switch (_context7.prev = _context7.next) {
429
+ case 0:
430
+ params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
431
+ channelMap = {
432
+ online_store: 'online-store',
433
+ scan_to_order: 'online-store',
434
+ 'scan-to-order': 'online-store',
435
+ scan_to_order_2: 'online-store',
436
+ scan_to_order_3: 'scantoorder3'
437
+ };
438
+ channel = (_this$otherParams5 = this.otherParams) === null || _this$otherParams5 === void 0 ? void 0 : _this$otherParams5.channel;
439
+ _context7.next = 5;
440
+ return this.request.post('/product/query', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
441
+ // The customer endpoint otherwise filters out future/variant members.
442
+ open_quotation: 0,
443
+ open_bundle: 1,
444
+ with: _toConsumableArray(PRODUCT_QUERY_DATA_VARIANT_RELATIONS),
445
+ with_count: ['bundleGroup', 'optionGroup'],
446
+ with_schedule: 1,
447
+ status: 'published',
448
+ num: 500,
449
+ skip: 1,
450
+ is_eject: 1,
451
+ // Channel is stable for this runtime owner and remains a server publication
452
+ // filter. Date/customer/menu membership and pricing are evaluated locally.
453
+ application_code: typeof channel === 'string' ? channelMap[channel] || channel : channel
454
+ }, (_params$product_ids = params.product_ids) !== null && _params$product_ids !== void 0 && _params$product_ids.length ? {
455
+ ids: params.product_ids
456
+ } : {}), params.collection ? {
457
+ collection: params.collection
458
+ } : {}), (_params$category_ids = params.category_ids) !== null && _params$category_ids !== void 0 && _params$category_ids.length ? {
459
+ category_ids: params.category_ids
460
+ } : {}), (_params$extension_typ = params.extension_type) !== null && _params$extension_typ !== void 0 && _params$extension_typ.length ? {
461
+ extension_type: params.extension_type
462
+ } : {}), {}, {
463
+ front_end_cache_id: params.cacheId
464
+ }), {
465
+ useCache: false,
466
+ customToast: function customToast() {}
467
+ });
468
+ case 5:
469
+ response = _context7.sent;
470
+ data = response === null || response === void 0 ? void 0 : response.data;
471
+ if (!((response === null || response === void 0 ? void 0 : response.status) === false || (response === null || response === void 0 ? void 0 : response.code) != null && Number(response.code) !== 200 || !Array.isArray(data === null || data === void 0 ? void 0 : data.list))) {
472
+ _context7.next = 9;
473
+ break;
474
+ }
475
+ throw Object.assign(new Error((response === null || response === void 0 ? void 0 : response.message) || 'The complete venue product pool could not be loaded.'), {
476
+ code: 'VENUE_CATALOG_LOAD_FAILED'
477
+ });
478
+ case 9:
479
+ total = (_ref4 = (_data$total = data.total) !== null && _data$total !== void 0 ? _data$total : data.total_count) !== null && _ref4 !== void 0 ? _ref4 : data.total_num;
480
+ if (!(total != null && Number.isFinite(Number(total)) && Number(total) > data.list.length || total == null && data.list.length >= 500)) {
481
+ _context7.next = 12;
482
+ break;
483
+ }
484
+ throw Object.assign(new Error('The venue product pool is incomplete. A single complete catalog response is required.'), {
485
+ code: 'VENUE_CATALOG_INCOMPLETE'
486
+ });
487
+ case 12:
488
+ return _context7.abrupt("return", cloneDeep(data.list));
489
+ case 13:
490
+ case "end":
491
+ return _context7.stop();
492
+ }
493
+ }, _callee7, this);
494
+ }));
495
+ function loadVenueCatalogPool() {
496
+ return _loadVenueCatalogPool.apply(this, arguments);
497
+ }
498
+ return loadVenueCatalogPool;
414
499
  }()
415
500
  /**
416
501
  * Remember raw remote product records before client-side Data Variant
417
502
  * evaluation. Quote-only reads can then always start from a clean baseline.
418
503
  */
504
+ )
419
505
  }, {
420
506
  key: "rememberRawProductQueryResult",
421
507
  value: function rememberRawProductQueryResult(products) {
@@ -469,19 +555,19 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
469
555
  }, {
470
556
  key: "getProducts",
471
557
  value: function () {
472
- var _getProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
473
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
474
- while (1) switch (_context7.prev = _context7.next) {
558
+ var _getProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
559
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
560
+ while (1) switch (_context8.prev = _context8.next) {
475
561
  case 0:
476
- _context7.next = 2;
562
+ _context8.next = 2;
477
563
  return this.core.effects.emit("".concat(this.name, ":onGetProducts"), this.store.list);
478
564
  case 2:
479
- return _context7.abrupt("return", cloneDeep(this.store.list));
565
+ return _context8.abrupt("return", cloneDeep(this.store.list));
480
566
  case 3:
481
567
  case "end":
482
- return _context7.stop();
568
+ return _context8.stop();
483
569
  }
484
- }, _callee7, this);
570
+ }, _callee8, this);
485
571
  }));
486
572
  function getProducts() {
487
573
  return _getProducts.apply(this, arguments);
@@ -491,23 +577,23 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
491
577
  }, {
492
578
  key: "getProduct",
493
579
  value: function () {
494
- var _getProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id) {
580
+ var _getProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(id) {
495
581
  var product;
496
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
497
- while (1) switch (_context8.prev = _context8.next) {
582
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
583
+ while (1) switch (_context9.prev = _context9.next) {
498
584
  case 0:
499
- _context8.next = 2;
585
+ _context9.next = 2;
500
586
  return this.core.effects.emit("".concat(this.name, ":onGetProduct"), this.store.list);
501
587
  case 2:
502
588
  product = this.store.list.find(function (product) {
503
589
  return product.id === id;
504
590
  });
505
- return _context8.abrupt("return", product ? cloneDeep(product) : undefined);
591
+ return _context9.abrupt("return", product ? cloneDeep(product) : undefined);
506
592
  case 4:
507
593
  case "end":
508
- return _context8.stop();
594
+ return _context9.stop();
509
595
  }
510
- }, _callee8, this);
596
+ }, _callee9, this);
511
597
  }));
512
598
  function getProduct(_x7) {
513
599
  return _getProduct.apply(this, arguments);
@@ -517,7 +603,7 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
517
603
  }, {
518
604
  key: "queryProducts",
519
605
  value: function () {
520
- var _queryProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
606
+ var _queryProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
521
607
  var params,
522
608
  includeIds,
523
609
  excludeIds,
@@ -528,11 +614,11 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
528
614
  channelApplications,
529
615
  codeOrBarcode,
530
616
  products,
531
- _args9 = arguments;
532
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
533
- while (1) switch (_context9.prev = _context9.next) {
617
+ _args10 = arguments;
618
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
619
+ while (1) switch (_context10.prev = _context10.next) {
534
620
  case 0:
535
- params = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
621
+ params = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
536
622
  includeIds = normalizeQuerySet(params.includeIds);
537
623
  excludeIds = normalizeQuerySet(params.excludeIds);
538
624
  categoryIds = normalizeQuerySet(params.categoryIds);
@@ -571,12 +657,12 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
571
657
  }
572
658
  return true;
573
659
  });
574
- return _context9.abrupt("return", cloneDeep(products));
660
+ return _context10.abrupt("return", cloneDeep(products));
575
661
  case 11:
576
662
  case "end":
577
- return _context9.stop();
663
+ return _context10.stop();
578
664
  }
579
- }, _callee9, this);
665
+ }, _callee10, this);
580
666
  }));
581
667
  function queryProducts() {
582
668
  return _queryProducts.apply(this, arguments);
@@ -586,21 +672,21 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
586
672
  }, {
587
673
  key: "getProductByIds",
588
674
  value: function () {
589
- var _getProductByIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(ids) {
590
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
591
- while (1) switch (_context10.prev = _context10.next) {
675
+ var _getProductByIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(ids) {
676
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
677
+ while (1) switch (_context11.prev = _context11.next) {
592
678
  case 0:
593
- _context10.next = 2;
679
+ _context11.next = 2;
594
680
  return this.core.effects.emit("".concat(this.name, ":onGetProductByIds"), this.store.list);
595
681
  case 2:
596
- return _context10.abrupt("return", this.queryProducts({
682
+ return _context11.abrupt("return", this.queryProducts({
597
683
  includeIds: ids
598
684
  }));
599
685
  case 3:
600
686
  case "end":
601
- return _context10.stop();
687
+ return _context11.stop();
602
688
  }
603
- }, _callee10, this);
689
+ }, _callee11, this);
604
690
  }));
605
691
  function getProductByIds(_x8) {
606
692
  return _getProductByIds.apply(this, arguments);
@@ -610,10 +696,10 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
610
696
  }, {
611
697
  key: "addProduct",
612
698
  value: function () {
613
- var _addProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(products) {
699
+ var _addProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(products) {
614
700
  var _this6 = this;
615
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
616
- while (1) switch (_context11.prev = _context11.next) {
701
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
702
+ while (1) switch (_context12.prev = _context12.next) {
617
703
  case 0:
618
704
  // list 需要根据 id 去重
619
705
  if (!this.store.list) {
@@ -636,9 +722,9 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
636
722
  this.core.effects.emit("".concat(this.name, ":changed"), this.store.list);
637
723
  case 4:
638
724
  case "end":
639
- return _context11.stop();
725
+ return _context12.stop();
640
726
  }
641
- }, _callee11, this);
727
+ }, _callee12, this);
642
728
  }));
643
729
  function addProduct(_x9) {
644
730
  return _addProduct.apply(this, arguments);
@@ -648,16 +734,16 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
648
734
  }, {
649
735
  key: "selectProducts",
650
736
  value: function () {
651
- var _selectProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(products) {
652
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
653
- while (1) switch (_context12.prev = _context12.next) {
737
+ var _selectProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(products) {
738
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
739
+ while (1) switch (_context13.prev = _context13.next) {
654
740
  case 0:
655
741
  this.store.selectProducts = products;
656
742
  case 1:
657
743
  case "end":
658
- return _context12.stop();
744
+ return _context13.stop();
659
745
  }
660
- }, _callee12, this);
746
+ }, _callee13, this);
661
747
  }));
662
748
  function selectProducts(_x10) {
663
749
  return _selectProducts.apply(this, arguments);
@@ -627,6 +627,11 @@ function buildCellKey(params) {
627
627
  return [String(params.productId), params.groupId, String(params.resourceId), params.start, params.end].join(':');
628
628
  }
629
629
  function dedupeOccupancyRefKey(occupancy) {
630
+ var _occupancy$raw;
631
+ var sessionKey = (_occupancy$raw = occupancy.raw) === null || _occupancy$raw === void 0 ? void 0 : _occupancy$raw.__availabilitySessionOccupancyKey;
632
+ if (typeof sessionKey === 'string' && sessionKey) {
633
+ return "session:".concat(JSON.stringify([String(occupancy.resourceId), sessionKey]));
634
+ }
630
635
  if (occupancy.scheduleEventId !== undefined && occupancy.scheduleEventId !== null) {
631
636
  return "scheduleEvent:".concat(String(occupancy.resourceId), ":").concat(String(occupancy.scheduleEventId));
632
637
  }
@@ -64,6 +64,7 @@ declare class Server {
64
64
  private salesSearchSubscribers;
65
65
  private deviceTaskActionsRegistered;
66
66
  private localPaymentUpdateQueues;
67
+ private paymentIdentityRefreshes;
67
68
  private floorPlanQuerySubscribers;
68
69
  private moduleRegistry;
69
70
  constructor(core: PisellCore);
@@ -133,6 +134,8 @@ declare class Server {
133
134
  private resolveKioskCheckoutOperatorId;
134
135
  private mergeCheckoutSyncPayments;
135
136
  private persistSyncedCheckoutOrder;
137
+ private hasPaidPaymentWithoutId;
138
+ private refreshMissingPaymentIds;
136
139
  /**
137
140
  * 将普通层 QuotationModule 的报价单计算能力桥接到 Server Products 模块。
138
141
  */