@pisell/pisellos 2.2.244 → 2.2.246

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 (316) 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/BookingContext/index.d.ts +48 -0
  4. package/dist/modules/BookingContext/index.js +566 -0
  5. package/dist/modules/BookingContext/types.d.ts +102 -0
  6. package/dist/modules/BookingContext/types.js +51 -0
  7. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
  8. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +284 -0
  9. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
  10. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +148 -0
  11. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
  12. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +218 -0
  13. package/dist/modules/BookingContext/utils/flexible.d.ts +28 -0
  14. package/dist/modules/BookingContext/utils/flexible.js +56 -0
  15. package/dist/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
  16. package/dist/modules/BookingContext/utils/formatResourceList.js +38 -0
  17. package/dist/modules/BookingContext/utils/index.d.ts +11 -0
  18. package/dist/modules/BookingContext/utils/index.js +11 -0
  19. package/dist/modules/BookingContext/utils/noResource.d.ts +13 -0
  20. package/dist/modules/BookingContext/utils/noResource.js +77 -0
  21. package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
  22. package/dist/modules/BookingContext/utils/orderLineDisplay.js +36 -0
  23. package/dist/modules/BookingContext/utils/productExtend.d.ts +72 -0
  24. package/dist/modules/BookingContext/utils/productExtend.js +339 -0
  25. package/dist/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
  26. package/dist/modules/BookingContext/utils/resourceErrors.js +74 -0
  27. package/dist/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
  28. package/dist/modules/BookingContext/utils/resourceSelection.js +24 -0
  29. package/dist/modules/BookingContext/utils/resources.d.ts +80 -0
  30. package/dist/modules/BookingContext/utils/resources.js +486 -0
  31. package/dist/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
  32. package/dist/modules/BookingContext/utils/serviceTimes.js +151 -0
  33. package/dist/modules/BookingContext/utils/timeSlices.d.ts +42 -0
  34. package/dist/modules/BookingContext/utils/timeSlices.js +100 -0
  35. package/dist/modules/Cart/utils/cartProduct.js +24 -3
  36. package/dist/modules/Cart/utils/changePrice.js +11 -11
  37. package/dist/modules/Customer/index.d.ts +20 -0
  38. package/dist/modules/Customer/index.js +172 -83
  39. package/dist/modules/Customer/types.d.ts +2 -0
  40. package/dist/modules/Discount/index.d.ts +1 -1
  41. package/dist/modules/Discount/index.js +13 -6
  42. package/dist/modules/Discount/types.d.ts +1 -0
  43. package/dist/modules/OpenData/index.d.ts +8 -0
  44. package/dist/modules/OpenData/index.js +37 -17
  45. package/dist/modules/Order/index.d.ts +277 -18
  46. package/dist/modules/Order/index.js +3581 -779
  47. package/dist/modules/Order/types.d.ts +286 -31
  48. package/dist/modules/Order/types.js +38 -0
  49. package/dist/modules/Order/utils/manualProductDiscount.d.ts +106 -0
  50. package/dist/modules/Order/utils/manualProductDiscount.js +210 -0
  51. package/dist/modules/Order/utils.d.ts +147 -5
  52. package/dist/modules/Order/utils.js +750 -104
  53. package/dist/modules/Payment/index.d.ts +10 -13
  54. package/dist/modules/Payment/index.js +467 -837
  55. package/dist/modules/Payment/types.d.ts +2 -0
  56. package/dist/modules/Payment/utils.js +2 -1
  57. package/dist/modules/Payment/walletpass.js +41 -25
  58. package/dist/modules/ProductList/index.d.ts +16 -12
  59. package/dist/modules/ProductList/index.js +133 -59
  60. package/dist/modules/ProductList/types.d.ts +14 -0
  61. package/dist/modules/Quotation/index.d.ts +0 -1
  62. package/dist/modules/Quotation/index.js +25 -22
  63. package/dist/modules/Rules/index.d.ts +4 -0
  64. package/dist/modules/Rules/index.js +97 -70
  65. package/dist/modules/Rules/types.d.ts +1 -0
  66. package/dist/modules/SalesSummary/index.d.ts +8 -25
  67. package/dist/modules/SalesSummary/index.js +86 -35
  68. package/dist/modules/SalesSummary/types.d.ts +4 -1
  69. package/dist/modules/SalesSummary/utils.d.ts +2 -25
  70. package/dist/modules/SalesSummary/utils.js +794 -162
  71. package/dist/modules/Schedule/index.d.ts +7 -0
  72. package/dist/modules/Schedule/index.js +24 -2
  73. package/dist/modules/Summary/index.js +4 -3
  74. package/dist/modules/SurchargeList/index.d.ts +16 -0
  75. package/dist/modules/SurchargeList/index.js +162 -0
  76. package/dist/modules/SurchargeList/types.d.ts +11 -0
  77. package/dist/modules/SurchargeList/types.js +1 -0
  78. package/dist/modules/index.d.ts +2 -0
  79. package/dist/modules/index.js +3 -1
  80. package/dist/plugins/request.d.ts +1 -0
  81. package/dist/server/index.d.ts +204 -1
  82. package/dist/server/index.js +3654 -922
  83. package/dist/server/modules/index.d.ts +2 -0
  84. package/dist/server/modules/index.js +2 -0
  85. package/dist/server/modules/order/index.d.ts +120 -3
  86. package/dist/server/modules/order/index.js +1762 -448
  87. package/dist/server/modules/order/types.d.ts +32 -3
  88. package/dist/server/modules/order/types.js +8 -0
  89. package/dist/server/modules/order/utils/filterBookings.js +26 -3
  90. package/dist/server/modules/order/utils/filterOrders.js +23 -8
  91. package/dist/server/modules/payment/index.d.ts +28 -0
  92. package/dist/server/modules/payment/index.js +305 -0
  93. package/dist/server/modules/payment/types.d.ts +9 -0
  94. package/dist/server/modules/payment/types.js +1 -0
  95. package/dist/server/modules/products/index.d.ts +34 -7
  96. package/dist/server/modules/products/index.js +631 -317
  97. package/dist/server/modules/resource/index.d.ts +2 -0
  98. package/dist/server/modules/resource/index.js +29 -3
  99. package/dist/server/modules/schedule/index.d.ts +4 -4
  100. package/dist/server/modules/schedule/index.js +111 -88
  101. package/dist/server/test.json +713 -0
  102. package/dist/server/utils/small-ticket.d.ts +71 -0
  103. package/dist/server/utils/small-ticket.js +840 -0
  104. package/dist/solution/BaseSales/index.d.ts +133 -10
  105. package/dist/solution/BaseSales/index.js +1950 -447
  106. package/dist/solution/BaseSales/types.d.ts +82 -6
  107. package/dist/solution/BaseSales/types.js +5 -4
  108. package/dist/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
  109. package/dist/solution/BaseSales/utils/cartPromotion.js +1438 -0
  110. package/dist/solution/BaseSales/utils/quotationPrice.d.ts +7 -0
  111. package/dist/solution/BaseSales/utils/quotationPrice.js +237 -0
  112. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
  113. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +105 -24
  114. package/dist/solution/BaseSales/utils.d.ts +1 -1
  115. package/dist/solution/BaseSales/utils.js +62 -21
  116. package/dist/solution/BookingByStep/index.d.ts +1 -1
  117. package/dist/solution/BookingTicket/index.d.ts +271 -11
  118. package/dist/solution/BookingTicket/index.js +1777 -242
  119. package/dist/solution/BookingTicket/types.d.ts +118 -1
  120. package/dist/solution/BookingTicket/types.js +41 -2
  121. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
  122. package/dist/solution/BookingTicket/utils/addProductDecision.js +346 -0
  123. package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
  124. package/dist/solution/BookingTicket/utils/addTimeAvailability.js +95 -0
  125. package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +40 -0
  126. package/dist/solution/BookingTicket/utils/bookingStatus.js +70 -0
  127. package/dist/solution/BookingTicket/utils/cartView.d.ts +9 -1
  128. package/dist/solution/BookingTicket/utils/cartView.js +94 -7
  129. package/dist/solution/BookingTicket/utils/exampleData.d.ts +123 -0
  130. package/dist/solution/BookingTicket/utils/exampleData.js +183 -0
  131. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
  132. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +438 -0
  133. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
  134. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +400 -0
  135. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
  136. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +56 -0
  137. package/dist/solution/BookingTicket/utils/scan/index.d.ts +5 -0
  138. package/dist/solution/BookingTicket/utils/scan/index.js +20 -8
  139. package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
  140. package/dist/solution/BookingTicket/utils/scan/scanProductValues.js +150 -0
  141. package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
  142. package/dist/solution/BookingTicket/utils/sessionCatalogStale.js +78 -0
  143. package/dist/solution/Checkout/index.d.ts +1 -0
  144. package/dist/solution/Checkout/index.js +10 -9
  145. package/dist/solution/RegisterAndLogin/config.js +2 -10
  146. package/dist/solution/ScanOrder/index.d.ts +9 -3
  147. package/dist/solution/ScanOrder/index.js +241 -134
  148. package/dist/solution/ScanOrder/types.d.ts +9 -5
  149. package/dist/solution/ScanOrder/types.js +2 -3
  150. package/dist/solution/ScanOrder/utils.d.ts +1 -1
  151. package/dist/solution/ScanOrder/utils.js +84 -22
  152. package/dist/solution/VenueBooking/index.d.ts +5 -2
  153. package/dist/solution/VenueBooking/index.js +110 -59
  154. package/dist/solution/VenueBooking/sales-section-4-annotated.json +0 -2
  155. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -0
  156. package/dist/solution/VenueBooking/utils/slotMerge.js +10 -0
  157. package/dist/types/index.d.ts +10 -0
  158. package/lib/model/strategy/adapter/promotion/evaluator.js +2 -1
  159. package/lib/model/strategy/adapter/promotion/index.js +49 -0
  160. package/lib/model/strategy/adapter/walletPass/utils.js +3 -2
  161. package/lib/modules/BookingContext/index.d.ts +48 -0
  162. package/lib/modules/BookingContext/index.js +368 -0
  163. package/lib/modules/BookingContext/types.d.ts +102 -0
  164. package/lib/modules/BookingContext/types.js +34 -0
  165. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
  166. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +276 -0
  167. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
  168. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +154 -0
  169. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
  170. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +201 -0
  171. package/lib/modules/BookingContext/utils/flexible.d.ts +28 -0
  172. package/lib/modules/BookingContext/utils/flexible.js +80 -0
  173. package/lib/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
  174. package/lib/modules/BookingContext/utils/formatResourceList.js +50 -0
  175. package/lib/modules/BookingContext/utils/index.d.ts +11 -0
  176. package/lib/modules/BookingContext/utils/index.js +43 -0
  177. package/lib/modules/BookingContext/utils/noResource.d.ts +13 -0
  178. package/lib/modules/BookingContext/utils/noResource.js +90 -0
  179. package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
  180. package/lib/modules/BookingContext/utils/orderLineDisplay.js +56 -0
  181. package/lib/modules/BookingContext/utils/productExtend.d.ts +72 -0
  182. package/lib/modules/BookingContext/utils/productExtend.js +283 -0
  183. package/lib/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
  184. package/lib/modules/BookingContext/utils/resourceErrors.js +80 -0
  185. package/lib/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
  186. package/lib/modules/BookingContext/utils/resourceSelection.js +46 -0
  187. package/lib/modules/BookingContext/utils/resources.d.ts +80 -0
  188. package/lib/modules/BookingContext/utils/resources.js +377 -0
  189. package/lib/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
  190. package/lib/modules/BookingContext/utils/serviceTimes.js +162 -0
  191. package/lib/modules/BookingContext/utils/timeSlices.d.ts +42 -0
  192. package/lib/modules/BookingContext/utils/timeSlices.js +124 -0
  193. package/lib/modules/Cart/utils/cartProduct.js +20 -3
  194. package/lib/modules/Cart/utils/changePrice.js +12 -20
  195. package/lib/modules/Customer/index.d.ts +20 -0
  196. package/lib/modules/Customer/index.js +64 -11
  197. package/lib/modules/Customer/types.d.ts +2 -0
  198. package/lib/modules/Discount/index.d.ts +1 -1
  199. package/lib/modules/Discount/index.js +9 -1
  200. package/lib/modules/Discount/types.d.ts +1 -0
  201. package/lib/modules/OpenData/index.d.ts +8 -0
  202. package/lib/modules/OpenData/index.js +19 -5
  203. package/lib/modules/Order/index.d.ts +277 -18
  204. package/lib/modules/Order/index.js +2317 -337
  205. package/lib/modules/Order/types.d.ts +286 -31
  206. package/lib/modules/Order/types.js +1 -0
  207. package/lib/modules/Order/utils/manualProductDiscount.d.ts +106 -0
  208. package/lib/modules/Order/utils/manualProductDiscount.js +206 -0
  209. package/lib/modules/Order/utils.d.ts +147 -5
  210. package/lib/modules/Order/utils.js +615 -46
  211. package/lib/modules/Payment/index.d.ts +10 -13
  212. package/lib/modules/Payment/index.js +18 -150
  213. package/lib/modules/Payment/types.d.ts +2 -0
  214. package/lib/modules/Payment/utils.js +2 -1
  215. package/lib/modules/Payment/walletpass.js +16 -3
  216. package/lib/modules/ProductList/index.d.ts +16 -12
  217. package/lib/modules/ProductList/index.js +41 -4
  218. package/lib/modules/ProductList/types.d.ts +14 -0
  219. package/lib/modules/Quotation/index.d.ts +0 -1
  220. package/lib/modules/Quotation/index.js +19 -16
  221. package/lib/modules/Rules/index.d.ts +4 -0
  222. package/lib/modules/Rules/index.js +137 -120
  223. package/lib/modules/Rules/types.d.ts +1 -0
  224. package/lib/modules/SalesSummary/index.d.ts +8 -25
  225. package/lib/modules/SalesSummary/index.js +30 -4
  226. package/lib/modules/SalesSummary/types.d.ts +4 -1
  227. package/lib/modules/SalesSummary/utils.d.ts +2 -25
  228. package/lib/modules/SalesSummary/utils.js +645 -91
  229. package/lib/modules/Schedule/index.d.ts +7 -0
  230. package/lib/modules/Schedule/index.js +17 -1
  231. package/lib/modules/Summary/index.js +5 -4
  232. package/lib/modules/SurchargeList/index.d.ts +16 -0
  233. package/lib/modules/SurchargeList/index.js +89 -0
  234. package/lib/modules/SurchargeList/types.d.ts +11 -0
  235. package/lib/modules/SurchargeList/types.js +17 -0
  236. package/lib/modules/index.d.ts +2 -0
  237. package/lib/modules/index.js +5 -1
  238. package/lib/plugins/request.d.ts +1 -0
  239. package/lib/server/index.d.ts +204 -1
  240. package/lib/server/index.js +1891 -59
  241. package/lib/server/modules/index.d.ts +2 -0
  242. package/lib/server/modules/index.js +3 -0
  243. package/lib/server/modules/order/index.d.ts +120 -3
  244. package/lib/server/modules/order/index.js +887 -94
  245. package/lib/server/modules/order/types.d.ts +32 -3
  246. package/lib/server/modules/order/utils/filterBookings.js +24 -5
  247. package/lib/server/modules/order/utils/filterOrders.js +15 -6
  248. package/lib/server/modules/payment/index.d.ts +28 -0
  249. package/lib/server/modules/payment/index.js +192 -0
  250. package/lib/server/modules/payment/types.d.ts +9 -0
  251. package/lib/server/modules/payment/types.js +17 -0
  252. package/lib/server/modules/products/index.d.ts +34 -7
  253. package/lib/server/modules/products/index.js +189 -54
  254. package/lib/server/modules/resource/index.d.ts +2 -0
  255. package/lib/server/modules/resource/index.js +27 -3
  256. package/lib/server/modules/schedule/index.d.ts +4 -4
  257. package/lib/server/modules/schedule/index.js +47 -40
  258. package/lib/server/test.json +713 -0
  259. package/lib/server/utils/small-ticket.d.ts +71 -0
  260. package/lib/server/utils/small-ticket.js +800 -0
  261. package/lib/solution/BaseSales/index.d.ts +133 -10
  262. package/lib/solution/BaseSales/index.js +1111 -63
  263. package/lib/solution/BaseSales/types.d.ts +82 -6
  264. package/lib/solution/BaseSales/types.js +3 -1
  265. package/lib/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
  266. package/lib/solution/BaseSales/utils/cartPromotion.js +992 -0
  267. package/lib/solution/BaseSales/utils/quotationPrice.d.ts +7 -0
  268. package/lib/solution/BaseSales/utils/quotationPrice.js +277 -0
  269. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
  270. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +106 -18
  271. package/lib/solution/BaseSales/utils.d.ts +1 -1
  272. package/lib/solution/BaseSales/utils.js +54 -10
  273. package/lib/solution/BookingByStep/index.d.ts +1 -1
  274. package/lib/solution/BookingTicket/index.d.ts +271 -11
  275. package/lib/solution/BookingTicket/index.js +922 -29
  276. package/lib/solution/BookingTicket/types.d.ts +118 -1
  277. package/lib/solution/BookingTicket/types.js +11 -0
  278. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
  279. package/lib/solution/BookingTicket/utils/addProductDecision.js +318 -0
  280. package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
  281. package/lib/solution/BookingTicket/utils/addTimeAvailability.js +125 -0
  282. package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +40 -0
  283. package/lib/solution/BookingTicket/utils/bookingStatus.js +44 -2
  284. package/lib/solution/BookingTicket/utils/cartView.d.ts +9 -1
  285. package/lib/solution/BookingTicket/utils/cartView.js +61 -6
  286. package/lib/solution/BookingTicket/utils/exampleData.d.ts +123 -0
  287. package/lib/solution/BookingTicket/utils/exampleData.js +0 -0
  288. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
  289. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +254 -0
  290. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
  291. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +169 -0
  292. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
  293. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +51 -0
  294. package/lib/solution/BookingTicket/utils/scan/index.d.ts +5 -0
  295. package/lib/solution/BookingTicket/utils/scan/index.js +17 -3
  296. package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
  297. package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +127 -0
  298. package/lib/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
  299. package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +85 -0
  300. package/lib/solution/Checkout/index.d.ts +1 -0
  301. package/lib/solution/Checkout/index.js +1 -2
  302. package/lib/solution/RegisterAndLogin/config.js +2 -10
  303. package/lib/solution/ScanOrder/index.d.ts +9 -3
  304. package/lib/solution/ScanOrder/index.js +153 -70
  305. package/lib/solution/ScanOrder/types.d.ts +9 -5
  306. package/lib/solution/ScanOrder/utils.d.ts +1 -1
  307. package/lib/solution/ScanOrder/utils.js +83 -17
  308. package/lib/solution/VenueBooking/index.d.ts +5 -2
  309. package/lib/solution/VenueBooking/index.js +54 -17
  310. package/lib/solution/VenueBooking/sales-section-4-annotated.json +0 -2
  311. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -0
  312. package/lib/solution/VenueBooking/utils/slotMerge.js +10 -0
  313. package/lib/types/index.d.ts +10 -0
  314. package/package.json +1 -1
  315. package/dist/solution/Checkout/appointmentDemo.json +0 -1
  316. package/lib/solution/Checkout/appointmentDemo.json +0 -1
@@ -0,0 +1,150 @@
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 _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
+ 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); }
4
+ 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; }
5
+ 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; }
6
+ 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; }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
+ /**
11
+ * 扫码商品条码预选规格纯函数(对齐 ticketBooking addServiceVariant/utils)。
12
+ */
13
+
14
+ /** 套餐商品 */
15
+ export function isScanProductBundle(item) {
16
+ return ((item === null || item === void 0 ? void 0 : item.bundle_group_count) || 0) > 0;
17
+ }
18
+
19
+ /** 单规格 / 选项组商品 */
20
+ export function isScanProductOption(item) {
21
+ var _item$option_group;
22
+ return ((item === null || item === void 0 ? void 0 : item.option_group_count) || 0) > 0 || ((item === null || item === void 0 || (_item$option_group = item.option_group) === null || _item$option_group === void 0 ? void 0 : _item$option_group.length) || 0) > 0;
23
+ }
24
+ function formatVariantGroupTitle(title) {
25
+ var variantGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
26
+ try {
27
+ return variantGroup.map(function (group) {
28
+ var value = title === null || title === void 0 ? void 0 : title[group === null || group === void 0 ? void 0 : group.position_id];
29
+ return value ? "".concat((group === null || group === void 0 ? void 0 : group.name) || '-', ": ").concat(value) : '';
30
+ }).filter(Boolean).join(', ');
31
+ } catch (_unused) {
32
+ return '';
33
+ }
34
+ }
35
+ function formatDataKey(data) {
36
+ var _next$option, _next$bundle;
37
+ var next = _objectSpread({}, data);
38
+ var key = "".concat(next.product_id);
39
+ var rowKey = key;
40
+ if (next.product_variant_id) {
41
+ var str = "_".concat(next.product_variant_id);
42
+ key += str;
43
+ rowKey += str;
44
+ }
45
+ if (next !== null && next !== void 0 && (_next$option = next.option) !== null && _next$option !== void 0 && _next$option.length) {
46
+ var _iterator = _createForOfIteratorHelper(next.option),
47
+ _step;
48
+ try {
49
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
50
+ var item = _step.value;
51
+ var _str = "_".concat(item.option_group_id, "_").concat(item.product_option_item_id);
52
+ key += _str;
53
+ rowKey += "".concat(_str, "_").concat(item.quantity || item.num);
54
+ }
55
+ } catch (err) {
56
+ _iterator.e(err);
57
+ } finally {
58
+ _iterator.f();
59
+ }
60
+ }
61
+ if (next !== null && next !== void 0 && (_next$bundle = next.bundle) !== null && _next$bundle !== void 0 && _next$bundle.length) {
62
+ var _iterator2 = _createForOfIteratorHelper(next.bundle),
63
+ _step2;
64
+ try {
65
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
66
+ var _item = _step2.value;
67
+ var _str2 = "_".concat(_item.group_id, "_").concat(_item.bundle_product_id);
68
+ key += _str2;
69
+ rowKey += "".concat(_str2, "_").concat(_item.quantity || _item.num);
70
+ if (_item !== null && _item !== void 0 && _item.option) {
71
+ var _iterator3 = _createForOfIteratorHelper(_item.option),
72
+ _step3;
73
+ try {
74
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
75
+ var opt = _step3.value;
76
+ var optStr = "_".concat(opt.option_group_id, "_").concat(opt.product_option_item_id);
77
+ key += optStr;
78
+ rowKey += "".concat(optStr, "_").concat(opt.quantity || opt.num);
79
+ }
80
+ } catch (err) {
81
+ _iterator3.e(err);
82
+ } finally {
83
+ _iterator3.f();
84
+ }
85
+ }
86
+ }
87
+ } catch (err) {
88
+ _iterator2.e(err);
89
+ } finally {
90
+ _iterator2.f();
91
+ }
92
+ }
93
+ if (next !== null && next !== void 0 && next.session) {
94
+ var _next$session;
95
+ var _str3 = "_".concat((_next$session = next.session) === null || _next$session === void 0 ? void 0 : _next$session.key);
96
+ key += _str3;
97
+ rowKey += _str3;
98
+ }
99
+ if (next !== null && next !== void 0 && next.schedule) {
100
+ var _next$schedule;
101
+ var _str4 = "_".concat((_next$schedule = next.schedule) === null || _next$schedule === void 0 ? void 0 : _next$schedule.key);
102
+ key += _str4;
103
+ rowKey += _str4;
104
+ }
105
+ next.key = key;
106
+ next.rowKey = rowKey;
107
+ return next;
108
+ }
109
+
110
+ /**
111
+ * 根据条码匹配 variant,生成 cartDetailValue(对齐 ticketBooking `genValues`)。
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * const values = genScanProductValues(catalogItem, '6901234567890');
116
+ * const itemWithSelection = { ...catalogItem, cartDetailValue: values };
117
+ * ```
118
+ */
119
+ export function genScanProductValues(item, code) {
120
+ var _item$variant_group, _item$option_group2;
121
+ var params = {
122
+ bundle: [],
123
+ option: [],
124
+ product_id: item.id,
125
+ product_variant_id: 0,
126
+ quantity: 1,
127
+ rowKey: '',
128
+ session: null
129
+ };
130
+ if (item !== null && item !== void 0 && (_item$variant_group = item.variant_group) !== null && _item$variant_group !== void 0 && _item$variant_group.length || item !== null && item !== void 0 && (_item$option_group2 = item.option_group) !== null && _item$option_group2 !== void 0 && _item$option_group2.length) {
131
+ var variantItem = (item.variant || []).find(function (v) {
132
+ return (v === null || v === void 0 ? void 0 : v.code) === code || (v === null || v === void 0 ? void 0 : v.barcode) === code;
133
+ });
134
+ if (variantItem) {
135
+ params.price = Number((variantItem === null || variantItem === void 0 ? void 0 : variantItem.price) || 0);
136
+ params.product_variant_id = variantItem.id;
137
+ params.product_option_string = formatVariantGroupTitle(variantItem === null || variantItem === void 0 ? void 0 : variantItem.title, (item === null || item === void 0 ? void 0 : item.variant_group) || []);
138
+ }
139
+ }
140
+ return formatDataKey(params);
141
+ }
142
+
143
+ /**
144
+ * 统计条码命中的 variant 数量(多命中时需弹窗选择)。
145
+ */
146
+ export function countScanVariantMatches(item, code) {
147
+ return ((item === null || item === void 0 ? void 0 : item.variant) || []).filter(function (v) {
148
+ return (v === null || v === void 0 ? void 0 : v.code) === code || (v === null || v === void 0 ? void 0 : v.barcode) === code;
149
+ }).length;
150
+ }
@@ -0,0 +1,23 @@
1
+ import type { ProductData } from '../../../modules/Product/types';
2
+ export interface SessionCatalogStaleInfo {
3
+ productId: number | string | null;
4
+ productTitle: string | null;
5
+ sessionDay: string | null;
6
+ timeBarDay: string | null;
7
+ bookingDate: unknown;
8
+ }
9
+ /**
10
+ * 判断 session 商品 catalog 中的 session 日历日是否与当前 TimeBar / bookingDate 不一致。
11
+ *
12
+ * @example
13
+ * isSessionCatalogDateStale(product, '2026-06-05 19:01:18');
14
+ * // session 为 2026-06-04 → true;一致或无 session 快照 → false
15
+ */
16
+ export declare function isSessionCatalogDateStale(product: ProductData & Record<string, any>, bookingDate: unknown): boolean;
17
+ /**
18
+ * 组装 session catalog 日期不一致时的日志 metadata。
19
+ *
20
+ * @example
21
+ * buildSessionCatalogStaleInfo(product, '2026-06-05 19:01:18');
22
+ */
23
+ export declare function buildSessionCatalogStaleInfo(product: ProductData & Record<string, any>, bookingDate: unknown): SessionCatalogStaleInfo;
@@ -0,0 +1,78 @@
1
+ import dayjs from 'dayjs';
2
+ var SESSION_EXTENSION_TYPES = ['session_product', 'session_ticket'];
3
+
4
+ /**
5
+ * 是否为 session 商品。
6
+ *
7
+ * @example
8
+ * getIsSessionProduct({ extension_type: 'session_ticket' }); // true
9
+ */
10
+ function getIsSessionProduct(product) {
11
+ return SESSION_EXTENSION_TYPES.includes(product === null || product === void 0 ? void 0 : product.extension_type);
12
+ }
13
+
14
+ /**
15
+ * 从 session 快照解析日历日 YYYY-MM-DD。
16
+ *
17
+ * @example
18
+ * resolveSessionCalendarDay({ start_at: '2026-06-05 10:00:00' }); // '2026-06-05'
19
+ */
20
+ function resolveSessionCalendarDay(session) {
21
+ var _session$start_at;
22
+ if (!session) return null;
23
+ var raw = (_session$start_at = session.start_at) !== null && _session$start_at !== void 0 ? _session$start_at : session.end_at;
24
+ if (!raw) return null;
25
+ var parsed = dayjs(raw);
26
+ return parsed.isValid() ? parsed.format('YYYY-MM-DD') : null;
27
+ }
28
+
29
+ /**
30
+ * 将 booking / TimeBar 日期规范为 YYYY-MM-DD。
31
+ *
32
+ * @example
33
+ * formatScheduleCalendarDay('2026-06-05 19:01:18'); // '2026-06-05'
34
+ */
35
+ function formatScheduleCalendarDay(date) {
36
+ if (date == null || date === '') return null;
37
+ var parsed = dayjs(date);
38
+ return parsed.isValid() ? parsed.format('YYYY-MM-DD') : null;
39
+ }
40
+ /**
41
+ * 判断 session 商品 catalog 中的 session 日历日是否与当前 TimeBar / bookingDate 不一致。
42
+ *
43
+ * @example
44
+ * isSessionCatalogDateStale(product, '2026-06-05 19:01:18');
45
+ * // session 为 2026-06-04 → true;一致或无 session 快照 → false
46
+ */
47
+ export function isSessionCatalogDateStale(product, bookingDate) {
48
+ var _product$cartDetailVa;
49
+ if (!getIsSessionProduct(product)) {
50
+ return false;
51
+ }
52
+ var timeBarDay = formatScheduleCalendarDay(bookingDate);
53
+ if (!timeBarDay) {
54
+ return false;
55
+ }
56
+ var sessionDay = resolveSessionCalendarDay((_product$cartDetailVa = product.cartDetailValue) === null || _product$cartDetailVa === void 0 ? void 0 : _product$cartDetailVa.session);
57
+ if (!sessionDay) {
58
+ return false;
59
+ }
60
+ return sessionDay !== timeBarDay;
61
+ }
62
+
63
+ /**
64
+ * 组装 session catalog 日期不一致时的日志 metadata。
65
+ *
66
+ * @example
67
+ * buildSessionCatalogStaleInfo(product, '2026-06-05 19:01:18');
68
+ */
69
+ export function buildSessionCatalogStaleInfo(product, bookingDate) {
70
+ var _product$id, _ref, _product$title, _product$cartDetailVa2;
71
+ return {
72
+ productId: (_product$id = product === null || product === void 0 ? void 0 : product.id) !== null && _product$id !== void 0 ? _product$id : null,
73
+ productTitle: (_ref = (_product$title = product === null || product === void 0 ? void 0 : product.title) !== null && _product$title !== void 0 ? _product$title : product === null || product === void 0 ? void 0 : product.name) !== null && _ref !== void 0 ? _ref : null,
74
+ sessionDay: resolveSessionCalendarDay((_product$cartDetailVa2 = product.cartDetailValue) === null || _product$cartDetailVa2 === void 0 ? void 0 : _product$cartDetailVa2.session),
75
+ timeBarDay: formatScheduleCalendarDay(bookingDate),
76
+ bookingDate: bookingDate
77
+ };
78
+ }
@@ -305,6 +305,7 @@ export declare class CheckoutImpl extends BaseModule implements Module, Checkout
305
305
  *
306
306
  * 删除本地 IndexDB 中超过指定天数且已同步到后端的订单数据
307
307
  */
308
+ /** @deprecated */
308
309
  private cleanupExpiredOrdersAsync;
309
310
  /**
310
311
  * 清除计算缓存
@@ -117,20 +117,20 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
117
117
  _context.next = 15;
118
118
  return this.initializeSubModules(core, options);
119
119
  case 15:
120
- _context.next = 17;
121
- return this.preloadPaymentMethods();
122
- case 17:
123
- _context.next = 19;
124
- return this.cleanupExpiredOrdersAsync();
125
- case 19:
120
+ // 预加载支付方式(利用缓存机制)
121
+ // await this.preloadPaymentMethods();
122
+
123
+ // 清理过期的已同步订单数据
124
+ // await this.cleanupExpiredOrdersAsync();
125
+
126
126
  console.log('[Checkout] 初始化完成');
127
- _context.next = 22;
127
+ _context.next = 18;
128
128
  return this.core.effects.emit("".concat(this.name, ":onCheckoutInitialized"), {
129
129
  timestamp: Date.now()
130
130
  });
131
- case 22:
131
+ case 18:
132
132
  this.logInfo('CheckoutModule initialized successfully');
133
- case 23:
133
+ case 19:
134
134
  case "end":
135
135
  return _context.stop();
136
136
  }
@@ -2868,6 +2868,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
2868
2868
  *
2869
2869
  * 删除本地 IndexDB 中超过指定天数且已同步到后端的订单数据
2870
2870
  */
2871
+ /** @deprecated */
2871
2872
  )
2872
2873
  }, {
2873
2874
  key: "cleanupExpiredOrdersAsync",
@@ -742,11 +742,7 @@ var webposConfig = {
742
742
  // withCredentials: true,
743
743
  prefix: false,
744
744
  isDefaultSaasDomain: true,
745
- cache: {
746
- mode: "remote_local",
747
- type: "indexDB",
748
- cacheKeyData: values
749
- }
745
+ cache: false
750
746
  };
751
747
  }
752
748
  },
@@ -1079,11 +1075,7 @@ var shopWebposConfig = {
1079
1075
  return {
1080
1076
  // withCredentials: true,
1081
1077
  prefix: false,
1082
- cache: {
1083
- mode: "remote_local",
1084
- type: "indexDB",
1085
- cacheKeyData: values
1086
- }
1078
+ cache: false
1087
1079
  };
1088
1080
  }
1089
1081
  },
@@ -1,10 +1,11 @@
1
1
  import { Module, ModuleOptions, PisellCore } from '../../types';
2
2
  import { BaseModule } from '../../modules/BaseModule';
3
3
  import { ScanOrderAddLogParams, ScanOrderAvailabilityInfo, ScanOrderOrderProduct, ScanOrderOrderProductIdentity, ScanOrderScanCodeResult } from './types';
4
- import type { UpdateProductInOrderParams } from '../../modules/Order/types';
4
+ import type { UpdateOrderProductParams } from '../../modules/Order/types';
5
5
  import type { Discount } from '../../modules/Discount/types';
6
6
  import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
7
7
  import type { StrategyConfig } from '../../model/strategy/type';
8
+ import type { ProductData } from '../../modules/Product/types';
8
9
  export * from './types';
9
10
  interface ScanOrderItemRuleRuntimeConfig {
10
11
  strategyConfigs?: StrategyConfig[];
@@ -36,11 +37,14 @@ export declare class ScanOrderImpl extends BaseModule implements Module {
36
37
  private customerLoginRefreshIdInFlight;
37
38
  private static readonly PISELL1_LOGIN_SUCCESS;
38
39
  private getScanOrderLoggerContext;
40
+ private safeStringify;
41
+ private pickErrorMessage;
39
42
  private serializeError;
40
43
  private addScanOrderLog;
41
44
  private logMethodStart;
42
45
  private logMethodSuccess;
43
46
  private logMethodError;
47
+ private assertProductListLoaded;
44
48
  addLog(params: ScanOrderAddLogParams): Promise<void>;
45
49
  private normalizeCustomerId;
46
50
  private resolveCustomerIdFromLoginPayload;
@@ -86,10 +90,12 @@ export declare class ScanOrderImpl extends BaseModule implements Module {
86
90
  onCustomerLogin(params: {
87
91
  customerId: number;
88
92
  }): Promise<void>;
93
+ private findReservationRuleResource;
94
+ private buildScanOrderResourceMetadata;
89
95
  private buildSubmitPayloadEnhancer;
90
96
  submitScanOrder<T = any>(): Promise<T>;
91
97
  addProductToOrder(product: Partial<ScanOrderOrderProduct> & ScanOrderOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
92
- updateProductInOrder(params: UpdateProductInOrderParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
98
+ updateOrderProduct(params: UpdateOrderProductParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
93
99
  /**
94
100
  * 设置单行商品备注(与整单 `updateTempOrderNote` 区分)。
95
101
  * 多行同 SKU 时必须传入与删除/更新一致的 identity(如 `identity_key`)。
@@ -120,7 +126,7 @@ export declare class ScanOrderImpl extends BaseModule implements Module {
120
126
  orderAmount: number;
121
127
  orderItems: any[];
122
128
  }>;
123
- getProductList(): Promise<any>;
129
+ getProductList(): Promise<ProductData[]>;
124
130
  getOtherParams(): Record<string, any>;
125
131
  setOtherParams(params: Record<string, any>, { cover }?: {
126
132
  cover?: boolean;