@unchainedshop/core 4.3.6 → 4.5.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.
- package/README.md +614 -2
- package/lib/bulk-importer/createBulkImporter.d.ts +5 -6
- package/lib/bulk-importer/createBulkImporter.js +6 -5
- package/lib/bulk-importer/handlers/assortment/create.d.ts +2 -3
- package/lib/bulk-importer/handlers/assortment/create.js +6 -8
- package/lib/bulk-importer/handlers/assortment/index.d.ts +3 -4
- package/lib/bulk-importer/handlers/assortment/index.js +3 -4
- package/lib/bulk-importer/handlers/assortment/remove.d.ts +1 -2
- package/lib/bulk-importer/handlers/assortment/remove.js +0 -1
- package/lib/bulk-importer/handlers/assortment/update.d.ts +2 -3
- package/lib/bulk-importer/handlers/assortment/update.js +7 -9
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts +1 -2
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js +1 -2
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts +1 -2
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js +1 -2
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts +1 -2
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js +1 -2
- package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts +2 -3
- package/lib/bulk-importer/handlers/assortment/upsertMedia.js +2 -4
- package/lib/bulk-importer/handlers/filter/create.d.ts +7 -3
- package/lib/bulk-importer/handlers/filter/create.js +3 -4
- package/lib/bulk-importer/handlers/filter/index.d.ts +3 -4
- package/lib/bulk-importer/handlers/filter/index.js +3 -4
- package/lib/bulk-importer/handlers/filter/remove.d.ts +1 -2
- package/lib/bulk-importer/handlers/filter/remove.js +0 -1
- package/lib/bulk-importer/handlers/filter/update.d.ts +1 -2
- package/lib/bulk-importer/handlers/filter/update.js +2 -4
- package/lib/bulk-importer/handlers/product/create.d.ts +23 -6
- package/lib/bulk-importer/handlers/product/create.js +10 -12
- package/lib/bulk-importer/handlers/product/index.d.ts +3 -4
- package/lib/bulk-importer/handlers/product/index.js +3 -4
- package/lib/bulk-importer/handlers/product/remove.d.ts +2 -3
- package/lib/bulk-importer/handlers/product/remove.js +0 -1
- package/lib/bulk-importer/handlers/product/update.d.ts +2 -3
- package/lib/bulk-importer/handlers/product/update.js +8 -11
- package/lib/bulk-importer/handlers/product/upsertMedia.d.ts +2 -3
- package/lib/bulk-importer/handlers/product/upsertMedia.js +3 -5
- package/lib/bulk-importer/handlers/product/upsertVariations.d.ts +1 -2
- package/lib/bulk-importer/handlers/product/upsertVariations.js +2 -5
- package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.d.ts +0 -1
- package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.js +0 -1
- package/lib/bulk-importer/index.d.ts +2 -3
- package/lib/bulk-importer/index.js +2 -3
- package/lib/bulk-importer/upsertAsset.d.ts +3 -4
- package/lib/bulk-importer/upsertAsset.js +1 -3
- package/lib/core-index.d.ts +10 -10
- package/lib/core-index.js +10 -10
- package/lib/directors/BaseDiscountAdapter.d.ts +5 -6
- package/lib/directors/BaseDiscountAdapter.js +0 -17
- package/lib/directors/BaseDiscountDirector.d.ts +3 -4
- package/lib/directors/BaseDiscountDirector.js +0 -1
- package/lib/directors/BasePricingAdapter.d.ts +4 -5
- package/lib/directors/BasePricingAdapter.js +1 -2
- package/lib/directors/BasePricingDirector.d.ts +4 -5
- package/lib/directors/BasePricingDirector.js +1 -6
- package/lib/directors/BasePricingSheet.d.ts +1 -2
- package/lib/directors/BasePricingSheet.js +0 -4
- package/lib/directors/BaseWorker.d.ts +1 -2
- package/lib/directors/BaseWorker.js +4 -7
- package/lib/directors/DeliveryAdapter.d.ts +8 -8
- package/lib/directors/DeliveryAdapter.js +6 -15
- package/lib/directors/DeliveryDirector.d.ts +5 -6
- package/lib/directors/DeliveryDirector.js +1 -2
- package/lib/directors/DeliveryPricingAdapter.d.ts +7 -8
- package/lib/directors/DeliveryPricingAdapter.js +2 -3
- package/lib/directors/DeliveryPricingDirector.d.ts +4 -5
- package/lib/directors/DeliveryPricingDirector.js +2 -2
- package/lib/directors/DeliveryPricingSheet.d.ts +9 -9
- package/lib/directors/DeliveryPricingSheet.js +7 -9
- package/lib/directors/EnrollmentAdapter.d.ts +2 -3
- package/lib/directors/EnrollmentAdapter.js +0 -1
- package/lib/directors/EnrollmentDirector.d.ts +3 -4
- package/lib/directors/EnrollmentDirector.js +0 -1
- package/lib/directors/EventListenerWorker.d.ts +1 -2
- package/lib/directors/EventListenerWorker.js +2 -11
- package/lib/directors/FailedRescheduler.d.ts +1 -2
- package/lib/directors/FailedRescheduler.js +0 -3
- package/lib/directors/FilterAdapter.d.ts +5 -6
- package/lib/directors/FilterAdapter.js +1 -5
- package/lib/directors/FilterDirector.d.ts +4 -5
- package/lib/directors/FilterDirector.js +1 -10
- package/lib/directors/IntervalWorker.d.ts +3 -4
- package/lib/directors/IntervalWorker.js +6 -8
- package/lib/directors/MessagingDirector.d.ts +0 -1
- package/lib/directors/MessagingDirector.js +0 -1
- package/lib/directors/OrderDiscountAdapter.d.ts +1 -2
- package/lib/directors/OrderDiscountAdapter.js +1 -2
- package/lib/directors/OrderDiscountConfiguration.d.ts +0 -1
- package/lib/directors/OrderDiscountConfiguration.js +0 -1
- package/lib/directors/OrderDiscountDirector.d.ts +2 -3
- package/lib/directors/OrderDiscountDirector.js +1 -2
- package/lib/directors/OrderPricingAdapter.d.ts +4 -5
- package/lib/directors/OrderPricingAdapter.js +1 -2
- package/lib/directors/OrderPricingDirector.d.ts +2 -3
- package/lib/directors/OrderPricingDirector.js +1 -2
- package/lib/directors/OrderPricingSheet.d.ts +10 -10
- package/lib/directors/OrderPricingSheet.js +8 -12
- package/lib/directors/PaymentAdapter.d.ts +8 -8
- package/lib/directors/PaymentAdapter.js +6 -12
- package/lib/directors/PaymentDirector.d.ts +4 -5
- package/lib/directors/PaymentDirector.js +1 -2
- package/lib/directors/PaymentPricingAdapter.d.ts +8 -9
- package/lib/directors/PaymentPricingAdapter.js +3 -4
- package/lib/directors/PaymentPricingDirector.d.ts +5 -6
- package/lib/directors/PaymentPricingDirector.js +2 -3
- package/lib/directors/PaymentPricingSheet.d.ts +8 -8
- package/lib/directors/PaymentPricingSheet.js +7 -9
- package/lib/directors/ProductDiscountAdapter.d.ts +1 -2
- package/lib/directors/ProductDiscountAdapter.js +1 -2
- package/lib/directors/ProductDiscountConfiguration.d.ts +1 -2
- package/lib/directors/ProductDiscountConfiguration.js +0 -1
- package/lib/directors/ProductDiscountDirector.d.ts +2 -3
- package/lib/directors/ProductDiscountDirector.js +1 -2
- package/lib/directors/ProductPricingAdapter.d.ts +5 -6
- package/lib/directors/ProductPricingAdapter.js +1 -2
- package/lib/directors/ProductPricingDirector.d.ts +4 -5
- package/lib/directors/ProductPricingDirector.js +1 -2
- package/lib/directors/ProductPricingSheet.d.ts +8 -8
- package/lib/directors/ProductPricingSheet.js +6 -8
- package/lib/directors/QuotationAdapter.d.ts +9 -9
- package/lib/directors/QuotationAdapter.js +6 -8
- package/lib/directors/QuotationDirector.d.ts +2 -3
- package/lib/directors/QuotationDirector.js +1 -2
- package/lib/directors/WarehousingAdapter.d.ts +12 -12
- package/lib/directors/WarehousingAdapter.js +6 -8
- package/lib/directors/WarehousingDirector.d.ts +4 -5
- package/lib/directors/WarehousingDirector.js +1 -4
- package/lib/directors/WorkerAdapter.d.ts +5 -6
- package/lib/directors/WorkerAdapter.js +0 -1
- package/lib/directors/WorkerDirector.d.ts +5 -6
- package/lib/directors/WorkerDirector.js +0 -3
- package/lib/directors/index.d.ts +42 -43
- package/lib/directors/index.js +42 -43
- package/lib/factory/index.d.ts +9 -10
- package/lib/factory/index.js +9 -10
- package/lib/factory/registerAssortmentSearchFilter.d.ts +1 -2
- package/lib/factory/registerAssortmentSearchFilter.js +1 -2
- package/lib/factory/registerInvoicePayment.d.ts +2 -3
- package/lib/factory/registerInvoicePayment.js +1 -2
- package/lib/factory/registerPhysicalWarehousing.d.ts +2 -3
- package/lib/factory/registerPhysicalWarehousing.js +1 -2
- package/lib/factory/registerPickUpDelivery.d.ts +3 -4
- package/lib/factory/registerPickUpDelivery.js +1 -2
- package/lib/factory/registerProductDiscoverabilityFilter.d.ts +0 -1
- package/lib/factory/registerProductDiscoverabilityFilter.js +1 -2
- package/lib/factory/registerProductSearchFilter.d.ts +1 -2
- package/lib/factory/registerProductSearchFilter.js +1 -2
- package/lib/factory/registerShippingDelivery.d.ts +3 -4
- package/lib/factory/registerShippingDelivery.js +1 -2
- package/lib/factory/registerVirtualWarehousing.d.ts +2 -3
- package/lib/factory/registerVirtualWarehousing.js +1 -2
- package/lib/factory/registerWorker.d.ts +0 -1
- package/lib/factory/registerWorker.js +1 -2
- package/lib/modules.d.ts +18 -19
- package/lib/modules.js +5 -5
- package/lib/services/activateEnrollment.d.ts +2 -3
- package/lib/services/activateEnrollment.js +2 -3
- package/lib/services/addMessage.d.ts +2 -3
- package/lib/services/addMessage.js +2 -3
- package/lib/services/addMultipleCartProducts.d.ts +18 -0
- package/lib/services/addMultipleCartProducts.js +25 -0
- package/lib/services/calculateDiscountTotal.d.ts +2 -3
- package/lib/services/calculateDiscountTotal.js +1 -6
- package/lib/services/checkoutOrder.d.ts +1 -2
- package/lib/services/checkoutOrder.js +4 -6
- package/lib/services/confirmOrder.d.ts +2 -3
- package/lib/services/confirmOrder.js +1 -2
- package/lib/services/createDownloadStream.d.ts +2 -3
- package/lib/services/createDownloadStream.js +0 -1
- package/lib/services/createEnrollmentFromCheckout.d.ts +4 -5
- package/lib/services/createEnrollmentFromCheckout.js +2 -3
- package/lib/services/createFileDownloadURL.d.ts +7 -0
- package/lib/services/createFileDownloadURL.js +10 -0
- package/lib/services/createManualOrderDiscount.d.ts +2 -3
- package/lib/services/createManualOrderDiscount.js +1 -3
- package/lib/services/createSignedURL.d.ts +2 -3
- package/lib/services/createSignedURL.js +0 -1
- package/lib/services/deleteUser.d.ts +1 -2
- package/lib/services/deleteUser.js +0 -1
- package/lib/services/discountedEntities.d.ts +3 -4
- package/lib/services/discountedEntities.js +1 -7
- package/lib/services/ercMetadata.d.ts +3 -4
- package/lib/services/ercMetadata.js +1 -2
- package/lib/services/findOrInitCart.d.ts +2 -3
- package/lib/services/findOrInitCart.js +1 -2
- package/lib/services/findProductSiblings.d.ts +9 -0
- package/lib/services/findProductSiblings.js +18 -0
- package/lib/services/fullfillQuotation.d.ts +2 -3
- package/lib/services/fullfillQuotation.js +1 -2
- package/lib/services/generateOrderFromEnrollment.d.ts +2 -3
- package/lib/services/generateOrderFromEnrollment.js +2 -3
- package/lib/services/index.d.ts +74 -49
- package/lib/services/index.js +73 -51
- package/lib/services/initCartProviders.d.ts +2 -3
- package/lib/services/initCartProviders.js +2 -5
- package/lib/services/initializeEnrollment.d.ts +2 -3
- package/lib/services/initializeEnrollment.js +3 -4
- package/lib/services/invalidateFilterCache.d.ts +1 -2
- package/lib/services/invalidateFilterCache.js +1 -2
- package/lib/services/isTokenInvalidateable.d.ts +5 -0
- package/lib/services/isTokenInvalidateable.js +15 -0
- package/lib/services/linkFileService.d.ts +1 -2
- package/lib/services/linkFileService.js +0 -1
- package/lib/services/loadFilterOptions.d.ts +2 -3
- package/lib/services/loadFilterOptions.js +1 -2
- package/lib/services/loadFilters.d.ts +2 -3
- package/lib/services/loadFilters.js +1 -2
- package/lib/services/migrateBookmarks.d.ts +1 -2
- package/lib/services/migrateBookmarks.js +0 -2
- package/lib/services/migrateOrderCart.d.ts +1 -2
- package/lib/services/migrateOrderCart.js +1 -7
- package/lib/services/migrateUserData.d.ts +0 -1
- package/lib/services/migrateUserData.js +2 -3
- package/lib/services/nextUserCart.d.ts +2 -3
- package/lib/services/nextUserCart.js +1 -2
- package/lib/services/processEnrollment.d.ts +2 -3
- package/lib/services/processEnrollment.js +1 -5
- package/lib/services/processOrder.d.ts +2 -3
- package/lib/services/processOrder.js +7 -27
- package/lib/services/processQuotation.d.ts +2 -3
- package/lib/services/processQuotation.js +2 -3
- package/lib/services/proposeQuotation.d.ts +2 -3
- package/lib/services/proposeQuotation.js +1 -2
- package/lib/services/registerPaymentCredentials.d.ts +2 -3
- package/lib/services/registerPaymentCredentials.js +1 -2
- package/lib/services/rejectOrder.d.ts +2 -3
- package/lib/services/rejectOrder.js +1 -2
- package/lib/services/rejectQuotation.d.ts +2 -3
- package/lib/services/rejectQuotation.js +1 -2
- package/lib/services/removeCartDiscount.d.ts +10 -0
- package/lib/services/removeCartDiscount.js +14 -0
- package/lib/services/removeFiles.d.ts +1 -2
- package/lib/services/removeFiles.js +1 -3
- package/lib/services/removeFilter.d.ts +5 -0
- package/lib/services/removeFilter.js +5 -0
- package/lib/services/removeProduct.d.ts +1 -2
- package/lib/services/removeProduct.js +1 -4
- package/lib/services/resolveOrderItemDispatches.d.ts +19 -0
- package/lib/services/resolveOrderItemDispatches.js +38 -0
- package/lib/services/resolveTokenStatus.d.ts +5 -0
- package/lib/services/resolveTokenStatus.js +15 -0
- package/lib/services/searchAssortments.d.ts +3 -4
- package/lib/services/searchAssortments.js +1 -2
- package/lib/services/searchProducts.d.ts +3 -4
- package/lib/services/searchProducts.js +1 -4
- package/lib/services/simulateConfigurablePriceRange.d.ts +13 -0
- package/lib/services/simulateConfigurablePriceRange.js +39 -0
- package/lib/services/simulateDeliveryPricing.d.ts +21 -0
- package/lib/services/simulateDeliveryPricing.js +23 -0
- package/lib/services/simulatePaymentPricing.d.ts +21 -0
- package/lib/services/simulatePaymentPricing.js +23 -0
- package/lib/services/simulateProductDispatching.d.ts +5 -6
- package/lib/services/simulateProductDispatching.js +2 -3
- package/lib/services/simulateProductInventory.d.ts +4 -5
- package/lib/services/simulateProductInventory.js +2 -3
- package/lib/services/simulateProductPricing.d.ts +5 -6
- package/lib/services/simulateProductPricing.js +1 -2
- package/lib/services/supportedDeliveryProviders.d.ts +3 -4
- package/lib/services/supportedDeliveryProviders.js +1 -2
- package/lib/services/supportedPaymentProviders.d.ts +3 -4
- package/lib/services/supportedPaymentProviders.js +1 -2
- package/lib/services/supportedWarehousingProviders.d.ts +3 -4
- package/lib/services/supportedWarehousingProviders.js +1 -2
- package/lib/services/terminateEnrollment.d.ts +1 -2
- package/lib/services/terminateEnrollment.js +2 -3
- package/lib/services/updateCalculation.d.ts +2 -3
- package/lib/services/updateCalculation.js +3 -20
- package/lib/services/updateScheduling.d.ts +2 -3
- package/lib/services/updateScheduling.js +2 -4
- package/lib/services/updateUserAvatarAfterUpload.d.ts +2 -3
- package/lib/services/updateUserAvatarAfterUpload.js +3 -5
- package/lib/services/uploadFileFromStream.d.ts +2 -3
- package/lib/services/uploadFileFromStream.js +0 -1
- package/lib/services/uploadFileFromURL.d.ts +1 -2
- package/lib/services/uploadFileFromURL.js +0 -1
- package/lib/services/validateOrder.d.ts +2 -3
- package/lib/services/validateOrder.js +0 -1
- package/lib/services/verifyQuotation.d.ts +2 -3
- package/lib/services/verifyQuotation.js +1 -2
- package/lib/utils/schedule.d.ts +22 -0
- package/lib/utils/schedule.js +148 -0
- package/package.json +28 -28
- package/lib/bulk-importer/createBulkImporter.d.ts.map +0 -1
- package/lib/bulk-importer/createBulkImporter.js.map +0 -1
- package/lib/bulk-importer/handlers/assortment/create.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/assortment/create.js.map +0 -1
- package/lib/bulk-importer/handlers/assortment/index.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/assortment/index.js.map +0 -1
- package/lib/bulk-importer/handlers/assortment/remove.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/assortment/remove.js.map +0 -1
- package/lib/bulk-importer/handlers/assortment/update.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/assortment/update.js.map +0 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js.map +0 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js.map +0 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js.map +0 -1
- package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/assortment/upsertMedia.js.map +0 -1
- package/lib/bulk-importer/handlers/filter/create.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/filter/create.js.map +0 -1
- package/lib/bulk-importer/handlers/filter/index.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/filter/index.js.map +0 -1
- package/lib/bulk-importer/handlers/filter/remove.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/filter/remove.js.map +0 -1
- package/lib/bulk-importer/handlers/filter/update.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/filter/update.js.map +0 -1
- package/lib/bulk-importer/handlers/product/create.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/product/create.js.map +0 -1
- package/lib/bulk-importer/handlers/product/index.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/product/index.js.map +0 -1
- package/lib/bulk-importer/handlers/product/remove.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/product/remove.js.map +0 -1
- package/lib/bulk-importer/handlers/product/update.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/product/update.js.map +0 -1
- package/lib/bulk-importer/handlers/product/upsertMedia.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/product/upsertMedia.js.map +0 -1
- package/lib/bulk-importer/handlers/product/upsertVariations.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/product/upsertVariations.js.map +0 -1
- package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.d.ts.map +0 -1
- package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.js.map +0 -1
- package/lib/bulk-importer/index.d.ts.map +0 -1
- package/lib/bulk-importer/index.js.map +0 -1
- package/lib/bulk-importer/upsertAsset.d.ts.map +0 -1
- package/lib/bulk-importer/upsertAsset.js.map +0 -1
- package/lib/core-index.d.ts.map +0 -1
- package/lib/core-index.js.map +0 -1
- package/lib/directors/BaseDiscountAdapter.d.ts.map +0 -1
- package/lib/directors/BaseDiscountAdapter.js.map +0 -1
- package/lib/directors/BaseDiscountDirector.d.ts.map +0 -1
- package/lib/directors/BaseDiscountDirector.js.map +0 -1
- package/lib/directors/BasePricingAdapter.d.ts.map +0 -1
- package/lib/directors/BasePricingAdapter.js.map +0 -1
- package/lib/directors/BasePricingDirector.d.ts.map +0 -1
- package/lib/directors/BasePricingDirector.js.map +0 -1
- package/lib/directors/BasePricingSheet.d.ts.map +0 -1
- package/lib/directors/BasePricingSheet.js.map +0 -1
- package/lib/directors/BaseWorker.d.ts.map +0 -1
- package/lib/directors/BaseWorker.js.map +0 -1
- package/lib/directors/DeliveryAdapter.d.ts.map +0 -1
- package/lib/directors/DeliveryAdapter.js.map +0 -1
- package/lib/directors/DeliveryDirector.d.ts.map +0 -1
- package/lib/directors/DeliveryDirector.js.map +0 -1
- package/lib/directors/DeliveryPricingAdapter.d.ts.map +0 -1
- package/lib/directors/DeliveryPricingAdapter.js.map +0 -1
- package/lib/directors/DeliveryPricingDirector.d.ts.map +0 -1
- package/lib/directors/DeliveryPricingDirector.js.map +0 -1
- package/lib/directors/DeliveryPricingSheet.d.ts.map +0 -1
- package/lib/directors/DeliveryPricingSheet.js.map +0 -1
- package/lib/directors/EnrollmentAdapter.d.ts.map +0 -1
- package/lib/directors/EnrollmentAdapter.js.map +0 -1
- package/lib/directors/EnrollmentDirector.d.ts.map +0 -1
- package/lib/directors/EnrollmentDirector.js.map +0 -1
- package/lib/directors/EventListenerWorker.d.ts.map +0 -1
- package/lib/directors/EventListenerWorker.js.map +0 -1
- package/lib/directors/FailedRescheduler.d.ts.map +0 -1
- package/lib/directors/FailedRescheduler.js.map +0 -1
- package/lib/directors/FilterAdapter.d.ts.map +0 -1
- package/lib/directors/FilterAdapter.js.map +0 -1
- package/lib/directors/FilterDirector.d.ts.map +0 -1
- package/lib/directors/FilterDirector.js.map +0 -1
- package/lib/directors/IntervalWorker.d.ts.map +0 -1
- package/lib/directors/IntervalWorker.js.map +0 -1
- package/lib/directors/MessagingDirector.d.ts.map +0 -1
- package/lib/directors/MessagingDirector.js.map +0 -1
- package/lib/directors/OrderDiscountAdapter.d.ts.map +0 -1
- package/lib/directors/OrderDiscountAdapter.js.map +0 -1
- package/lib/directors/OrderDiscountConfiguration.d.ts.map +0 -1
- package/lib/directors/OrderDiscountConfiguration.js.map +0 -1
- package/lib/directors/OrderDiscountDirector.d.ts.map +0 -1
- package/lib/directors/OrderDiscountDirector.js.map +0 -1
- package/lib/directors/OrderPricingAdapter.d.ts.map +0 -1
- package/lib/directors/OrderPricingAdapter.js.map +0 -1
- package/lib/directors/OrderPricingDirector.d.ts.map +0 -1
- package/lib/directors/OrderPricingDirector.js.map +0 -1
- package/lib/directors/OrderPricingSheet.d.ts.map +0 -1
- package/lib/directors/OrderPricingSheet.js.map +0 -1
- package/lib/directors/PaymentAdapter.d.ts.map +0 -1
- package/lib/directors/PaymentAdapter.js.map +0 -1
- package/lib/directors/PaymentDirector.d.ts.map +0 -1
- package/lib/directors/PaymentDirector.js.map +0 -1
- package/lib/directors/PaymentPricingAdapter.d.ts.map +0 -1
- package/lib/directors/PaymentPricingAdapter.js.map +0 -1
- package/lib/directors/PaymentPricingDirector.d.ts.map +0 -1
- package/lib/directors/PaymentPricingDirector.js.map +0 -1
- package/lib/directors/PaymentPricingSheet.d.ts.map +0 -1
- package/lib/directors/PaymentPricingSheet.js.map +0 -1
- package/lib/directors/ProductDiscountAdapter.d.ts.map +0 -1
- package/lib/directors/ProductDiscountAdapter.js.map +0 -1
- package/lib/directors/ProductDiscountConfiguration.d.ts.map +0 -1
- package/lib/directors/ProductDiscountConfiguration.js.map +0 -1
- package/lib/directors/ProductDiscountDirector.d.ts.map +0 -1
- package/lib/directors/ProductDiscountDirector.js.map +0 -1
- package/lib/directors/ProductPricingAdapter.d.ts.map +0 -1
- package/lib/directors/ProductPricingAdapter.js.map +0 -1
- package/lib/directors/ProductPricingDirector.d.ts.map +0 -1
- package/lib/directors/ProductPricingDirector.js.map +0 -1
- package/lib/directors/ProductPricingSheet.d.ts.map +0 -1
- package/lib/directors/ProductPricingSheet.js.map +0 -1
- package/lib/directors/QuotationAdapter.d.ts.map +0 -1
- package/lib/directors/QuotationAdapter.js.map +0 -1
- package/lib/directors/QuotationDirector.d.ts.map +0 -1
- package/lib/directors/QuotationDirector.js.map +0 -1
- package/lib/directors/WarehousingAdapter.d.ts.map +0 -1
- package/lib/directors/WarehousingAdapter.js.map +0 -1
- package/lib/directors/WarehousingDirector.d.ts.map +0 -1
- package/lib/directors/WarehousingDirector.js.map +0 -1
- package/lib/directors/WorkerAdapter.d.ts.map +0 -1
- package/lib/directors/WorkerAdapter.js.map +0 -1
- package/lib/directors/WorkerDirector.d.ts.map +0 -1
- package/lib/directors/WorkerDirector.js.map +0 -1
- package/lib/directors/index.d.ts.map +0 -1
- package/lib/directors/index.js.map +0 -1
- package/lib/factory/index.d.ts.map +0 -1
- package/lib/factory/index.js.map +0 -1
- package/lib/factory/registerAssortmentSearchFilter.d.ts.map +0 -1
- package/lib/factory/registerAssortmentSearchFilter.js.map +0 -1
- package/lib/factory/registerInvoicePayment.d.ts.map +0 -1
- package/lib/factory/registerInvoicePayment.js.map +0 -1
- package/lib/factory/registerPhysicalWarehousing.d.ts.map +0 -1
- package/lib/factory/registerPhysicalWarehousing.js.map +0 -1
- package/lib/factory/registerPickUpDelivery.d.ts.map +0 -1
- package/lib/factory/registerPickUpDelivery.js.map +0 -1
- package/lib/factory/registerProductDiscoverabilityFilter.d.ts.map +0 -1
- package/lib/factory/registerProductDiscoverabilityFilter.js.map +0 -1
- package/lib/factory/registerProductSearchFilter.d.ts.map +0 -1
- package/lib/factory/registerProductSearchFilter.js.map +0 -1
- package/lib/factory/registerShippingDelivery.d.ts.map +0 -1
- package/lib/factory/registerShippingDelivery.js.map +0 -1
- package/lib/factory/registerVirtualWarehousing.d.ts.map +0 -1
- package/lib/factory/registerVirtualWarehousing.js.map +0 -1
- package/lib/factory/registerWorker.d.ts.map +0 -1
- package/lib/factory/registerWorker.js.map +0 -1
- package/lib/modules.d.ts.map +0 -1
- package/lib/modules.js.map +0 -1
- package/lib/services/activateEnrollment.d.ts.map +0 -1
- package/lib/services/activateEnrollment.js.map +0 -1
- package/lib/services/addMessage.d.ts.map +0 -1
- package/lib/services/addMessage.js.map +0 -1
- package/lib/services/calculateDiscountTotal.d.ts.map +0 -1
- package/lib/services/calculateDiscountTotal.js.map +0 -1
- package/lib/services/checkoutOrder.d.ts.map +0 -1
- package/lib/services/checkoutOrder.js.map +0 -1
- package/lib/services/confirmOrder.d.ts.map +0 -1
- package/lib/services/confirmOrder.js.map +0 -1
- package/lib/services/createDownloadStream.d.ts.map +0 -1
- package/lib/services/createDownloadStream.js.map +0 -1
- package/lib/services/createEnrollmentFromCheckout.d.ts.map +0 -1
- package/lib/services/createEnrollmentFromCheckout.js.map +0 -1
- package/lib/services/createManualOrderDiscount.d.ts.map +0 -1
- package/lib/services/createManualOrderDiscount.js.map +0 -1
- package/lib/services/createSignedURL.d.ts.map +0 -1
- package/lib/services/createSignedURL.js.map +0 -1
- package/lib/services/deleteUser.d.ts.map +0 -1
- package/lib/services/deleteUser.js.map +0 -1
- package/lib/services/discountedEntities.d.ts.map +0 -1
- package/lib/services/discountedEntities.js.map +0 -1
- package/lib/services/ercMetadata.d.ts.map +0 -1
- package/lib/services/ercMetadata.js.map +0 -1
- package/lib/services/findOrInitCart.d.ts.map +0 -1
- package/lib/services/findOrInitCart.js.map +0 -1
- package/lib/services/fullfillQuotation.d.ts.map +0 -1
- package/lib/services/fullfillQuotation.js.map +0 -1
- package/lib/services/generateOrderFromEnrollment.d.ts.map +0 -1
- package/lib/services/generateOrderFromEnrollment.js.map +0 -1
- package/lib/services/index.d.ts.map +0 -1
- package/lib/services/index.js.map +0 -1
- package/lib/services/initCartProviders.d.ts.map +0 -1
- package/lib/services/initCartProviders.js.map +0 -1
- package/lib/services/initializeEnrollment.d.ts.map +0 -1
- package/lib/services/initializeEnrollment.js.map +0 -1
- package/lib/services/invalidateFilterCache.d.ts.map +0 -1
- package/lib/services/invalidateFilterCache.js.map +0 -1
- package/lib/services/linkFileService.d.ts.map +0 -1
- package/lib/services/linkFileService.js.map +0 -1
- package/lib/services/loadFilterOptions.d.ts.map +0 -1
- package/lib/services/loadFilterOptions.js.map +0 -1
- package/lib/services/loadFilters.d.ts.map +0 -1
- package/lib/services/loadFilters.js.map +0 -1
- package/lib/services/migrateBookmarks.d.ts.map +0 -1
- package/lib/services/migrateBookmarks.js.map +0 -1
- package/lib/services/migrateOrderCart.d.ts.map +0 -1
- package/lib/services/migrateOrderCart.js.map +0 -1
- package/lib/services/migrateUserData.d.ts.map +0 -1
- package/lib/services/migrateUserData.js.map +0 -1
- package/lib/services/nextUserCart.d.ts.map +0 -1
- package/lib/services/nextUserCart.js.map +0 -1
- package/lib/services/processEnrollment.d.ts.map +0 -1
- package/lib/services/processEnrollment.js.map +0 -1
- package/lib/services/processOrder.d.ts.map +0 -1
- package/lib/services/processOrder.js.map +0 -1
- package/lib/services/processQuotation.d.ts.map +0 -1
- package/lib/services/processQuotation.js.map +0 -1
- package/lib/services/proposeQuotation.d.ts.map +0 -1
- package/lib/services/proposeQuotation.js.map +0 -1
- package/lib/services/registerPaymentCredentials.d.ts.map +0 -1
- package/lib/services/registerPaymentCredentials.js.map +0 -1
- package/lib/services/rejectOrder.d.ts.map +0 -1
- package/lib/services/rejectOrder.js.map +0 -1
- package/lib/services/rejectQuotation.d.ts.map +0 -1
- package/lib/services/rejectQuotation.js.map +0 -1
- package/lib/services/removeFiles.d.ts.map +0 -1
- package/lib/services/removeFiles.js.map +0 -1
- package/lib/services/removeProduct.d.ts.map +0 -1
- package/lib/services/removeProduct.js.map +0 -1
- package/lib/services/searchAssortments.d.ts.map +0 -1
- package/lib/services/searchAssortments.js.map +0 -1
- package/lib/services/searchProducts.d.ts.map +0 -1
- package/lib/services/searchProducts.js.map +0 -1
- package/lib/services/simulateProductDispatching.d.ts.map +0 -1
- package/lib/services/simulateProductDispatching.js.map +0 -1
- package/lib/services/simulateProductInventory.d.ts.map +0 -1
- package/lib/services/simulateProductInventory.js.map +0 -1
- package/lib/services/simulateProductPricing.d.ts.map +0 -1
- package/lib/services/simulateProductPricing.js.map +0 -1
- package/lib/services/supportedDeliveryProviders.d.ts.map +0 -1
- package/lib/services/supportedDeliveryProviders.js.map +0 -1
- package/lib/services/supportedPaymentProviders.d.ts.map +0 -1
- package/lib/services/supportedPaymentProviders.js.map +0 -1
- package/lib/services/supportedWarehousingProviders.d.ts.map +0 -1
- package/lib/services/supportedWarehousingProviders.js.map +0 -1
- package/lib/services/terminateEnrollment.d.ts.map +0 -1
- package/lib/services/terminateEnrollment.js.map +0 -1
- package/lib/services/updateCalculation.d.ts.map +0 -1
- package/lib/services/updateCalculation.js.map +0 -1
- package/lib/services/updateScheduling.d.ts.map +0 -1
- package/lib/services/updateScheduling.js.map +0 -1
- package/lib/services/updateUserAvatarAfterUpload.d.ts.map +0 -1
- package/lib/services/updateUserAvatarAfterUpload.js.map +0 -1
- package/lib/services/uploadFileFromStream.d.ts.map +0 -1
- package/lib/services/uploadFileFromStream.js.map +0 -1
- package/lib/services/uploadFileFromURL.d.ts.map +0 -1
- package/lib/services/uploadFileFromURL.js.map +0 -1
- package/lib/services/validateOrder.d.ts.map +0 -1
- package/lib/services/validateOrder.js.map +0 -1
- package/lib/services/verifyQuotation.d.ts.map +0 -1
- package/lib/services/verifyQuotation.js.map +0 -1
- package/src/bulk-importer/createBulkImporter.ts +0 -205
- package/src/bulk-importer/handlers/assortment/create.ts +0 -118
- package/src/bulk-importer/handlers/assortment/index.ts +0 -3
- package/src/bulk-importer/handlers/assortment/remove.ts +0 -26
- package/src/bulk-importer/handlers/assortment/update.ts +0 -133
- package/src/bulk-importer/handlers/assortment/upsertAssortmentChildren.ts +0 -77
- package/src/bulk-importer/handlers/assortment/upsertAssortmentFilters.ts +0 -70
- package/src/bulk-importer/handlers/assortment/upsertAssortmentProducts.ts +0 -76
- package/src/bulk-importer/handlers/assortment/upsertMedia.ts +0 -76
- package/src/bulk-importer/handlers/filter/create.ts +0 -104
- package/src/bulk-importer/handlers/filter/index.ts +0 -3
- package/src/bulk-importer/handlers/filter/remove.ts +0 -25
- package/src/bulk-importer/handlers/filter/update.ts +0 -94
- package/src/bulk-importer/handlers/product/create.ts +0 -170
- package/src/bulk-importer/handlers/product/index.ts +0 -3
- package/src/bulk-importer/handlers/product/remove.ts +0 -27
- package/src/bulk-importer/handlers/product/update.ts +0 -175
- package/src/bulk-importer/handlers/product/upsertMedia.ts +0 -81
- package/src/bulk-importer/handlers/product/upsertVariations.ts +0 -110
- package/src/bulk-importer/handlers/utils/convertTagsToLowerCase.ts +0 -4
- package/src/bulk-importer/index.ts +0 -3
- package/src/bulk-importer/upsertAsset.ts +0 -53
- package/src/core-index.ts +0 -103
- package/src/directors/BaseDiscountAdapter.test.ts +0 -52
- package/src/directors/BaseDiscountAdapter.ts +0 -86
- package/src/directors/BaseDiscountDirector.ts +0 -73
- package/src/directors/BasePricingAdapter.ts +0 -74
- package/src/directors/BasePricingDirector.ts +0 -136
- package/src/directors/BasePricingSheet.test.ts +0 -45
- package/src/directors/BasePricingSheet.ts +0 -141
- package/src/directors/BaseWorker.ts +0 -117
- package/src/directors/DeliveryAdapter.ts +0 -106
- package/src/directors/DeliveryDirector.ts +0 -143
- package/src/directors/DeliveryPricingAdapter.ts +0 -87
- package/src/directors/DeliveryPricingDirector.ts +0 -91
- package/src/directors/DeliveryPricingSheet.ts +0 -87
- package/src/directors/EnrollmentAdapter.ts +0 -108
- package/src/directors/EnrollmentDirector.ts +0 -71
- package/src/directors/EventListenerWorker.ts +0 -101
- package/src/directors/FailedRescheduler.ts +0 -73
- package/src/directors/FilterAdapter.ts +0 -106
- package/src/directors/FilterDirector.ts +0 -314
- package/src/directors/IntervalWorker.ts +0 -75
- package/src/directors/MessagingDirector.test.ts +0 -8
- package/src/directors/MessagingDirector.ts +0 -52
- package/src/directors/OrderDiscountAdapter.ts +0 -10
- package/src/directors/OrderDiscountConfiguration.ts +0 -5
- package/src/directors/OrderDiscountDirector.ts +0 -5
- package/src/directors/OrderPricingAdapter.ts +0 -63
- package/src/directors/OrderPricingDirector.ts +0 -74
- package/src/directors/OrderPricingSheet.ts +0 -148
- package/src/directors/PaymentAdapter.ts +0 -118
- package/src/directors/PaymentDirector.ts +0 -297
- package/src/directors/PaymentPricingAdapter.ts +0 -86
- package/src/directors/PaymentPricingDirector.ts +0 -92
- package/src/directors/PaymentPricingSheet.ts +0 -92
- package/src/directors/ProductDiscountAdapter.ts +0 -10
- package/src/directors/ProductDiscountConfiguration.ts +0 -18
- package/src/directors/ProductDiscountDirector.ts +0 -4
- package/src/directors/ProductPricingAdapter.ts +0 -58
- package/src/directors/ProductPricingDirector.ts +0 -100
- package/src/directors/ProductPricingSheet.test.ts +0 -140
- package/src/directors/ProductPricingSheet.ts +0 -125
- package/src/directors/QuotationAdapter.ts +0 -82
- package/src/directors/QuotationDirector.ts +0 -105
- package/src/directors/WarehousingAdapter.ts +0 -77
- package/src/directors/WarehousingDirector.ts +0 -233
- package/src/directors/WorkerAdapter.ts +0 -31
- package/src/directors/WorkerDirector.ts +0 -149
- package/src/directors/index.ts +0 -53
- package/src/directors/periodForReferenceDate.test.ts +0 -25
- package/src/factory/index.ts +0 -21
- package/src/factory/registerAssortmentSearchFilter.ts +0 -36
- package/src/factory/registerInvoicePayment.ts +0 -61
- package/src/factory/registerPhysicalWarehousing.ts +0 -92
- package/src/factory/registerPickUpDelivery.ts +0 -81
- package/src/factory/registerProductDiscoverabilityFilter.ts +0 -36
- package/src/factory/registerProductSearchFilter.ts +0 -36
- package/src/factory/registerShippingDelivery.ts +0 -65
- package/src/factory/registerVirtualWarehousing.ts +0 -100
- package/src/factory/registerWorker.ts +0 -46
- package/src/modules.ts +0 -207
- package/src/services/activateEnrollment.ts +0 -26
- package/src/services/addMessage.ts +0 -20
- package/src/services/calculateDiscountTotal.ts +0 -71
- package/src/services/checkoutOrder.ts +0 -48
- package/src/services/confirmOrder.ts +0 -26
- package/src/services/createDownloadStream.ts +0 -17
- package/src/services/createEnrollmentFromCheckout.ts +0 -68
- package/src/services/createManualOrderDiscount.ts +0 -56
- package/src/services/createSignedURL.ts +0 -21
- package/src/services/deleteUser.ts +0 -48
- package/src/services/discountedEntities.ts +0 -81
- package/src/services/ercMetadata.ts +0 -25
- package/src/services/findOrInitCart.ts +0 -28
- package/src/services/fullfillQuotation.ts +0 -14
- package/src/services/generateOrderFromEnrollment.ts +0 -54
- package/src/services/index.ts +0 -173
- package/src/services/initCartProviders.ts +0 -84
- package/src/services/initializeEnrollment.ts +0 -41
- package/src/services/invalidateFilterCache.ts +0 -16
- package/src/services/linkFileService.ts +0 -24
- package/src/services/loadFilterOptions.ts +0 -49
- package/src/services/loadFilters.ts +0 -62
- package/src/services/migrateBookmarks.ts +0 -39
- package/src/services/migrateOrderCart.ts +0 -52
- package/src/services/migrateUserData.ts +0 -22
- package/src/services/nextUserCart.ts +0 -52
- package/src/services/processEnrollment.ts +0 -49
- package/src/services/processOrder.ts +0 -243
- package/src/services/processQuotation.ts +0 -71
- package/src/services/proposeQuotation.ts +0 -18
- package/src/services/registerPaymentCredentials.ts +0 -28
- package/src/services/rejectOrder.ts +0 -26
- package/src/services/rejectQuotation.ts +0 -18
- package/src/services/removeFiles.ts +0 -25
- package/src/services/removeProduct.ts +0 -39
- package/src/services/searchAssortments.ts +0 -57
- package/src/services/searchProducts.ts +0 -71
- package/src/services/simulateProductDispatching.ts +0 -58
- package/src/services/simulateProductInventory.ts +0 -59
- package/src/services/simulateProductPricing.ts +0 -23
- package/src/services/supportedDeliveryProviders.ts +0 -24
- package/src/services/supportedPaymentProviders.ts +0 -25
- package/src/services/supportedWarehousingProviders.ts +0 -18
- package/src/services/terminateEnrollment.ts +0 -25
- package/src/services/updateCalculation.ts +0 -159
- package/src/services/updateScheduling.ts +0 -63
- package/src/services/updateUserAvatarAfterUpload.ts +0 -33
- package/src/services/uploadFileFromStream.ts +0 -27
- package/src/services/uploadFileFromURL.ts +0 -29
- package/src/services/validateOrder.ts +0 -49
- package/src/services/verifyQuotation.ts +0 -18
- package/tsconfig.json +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultAssortmentSelector, defaultFilterSelector, defaultSortStage, } from '@unchainedshop/core-filters';
|
|
2
|
-
import { FilterDirector } from
|
|
2
|
+
import { FilterDirector } from "../directors/index.js";
|
|
3
3
|
export async function searchAssortmentsService(searchQuery, options) {
|
|
4
4
|
const filterActions = await FilterDirector.actions({ searchQuery }, { modules: this });
|
|
5
5
|
const filterSelector = await filterActions.transformFilterSelector(defaultFilterSelector(searchQuery), options);
|
|
@@ -32,4 +32,3 @@ export async function searchAssortmentsService(searchQuery, options) {
|
|
|
32
32
|
}),
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=searchAssortments.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SearchQuery } from '@unchainedshop/core-filters';
|
|
2
|
-
import { Modules } from '../modules.
|
|
3
|
-
import { SearchProductsOptions } from '../directors/index.
|
|
1
|
+
import { type SearchQuery } from '@unchainedshop/core-filters';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
|
+
import { type SearchProductsOptions } from '../directors/index.ts';
|
|
4
4
|
export declare function searchProductsService(this: Modules, searchQuery: SearchQuery, options: {
|
|
5
5
|
forceLiveCollection?: boolean;
|
|
6
6
|
locale: Intl.Locale;
|
|
@@ -11,4 +11,3 @@ export declare function searchProductsService(this: Modules, searchQuery: Search
|
|
|
11
11
|
aggregatedTotalProductIds: string[];
|
|
12
12
|
aggregatedFilteredProductIds: string[];
|
|
13
13
|
}>;
|
|
14
|
-
//# sourceMappingURL=searchProducts.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultFilterSelector, defaultProductSelector, defaultSortStage, } from '@unchainedshop/core-filters';
|
|
2
|
-
import { FilterDirector } from
|
|
2
|
+
import { FilterDirector } from "../directors/index.js";
|
|
3
3
|
export async function searchProductsService(searchQuery, options) {
|
|
4
4
|
const filterActions = await FilterDirector.actions({ searchQuery }, { modules: this });
|
|
5
5
|
const filterSelector = await filterActions.transformFilterSelector(defaultFilterSelector(searchQuery), options);
|
|
@@ -14,8 +14,6 @@ export async function searchProductsService(searchQuery, options) {
|
|
|
14
14
|
forceLiveCollection: !!options.forceLiveCollection,
|
|
15
15
|
};
|
|
16
16
|
if (searchQuery.productIds?.length === 0) {
|
|
17
|
-
// Restricted to an empty array of products
|
|
18
|
-
// will always lead to an empty result
|
|
19
17
|
return {
|
|
20
18
|
searchConfiguration,
|
|
21
19
|
aggregatedTotalProductIds: [],
|
|
@@ -39,4 +37,3 @@ export async function searchProductsService(searchQuery, options) {
|
|
|
39
37
|
aggregatedFilteredProductIds,
|
|
40
38
|
};
|
|
41
39
|
}
|
|
42
|
-
//# sourceMappingURL=searchProducts.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Product, ProductConfiguration, ProductPriceRange } from '@unchainedshop/core-products';
|
|
2
|
+
import type { User } from '@unchainedshop/core-users';
|
|
3
|
+
import type { Modules } from '../modules.ts';
|
|
4
|
+
export declare function simulateConfigurablePriceRangeService(this: Modules, { product, currencyCode, countryCode, quantity, useNetPrice, vectors, includeInactive, user, }: {
|
|
5
|
+
product: Product;
|
|
6
|
+
currencyCode: string;
|
|
7
|
+
countryCode: string;
|
|
8
|
+
quantity?: number;
|
|
9
|
+
useNetPrice?: boolean;
|
|
10
|
+
vectors?: ProductConfiguration[];
|
|
11
|
+
includeInactive?: boolean;
|
|
12
|
+
user?: User;
|
|
13
|
+
}): Promise<ProductPriceRange | null>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ProductPricingDirector } from "../core-index.js";
|
|
2
|
+
export async function simulateConfigurablePriceRangeService({ product, currencyCode, countryCode, quantity = 1, useNetPrice = false, vectors, includeInactive = false, user, }) {
|
|
3
|
+
const products = await this.products.proxyProducts(product, vectors, {
|
|
4
|
+
includeInactive,
|
|
5
|
+
});
|
|
6
|
+
const filteredPrices = (await Promise.all(products.map(async (proxyProduct) => {
|
|
7
|
+
const pricingContext = {
|
|
8
|
+
product: proxyProduct,
|
|
9
|
+
user,
|
|
10
|
+
countryCode,
|
|
11
|
+
discounts: [],
|
|
12
|
+
currencyCode,
|
|
13
|
+
quantity,
|
|
14
|
+
};
|
|
15
|
+
const calculated = await ProductPricingDirector.rebuildCalculation(pricingContext, {
|
|
16
|
+
modules: this,
|
|
17
|
+
});
|
|
18
|
+
if (!calculated || !calculated.length)
|
|
19
|
+
return null;
|
|
20
|
+
const pricing = ProductPricingDirector.calculationSheet(pricingContext, calculated);
|
|
21
|
+
const unitPrice = pricing.unitPrice({ useNetPrice });
|
|
22
|
+
return {
|
|
23
|
+
...unitPrice,
|
|
24
|
+
isNetPrice: useNetPrice,
|
|
25
|
+
isTaxable: pricing.taxSum() > 0,
|
|
26
|
+
currencyCode: pricing.currencyCode,
|
|
27
|
+
};
|
|
28
|
+
}))).filter(Boolean);
|
|
29
|
+
if (!filteredPrices.length)
|
|
30
|
+
return null;
|
|
31
|
+
const { minPrice, maxPrice } = this.products.prices.priceRange({
|
|
32
|
+
productId: product._id,
|
|
33
|
+
prices: filteredPrices,
|
|
34
|
+
});
|
|
35
|
+
return {
|
|
36
|
+
minPrice,
|
|
37
|
+
maxPrice,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DeliveryProvider } from '@unchainedshop/core-delivery';
|
|
2
|
+
import type { Order } from '@unchainedshop/core-orders';
|
|
3
|
+
import type { User } from '@unchainedshop/core-users';
|
|
4
|
+
import type { Modules } from '../modules.ts';
|
|
5
|
+
export interface SimulatedDeliveryPrice {
|
|
6
|
+
amount: number;
|
|
7
|
+
currencyCode: string;
|
|
8
|
+
countryCode: string;
|
|
9
|
+
isTaxable: boolean;
|
|
10
|
+
isNetPrice: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function simulateDeliveryPricingService(this: Modules, pricingContext: {
|
|
13
|
+
currencyCode: string;
|
|
14
|
+
countryCode: string;
|
|
15
|
+
provider: DeliveryProvider;
|
|
16
|
+
providerContext?: any;
|
|
17
|
+
order?: Order;
|
|
18
|
+
user: User;
|
|
19
|
+
}, options?: {
|
|
20
|
+
useNetPrice?: boolean;
|
|
21
|
+
}): Promise<SimulatedDeliveryPrice | null>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DeliveryPricingDirector } from "../core-index.js";
|
|
2
|
+
export async function simulateDeliveryPricingService(pricingContext, options = {}) {
|
|
3
|
+
const context = {
|
|
4
|
+
currencyCode: pricingContext.currencyCode,
|
|
5
|
+
countryCode: pricingContext.countryCode,
|
|
6
|
+
provider: pricingContext.provider,
|
|
7
|
+
providerContext: pricingContext.providerContext,
|
|
8
|
+
order: pricingContext.order,
|
|
9
|
+
user: pricingContext.user,
|
|
10
|
+
};
|
|
11
|
+
const calculated = await DeliveryPricingDirector.rebuildCalculation(context, { modules: this });
|
|
12
|
+
if (!calculated?.length)
|
|
13
|
+
return null;
|
|
14
|
+
const pricing = DeliveryPricingDirector.calculationSheet(context, calculated);
|
|
15
|
+
const orderPrice = pricing.total({ useNetPrice: options.useNetPrice });
|
|
16
|
+
return {
|
|
17
|
+
amount: orderPrice.amount,
|
|
18
|
+
currencyCode: orderPrice.currencyCode,
|
|
19
|
+
countryCode: pricingContext.countryCode,
|
|
20
|
+
isTaxable: pricing.taxSum() > 0,
|
|
21
|
+
isNetPrice: options.useNetPrice || false,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PaymentProvider } from '@unchainedshop/core-payment';
|
|
2
|
+
import type { Order } from '@unchainedshop/core-orders';
|
|
3
|
+
import type { User } from '@unchainedshop/core-users';
|
|
4
|
+
import type { Modules } from '../modules.ts';
|
|
5
|
+
export interface SimulatedPaymentPrice {
|
|
6
|
+
amount: number;
|
|
7
|
+
currencyCode: string;
|
|
8
|
+
countryCode: string;
|
|
9
|
+
isTaxable: boolean;
|
|
10
|
+
isNetPrice: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function simulatePaymentPricingService(this: Modules, pricingContext: {
|
|
13
|
+
currencyCode: string;
|
|
14
|
+
countryCode: string;
|
|
15
|
+
provider: PaymentProvider;
|
|
16
|
+
providerContext?: any;
|
|
17
|
+
order?: Order;
|
|
18
|
+
user: User;
|
|
19
|
+
}, options?: {
|
|
20
|
+
useNetPrice?: boolean;
|
|
21
|
+
}): Promise<SimulatedPaymentPrice | null>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PaymentPricingDirector } from "../core-index.js";
|
|
2
|
+
export async function simulatePaymentPricingService(pricingContext, options = {}) {
|
|
3
|
+
const context = {
|
|
4
|
+
currencyCode: pricingContext.currencyCode,
|
|
5
|
+
countryCode: pricingContext.countryCode,
|
|
6
|
+
provider: pricingContext.provider,
|
|
7
|
+
providerContext: pricingContext.providerContext,
|
|
8
|
+
order: pricingContext.order,
|
|
9
|
+
user: pricingContext.user,
|
|
10
|
+
};
|
|
11
|
+
const calculated = await PaymentPricingDirector.rebuildCalculation(context, { modules: this });
|
|
12
|
+
if (!calculated?.length)
|
|
13
|
+
return null;
|
|
14
|
+
const pricing = PaymentPricingDirector.calculationSheet(context, calculated);
|
|
15
|
+
const orderPrice = pricing.total({ useNetPrice: options.useNetPrice });
|
|
16
|
+
return {
|
|
17
|
+
amount: orderPrice.amount,
|
|
18
|
+
currencyCode: orderPrice.currencyCode,
|
|
19
|
+
countryCode: pricingContext.countryCode,
|
|
20
|
+
isTaxable: pricing.taxSum() > 0,
|
|
21
|
+
isNetPrice: options.useNetPrice || false,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
2
|
-
import { Product } from '@unchainedshop/core-products';
|
|
3
|
-
import { EstimatedDispatch } from '../directors/WarehousingDirector.
|
|
4
|
-
import { WarehousingContext } from '../directors/WarehousingAdapter.
|
|
5
|
-
import { WarehousingProvider } from '@unchainedshop/core-warehousing';
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
|
+
import type { Product } from '@unchainedshop/core-products';
|
|
3
|
+
import { type EstimatedDispatch } from '../directors/WarehousingDirector.ts';
|
|
4
|
+
import type { WarehousingContext } from '../directors/WarehousingAdapter.ts';
|
|
5
|
+
import type { WarehousingProvider } from '@unchainedshop/core-warehousing';
|
|
6
6
|
export declare function simulateProductDispatchingService(this: Modules, { product, quantity, referenceDate, }: {
|
|
7
7
|
product: Product;
|
|
8
8
|
quantity: number;
|
|
@@ -10,4 +10,3 @@ export declare function simulateProductDispatchingService(this: Modules, { produ
|
|
|
10
10
|
}): Promise<(WarehousingContext & EstimatedDispatch & {
|
|
11
11
|
warehousingProvider: WarehousingProvider;
|
|
12
12
|
})[]>;
|
|
13
|
-
//# sourceMappingURL=simulateProductDispatching.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { supportedWarehousingProvidersService } from
|
|
2
|
-
import { WarehousingDirector } from
|
|
1
|
+
import { supportedWarehousingProvidersService } from "./supportedWarehousingProviders.js";
|
|
2
|
+
import { WarehousingDirector } from "../directors/WarehousingDirector.js";
|
|
3
3
|
export async function simulateProductDispatchingService({ product, quantity, referenceDate, }) {
|
|
4
4
|
const deliveryProviders = await this.delivery.allProviders();
|
|
5
5
|
return deliveryProviders.reduce(async (oldResult, deliveryProvider) => {
|
|
@@ -28,4 +28,3 @@ export async function simulateProductDispatchingService({ product, quantity, ref
|
|
|
28
28
|
return result.concat(result, mappedWarehousingProviders);
|
|
29
29
|
}, Promise.resolve([]));
|
|
30
30
|
}
|
|
31
|
-
//# sourceMappingURL=simulateProductDispatching.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
2
|
-
import { Product } from '@unchainedshop/core-products';
|
|
3
|
-
import { WarehousingContext } from '../directors/WarehousingAdapter.
|
|
4
|
-
import { WarehousingProvider } from '@unchainedshop/core-warehousing';
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
|
+
import type { Product } from '@unchainedshop/core-products';
|
|
3
|
+
import type { WarehousingContext } from '../directors/WarehousingAdapter.ts';
|
|
4
|
+
import type { WarehousingProvider } from '@unchainedshop/core-warehousing';
|
|
5
5
|
export declare function simulateProductInventoryService(this: Modules, { product, referenceDate, }: {
|
|
6
6
|
product: Product;
|
|
7
7
|
referenceDate?: Date;
|
|
@@ -10,4 +10,3 @@ export declare function simulateProductInventoryService(this: Modules, { product
|
|
|
10
10
|
} & {
|
|
11
11
|
warehousingProvider: WarehousingProvider;
|
|
12
12
|
})[]>;
|
|
13
|
-
//# sourceMappingURL=simulateProductInventory.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { supportedWarehousingProvidersService } from
|
|
2
|
-
import { WarehousingDirector } from
|
|
1
|
+
import { supportedWarehousingProvidersService } from "./supportedWarehousingProviders.js";
|
|
2
|
+
import { WarehousingDirector } from "../directors/WarehousingDirector.js";
|
|
3
3
|
export async function simulateProductInventoryService({ product, referenceDate, }) {
|
|
4
4
|
const deliveryProviders = await this.delivery.allProviders();
|
|
5
5
|
return deliveryProviders.reduce(async (oldResult, deliveryProvider) => {
|
|
@@ -27,4 +27,3 @@ export async function simulateProductInventoryService({ product, referenceDate,
|
|
|
27
27
|
return result.concat(result, mappedWarehousingProviders);
|
|
28
28
|
}, Promise.resolve([]));
|
|
29
29
|
}
|
|
30
|
-
//# sourceMappingURL=simulateProductInventory.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Product, ProductConfiguration } from '@unchainedshop/core-products';
|
|
2
|
-
import { User } from '@unchainedshop/core-users';
|
|
3
|
-
import { Modules } from '../modules.
|
|
4
|
-
import { Order, OrderDiscount } from '@unchainedshop/core-orders';
|
|
1
|
+
import type { Product, ProductConfiguration } from '@unchainedshop/core-products';
|
|
2
|
+
import type { User } from '@unchainedshop/core-users';
|
|
3
|
+
import type { Modules } from '../modules.ts';
|
|
4
|
+
import type { Order, OrderDiscount } from '@unchainedshop/core-orders';
|
|
5
5
|
export declare function simulateProductPricingService(this: Modules, pricingContext: {
|
|
6
6
|
currencyCode: string;
|
|
7
7
|
countryCode: string;
|
|
@@ -11,5 +11,4 @@ export declare function simulateProductPricingService(this: Modules, pricingCont
|
|
|
11
11
|
product: Product;
|
|
12
12
|
configuration?: ProductConfiguration[];
|
|
13
13
|
user?: User;
|
|
14
|
-
}): Promise<import("../core-index.
|
|
15
|
-
//# sourceMappingURL=simulateProductPricing.d.ts.map
|
|
14
|
+
}): Promise<import("../core-index.ts").IProductPricingSheet | null>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ProductPricingDirector } from
|
|
1
|
+
import { ProductPricingDirector } from "../core-index.js";
|
|
2
2
|
export async function simulateProductPricingService(pricingContext) {
|
|
3
3
|
const calculated = await ProductPricingDirector.rebuildCalculation(pricingContext, { modules: this });
|
|
4
4
|
if (!calculated || !calculated.length)
|
|
5
5
|
return null;
|
|
6
6
|
return ProductPricingDirector.calculationSheet(pricingContext, calculated);
|
|
7
7
|
}
|
|
8
|
-
//# sourceMappingURL=simulateProductPricing.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DeliveryProvider } from '@unchainedshop/core-delivery';
|
|
2
|
-
import { Modules } from '../modules.
|
|
3
|
-
import { DeliveryContext } from '../directors/index.
|
|
1
|
+
import { type DeliveryProvider } from '@unchainedshop/core-delivery';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
|
+
import { type DeliveryContext } from '../directors/index.ts';
|
|
4
4
|
export declare function supportedDeliveryProvidersService(this: Modules, params: DeliveryContext): Promise<DeliveryProvider[]>;
|
|
5
|
-
//# sourceMappingURL=supportedDeliveryProviders.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { deliverySettings } from '@unchainedshop/core-delivery';
|
|
2
|
-
import { DeliveryDirector } from
|
|
2
|
+
import { DeliveryDirector } from "../directors/index.js";
|
|
3
3
|
export async function supportedDeliveryProvidersService(params) {
|
|
4
4
|
const allProviders = await this.delivery.allProviders();
|
|
5
5
|
const providers = (await Promise.all(allProviders.map(async (provider) => {
|
|
@@ -11,4 +11,3 @@ export async function supportedDeliveryProvidersService(params) {
|
|
|
11
11
|
order: params.order,
|
|
12
12
|
}, { modules: this });
|
|
13
13
|
}
|
|
14
|
-
//# sourceMappingURL=supportedDeliveryProviders.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PaymentProvider } from '@unchainedshop/core-payment';
|
|
2
|
-
import { PaymentContext } from '../directors/PaymentAdapter.
|
|
3
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type PaymentProvider } from '@unchainedshop/core-payment';
|
|
2
|
+
import type { PaymentContext } from '../directors/PaymentAdapter.ts';
|
|
3
|
+
import type { Modules } from '../modules.ts';
|
|
4
4
|
export declare function supportedPaymentProvidersService(this: Modules, params: PaymentContext): Promise<PaymentProvider[]>;
|
|
5
|
-
//# sourceMappingURL=supportedPaymentProviders.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { paymentSettings } from '@unchainedshop/core-payment';
|
|
2
|
-
import { PaymentDirector } from
|
|
2
|
+
import { PaymentDirector } from "../directors/PaymentDirector.js";
|
|
3
3
|
export async function supportedPaymentProvidersService(params) {
|
|
4
4
|
const allProviders = await this.payment.paymentProviders.allProviders();
|
|
5
5
|
const providers = (await Promise.all(allProviders.map(async (provider) => {
|
|
@@ -11,4 +11,3 @@ export async function supportedPaymentProvidersService(params) {
|
|
|
11
11
|
order: params.order,
|
|
12
12
|
}, { modules: this });
|
|
13
13
|
}
|
|
14
|
-
//# sourceMappingURL=supportedPaymentProviders.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { WarehousingProvider } from '@unchainedshop/core-warehousing';
|
|
2
|
-
import { WarehousingContext } from '../directors/index.
|
|
3
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { WarehousingProvider } from '@unchainedshop/core-warehousing';
|
|
2
|
+
import { type WarehousingContext } from '../directors/index.ts';
|
|
3
|
+
import type { Modules } from '../modules.ts';
|
|
4
4
|
export declare function supportedWarehousingProvidersService(this: Modules, params: WarehousingContext): Promise<WarehousingProvider[]>;
|
|
5
|
-
//# sourceMappingURL=supportedWarehousingProviders.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WarehousingDirector } from
|
|
1
|
+
import { WarehousingDirector } from "../directors/index.js";
|
|
2
2
|
export async function supportedWarehousingProvidersService(params) {
|
|
3
3
|
const allProviders = await this.warehousing.allProviders();
|
|
4
4
|
const providers = (await Promise.all(allProviders.map(async (provider) => {
|
|
@@ -7,4 +7,3 @@ export async function supportedWarehousingProvidersService(params) {
|
|
|
7
7
|
}))).flat();
|
|
8
8
|
return providers;
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=supportedWarehousingProviders.js.map
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { Enrollment } from '@unchainedshop/core-enrollments';
|
|
1
|
+
import { type Enrollment } from '@unchainedshop/core-enrollments';
|
|
2
2
|
export declare function terminateEnrollmentService(enrollment: Enrollment): Promise<any>;
|
|
3
|
-
//# sourceMappingURL=terminateEnrollment.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EnrollmentStatus } from '@unchainedshop/core-enrollments';
|
|
2
|
-
import { processEnrollmentService } from
|
|
3
|
-
import { addMessageService } from
|
|
2
|
+
import { processEnrollmentService } from "./processEnrollment.js";
|
|
3
|
+
import { addMessageService } from "./addMessage.js";
|
|
4
4
|
export async function terminateEnrollmentService(enrollment) {
|
|
5
5
|
if (enrollment.status === EnrollmentStatus.TERMINATED)
|
|
6
6
|
return enrollment;
|
|
@@ -18,4 +18,3 @@ export async function terminateEnrollmentService(enrollment) {
|
|
|
18
18
|
});
|
|
19
19
|
return updatedEnrollment;
|
|
20
20
|
}
|
|
21
|
-
//# sourceMappingURL=terminateEnrollment.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Order } from '@unchainedshop/core-orders';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type Order } from '@unchainedshop/core-orders';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function updateCalculationService(this: Modules, orderId: string): Promise<Order>;
|
|
4
|
-
//# sourceMappingURL=updateCalculation.d.ts.map
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { OrderDiscountTrigger, } from '@unchainedshop/core-orders';
|
|
2
|
-
import { initCartProvidersService } from
|
|
3
|
-
import { updateSchedulingService } from
|
|
4
|
-
import { OrderDiscountDirector, OrderPricingDirector, DeliveryPricingDirector, ProductPricingDirector, PaymentPricingDirector, } from
|
|
2
|
+
import { initCartProvidersService } from "./initCartProviders.js";
|
|
3
|
+
import { updateSchedulingService } from "./updateScheduling.js";
|
|
4
|
+
import { OrderDiscountDirector, OrderPricingDirector, DeliveryPricingDirector, ProductPricingDirector, PaymentPricingDirector, } from "../directors/index.js";
|
|
5
5
|
export async function updateCalculationService(orderId) {
|
|
6
6
|
let order = await this.orders.findOrder({ orderId });
|
|
7
7
|
if (!order)
|
|
8
8
|
throw new Error('Order not found');
|
|
9
|
-
// Don't recalculate orders, only carts
|
|
10
9
|
if (order.status !== null)
|
|
11
10
|
return order;
|
|
12
|
-
// 1. go through existing order-discounts and check if discount still valid,
|
|
13
|
-
// those who are not valid anymore should get removed
|
|
14
11
|
const discounts = await this.orders.discounts.findOrderDiscounts({
|
|
15
12
|
orderId: order._id,
|
|
16
13
|
});
|
|
@@ -37,7 +34,6 @@ export async function updateCalculationService(orderId) {
|
|
|
37
34
|
await this.orders.discounts.delete(orderDiscount._id);
|
|
38
35
|
}
|
|
39
36
|
}));
|
|
40
|
-
// 2. run auto-system discount
|
|
41
37
|
const cleanedDiscounts = await this.orders.discounts.findOrderDiscounts({
|
|
42
38
|
orderId: order._id,
|
|
43
39
|
});
|
|
@@ -91,18 +87,5 @@ export async function updateCalculationService(orderId) {
|
|
|
91
87
|
if (JSON.stringify(order.calculation) !== JSON.stringify(calculation)) {
|
|
92
88
|
order = (await this.orders.updateCalculationSheet(orderId, calculation));
|
|
93
89
|
}
|
|
94
|
-
/*
|
|
95
|
-
// We have to do initCartProviders after calculation, only then filterSupportedProviders will work correctly and has access to recent pricing
|
|
96
|
-
// initCartProviders calls updateCalculation anyways recursively when a new payment or delivery provider gets set
|
|
97
|
-
// Thus, if for example a discount change leads to a free delivery and free payment due to free items amount, the following happens in the stack:
|
|
98
|
-
// 1. create discount
|
|
99
|
-
// 2. update calculation -> order pricing updated to items 0
|
|
100
|
-
// 3. initCartProviders with updated order -> filterSupportedProviders -> delivery provider is invalid -> set new delivery provider
|
|
101
|
-
// 4. update calculation -> order pricing updated to items 0 and delivery 0
|
|
102
|
-
// 5. initCartProviders with updated order -> filterSupportedProviders -> payment provider is invalid -> set new payment provider
|
|
103
|
-
// 6. update calculation -> order pricing updated to items 0, delivery 0, payment 0
|
|
104
|
-
// 7. initCartProviders with updated order -> all providers are valid -> return order
|
|
105
|
-
*/
|
|
106
90
|
return initCartProvidersService.bind(this)(order);
|
|
107
91
|
}
|
|
108
|
-
//# sourceMappingURL=updateCalculation.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Order, OrderDelivery, OrderPosition } from '@unchainedshop/core-orders';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Order, OrderDelivery, OrderPosition } from '@unchainedshop/core-orders';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function updateSchedulingService(this: Modules, { orderPositions, order, orderDelivery, }: {
|
|
4
4
|
orderPositions: OrderPosition[];
|
|
5
5
|
order: Order;
|
|
6
6
|
orderDelivery: OrderDelivery | null;
|
|
7
7
|
}): Promise<OrderPosition[]>;
|
|
8
|
-
//# sourceMappingURL=updateScheduling.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WarehousingDirector } from
|
|
2
|
-
import { supportedWarehousingProvidersService } from
|
|
1
|
+
import { WarehousingDirector } from "../directors/index.js";
|
|
2
|
+
import { supportedWarehousingProvidersService } from "./supportedWarehousingProviders.js";
|
|
3
3
|
export async function updateSchedulingService({ orderPositions, order, orderDelivery, }) {
|
|
4
4
|
const deliveryProvider = orderDelivery &&
|
|
5
5
|
(await this.delivery.findProvider({
|
|
@@ -8,7 +8,6 @@ export async function updateSchedulingService({ orderPositions, order, orderDeli
|
|
|
8
8
|
if (!deliveryProvider)
|
|
9
9
|
return [];
|
|
10
10
|
return (await Promise.all(orderPositions.map(async (orderPosition) => {
|
|
11
|
-
// scheduling (store in db for auditing)
|
|
12
11
|
const product = (await this.products.findProduct({
|
|
13
12
|
productId: orderPosition.productId,
|
|
14
13
|
}));
|
|
@@ -35,4 +34,3 @@ export async function updateSchedulingService({ orderPositions, order, orderDeli
|
|
|
35
34
|
return this.orders.positions.updateScheduling(orderPosition._id, scheduling);
|
|
36
35
|
})));
|
|
37
36
|
}
|
|
38
|
-
//# sourceMappingURL=updateScheduling.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { File } from '@unchainedshop/core-files';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { File } from '@unchainedshop/core-files';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function updateUserAvatarAfterUploadService(this: Modules, { file }: {
|
|
4
4
|
file: Pick<File, '_id' | 'path' | 'meta'>;
|
|
5
5
|
}): Promise<void>;
|
|
6
|
-
//# sourceMappingURL=updateUserAvatarAfterUpload.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { removeFilesService } from
|
|
1
|
+
import { removeFilesService } from "./removeFiles.js";
|
|
2
2
|
import { createLogger } from '@unchainedshop/logger';
|
|
3
3
|
const logger = createLogger('unchained:core');
|
|
4
4
|
export async function updateUserAvatarAfterUploadService({ file }) {
|
|
5
5
|
const { userId } = file.meta;
|
|
6
6
|
const files = await this.files.findFiles({
|
|
7
|
-
|
|
7
|
+
excludeFileId: file._id,
|
|
8
8
|
path: file.path,
|
|
9
|
-
|
|
9
|
+
meta: { userId },
|
|
10
10
|
});
|
|
11
11
|
const fileIds = files.map((f) => f._id);
|
|
12
12
|
try {
|
|
@@ -17,9 +17,7 @@ export async function updateUserAvatarAfterUploadService({ file }) {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
catch (e) {
|
|
20
|
-
// cleanup error, not critical
|
|
21
20
|
logger.warn(`could not clean up all old avatars: ${e.message}`);
|
|
22
21
|
}
|
|
23
22
|
await this.users.updateAvatar(userId, file._id);
|
|
24
23
|
}
|
|
25
|
-
//# sourceMappingURL=updateUserAvatarAfterUpload.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { File } from '@unchainedshop/core-files';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type File } from '@unchainedshop/core-files';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function uploadFileFromStreamService(this: Modules, { directoryName, rawFile, meta, ...options }: {
|
|
4
4
|
directoryName: string;
|
|
5
5
|
rawFile: any;
|
|
6
6
|
meta?: any;
|
|
7
7
|
} & Record<string, any>): Promise<File>;
|
|
8
|
-
//# sourceMappingURL=uploadFileFromStream.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
2
|
export declare function uploadFileFromURLService(this: Modules, { directoryName, fileInput, meta, }: {
|
|
3
3
|
directoryName: string;
|
|
4
4
|
fileInput: {
|
|
@@ -9,4 +9,3 @@ export declare function uploadFileFromURLService(this: Modules, { directoryName,
|
|
|
9
9
|
};
|
|
10
10
|
meta?: any;
|
|
11
11
|
}): Promise<import("@unchainedshop/core-files").File | null>;
|
|
12
|
-
//# sourceMappingURL=uploadFileFromURL.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Order } from '@unchainedshop/core-orders';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type Order } from '@unchainedshop/core-orders';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function validateOrderService(this: Modules, order: Order): Promise<void>;
|
|
4
|
-
//# sourceMappingURL=validateOrder.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Quotation } from '@unchainedshop/core-quotations';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type Quotation } from '@unchainedshop/core-quotations';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function verifyQuotationService(this: Modules, quotation: Quotation, { quotationContext }: {
|
|
4
4
|
quotationContext?: any;
|
|
5
5
|
}): Promise<Quotation>;
|
|
6
|
-
//# sourceMappingURL=verifyQuotation.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QuotationStatus } from '@unchainedshop/core-quotations';
|
|
2
|
-
import { processQuotationService } from
|
|
2
|
+
import { processQuotationService } from "./processQuotation.js";
|
|
3
3
|
export async function verifyQuotationService(quotation, { quotationContext }) {
|
|
4
4
|
if (quotation.status !== QuotationStatus.REQUESTED)
|
|
5
5
|
return quotation;
|
|
@@ -9,4 +9,3 @@ export async function verifyQuotationService(quotation, { quotationContext }) {
|
|
|
9
9
|
}));
|
|
10
10
|
return await processQuotationService.bind(this)(updatedQuotation, { quotationContext });
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=verifyQuotation.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ScheduleData {
|
|
2
|
+
schedules: {
|
|
3
|
+
s?: number[];
|
|
4
|
+
m?: number[];
|
|
5
|
+
h?: number[];
|
|
6
|
+
D?: number[];
|
|
7
|
+
M?: number[];
|
|
8
|
+
d?: number[];
|
|
9
|
+
}[];
|
|
10
|
+
}
|
|
11
|
+
declare function parseCron(cronExpr: string): ScheduleData;
|
|
12
|
+
declare function parseText(text: string): ScheduleData;
|
|
13
|
+
export declare const schedule: {
|
|
14
|
+
parse: {
|
|
15
|
+
cron: typeof parseCron;
|
|
16
|
+
text: typeof parseText;
|
|
17
|
+
};
|
|
18
|
+
schedule: (scheduleData: ScheduleData) => {
|
|
19
|
+
next: (count: number, referenceDate: Date) => Date | Date[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default schedule;
|