@pisell/pisellos 0.0.568 → 0.0.569

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 (413) hide show
  1. package/dist/model/strategy/adapter/promotion/evaluator.js +3 -2
  2. package/dist/model/strategy/adapter/walletPass/utils.js +7 -4
  3. package/dist/modules/BaseModule.d.ts +2 -2
  4. package/dist/modules/BaseModule.js +4 -4
  5. package/dist/modules/BookingContext/index.d.ts +48 -0
  6. package/dist/modules/BookingContext/index.js +566 -0
  7. package/dist/modules/BookingContext/types.d.ts +102 -0
  8. package/dist/modules/BookingContext/types.js +51 -0
  9. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
  10. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +302 -0
  11. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
  12. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +149 -0
  13. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
  14. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +249 -0
  15. package/dist/modules/BookingContext/utils/flexible.d.ts +28 -0
  16. package/dist/modules/BookingContext/utils/flexible.js +56 -0
  17. package/dist/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
  18. package/dist/modules/BookingContext/utils/formatResourceList.js +38 -0
  19. package/dist/modules/BookingContext/utils/index.d.ts +11 -0
  20. package/dist/modules/BookingContext/utils/index.js +11 -0
  21. package/dist/modules/BookingContext/utils/noResource.d.ts +13 -0
  22. package/dist/modules/BookingContext/utils/noResource.js +77 -0
  23. package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
  24. package/dist/modules/BookingContext/utils/orderLineDisplay.js +36 -0
  25. package/dist/modules/BookingContext/utils/productExtend.d.ts +72 -0
  26. package/dist/modules/BookingContext/utils/productExtend.js +339 -0
  27. package/dist/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
  28. package/dist/modules/BookingContext/utils/resourceErrors.js +74 -0
  29. package/dist/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
  30. package/dist/modules/BookingContext/utils/resourceSelection.js +24 -0
  31. package/dist/modules/BookingContext/utils/resources.d.ts +80 -0
  32. package/dist/modules/BookingContext/utils/resources.js +486 -0
  33. package/dist/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
  34. package/dist/modules/BookingContext/utils/serviceTimes.js +151 -0
  35. package/dist/modules/BookingContext/utils/timeSlices.d.ts +42 -0
  36. package/dist/modules/BookingContext/utils/timeSlices.js +100 -0
  37. package/dist/modules/Cart/utils/cartProduct.js +26 -5
  38. package/dist/modules/Cart/utils/changePrice.js +27 -20
  39. package/dist/modules/Customer/index.d.ts +20 -0
  40. package/dist/modules/Customer/index.js +172 -83
  41. package/dist/modules/Customer/types.d.ts +2 -0
  42. package/dist/modules/Discount/index.d.ts +2 -1
  43. package/dist/modules/Discount/index.js +37 -9
  44. package/dist/modules/Discount/types.d.ts +1 -0
  45. package/dist/modules/OpenData/index.d.ts +8 -0
  46. package/dist/modules/OpenData/index.js +36 -16
  47. package/dist/modules/Order/index.d.ts +448 -23
  48. package/dist/modules/Order/index.js +5417 -561
  49. package/dist/modules/Order/types.d.ts +693 -88
  50. package/dist/modules/Order/types.js +68 -1
  51. package/dist/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
  52. package/dist/modules/Order/utils/bundleDiscountHydration.js +144 -0
  53. package/dist/modules/Order/utils/manualProductDiscount.d.ts +106 -0
  54. package/dist/modules/Order/utils/manualProductDiscount.js +210 -0
  55. package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +53 -0
  56. package/dist/modules/Order/utils/orderCollectionIdentity.js +405 -0
  57. package/dist/modules/Order/utils.d.ts +167 -18
  58. package/dist/modules/Order/utils.js +960 -165
  59. package/dist/modules/Payment/index.d.ts +10 -9
  60. package/dist/modules/Payment/index.js +465 -703
  61. package/dist/modules/Payment/types.d.ts +40 -16
  62. package/dist/modules/Payment/utils.d.ts +1 -1
  63. package/dist/modules/Payment/utils.js +4 -3
  64. package/dist/modules/Payment/walletpass.js +44 -29
  65. package/dist/modules/Product/types.d.ts +29 -7
  66. package/dist/modules/ProductList/index.d.ts +17 -13
  67. package/dist/modules/ProductList/index.js +184 -74
  68. package/dist/modules/ProductList/types.d.ts +17 -0
  69. package/dist/modules/Quotation/index.d.ts +22 -2
  70. package/dist/modules/Quotation/index.js +108 -42
  71. package/dist/modules/Quotation/types.d.ts +19 -0
  72. package/dist/modules/ResourcePlanner/index.d.ts +24 -0
  73. package/dist/modules/ResourcePlanner/index.js +181 -0
  74. package/dist/modules/ResourcePlanner/planner.d.ts +14 -0
  75. package/dist/modules/ResourcePlanner/planner.js +1069 -0
  76. package/dist/modules/ResourcePlanner/types.d.ts +227 -0
  77. package/dist/modules/ResourcePlanner/types.js +1 -0
  78. package/dist/modules/Rules/index.d.ts +8 -10
  79. package/dist/modules/Rules/index.js +221 -109
  80. package/dist/modules/Rules/types.d.ts +14 -3
  81. package/dist/modules/SalesSummary/index.d.ts +23 -26
  82. package/dist/modules/SalesSummary/index.js +152 -46
  83. package/dist/modules/SalesSummary/types.d.ts +9 -1
  84. package/dist/modules/SalesSummary/utils.d.ts +3 -22
  85. package/dist/modules/SalesSummary/utils.js +803 -163
  86. package/dist/modules/Schedule/getDateIsInSchedule.js +14 -7
  87. package/dist/modules/Schedule/index.d.ts +18 -5
  88. package/dist/modules/Schedule/index.js +78 -24
  89. package/dist/modules/Schedule/types.d.ts +2 -0
  90. package/dist/modules/Summary/index.js +4 -3
  91. package/dist/modules/SurchargeList/index.d.ts +18 -0
  92. package/dist/modules/SurchargeList/index.js +185 -0
  93. package/dist/modules/SurchargeList/types.d.ts +15 -0
  94. package/dist/modules/SurchargeList/types.js +1 -0
  95. package/dist/modules/index.d.ts +3 -0
  96. package/dist/modules/index.js +4 -1
  97. package/dist/plugins/app.d.ts +2 -0
  98. package/dist/plugins/request.d.ts +1 -0
  99. package/dist/server/index.d.ts +462 -8
  100. package/dist/server/index.js +6112 -656
  101. package/dist/server/modules/floor-plan/index.d.ts +39 -0
  102. package/dist/server/modules/floor-plan/index.js +595 -0
  103. package/dist/server/modules/floor-plan/types.d.ts +43 -0
  104. package/dist/server/modules/floor-plan/types.js +13 -0
  105. package/dist/server/modules/index.d.ts +7 -2
  106. package/dist/server/modules/index.js +6 -0
  107. package/dist/server/modules/order/index.d.ts +207 -14
  108. package/dist/server/modules/order/index.js +2326 -379
  109. package/dist/server/modules/order/types.d.ts +76 -5
  110. package/dist/server/modules/order/types.js +14 -1
  111. package/dist/server/modules/order/utils/filterBookings.d.ts +7 -1
  112. package/dist/server/modules/order/utils/filterBookings.js +118 -11
  113. package/dist/server/modules/order/utils/filterOrders.js +242 -14
  114. package/dist/server/modules/payment/index.d.ts +28 -0
  115. package/dist/server/modules/payment/index.js +305 -0
  116. package/dist/server/modules/payment/types.d.ts +9 -0
  117. package/dist/server/modules/payment/types.js +1 -0
  118. package/dist/server/modules/products/index.d.ts +105 -14
  119. package/dist/server/modules/products/index.js +1393 -516
  120. package/dist/server/modules/products/types.d.ts +34 -1
  121. package/dist/server/modules/products/types.js +4 -0
  122. package/dist/server/modules/quotation/index.d.ts +39 -0
  123. package/dist/server/modules/quotation/index.js +278 -66
  124. package/dist/server/modules/resource/index.d.ts +2 -3
  125. package/dist/server/modules/resource/index.js +108 -86
  126. package/dist/server/modules/schedule/index.d.ts +6 -4
  127. package/dist/server/modules/schedule/index.js +116 -85
  128. package/dist/server/test.json +713 -0
  129. package/dist/server/types.d.ts +2 -0
  130. package/dist/server/utils/product.js +2 -2
  131. package/dist/server/utils/small-ticket.d.ts +71 -0
  132. package/dist/server/utils/small-ticket.js +963 -0
  133. package/dist/solution/BaseSales/index.d.ts +378 -0
  134. package/dist/solution/BaseSales/index.js +4006 -0
  135. package/dist/solution/BaseSales/types.d.ts +394 -0
  136. package/dist/solution/BaseSales/types.js +40 -0
  137. package/dist/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
  138. package/dist/solution/BaseSales/utils/cartPromotion.js +1450 -0
  139. package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +144 -0
  140. package/dist/solution/BaseSales/utils/parseSalesResponse.js +157 -0
  141. package/dist/solution/BaseSales/utils/quotationPrice.d.ts +18 -0
  142. package/dist/solution/BaseSales/utils/quotationPrice.js +250 -0
  143. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +63 -0
  144. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +218 -0
  145. package/dist/solution/BaseSales/utils.d.ts +40 -0
  146. package/dist/solution/BaseSales/utils.js +263 -0
  147. package/dist/solution/BookingByStep/index.d.ts +1 -1
  148. package/dist/solution/BookingTicket/index.d.ts +394 -25
  149. package/dist/solution/BookingTicket/index.js +2506 -443
  150. package/dist/solution/BookingTicket/types.d.ts +191 -6
  151. package/dist/solution/BookingTicket/types.js +83 -10
  152. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
  153. package/dist/solution/BookingTicket/utils/addProductDecision.js +346 -0
  154. package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
  155. package/dist/solution/BookingTicket/utils/addTimeAvailability.js +95 -0
  156. package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +77 -0
  157. package/dist/solution/BookingTicket/utils/bookingStatus.js +136 -0
  158. package/dist/solution/BookingTicket/utils/cartView.d.ts +29 -0
  159. package/dist/solution/BookingTicket/utils/cartView.js +209 -0
  160. package/dist/solution/BookingTicket/utils/exampleData.d.ts +123 -0
  161. package/dist/solution/BookingTicket/utils/exampleData.js +183 -0
  162. package/dist/solution/BookingTicket/utils/orderCustomer.d.ts +4 -0
  163. package/dist/solution/BookingTicket/utils/orderCustomer.js +31 -0
  164. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
  165. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +438 -0
  166. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
  167. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +400 -0
  168. package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +4 -0
  169. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +41 -1
  170. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
  171. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +56 -0
  172. package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
  173. package/dist/solution/BookingTicket/utils/scan/handleScan.js +11 -3
  174. package/dist/solution/BookingTicket/utils/scan/index.d.ts +5 -0
  175. package/dist/solution/BookingTicket/utils/scan/index.js +20 -8
  176. package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
  177. package/dist/solution/BookingTicket/utils/scan/scanProductValues.js +150 -0
  178. package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
  179. package/dist/solution/BookingTicket/utils/sessionCatalogStale.js +78 -0
  180. package/dist/solution/Checkout/index.d.ts +1 -0
  181. package/dist/solution/Checkout/index.js +25 -34
  182. package/dist/solution/Checkout/utils/index.js +4 -4
  183. package/dist/solution/RegisterAndLogin/config.js +2 -10
  184. package/dist/solution/Sales/index.d.ts +50 -5
  185. package/dist/solution/Sales/index.js +484 -92
  186. package/dist/solution/Sales/types.d.ts +26 -2
  187. package/dist/solution/ScanOrder/index.d.ts +27 -21
  188. package/dist/solution/ScanOrder/index.js +499 -434
  189. package/dist/solution/ScanOrder/types.d.ts +33 -11
  190. package/dist/solution/ScanOrder/types.js +4 -5
  191. package/dist/solution/ScanOrder/utils.d.ts +4 -1
  192. package/dist/solution/ScanOrder/utils.js +109 -34
  193. package/dist/solution/ShopDiscount/index.js +4 -4
  194. package/dist/solution/UnifiedBookingSales/index.d.ts +183 -0
  195. package/dist/solution/UnifiedBookingSales/index.js +1871 -0
  196. package/dist/solution/UnifiedBookingSales/types.d.ts +143 -0
  197. package/dist/solution/UnifiedBookingSales/types.js +11 -0
  198. package/dist/solution/VenueBooking/index.d.ts +29 -20
  199. package/dist/solution/VenueBooking/index.js +301 -213
  200. package/dist/solution/VenueBooking/sales-section-4-annotated.json +0 -2
  201. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +6 -0
  202. package/dist/solution/VenueBooking/utils/slotMerge.js +9 -3
  203. package/dist/solution/index.d.ts +2 -0
  204. package/dist/solution/index.js +3 -1
  205. package/dist/types/index.d.ts +11 -1
  206. package/lib/model/strategy/adapter/promotion/evaluator.js +3 -2
  207. package/lib/model/strategy/adapter/walletPass/utils.js +6 -4
  208. package/lib/modules/BaseModule.d.ts +2 -2
  209. package/lib/modules/BaseModule.js +4 -4
  210. package/lib/modules/BookingContext/index.d.ts +48 -0
  211. package/lib/modules/BookingContext/index.js +390 -0
  212. package/lib/modules/BookingContext/types.d.ts +102 -0
  213. package/lib/modules/BookingContext/types.js +48 -0
  214. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
  215. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +286 -0
  216. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
  217. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +148 -0
  218. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
  219. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +242 -0
  220. package/lib/modules/BookingContext/utils/flexible.d.ts +28 -0
  221. package/lib/modules/BookingContext/utils/flexible.js +63 -0
  222. package/lib/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
  223. package/lib/modules/BookingContext/utils/formatResourceList.js +35 -0
  224. package/lib/modules/BookingContext/utils/index.d.ts +11 -0
  225. package/lib/modules/BookingContext/utils/index.js +126 -0
  226. package/lib/modules/BookingContext/utils/noResource.d.ts +13 -0
  227. package/lib/modules/BookingContext/utils/noResource.js +78 -0
  228. package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
  229. package/lib/modules/BookingContext/utils/orderLineDisplay.js +29 -0
  230. package/lib/modules/BookingContext/utils/productExtend.d.ts +72 -0
  231. package/lib/modules/BookingContext/utils/productExtend.js +330 -0
  232. package/lib/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
  233. package/lib/modules/BookingContext/utils/resourceErrors.js +80 -0
  234. package/lib/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
  235. package/lib/modules/BookingContext/utils/resourceSelection.js +24 -0
  236. package/lib/modules/BookingContext/utils/resources.d.ts +80 -0
  237. package/lib/modules/BookingContext/utils/resources.js +419 -0
  238. package/lib/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
  239. package/lib/modules/BookingContext/utils/serviceTimes.js +161 -0
  240. package/lib/modules/BookingContext/utils/timeSlices.d.ts +42 -0
  241. package/lib/modules/BookingContext/utils/timeSlices.js +114 -0
  242. package/lib/modules/Cart/utils/cartProduct.js +27 -5
  243. package/lib/modules/Cart/utils/changePrice.js +20 -14
  244. package/lib/modules/Customer/index.d.ts +20 -0
  245. package/lib/modules/Customer/index.js +63 -10
  246. package/lib/modules/Customer/types.d.ts +2 -0
  247. package/lib/modules/Discount/index.d.ts +2 -1
  248. package/lib/modules/Discount/index.js +18 -2
  249. package/lib/modules/Discount/types.d.ts +1 -0
  250. package/lib/modules/OpenData/index.d.ts +8 -0
  251. package/lib/modules/OpenData/index.js +21 -3
  252. package/lib/modules/Order/index.d.ts +448 -23
  253. package/lib/modules/Order/index.js +3641 -308
  254. package/lib/modules/Order/types.d.ts +693 -88
  255. package/lib/modules/Order/types.js +55 -1
  256. package/lib/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
  257. package/lib/modules/Order/utils/bundleDiscountHydration.js +106 -0
  258. package/lib/modules/Order/utils/manualProductDiscount.d.ts +106 -0
  259. package/lib/modules/Order/utils/manualProductDiscount.js +207 -0
  260. package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +53 -0
  261. package/lib/modules/Order/utils/orderCollectionIdentity.js +353 -0
  262. package/lib/modules/Order/utils.d.ts +167 -18
  263. package/lib/modules/Order/utils.js +974 -138
  264. package/lib/modules/Payment/index.d.ts +10 -9
  265. package/lib/modules/Payment/index.js +30 -124
  266. package/lib/modules/Payment/types.d.ts +40 -16
  267. package/lib/modules/Payment/utils.d.ts +1 -1
  268. package/lib/modules/Payment/utils.js +4 -3
  269. package/lib/modules/Payment/walletpass.js +16 -6
  270. package/lib/modules/Product/types.d.ts +29 -7
  271. package/lib/modules/ProductList/index.d.ts +17 -13
  272. package/lib/modules/ProductList/index.js +92 -51
  273. package/lib/modules/ProductList/types.d.ts +17 -0
  274. package/lib/modules/Quotation/index.d.ts +22 -2
  275. package/lib/modules/Quotation/index.js +76 -20
  276. package/lib/modules/Quotation/types.d.ts +19 -0
  277. package/lib/modules/ResourcePlanner/index.d.ts +24 -0
  278. package/lib/modules/ResourcePlanner/index.js +147 -0
  279. package/lib/modules/ResourcePlanner/planner.d.ts +14 -0
  280. package/lib/modules/ResourcePlanner/planner.js +895 -0
  281. package/lib/modules/ResourcePlanner/types.d.ts +227 -0
  282. package/lib/modules/ResourcePlanner/types.js +5 -0
  283. package/lib/modules/Rules/index.d.ts +8 -10
  284. package/lib/modules/Rules/index.js +152 -60
  285. package/lib/modules/Rules/types.d.ts +14 -3
  286. package/lib/modules/SalesSummary/index.d.ts +23 -26
  287. package/lib/modules/SalesSummary/index.js +84 -16
  288. package/lib/modules/SalesSummary/types.d.ts +9 -1
  289. package/lib/modules/SalesSummary/utils.d.ts +3 -22
  290. package/lib/modules/SalesSummary/utils.js +616 -111
  291. package/lib/modules/Schedule/getDateIsInSchedule.js +14 -7
  292. package/lib/modules/Schedule/index.d.ts +18 -5
  293. package/lib/modules/Schedule/index.js +49 -14
  294. package/lib/modules/Schedule/types.d.ts +2 -0
  295. package/lib/modules/Summary/index.js +2 -2
  296. package/lib/modules/SurchargeList/index.d.ts +18 -0
  297. package/lib/modules/SurchargeList/index.js +95 -0
  298. package/lib/modules/SurchargeList/types.d.ts +15 -0
  299. package/lib/modules/SurchargeList/types.js +5 -0
  300. package/lib/modules/index.d.ts +3 -0
  301. package/lib/modules/index.js +33 -0
  302. package/lib/plugins/app.d.ts +2 -0
  303. package/lib/plugins/request.d.ts +1 -0
  304. package/lib/server/index.d.ts +462 -8
  305. package/lib/server/index.js +3901 -205
  306. package/lib/server/modules/floor-plan/index.d.ts +39 -0
  307. package/lib/server/modules/floor-plan/index.js +306 -0
  308. package/lib/server/modules/floor-plan/types.d.ts +43 -0
  309. package/lib/server/modules/floor-plan/types.js +19 -0
  310. package/lib/server/modules/index.d.ts +7 -2
  311. package/lib/server/modules/index.js +21 -0
  312. package/lib/server/modules/order/index.d.ts +207 -14
  313. package/lib/server/modules/order/index.js +1324 -141
  314. package/lib/server/modules/order/types.d.ts +76 -5
  315. package/lib/server/modules/order/types.js +11 -1
  316. package/lib/server/modules/order/utils/filterBookings.d.ts +7 -1
  317. package/lib/server/modules/order/utils/filterBookings.js +119 -11
  318. package/lib/server/modules/order/utils/filterOrders.js +238 -13
  319. package/lib/server/modules/payment/index.d.ts +28 -0
  320. package/lib/server/modules/payment/index.js +168 -0
  321. package/lib/server/modules/payment/types.d.ts +9 -0
  322. package/lib/server/modules/payment/types.js +5 -0
  323. package/lib/server/modules/products/index.d.ts +105 -14
  324. package/lib/server/modules/products/index.js +588 -97
  325. package/lib/server/modules/products/types.d.ts +34 -1
  326. package/lib/server/modules/products/types.js +3 -0
  327. package/lib/server/modules/quotation/index.d.ts +39 -0
  328. package/lib/server/modules/quotation/index.js +145 -1
  329. package/lib/server/modules/resource/index.d.ts +2 -3
  330. package/lib/server/modules/resource/index.js +71 -45
  331. package/lib/server/modules/schedule/index.d.ts +6 -4
  332. package/lib/server/modules/schedule/index.js +55 -44
  333. package/lib/server/test.json +713 -0
  334. package/lib/server/types.d.ts +2 -0
  335. package/lib/server/utils/product.js +2 -2
  336. package/lib/server/utils/small-ticket.d.ts +71 -0
  337. package/lib/server/utils/small-ticket.js +926 -0
  338. package/lib/solution/BaseSales/index.d.ts +378 -0
  339. package/lib/solution/BaseSales/index.js +2367 -0
  340. package/lib/solution/BaseSales/types.d.ts +394 -0
  341. package/lib/solution/BaseSales/types.js +47 -0
  342. package/lib/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
  343. package/lib/solution/BaseSales/utils/cartPromotion.js +1155 -0
  344. package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +144 -0
  345. package/lib/solution/BaseSales/utils/parseSalesResponse.js +140 -0
  346. package/lib/solution/BaseSales/utils/quotationPrice.d.ts +18 -0
  347. package/lib/solution/BaseSales/utils/quotationPrice.js +231 -0
  348. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +63 -0
  349. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +215 -0
  350. package/lib/solution/BaseSales/utils.d.ts +40 -0
  351. package/lib/solution/BaseSales/utils.js +259 -0
  352. package/lib/solution/BookingByStep/index.d.ts +1 -1
  353. package/lib/solution/BookingTicket/index.d.ts +394 -25
  354. package/lib/solution/BookingTicket/index.js +1350 -76
  355. package/lib/solution/BookingTicket/types.d.ts +191 -6
  356. package/lib/solution/BookingTicket/types.js +71 -10
  357. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
  358. package/lib/solution/BookingTicket/utils/addProductDecision.js +353 -0
  359. package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
  360. package/lib/solution/BookingTicket/utils/addTimeAvailability.js +94 -0
  361. package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +77 -0
  362. package/lib/solution/BookingTicket/utils/bookingStatus.js +136 -0
  363. package/lib/solution/BookingTicket/utils/cartView.d.ts +29 -0
  364. package/lib/solution/BookingTicket/utils/cartView.js +200 -0
  365. package/lib/solution/BookingTicket/utils/exampleData.d.ts +123 -0
  366. package/lib/solution/BookingTicket/utils/exampleData.js +185 -0
  367. package/lib/solution/BookingTicket/utils/orderCustomer.d.ts +4 -0
  368. package/lib/solution/BookingTicket/utils/orderCustomer.js +35 -0
  369. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
  370. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +387 -0
  371. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
  372. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +220 -0
  373. package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +4 -0
  374. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +24 -3
  375. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
  376. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +64 -0
  377. package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
  378. package/lib/solution/BookingTicket/utils/scan/handleScan.js +4 -2
  379. package/lib/solution/BookingTicket/utils/scan/index.d.ts +5 -0
  380. package/lib/solution/BookingTicket/utils/scan/index.js +14 -2
  381. package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
  382. package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +115 -0
  383. package/lib/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
  384. package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +83 -0
  385. package/lib/solution/Checkout/index.d.ts +1 -0
  386. package/lib/solution/Checkout/index.js +18 -19
  387. package/lib/solution/Checkout/utils/index.js +4 -4
  388. package/lib/solution/RegisterAndLogin/config.js +2 -10
  389. package/lib/solution/Sales/index.d.ts +50 -5
  390. package/lib/solution/Sales/index.js +296 -39
  391. package/lib/solution/Sales/types.d.ts +26 -2
  392. package/lib/solution/ScanOrder/index.d.ts +27 -21
  393. package/lib/solution/ScanOrder/index.js +144 -103
  394. package/lib/solution/ScanOrder/types.d.ts +33 -11
  395. package/lib/solution/ScanOrder/types.js +4 -5
  396. package/lib/solution/ScanOrder/utils.d.ts +4 -1
  397. package/lib/solution/ScanOrder/utils.js +98 -26
  398. package/lib/solution/ShopDiscount/index.js +3 -3
  399. package/lib/solution/UnifiedBookingSales/index.d.ts +183 -0
  400. package/lib/solution/UnifiedBookingSales/index.js +1050 -0
  401. package/lib/solution/UnifiedBookingSales/types.d.ts +143 -0
  402. package/lib/solution/UnifiedBookingSales/types.js +14 -0
  403. package/lib/solution/VenueBooking/index.d.ts +29 -20
  404. package/lib/solution/VenueBooking/index.js +169 -94
  405. package/lib/solution/VenueBooking/sales-section-4-annotated.json +0 -2
  406. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +6 -0
  407. package/lib/solution/VenueBooking/utils/slotMerge.js +9 -3
  408. package/lib/solution/index.d.ts +2 -0
  409. package/lib/solution/index.js +22 -0
  410. package/lib/types/index.d.ts +11 -1
  411. package/package.json +1 -1
  412. package/dist/solution/Checkout/appointmentDemo.json +0 -1
  413. package/lib/solution/Checkout/appointmentDemo.json +0 -1
@@ -60,6 +60,30 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
60
60
  return _this;
61
61
  }
62
62
  _createClass(CustomerModule, [{
63
+ key: "isSameSelectedCustomer",
64
+ value:
65
+ /**
66
+ * 判断两份选中客户的核心展示字段是否一致,用于避免重复 clone / emit。
67
+ *
68
+ * @example
69
+ * this.isSameSelectedCustomer(currentCustomer, nextCustomer);
70
+ */
71
+ function isSameSelectedCustomer(current, next) {
72
+ var _id, _id2;
73
+ var normalizedNext = !next ? DEFAULT_CUSTOMER : next;
74
+ var normalizedCurrent = current || null;
75
+ if (!normalizedCurrent) return false;
76
+ // Walk-In 是默认客户,展示文案 / 默认区号可能来自不同入口;同为 id=1 时视为同一客户。
77
+ if (String((_id = normalizedCurrent === null || normalizedCurrent === void 0 ? void 0 : normalizedCurrent.id) !== null && _id !== void 0 ? _id : '') === '1' && String((_id2 = normalizedNext === null || normalizedNext === void 0 ? void 0 : normalizedNext.id) !== null && _id2 !== void 0 ? _id2 : '') === '1') {
78
+ return true;
79
+ }
80
+ var keys = ['id', 'name', 'phone', 'email', 'country_calling_code'];
81
+ return keys.every(function (key) {
82
+ var _key, _key2;
83
+ return String((_key = normalizedCurrent === null || normalizedCurrent === void 0 ? void 0 : normalizedCurrent[key]) !== null && _key !== void 0 ? _key : '') === String((_key2 = normalizedNext === null || normalizedNext === void 0 ? void 0 : normalizedNext[key]) !== null && _key2 !== void 0 ? _key2 : '');
84
+ });
85
+ }
86
+ }, {
63
87
  key: "initialize",
64
88
  value: function () {
65
89
  var _initialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(core, options) {
@@ -95,7 +119,7 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
95
119
  } else {
96
120
  this.store.currentPage = 1;
97
121
  }
98
- if (typeof (options === null || options === void 0 || (_options$initialState5 = options.initialState) === null || _options$initialState5 === void 0 ? void 0 : _options$initialState5.pageSize) === 'number') {
122
+ if (typeof (options === null || options === void 0 || (_options$initialState5 = options.initialState) === null || _options$initialState5 === void 0 ? void 0 : _options$initialState5.pageSize) === 'number' && options.initialState.pageSize > 1) {
99
123
  this.store.pageSize = options.initialState.pageSize;
100
124
  } else {
101
125
  this.store.pageSize = DEFAULT_PAGE_SIZE;
@@ -125,6 +149,22 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
125
149
  }
126
150
  return initialize;
127
151
  }()
152
+ /**
153
+ * 更新父级解决方案透传的运行态参数,并刷新客户模块缓存配置。
154
+ *
155
+ * @example
156
+ * customerModule.updateOtherParams({ isFranchisee: true, cacheId: 'cache-2' });
157
+ */
158
+ }, {
159
+ key: "updateOtherParams",
160
+ value: function updateOtherParams(params) {
161
+ var _this$otherParams$ope;
162
+ this.otherParams = params || {};
163
+ this.openCache = (_this$otherParams$ope = this.otherParams.openCache) !== null && _this$otherParams$ope !== void 0 ? _this$otherParams$ope : false;
164
+ this.cacheId = this.otherParams.cacheId;
165
+ this.fatherModule = this.otherParams.fatherModule;
166
+ }
167
+
128
168
  /**
129
169
  * 获取客户列表数据(内部方法)
130
170
  * @param params 查询参数
@@ -236,6 +276,52 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
236
276
  }
237
277
  return handleCustomerListError;
238
278
  }()
279
+ /**
280
+ * 查询客户列表但不写入 customerList / pagination 状态。
281
+ *
282
+ * 用于按 ID 补齐客户等内部查询,避免把临时的 num/searchParams 污染到滚动列表。
283
+ */
284
+ )
285
+ }, {
286
+ key: "queryCustomerList",
287
+ value: (function () {
288
+ var _queryCustomerList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
289
+ var params,
290
+ _yield$this$fetchCust,
291
+ customerList,
292
+ total,
293
+ page,
294
+ pageSize,
295
+ _args4 = arguments;
296
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
297
+ while (1) switch (_context4.prev = _context4.next) {
298
+ case 0:
299
+ params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
300
+ _context4.next = 3;
301
+ return this.fetchCustomerListData(params);
302
+ case 3:
303
+ _yield$this$fetchCust = _context4.sent;
304
+ customerList = _yield$this$fetchCust.customerList;
305
+ total = _yield$this$fetchCust.total;
306
+ page = _yield$this$fetchCust.page;
307
+ pageSize = _yield$this$fetchCust.pageSize;
308
+ return _context4.abrupt("return", {
309
+ list: customerList,
310
+ total: total,
311
+ page: page,
312
+ pageSize: pageSize
313
+ });
314
+ case 9:
315
+ case "end":
316
+ return _context4.stop();
317
+ }
318
+ }, _callee4, this);
319
+ }));
320
+ function queryCustomerList() {
321
+ return _queryCustomerList.apply(this, arguments);
322
+ }
323
+ return queryCustomerList;
324
+ }()
239
325
  /**
240
326
  * 获取客户列表
241
327
  * @param params 查询参数
@@ -245,9 +331,9 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
245
331
  }, {
246
332
  key: "getCustomerList",
247
333
  value: (function () {
248
- var _getCustomerList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
334
+ var _getCustomerList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
249
335
  var params,
250
- _yield$this$fetchCust,
336
+ _yield$this$fetchCust2,
251
337
  customerList,
252
338
  total,
253
339
  page,
@@ -256,22 +342,22 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
256
342
  num,
257
343
  searchParams,
258
344
  response,
259
- _args4 = arguments;
260
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
261
- while (1) switch (_context4.prev = _context4.next) {
345
+ _args5 = arguments;
346
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
347
+ while (1) switch (_context5.prev = _context5.next) {
262
348
  case 0:
263
- params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
264
- _context4.prev = 1;
349
+ params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
350
+ _context5.prev = 1;
265
351
  this.store.loading = true;
266
352
  this.store.error = null;
267
- _context4.next = 6;
353
+ _context5.next = 6;
268
354
  return this.fetchCustomerListData(params);
269
355
  case 6:
270
- _yield$this$fetchCust = _context4.sent;
271
- customerList = _yield$this$fetchCust.customerList;
272
- total = _yield$this$fetchCust.total;
273
- page = _yield$this$fetchCust.page;
274
- pageSize = _yield$this$fetchCust.pageSize;
356
+ _yield$this$fetchCust2 = _context5.sent;
357
+ customerList = _yield$this$fetchCust2.customerList;
358
+ total = _yield$this$fetchCust2.total;
359
+ page = _yield$this$fetchCust2.page;
360
+ pageSize = _yield$this$fetchCust2.pageSize;
275
361
  // 保存搜索条件(排除skip和num)
276
362
  skip = params.skip, num = params.num, searchParams = _objectWithoutProperties(params, _excluded2);
277
363
  this.store.searchParams = cloneDeep(searchParams);
@@ -286,9 +372,7 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
286
372
 
287
373
  // 设置客户列表(替换模式)
288
374
  this.store.customerList = cloneDeep(customerList);
289
- _context4.next = 20;
290
- return this.core.effects.emit("".concat(this.name, ":onCustomerListUpdate"), this.store);
291
- case 20:
375
+
292
376
  // 触发分页变化事件
293
377
  this.triggerPaginationChange({
294
378
  page: page,
@@ -302,24 +386,27 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
302
386
  page: page,
303
387
  pageSize: pageSize
304
388
  };
305
- return _context4.abrupt("return", response);
306
- case 25:
307
- _context4.prev = 25;
308
- _context4.t0 = _context4["catch"](1);
309
- _context4.next = 29;
310
- return this.handleCustomerListError(_context4.t0, 'fetch customer list');
311
- case 29:
312
- throw _context4.t0;
313
- case 30:
314
- _context4.prev = 30;
389
+ return _context5.abrupt("return", response);
390
+ case 23:
391
+ _context5.prev = 23;
392
+ _context5.t0 = _context5["catch"](1);
393
+ _context5.next = 27;
394
+ return this.handleCustomerListError(_context5.t0, 'fetch customer list');
395
+ case 27:
396
+ throw _context5.t0;
397
+ case 28:
398
+ _context5.prev = 28;
315
399
  this.store.loading = false;
316
400
  this.storeChange();
317
- return _context4.finish(30);
401
+ _context5.next = 33;
402
+ return this.core.effects.emit("".concat(this.name, ":onCustomerListUpdate"), this.store);
403
+ case 33:
404
+ return _context5.finish(28);
318
405
  case 34:
319
406
  case "end":
320
- return _context4.stop();
407
+ return _context5.stop();
321
408
  }
322
- }, _callee4, this, [[1, 25, 30, 34]]);
409
+ }, _callee5, this, [[1, 23, 28, 34]]);
323
410
  }));
324
411
  function getCustomerList() {
325
412
  return _getCustomerList.apply(this, arguments);
@@ -349,6 +436,9 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
349
436
  }, {
350
437
  key: "setSelectedCustomer",
351
438
  value: function setSelectedCustomer(customer) {
439
+ if (this.isSameSelectedCustomer(this.store.selectedCustomer, customer)) {
440
+ return;
441
+ }
352
442
  this.store.selectedCustomer = !customer ? DEFAULT_CUSTOMER : cloneDeep(customer);
353
443
  this.core.effects.emit("".concat(this.name, ":onCustomerSelected"), this.store.selectedCustomer);
354
444
  this.storeChange();
@@ -493,10 +583,10 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
493
583
  }, {
494
584
  key: "changeCustomerPage",
495
585
  value: (function () {
496
- var _changeCustomerPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(page, pageSize) {
586
+ var _changeCustomerPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(page, pageSize) {
497
587
  var targetPageSize, skip, num;
498
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
499
- while (1) switch (_context5.prev = _context5.next) {
588
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
589
+ while (1) switch (_context6.prev = _context6.next) {
500
590
  case 0:
501
591
  targetPageSize = pageSize || this.store.pageSize; // 先更新分页状态
502
592
  this.setPaginationInfo(page, targetPageSize);
@@ -504,18 +594,18 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
504
594
  // skip直接使用page,num使用pageSize
505
595
  skip = page;
506
596
  num = targetPageSize; // 自动调用获取客户列表,使用存储的搜索条件
507
- _context5.next = 6;
597
+ _context6.next = 6;
508
598
  return this.getCustomerList(_objectSpread({
509
599
  skip: skip,
510
600
  num: num
511
601
  }, this.store.searchParams));
512
602
  case 6:
513
- return _context5.abrupt("return", _context5.sent);
603
+ return _context6.abrupt("return", _context6.sent);
514
604
  case 7:
515
605
  case "end":
516
- return _context5.stop();
606
+ return _context6.stop();
517
607
  }
518
- }, _callee5, this);
608
+ }, _callee6, this);
519
609
  }));
520
610
  function changeCustomerPage(_x5, _x6) {
521
611
  return _changeCustomerPage.apply(this, arguments);
@@ -530,16 +620,16 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
530
620
  }, {
531
621
  key: "loadMoreCustomers",
532
622
  value: (function () {
533
- var _loadMoreCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
534
- var nextPage, _yield$this$fetchCust2, newCustomers, total, page, pageSize, updatedCustomerList, response;
535
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
536
- while (1) switch (_context6.prev = _context6.next) {
623
+ var _loadMoreCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
624
+ var nextPage, loadMoreParams, _yield$this$fetchCust3, newCustomers, total, page, pageSize, updatedCustomerList, response;
625
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
626
+ while (1) switch (_context7.prev = _context7.next) {
537
627
  case 0:
538
628
  if (!(!this.store.hasMore || this.store.loadingMore)) {
539
- _context6.next = 2;
629
+ _context7.next = 2;
540
630
  break;
541
631
  }
542
- return _context6.abrupt("return", {
632
+ return _context7.abrupt("return", {
543
633
  list: [],
544
634
  total: this.store.total,
545
635
  page: this.store.currentPage,
@@ -548,22 +638,21 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
548
638
  case 2:
549
639
  // 计算下一页
550
640
  nextPage = this.store.currentPage + 1;
551
- _context6.prev = 3;
641
+ _context7.prev = 3;
552
642
  this.store.loadingMore = true;
553
643
  this.store.error = null;
554
-
555
- // 使用公共方法获取数据,传入存储的搜索条件
556
- _context6.next = 8;
557
- return this.fetchCustomerListData(_objectSpread({
644
+ loadMoreParams = _objectSpread({
558
645
  skip: nextPage,
559
646
  num: this.store.pageSize
560
- }, this.store.searchParams));
561
- case 8:
562
- _yield$this$fetchCust2 = _context6.sent;
563
- newCustomers = _yield$this$fetchCust2.customerList;
564
- total = _yield$this$fetchCust2.total;
565
- page = _yield$this$fetchCust2.page;
566
- pageSize = _yield$this$fetchCust2.pageSize;
647
+ }, this.store.searchParams); // 使用公共方法获取数据,传入存储的搜索条件
648
+ _context7.next = 9;
649
+ return this.fetchCustomerListData(loadMoreParams);
650
+ case 9:
651
+ _yield$this$fetchCust3 = _context7.sent;
652
+ newCustomers = _yield$this$fetchCust3.customerList;
653
+ total = _yield$this$fetchCust3.total;
654
+ page = _yield$this$fetchCust3.page;
655
+ pageSize = _yield$this$fetchCust3.pageSize;
567
656
  // 将新数据追加到现有列表(追加模式)
568
657
  updatedCustomerList = [].concat(_toConsumableArray(this.store.customerList), _toConsumableArray(cloneDeep(newCustomers))); // 更新状态
569
658
  this.store.customerList = updatedCustomerList;
@@ -572,17 +661,14 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
572
661
  this.store.hasMore = page * pageSize < total;
573
662
 
574
663
  // 触发滚动加载特定事件
575
- _context6.next = 20;
664
+ _context7.next = 21;
576
665
  return this.core.effects.emit("".concat(this.name, ":onScrollLoadMore"), {
577
666
  newCustomers: newCustomers,
578
667
  allCustomers: this.store.customerList,
579
668
  currentPage: page,
580
669
  hasMore: this.store.hasMore
581
670
  });
582
- case 20:
583
- _context6.next = 22;
584
- return this.core.effects.emit("".concat(this.name, ":onCustomerListUpdate"), this.store);
585
- case 22:
671
+ case 21:
586
672
  // 触发分页变化事件
587
673
  this.triggerPaginationChange({
588
674
  page: page,
@@ -597,24 +683,27 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
597
683
  page: page,
598
684
  pageSize: pageSize
599
685
  };
600
- return _context6.abrupt("return", response);
601
- case 27:
602
- _context6.prev = 27;
603
- _context6.t0 = _context6["catch"](3);
604
- _context6.next = 31;
605
- return this.handleCustomerListError(_context6.t0, 'load more customers');
686
+ return _context7.abrupt("return", response);
687
+ case 26:
688
+ _context7.prev = 26;
689
+ _context7.t0 = _context7["catch"](3);
690
+ _context7.next = 30;
691
+ return this.handleCustomerListError(_context7.t0, 'load more customers');
692
+ case 30:
693
+ throw _context7.t0;
606
694
  case 31:
607
- throw _context6.t0;
608
- case 32:
609
- _context6.prev = 32;
695
+ _context7.prev = 31;
610
696
  this.store.loadingMore = false;
611
697
  this.storeChange();
612
- return _context6.finish(32);
698
+ _context7.next = 36;
699
+ return this.core.effects.emit("".concat(this.name, ":onCustomerListUpdate"), this.store);
613
700
  case 36:
701
+ return _context7.finish(31);
702
+ case 37:
614
703
  case "end":
615
- return _context6.stop();
704
+ return _context7.stop();
616
705
  }
617
- }, _callee6, this, [[3, 27, 32, 36]]);
706
+ }, _callee7, this, [[3, 26, 31, 37]]);
618
707
  }));
619
708
  function loadMoreCustomers() {
620
709
  return _loadMoreCustomers.apply(this, arguments);
@@ -630,15 +719,15 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
630
719
  }, {
631
720
  key: "resetAndLoadCustomers",
632
721
  value: (function () {
633
- var _resetAndLoadCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
722
+ var _resetAndLoadCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
634
723
  var params,
635
724
  resetParams,
636
725
  response,
637
- _args7 = arguments;
638
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
639
- while (1) switch (_context7.prev = _context7.next) {
726
+ _args8 = arguments;
727
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
728
+ while (1) switch (_context8.prev = _context8.next) {
640
729
  case 0:
641
- params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
730
+ params = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
642
731
  // 重置状态
643
732
  this.store.customerList = [];
644
733
  this.store.currentPage = 1;
@@ -650,23 +739,23 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
650
739
  skip: 1,
651
740
  num: params.num || this.store.pageSize
652
741
  }); // 调用普通的获取列表方法
653
- _context7.next = 8;
742
+ _context8.next = 8;
654
743
  return this.getCustomerList(resetParams);
655
744
  case 8:
656
- response = _context7.sent;
657
- _context7.next = 11;
745
+ response = _context8.sent;
746
+ _context8.next = 11;
658
747
  return this.core.effects.emit("".concat(this.name, ":onScrollLoadComplete"), {
659
748
  customers: this.store.customerList,
660
749
  total: this.store.total,
661
750
  hasMore: this.store.hasMore
662
751
  });
663
752
  case 11:
664
- return _context7.abrupt("return", response);
753
+ return _context8.abrupt("return", response);
665
754
  case 12:
666
755
  case "end":
667
- return _context7.stop();
756
+ return _context8.stop();
668
757
  }
669
- }, _callee7, this);
758
+ }, _callee8, this);
670
759
  }));
671
760
  function resetAndLoadCustomers() {
672
761
  return _resetAndLoadCustomers.apply(this, arguments);
@@ -110,6 +110,8 @@ export interface CustomerState {
110
110
  export interface CustomerModuleAPI {
111
111
  /** 获取客户列表 */
112
112
  getCustomerList: (params?: ShopGetCustomerListParams) => Promise<ICustomerListResponse>;
113
+ /** 查询客户列表但不更新列表分页状态 */
114
+ queryCustomerList: (params?: ShopGetCustomerListParams) => Promise<ICustomerListResponse>;
113
115
  /** 设置客户列表 */
114
116
  setCustomerList: (customers: ShopCustomer[], total?: number) => void;
115
117
  /** 设置当前选择的客户 */
@@ -16,6 +16,7 @@ export declare class DiscountModule extends BaseModule implements Module, Discou
16
16
  getDiscountList(): Discount[];
17
17
  setOriginalDiscountList(originalDiscountList: Discount[]): Promise<void>;
18
18
  getOriginalDiscountList(): Discount[];
19
+ private normalizePositiveNumberIds;
19
20
  loadPrepareConfig(params: {
20
21
  action?: 'create' | 'edit';
21
22
  with_good_pass: 0 | 1;
@@ -25,7 +26,7 @@ export declare class DiscountModule extends BaseModule implements Module, Discou
25
26
  with_available_wallet_flag?: 0 | 1;
26
27
  with_available_wallet_pass_flag?: 0 | 1;
27
28
  request_timezone: string;
28
- order_id?: number;
29
+ order_id?: number | string;
29
30
  }): Promise<DiscountPrepareConfigResult>;
30
31
  private extractAvailableWalletIds;
31
32
  batchSearch(code: string, options?: {
@@ -1,18 +1,20 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
2
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7
5
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
6
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
9
7
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
10
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
11
11
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
12
12
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
13
13
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
14
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
15
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
17
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
16
18
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
17
19
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
18
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
@@ -149,25 +151,49 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
149
151
  value: function getOriginalDiscountList() {
150
152
  return this.store.originalDiscountList || [];
151
153
  }
154
+ }, {
155
+ key: "normalizePositiveNumberIds",
156
+ value: function normalizePositiveNumberIds(values) {
157
+ var ids = values.map(function (value) {
158
+ return Number(value);
159
+ }).filter(function (value) {
160
+ return Number.isFinite(value) && value > 0;
161
+ });
162
+ return Array.from(new Set(ids));
163
+ }
152
164
  }, {
153
165
  key: "loadPrepareConfig",
154
166
  value: function () {
155
167
  var _loadPrepareConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
156
- var _prepareConfig$data, _prepareConfig$data2;
157
- var prepareConfig, goodPassList;
168
+ var _params$with_availabl, _params$with_availabl2, _prepareConfig$data, _prepareConfig$data2, _prepareConfig$data3, _prepareConfig$data4, _prepareConfig$data5;
169
+ var prepareConfig, rawDiscountList, availableWalletList, availableWalletPassList, availableWalletIds, goodPassList;
158
170
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
159
171
  while (1) switch (_context4.prev = _context4.next) {
160
172
  case 0:
161
- _context4.next = 2;
162
- return this.request.post("/order/prepare/config", params);
163
- case 2:
173
+ if (typeof params.order_id === 'string' && params.order_id.startsWith('LOCAL_')) {
174
+ params.order_id = undefined;
175
+ }
176
+ _context4.next = 3;
177
+ return this.request.post("/order/prepare/config", _objectSpread(_objectSpread({}, params), {}, {
178
+ with_available_wallet_flag: (_params$with_availabl = params.with_available_wallet_flag) !== null && _params$with_availabl !== void 0 ? _params$with_availabl : 1,
179
+ with_available_wallet_pass_flag: (_params$with_availabl2 = params.with_available_wallet_pass_flag) !== null && _params$with_availabl2 !== void 0 ? _params$with_availabl2 : 1
180
+ }));
181
+ case 3:
164
182
  prepareConfig = _context4.sent;
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);
183
+ 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) || []));
184
+ availableWalletList = [].concat(_toConsumableArray((prepareConfig === null || prepareConfig === void 0 || (_prepareConfig$data3 = prepareConfig.data) === null || _prepareConfig$data3 === void 0 ? void 0 : _prepareConfig$data3.avaiable_wallet_list) || []), _toConsumableArray((prepareConfig === null || prepareConfig === void 0 || (_prepareConfig$data4 = prepareConfig.data) === null || _prepareConfig$data4 === void 0 ? void 0 : _prepareConfig$data4.available_wallet_list) || []));
185
+ availableWalletPassList = (prepareConfig === null || prepareConfig === void 0 || (_prepareConfig$data5 = prepareConfig.data) === null || _prepareConfig$data5 === void 0 ? void 0 : _prepareConfig$data5.available_wallet_pass_list) || [];
186
+ availableWalletIds = this.normalizePositiveNumberIds([].concat(_toConsumableArray(availableWalletList.map(function (item) {
187
+ return item === null || item === void 0 ? void 0 : item.wallet_id;
188
+ })), _toConsumableArray(availableWalletPassList.map(function (item) {
189
+ return item === null || item === void 0 ? void 0 : item.product_id;
190
+ }))));
191
+ goodPassList = this.filterEnabledDiscountList(rawDiscountList) || []; // this.setDiscountList(goodPassList);
166
192
  return _context4.abrupt("return", {
167
193
  discountList: goodPassList,
168
194
  availableWalletIds: this.extractAvailableWalletIds(prepareConfig === null || prepareConfig === void 0 ? void 0 : prepareConfig.data)
169
195
  });
170
- case 5:
196
+ case 10:
171
197
  case "end":
172
198
  return _context4.stop();
173
199
  }
@@ -459,6 +485,8 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
459
485
  _context7.next = 4;
460
486
  return this.core.effects.emit("".concat(this.name, ":onDestroy"), {});
461
487
  case 4:
488
+ _get(_getPrototypeOf(DiscountModule.prototype), "destroy", this).call(this);
489
+ case 5:
462
490
  case "end":
463
491
  return _context7.stop();
464
492
  }
@@ -145,6 +145,7 @@ export interface Discount {
145
145
  appliedProductDetails: ApplicableProductDetails[];
146
146
  isDisabledForProductUsed?: boolean;
147
147
  amount?: number;
148
+ customer_id?: number | string | null;
148
149
  extension_data?: ExtensionData[];
149
150
  total_order_behavior_count?: number;
150
151
  today_order_behavior_count?: number;
@@ -9,6 +9,7 @@ export declare class OpenDataModule extends BaseModule implements Module {
9
9
  protected defaultVersion: string;
10
10
  private request;
11
11
  private window;
12
+ private appPlugin;
12
13
  private store;
13
14
  private cacheId;
14
15
  private openCache;
@@ -16,6 +17,13 @@ export declare class OpenDataModule extends BaseModule implements Module {
16
17
  private otherParams;
17
18
  constructor(name?: string, version?: string);
18
19
  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;
19
27
  fetchOpenData(params: OpenDataFetchParams): Promise<OpenDataConfig>;
20
28
  getOpenData(): OpenDataConfig | null;
21
29
  getLastFetchedAt(): number | null;