@pisell/pisellos 2.2.243 → 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 (315) 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 -3658
  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/promotion/index.js +0 -49
  96. package/lib/model/strategy/adapter/walletPass/utils.js +2 -3
  97. package/lib/modules/Cart/utils/cartProduct.js +3 -20
  98. package/lib/modules/Cart/utils/changePrice.js +20 -12
  99. package/lib/modules/Customer/index.d.ts +0 -20
  100. package/lib/modules/Customer/index.js +11 -64
  101. package/lib/modules/Customer/types.d.ts +0 -2
  102. package/lib/modules/Discount/index.js +1 -5
  103. package/lib/modules/Discount/types.d.ts +0 -1
  104. package/lib/modules/OpenData/index.d.ts +0 -8
  105. package/lib/modules/OpenData/index.js +5 -19
  106. package/lib/modules/Order/index.d.ts +18 -268
  107. package/lib/modules/Order/index.js +344 -2149
  108. package/lib/modules/Order/types.d.ts +31 -279
  109. package/lib/modules/Order/types.js +0 -1
  110. package/lib/modules/Order/utils.d.ts +5 -147
  111. package/lib/modules/Order/utils.js +46 -614
  112. package/lib/modules/Payment/index.d.ts +13 -10
  113. package/lib/modules/Payment/index.js +150 -18
  114. package/lib/modules/Payment/types.d.ts +0 -2
  115. package/lib/modules/Payment/utils.js +1 -2
  116. package/lib/modules/Payment/walletpass.js +3 -7
  117. package/lib/modules/ProductList/index.d.ts +12 -16
  118. package/lib/modules/ProductList/index.js +4 -41
  119. package/lib/modules/ProductList/types.d.ts +0 -14
  120. package/lib/modules/Quotation/index.d.ts +1 -0
  121. package/lib/modules/Quotation/index.js +16 -19
  122. package/lib/modules/Rules/index.d.ts +0 -4
  123. package/lib/modules/Rules/index.js +120 -136
  124. package/lib/modules/Rules/types.d.ts +0 -1
  125. package/lib/modules/SalesSummary/index.d.ts +25 -8
  126. package/lib/modules/SalesSummary/index.js +4 -30
  127. package/lib/modules/SalesSummary/types.d.ts +1 -4
  128. package/lib/modules/SalesSummary/utils.d.ts +25 -2
  129. package/lib/modules/SalesSummary/utils.js +91 -645
  130. package/lib/modules/Schedule/index.d.ts +0 -7
  131. package/lib/modules/Schedule/index.js +1 -17
  132. package/lib/modules/Summary/index.js +4 -5
  133. package/lib/modules/index.d.ts +0 -2
  134. package/lib/modules/index.js +1 -5
  135. package/lib/plugins/request.d.ts +0 -1
  136. package/lib/server/index.d.ts +1 -204
  137. package/lib/server/index.js +57 -1888
  138. package/lib/server/modules/index.d.ts +0 -2
  139. package/lib/server/modules/index.js +0 -3
  140. package/lib/server/modules/order/index.d.ts +4 -120
  141. package/lib/server/modules/order/index.js +142 -919
  142. package/lib/server/modules/order/types.d.ts +3 -32
  143. package/lib/server/modules/order/utils/filterBookings.js +5 -24
  144. package/lib/server/modules/order/utils/filterOrders.js +6 -15
  145. package/lib/server/modules/products/index.d.ts +7 -34
  146. package/lib/server/modules/products/index.js +54 -189
  147. package/lib/server/modules/resource/index.d.ts +0 -2
  148. package/lib/server/modules/resource/index.js +3 -27
  149. package/lib/server/modules/schedule/index.d.ts +4 -4
  150. package/lib/server/modules/schedule/index.js +40 -47
  151. package/lib/solution/BaseSales/index.d.ts +9 -131
  152. package/lib/solution/BaseSales/index.js +63 -1106
  153. package/lib/solution/BaseSales/types.d.ts +6 -76
  154. package/lib/solution/BaseSales/types.js +1 -3
  155. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +0 -1
  156. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +18 -106
  157. package/lib/solution/BaseSales/utils.d.ts +1 -1
  158. package/lib/solution/BaseSales/utils.js +10 -54
  159. package/lib/solution/BookingByStep/index.d.ts +1 -1
  160. package/lib/solution/BookingTicket/index.d.ts +10 -270
  161. package/lib/solution/BookingTicket/index.js +29 -922
  162. package/lib/solution/BookingTicket/types.d.ts +1 -118
  163. package/lib/solution/BookingTicket/types.js +0 -11
  164. package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +0 -40
  165. package/lib/solution/BookingTicket/utils/bookingStatus.js +2 -44
  166. package/lib/solution/BookingTicket/utils/cartView.d.ts +1 -9
  167. package/lib/solution/BookingTicket/utils/cartView.js +6 -61
  168. package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -5
  169. package/lib/solution/BookingTicket/utils/scan/index.js +3 -17
  170. package/lib/solution/Checkout/appointmentDemo.json +1 -0
  171. package/lib/solution/Checkout/index.d.ts +0 -1
  172. package/lib/solution/Checkout/index.js +2 -1
  173. package/lib/solution/RegisterAndLogin/config.js +10 -2
  174. package/lib/solution/ScanOrder/index.d.ts +3 -9
  175. package/lib/solution/ScanOrder/index.js +70 -153
  176. package/lib/solution/ScanOrder/types.d.ts +5 -9
  177. package/lib/solution/ScanOrder/utils.d.ts +1 -1
  178. package/lib/solution/ScanOrder/utils.js +17 -83
  179. package/lib/solution/VenueBooking/index.d.ts +2 -5
  180. package/lib/solution/VenueBooking/index.js +17 -54
  181. package/lib/solution/VenueBooking/sales-section-4-annotated.json +2 -0
  182. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
  183. package/lib/solution/VenueBooking/utils/slotMerge.js +0 -10
  184. package/lib/types/index.d.ts +0 -10
  185. package/package.json +1 -1
  186. package/dist/modules/BookingContext/index.d.ts +0 -48
  187. package/dist/modules/BookingContext/index.js +0 -566
  188. package/dist/modules/BookingContext/types.d.ts +0 -102
  189. package/dist/modules/BookingContext/types.js +0 -51
  190. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
  191. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -284
  192. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
  193. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -145
  194. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
  195. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -218
  196. package/dist/modules/BookingContext/utils/flexible.d.ts +0 -28
  197. package/dist/modules/BookingContext/utils/flexible.js +0 -56
  198. package/dist/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
  199. package/dist/modules/BookingContext/utils/formatResourceList.js +0 -38
  200. package/dist/modules/BookingContext/utils/index.d.ts +0 -11
  201. package/dist/modules/BookingContext/utils/index.js +0 -11
  202. package/dist/modules/BookingContext/utils/noResource.d.ts +0 -13
  203. package/dist/modules/BookingContext/utils/noResource.js +0 -77
  204. package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
  205. package/dist/modules/BookingContext/utils/orderLineDisplay.js +0 -36
  206. package/dist/modules/BookingContext/utils/productExtend.d.ts +0 -72
  207. package/dist/modules/BookingContext/utils/productExtend.js +0 -339
  208. package/dist/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
  209. package/dist/modules/BookingContext/utils/resourceErrors.js +0 -74
  210. package/dist/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
  211. package/dist/modules/BookingContext/utils/resourceSelection.js +0 -24
  212. package/dist/modules/BookingContext/utils/resources.d.ts +0 -80
  213. package/dist/modules/BookingContext/utils/resources.js +0 -486
  214. package/dist/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
  215. package/dist/modules/BookingContext/utils/serviceTimes.js +0 -151
  216. package/dist/modules/BookingContext/utils/timeSlices.d.ts +0 -42
  217. package/dist/modules/BookingContext/utils/timeSlices.js +0 -100
  218. package/dist/modules/Order/utils/manualProductDiscount.d.ts +0 -106
  219. package/dist/modules/Order/utils/manualProductDiscount.js +0 -210
  220. package/dist/modules/SurchargeList/index.d.ts +0 -16
  221. package/dist/modules/SurchargeList/index.js +0 -162
  222. package/dist/modules/SurchargeList/types.d.ts +0 -11
  223. package/dist/modules/SurchargeList/types.js +0 -1
  224. package/dist/server/modules/payment/index.d.ts +0 -28
  225. package/dist/server/modules/payment/index.js +0 -305
  226. package/dist/server/modules/payment/types.d.ts +0 -9
  227. package/dist/server/modules/payment/types.js +0 -1
  228. package/dist/server/test.json +0 -713
  229. package/dist/server/utils/small-ticket.d.ts +0 -71
  230. package/dist/server/utils/small-ticket.js +0 -830
  231. package/dist/solution/BaseSales/utils/cartPromotion.d.ts +0 -287
  232. package/dist/solution/BaseSales/utils/cartPromotion.js +0 -1438
  233. package/dist/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
  234. package/dist/solution/BaseSales/utils/quotationPrice.js +0 -237
  235. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +0 -117
  236. package/dist/solution/BookingTicket/utils/addProductDecision.js +0 -346
  237. package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +0 -35
  238. package/dist/solution/BookingTicket/utils/addTimeAvailability.js +0 -95
  239. package/dist/solution/BookingTicket/utils/exampleData.d.ts +0 -123
  240. package/dist/solution/BookingTicket/utils/exampleData.js +0 -183
  241. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
  242. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +0 -438
  243. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -36
  244. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +0 -399
  245. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -32
  246. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +0 -56
  247. package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
  248. package/dist/solution/BookingTicket/utils/scan/scanProductValues.js +0 -150
  249. package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts +0 -23
  250. package/dist/solution/BookingTicket/utils/sessionCatalogStale.js +0 -78
  251. package/lib/modules/BookingContext/index.d.ts +0 -48
  252. package/lib/modules/BookingContext/index.js +0 -368
  253. package/lib/modules/BookingContext/types.d.ts +0 -102
  254. package/lib/modules/BookingContext/types.js +0 -34
  255. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
  256. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -276
  257. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
  258. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -151
  259. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
  260. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -201
  261. package/lib/modules/BookingContext/utils/flexible.d.ts +0 -28
  262. package/lib/modules/BookingContext/utils/flexible.js +0 -80
  263. package/lib/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
  264. package/lib/modules/BookingContext/utils/formatResourceList.js +0 -50
  265. package/lib/modules/BookingContext/utils/index.d.ts +0 -11
  266. package/lib/modules/BookingContext/utils/index.js +0 -43
  267. package/lib/modules/BookingContext/utils/noResource.d.ts +0 -13
  268. package/lib/modules/BookingContext/utils/noResource.js +0 -90
  269. package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
  270. package/lib/modules/BookingContext/utils/orderLineDisplay.js +0 -56
  271. package/lib/modules/BookingContext/utils/productExtend.d.ts +0 -72
  272. package/lib/modules/BookingContext/utils/productExtend.js +0 -283
  273. package/lib/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
  274. package/lib/modules/BookingContext/utils/resourceErrors.js +0 -80
  275. package/lib/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
  276. package/lib/modules/BookingContext/utils/resourceSelection.js +0 -46
  277. package/lib/modules/BookingContext/utils/resources.d.ts +0 -80
  278. package/lib/modules/BookingContext/utils/resources.js +0 -377
  279. package/lib/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
  280. package/lib/modules/BookingContext/utils/serviceTimes.js +0 -162
  281. package/lib/modules/BookingContext/utils/timeSlices.d.ts +0 -42
  282. package/lib/modules/BookingContext/utils/timeSlices.js +0 -124
  283. package/lib/modules/Order/utils/manualProductDiscount.d.ts +0 -106
  284. package/lib/modules/Order/utils/manualProductDiscount.js +0 -206
  285. package/lib/modules/SurchargeList/index.d.ts +0 -16
  286. package/lib/modules/SurchargeList/index.js +0 -89
  287. package/lib/modules/SurchargeList/types.d.ts +0 -11
  288. package/lib/modules/SurchargeList/types.js +0 -17
  289. package/lib/server/modules/payment/index.d.ts +0 -28
  290. package/lib/server/modules/payment/index.js +0 -192
  291. package/lib/server/modules/payment/types.d.ts +0 -9
  292. package/lib/server/modules/payment/types.js +0 -17
  293. package/lib/server/test.json +0 -713
  294. package/lib/server/utils/small-ticket.d.ts +0 -71
  295. package/lib/server/utils/small-ticket.js +0 -781
  296. package/lib/solution/BaseSales/utils/cartPromotion.d.ts +0 -287
  297. package/lib/solution/BaseSales/utils/cartPromotion.js +0 -992
  298. package/lib/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
  299. package/lib/solution/BaseSales/utils/quotationPrice.js +0 -277
  300. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +0 -117
  301. package/lib/solution/BookingTicket/utils/addProductDecision.js +0 -318
  302. package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +0 -35
  303. package/lib/solution/BookingTicket/utils/addTimeAvailability.js +0 -125
  304. package/lib/solution/BookingTicket/utils/exampleData.d.ts +0 -123
  305. package/lib/solution/BookingTicket/utils/exampleData.js +0 -0
  306. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
  307. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +0 -254
  308. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -36
  309. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +0 -168
  310. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -32
  311. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +0 -51
  312. package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
  313. package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +0 -127
  314. package/lib/solution/BookingTicket/utils/sessionCatalogStale.d.ts +0 -23
  315. package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +0 -85
@@ -1,20 +1,17 @@
1
1
  import { Module, ModuleOptions, PisellCore } from '../../types';
2
2
  import { BaseModule } from '../../modules/BaseModule';
3
- import { BaseSalesOrderProduct, BaseSalesOrderProductIdentity, BaseSalesPaymentStatus, BaseSalesUpdateOrderProductQuantityParams, BaseSalesCalculateProductBookingPriceParams, BaseSalesProductBookingPriceResult, BaseSalesScanCodeResult } from './types';
3
+ import { BaseSalesOrderProduct, BaseSalesOrderProductIdentity, BaseSalesPaymentStatus, BaseSalesScanCodeResult } from './types';
4
4
  import { OrderModule } from '../../modules/Order';
5
- import type { AddProductBookingInput, LoadSalesDetailParams, OrderPaymentData, OrderPaymentSource, SendCustomerPayLinkParams, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, UpdateTempOrderCustomerInput, UpdateOrderBookingParams, UpdateOrderProductParams, OrderTempOrder, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions } from '../../modules/Order/types';
5
+ import type { AddProductBookingInput, LoadSalesDetailParams, OrderPaymentData, OrderPaymentSource, SendCustomerPayLinkParams, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, UpdateTempOrderCustomerInput, UpdateProductInOrderParams } from '../../modules/Order/types';
6
6
  import type { SubmitPayloadEnhancer } from '../../modules/Order/utils';
7
7
  import type { Discount } from '../../modules/Discount/types';
8
8
  import { RequestPlugin, WindowPlugin } from '../../plugins';
9
9
  export * from './types';
10
10
  import { ProductList } from '../../modules/ProductList';
11
11
  import { PaymentModule } from '../../modules/Payment';
12
- import type { PaymentMethod } from '../../modules/Payment/types';
13
12
  import type { SalesSummaryModule } from '../../modules/SalesSummary';
14
13
  import type { ScheduleModule } from '../../modules/Schedule';
15
- import { QuotationModule } from '../../modules/Quotation';
16
14
  import type { ISalesDetail, ISalesDetailHeader, ISalesBooking, ISalesPayment, ISalesSurcharge } from './utils/parseSalesResponse';
17
- import { AppPlugin } from '../../plugins/app';
18
15
  import { type TransformBaseProductToOrderProductParams } from './utils/transformBaseProductToOrderProduct';
19
16
  export interface BaseSalesState {
20
17
  order?: OrderModule;
@@ -22,16 +19,13 @@ export interface BaseSalesState {
22
19
  payment?: PaymentModule;
23
20
  salesSummary?: SalesSummaryModule;
24
21
  schedule?: ScheduleModule;
25
- quotation?: QuotationModule;
26
22
  }
27
- export type BaseSalesPrintLocalOrderReceiptParams = string | number;
28
23
  export declare class BaseSalesImpl extends BaseModule implements Module {
29
24
  protected defaultName: string;
30
25
  protected defaultVersion: string;
31
26
  isSolution: boolean;
32
27
  protected initializeOptions: ModuleOptions;
33
28
  private logger;
34
- protected appPlugin: AppPlugin;
35
29
  protected store: BaseSalesState;
36
30
  protected otherParams: Record<string, any>;
37
31
  protected cacheId: string | undefined;
@@ -42,13 +36,10 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
42
36
  window: WindowPlugin;
43
37
  request: RequestPlugin;
44
38
  protected currentSalesDetail: ISalesDetail | null;
45
- protected discountConfigCacheKey: string | null;
46
- protected hasManualDiscountSelection: boolean;
47
- private paymentMethodsCache;
48
39
  constructor(name?: string, version?: string);
49
40
  /**
50
41
  * 子类可覆盖此方法以追加/收敛要注册的子模块。
51
- * 默认包含通用销售模块:products / order / salesSummary / schedule / payment / quotation
42
+ * 默认包含通用销售模块:products / order / salesSummary / schedule / payment。
52
43
  */
53
44
  protected getRegisteredModuleNames(): readonly string[];
54
45
  /**
@@ -63,19 +54,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
63
54
  * 记录错误日志
64
55
  */
65
56
  private logError;
66
- private hydrateOrderPaymentNames;
67
57
  get payment(): PaymentModule | undefined;
68
- private getCurrentOrderCustomerId;
69
- private applyQuotationScheduleResolver;
70
- private loadQuotationForPriceQuery;
71
- private getPriceQueryProductId;
72
- private getPriceQuerySchedule;
73
- private loadProductForPriceQuery;
74
- private getAuthoritativeBundleItems;
75
- private findAuthoritativeBundleItem;
76
- private getAuthoritativeBundleUnitPrice;
77
- private mergeProductForPriceQuery;
78
- protected getSubmitOrderSalesChannel(): string | undefined;
79
58
  /**
80
59
  * 工厂入口:根据子模块名实例化对应模块。
81
60
  * 默认使用 BookingByStep 公共 `createModule`。子类若需引入额外类型(如 customer),
@@ -83,35 +62,16 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
83
62
  */
84
63
  protected createSubModule(moduleName: string): Module | null;
85
64
  protected getSubModuleHooks(moduleName: string): any;
86
- /**
87
- * 构造传给 BaseSales 子模块的完整运行态参数,保证初始化和后续同步语义一致。
88
- *
89
- * @example
90
- * const params = this.buildSubModuleOtherParams();
91
- * this.core.registerModule(orderModule, { otherParams: params });
92
- */
93
- protected buildSubModuleOtherParams(): Record<string, any>;
94
- /**
95
- * 将父级 otherParams 的变更显式同步给已注册的子模块。
96
- *
97
- * @example
98
- * await this.syncOtherParamsToSubModules({ channel: 'pos' });
99
- */
100
- protected syncOtherParamsToSubModules(changedParams: Record<string, any>, { cover }?: {
101
- cover?: boolean;
102
- }): Promise<void>;
103
65
  /**
104
66
  * 读取 sessionStorage[this.name][cacheId],作为子模块 initialState 的来源。
105
67
  * sessionStorage 损坏时静默忽略,按空状态注册。
106
68
  */
107
69
  protected readSessionCacheData(): Record<string, any>;
108
- protected getAppData<T>(key: string): T | undefined;
109
- private syncAppDataToTempOrder;
110
70
  initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
111
71
  destroy(): Promise<void>;
112
72
  /**
113
73
  * 加载销售订单到统一 tempOrder 工作区。
114
- * 统一通过 OrderModule sales detail lookup 加载订单详情。
74
+ * app.sqlite 时优先读取本地记录;本地未命中或 forceRemote=true 时再拉云端。
115
75
  *
116
76
  * 子类可在 `super.loadSalesDetail` 之后基于返回的 `sales` 做业务侧装配
117
77
  * (比如把 `sales.customer` 写入 CustomerModule、emit 业务 hook 等)。
@@ -131,60 +91,27 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
131
91
  getPayments(): ISalesPayment[];
132
92
  /** 获取附加费用(运费/服务费/税费等)。 */
133
93
  getSurcharges(): ISalesSurcharge[];
134
- getTempOrder(): OrderTempOrder | null;
135
- replaceTempOrder(tempOrder: OrderTempOrder): Promise<OrderTempOrder>;
94
+ getTempOrder(): import("../../modules/Order/types").OrderTempOrder | null;
136
95
  getOrderIdentity(): import("../../modules/Order/types").OrderIdentitySnapshot | null;
137
96
  getOrderSnapshot(): import("../../modules/Order/types").OrderSnapshot | null;
138
97
  getOrderSyncState(): import("../../modules/Order/types").OrderSyncState;
139
98
  getOrderAmountSnapshot(): import("../../modules/Order/types").OrderAmountSnapshot | null;
140
99
  getTempOrderNote(): string;
141
100
  updateTempOrderNote(note: string): string;
142
- updateTempOrderNote(note: string, sync: true): Promise<string>;
143
- updateTempOrderNote(note: string, sync: boolean): string | Promise<string>;
144
- updateRemoteOrderNote(orderId: number | string, note: string): void;
145
101
  updateTempOrderShopDiscount(amount: string | number): string;
146
102
  updateTempOrderContactsInfo(contactsInfo: Record<string, any> | null): Record<string, any> | null;
147
- /** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化。 */
148
- setEnableTempOrderPersist(enabled: boolean): void;
149
- /** 是否允许 saveDraft 写入 IndexedDB 草稿。 */
150
- isTempOrderPersistEnabled(): boolean;
151
103
  private ensureTempOrder;
152
- addNewOrder(): Promise<OrderTempOrder>;
104
+ addNewOrder(): Promise<import("../../modules/Order/types").OrderTempOrder>;
153
105
  saveDraft(): Promise<void>;
154
- restoreOrder(): Promise<OrderTempOrder>;
155
- /**
156
- * 仅清空 tempOrder 购物车行(products / bookings / discount_list)。
157
- * 同步清空内存中的 salesDetail 商品/预约视图,避免编辑态仍读到旧 bookings。
158
- */
159
- clearOrderCartLines(): Promise<OrderTempOrder>;
106
+ restoreOrder(): Promise<import("../../modules/Order/types").OrderTempOrder>;
160
107
  getOrderProducts(): import("../../modules/Order/types").OrderProduct[];
161
108
  getSummary(): Promise<import("../../modules/Order/types").OrderSummary>;
162
- private getHistoricalProductDiscountList;
163
- private isPersistedOrderProduct;
164
- private mergeHistoricalDiscountList;
165
- private shouldSkipAutoApplyFetchedDiscountsInEditMode;
166
- private mergeCurrentDiscountSelectionState;
167
- loadDiscountConfig(params?: {
168
- customerId?: number;
169
- action?: 'create' | 'edit';
170
- }): Promise<{
171
- productList: Record<string, any>[];
172
- discountList: Discount[];
173
- }>;
174
- bestDiscount(cb?: (result: any) => void): Promise<{
175
- productList: Record<string, any>[];
176
- discountList: Discount[];
177
- }>;
178
109
  getDiscountList(): Discount[];
179
110
  scanPromotionCode(code: string, customerId?: number): Promise<BaseSalesScanCodeResult>;
180
111
  setDiscountSelected(params: {
181
112
  discountId: number;
182
113
  isSelected: boolean;
183
114
  }): Promise<void>;
184
- applyDiscountCalculationResult(result?: {
185
- productList?: Record<string, any>[];
186
- discountList?: Discount[];
187
- }): Promise<void>;
188
115
  submitScanOrder<T = any>(params?: {
189
116
  payments?: OrderPaymentSource[];
190
117
  paymentStatus?: BaseSalesPaymentStatus;
@@ -203,14 +130,6 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
203
130
  smallTicketDataFlag?: number;
204
131
  enhancePayload?: SubmitPayloadEnhancer;
205
132
  }): Promise<T>;
206
- submitTempOrderAsync<T = any>(params?: {
207
- payments?: OrderPaymentSource[];
208
- paymentStatus?: BaseSalesPaymentStatus;
209
- smallTicketDataFlag?: number;
210
- enhancePayload?: SubmitPayloadEnhancer;
211
- }): Promise<T>;
212
- printLocalOrderReceipt<T = any>(lookup?: BaseSalesPrintLocalOrderReceiptParams): Promise<T>;
213
- private getSubmitPaymentStatus;
214
133
  syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
215
134
  /** 读取当前 BaseSales 订单上下文中的 Sales 协议支付项。 */
216
135
  getOrderPayments(): OrderPaymentData[];
@@ -241,9 +160,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
241
160
  email: string;
242
161
  };
243
162
  /** 获取可用支付方式列表,供 PaymentModal 渲染支付选项。 */
244
- getPaymentMethodsAsync(): Promise<PaymentMethod[]>;
245
- /** 同步读取初始化时缓存的支付方式列表。 */
246
- getPaymentMethods(): PaymentMethod[];
163
+ getPaymentMethodsAsync(): Promise<any[]>;
247
164
  /** 轻量舍入能力,供现金支付 UI 计算 rounding_amount。 */
248
165
  roundAmount(params: {
249
166
  amount: string | number;
@@ -266,53 +183,14 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
266
183
  submitBeforeSend?: boolean;
267
184
  }): Promise<T>;
268
185
  transformBaseProductToOrderProduct(params: TransformBaseProductToOrderProductParams): import("./utils/transformBaseProductToOrderProduct").BaseProductOrderProductInput | null;
269
- calculateProductBookingPrice(params: BaseSalesCalculateProductBookingPriceParams): Promise<BaseSalesProductBookingPriceResult>;
270
186
  addProductToOrder(product: Partial<BaseSalesOrderProduct> & BaseSalesOrderProductIdentity, booking?: AddProductBookingInput): Promise<import("../../modules/Order/types").OrderProduct[]>;
271
- updateOrderProduct(params: UpdateOrderProductParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
272
- updateOrderProductQuantity(params: BaseSalesUpdateOrderProductQuantityParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
273
- updateOrderBooking(params: UpdateOrderBookingParams): any[];
187
+ updateProductInOrder(params: UpdateProductInOrderParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
274
188
  /**
275
189
  * 设置单行商品备注(与整单 `updateTempOrderNote` 区分)。
276
190
  * 多行同 SKU 时必须传入与删除/更新一致的 unique_identification_number。
277
191
  */
278
192
  setOrderProductLineNote(identity: BaseSalesOrderProductIdentity, note: string): Promise<import("../../modules/Order/types").OrderProduct[]>;
279
- /**
280
- * 批量删除购物车行,末尾仅一次促销重算。
281
- *
282
- * @example
283
- * await baseSales.removeProductsFromOrder([identityA, identityB]);
284
- */
285
- removeProductsFromOrder(identities: BaseSalesOrderProductIdentity[]): Promise<import("../../modules/Order/types").OrderProduct[]>;
286
193
  removeProductFromOrder(identity: BaseSalesOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
287
- /**
288
- * 注入促销评估器到底层 OrderModule。
289
- *
290
- * @example
291
- * solution.setPromotionEvaluator(appHelper.utils.promotionEvaluator);
292
- */
293
- setPromotionEvaluator(evaluator: OrderPromotionEvaluator | null): void;
294
- /**
295
- * 注入赠品选择 resolver。UI 层(SalesSdk)通过 bridge 提供。
296
- *
297
- * @example
298
- * solution.setGiftSelectResolver(async (ctx) => bridge.request(ctx));
299
- */
300
- setGiftSelectResolver(resolver: OrderGiftSelectResolver | null): void;
301
- /**
302
- * 为商品目录追加促销标签,供 SalesSdkProductProvider 等商品列表入口复用。
303
- *
304
- * @example
305
- * const products = solution.appendPromotionTags(catalogProducts);
306
- */
307
- appendPromotionTags<T extends Record<string, any>>(products: T[]): T[];
308
- /**
309
- * 主动触发一次促销应用(一般写路径会自动触发,少数场景如客户切换后可手动调)。
310
- */
311
- applyPromotion(): Promise<void>;
312
- /** 最近一次促销计算输出的未满足提示。 */
313
- getUnfulfilledPromotions(): OrderUnfulfilledPromotion[];
314
- /** 最近一次促销计算输出的赠品操作 diff。 */
315
- getLastGiftActions(): OrderLastGiftActions | null;
316
194
  getProductList(): Promise<any>;
317
195
  getOtherParams(): Record<string, any>;
318
196
  setOtherParams(params: Record<string, any>, { cover }?: {