@pisell/pisellos 2.2.310 → 2.2.312-vm.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/dist/apis/picoding.d.ts.map +1 -0
  2. package/dist/core/index.d.ts.map +1 -0
  3. package/dist/effects/index.d.ts.map +1 -0
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +1 -0
  7. package/dist/inventory/index.d.ts +92 -0
  8. package/dist/inventory/index.d.ts.map +1 -0
  9. package/dist/inventory/index.js +509 -0
  10. package/dist/model/index.d.ts.map +1 -0
  11. package/dist/model/strategy/adapter/dataVariant/adapter.d.ts.map +1 -0
  12. package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts.map +1 -0
  13. package/dist/model/strategy/adapter/dataVariant/examples.d.ts.map +1 -0
  14. package/dist/model/strategy/adapter/dataVariant/index.d.ts.map +1 -0
  15. package/dist/model/strategy/adapter/dataVariant/type.d.ts.map +1 -0
  16. package/dist/model/strategy/adapter/index.d.ts.map +1 -0
  17. package/dist/model/strategy/adapter/itemRule/adapter.d.ts.map +1 -0
  18. package/dist/model/strategy/adapter/itemRule/evaluator.d.ts.map +1 -0
  19. package/dist/model/strategy/adapter/itemRule/examples.d.ts.map +1 -0
  20. package/dist/model/strategy/adapter/itemRule/index.d.ts.map +1 -0
  21. package/dist/model/strategy/adapter/itemRule/type.d.ts.map +1 -0
  22. package/dist/model/strategy/adapter/promotion/adapter.d.ts.map +1 -0
  23. package/dist/model/strategy/adapter/promotion/evaluator.d.ts.map +1 -0
  24. package/dist/model/strategy/adapter/promotion/examples.d.ts.map +1 -0
  25. package/dist/model/strategy/adapter/promotion/index.d.ts.map +1 -0
  26. package/dist/model/strategy/adapter/promotion/index.js +0 -9
  27. package/dist/model/strategy/adapter/promotion/type.d.ts.map +1 -0
  28. package/dist/model/strategy/adapter/type.d.ts.map +1 -0
  29. package/dist/model/strategy/adapter/walletPass/evaluator.d.ts.map +1 -0
  30. package/dist/model/strategy/adapter/walletPass/example.d.ts.map +1 -0
  31. package/dist/model/strategy/adapter/walletPass/index.d.ts.map +1 -0
  32. package/dist/model/strategy/adapter/walletPass/locales.d.ts.map +1 -0
  33. package/dist/model/strategy/adapter/walletPass/type.d.ts.map +1 -0
  34. package/dist/model/strategy/adapter/walletPass/utils.d.ts.map +1 -0
  35. package/dist/model/strategy/engine.d.ts.map +1 -0
  36. package/dist/model/strategy/index.d.ts.map +1 -0
  37. package/dist/model/strategy/strategy-example.d.ts.map +1 -0
  38. package/dist/model/strategy/type.d.ts.map +1 -0
  39. package/dist/modules/Account/index.d.ts.map +1 -0
  40. package/dist/modules/Account/types.d.ts.map +1 -0
  41. package/dist/modules/AccountList/index.d.ts.map +1 -0
  42. package/dist/modules/AccountList/types.d.ts.map +1 -0
  43. package/dist/modules/AccountList/utils.d.ts.map +1 -0
  44. package/dist/modules/BaseModule.d.ts.map +1 -0
  45. package/dist/modules/BookingContext/index.d.ts.map +1 -0
  46. package/dist/modules/BookingContext/types.d.ts.map +1 -0
  47. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts.map +1 -0
  48. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts.map +1 -0
  49. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts.map +1 -0
  50. package/dist/modules/BookingContext/utils/flexible.d.ts.map +1 -0
  51. package/dist/modules/BookingContext/utils/formatResourceList.d.ts.map +1 -0
  52. package/dist/modules/BookingContext/utils/index.d.ts.map +1 -0
  53. package/dist/modules/BookingContext/utils/noResource.d.ts.map +1 -0
  54. package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts.map +1 -0
  55. package/dist/modules/BookingContext/utils/productExtend.d.ts.map +1 -0
  56. package/dist/modules/BookingContext/utils/resourceErrors.d.ts.map +1 -0
  57. package/dist/modules/BookingContext/utils/resourceSelection.d.ts.map +1 -0
  58. package/dist/modules/BookingContext/utils/resources.d.ts.map +1 -0
  59. package/dist/modules/BookingContext/utils/serviceTimes.d.ts.map +1 -0
  60. package/dist/modules/BookingContext/utils/timeSlices.d.ts.map +1 -0
  61. package/dist/modules/Cart/index.d.ts.map +1 -0
  62. package/dist/modules/Cart/types.d.ts.map +1 -0
  63. package/dist/modules/Cart/utils/cartAccount.d.ts.map +1 -0
  64. package/dist/modules/Cart/utils/cartDate.d.ts.map +1 -0
  65. package/dist/modules/Cart/utils/cartDiscount.d.ts.map +1 -0
  66. package/dist/modules/Cart/utils/cartNote.d.ts.map +1 -0
  67. package/dist/modules/Cart/utils/cartProduct.d.ts.map +1 -0
  68. package/dist/modules/Cart/utils/cartRelationForms.d.ts.map +1 -0
  69. package/dist/modules/Cart/utils/cartResource.d.ts.map +1 -0
  70. package/dist/modules/Cart/utils/changePrice.d.ts.map +1 -0
  71. package/dist/modules/Cart/utils/index.d.ts.map +1 -0
  72. package/dist/modules/Customer/constants.d.ts.map +1 -0
  73. package/dist/modules/Customer/index.d.ts.map +1 -0
  74. package/dist/modules/Customer/types.d.ts.map +1 -0
  75. package/dist/modules/Date/index.d.ts.map +1 -0
  76. package/dist/modules/Date/types.d.ts.map +1 -0
  77. package/dist/modules/Date/utils.d.ts.map +1 -0
  78. package/dist/modules/Discount/availability.d.ts.map +1 -0
  79. package/dist/modules/Discount/entitlementPass.d.ts.map +1 -0
  80. package/dist/modules/Discount/index.d.ts.map +1 -0
  81. package/dist/modules/Discount/index.js +1 -0
  82. package/dist/modules/Discount/types.d.ts.map +1 -0
  83. package/dist/modules/Guests/index.d.ts.map +1 -0
  84. package/dist/modules/Guests/types.d.ts.map +1 -0
  85. package/dist/modules/Holder/index.d.ts.map +1 -0
  86. package/dist/modules/Holder/types.d.ts.map +1 -0
  87. package/dist/modules/Holder/utils.d.ts.map +1 -0
  88. package/dist/modules/OpenData/index.d.ts.map +1 -0
  89. package/dist/modules/OpenData/types.d.ts.map +1 -0
  90. package/dist/modules/OpenData/utils.d.ts.map +1 -0
  91. package/dist/modules/Order/index.d.ts +25 -3
  92. package/dist/modules/Order/index.d.ts.map +1 -0
  93. package/dist/modules/Order/index.js +1647 -1211
  94. package/dist/modules/Order/payment-utils.d.ts.map +1 -0
  95. package/dist/modules/Order/salesNotes.d.ts.map +1 -0
  96. package/dist/modules/Order/types.d.ts +7 -0
  97. package/dist/modules/Order/types.d.ts.map +1 -0
  98. package/dist/modules/Order/utils/bundleDiscountHydration.d.ts.map +1 -0
  99. package/dist/modules/Order/utils/discountProductLineIdentity.d.ts.map +1 -0
  100. package/dist/modules/Order/utils/discountProductLineIdentity.js +2 -2
  101. package/dist/modules/Order/utils/manualProductDiscount.d.ts.map +1 -0
  102. package/dist/modules/Order/utils/orderCollectionIdentity.d.ts.map +1 -0
  103. package/dist/modules/Order/utils/productVoucherGroups.d.ts +15 -0
  104. package/dist/modules/Order/utils/productVoucherGroups.d.ts.map +1 -0
  105. package/dist/modules/Order/utils/productVoucherGroups.js +115 -0
  106. package/dist/modules/Order/utils/virtualSettlement.d.ts.map +1 -0
  107. package/dist/modules/Order/utils/weighedProduct.d.ts.map +1 -0
  108. package/dist/modules/Order/utils.d.ts +5 -3
  109. package/dist/modules/Order/utils.d.ts.map +1 -0
  110. package/dist/modules/Order/utils.js +32 -11
  111. package/dist/modules/Payment/cash.d.ts.map +1 -0
  112. package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts.map +1 -0
  113. package/dist/modules/Payment/eftpos.d.ts.map +1 -0
  114. package/dist/modules/Payment/index.d.ts.map +1 -0
  115. package/dist/modules/Payment/mx51.d.ts.map +1 -0
  116. package/dist/modules/Payment/types.d.ts.map +1 -0
  117. package/dist/modules/Payment/utils.d.ts.map +1 -0
  118. package/dist/modules/Payment/walletpass.d.ts.map +1 -0
  119. package/dist/modules/Product/index.d.ts.map +1 -0
  120. package/dist/modules/Product/types.d.ts.map +1 -0
  121. package/dist/modules/Product/utils.d.ts.map +1 -0
  122. package/dist/modules/ProductList/clientDataVariants.d.ts.map +1 -0
  123. package/dist/modules/ProductList/index.d.ts.map +1 -0
  124. package/dist/modules/ProductList/index.js +33 -12
  125. package/dist/modules/ProductList/types.d.ts.map +1 -0
  126. package/dist/modules/Quotation/index.d.ts.map +1 -0
  127. package/dist/modules/Quotation/types.d.ts.map +1 -0
  128. package/dist/modules/Resource/index.d.ts.map +1 -0
  129. package/dist/modules/Resource/types.d.ts.map +1 -0
  130. package/dist/modules/Resource/utils.d.ts.map +1 -0
  131. package/dist/modules/ResourcePlanner/index.d.ts.map +1 -0
  132. package/dist/modules/ResourcePlanner/localClock.d.ts.map +1 -0
  133. package/dist/modules/ResourcePlanner/planner.d.ts.map +1 -0
  134. package/dist/modules/ResourcePlanner/types.d.ts.map +1 -0
  135. package/dist/modules/Rules/index.d.ts +2 -0
  136. package/dist/modules/Rules/index.d.ts.map +1 -0
  137. package/dist/modules/Rules/index.js +29 -21
  138. package/dist/modules/Rules/types.d.ts.map +1 -0
  139. package/dist/modules/SalesSummary/index.d.ts.map +1 -0
  140. package/dist/modules/SalesSummary/types.d.ts.map +1 -0
  141. package/dist/modules/SalesSummary/utils.d.ts.map +1 -0
  142. package/dist/modules/ScanOrderLogger/index.d.ts.map +1 -0
  143. package/dist/modules/ScanOrderLogger/providers/feishu.d.ts.map +1 -0
  144. package/dist/modules/ScanOrderLogger/providers/grafana.d.ts.map +1 -0
  145. package/dist/modules/ScanOrderLogger/types.d.ts.map +1 -0
  146. package/dist/modules/Schedule/getDateIsInSchedule.d.ts.map +1 -0
  147. package/dist/modules/Schedule/index.d.ts.map +1 -0
  148. package/dist/modules/Schedule/type.d.ts.map +1 -0
  149. package/dist/modules/Schedule/types.d.ts.map +1 -0
  150. package/dist/modules/Schedule/utils.d.ts.map +1 -0
  151. package/dist/modules/Step/index.d.ts.map +1 -0
  152. package/dist/modules/Step/tyeps.d.ts.map +1 -0
  153. package/dist/modules/Summary/index.d.ts.map +1 -0
  154. package/dist/modules/Summary/types.d.ts.map +1 -0
  155. package/dist/modules/Summary/utils.d.ts.map +1 -0
  156. package/dist/modules/SurchargeList/index.d.ts.map +1 -0
  157. package/dist/modules/SurchargeList/types.d.ts.map +1 -0
  158. package/dist/modules/index.d.ts.map +1 -0
  159. package/dist/plugins/app.d.ts.map +1 -0
  160. package/dist/plugins/index.d.ts.map +1 -0
  161. package/dist/plugins/request.d.ts.map +1 -0
  162. package/dist/plugins/shopStore.d.ts.map +1 -0
  163. package/dist/plugins/user.d.ts.map +1 -0
  164. package/dist/plugins/window.d.ts.map +1 -0
  165. package/dist/server/index.d.ts.map +1 -0
  166. package/dist/server/modules/floor-plan/index.d.ts.map +1 -0
  167. package/dist/server/modules/floor-plan/index.js +34 -3
  168. package/dist/server/modules/floor-plan/types.d.ts.map +1 -0
  169. package/dist/server/modules/index.d.ts.map +1 -0
  170. package/dist/server/modules/menu/index.d.ts.map +1 -0
  171. package/dist/server/modules/menu/types.d.ts.map +1 -0
  172. package/dist/server/modules/order/index.d.ts.map +1 -0
  173. package/dist/server/modules/order/types.d.ts.map +1 -0
  174. package/dist/server/modules/order/utils/filterBookings.d.ts.map +1 -0
  175. package/dist/server/modules/order/utils/filterOrders.d.ts.map +1 -0
  176. package/dist/server/modules/payment/index.d.ts.map +1 -0
  177. package/dist/server/modules/payment/types.d.ts.map +1 -0
  178. package/dist/server/modules/products/index.d.ts.map +1 -0
  179. package/dist/server/modules/products/types.d.ts.map +1 -0
  180. package/dist/server/modules/quotation/index.d.ts.map +1 -0
  181. package/dist/server/modules/quotation/types.d.ts.map +1 -0
  182. package/dist/server/modules/resource/index.d.ts.map +1 -0
  183. package/dist/server/modules/resource/types.d.ts.map +1 -0
  184. package/dist/server/modules/schedule/index.d.ts.map +1 -0
  185. package/dist/server/modules/schedule/types.d.ts.map +1 -0
  186. package/dist/server/modules/schedule/utils.d.ts.map +1 -0
  187. package/dist/server/types.d.ts.map +1 -0
  188. package/dist/server/utils/index.d.ts.map +1 -0
  189. package/dist/server/utils/product.d.ts.map +1 -0
  190. package/dist/server/utils/schedule.d.ts.map +1 -0
  191. package/dist/server/utils/small-ticket.d.ts.map +1 -0
  192. package/dist/server/utils/time.d.ts.map +1 -0
  193. package/dist/solution/BaseSales/index.d.ts +16 -1
  194. package/dist/solution/BaseSales/index.d.ts.map +1 -0
  195. package/dist/solution/BaseSales/index.js +1363 -1176
  196. package/dist/solution/BaseSales/types.d.ts.map +1 -0
  197. package/dist/solution/BaseSales/utils/cartPromotion.d.ts.map +1 -0
  198. package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts.map +1 -0
  199. package/dist/solution/BaseSales/utils/quotationPrice.d.ts.map +1 -0
  200. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts.map +1 -0
  201. package/dist/solution/BaseSales/utils.d.ts.map +1 -0
  202. package/dist/solution/BookingByStep/index.d.ts +1 -1
  203. package/dist/solution/BookingByStep/index.d.ts.map +1 -0
  204. package/dist/solution/BookingByStep/types.d.ts.map +1 -0
  205. package/dist/solution/BookingByStep/utils/capacity.d.ts.map +1 -0
  206. package/dist/solution/BookingByStep/utils/products.d.ts.map +1 -0
  207. package/dist/solution/BookingByStep/utils/resources.d.ts.map +1 -0
  208. package/dist/solution/BookingByStep/utils/stock.d.ts.map +1 -0
  209. package/dist/solution/BookingByStep/utils/timeslots.d.ts.map +1 -0
  210. package/dist/solution/BookingTicket/index.d.ts +1 -1
  211. package/dist/solution/BookingTicket/index.d.ts.map +1 -0
  212. package/dist/solution/BookingTicket/index.js +198 -108
  213. package/dist/solution/BookingTicket/types.d.ts +14 -2
  214. package/dist/solution/BookingTicket/types.d.ts.map +1 -0
  215. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
  216. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts.map +1 -0
  217. package/dist/solution/BookingTicket/utils/addProductDecision.js +4 -3
  218. package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts.map +1 -0
  219. package/dist/solution/BookingTicket/utils/bookingStatus.d.ts.map +1 -0
  220. package/dist/solution/BookingTicket/utils/cartView.d.ts.map +1 -0
  221. package/dist/solution/BookingTicket/utils/exampleData.d.ts.map +1 -0
  222. package/dist/solution/BookingTicket/utils/orderCustomer.d.ts.map +1 -0
  223. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts.map +1 -0
  224. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts.map +1 -0
  225. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +94 -58
  226. package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +10 -0
  227. package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts.map +1 -0
  228. package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +117 -0
  229. package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts.map +1 -0
  230. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
  231. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts.map +1 -0
  232. package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts.map +1 -0
  233. package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -1
  234. package/dist/solution/BookingTicket/utils/scan/index.d.ts.map +1 -0
  235. package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts.map +1 -0
  236. package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts.map +1 -0
  237. package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts.map +1 -0
  238. package/dist/solution/BookingTicket/utils/weighingProductSku.d.ts.map +1 -0
  239. package/dist/solution/BuyTickets/index.d.ts.map +1 -0
  240. package/dist/solution/BuyTickets/types.d.ts.map +1 -0
  241. package/dist/solution/Checkout/index.d.ts.map +1 -0
  242. package/dist/solution/Checkout/types.d.ts.map +1 -0
  243. package/dist/solution/Checkout/utils/index.d.ts.map +1 -0
  244. package/dist/solution/PlaceOrder/index.d.ts.map +1 -0
  245. package/dist/solution/RegisterAndLogin/config.d.ts.map +1 -0
  246. package/dist/solution/RegisterAndLogin/index.d.ts.map +1 -0
  247. package/dist/solution/RegisterAndLogin/types.d.ts.map +1 -0
  248. package/dist/solution/RegisterAndLogin/utils.d.ts.map +1 -0
  249. package/dist/solution/Sales/index.d.ts.map +1 -0
  250. package/dist/solution/Sales/types.d.ts.map +1 -0
  251. package/dist/solution/ScanOrder/index.d.ts.map +1 -0
  252. package/dist/solution/ScanOrder/types.d.ts.map +1 -0
  253. package/dist/solution/ScanOrder/utils.d.ts.map +1 -0
  254. package/dist/solution/ShopDiscount/index.d.ts.map +1 -0
  255. package/dist/solution/ShopDiscount/types.d.ts.map +1 -0
  256. package/dist/solution/ShopDiscount/utils.d.ts.map +1 -0
  257. package/dist/solution/UnifiedBookingSales/index.d.ts +1 -1
  258. package/dist/solution/UnifiedBookingSales/index.d.ts.map +1 -0
  259. package/dist/solution/UnifiedBookingSales/index.js +63 -43
  260. package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts.map +1 -0
  261. package/dist/solution/UnifiedBookingSales/types.d.ts.map +1 -0
  262. package/dist/solution/VenueBooking/index.d.ts.map +1 -0
  263. package/dist/solution/VenueBooking/types.d.ts.map +1 -0
  264. package/dist/solution/VenueBooking/utils/dateSummary.d.ts.map +1 -0
  265. package/dist/solution/VenueBooking/utils/resource.d.ts.map +1 -0
  266. package/dist/solution/VenueBooking/utils/slotMerge.d.ts.map +1 -0
  267. package/dist/solution/VenueBooking/utils/timeSlot.d.ts.map +1 -0
  268. package/dist/solution/VenueBooking/utils.d.ts.map +1 -0
  269. package/dist/solution/index.d.ts.map +1 -0
  270. package/dist/store/createStore.d.ts.map +1 -0
  271. package/dist/types/index.d.ts.map +1 -0
  272. package/dist/utils/os-private-payload.d.ts.map +1 -0
  273. package/dist/utils/payment-number.d.ts.map +1 -0
  274. package/dist/utils/platform.d.ts +2 -0
  275. package/dist/utils/platform.d.ts.map +1 -0
  276. package/dist/utils/platform.js +6 -0
  277. package/dist/utils/task.d.ts.map +1 -0
  278. package/dist/utils/watch.d.ts.map +1 -0
  279. package/lib/index.d.ts +1 -0
  280. package/lib/index.js +12 -0
  281. package/lib/inventory/index.d.ts +92 -0
  282. package/lib/inventory/index.js +287 -0
  283. package/lib/model/strategy/adapter/promotion/index.js +46 -1
  284. package/lib/modules/Discount/index.js +1 -0
  285. package/lib/modules/Order/index.d.ts +25 -3
  286. package/lib/modules/Order/index.js +145 -11
  287. package/lib/modules/Order/types.d.ts +7 -0
  288. package/lib/modules/Order/utils/discountProductLineIdentity.js +1 -1
  289. package/lib/modules/Order/utils/productVoucherGroups.d.ts +15 -0
  290. package/lib/modules/Order/utils/productVoucherGroups.js +64 -0
  291. package/lib/modules/Order/utils.d.ts +5 -3
  292. package/lib/modules/Order/utils.js +29 -10
  293. package/lib/modules/ProductList/index.js +15 -0
  294. package/lib/modules/Rules/index.d.ts +2 -0
  295. package/lib/modules/Rules/index.js +6 -0
  296. package/lib/server/modules/floor-plan/index.js +29 -1
  297. package/lib/solution/BaseSales/index.d.ts +16 -1
  298. package/lib/solution/BaseSales/index.js +89 -9
  299. package/lib/solution/BookingByStep/index.d.ts +1 -1
  300. package/lib/solution/BookingTicket/index.d.ts +1 -1
  301. package/lib/solution/BookingTicket/index.js +36 -2
  302. package/lib/solution/BookingTicket/types.d.ts +14 -2
  303. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
  304. package/lib/solution/BookingTicket/utils/addProductDecision.js +4 -3
  305. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +14 -2
  306. package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +10 -0
  307. package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +71 -0
  308. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
  309. package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -1
  310. package/lib/solution/UnifiedBookingSales/index.d.ts +1 -1
  311. package/lib/solution/UnifiedBookingSales/index.js +14 -3
  312. package/lib/utils/platform.d.ts +2 -0
  313. package/lib/utils/platform.js +7 -0
  314. package/package.json +4 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picoding.d.ts","sourceRoot":"","sources":["../../src/apis/picoding.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,aAAa,EACb,MAAM,EACN,aAAa,EACb,UAAU,EACV,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;GAEG;AACH,cAAM,YAAa,YAAW,UAAU;IACtC,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,MAAM,CAA+C;IACtD,OAAO,EAAE,cAAc,CAAwB;IACtD,OAAO,CAAC,KAAK,CAAkB;IACxB,OAAO,EAAE,eAAe,CAAM;IAC9B,MAAM,EAAE,GAAG,CAAC;IACZ,aAAa,CAAC,EAAE,aAAa,CAAC;IACrC,OAAO,CAAC,mBAAmB,CAAC,CAAsC;gBAEtD,OAAO,CAAC,EAAE,eAAe;IAarC,OAAO,CAAC,UAAU;IAgBlB;;;OAGG;IACU,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAKjD,OAAO,CAAC,gBAAgB;IAUxB;;;OAGG;IACU,gBAAgB,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyC/E,OAAO,CAAC,GAAG;IAuBJ,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;IA+B7D,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAInD,SAAS,CAAC,IAAI,EAAE,MAAM,G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,CAAC,MAAM,EAAE,MAAM;IAQjC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,mBAAmB;IAU5D,IAAI,CACR,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,GAAG,GACX,OAAO,CAAC;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAE,CAAC;IAsB1C,KAAK;CAGN;AAED,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './modules';
7
7
  export * from './plugins';
8
8
  export * from './solution';
9
9
  export * from './model';
10
+ export * from './inventory';
10
11
  export { PisellOSCore } from './core';
11
12
  import PisellOSCore from './core';
12
13
  export default PisellOSCore;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,eAAe,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ export * from "./modules";
9
9
  export * from "./plugins";
10
10
  export * from "./solution";
11
11
  export * from "./model";
12
+ export * from "./inventory";
12
13
 
13
14
  // 导出核心实现
14
15
  export { PisellOSCore } from "./core";
@@ -0,0 +1,92 @@
1
+ /** Optional, instance-scoped sales inventory. Never stored in ProductData or order payloads. */
2
+ export type InventoryRecord = Record<string, any>;
3
+ export type InventoryRefreshReason = 'catalog-entry' | 'detail-open' | 'checkout' | 'manual';
4
+ export interface InventoryAvailability {
5
+ status: 'ready' | 'loading' | 'stale' | 'error' | 'unmapped';
6
+ quantity?: number;
7
+ message?: string;
8
+ }
9
+ export interface InventorySelectionAvailability {
10
+ availability: InventoryAvailability;
11
+ /** Stock remaining after other cart lines using the same inventory key. */
12
+ availableQuantity: number;
13
+ /** The existing line can still be reduced when stock is unavailable. */
14
+ retainedQuantity: number;
15
+ maxQuantity: number;
16
+ }
17
+ export interface InventorySource {
18
+ readonly scopeKey: string;
19
+ assertCurrent(): void;
20
+ keyOf(product: InventoryRecord, variant?: InventoryRecord): string | undefined;
21
+ read(context: {
22
+ reason: InventoryRefreshReason;
23
+ signal: AbortSignal;
24
+ }): Promise<ReadonlyMap<string, {
25
+ quantity: number | null;
26
+ message?: string;
27
+ }>>;
28
+ message(reason: 'unavailable' | 'unmapped' | 'insufficient', values?: {
29
+ key: string;
30
+ quantity: number;
31
+ }): string;
32
+ }
33
+ export interface CheckoutInventoryLine {
34
+ readonly lineId: string;
35
+ readonly productId: string | number;
36
+ readonly variantId: string | number;
37
+ readonly quantity: number;
38
+ readonly inventoryKey: string;
39
+ }
40
+ export interface CheckoutRuntimeSnapshot {
41
+ readonly scopeKey: string;
42
+ readonly revision: number;
43
+ readonly lines: readonly CheckoutInventoryLine[];
44
+ }
45
+ export interface SalesCheckoutHooks {
46
+ beforeCheckout?(context: {
47
+ items: readonly InventoryRecord[];
48
+ signal?: AbortSignal;
49
+ }): Promise<void>;
50
+ }
51
+ export declare const salesGuardError: (message: string) => Error & {
52
+ code: string;
53
+ };
54
+ export declare class InventoryController {
55
+ private readonly source;
56
+ readonly identity: symbol;
57
+ readonly scopeKey: string;
58
+ private entries;
59
+ private lastQuantities;
60
+ private products;
61
+ private keys;
62
+ private catalogProducts;
63
+ private listeners;
64
+ private revision;
65
+ private state;
66
+ private pending?;
67
+ private disposed;
68
+ constructor(source: InventorySource);
69
+ getRevision: () => number;
70
+ subscribe: (listener: () => void) => () => void;
71
+ private publish;
72
+ private assertCurrent;
73
+ activate(): void;
74
+ dispose(): void;
75
+ invalidate(): void;
76
+ /** Catalog replaces identities; partial detail only merges its variants, never its prices. */
77
+ registerProducts(products: readonly InventoryRecord[], complete?: boolean): void;
78
+ /** Consumers share I/O; cancelling one detail does not cancel another consumer. */
79
+ refresh(context: {
80
+ reason: InventoryRefreshReason;
81
+ signal?: AbortSignal;
82
+ force?: boolean;
83
+ }): Promise<void>;
84
+ availabilityForKey(key?: string): InventoryAvailability;
85
+ availability(product: InventoryRecord, variantId?: string | number): InventoryAvailability;
86
+ private keyForLine;
87
+ /** Advisory UI limit only. The serialized cart guard remains authoritative. */
88
+ selectionAvailability(product: InventoryRecord, variantId: string | number, items: readonly InventoryRecord[], editingItem?: InventoryRecord): InventorySelectionAvailability;
89
+ private totals;
90
+ validate(proposed: readonly InventoryRecord[], current?: readonly InventoryRecord[], allowReductions?: boolean): void;
91
+ freezeCheckout(items: readonly InventoryRecord[]): CheckoutRuntimeSnapshot;
92
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inventory/index.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAClD,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;AAC7F,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,8BAA8B;IAC7C,YAAY,EAAE,qBAAqB,CAAC;IACpC,2EAA2E;IAC3E,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,Q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