@pisell/pisellos 2.2.323 → 2.2.325

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 (199) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +1 -0
  3. package/dist/inventory/index.d.ts +92 -0
  4. package/dist/inventory/index.js +509 -0
  5. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  6. package/dist/modules/BookingContext/index.d.ts +2 -2
  7. package/dist/modules/BookingContext/index.js +55 -25
  8. package/dist/modules/BookingContext/types.d.ts +2 -0
  9. package/dist/modules/BookingContext/utils/calendarBooking.d.ts +15 -0
  10. package/dist/modules/BookingContext/utils/calendarBooking.js +207 -0
  11. package/dist/modules/BookingContext/utils/index.d.ts +1 -0
  12. package/dist/modules/BookingContext/utils/index.js +1 -0
  13. package/dist/modules/BookingContext/utils/productExtend.d.ts +20 -1
  14. package/dist/modules/BookingContext/utils/productExtend.js +122 -29
  15. package/dist/modules/Date/index.d.ts +1 -1
  16. package/dist/modules/Date/index.js +60 -14
  17. package/dist/modules/Date/types.d.ts +5 -0
  18. package/dist/modules/Discount/index.js +1 -0
  19. package/dist/modules/OpenData/index.d.ts +1 -0
  20. package/dist/modules/OpenData/index.js +1 -0
  21. package/dist/modules/OpenData/salesSettings.d.ts +32 -0
  22. package/dist/modules/OpenData/salesSettings.js +80 -0
  23. package/dist/modules/OpenData/types.d.ts +16 -0
  24. package/dist/modules/OpenData/utils.d.ts +1 -1
  25. package/dist/modules/OpenData/utils.js +3 -2
  26. package/dist/modules/Order/index.d.ts +55 -12
  27. package/dist/modules/Order/index.js +2699 -1411
  28. package/dist/modules/Order/types.d.ts +43 -5
  29. package/dist/modules/Order/types.js +4 -0
  30. package/dist/modules/Order/unpaidAmountGap.d.ts +6 -0
  31. package/dist/modules/Order/unpaidAmountGap.js +72 -0
  32. package/dist/modules/Order/utils/discountProductLineIdentity.js +2 -2
  33. package/dist/modules/Order/utils/productVoucherGroups.d.ts +15 -0
  34. package/dist/modules/Order/utils/productVoucherGroups.js +115 -0
  35. package/dist/modules/Order/utils.d.ts +3 -1
  36. package/dist/modules/Order/utils.js +6 -2
  37. package/dist/modules/Product/index.d.ts +1 -1
  38. package/dist/modules/ProductList/clientDataVariants.js +6 -2
  39. package/dist/modules/ProductList/index.d.ts +2 -0
  40. package/dist/modules/ProductList/index.js +161 -51
  41. package/dist/modules/ResourcePlanner/planner.js +58 -2
  42. package/dist/modules/ResourcePlanner/types.d.ts +13 -0
  43. package/dist/modules/Rules/index.d.ts +2 -0
  44. package/dist/modules/Rules/index.js +58 -39
  45. package/dist/modules/Schedule/index.d.ts +7 -1
  46. package/dist/modules/Schedule/index.js +155 -39
  47. package/dist/modules/Schedule/types.d.ts +2 -0
  48. package/dist/modules/bookingReadValidation.d.ts +6 -0
  49. package/dist/modules/bookingReadValidation.js +72 -0
  50. package/dist/plugins/request.d.ts +2 -0
  51. package/dist/server/index.d.ts +8 -0
  52. package/dist/server/index.js +1458 -1166
  53. package/dist/server/modules/order/index.js +2 -1
  54. package/dist/shared/receipt/customerInvoiceLanguages.d.ts +1 -1
  55. package/dist/shared/receipt/customerInvoiceLanguages.js +5 -3
  56. package/dist/shared/receipt/small-ticket.d.ts +4 -0
  57. package/dist/shared/receipt/small-ticket.js +70 -12
  58. package/dist/solution/BaseSales/index.d.ts +39 -5
  59. package/dist/solution/BaseSales/index.js +1828 -1462
  60. package/dist/solution/BaseSales/types.d.ts +1 -0
  61. package/dist/solution/BaseSales/types.js +1 -0
  62. package/dist/solution/BookingByStep/index.d.ts +16 -2
  63. package/dist/solution/BookingByStep/index.js +676 -361
  64. package/dist/solution/BookingByStep/utils/resources.d.ts +10 -0
  65. package/dist/solution/BookingByStep/utils/resources.js +117 -76
  66. package/dist/solution/BookingTicket/index.d.ts +15 -3
  67. package/dist/solution/BookingTicket/index.js +249 -135
  68. package/dist/solution/BookingTicket/types.d.ts +14 -2
  69. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +3 -1
  70. package/dist/solution/BookingTicket/utils/addProductDecision.js +39 -11
  71. package/dist/solution/BookingTicket/utils/resolveUniqueCartDetail.d.ts +8 -0
  72. package/dist/solution/BookingTicket/utils/resolveUniqueCartDetail.js +188 -0
  73. package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +8 -0
  74. package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +88 -0
  75. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
  76. package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -1
  77. package/dist/solution/OrderInvoicePreview/index.js +14 -8
  78. package/dist/solution/ScanOrder/index.d.ts +2 -0
  79. package/dist/solution/ScanOrder/index.js +166 -67
  80. package/dist/solution/ScanOrder/menuAvailability.d.ts +24 -0
  81. package/dist/solution/ScanOrder/menuAvailability.js +363 -0
  82. package/dist/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
  83. package/dist/solution/UnifiedBookingSales/catalogQueryBatch.js +202 -0
  84. package/dist/solution/UnifiedBookingSales/index.d.ts +96 -4
  85. package/dist/solution/UnifiedBookingSales/index.js +3374 -1177
  86. package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
  87. package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.js +4 -0
  88. package/dist/solution/UnifiedBookingSales/salesSettings.d.ts +16 -0
  89. package/dist/solution/UnifiedBookingSales/salesSettings.js +81 -0
  90. package/dist/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
  91. package/dist/solution/UnifiedBookingSales/sessionResourceCache.js +271 -0
  92. package/dist/solution/UnifiedBookingSales/types.d.ts +71 -2
  93. package/dist/solution/UnifiedBookingSales/types.js +7 -1
  94. package/dist/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
  95. package/dist/solution/UnifiedBookingSales/venueCatalogSession.js +283 -0
  96. package/dist/utils/platform.d.ts +2 -0
  97. package/dist/utils/platform.js +6 -0
  98. package/dist/utils/pos-receipt-auto-print.d.ts +4 -0
  99. package/dist/utils/pos-receipt-auto-print.js +14 -0
  100. package/lib/index.d.ts +1 -0
  101. package/lib/index.js +12 -0
  102. package/lib/inventory/index.d.ts +92 -0
  103. package/lib/inventory/index.js +287 -0
  104. package/lib/model/strategy/adapter/promotion/index.js +46 -1
  105. package/lib/modules/BookingContext/index.d.ts +2 -2
  106. package/lib/modules/BookingContext/index.js +42 -10
  107. package/lib/modules/BookingContext/types.d.ts +2 -0
  108. package/lib/modules/BookingContext/utils/calendarBooking.d.ts +15 -0
  109. package/lib/modules/BookingContext/utils/calendarBooking.js +156 -0
  110. package/lib/modules/BookingContext/utils/index.d.ts +1 -0
  111. package/lib/modules/BookingContext/utils/index.js +11 -0
  112. package/lib/modules/BookingContext/utils/productExtend.d.ts +20 -1
  113. package/lib/modules/BookingContext/utils/productExtend.js +96 -7
  114. package/lib/modules/Date/index.d.ts +1 -1
  115. package/lib/modules/Date/index.js +28 -5
  116. package/lib/modules/Date/types.d.ts +5 -0
  117. package/lib/modules/Discount/index.js +1 -0
  118. package/lib/modules/OpenData/index.d.ts +1 -0
  119. package/lib/modules/OpenData/index.js +12 -0
  120. package/lib/modules/OpenData/salesSettings.d.ts +32 -0
  121. package/lib/modules/OpenData/salesSettings.js +70 -0
  122. package/lib/modules/OpenData/types.d.ts +16 -0
  123. package/lib/modules/OpenData/utils.d.ts +1 -1
  124. package/lib/modules/OpenData/utils.js +3 -2
  125. package/lib/modules/Order/index.d.ts +55 -12
  126. package/lib/modules/Order/index.js +659 -80
  127. package/lib/modules/Order/types.d.ts +43 -5
  128. package/lib/modules/Order/types.js +2 -0
  129. package/lib/modules/Order/unpaidAmountGap.d.ts +6 -0
  130. package/lib/modules/Order/unpaidAmountGap.js +60 -0
  131. package/lib/modules/Order/utils/discountProductLineIdentity.js +1 -1
  132. package/lib/modules/Order/utils/productVoucherGroups.d.ts +15 -0
  133. package/lib/modules/Order/utils/productVoucherGroups.js +64 -0
  134. package/lib/modules/Order/utils.d.ts +3 -1
  135. package/lib/modules/Order/utils.js +6 -2
  136. package/lib/modules/Product/index.d.ts +1 -1
  137. package/lib/modules/ProductList/clientDataVariants.js +6 -2
  138. package/lib/modules/ProductList/index.d.ts +2 -0
  139. package/lib/modules/ProductList/index.js +74 -0
  140. package/lib/modules/ResourcePlanner/planner.js +52 -1
  141. package/lib/modules/ResourcePlanner/types.d.ts +13 -0
  142. package/lib/modules/Rules/index.d.ts +2 -0
  143. package/lib/modules/Rules/index.js +25 -9
  144. package/lib/modules/Schedule/index.d.ts +7 -1
  145. package/lib/modules/Schedule/index.js +68 -4
  146. package/lib/modules/Schedule/types.d.ts +2 -0
  147. package/lib/modules/bookingReadValidation.d.ts +6 -0
  148. package/lib/modules/bookingReadValidation.js +56 -0
  149. package/lib/plugins/request.d.ts +2 -0
  150. package/lib/server/index.d.ts +8 -0
  151. package/lib/server/index.js +194 -19
  152. package/lib/server/modules/order/index.js +2 -1
  153. package/lib/shared/receipt/customerInvoiceLanguages.d.ts +1 -1
  154. package/lib/shared/receipt/customerInvoiceLanguages.js +5 -3
  155. package/lib/shared/receipt/small-ticket.d.ts +4 -0
  156. package/lib/shared/receipt/small-ticket.js +63 -8
  157. package/lib/solution/BaseSales/index.d.ts +39 -5
  158. package/lib/solution/BaseSales/index.js +212 -18
  159. package/lib/solution/BaseSales/types.d.ts +1 -0
  160. package/lib/solution/BaseSales/types.js +1 -0
  161. package/lib/solution/BookingByStep/index.d.ts +16 -2
  162. package/lib/solution/BookingByStep/index.js +222 -14
  163. package/lib/solution/BookingByStep/utils/resources.d.ts +10 -0
  164. package/lib/solution/BookingByStep/utils/resources.js +25 -15
  165. package/lib/solution/BookingTicket/index.d.ts +15 -3
  166. package/lib/solution/BookingTicket/index.js +47 -4
  167. package/lib/solution/BookingTicket/types.d.ts +14 -2
  168. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +3 -1
  169. package/lib/solution/BookingTicket/utils/addProductDecision.js +37 -6
  170. package/lib/solution/BookingTicket/utils/resolveUniqueCartDetail.d.ts +8 -0
  171. package/lib/solution/BookingTicket/utils/resolveUniqueCartDetail.js +136 -0
  172. package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +8 -0
  173. package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +54 -0
  174. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
  175. package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -1
  176. package/lib/solution/OrderInvoicePreview/index.js +7 -1
  177. package/lib/solution/ScanOrder/index.d.ts +2 -0
  178. package/lib/solution/ScanOrder/index.js +72 -2
  179. package/lib/solution/ScanOrder/menuAvailability.d.ts +24 -0
  180. package/lib/solution/ScanOrder/menuAvailability.js +203 -0
  181. package/lib/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
  182. package/lib/solution/UnifiedBookingSales/catalogQueryBatch.js +109 -0
  183. package/lib/solution/UnifiedBookingSales/index.d.ts +96 -4
  184. package/lib/solution/UnifiedBookingSales/index.js +1316 -73
  185. package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
  186. package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +2 -0
  187. package/lib/solution/UnifiedBookingSales/salesSettings.d.ts +16 -0
  188. package/lib/solution/UnifiedBookingSales/salesSettings.js +72 -0
  189. package/lib/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
  190. package/lib/solution/UnifiedBookingSales/sessionResourceCache.js +199 -0
  191. package/lib/solution/UnifiedBookingSales/types.d.ts +71 -2
  192. package/lib/solution/UnifiedBookingSales/types.js +4 -1
  193. package/lib/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
  194. package/lib/solution/UnifiedBookingSales/venueCatalogSession.js +155 -0
  195. package/lib/utils/platform.d.ts +2 -0
  196. package/lib/utils/platform.js +7 -0
  197. package/lib/utils/pos-receipt-auto-print.d.ts +4 -0
  198. package/lib/utils/pos-receipt-auto-print.js +13 -0
  199. package/package.json +1 -1
@@ -1,10 +1,11 @@
1
1
  import { Module, PisellCore, ModuleOptions } from '../../types';
2
2
  import { BaseModule } from '../BaseModule';
3
- import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CancelOrderParams, ChangeBookingStatusParams, CheckoutOrderParams } from './types';
3
+ import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductsOptions, UpdateOrderProductQuantityParams, CancelOrderParams, ChangeBookingStatusParams, CheckoutOrderParams } from './types';
4
4
  import { CartItem } from '../Cart/types';
5
5
  import { type SubmitPayloadEnhancer } from './utils';
6
6
  import { type PickupTimingBooking, type PickupTimingBookingInput } from './pickupTiming';
7
- import type { OrderAmountSnapshot, AddProductBookingInput, AddProductToOrderOptions, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, OrderCartIntentCommitContext, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions, SalesNote, SalesNotesMutationSnapshot, SetSalesNoteInput, PickupReferenceMode, PointCardSnapshotMergeContext, PointCardSnapshotItem, ShopServiceData, ShopServiceType } from './types';
7
+ import { type ProductVoucherGroup } from './utils/productVoucherGroups';
8
+ import type { OrderAmountSnapshot, AddProductBookingInput, AddProductToOrderOptions, ReplaceBookingProductWithRelatedRetailParams, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, OrderHooksConfig, OrderCartIntentCommitContext, ReplaceTempOrderOptions, HydrateTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions, SalesNote, SalesNotesMutationSnapshot, SetSalesNoteInput, PickupReferenceMode, PointCardSnapshotMergeContext, PointCardSnapshotItem, ShopServiceData, ShopServiceType } from './types';
8
9
  import type { ICustomer } from '../AccountList/types';
9
10
  import type { Discount } from '../Discount/types';
10
11
  import { UnavailableReason } from '../Rules/types';
@@ -21,6 +22,10 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
21
22
  private openCache;
22
23
  private sessionStoragePersistEnabled;
23
24
  private sessionStorageRestoreRecord;
25
+ private orderSessionId;
26
+ private orderSessionDestroyed;
27
+ private orderSessionAliases;
28
+ private orderReplacement;
24
29
  /** 只允许当前订单最新的 prepare/config 请求回写客户资产态。 */
25
30
  private customerWalletPrepareConfigEpoch;
26
31
  /** Payment 可能早于 prepare/config 返回;先按实例 ID 暂存卡号等待 Snapshot。 */
@@ -29,6 +34,12 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
29
34
  private rulesHooksOverride?;
30
35
  private moduleHooksOverride?;
31
36
  private orderHooks?;
37
+ private cartCommandQueue;
38
+ private queueCartCommand;
39
+ /** Use the exact Order normalizers/merge rules on a private draft, not a second projection. */
40
+ private beginCartMutation;
41
+ /** Serializes checkout preparation with local cart commands; hydration remains outside this guard. */
42
+ prepareCheckout<T>(prepare: (items: OrderProduct[]) => Promise<T>): Promise<T>;
32
43
  private otherParams?;
33
44
  /** 评估器引用;由 SalesSdkProvider 注入,未注入时 applyPromotion 静默跳过 */
34
45
  private promotionEvaluator;
@@ -66,7 +77,11 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
66
77
  * @example
67
78
  * orderModule.updateOtherParams({ cacheId: 'cache-2', channel: 'pos' });
68
79
  */
69
- updateOtherParams(params: Record<string, any>): void;
80
+ updateOtherParams(params: Record<string, any>, options?: {
81
+ hooks?: OrderHooksConfig;
82
+ changedParams?: Record<string, any>;
83
+ cover?: boolean;
84
+ }): void;
70
85
  /** Internal intent boundary shared with asynchronous scanner/detail flows. */
71
86
  createCartIntentCommitGuard(action: OrderCartIntentCommitContext['action'], tempOrder?: OrderTempOrder | null): () => void;
72
87
  /** PC/H5 属于在线店铺;其它或缺失平台统一沿用 POS 行为。 */
@@ -84,6 +99,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
84
99
  */
85
100
  private logError;
86
101
  private registerDiscountModules;
102
+ setProductVoucherGroups(groups: ProductVoucherGroup[]): void;
103
+ validateProductVoucherSelection(): void;
87
104
  private createDefaultRulesHooks;
88
105
  /**
89
106
  * Stable across notifyTempOrderChanged's immutable copy, but changes when a
@@ -102,7 +119,9 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
102
119
  getCustomerWalletPrepareConfigEpoch(): number;
103
120
  private syncScannedDiscountsToOriginalDiscountList;
104
121
  private ensureEditDiscountConfigForProductChange;
105
- scanCode(code: string, customerId?: number): Promise<{
122
+ scanCode(code: string, customerId?: number, options?: {
123
+ productVouchersOnly?: boolean;
124
+ }): Promise<{
106
125
  isAvailable: boolean;
107
126
  isAccepted?: boolean;
108
127
  discountList: Discount[];
@@ -190,6 +209,14 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
190
209
  clearSessionStoragePersistedTempOrder(): void;
191
210
  consumeSessionStorageRestore(): Record<string, any> | null;
192
211
  notifyTempOrderChanged(): void;
212
+ private getOrderSessionAliases;
213
+ private publishOrderSession;
214
+ getOrderSessionId(): string | null;
215
+ isOrderSessionCurrent(sessionId: string): boolean;
216
+ private beginOrderReplacement;
217
+ private assertOrderReplacementCurrent;
218
+ private completeOrderReplacement;
219
+ private rollbackOrderReplacement;
193
220
  private createDefaultTempOrderInstance;
194
221
  private clearTempOrderCustomerWalletSnapshots;
195
222
  private clearCustomerWalletState;
@@ -216,6 +243,9 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
216
243
  private calculatePaymentTotal;
217
244
  private calculateOrderPaidPaymentTotal;
218
245
  private getDepositAmount;
246
+ private isDepositSelectionDisabled;
247
+ /** Cap only the active target; product rules, manual intent and saved snapshots stay raw. */
248
+ private applyEffectiveDepositSummary;
219
249
  private normalizeDepositAmount;
220
250
  private normalizeDepositFlag;
221
251
  private getHistoricalDepositSnapshot;
@@ -482,6 +512,14 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
482
512
  * // → tempOrder.products 新增 3 行,每行 num=1,bookings 3 条
483
513
  */
484
514
  addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput, options?: AddProductToOrderOptions): Promise<OrderProduct[]>;
515
+ private addProductToOrderDraft;
516
+ /**
517
+ * Replaces one local Party booking and its confirmed children on a detached draft.
518
+ * All fallible preparation precedes a guarded synchronous publication; never rolls
519
+ * an old whole-order snapshot over concurrent edits or a newly selected order.
520
+ */
521
+ replaceBookingProductWithRelatedRetail(params: ReplaceBookingProductWithRelatedRetailParams): Promise<OrderProduct[]>;
522
+ private replaceBookingProductWithRelatedRetailDraft;
485
523
  /**
486
524
  * 批量添加商品行,所有行追加完成后只触发一次促销、折扣、summary 重算与持久化。
487
525
  *
@@ -497,6 +535,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
497
535
  }>, options?: {
498
536
  skipEditDiscountConfigRefresh?: boolean;
499
537
  }): Promise<OrderProduct[]>;
538
+ private addProductsToOrderDraft;
500
539
  private getFullCoveragePassDiscounts;
501
540
  private hasEntitlementPassDiscount;
502
541
  private hasGoodPassDiscount;
@@ -508,10 +547,14 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
508
547
  private isRestrictedCartProductUpdate;
509
548
  private applyOrderProductUpdateToTempOrder;
510
549
  updateOrderProduct(params: UpdateOrderProductParams): Promise<OrderProduct[]>;
511
- updateOrderProducts(paramsList: UpdateOrderProductParams[]): Promise<OrderProduct[]>;
550
+ private updateOrderProductDraft;
551
+ updateOrderProducts(paramsList: UpdateOrderProductParams[], options?: UpdateOrderProductsOptions): Promise<OrderProduct[]>;
552
+ private updateOrderProductsDraft;
553
+ private updateOrderProductsGuarded;
512
554
  updateOrderProductQuantity(params: UpdateOrderProductQuantityParams, options?: {
513
555
  isCurrentOrder?: () => boolean;
514
556
  }): Promise<OrderProduct[]>;
557
+ private updateOrderProductQuantityDraft;
515
558
  updateOrderBooking(params: UpdateOrderBookingParams): any[];
516
559
  /**
517
560
  * 商品行写路径收尾:促销 → 折扣 → 清洗 → summary → 持久化。
@@ -528,12 +571,14 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
528
571
  * await order.removeProductsFromOrder([identityA, identityB]);
529
572
  */
530
573
  removeProductsFromOrder(identities: OrderProductIdentity[], options?: RemoveProductsFromOrderOptions): Promise<OrderProduct[]>;
574
+ private removeProductsFromOrderDraft;
531
575
  removeProductFromOrder(identity: OrderProductIdentity, options?: RemoveProductsFromOrderOptions): Promise<OrderProduct[]>;
532
576
  /**
533
- * 仅清空购物车行(products / bookings),不重置整单。
577
+ * 清空购物车行(products / bookings)及整单折扣,不重置整单。
534
578
  * 普通整单 note 保持不变;以商品行为主体的 Sales Notes 同步删除。
535
579
  */
536
580
  clearOrderCartLines(): Promise<OrderTempOrder>;
581
+ private clearOrderCartLinesDraft;
537
582
  /**
538
583
  * 切换购物车结算单位时清理所有会影响新币种的订单状态,但保留当前客户。
539
584
  */
@@ -595,7 +640,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
595
640
  generateIdempotencyToken(): string;
596
641
  syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
597
642
  createOrder(params: CommitOrderParams['query']): {
598
- type: "appointment_booking" | "virtual";
643
+ type: "virtual" | "appointment_booking";
599
644
  platform: string;
600
645
  sales_channel: string;
601
646
  order_sales_channel: string;
@@ -644,10 +689,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
644
689
  * 数据源应尽量返回 tempOrder 所需结构;这里仅做 SDK 运行必须字段兜底,
645
690
  * 例如数组字段、商品行唯一值、价格 metadata、summary 派生状态和 _extend。
646
691
  */
647
- hydrateTempOrderFromRecord(record: Record<string, any>, options?: {
648
- recalcOnHydrate?: boolean;
649
- source?: 'salesDetail' | 'mergedSalesDetail' | 'sessionStorage';
650
- }): Promise<OrderTempOrder>;
692
+ hydrateTempOrderFromRecord(record: Record<string, any>, options?: HydrateTempOrderOptions): Promise<OrderTempOrder>;
693
+ private prepareHydratedTempOrder;
651
694
  /**
652
695
  * 兼容后端详情将 holder 放在 metadata.holder 的历史形态,统一补到运行时展示路径。
653
696
  *
@@ -673,6 +716,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
673
716
  getOrderInfo(order_id: number): Promise<any>;
674
717
  getVouchers(): any[];
675
718
  }
676
- export type { OrderHolderRelation, AddProductToOrderOptions, OrderMetaList, PointCardSnapshotItem, VirtualCurrencySnapshotItem, RemoveProductsFromOrderOptions, SalesNote, SalesNoteDraftInput, SalesNoteLocalizedSelection, SalesNoteLocalizedText, SalesNoteRelation, SalesNoteTextInput, SetSalesNoteInput, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, } from './types';
719
+ export type { OrderHolderRelation, AddProductToOrderOptions, OrderMetaList, PointCardSnapshotItem, VirtualCurrencySnapshotItem, RemoveProductsFromOrderOptions, SalesNote, SalesNoteDraftInput, SalesNoteLocalizedSelection, SalesNoteLocalizedText, SalesNoteRelation, SalesNoteTextInput, SetSalesNoteInput, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductsOptions, UpdateOrderProductQuantityParams, } from './types';
677
720
  export { isFulfillmentTimingBooking } from './pickupTiming';
678
721
  export type { PickupTimingBooking, PickupTimingBookingInput, PickupTimingBookingMetadata, PickupTimingSelectionMode, PickupTimingSource, } from './pickupTiming';