@pisell/pisellos 2.2.242 → 2.2.244

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 (314) hide show
  1. package/dist/model/strategy/adapter/promotion/evaluator.js +2 -3
  2. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  3. package/dist/model/strategy/adapter/walletPass/utils.js +4 -7
  4. package/dist/modules/Cart/utils/cartProduct.js +3 -24
  5. package/dist/modules/Cart/utils/changePrice.js +11 -11
  6. package/dist/modules/Customer/index.d.ts +0 -20
  7. package/dist/modules/Customer/index.js +83 -172
  8. package/dist/modules/Customer/types.d.ts +0 -2
  9. package/dist/modules/Discount/index.js +3 -4
  10. package/dist/modules/Discount/types.d.ts +0 -1
  11. package/dist/modules/OpenData/index.d.ts +0 -8
  12. package/dist/modules/OpenData/index.js +17 -37
  13. package/dist/modules/Order/index.d.ts +18 -268
  14. package/dist/modules/Order/index.js +757 -3306
  15. package/dist/modules/Order/types.d.ts +31 -279
  16. package/dist/modules/Order/types.js +0 -38
  17. package/dist/modules/Order/utils.d.ts +5 -147
  18. package/dist/modules/Order/utils.js +103 -746
  19. package/dist/modules/Payment/index.d.ts +13 -10
  20. package/dist/modules/Payment/index.js +837 -467
  21. package/dist/modules/Payment/types.d.ts +0 -2
  22. package/dist/modules/Payment/utils.js +1 -2
  23. package/dist/modules/Payment/walletpass.js +7 -14
  24. package/dist/modules/ProductList/index.d.ts +12 -16
  25. package/dist/modules/ProductList/index.js +59 -133
  26. package/dist/modules/ProductList/types.d.ts +0 -14
  27. package/dist/modules/Quotation/index.d.ts +1 -0
  28. package/dist/modules/Quotation/index.js +22 -25
  29. package/dist/modules/Rules/index.d.ts +0 -4
  30. package/dist/modules/Rules/index.js +69 -93
  31. package/dist/modules/Rules/types.d.ts +0 -1
  32. package/dist/modules/SalesSummary/index.d.ts +25 -8
  33. package/dist/modules/SalesSummary/index.js +35 -86
  34. package/dist/modules/SalesSummary/types.d.ts +1 -4
  35. package/dist/modules/SalesSummary/utils.d.ts +25 -2
  36. package/dist/modules/SalesSummary/utils.js +162 -794
  37. package/dist/modules/Schedule/index.d.ts +0 -7
  38. package/dist/modules/Schedule/index.js +2 -24
  39. package/dist/modules/Summary/index.js +3 -4
  40. package/dist/modules/index.d.ts +0 -2
  41. package/dist/modules/index.js +1 -3
  42. package/dist/plugins/request.d.ts +0 -1
  43. package/dist/server/index.d.ts +1 -204
  44. package/dist/server/index.js +928 -3659
  45. package/dist/server/modules/index.d.ts +0 -2
  46. package/dist/server/modules/index.js +0 -2
  47. package/dist/server/modules/order/index.d.ts +4 -120
  48. package/dist/server/modules/order/index.js +483 -1779
  49. package/dist/server/modules/order/types.d.ts +3 -32
  50. package/dist/server/modules/order/types.js +0 -8
  51. package/dist/server/modules/order/utils/filterBookings.js +3 -26
  52. package/dist/server/modules/order/utils/filterOrders.js +8 -23
  53. package/dist/server/modules/products/index.d.ts +7 -34
  54. package/dist/server/modules/products/index.js +317 -631
  55. package/dist/server/modules/resource/index.d.ts +0 -2
  56. package/dist/server/modules/resource/index.js +3 -29
  57. package/dist/server/modules/schedule/index.d.ts +4 -4
  58. package/dist/server/modules/schedule/index.js +88 -111
  59. package/dist/solution/BaseSales/index.d.ts +9 -131
  60. package/dist/solution/BaseSales/index.js +447 -1944
  61. package/dist/solution/BaseSales/types.d.ts +6 -76
  62. package/dist/solution/BaseSales/types.js +4 -5
  63. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +0 -1
  64. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +24 -105
  65. package/dist/solution/BaseSales/utils.d.ts +1 -1
  66. package/dist/solution/BaseSales/utils.js +21 -62
  67. package/dist/solution/BookingByStep/index.d.ts +1 -1
  68. package/dist/solution/BookingTicket/index.d.ts +10 -270
  69. package/dist/solution/BookingTicket/index.js +237 -1772
  70. package/dist/solution/BookingTicket/types.d.ts +1 -118
  71. package/dist/solution/BookingTicket/types.js +2 -41
  72. package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +0 -40
  73. package/dist/solution/BookingTicket/utils/bookingStatus.js +0 -70
  74. package/dist/solution/BookingTicket/utils/cartView.d.ts +1 -9
  75. package/dist/solution/BookingTicket/utils/cartView.js +7 -94
  76. package/dist/solution/BookingTicket/utils/scan/index.d.ts +0 -5
  77. package/dist/solution/BookingTicket/utils/scan/index.js +8 -20
  78. package/dist/solution/Checkout/appointmentDemo.json +1 -0
  79. package/dist/solution/Checkout/index.d.ts +0 -1
  80. package/dist/solution/Checkout/index.js +9 -10
  81. package/dist/solution/RegisterAndLogin/config.js +10 -2
  82. package/dist/solution/ScanOrder/index.d.ts +3 -9
  83. package/dist/solution/ScanOrder/index.js +134 -241
  84. package/dist/solution/ScanOrder/types.d.ts +5 -9
  85. package/dist/solution/ScanOrder/types.js +3 -2
  86. package/dist/solution/ScanOrder/utils.d.ts +1 -1
  87. package/dist/solution/ScanOrder/utils.js +22 -84
  88. package/dist/solution/VenueBooking/index.d.ts +2 -5
  89. package/dist/solution/VenueBooking/index.js +59 -110
  90. package/dist/solution/VenueBooking/sales-section-4-annotated.json +2 -0
  91. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
  92. package/dist/solution/VenueBooking/utils/slotMerge.js +0 -10
  93. package/dist/types/index.d.ts +0 -10
  94. package/lib/model/strategy/adapter/promotion/evaluator.js +1 -2
  95. package/lib/model/strategy/adapter/walletPass/utils.js +2 -3
  96. package/lib/modules/Cart/utils/cartProduct.js +3 -20
  97. package/lib/modules/Cart/utils/changePrice.js +20 -12
  98. package/lib/modules/Customer/index.d.ts +0 -20
  99. package/lib/modules/Customer/index.js +11 -64
  100. package/lib/modules/Customer/types.d.ts +0 -2
  101. package/lib/modules/Discount/index.js +1 -5
  102. package/lib/modules/Discount/types.d.ts +0 -1
  103. package/lib/modules/OpenData/index.d.ts +0 -8
  104. package/lib/modules/OpenData/index.js +5 -19
  105. package/lib/modules/Order/index.d.ts +18 -268
  106. package/lib/modules/Order/index.js +344 -2149
  107. package/lib/modules/Order/types.d.ts +31 -279
  108. package/lib/modules/Order/types.js +0 -1
  109. package/lib/modules/Order/utils.d.ts +5 -147
  110. package/lib/modules/Order/utils.js +46 -614
  111. package/lib/modules/Payment/index.d.ts +13 -10
  112. package/lib/modules/Payment/index.js +150 -18
  113. package/lib/modules/Payment/types.d.ts +0 -2
  114. package/lib/modules/Payment/utils.js +1 -2
  115. package/lib/modules/Payment/walletpass.js +3 -7
  116. package/lib/modules/ProductList/index.d.ts +12 -16
  117. package/lib/modules/ProductList/index.js +4 -41
  118. package/lib/modules/ProductList/types.d.ts +0 -14
  119. package/lib/modules/Quotation/index.d.ts +1 -0
  120. package/lib/modules/Quotation/index.js +16 -19
  121. package/lib/modules/Rules/index.d.ts +0 -4
  122. package/lib/modules/Rules/index.js +120 -136
  123. package/lib/modules/Rules/types.d.ts +0 -1
  124. package/lib/modules/SalesSummary/index.d.ts +25 -8
  125. package/lib/modules/SalesSummary/index.js +4 -30
  126. package/lib/modules/SalesSummary/types.d.ts +1 -4
  127. package/lib/modules/SalesSummary/utils.d.ts +25 -2
  128. package/lib/modules/SalesSummary/utils.js +91 -645
  129. package/lib/modules/Schedule/index.d.ts +0 -7
  130. package/lib/modules/Schedule/index.js +1 -17
  131. package/lib/modules/Summary/index.js +4 -5
  132. package/lib/modules/index.d.ts +0 -2
  133. package/lib/modules/index.js +1 -5
  134. package/lib/plugins/request.d.ts +0 -1
  135. package/lib/server/index.d.ts +1 -204
  136. package/lib/server/index.js +57 -1889
  137. package/lib/server/modules/index.d.ts +0 -2
  138. package/lib/server/modules/index.js +0 -3
  139. package/lib/server/modules/order/index.d.ts +4 -120
  140. package/lib/server/modules/order/index.js +142 -919
  141. package/lib/server/modules/order/types.d.ts +3 -32
  142. package/lib/server/modules/order/utils/filterBookings.js +5 -24
  143. package/lib/server/modules/order/utils/filterOrders.js +6 -15
  144. package/lib/server/modules/products/index.d.ts +7 -34
  145. package/lib/server/modules/products/index.js +54 -189
  146. package/lib/server/modules/resource/index.d.ts +0 -2
  147. package/lib/server/modules/resource/index.js +3 -27
  148. package/lib/server/modules/schedule/index.d.ts +4 -4
  149. package/lib/server/modules/schedule/index.js +40 -47
  150. package/lib/solution/BaseSales/index.d.ts +9 -131
  151. package/lib/solution/BaseSales/index.js +63 -1106
  152. package/lib/solution/BaseSales/types.d.ts +6 -76
  153. package/lib/solution/BaseSales/types.js +1 -3
  154. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +0 -1
  155. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +18 -106
  156. package/lib/solution/BaseSales/utils.d.ts +1 -1
  157. package/lib/solution/BaseSales/utils.js +10 -54
  158. package/lib/solution/BookingByStep/index.d.ts +1 -1
  159. package/lib/solution/BookingTicket/index.d.ts +10 -270
  160. package/lib/solution/BookingTicket/index.js +29 -922
  161. package/lib/solution/BookingTicket/types.d.ts +1 -118
  162. package/lib/solution/BookingTicket/types.js +0 -11
  163. package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +0 -40
  164. package/lib/solution/BookingTicket/utils/bookingStatus.js +2 -44
  165. package/lib/solution/BookingTicket/utils/cartView.d.ts +1 -9
  166. package/lib/solution/BookingTicket/utils/cartView.js +6 -61
  167. package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -5
  168. package/lib/solution/BookingTicket/utils/scan/index.js +3 -17
  169. package/lib/solution/Checkout/appointmentDemo.json +1 -0
  170. package/lib/solution/Checkout/index.d.ts +0 -1
  171. package/lib/solution/Checkout/index.js +2 -1
  172. package/lib/solution/RegisterAndLogin/config.js +10 -2
  173. package/lib/solution/ScanOrder/index.d.ts +3 -9
  174. package/lib/solution/ScanOrder/index.js +70 -153
  175. package/lib/solution/ScanOrder/types.d.ts +5 -9
  176. package/lib/solution/ScanOrder/utils.d.ts +1 -1
  177. package/lib/solution/ScanOrder/utils.js +17 -83
  178. package/lib/solution/VenueBooking/index.d.ts +2 -5
  179. package/lib/solution/VenueBooking/index.js +17 -54
  180. package/lib/solution/VenueBooking/sales-section-4-annotated.json +2 -0
  181. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
  182. package/lib/solution/VenueBooking/utils/slotMerge.js +0 -10
  183. package/lib/types/index.d.ts +0 -10
  184. package/package.json +1 -1
  185. package/dist/modules/BookingContext/index.d.ts +0 -48
  186. package/dist/modules/BookingContext/index.js +0 -566
  187. package/dist/modules/BookingContext/types.d.ts +0 -102
  188. package/dist/modules/BookingContext/types.js +0 -51
  189. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
  190. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -284
  191. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
  192. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -145
  193. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
  194. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -218
  195. package/dist/modules/BookingContext/utils/flexible.d.ts +0 -28
  196. package/dist/modules/BookingContext/utils/flexible.js +0 -56
  197. package/dist/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
  198. package/dist/modules/BookingContext/utils/formatResourceList.js +0 -38
  199. package/dist/modules/BookingContext/utils/index.d.ts +0 -11
  200. package/dist/modules/BookingContext/utils/index.js +0 -11
  201. package/dist/modules/BookingContext/utils/noResource.d.ts +0 -13
  202. package/dist/modules/BookingContext/utils/noResource.js +0 -77
  203. package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
  204. package/dist/modules/BookingContext/utils/orderLineDisplay.js +0 -36
  205. package/dist/modules/BookingContext/utils/productExtend.d.ts +0 -72
  206. package/dist/modules/BookingContext/utils/productExtend.js +0 -339
  207. package/dist/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
  208. package/dist/modules/BookingContext/utils/resourceErrors.js +0 -74
  209. package/dist/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
  210. package/dist/modules/BookingContext/utils/resourceSelection.js +0 -24
  211. package/dist/modules/BookingContext/utils/resources.d.ts +0 -80
  212. package/dist/modules/BookingContext/utils/resources.js +0 -486
  213. package/dist/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
  214. package/dist/modules/BookingContext/utils/serviceTimes.js +0 -151
  215. package/dist/modules/BookingContext/utils/timeSlices.d.ts +0 -42
  216. package/dist/modules/BookingContext/utils/timeSlices.js +0 -100
  217. package/dist/modules/Order/utils/manualProductDiscount.d.ts +0 -106
  218. package/dist/modules/Order/utils/manualProductDiscount.js +0 -210
  219. package/dist/modules/SurchargeList/index.d.ts +0 -16
  220. package/dist/modules/SurchargeList/index.js +0 -162
  221. package/dist/modules/SurchargeList/types.d.ts +0 -11
  222. package/dist/modules/SurchargeList/types.js +0 -1
  223. package/dist/server/modules/payment/index.d.ts +0 -28
  224. package/dist/server/modules/payment/index.js +0 -305
  225. package/dist/server/modules/payment/types.d.ts +0 -9
  226. package/dist/server/modules/payment/types.js +0 -1
  227. package/dist/server/test.json +0 -713
  228. package/dist/server/utils/small-ticket.d.ts +0 -71
  229. package/dist/server/utils/small-ticket.js +0 -830
  230. package/dist/solution/BaseSales/utils/cartPromotion.d.ts +0 -287
  231. package/dist/solution/BaseSales/utils/cartPromotion.js +0 -1438
  232. package/dist/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
  233. package/dist/solution/BaseSales/utils/quotationPrice.js +0 -237
  234. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +0 -117
  235. package/dist/solution/BookingTicket/utils/addProductDecision.js +0 -346
  236. package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +0 -35
  237. package/dist/solution/BookingTicket/utils/addTimeAvailability.js +0 -95
  238. package/dist/solution/BookingTicket/utils/exampleData.d.ts +0 -123
  239. package/dist/solution/BookingTicket/utils/exampleData.js +0 -183
  240. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
  241. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +0 -438
  242. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -36
  243. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +0 -399
  244. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -32
  245. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +0 -56
  246. package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
  247. package/dist/solution/BookingTicket/utils/scan/scanProductValues.js +0 -150
  248. package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts +0 -23
  249. package/dist/solution/BookingTicket/utils/sessionCatalogStale.js +0 -78
  250. package/lib/modules/BookingContext/index.d.ts +0 -48
  251. package/lib/modules/BookingContext/index.js +0 -368
  252. package/lib/modules/BookingContext/types.d.ts +0 -102
  253. package/lib/modules/BookingContext/types.js +0 -34
  254. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
  255. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -276
  256. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
  257. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -151
  258. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
  259. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -201
  260. package/lib/modules/BookingContext/utils/flexible.d.ts +0 -28
  261. package/lib/modules/BookingContext/utils/flexible.js +0 -80
  262. package/lib/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
  263. package/lib/modules/BookingContext/utils/formatResourceList.js +0 -50
  264. package/lib/modules/BookingContext/utils/index.d.ts +0 -11
  265. package/lib/modules/BookingContext/utils/index.js +0 -43
  266. package/lib/modules/BookingContext/utils/noResource.d.ts +0 -13
  267. package/lib/modules/BookingContext/utils/noResource.js +0 -90
  268. package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
  269. package/lib/modules/BookingContext/utils/orderLineDisplay.js +0 -56
  270. package/lib/modules/BookingContext/utils/productExtend.d.ts +0 -72
  271. package/lib/modules/BookingContext/utils/productExtend.js +0 -283
  272. package/lib/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
  273. package/lib/modules/BookingContext/utils/resourceErrors.js +0 -80
  274. package/lib/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
  275. package/lib/modules/BookingContext/utils/resourceSelection.js +0 -46
  276. package/lib/modules/BookingContext/utils/resources.d.ts +0 -80
  277. package/lib/modules/BookingContext/utils/resources.js +0 -377
  278. package/lib/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
  279. package/lib/modules/BookingContext/utils/serviceTimes.js +0 -162
  280. package/lib/modules/BookingContext/utils/timeSlices.d.ts +0 -42
  281. package/lib/modules/BookingContext/utils/timeSlices.js +0 -124
  282. package/lib/modules/Order/utils/manualProductDiscount.d.ts +0 -106
  283. package/lib/modules/Order/utils/manualProductDiscount.js +0 -206
  284. package/lib/modules/SurchargeList/index.d.ts +0 -16
  285. package/lib/modules/SurchargeList/index.js +0 -89
  286. package/lib/modules/SurchargeList/types.d.ts +0 -11
  287. package/lib/modules/SurchargeList/types.js +0 -17
  288. package/lib/server/modules/payment/index.d.ts +0 -28
  289. package/lib/server/modules/payment/index.js +0 -192
  290. package/lib/server/modules/payment/types.d.ts +0 -9
  291. package/lib/server/modules/payment/types.js +0 -17
  292. package/lib/server/test.json +0 -713
  293. package/lib/server/utils/small-ticket.d.ts +0 -71
  294. package/lib/server/utils/small-ticket.js +0 -781
  295. package/lib/solution/BaseSales/utils/cartPromotion.d.ts +0 -287
  296. package/lib/solution/BaseSales/utils/cartPromotion.js +0 -992
  297. package/lib/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
  298. package/lib/solution/BaseSales/utils/quotationPrice.js +0 -277
  299. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +0 -117
  300. package/lib/solution/BookingTicket/utils/addProductDecision.js +0 -318
  301. package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +0 -35
  302. package/lib/solution/BookingTicket/utils/addTimeAvailability.js +0 -125
  303. package/lib/solution/BookingTicket/utils/exampleData.d.ts +0 -123
  304. package/lib/solution/BookingTicket/utils/exampleData.js +0 -0
  305. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
  306. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +0 -254
  307. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -36
  308. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +0 -168
  309. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -32
  310. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +0 -51
  311. package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
  312. package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +0 -127
  313. package/lib/solution/BookingTicket/utils/sessionCatalogStale.d.ts +0 -23
  314. package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +0 -85
@@ -154,7 +154,7 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
154
154
  value: function () {
155
155
  var _loadPrepareConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
156
156
  var _prepareConfig$data, _prepareConfig$data2;
157
- var prepareConfig, rawDiscountList, goodPassList;
157
+ var prepareConfig, goodPassList;
158
158
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
159
159
  while (1) switch (_context4.prev = _context4.next) {
160
160
  case 0:
@@ -162,10 +162,9 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
162
162
  return this.request.post("/order/prepare/config", params);
163
163
  case 2:
164
164
  prepareConfig = _context4.sent;
165
- rawDiscountList = [].concat(_toConsumableArray((prepareConfig === null || prepareConfig === void 0 || (_prepareConfig$data = prepareConfig.data) === null || _prepareConfig$data === void 0 ? void 0 : _prepareConfig$data.good_pass_list) || []), _toConsumableArray((prepareConfig === null || prepareConfig === void 0 || (_prepareConfig$data2 = prepareConfig.data) === null || _prepareConfig$data2 === void 0 ? void 0 : _prepareConfig$data2.discount_card_list) || []));
166
- goodPassList = this.filterEnabledDiscountList(rawDiscountList) || []; // this.setDiscountList(goodPassList);
165
+ goodPassList = this.filterEnabledDiscountList([].concat(_toConsumableArray((prepareConfig === null || prepareConfig === void 0 || (_prepareConfig$data = prepareConfig.data) === null || _prepareConfig$data === void 0 ? void 0 : _prepareConfig$data.good_pass_list) || []), _toConsumableArray((prepareConfig === null || prepareConfig === void 0 || (_prepareConfig$data2 = prepareConfig.data) === null || _prepareConfig$data2 === void 0 ? void 0 : _prepareConfig$data2.discount_card_list) || []))) || []; // this.setDiscountList(goodPassList);
167
166
  return _context4.abrupt("return", goodPassList);
168
- case 6:
167
+ case 5:
169
168
  case "end":
170
169
  return _context4.stop();
171
170
  }
@@ -140,7 +140,6 @@ export interface Discount {
140
140
  appliedProductDetails: ApplicableProductDetails[];
141
141
  isDisabledForProductUsed?: boolean;
142
142
  amount?: number;
143
- customer_id?: number | string | null;
144
143
  extension_data?: ExtensionData[];
145
144
  total_order_behavior_count?: number;
146
145
  today_order_behavior_count?: number;
@@ -9,7 +9,6 @@ export declare class OpenDataModule extends BaseModule implements Module {
9
9
  protected defaultVersion: string;
10
10
  private request;
11
11
  private window;
12
- private appPlugin;
13
12
  private store;
14
13
  private cacheId;
15
14
  private openCache;
@@ -17,13 +16,6 @@ export declare class OpenDataModule extends BaseModule implements Module {
17
16
  private otherParams;
18
17
  constructor(name?: string, version?: string);
19
18
  initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
20
- /**
21
- * 更新父级解决方案透传的运行态参数,并刷新 OpenData 缓存配置。
22
- *
23
- * @example
24
- * openDataModule.updateOtherParams({ openCache: true, cacheId: 'cache-2' })
25
- */
26
- updateOtherParams(params: Record<string, any>): void;
27
19
  fetchOpenData(params: OpenDataFetchParams): Promise<OpenDataConfig>;
28
20
  getOpenData(): OpenDataConfig | null;
29
21
  getLastFetchedAt(): number | null;
@@ -30,7 +30,6 @@ export var OpenDataModule = /*#__PURE__*/function (_BaseModule) {
30
30
  _defineProperty(_assertThisInitialized(_this), "defaultVersion", '1.0.0');
31
31
  _defineProperty(_assertThisInitialized(_this), "request", void 0);
32
32
  _defineProperty(_assertThisInitialized(_this), "window", void 0);
33
- _defineProperty(_assertThisInitialized(_this), "appPlugin", void 0);
34
33
  _defineProperty(_assertThisInitialized(_this), "store", void 0);
35
34
  _defineProperty(_assertThisInitialized(_this), "cacheId", void 0);
36
35
  _defineProperty(_assertThisInitialized(_this), "openCache", false);
@@ -61,21 +60,20 @@ export var OpenDataModule = /*#__PURE__*/function (_BaseModule) {
61
60
  }
62
61
  this.request = core.getPlugin('request');
63
62
  this.window = core.getPlugin('window');
64
- this.appPlugin = core.getPlugin('app');
65
63
  if (this.request) {
66
- _context.next = 12;
64
+ _context.next = 11;
67
65
  break;
68
66
  }
69
67
  throw new Error('OpenDataModule 需要 request 插件支持');
70
- case 12:
68
+ case 11:
71
69
  if (this.window) {
72
- _context.next = 14;
70
+ _context.next = 13;
73
71
  break;
74
72
  }
75
73
  throw new Error('OpenDataModule 需要 window 插件支持');
76
- case 14:
74
+ case 13:
77
75
  console.log('[OpenDataModule] 初始化完成');
78
- case 15:
76
+ case 14:
79
77
  case "end":
80
78
  return _context.stop();
81
79
  }
@@ -86,65 +84,47 @@ export var OpenDataModule = /*#__PURE__*/function (_BaseModule) {
86
84
  }
87
85
  return initialize;
88
86
  }()
89
- /**
90
- * 更新父级解决方案透传的运行态参数,并刷新 OpenData 缓存配置。
91
- *
92
- * @example
93
- * openDataModule.updateOtherParams({ openCache: true, cacheId: 'cache-2' })
94
- */
95
- }, {
96
- key: "updateOtherParams",
97
- value: function updateOtherParams(params) {
98
- var _this$otherParams$ope2;
99
- this.otherParams = params || {};
100
- this.openCache = (_this$otherParams$ope2 = this.otherParams.openCache) !== null && _this$otherParams$ope2 !== void 0 ? _this$otherParams$ope2 : false;
101
- this.cacheId = this.otherParams.cacheId;
102
- this.fatherModule = this.otherParams.fatherModule;
103
- }
104
87
  }, {
105
88
  key: "fetchOpenData",
106
89
  value: function () {
107
90
  var _fetchOpenData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
108
- var _this$appPlugin$getDa, _this$appPlugin;
109
- var getData, shopId, tenantId, headers, response, data;
91
+ var _this$otherParams, _this$otherParams$get, _this$otherParams2, _this$otherParams2$ge;
92
+ var shopId, tenantId, headers, response, data;
110
93
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
111
94
  while (1) switch (_context2.prev = _context2.next) {
112
95
  case 0:
113
- getData = (_this$appPlugin$getDa = (_this$appPlugin = this.appPlugin).getData) === null || _this$appPlugin$getDa === void 0 ? void 0 : _this$appPlugin$getDa.call(_this$appPlugin);
114
- shopId = getData === null || getData === void 0 ? void 0 : getData('shop_id');
96
+ shopId = (_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 || (_this$otherParams$get = _this$otherParams.getStateData) === null || _this$otherParams$get === void 0 ? void 0 : _this$otherParams$get.call(_this$otherParams, 'shop_id');
115
97
  if (shopId) {
116
- _context2.next = 4;
98
+ _context2.next = 3;
117
99
  break;
118
100
  }
119
101
  throw new Error('[OpenDataModule] 无法获取 shop_id');
120
- case 4:
121
- tenantId = getData === null || getData === void 0 ? void 0 : getData('tenant_id');
102
+ case 3:
103
+ tenantId = (_this$otherParams2 = this.otherParams) === null || _this$otherParams2 === void 0 || (_this$otherParams2$ge = _this$otherParams2.getStateData) === null || _this$otherParams2$ge === void 0 ? void 0 : _this$otherParams2$ge.call(_this$otherParams2, 'tenant_id');
122
104
  headers = {};
123
105
  if (tenantId) headers['Tenant-Id'] = String(tenantId);
124
- _context2.next = 9;
106
+ _context2.next = 8;
125
107
  return this.request.post("/open/my-pisell/".concat(shopId, "/setting"), {
126
108
  scope: params.scope,
127
109
  target: params.target,
128
110
  section_code: params.section_code
129
111
  }, {
130
112
  pisell2: true,
131
- isPisell2: true,
132
- prefix: false,
133
113
  headers: headers
134
114
  });
135
- case 9:
115
+ case 8:
136
116
  response = _context2.sent;
137
117
  if (!((response === null || response === void 0 ? void 0 : response.status) === false)) {
138
- _context2.next = 12;
118
+ _context2.next = 11;
139
119
  break;
140
120
  }
141
121
  throw new Error((response === null || response === void 0 ? void 0 : response.message) || '获取 OpenData 配置失败');
142
- case 12:
122
+ case 11:
143
123
  data = (response === null || response === void 0 ? void 0 : response.data) || {};
144
124
  this.store.data = data;
145
125
  this.store.lastFetchedAt = Date.now();
146
126
  return _context2.abrupt("return", data);
147
- case 16:
127
+ case 15:
148
128
  case "end":
149
129
  return _context2.stop();
150
130
  }
@@ -170,7 +150,7 @@ export var OpenDataModule = /*#__PURE__*/function (_BaseModule) {
170
150
  key: "checkAvailability",
171
151
  value: function checkAvailability(scheduleModule) {
172
152
  var _this$store$data;
173
- var scheduleList = scheduleModule ? scheduleModule === null || scheduleModule === void 0 ? void 0 : scheduleModule.getScheduleListByIds(((_this$store$data = this.store.data) === null || _this$store$data === void 0 ? void 0 : _this$store$data['availability.operating_hours']) || []) : undefined;
153
+ var scheduleList = scheduleModule ? scheduleModule.getScheduleListByIds(((_this$store$data = this.store.data) === null || _this$store$data === void 0 ? void 0 : _this$store$data['availability.operating_hours']) || []) : undefined;
174
154
  return computeAvailability({
175
155
  config: this.store.data,
176
156
  scheduleList: scheduleList
@@ -1,9 +1,9 @@
1
1
  import { Module, PisellCore, ModuleOptions } from '../../types';
2
2
  import { BaseModule } from '../BaseModule';
3
- import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CheckoutOrderParams, CancelOrderParams, ChangeBookingStatusParams } from './types';
3
+ import { OrderModuleAPI, CommitOrderParams, UpdateProductInOrderParams, CheckoutOrderParams, CancelOrderParams, ChangeBookingStatusParams } from './types';
4
4
  import { CartItem } from '../Cart/types';
5
5
  import { type SubmitPayloadEnhancer } from './utils';
6
- import type { OrderAmountSnapshot, AddProductBookingInput, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions } from './types';
6
+ import type { OrderAmountSnapshot, AddProductBookingInput, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView } from './types';
7
7
  import type { ICustomer } from '../AccountList/types';
8
8
  import type { Discount } from '../Discount/types';
9
9
  import { UnavailableReason } from '../Rules/types';
@@ -13,44 +13,20 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
13
13
  private store;
14
14
  private request;
15
15
  private logger;
16
+ private dbManager;
16
17
  private window;
17
18
  private cacheId;
18
19
  private salesSummaryModuleName;
19
20
  private rulesHooksOverride?;
20
- private moduleHooksOverride?;
21
21
  private orderHooks?;
22
22
  private otherParams?;
23
- /** 评估器引用;由 SalesSdkProvider 注入,未注入时 applyPromotion 静默跳过 */
24
- private promotionEvaluator;
25
- /** 赠品选择 resolver;由 SDK host bridge 注入 */
26
- private giftSelectResolver;
27
- /** applyPromotion 递归保护 flag(写路径同步调 applyPromotion,禁止重入) */
28
- private isApplyingPromotion;
29
- /** 最近一次 applyPromotion 的未满足促销提示 */
30
- private lastUnfulfilledPromotions;
31
- /** 最近一次 applyPromotion 的赠品操作 diff(debug / SDK 读取使用) */
32
- private lastGiftActions;
33
- /**
34
- * 是否将 tempOrder 写入 IndexedDB 草稿(orders store)。
35
- * BigSale 弹窗等短生命周期场景通过 setEnableTempOrderPersist(false) 关闭。
36
- */
37
- private draftPersistEnabled;
38
- private collectHydratedEditDiscounts;
39
23
  /**
40
24
  * Populate `savedAmount` on each discount based on product-level discount details.
41
25
  * Only selected discounts get a non-zero value.
42
26
  */
43
27
  static populateSavedAmounts(productList: Array<Record<string, any>>, discountList: Array<Record<string, any>>): void;
44
- private applyProductDiscountPrices;
45
28
  constructor(name?: string, version?: string);
46
29
  initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
47
- /**
48
- * 更新父级解决方案透传的运行态参数,并同步 Order 内部依赖的派生字段。
49
- *
50
- * @example
51
- * orderModule.updateOtherParams({ cacheId: 'cache-2', channel: 'pos' });
52
- */
53
- updateOtherParams(params: Record<string, any>): void;
54
30
  /**
55
31
  * 记录信息日志
56
32
  */
@@ -67,122 +43,43 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
67
43
  private createDefaultRulesHooks;
68
44
  loadDiscountConfig(params: {
69
45
  customerId: number;
70
- action?: 'create' | 'edit';
71
- orderId?: number;
72
- apply?: boolean;
73
- }): Promise<Discount[]>;
46
+ action?: 'create';
47
+ }): Promise<void>;
74
48
  getDiscountList(): Discount[];
75
- private ensureEditDiscountConfigForProductChange;
76
49
  scanCode(code: string, customerId?: number): Promise<{
77
50
  isAvailable: boolean;
78
51
  discountList: Discount[];
79
52
  type: 'server' | 'clientCalc';
80
53
  unavailableReason?: UnavailableReason;
81
54
  unavailableReasonKey?: string | null;
82
- scannedDiscountList?: Discount[];
83
55
  }>;
84
56
  applyDiscount(): void;
85
- /**
86
- * 注入促销评估器。
87
- *
88
- * @example
89
- * order.setPromotionEvaluator(appHelper.utils.promotionEvaluator);
90
- */
91
- setPromotionEvaluator(evaluator: OrderPromotionEvaluator | null): void;
92
- /**
93
- * 注入赠品选择 resolver。OS 需要补赠品时会 await 调用 resolver;缺省时跳过新增并 console.warn。
94
- *
95
- * @example
96
- * order.setGiftSelectResolver(async (ctx) => {
97
- * // SDK 内部决定弹窗 or 自动选第一项,返回完整 OrderProduct[]
98
- * return giftSelectBridge.request(ctx);
99
- * });
100
- */
101
- setGiftSelectResolver(resolver: OrderGiftSelectResolver | null): void;
102
- /**
103
- * 为商品目录追加促销标签,供上层 Sales 门面复用。
104
- *
105
- * @example
106
- * const products = order.appendPromotionTags(catalogProducts);
107
- */
108
- appendPromotionTags<T extends Record<string, any>>(products: T[]): T[];
109
- /**
110
- * 应用购物车促销:计算 → 差异化赠品 → 写回 tempOrder.products → emit onPromotionApplied。
111
- *
112
- * 调用时机:写路径(add/update/remove/clear/setCustomer)末尾自动触发;外部一般无需手动调。
113
- *
114
- * 关键约束:
115
- * - 不调用任何公开 CRUD API(如 removeProductFromOrder),全部内部 mutate tempOrder.products,避免事件风暴;
116
- * - 用 `isApplyingPromotion` 防递归;
117
- * - 多选项赠品依赖 giftSelectResolver,未注入则跳过且 console.warn;
118
- * - 不主动调用 applyDiscount / recalculateSummary,调用方负责跟进。
119
- */
120
- applyPromotion(): Promise<void>;
121
- /** 最近一次 applyPromotion 输出的未满足促销列表 */
122
- getUnfulfilledPromotions(): OrderUnfulfilledPromotion[];
123
- /** 最近一次 applyPromotion 输出的赠品操作 diff */
124
- getLastGiftActions(): OrderLastGiftActions | null;
125
57
  initTempOrder(params: {
126
58
  cacheId?: string;
127
59
  salesSummaryModuleName?: string;
128
60
  }): void;
129
- /**
130
- * 控制 IndexedDB 草稿(saveDraft)是否写入。
131
- * localStorage 版 tempOrder 持久化已废弃,此方法仅影响 saveDraft。
132
- *
133
- * @example
134
- * order.setEnableTempOrderPersist(false); // BigSale 弹窗:跳过 ~1s 的 dbUpdate
135
- */
136
- setEnableTempOrderPersist(enabled: boolean): void;
137
- /** 是否允许 saveDraft 写入 IndexedDB 草稿。 */
138
- isTempOrderPersistEnabled(): boolean;
139
- /** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化;草稿保存请使用 IndexedDB saveDraft。 */
61
+ private getTempOrderStorageKey;
62
+ private restoreTempOrderFromStorage;
140
63
  persistTempOrder(): void;
141
64
  private createDefaultTempOrderInstance;
142
65
  private createExternalSaleNumber;
143
66
  private ensureExternalSaleNumber;
144
67
  private ensureRequestUniqueIdempotencyToken;
145
- private buildPaymentSyncIdempotencyToken;
68
+ hasLocalDatabase(): boolean;
69
+ private buildLocalOrderRecord;
70
+ getLocalOrderByOrderId(orderId: number | string): Promise<Record<string, any> | null>;
71
+ getLocalOrderByOrderNumber(orderNumber: string): Promise<Record<string, any> | null>;
72
+ getLocalOrderByExternalSaleNumber(externalSaleNumber: string): Promise<Record<string, any> | null>;
146
73
  saveDraft(): Promise<void>;
147
- private saveDraftInBackground;
148
74
  private hydrateTempOrderFromLocalRecord;
149
75
  private extractOrderIdFromSubmitResult;
150
- private calculatePaymentEffectiveAmount;
151
76
  private calculatePaymentTotal;
152
- private getDepositAmount;
153
- private isDepositOrder;
154
- private getOrderExpectedAmount;
155
- private isDepositCovered;
156
- private normalizePaymentSource;
157
- private updateTempOrderPaymentStatus;
158
- private shouldKeepPaymentStatusAfterAmountRecalc;
159
- private resolveWalletPassUseValue;
160
- private adjustVoucherFundRecord;
161
- private capVoucherPaymentsByRemainingAmount;
162
77
  private calculatePaidPaymentSummary;
163
78
  private calculatePaymentServiceFee;
164
- private calculatePaymentGapAmount;
165
- private calculatePaymentRoundingAmount;
166
- private formatSummaryMetadataMoney;
167
- private syncSummaryProductMetadata;
168
- private calculateSummaryAmountGap;
169
- private getSummaryRefundAmount;
170
- private calculatePaymentTargetAmount;
171
- private normalizeFingerprintMoney;
172
- private normalizeFingerprintValue;
173
- private buildProductFingerprintItem;
174
- private buildOrderProductsFingerprint;
175
- private buildProductStructuralFingerprintItem;
176
- private buildOrderProductsStructuralFingerprint;
177
- private getOriginalSalesSnapshot;
178
- private isSnapshotPayableAmountUnchanged;
179
- private restoreOriginalSnapshotIfProductsUnchanged;
180
- private clearPersistedAmountFieldsForFullRecalc;
181
79
  private getPaymentTargetAmount;
182
80
  ensureTempOrder(): OrderTempOrder;
183
81
  restoreOrder(): OrderTempOrder;
184
82
  getTempOrder(): OrderTempOrder | null;
185
- replaceTempOrder(tempOrder: OrderTempOrder, options?: ReplaceTempOrderOptions): Promise<OrderTempOrder>;
186
83
  getOrderIdentity(): OrderIdentitySnapshot | null;
187
84
  getOrderSyncState(): OrderSyncState;
188
85
  getOrderAmountSnapshot(): OrderAmountSnapshot | null;
@@ -190,70 +87,23 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
190
87
  addNewOrder(): Promise<OrderTempOrder>;
191
88
  getOrderProducts(): OrderProduct[];
192
89
  private getProductUid;
193
- private sanitizeOrderProductForTempOrder;
194
- private sanitizeTempOrderProducts;
195
90
  private ensureExtend;
196
91
  private captureProductRuntime;
197
92
  private createLinkedProductAndBooking;
198
- /**
199
- * booking.holder 是提交真源;metadata.holder 作为详情/回显冗余字段同步保存。
200
- *
201
- * @example
202
- * this.syncBookingMetadataHolder(booking, metadata);
203
- */
204
- private syncBookingMetadataHolder;
205
- /**
206
- * 从单条 booking 的 holder / metadata 中收集 holder form_record。
207
- *
208
- * @example
209
- * const ids = this.collectBookingHolderRecords(booking);
210
- */
211
- private collectBookingHolderRecords;
212
- /**
213
- * 按 form_record 顺序读取 booking holder 的主字段名称。
214
- *
215
- * @example
216
- * const names = this.collectBookingHolderNames(booking);
217
- */
218
- private collectBookingHolderNames;
219
- /**
220
- * 按老 ticketBooking `formatHolder` 语义汇总订单顶层 holder。
221
- *
222
- * @example
223
- * const holder = this.buildTempOrderHolderFromBookings(tempOrder);
224
- */
225
- private buildTempOrderHolderFromBookings;
226
- /**
227
- * 将 booking 级 holder 汇总到 tempOrder 顶层 holder。
228
- *
229
- * @example
230
- * this.syncTempOrderHolderFromBookings(tempOrder);
231
- */
232
- private syncTempOrderHolderFromBookings;
233
- private getBookingUniqueIdentificationNumber;
234
- private findBookingIndexByUniqueIdentificationNumber;
235
- private removeLinkedBookingsForProduct;
236
93
  private getSalesSummary;
237
- private applyOrderProductsDepositSummary;
238
94
  recalculateSummary(options?: {
239
95
  createIfMissing?: boolean;
240
96
  }): Promise<OrderSummary | null>;
241
97
  getOrderSummary(): Promise<OrderSummary>;
242
98
  updateTempOrderNote(note: string): string;
243
- updateTempOrderNote(note: string, sync: true): Promise<string>;
244
- updateTempOrderNote(note: string, sync: boolean): string | Promise<string>;
245
- syncTempOrderNoteToRemote(orderId: number | string, note: string): Promise<string>;
246
99
  getTempOrderNote(): string;
247
100
  updateTempOrderShopDiscount(amount: string | number): string;
248
101
  updateTempOrderBuzzer(buzzer: string): string;
249
102
  updateTempOrderContactsInfo(contactsInfo: Record<string, any> | null): Record<string, any> | null;
250
- private buildTempOrderCustomer;
251
- private isCustomerBoundDiscount;
252
- private clearCustomerBoundDiscounts;
253
103
  /**
254
104
  * 更新当前 tempOrder 的客户协议字段。
255
105
  *
256
- * PaymentModal 只需要修改订单里的客户事实;如果外部还有客户模块需要同步,
106
+ * PaymentModal 只需要修改订单里的客户字段;如果外部还有客户模块需要同步,
257
107
  * 应由调用方通过回调处理,不能把外部 UI 状态写进 tempOrder。
258
108
  */
259
109
  updateTempOrderCustomer(customer: UpdateTempOrderCustomerInput): OrderSnapshot['customer'];
@@ -296,92 +146,15 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
296
146
  */
297
147
  updateVoucherOrderPayments(payments: OrderPaymentSource[]): OrderPaymentData[];
298
148
  private shouldMergeProductToOrder;
299
- private hasOrderProductLineNote;
300
- /**
301
- * 判断商品行是否显式绑定了 booking。
302
- *
303
- * @example
304
- * this.hasLinkedBookingUid({ metadata: { booking_uid: 'booking-1' } });
305
- */
306
- private hasLinkedBookingUid;
307
- /**
308
- * 预约商品加车后的统一收尾:促销、折扣、summary 重算与持久化(批量拆行时只调用一次)。
309
- *
310
- * @example
311
- * await this.finalizeProductOrderMutation(tempOrder);
312
- */
313
- private finalizeProductOrderMutation;
314
- /**
315
- * 向 tempOrder 追加一条商品行(及可选 booking),不触发 summary 重算。
316
- * 带 booking 且 num>1 时由 `addProductToOrder` 拆成多次本方法调用(每次 num=1)。
317
- *
318
- * @example
319
- * await this.appendProductLineToTempOrder(tempOrder, { product_id: 1, num: 1 }, booking);
320
- */
321
- private appendProductLineToTempOrder;
322
- /**
323
- * 添加商品行。带 booking 时强制独立行;num>1 时拆成多条 num=1 的 product+booking(对齐 BookingByStep / ticketBooking addService)。
324
- *
325
- * @example
326
- * await order.addProductToOrder({ product_id: 1, num: 3 }, { start_time: '10:00' });
327
- * // → tempOrder.products 新增 3 行,每行 num=1,bookings 3 条
328
- */
329
149
  addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput): Promise<OrderProduct[]>;
330
- /**
331
- * 批量添加商品行,所有行追加完成后只触发一次促销、折扣、summary 重算与持久化。
332
- *
333
- * @example
334
- * await order.addProductsToOrder([
335
- * { product: { product_id: 1, product_variant_id: 0, num: 1 } },
336
- * { product: { product_id: 2, product_variant_id: 0, num: 1 } },
337
- * ]);
338
- */
339
- addProductsToOrder(items: Array<{
340
- product: Partial<OrderProduct> & OrderProductIdentity;
341
- booking?: AddProductBookingInput;
342
- }>, options?: {
343
- skipEditDiscountConfigRefresh?: boolean;
344
- }): Promise<OrderProduct[]>;
345
150
  private hasGoodPassDiscount;
346
- private getBundleRuntimeIdentity;
347
- private preservePersistedBundlePriceFields;
348
- updateOrderProduct(params: UpdateOrderProductParams): Promise<OrderProduct[]>;
349
- updateOrderProductQuantity(params: UpdateOrderProductQuantityParams): Promise<OrderProduct[]>;
350
- updateOrderBooking(params: UpdateOrderBookingParams): any[];
351
- /**
352
- * 商品行写路径收尾:促销 → 折扣 → 清洗 → summary → 持久化。
353
- * 批量删除等多行变更场景只应调用一次,避免 N 次 applyPromotion。
354
- *
355
- * @example
356
- * await this.finalizeAfterProductsMutation(tempOrder);
357
- */
358
- private finalizeAfterProductsMutation;
359
- /**
360
- * 批量按 identity 删除购物车行,末尾仅一次促销重算。
361
- *
362
- * @example
363
- * await order.removeProductsFromOrder([identityA, identityB]);
364
- */
365
- removeProductsFromOrder(identities: OrderProductIdentity[]): Promise<OrderProduct[]>;
151
+ updateProductInOrder(params: UpdateProductInOrderParams): Promise<OrderProduct[]>;
366
152
  removeProductFromOrder(identity: OrderProductIdentity): Promise<OrderProduct[]>;
367
- /**
368
- * 仅清空购物车行(products / bookings),不重置整单。
369
- * 用于「仅清空商品」;客户、备注、支付等协议字段保持不变。
370
- */
371
- clearOrderCartLines(): Promise<OrderTempOrder>;
372
- buildCurrentSubmitPayloadForLocalPrint(params?: {
373
- cacheId?: string;
374
- platform?: string;
375
- businessCode?: string;
376
- channel?: string;
377
- type?: string;
378
- }): import("./types").OrderSubmitPayload;
379
- applyLocalPrintOrderNumbers(order?: Record<string, any> | null): Promise<OrderTempOrder>;
380
153
  /**
381
154
  * 提交当前 Sales tempOrder。
382
155
  *
383
156
  * smallTicketDataFlag 用于 B 端 checkout 小票数据返回。PaymentModal 在支付提交时
384
- * 应传 1,确保 /shop/order/sales/checkout 返回打印所需数据。
157
+ * 应传 1,确保 /order/sales/checkout 返回打印所需数据。
385
158
  */
386
159
  submitTempOrder<T = any>(params?: {
387
160
  cacheId?: string;
@@ -394,26 +167,11 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
394
167
  smallTicketDataFlag?: number;
395
168
  enhancePayload?: SubmitPayloadEnhancer;
396
169
  }): Promise<T>;
397
- submitTempOrderAsync<T = any>(params?: {
398
- cacheId?: string;
399
- platform?: string;
400
- businessCode?: string;
401
- channel?: string;
402
- type?: string;
403
- payments?: OrderPaymentSource[];
404
- paymentStatus?: SubmitSalesOrderParams['query']['payment_status'];
405
- smallTicketDataFlag?: number;
406
- enhancePayload?: SubmitPayloadEnhancer;
407
- }): Promise<T>;
408
- private runSubmitTempOrder;
409
170
  private markLocalOrderSynced;
410
- private applyRemoteOrderNumbersToTempOrder;
411
171
  private isSubmitResponseRejected;
412
- private isLocalPendingSubmitResult;
413
172
  private isSubmitErrorResponse;
414
173
  private extractSubmitErrorResponse;
415
174
  private logSubmitBackendRejected;
416
- generateIdempotencyToken(): string;
417
175
  syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
418
176
  createOrder(params: CommitOrderParams['query']): {
419
177
  type: "virtual" | "appointment_booking";
@@ -438,7 +196,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
438
196
  * Checkout 专用:创建订单到后端
439
197
  *
440
198
  * 专门为 Checkout 模块设计的订单创建方法,
441
- * 通过 OS Server 调用 checkout 接口创建订单
199
+ * 直接调用 /order/checkout 接口创建订单
442
200
  * 接收已经处理好的订单数据,无需再处理购物车
443
201
  *
444
202
  * @param params Checkout 订单参数(已处理的订单数据)
@@ -453,10 +211,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
453
211
  * OrderModule 只负责校验 order_ids 并调用 /order/batch-email。
454
212
  */
455
213
  sendCustomerPayLink<T = any>(params: SendCustomerPayLinkParams): Promise<T>;
456
- getSalesOrderByLookup(params: {
457
- lookup: number | string;
458
- forceRemote?: boolean;
459
- }): Promise<any>;
214
+ getOrderInfoByRemote(order_id: number): Promise<any>;
460
215
  /**
461
216
  * 把 sqlite / 后端返回的订单记录直接恢复为 tempOrder。
462
217
  *
@@ -466,13 +221,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
466
221
  hydrateTempOrderFromRecord(record: Record<string, any>, options?: {
467
222
  recalcOnHydrate?: boolean;
468
223
  }): Promise<OrderTempOrder>;
469
- private normalizeTempOrderForRuntime;
470
- private pickHydratedDisplayText;
471
- private formatHydratedNamePair;
472
- private buildHydratedProductOptionString;
473
- private normalizeHydratedProductOptionItem;
474
224
  private normalizeHydratedOrderProduct;
475
225
  getLastOrderInfo(): Record<string, any> | undefined;
476
226
  getOrderInfo(order_id: number): Promise<any>;
477
227
  }
478
- export type { UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, } from './types';
228
+ export type { UpdateProductInOrderParams } from './types';