@pisell/pisellos 0.0.568 → 0.0.570
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.
- package/dist/effects/index.d.ts +2 -2
- package/dist/model/strategy/adapter/dataVariant/type.d.ts +3 -3
- package/dist/model/strategy/adapter/itemRule/type.d.ts +6 -6
- package/dist/model/strategy/adapter/promotion/evaluator.js +3 -2
- package/dist/model/strategy/adapter/promotion/type.d.ts +5 -5
- package/dist/model/strategy/adapter/walletPass/utils.js +7 -4
- package/dist/model/strategy/type.d.ts +1 -1
- package/dist/modules/BaseModule.d.ts +2 -2
- package/dist/modules/BaseModule.js +4 -4
- package/dist/modules/BookingContext/index.d.ts +48 -0
- package/dist/modules/BookingContext/index.js +566 -0
- package/dist/modules/BookingContext/types.d.ts +102 -0
- package/dist/modules/BookingContext/types.js +51 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +302 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +149 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +249 -0
- package/dist/modules/BookingContext/utils/flexible.d.ts +28 -0
- package/dist/modules/BookingContext/utils/flexible.js +56 -0
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
- package/dist/modules/BookingContext/utils/formatResourceList.js +38 -0
- package/dist/modules/BookingContext/utils/index.d.ts +11 -0
- package/dist/modules/BookingContext/utils/index.js +11 -0
- package/dist/modules/BookingContext/utils/noResource.d.ts +13 -0
- package/dist/modules/BookingContext/utils/noResource.js +77 -0
- package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
- package/dist/modules/BookingContext/utils/orderLineDisplay.js +36 -0
- package/dist/modules/BookingContext/utils/productExtend.d.ts +72 -0
- package/dist/modules/BookingContext/utils/productExtend.js +339 -0
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
- package/dist/modules/BookingContext/utils/resourceErrors.js +74 -0
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
- package/dist/modules/BookingContext/utils/resourceSelection.js +24 -0
- package/dist/modules/BookingContext/utils/resources.d.ts +80 -0
- package/dist/modules/BookingContext/utils/resources.js +486 -0
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
- package/dist/modules/BookingContext/utils/serviceTimes.js +151 -0
- package/dist/modules/BookingContext/utils/timeSlices.d.ts +42 -0
- package/dist/modules/BookingContext/utils/timeSlices.js +100 -0
- package/dist/modules/Cart/utils/cartProduct.js +26 -5
- package/dist/modules/Cart/utils/changePrice.js +27 -20
- package/dist/modules/Customer/index.d.ts +20 -0
- package/dist/modules/Customer/index.js +172 -83
- package/dist/modules/Customer/types.d.ts +3 -1
- package/dist/modules/Discount/index.d.ts +2 -1
- package/dist/modules/Discount/index.js +37 -9
- package/dist/modules/Discount/types.d.ts +2 -1
- package/dist/modules/Holder/types.d.ts +1 -1
- package/dist/modules/OpenData/index.d.ts +8 -0
- package/dist/modules/OpenData/index.js +36 -16
- package/dist/modules/OpenData/types.d.ts +1 -1
- package/dist/modules/Order/index.d.ts +448 -23
- package/dist/modules/Order/index.js +5417 -561
- package/dist/modules/Order/types.d.ts +693 -88
- package/dist/modules/Order/types.js +68 -1
- package/dist/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
- package/dist/modules/Order/utils/bundleDiscountHydration.js +144 -0
- package/dist/modules/Order/utils/manualProductDiscount.d.ts +106 -0
- package/dist/modules/Order/utils/manualProductDiscount.js +210 -0
- package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +53 -0
- package/dist/modules/Order/utils/orderCollectionIdentity.js +405 -0
- package/dist/modules/Order/utils.d.ts +167 -18
- package/dist/modules/Order/utils.js +960 -165
- package/dist/modules/Payment/index.d.ts +10 -9
- package/dist/modules/Payment/index.js +465 -703
- package/dist/modules/Payment/types.d.ts +47 -23
- package/dist/modules/Payment/utils.d.ts +1 -1
- package/dist/modules/Payment/utils.js +4 -3
- package/dist/modules/Payment/walletpass.js +44 -29
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/modules/Product/types.d.ts +29 -7
- package/dist/modules/ProductList/index.d.ts +17 -13
- package/dist/modules/ProductList/index.js +184 -74
- package/dist/modules/ProductList/types.d.ts +17 -0
- package/dist/modules/Quotation/index.d.ts +22 -2
- package/dist/modules/Quotation/index.js +108 -42
- package/dist/modules/Quotation/types.d.ts +19 -0
- package/dist/modules/ResourcePlanner/index.d.ts +24 -0
- package/dist/modules/ResourcePlanner/index.js +181 -0
- package/dist/modules/ResourcePlanner/planner.d.ts +14 -0
- package/dist/modules/ResourcePlanner/planner.js +1069 -0
- package/dist/modules/ResourcePlanner/types.d.ts +227 -0
- package/dist/modules/ResourcePlanner/types.js +1 -0
- package/dist/modules/Rules/index.d.ts +8 -10
- package/dist/modules/Rules/index.js +222 -109
- package/dist/modules/Rules/types.d.ts +15 -4
- package/dist/modules/SalesSummary/index.d.ts +23 -26
- package/dist/modules/SalesSummary/index.js +152 -46
- package/dist/modules/SalesSummary/types.d.ts +9 -1
- package/dist/modules/SalesSummary/utils.d.ts +3 -22
- package/dist/modules/SalesSummary/utils.js +803 -163
- package/dist/modules/ScanOrderLogger/types.d.ts +2 -2
- package/dist/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
- package/dist/modules/Schedule/getDateIsInSchedule.js +14 -7
- package/dist/modules/Schedule/index.d.ts +18 -5
- package/dist/modules/Schedule/index.js +78 -24
- package/dist/modules/Schedule/type.d.ts +7 -7
- package/dist/modules/Schedule/types.d.ts +11 -9
- package/dist/modules/Summary/index.js +4 -3
- package/dist/modules/SurchargeList/index.d.ts +18 -0
- package/dist/modules/SurchargeList/index.js +185 -0
- package/dist/modules/SurchargeList/types.d.ts +15 -0
- package/dist/modules/SurchargeList/types.js +1 -0
- package/dist/modules/index.d.ts +3 -0
- package/dist/modules/index.js +4 -1
- package/dist/plugins/app.d.ts +2 -0
- package/dist/plugins/request.d.ts +3 -2
- package/dist/server/index.d.ts +462 -8
- package/dist/server/index.js +6112 -656
- package/dist/server/modules/floor-plan/index.d.ts +39 -0
- package/dist/server/modules/floor-plan/index.js +595 -0
- package/dist/server/modules/floor-plan/types.d.ts +43 -0
- package/dist/server/modules/floor-plan/types.js +13 -0
- package/dist/server/modules/index.d.ts +7 -2
- package/dist/server/modules/index.js +6 -0
- package/dist/server/modules/menu/types.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +207 -14
- package/dist/server/modules/order/index.js +2326 -379
- package/dist/server/modules/order/types.d.ts +91 -20
- package/dist/server/modules/order/types.js +14 -1
- package/dist/server/modules/order/utils/filterBookings.d.ts +7 -1
- package/dist/server/modules/order/utils/filterBookings.js +118 -11
- package/dist/server/modules/order/utils/filterOrders.js +242 -14
- package/dist/server/modules/payment/index.d.ts +28 -0
- package/dist/server/modules/payment/index.js +305 -0
- package/dist/server/modules/payment/types.d.ts +9 -0
- package/dist/server/modules/payment/types.js +1 -0
- package/dist/server/modules/products/index.d.ts +105 -14
- package/dist/server/modules/products/index.js +1393 -516
- package/dist/server/modules/products/types.d.ts +35 -2
- package/dist/server/modules/products/types.js +4 -0
- package/dist/server/modules/quotation/index.d.ts +39 -0
- package/dist/server/modules/quotation/index.js +278 -66
- package/dist/server/modules/resource/index.d.ts +2 -3
- package/dist/server/modules/resource/index.js +108 -86
- package/dist/server/modules/resource/types.d.ts +1 -1
- package/dist/server/modules/schedule/index.d.ts +6 -4
- package/dist/server/modules/schedule/index.js +116 -85
- package/dist/server/modules/schedule/utils.d.ts +1 -1
- package/dist/server/test.json +713 -0
- package/dist/server/types.d.ts +6 -4
- package/dist/server/utils/product.js +2 -2
- package/dist/server/utils/small-ticket.d.ts +71 -0
- package/dist/server/utils/small-ticket.js +963 -0
- package/dist/solution/BaseSales/index.d.ts +378 -0
- package/dist/solution/BaseSales/index.js +4006 -0
- package/dist/solution/BaseSales/types.d.ts +394 -0
- package/dist/solution/BaseSales/types.js +40 -0
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
- package/dist/solution/BaseSales/utils/cartPromotion.js +1450 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +144 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.js +157 -0
- package/dist/solution/BaseSales/utils/quotationPrice.d.ts +18 -0
- package/dist/solution/BaseSales/utils/quotationPrice.js +250 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +63 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +218 -0
- package/dist/solution/BaseSales/utils.d.ts +40 -0
- package/dist/solution/BaseSales/utils.js +263 -0
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/BookingByStep/utils/resources.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +382 -25
- package/dist/solution/BookingTicket/index.js +2506 -443
- package/dist/solution/BookingTicket/types.d.ts +191 -6
- package/dist/solution/BookingTicket/types.js +83 -10
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.js +346 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.js +95 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +77 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.js +136 -0
- package/dist/solution/BookingTicket/utils/cartView.d.ts +29 -0
- package/dist/solution/BookingTicket/utils/cartView.js +209 -0
- package/dist/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/dist/solution/BookingTicket/utils/exampleData.js +183 -0
- package/dist/solution/BookingTicket/utils/orderCustomer.d.ts +4 -0
- package/dist/solution/BookingTicket/utils/orderCustomer.js +31 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +438 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +400 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +4 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +41 -1
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +56 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +11 -3
- package/dist/solution/BookingTicket/utils/scan/index.d.ts +5 -0
- package/dist/solution/BookingTicket/utils/scan/index.js +20 -8
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.js +150 -0
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.js +78 -0
- package/dist/solution/Checkout/index.d.ts +1 -0
- package/dist/solution/Checkout/index.js +25 -34
- package/dist/solution/Checkout/utils/index.js +4 -4
- package/dist/solution/RegisterAndLogin/config.js +2 -10
- package/dist/solution/Sales/index.d.ts +50 -5
- package/dist/solution/Sales/index.js +484 -92
- package/dist/solution/Sales/types.d.ts +29 -5
- package/dist/solution/ScanOrder/index.d.ts +27 -21
- package/dist/solution/ScanOrder/index.js +499 -434
- package/dist/solution/ScanOrder/types.d.ts +38 -16
- package/dist/solution/ScanOrder/types.js +4 -5
- package/dist/solution/ScanOrder/utils.d.ts +4 -1
- package/dist/solution/ScanOrder/utils.js +109 -34
- package/dist/solution/ShopDiscount/index.js +4 -4
- package/dist/solution/ShopDiscount/types.d.ts +1 -1
- package/dist/solution/ShopDiscount/utils.d.ts +2 -2
- package/dist/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/dist/solution/UnifiedBookingSales/index.js +1871 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/dist/solution/UnifiedBookingSales/types.js +11 -0
- package/dist/solution/VenueBooking/index.d.ts +29 -20
- package/dist/solution/VenueBooking/index.js +301 -213
- package/dist/solution/VenueBooking/sales-section-4-annotated.json +0 -2
- package/dist/solution/VenueBooking/types.d.ts +1 -1
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +6 -0
- package/dist/solution/VenueBooking/utils/slotMerge.js +9 -3
- package/dist/solution/index.d.ts +2 -0
- package/dist/solution/index.js +3 -1
- package/dist/types/index.d.ts +12 -2
- package/dist/utils/task.d.ts +2 -2
- package/dist/utils/watch.d.ts +2 -2
- package/lib/effects/index.d.ts +2 -2
- package/lib/model/strategy/adapter/dataVariant/type.d.ts +3 -3
- package/lib/model/strategy/adapter/itemRule/type.d.ts +6 -6
- package/lib/model/strategy/adapter/promotion/evaluator.js +3 -2
- package/lib/model/strategy/adapter/promotion/type.d.ts +5 -5
- package/lib/model/strategy/adapter/walletPass/utils.js +6 -4
- package/lib/model/strategy/type.d.ts +1 -1
- package/lib/modules/BaseModule.d.ts +2 -2
- package/lib/modules/BaseModule.js +4 -4
- package/lib/modules/BookingContext/index.d.ts +48 -0
- package/lib/modules/BookingContext/index.js +390 -0
- package/lib/modules/BookingContext/types.d.ts +102 -0
- package/lib/modules/BookingContext/types.js +48 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +286 -0
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +148 -0
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +242 -0
- package/lib/modules/BookingContext/utils/flexible.d.ts +28 -0
- package/lib/modules/BookingContext/utils/flexible.js +63 -0
- package/lib/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
- package/lib/modules/BookingContext/utils/formatResourceList.js +35 -0
- package/lib/modules/BookingContext/utils/index.d.ts +11 -0
- package/lib/modules/BookingContext/utils/index.js +126 -0
- package/lib/modules/BookingContext/utils/noResource.d.ts +13 -0
- package/lib/modules/BookingContext/utils/noResource.js +78 -0
- package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
- package/lib/modules/BookingContext/utils/orderLineDisplay.js +29 -0
- package/lib/modules/BookingContext/utils/productExtend.d.ts +72 -0
- package/lib/modules/BookingContext/utils/productExtend.js +330 -0
- package/lib/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
- package/lib/modules/BookingContext/utils/resourceErrors.js +80 -0
- package/lib/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
- package/lib/modules/BookingContext/utils/resourceSelection.js +24 -0
- package/lib/modules/BookingContext/utils/resources.d.ts +80 -0
- package/lib/modules/BookingContext/utils/resources.js +419 -0
- package/lib/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
- package/lib/modules/BookingContext/utils/serviceTimes.js +161 -0
- package/lib/modules/BookingContext/utils/timeSlices.d.ts +42 -0
- package/lib/modules/BookingContext/utils/timeSlices.js +114 -0
- package/lib/modules/Cart/utils/cartProduct.js +27 -5
- package/lib/modules/Cart/utils/changePrice.js +20 -14
- package/lib/modules/Customer/index.d.ts +20 -0
- package/lib/modules/Customer/index.js +63 -10
- package/lib/modules/Customer/types.d.ts +3 -1
- package/lib/modules/Discount/index.d.ts +2 -1
- package/lib/modules/Discount/index.js +18 -2
- package/lib/modules/Discount/types.d.ts +2 -1
- package/lib/modules/Holder/types.d.ts +1 -1
- package/lib/modules/OpenData/index.d.ts +8 -0
- package/lib/modules/OpenData/index.js +21 -3
- package/lib/modules/OpenData/types.d.ts +1 -1
- package/lib/modules/Order/index.d.ts +448 -23
- package/lib/modules/Order/index.js +3641 -308
- package/lib/modules/Order/types.d.ts +693 -88
- package/lib/modules/Order/types.js +55 -1
- package/lib/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
- package/lib/modules/Order/utils/bundleDiscountHydration.js +106 -0
- package/lib/modules/Order/utils/manualProductDiscount.d.ts +106 -0
- package/lib/modules/Order/utils/manualProductDiscount.js +207 -0
- package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +53 -0
- package/lib/modules/Order/utils/orderCollectionIdentity.js +353 -0
- package/lib/modules/Order/utils.d.ts +167 -18
- package/lib/modules/Order/utils.js +974 -138
- package/lib/modules/Payment/index.d.ts +10 -9
- package/lib/modules/Payment/index.js +30 -124
- package/lib/modules/Payment/types.d.ts +47 -23
- package/lib/modules/Payment/utils.d.ts +1 -1
- package/lib/modules/Payment/utils.js +4 -3
- package/lib/modules/Payment/walletpass.js +16 -6
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/Product/types.d.ts +29 -7
- package/lib/modules/ProductList/index.d.ts +17 -13
- package/lib/modules/ProductList/index.js +92 -51
- package/lib/modules/ProductList/types.d.ts +17 -0
- package/lib/modules/Quotation/index.d.ts +22 -2
- package/lib/modules/Quotation/index.js +76 -20
- package/lib/modules/Quotation/types.d.ts +19 -0
- package/lib/modules/ResourcePlanner/index.d.ts +24 -0
- package/lib/modules/ResourcePlanner/index.js +147 -0
- package/lib/modules/ResourcePlanner/planner.d.ts +14 -0
- package/lib/modules/ResourcePlanner/planner.js +895 -0
- package/lib/modules/ResourcePlanner/types.d.ts +227 -0
- package/lib/modules/ResourcePlanner/types.js +5 -0
- package/lib/modules/Rules/index.d.ts +8 -10
- package/lib/modules/Rules/index.js +153 -61
- package/lib/modules/Rules/types.d.ts +15 -4
- package/lib/modules/SalesSummary/index.d.ts +23 -26
- package/lib/modules/SalesSummary/index.js +84 -16
- package/lib/modules/SalesSummary/types.d.ts +9 -1
- package/lib/modules/SalesSummary/utils.d.ts +3 -22
- package/lib/modules/SalesSummary/utils.js +616 -111
- package/lib/modules/ScanOrderLogger/types.d.ts +2 -2
- package/lib/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
- package/lib/modules/Schedule/getDateIsInSchedule.js +14 -7
- package/lib/modules/Schedule/index.d.ts +18 -5
- package/lib/modules/Schedule/index.js +49 -14
- package/lib/modules/Schedule/type.d.ts +7 -7
- package/lib/modules/Schedule/types.d.ts +11 -9
- package/lib/modules/Summary/index.js +2 -2
- package/lib/modules/SurchargeList/index.d.ts +18 -0
- package/lib/modules/SurchargeList/index.js +95 -0
- package/lib/modules/SurchargeList/types.d.ts +15 -0
- package/lib/modules/SurchargeList/types.js +5 -0
- package/lib/modules/index.d.ts +3 -0
- package/lib/modules/index.js +33 -0
- package/lib/plugins/app.d.ts +2 -0
- package/lib/plugins/request.d.ts +3 -2
- package/lib/server/index.d.ts +462 -8
- package/lib/server/index.js +3901 -205
- package/lib/server/modules/floor-plan/index.d.ts +39 -0
- package/lib/server/modules/floor-plan/index.js +306 -0
- package/lib/server/modules/floor-plan/types.d.ts +43 -0
- package/lib/server/modules/floor-plan/types.js +19 -0
- package/lib/server/modules/index.d.ts +7 -2
- package/lib/server/modules/index.js +21 -0
- package/lib/server/modules/menu/types.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +207 -14
- package/lib/server/modules/order/index.js +1324 -141
- package/lib/server/modules/order/types.d.ts +91 -20
- package/lib/server/modules/order/types.js +11 -1
- package/lib/server/modules/order/utils/filterBookings.d.ts +7 -1
- package/lib/server/modules/order/utils/filterBookings.js +119 -11
- package/lib/server/modules/order/utils/filterOrders.js +238 -13
- package/lib/server/modules/payment/index.d.ts +28 -0
- package/lib/server/modules/payment/index.js +168 -0
- package/lib/server/modules/payment/types.d.ts +9 -0
- package/lib/server/modules/payment/types.js +5 -0
- package/lib/server/modules/products/index.d.ts +105 -14
- package/lib/server/modules/products/index.js +588 -97
- package/lib/server/modules/products/types.d.ts +35 -2
- package/lib/server/modules/products/types.js +3 -0
- package/lib/server/modules/quotation/index.d.ts +39 -0
- package/lib/server/modules/quotation/index.js +145 -1
- package/lib/server/modules/resource/index.d.ts +2 -3
- package/lib/server/modules/resource/index.js +71 -45
- package/lib/server/modules/resource/types.d.ts +1 -1
- package/lib/server/modules/schedule/index.d.ts +6 -4
- package/lib/server/modules/schedule/index.js +55 -44
- package/lib/server/modules/schedule/utils.d.ts +1 -1
- package/lib/server/test.json +713 -0
- package/lib/server/types.d.ts +6 -4
- package/lib/server/utils/product.js +2 -2
- package/lib/server/utils/small-ticket.d.ts +71 -0
- package/lib/server/utils/small-ticket.js +926 -0
- package/lib/solution/BaseSales/index.d.ts +378 -0
- package/lib/solution/BaseSales/index.js +2367 -0
- package/lib/solution/BaseSales/types.d.ts +394 -0
- package/lib/solution/BaseSales/types.js +47 -0
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
- package/lib/solution/BaseSales/utils/cartPromotion.js +1155 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +144 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.js +140 -0
- package/lib/solution/BaseSales/utils/quotationPrice.d.ts +18 -0
- package/lib/solution/BaseSales/utils/quotationPrice.js +231 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +63 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +215 -0
- package/lib/solution/BaseSales/utils.d.ts +40 -0
- package/lib/solution/BaseSales/utils.js +259 -0
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/BookingByStep/utils/resources.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +382 -25
- package/lib/solution/BookingTicket/index.js +1350 -76
- package/lib/solution/BookingTicket/types.d.ts +191 -6
- package/lib/solution/BookingTicket/types.js +71 -10
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
- package/lib/solution/BookingTicket/utils/addProductDecision.js +353 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.js +94 -0
- package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +77 -0
- package/lib/solution/BookingTicket/utils/bookingStatus.js +136 -0
- package/lib/solution/BookingTicket/utils/cartView.d.ts +29 -0
- package/lib/solution/BookingTicket/utils/cartView.js +200 -0
- package/lib/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/lib/solution/BookingTicket/utils/exampleData.js +185 -0
- package/lib/solution/BookingTicket/utils/orderCustomer.d.ts +4 -0
- package/lib/solution/BookingTicket/utils/orderCustomer.js +35 -0
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +387 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +220 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +4 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +24 -3
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +64 -0
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +4 -2
- package/lib/solution/BookingTicket/utils/scan/index.d.ts +5 -0
- package/lib/solution/BookingTicket/utils/scan/index.js +14 -2
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +115 -0
- package/lib/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
- package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +83 -0
- package/lib/solution/Checkout/index.d.ts +1 -0
- package/lib/solution/Checkout/index.js +18 -19
- package/lib/solution/Checkout/utils/index.js +4 -4
- package/lib/solution/RegisterAndLogin/config.js +2 -10
- package/lib/solution/Sales/index.d.ts +50 -5
- package/lib/solution/Sales/index.js +296 -39
- package/lib/solution/Sales/types.d.ts +29 -5
- package/lib/solution/ScanOrder/index.d.ts +27 -21
- package/lib/solution/ScanOrder/index.js +144 -103
- package/lib/solution/ScanOrder/types.d.ts +38 -16
- package/lib/solution/ScanOrder/types.js +4 -5
- package/lib/solution/ScanOrder/utils.d.ts +4 -1
- package/lib/solution/ScanOrder/utils.js +98 -26
- package/lib/solution/ShopDiscount/index.js +3 -3
- package/lib/solution/ShopDiscount/types.d.ts +1 -1
- package/lib/solution/ShopDiscount/utils.d.ts +2 -2
- package/lib/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/lib/solution/UnifiedBookingSales/index.js +1050 -0
- package/lib/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/lib/solution/UnifiedBookingSales/types.js +14 -0
- package/lib/solution/VenueBooking/index.d.ts +29 -20
- package/lib/solution/VenueBooking/index.js +169 -94
- package/lib/solution/VenueBooking/sales-section-4-annotated.json +0 -2
- package/lib/solution/VenueBooking/types.d.ts +1 -1
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +6 -0
- package/lib/solution/VenueBooking/utils/slotMerge.js +9 -3
- package/lib/solution/index.d.ts +2 -0
- package/lib/solution/index.js +22 -0
- package/lib/types/index.d.ts +12 -2
- package/lib/utils/task.d.ts +2 -2
- package/lib/utils/watch.d.ts +2 -2
- package/package.json +18 -19
- package/dist/model/strategy/adapter/promotion/index.d.ts +0 -4
- package/dist/solution/Checkout/appointmentDemo.json +0 -1
- package/lib/model/strategy/adapter/promotion/index.d.ts +0 -4
- package/lib/solution/Checkout/appointmentDemo.json +0 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Module, PisellCore } from '../../../types';
|
|
2
|
+
import { BaseModule } from '../../../modules/BaseModule';
|
|
3
|
+
import { type FloorPlanItem } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* 平面图模块:预加载列表、pubsub 同步、供 OS Server 路由读本地 store
|
|
6
|
+
*/
|
|
7
|
+
export declare class FloorPlanModule extends BaseModule implements Module {
|
|
8
|
+
protected defaultName: string;
|
|
9
|
+
protected defaultVersion: string;
|
|
10
|
+
private store;
|
|
11
|
+
private request;
|
|
12
|
+
private logger;
|
|
13
|
+
private floorPlanDataSource;
|
|
14
|
+
private pendingSyncMessages;
|
|
15
|
+
private syncTimer?;
|
|
16
|
+
constructor(name?: string, version?: string);
|
|
17
|
+
initialize(core: PisellCore, options: any): Promise<void>;
|
|
18
|
+
private logInfo;
|
|
19
|
+
private logWarning;
|
|
20
|
+
private logError;
|
|
21
|
+
private idKey;
|
|
22
|
+
private syncMaps;
|
|
23
|
+
/** 与接口约定一致:sort 升序,id 降序 */
|
|
24
|
+
getSortedList(): FloorPlanItem[];
|
|
25
|
+
getById(id: number | string): FloorPlanItem | undefined;
|
|
26
|
+
getByCode(code: string): FloorPlanItem | undefined;
|
|
27
|
+
private replaceStore;
|
|
28
|
+
private mergeItems;
|
|
29
|
+
private removeByIds;
|
|
30
|
+
private loadListFromServer;
|
|
31
|
+
fetchByIdFromServer(id: number | string): Promise<FloorPlanItem | null>;
|
|
32
|
+
fetchByCodeFromServer(code: string): Promise<FloorPlanItem | null>;
|
|
33
|
+
preload(): Promise<void>;
|
|
34
|
+
private initFloorPlanDataSource;
|
|
35
|
+
private setupFloorPlanSync;
|
|
36
|
+
private processFloorPlanSyncMessages;
|
|
37
|
+
clear(): Promise<void>;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FloorPlanModule = void 0;
|
|
7
|
+
var _BaseModule = require("../../../modules/BaseModule");
|
|
8
|
+
var _types = require("./types");
|
|
9
|
+
const FLOOR_PLAN_SYNC_DEBOUNCE_MS = 3000;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 平面图模块:预加载列表、pubsub 同步、供 OS Server 路由读本地 store
|
|
13
|
+
*/
|
|
14
|
+
class FloorPlanModule extends _BaseModule.BaseModule {
|
|
15
|
+
defaultName = 'floor_plan';
|
|
16
|
+
defaultVersion = '1.0.0';
|
|
17
|
+
store;
|
|
18
|
+
request;
|
|
19
|
+
logger;
|
|
20
|
+
floorPlanDataSource;
|
|
21
|
+
pendingSyncMessages = [];
|
|
22
|
+
syncTimer;
|
|
23
|
+
constructor(name, version) {
|
|
24
|
+
super(name, version);
|
|
25
|
+
}
|
|
26
|
+
async initialize(core, options) {
|
|
27
|
+
this.core = core;
|
|
28
|
+
this.store = options.store;
|
|
29
|
+
if (Array.isArray(options?.initialState?.list) && options.initialState.list.length > 0) {
|
|
30
|
+
this.store.list = options.initialState.list;
|
|
31
|
+
this.syncMaps();
|
|
32
|
+
this.core.effects.emit(_types.FloorPlanHooks.onFloorPlansChanged, this.store.list);
|
|
33
|
+
} else {
|
|
34
|
+
this.store.list = [];
|
|
35
|
+
this.store.map = new Map();
|
|
36
|
+
this.store.codeMap = new Map();
|
|
37
|
+
}
|
|
38
|
+
this.request = core.getPlugin('request');
|
|
39
|
+
const appPlugin = core.getPlugin('app');
|
|
40
|
+
if (appPlugin) {
|
|
41
|
+
const app = appPlugin.getApp();
|
|
42
|
+
this.logger = app.logger;
|
|
43
|
+
}
|
|
44
|
+
this.initFloorPlanDataSource();
|
|
45
|
+
this.setupFloorPlanSync();
|
|
46
|
+
}
|
|
47
|
+
logInfo(title, metadata) {
|
|
48
|
+
try {
|
|
49
|
+
this.logger?.addLog?.({
|
|
50
|
+
type: 'info',
|
|
51
|
+
title: `[FloorPlanModule] ${title}`,
|
|
52
|
+
metadata: metadata || {}
|
|
53
|
+
});
|
|
54
|
+
} catch {
|
|
55
|
+
// ignore
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
logWarning(title, metadata) {
|
|
59
|
+
try {
|
|
60
|
+
this.logger?.addLog?.({
|
|
61
|
+
type: 'warning',
|
|
62
|
+
title: `[FloorPlanModule] ${title}`,
|
|
63
|
+
metadata: metadata || {}
|
|
64
|
+
});
|
|
65
|
+
} catch {
|
|
66
|
+
// ignore
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
logError(title, metadata) {
|
|
70
|
+
try {
|
|
71
|
+
this.logger?.addLog?.({
|
|
72
|
+
type: 'error',
|
|
73
|
+
title: `[FloorPlanModule] ${title}`,
|
|
74
|
+
metadata: metadata || {}
|
|
75
|
+
});
|
|
76
|
+
} catch {
|
|
77
|
+
// ignore
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
idKey(id) {
|
|
81
|
+
return String(id);
|
|
82
|
+
}
|
|
83
|
+
syncMaps() {
|
|
84
|
+
this.store.map = new Map();
|
|
85
|
+
this.store.codeMap = new Map();
|
|
86
|
+
for (const item of this.store.list) {
|
|
87
|
+
if (item?.id == null) continue;
|
|
88
|
+
const key = this.idKey(item.id);
|
|
89
|
+
this.store.map.set(key, item);
|
|
90
|
+
if (item.code) {
|
|
91
|
+
this.store.codeMap.set(String(item.code), item);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** 与接口约定一致:sort 升序,id 降序 */
|
|
97
|
+
getSortedList() {
|
|
98
|
+
return [...this.store.list].sort((a, b) => {
|
|
99
|
+
const sortDiff = Number(a.sort ?? 0) - Number(b.sort ?? 0);
|
|
100
|
+
if (sortDiff !== 0) return sortDiff;
|
|
101
|
+
return Number(b.id) - Number(a.id);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
getById(id) {
|
|
105
|
+
return this.store.map.get(this.idKey(id));
|
|
106
|
+
}
|
|
107
|
+
getByCode(code) {
|
|
108
|
+
return this.store.codeMap.get(String(code));
|
|
109
|
+
}
|
|
110
|
+
replaceStore(list) {
|
|
111
|
+
this.store.list = list.map(i => ({
|
|
112
|
+
...i
|
|
113
|
+
}));
|
|
114
|
+
this.syncMaps();
|
|
115
|
+
}
|
|
116
|
+
mergeItems(items) {
|
|
117
|
+
if (items.length === 0) return;
|
|
118
|
+
const byId = new Map(this.store.map);
|
|
119
|
+
for (const item of items) {
|
|
120
|
+
if (item?.id == null) continue;
|
|
121
|
+
byId.set(this.idKey(item.id), {
|
|
122
|
+
...item
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
this.store.list = Array.from(byId.values());
|
|
126
|
+
this.syncMaps();
|
|
127
|
+
}
|
|
128
|
+
removeByIds(ids) {
|
|
129
|
+
if (ids.length === 0) return;
|
|
130
|
+
const set = new Set(ids.map(id => this.idKey(id)));
|
|
131
|
+
this.store.list = this.store.list.filter(p => !set.has(this.idKey(p.id)));
|
|
132
|
+
this.syncMaps();
|
|
133
|
+
}
|
|
134
|
+
async loadListFromServer() {
|
|
135
|
+
try {
|
|
136
|
+
const res = await this.request.get(`/schedule/floor-plan`, {}, {
|
|
137
|
+
isShopApi: true
|
|
138
|
+
});
|
|
139
|
+
const body = res;
|
|
140
|
+
const raw = body?.data !== undefined ? body.data : body;
|
|
141
|
+
const list = Array.isArray(raw) ? raw : [];
|
|
142
|
+
return list;
|
|
143
|
+
} catch (e) {
|
|
144
|
+
this.logWarning('loadListFromServer 失败', {
|
|
145
|
+
error: e instanceof Error ? e.message : String(e)
|
|
146
|
+
});
|
|
147
|
+
return [];
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
async fetchByIdFromServer(id) {
|
|
151
|
+
try {
|
|
152
|
+
const res = await this.request.get(`/schedule/floor-plan/${id}`, {}, {
|
|
153
|
+
isShopApi: true
|
|
154
|
+
});
|
|
155
|
+
const body = res;
|
|
156
|
+
const data = body?.data !== undefined ? body.data : body;
|
|
157
|
+
return data && typeof data === 'object' ? data : null;
|
|
158
|
+
} catch {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async fetchByCodeFromServer(code) {
|
|
163
|
+
try {
|
|
164
|
+
const enc = encodeURIComponent(code);
|
|
165
|
+
const res = await this.request.get(`/schedule/floor-plan/code/${enc}`, {}, {
|
|
166
|
+
isShopApi: true
|
|
167
|
+
});
|
|
168
|
+
const body = res;
|
|
169
|
+
const data = body?.data !== undefined ? body.data : body;
|
|
170
|
+
return data && typeof data === 'object' ? data : null;
|
|
171
|
+
} catch {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
async preload() {
|
|
176
|
+
this.logInfo('开始预加载平面图列表');
|
|
177
|
+
const list = await this.loadListFromServer();
|
|
178
|
+
if (list.length > 0) {
|
|
179
|
+
this.replaceStore(list);
|
|
180
|
+
this.core.effects.emit(_types.FloorPlanHooks.onFloorPlansChanged, this.getSortedList());
|
|
181
|
+
this.logInfo('预加载完成', {
|
|
182
|
+
count: list.length
|
|
183
|
+
});
|
|
184
|
+
} else {
|
|
185
|
+
this.logWarning('预加载完成但列表为空');
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
initFloorPlanDataSource() {
|
|
189
|
+
const Ctor = this.core.serverOptions?.All_DATA_SOURCES?.FloorPlanDataSource;
|
|
190
|
+
if (!Ctor) {
|
|
191
|
+
this.logWarning('FloorPlanDataSource 不可用,跳过 pubsub 同步');
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
this.floorPlanDataSource = new Ctor();
|
|
195
|
+
this.logInfo('FloorPlanDataSource 实例已创建');
|
|
196
|
+
}
|
|
197
|
+
setupFloorPlanSync() {
|
|
198
|
+
if (!this.floorPlanDataSource) return;
|
|
199
|
+
const flush = () => {
|
|
200
|
+
if (this.syncTimer) clearTimeout(this.syncTimer);
|
|
201
|
+
this.syncTimer = setTimeout(() => {
|
|
202
|
+
this.processFloorPlanSyncMessages();
|
|
203
|
+
}, FLOOR_PLAN_SYNC_DEBOUNCE_MS);
|
|
204
|
+
};
|
|
205
|
+
this.floorPlanDataSource.run({
|
|
206
|
+
pubsub: {
|
|
207
|
+
callback: res => {
|
|
208
|
+
const data = res?.data || res;
|
|
209
|
+
if (!data || data.module !== 'floor_plan') return;
|
|
210
|
+
this.pendingSyncMessages.push({
|
|
211
|
+
...data
|
|
212
|
+
});
|
|
213
|
+
flush();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}).catch(err => {
|
|
217
|
+
this.logError('setupFloorPlanSync: DataSource run 出错', {
|
|
218
|
+
error: err instanceof Error ? err.message : String(err)
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
this.logInfo('floor_plan pubsub 订阅已建立');
|
|
222
|
+
}
|
|
223
|
+
async processFloorPlanSyncMessages() {
|
|
224
|
+
const messages = [...this.pendingSyncMessages];
|
|
225
|
+
this.pendingSyncMessages = [];
|
|
226
|
+
if (messages.length === 0) return;
|
|
227
|
+
this.logInfo('processFloorPlanSyncMessages 开始', {
|
|
228
|
+
count: messages.length
|
|
229
|
+
});
|
|
230
|
+
let changed = false;
|
|
231
|
+
const deleteIds = [];
|
|
232
|
+
const bodyItems = [];
|
|
233
|
+
let needFullList = false;
|
|
234
|
+
const partialIds = new Set();
|
|
235
|
+
for (const msg of messages) {
|
|
236
|
+
if (msg.operation === 'delete' || msg.action === 'delete') {
|
|
237
|
+
if (msg.ids?.length) {
|
|
238
|
+
deleteIds.push(...msg.ids);
|
|
239
|
+
} else if (msg.id != null) {
|
|
240
|
+
deleteIds.push(msg.id);
|
|
241
|
+
}
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
const body = msg.body;
|
|
245
|
+
const hasBody = body && typeof body === 'object' && Object.keys(body).length > 0 && body.id != null;
|
|
246
|
+
if (hasBody) {
|
|
247
|
+
bodyItems.push(body);
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
if (msg.ids && msg.ids.length > 1) {
|
|
251
|
+
needFullList = true;
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
if (msg.ids?.length === 1) {
|
|
255
|
+
partialIds.add(msg.ids[0]);
|
|
256
|
+
} else if (msg.id != null) {
|
|
257
|
+
partialIds.add(msg.id);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
const uniqueDeletes = [...new Set(deleteIds)];
|
|
261
|
+
if (uniqueDeletes.length > 0) {
|
|
262
|
+
this.removeByIds(uniqueDeletes);
|
|
263
|
+
changed = true;
|
|
264
|
+
}
|
|
265
|
+
if (bodyItems.length > 0) {
|
|
266
|
+
this.mergeItems(bodyItems);
|
|
267
|
+
changed = true;
|
|
268
|
+
}
|
|
269
|
+
if (needFullList) {
|
|
270
|
+
const list = await this.loadListFromServer();
|
|
271
|
+
this.replaceStore(list);
|
|
272
|
+
changed = true;
|
|
273
|
+
} else if (partialIds.size > 0) {
|
|
274
|
+
const fetched = [];
|
|
275
|
+
for (const id of partialIds) {
|
|
276
|
+
const one = await this.fetchByIdFromServer(id);
|
|
277
|
+
if (one) fetched.push(one);
|
|
278
|
+
}
|
|
279
|
+
if (fetched.length > 0) {
|
|
280
|
+
this.mergeItems(fetched);
|
|
281
|
+
changed = true;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if (changed) {
|
|
285
|
+
this.core.effects.emit(_types.FloorPlanHooks.onFloorPlansChanged, this.getSortedList());
|
|
286
|
+
this.core.effects.emit(_types.FloorPlanHooks.onFloorPlanSyncCompleted, null);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
async clear() {
|
|
290
|
+
this.store.list = [];
|
|
291
|
+
this.store.map.clear();
|
|
292
|
+
this.store.codeMap.clear();
|
|
293
|
+
}
|
|
294
|
+
destroy() {
|
|
295
|
+
if (this.syncTimer) {
|
|
296
|
+
clearTimeout(this.syncTimer);
|
|
297
|
+
this.syncTimer = undefined;
|
|
298
|
+
}
|
|
299
|
+
this.pendingSyncMessages = [];
|
|
300
|
+
if (this.floorPlanDataSource?.destroy) {
|
|
301
|
+
this.floorPlanDataSource.destroy();
|
|
302
|
+
}
|
|
303
|
+
super.destroy();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
exports.FloorPlanModule = FloorPlanModule;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 平面图(floor-plan)Server 模块类型
|
|
3
|
+
* 与 GET /shop/schedule/floor-plan 系列接口数据结构对齐
|
|
4
|
+
*/
|
|
5
|
+
export interface FloorPlanItem {
|
|
6
|
+
id: number;
|
|
7
|
+
shop_id?: number;
|
|
8
|
+
code: string;
|
|
9
|
+
name: string | Record<string, string>;
|
|
10
|
+
layout: unknown[];
|
|
11
|
+
canvas_width: number;
|
|
12
|
+
canvas_height: number;
|
|
13
|
+
sort: number;
|
|
14
|
+
status: number;
|
|
15
|
+
created_at?: string;
|
|
16
|
+
updated_at?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface FloorPlanState {
|
|
19
|
+
list: FloorPlanItem[];
|
|
20
|
+
map: Map<string, FloorPlanItem>;
|
|
21
|
+
codeMap: Map<string, FloorPlanItem>;
|
|
22
|
+
}
|
|
23
|
+
/** pubsub / Ably 推送消息(与《平面图编辑器API文档》Socket 一节一致) */
|
|
24
|
+
export interface FloorPlanSyncMessage {
|
|
25
|
+
module?: string;
|
|
26
|
+
action?: string;
|
|
27
|
+
operation?: string;
|
|
28
|
+
id?: number;
|
|
29
|
+
ids?: number[];
|
|
30
|
+
body?: Partial<FloorPlanItem> & {
|
|
31
|
+
id?: number;
|
|
32
|
+
};
|
|
33
|
+
message_uuid?: string;
|
|
34
|
+
timestamp?: string;
|
|
35
|
+
_channelKey?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const FloorPlanHooks: {
|
|
38
|
+
/** 本地列表变更(预加载、合并、删除后) */
|
|
39
|
+
readonly onFloorPlansChanged: "server_floor_plan:onFloorPlansChanged";
|
|
40
|
+
/** pubsub 同步处理完成,供 Server 向订阅者推送最新查询结果 */
|
|
41
|
+
readonly onFloorPlanSyncCompleted: "server_floor_plan:onFloorPlanSyncCompleted";
|
|
42
|
+
};
|
|
43
|
+
export declare type FloorPlanHooksType = (typeof FloorPlanHooks)[keyof typeof FloorPlanHooks];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FloorPlanHooks = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* 平面图(floor-plan)Server 模块类型
|
|
9
|
+
* 与 GET /shop/schedule/floor-plan 系列接口数据结构对齐
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** pubsub / Ably 推送消息(与《平面图编辑器API文档》Socket 一节一致) */
|
|
13
|
+
|
|
14
|
+
const FloorPlanHooks = exports.FloorPlanHooks = {
|
|
15
|
+
/** 本地列表变更(预加载、合并、删除后) */
|
|
16
|
+
onFloorPlansChanged: 'server_floor_plan:onFloorPlansChanged',
|
|
17
|
+
/** pubsub 同步处理完成,供 Server 向订阅者推送最新查询结果 */
|
|
18
|
+
onFloorPlanSyncCompleted: 'server_floor_plan:onFloorPlanSyncCompleted'
|
|
19
|
+
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* 包含新增的 Products、Menu、Quotation 和扩展的 Schedule 模块
|
|
4
4
|
*/
|
|
5
5
|
export { ProductsModule } from './products';
|
|
6
|
-
export type { ProductsState } from './products/types';
|
|
6
|
+
export type { ProductIdScope, ProductsState } from './products/types';
|
|
7
7
|
export { ProductsHooks } from './products/types';
|
|
8
8
|
export { MenuModule } from './menu';
|
|
9
9
|
export type { MenuState, MenuData } from './menu/types';
|
|
@@ -14,8 +14,13 @@ export { QuotationHooks } from './quotation/types';
|
|
|
14
14
|
export { ScheduleModuleEx } from './schedule';
|
|
15
15
|
export type { ScheduleState, ScheduleItem } from './schedule/types';
|
|
16
16
|
export { OrderModule } from './order';
|
|
17
|
-
export type { OrderState, OrderData, OrderId, OrderSummary, OrderBookingItem, OrderProductLineItem, OrderPaymentItem, OrderSurchargeItem, OrderProductDiscountItem, OrderWithoutBookings, BookingData, OrderFilters, BookingFilters, OrderFilterResult, BookingFilterResult, OrderModulePagedResult, } from './order/types';
|
|
17
|
+
export type { OrderState, OrderData, OrderId, OrderSummary, OrderBookingItem, OrderProductLineItem, OrderPaymentItem, OrderSurchargeItem, OrderProductDiscountItem, OrderWithoutBookings, BookingData, OrderFilters, BookingFilters, OrderFilterResult, OrderFilterRejectDetail, OrderFilterRejectedEntry, BookingFilterResult, OrderModulePagedResult, } from './order/types';
|
|
18
18
|
export { OrderHooks } from './order/types';
|
|
19
|
+
export { PaymentServerModule } from './payment';
|
|
20
|
+
export type { PaymentMethod, PaymentMethodsChangedEventData, PaymentServerState } from './payment/types';
|
|
21
|
+
export { FloorPlanModule } from './floor-plan';
|
|
22
|
+
export type { FloorPlanItem, FloorPlanState, FloorPlanSyncMessage } from './floor-plan/types';
|
|
23
|
+
export { FloorPlanHooks } from './floor-plan/types';
|
|
19
24
|
export { ResourceModule, resourceModule } from './resource';
|
|
20
25
|
export type { ResourceState, ResourceData, ResourceId, ResourceBooking, ResourcePageQuery, ResourcePageResult, QueryOptions, ScheduleEventResource, } from './resource';
|
|
21
26
|
export { ResourceHooks } from './resource';
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "FloorPlanHooks", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _types5.FloorPlanHooks;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "FloorPlanModule", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _floorPlan.FloorPlanModule;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
6
18
|
Object.defineProperty(exports, "MenuHooks", {
|
|
7
19
|
enumerable: true,
|
|
8
20
|
get: function () {
|
|
@@ -27,6 +39,12 @@ Object.defineProperty(exports, "OrderModule", {
|
|
|
27
39
|
return _order.OrderModule;
|
|
28
40
|
}
|
|
29
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "PaymentServerModule", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _payment.PaymentServerModule;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
30
48
|
Object.defineProperty(exports, "ProductsHooks", {
|
|
31
49
|
enumerable: true,
|
|
32
50
|
get: function () {
|
|
@@ -84,4 +102,7 @@ var _types3 = require("./quotation/types");
|
|
|
84
102
|
var _schedule = require("./schedule");
|
|
85
103
|
var _order = require("./order");
|
|
86
104
|
var _types4 = require("./order/types");
|
|
105
|
+
var _payment = require("./payment");
|
|
106
|
+
var _floorPlan = require("./floor-plan");
|
|
107
|
+
var _types5 = require("./floor-plan/types");
|
|
87
108
|
var _resource = require("./resource");
|