@unchainedshop/core 4.3.5 → 4.4.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 +4 -6
- 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 +2 -3
- package/lib/bulk-importer/upsertAsset.js +4 -4
- package/lib/core-index.d.ts +9 -10
- package/lib/core-index.js +9 -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 +2 -5
- 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 +6 -7
- package/lib/directors/DeliveryPricingAdapter.js +2 -3
- package/lib/directors/DeliveryPricingDirector.d.ts +3 -4
- 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 +6 -7
- package/lib/directors/FilterDirector.js +13 -19
- package/lib/directors/IntervalWorker.d.ts +2 -3
- package/lib/directors/IntervalWorker.js +3 -5
- 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 +6 -7
- package/lib/directors/PaymentPricingAdapter.js +2 -3
- package/lib/directors/PaymentPricingDirector.d.ts +4 -5
- 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/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/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/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 +48 -49
- package/lib/services/index.js +47 -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/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 +2 -3
- package/lib/services/loadFilters.d.ts +2 -3
- package/lib/services/loadFilters.js +3 -3
- 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/removeFiles.d.ts +1 -2
- package/lib/services/removeFiles.js +0 -2
- package/lib/services/removeProduct.d.ts +1 -2
- package/lib/services/removeProduct.js +1 -4
- 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/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 +1 -3
- 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/package.json +27 -26
- 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 -50
- 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 -315
- 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 -60
- 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,4 @@
|
|
|
1
|
-
import { Order, OrderDiscount } from '@unchainedshop/core-orders';
|
|
2
|
-
import { OrderPricingDiscount } from '../directors/index.
|
|
3
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Order, OrderDiscount } from '@unchainedshop/core-orders';
|
|
2
|
+
import { type OrderPricingDiscount } from '../directors/index.ts';
|
|
3
|
+
import type { Modules } from '../modules.ts';
|
|
4
4
|
export declare function discountedEntitiesService(this: Modules, order: Order, orderDiscount: OrderDiscount): Promise<OrderPricingDiscount[]>;
|
|
5
|
-
//# sourceMappingURL=discountedEntities.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DeliveryPricingSheet, OrderPricingSheet, PaymentPricingSheet, ProductPricingSheet, } from
|
|
1
|
+
import { DeliveryPricingSheet, OrderPricingSheet, PaymentPricingSheet, ProductPricingSheet, } from "../directors/index.js";
|
|
2
2
|
export async function discountedEntitiesService(order, orderDiscount) {
|
|
3
|
-
// Delivery discounts
|
|
4
3
|
const orderDelivery = await this.orders.deliveries.findDelivery({
|
|
5
4
|
orderDeliveryId: order.deliveryId,
|
|
6
5
|
});
|
|
@@ -14,7 +13,6 @@ export async function discountedEntitiesService(order, orderDiscount) {
|
|
|
14
13
|
delivery: orderDelivery,
|
|
15
14
|
...discount,
|
|
16
15
|
}));
|
|
17
|
-
// Payment discounts
|
|
18
16
|
const orderPayment = await this.orders.payments.findOrderPayment({
|
|
19
17
|
orderPaymentId: order.paymentId,
|
|
20
18
|
});
|
|
@@ -28,7 +26,6 @@ export async function discountedEntitiesService(order, orderDiscount) {
|
|
|
28
26
|
payment: orderPayment,
|
|
29
27
|
...discount,
|
|
30
28
|
}));
|
|
31
|
-
// Position discounts
|
|
32
29
|
const orderPositions = await this.orders.positions.findOrderPositions({
|
|
33
30
|
orderId: order._id,
|
|
34
31
|
});
|
|
@@ -42,14 +39,12 @@ export async function discountedEntitiesService(order, orderDiscount) {
|
|
|
42
39
|
item: orderPosition,
|
|
43
40
|
...discount,
|
|
44
41
|
})));
|
|
45
|
-
// order discounts
|
|
46
42
|
const orderDiscounts = OrderPricingSheet({
|
|
47
43
|
calculation: order.calculation || [],
|
|
48
44
|
currencyCode: order.currencyCode,
|
|
49
45
|
})
|
|
50
46
|
.discountPrices(orderDiscount._id)
|
|
51
47
|
.map((discount) => ({ order, ...discount }));
|
|
52
|
-
// All discounts
|
|
53
48
|
const discounted = [
|
|
54
49
|
...orderPaymentDiscounts,
|
|
55
50
|
...orderDeliveryDiscounts,
|
|
@@ -58,4 +53,3 @@ export async function discountedEntitiesService(order, orderDiscount) {
|
|
|
58
53
|
].filter(Boolean);
|
|
59
54
|
return discounted;
|
|
60
55
|
}
|
|
61
|
-
//# sourceMappingURL=discountedEntities.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { TokenSurrogate } from '@unchainedshop/core-warehousing';
|
|
2
|
-
import { Product } from '@unchainedshop/core-products';
|
|
3
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type TokenSurrogate } from '@unchainedshop/core-warehousing';
|
|
2
|
+
import type { Product } from '@unchainedshop/core-products';
|
|
3
|
+
import type { Modules } from '../modules.ts';
|
|
4
4
|
export declare function ercMetadataService(this: Modules, { product, token, locale }: {
|
|
5
5
|
product: Product;
|
|
6
6
|
token: TokenSurrogate;
|
|
7
7
|
locale: Intl.Locale;
|
|
8
8
|
}): Promise<any>;
|
|
9
|
-
//# sourceMappingURL=ercMetadata.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WarehousingProviderType } from '@unchainedshop/core-warehousing';
|
|
2
|
-
import { WarehousingDirector } from
|
|
2
|
+
import { WarehousingDirector } from "../directors/WarehousingDirector.js";
|
|
3
3
|
export async function ercMetadataService({ product, token, locale }) {
|
|
4
4
|
const virtualProviders = (await this.warehousing.allProviders()).filter(({ type }) => type === WarehousingProviderType.VIRTUAL);
|
|
5
5
|
return await WarehousingDirector.tokenMetadata(virtualProviders, {
|
|
@@ -10,4 +10,3 @@ export async function ercMetadataService({ product, token, locale }) {
|
|
|
10
10
|
referenceDate: new Date(),
|
|
11
11
|
}, { modules: this });
|
|
12
12
|
}
|
|
13
|
-
//# sourceMappingURL=ercMetadata.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { User } from '@unchainedshop/core-users';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { User } from '@unchainedshop/core-users';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function findOrInitCartService(this: Modules, { user, countryCode, orderId, }: {
|
|
4
4
|
user: User;
|
|
5
5
|
countryCode: string;
|
|
6
6
|
orderId?: string;
|
|
7
7
|
}): Promise<import("@unchainedshop/core-orders").Order | null>;
|
|
8
|
-
//# sourceMappingURL=findOrInitCart.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nextUserCartService } from
|
|
1
|
+
import { nextUserCartService } from "./nextUserCart.js";
|
|
2
2
|
export async function findOrInitCartService({ user, countryCode, orderId, }) {
|
|
3
3
|
if (orderId) {
|
|
4
4
|
const order = await this.orders.findOrder({ orderId });
|
|
@@ -12,4 +12,3 @@ export async function findOrInitCartService({ user, countryCode, orderId, }) {
|
|
|
12
12
|
forceCartCreation: true,
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=findOrInitCart.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
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 fullfillQuotationService(this: Modules, quotation: Quotation, info: any): Promise<Quotation>;
|
|
4
|
-
//# sourceMappingURL=fullfillQuotation.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 fullfillQuotationService(quotation, info) {
|
|
4
4
|
if (quotation.status === QuotationStatus.FULLFILLED)
|
|
5
5
|
return quotation;
|
|
@@ -9,4 +9,3 @@ export async function fullfillQuotationService(quotation, info) {
|
|
|
9
9
|
});
|
|
10
10
|
return processQuotationService.bind(this)(updatedQuotation, {});
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=fullfillQuotation.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
2
|
-
import { Enrollment, EnrollmentOrderPositionTemplate } from '@unchainedshop/core-enrollments';
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
|
+
import type { Enrollment, EnrollmentOrderPositionTemplate } from '@unchainedshop/core-enrollments';
|
|
3
3
|
export declare function generateOrderFromEnrollmentService(this: Modules, enrollment: Enrollment, { orderPositionTemplates, orderContext, }: {
|
|
4
4
|
orderPositionTemplates: EnrollmentOrderPositionTemplate[];
|
|
5
5
|
orderContext?: any;
|
|
6
6
|
}): Promise<import("@unchainedshop/core-orders").Order | null>;
|
|
7
|
-
//# sourceMappingURL=generateOrderFromEnrollment.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { updateCalculationService } from
|
|
2
|
-
import { checkoutOrderService } from
|
|
1
|
+
import { updateCalculationService } from "./updateCalculation.js";
|
|
2
|
+
import { checkoutOrderService } from "./checkoutOrder.js";
|
|
3
3
|
export async function generateOrderFromEnrollmentService(enrollment, { orderPositionTemplates, orderContext, }) {
|
|
4
4
|
if (!enrollment.payment || !enrollment.delivery)
|
|
5
5
|
return null;
|
|
@@ -31,4 +31,3 @@ export async function generateOrderFromEnrollmentService(enrollment, { orderPosi
|
|
|
31
31
|
paymentContext,
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
//# sourceMappingURL=generateOrderFromEnrollment.js.map
|
package/lib/services/index.d.ts
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
2
|
-
import { migrateUserDataService } from './migrateUserData.
|
|
3
|
-
import { updateUserAvatarAfterUploadService } from './updateUserAvatarAfterUpload.
|
|
4
|
-
import { linkFileService } from './linkFileService.
|
|
5
|
-
import { createSignedURLService } from './createSignedURL.
|
|
6
|
-
import { uploadFileFromURLService } from './uploadFileFromURL.
|
|
7
|
-
import { uploadFileFromStreamService } from './uploadFileFromStream.
|
|
8
|
-
import { removeFilesService } from './removeFiles.
|
|
9
|
-
import { createDownloadStreamService } from './createDownloadStream.
|
|
10
|
-
import { migrateBookmarksService } from './migrateBookmarks.
|
|
11
|
-
import { migrateOrderCartsService } from './migrateOrderCart.
|
|
12
|
-
import { nextUserCartService } from './nextUserCart.
|
|
13
|
-
import { removeProductService } from './removeProduct.
|
|
14
|
-
import { initCartProvidersService } from './initCartProviders.
|
|
15
|
-
import { updateCalculationService } from './updateCalculation.
|
|
16
|
-
import { supportedDeliveryProvidersService } from './supportedDeliveryProviders.
|
|
17
|
-
import { deleteUserService } from './deleteUser.
|
|
18
|
-
import { supportedPaymentProvidersService } from './supportedPaymentProviders.
|
|
19
|
-
import { supportedWarehousingProvidersService } from './supportedWarehousingProviders.
|
|
20
|
-
import { createEnrollmentFromCheckoutService } from './createEnrollmentFromCheckout.
|
|
21
|
-
import { searchAssortmentsService } from './searchAssortments.
|
|
22
|
-
import { searchProductsService } from './searchProducts.
|
|
23
|
-
import { calculateDiscountTotalService } from './calculateDiscountTotal.
|
|
24
|
-
import { registerPaymentCredentialsService } from './registerPaymentCredentials.
|
|
25
|
-
import { processOrderService } from './processOrder.
|
|
26
|
-
import { checkoutOrderService } from './checkoutOrder.
|
|
27
|
-
import { confirmOrderService } from './confirmOrder.
|
|
28
|
-
import { rejectOrderService } from './rejectOrder.
|
|
29
|
-
import { discountedEntitiesService } from './discountedEntities.
|
|
30
|
-
import { createManualOrderDiscountService } from './createManualOrderDiscount.
|
|
31
|
-
import { initializeEnrollmentService } from './initializeEnrollment.
|
|
32
|
-
import { activateEnrollmentService } from './activateEnrollment.
|
|
33
|
-
import { terminateEnrollmentService } from './terminateEnrollment.
|
|
34
|
-
import { invalidateFilterCacheService } from './invalidateFilterCache.
|
|
35
|
-
import { fullfillQuotationService } from './fullfillQuotation.
|
|
36
|
-
import { processQuotationService } from './processQuotation.
|
|
37
|
-
import { proposeQuotationService } from './proposeQuotation.
|
|
38
|
-
import { rejectQuotationService } from './rejectQuotation.
|
|
39
|
-
import { verifyQuotationService } from './verifyQuotation.
|
|
40
|
-
import { loadFiltersService } from './loadFilters.
|
|
41
|
-
import { loadFilterOptionsService } from './loadFilterOptions.
|
|
42
|
-
import { ercMetadataService } from './ercMetadata.
|
|
43
|
-
import { simulateProductPricingService } from './simulateProductPricing.
|
|
44
|
-
import { simulateProductDispatchingService } from './simulateProductDispatching.
|
|
45
|
-
import { simulateProductInventoryService } from './simulateProductInventory.
|
|
46
|
-
import { findOrInitCartService } from './findOrInitCart.
|
|
47
|
-
import { addMessageService } from './addMessage.
|
|
48
|
-
import { generateOrderFromEnrollmentService } from './generateOrderFromEnrollment.
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
|
+
import { migrateUserDataService } from './migrateUserData.ts';
|
|
3
|
+
import { updateUserAvatarAfterUploadService } from './updateUserAvatarAfterUpload.ts';
|
|
4
|
+
import { linkFileService } from './linkFileService.ts';
|
|
5
|
+
import { createSignedURLService } from './createSignedURL.ts';
|
|
6
|
+
import { uploadFileFromURLService } from './uploadFileFromURL.ts';
|
|
7
|
+
import { uploadFileFromStreamService } from './uploadFileFromStream.ts';
|
|
8
|
+
import { removeFilesService } from './removeFiles.ts';
|
|
9
|
+
import { createDownloadStreamService } from './createDownloadStream.ts';
|
|
10
|
+
import { migrateBookmarksService } from './migrateBookmarks.ts';
|
|
11
|
+
import { migrateOrderCartsService } from './migrateOrderCart.ts';
|
|
12
|
+
import { nextUserCartService } from './nextUserCart.ts';
|
|
13
|
+
import { removeProductService } from './removeProduct.ts';
|
|
14
|
+
import { initCartProvidersService } from './initCartProviders.ts';
|
|
15
|
+
import { updateCalculationService } from './updateCalculation.ts';
|
|
16
|
+
import { supportedDeliveryProvidersService } from './supportedDeliveryProviders.ts';
|
|
17
|
+
import { deleteUserService } from './deleteUser.ts';
|
|
18
|
+
import { supportedPaymentProvidersService } from './supportedPaymentProviders.ts';
|
|
19
|
+
import { supportedWarehousingProvidersService } from './supportedWarehousingProviders.ts';
|
|
20
|
+
import { createEnrollmentFromCheckoutService } from './createEnrollmentFromCheckout.ts';
|
|
21
|
+
import { searchAssortmentsService } from './searchAssortments.ts';
|
|
22
|
+
import { searchProductsService } from './searchProducts.ts';
|
|
23
|
+
import { calculateDiscountTotalService } from './calculateDiscountTotal.ts';
|
|
24
|
+
import { registerPaymentCredentialsService } from './registerPaymentCredentials.ts';
|
|
25
|
+
import { processOrderService } from './processOrder.ts';
|
|
26
|
+
import { checkoutOrderService } from './checkoutOrder.ts';
|
|
27
|
+
import { confirmOrderService } from './confirmOrder.ts';
|
|
28
|
+
import { rejectOrderService } from './rejectOrder.ts';
|
|
29
|
+
import { discountedEntitiesService } from './discountedEntities.ts';
|
|
30
|
+
import { createManualOrderDiscountService } from './createManualOrderDiscount.ts';
|
|
31
|
+
import { initializeEnrollmentService } from './initializeEnrollment.ts';
|
|
32
|
+
import { activateEnrollmentService } from './activateEnrollment.ts';
|
|
33
|
+
import { terminateEnrollmentService } from './terminateEnrollment.ts';
|
|
34
|
+
import { invalidateFilterCacheService } from './invalidateFilterCache.ts';
|
|
35
|
+
import { fullfillQuotationService } from './fullfillQuotation.ts';
|
|
36
|
+
import { processQuotationService } from './processQuotation.ts';
|
|
37
|
+
import { proposeQuotationService } from './proposeQuotation.ts';
|
|
38
|
+
import { rejectQuotationService } from './rejectQuotation.ts';
|
|
39
|
+
import { verifyQuotationService } from './verifyQuotation.ts';
|
|
40
|
+
import { loadFiltersService } from './loadFilters.ts';
|
|
41
|
+
import { loadFilterOptionsService } from './loadFilterOptions.ts';
|
|
42
|
+
import { ercMetadataService } from './ercMetadata.ts';
|
|
43
|
+
import { simulateProductPricingService } from './simulateProductPricing.ts';
|
|
44
|
+
import { simulateProductDispatchingService } from './simulateProductDispatching.ts';
|
|
45
|
+
import { simulateProductInventoryService } from './simulateProductInventory.ts';
|
|
46
|
+
import { findOrInitCartService } from './findOrInitCart.ts';
|
|
47
|
+
import { addMessageService } from './addMessage.ts';
|
|
48
|
+
import { generateOrderFromEnrollmentService } from './generateOrderFromEnrollment.ts';
|
|
49
49
|
export type ServiceInterface = (this: Modules, ...args: any[]) => Promise<any> | any;
|
|
50
50
|
export type Bound<T extends ServiceInterface> = OmitThisParameter<T>;
|
|
51
51
|
export type CustomServices = Record<string, ServiceInterface | Record<string, ServiceInterface>>;
|
|
@@ -120,4 +120,3 @@ export default function initServices(modules: Modules, customServices?: CustomSe
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
export type Services = ReturnType<typeof initServices>;
|
|
123
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/services/index.js
CHANGED
|
@@ -1,52 +1,50 @@
|
|
|
1
|
-
import { migrateUserDataService } from
|
|
2
|
-
import { updateUserAvatarAfterUploadService } from
|
|
3
|
-
import { linkFileService } from
|
|
4
|
-
import { createSignedURLService } from
|
|
5
|
-
import { uploadFileFromURLService } from
|
|
6
|
-
import { uploadFileFromStreamService } from
|
|
7
|
-
import { removeFilesService } from
|
|
8
|
-
import { createDownloadStreamService } from
|
|
9
|
-
import { migrateBookmarksService } from
|
|
10
|
-
import { migrateOrderCartsService } from
|
|
11
|
-
import { nextUserCartService } from
|
|
12
|
-
import { removeProductService } from
|
|
13
|
-
import { initCartProvidersService } from
|
|
14
|
-
import { updateCalculationService } from
|
|
15
|
-
import { supportedDeliveryProvidersService } from
|
|
16
|
-
import { deleteUserService } from
|
|
17
|
-
import { supportedPaymentProvidersService } from
|
|
18
|
-
import { supportedWarehousingProvidersService } from
|
|
19
|
-
import { createEnrollmentFromCheckoutService } from
|
|
20
|
-
import { searchAssortmentsService } from
|
|
21
|
-
import { searchProductsService } from
|
|
22
|
-
import { calculateDiscountTotalService } from
|
|
23
|
-
import { registerPaymentCredentialsService } from
|
|
24
|
-
import { processOrderService } from
|
|
25
|
-
import { checkoutOrderService } from
|
|
26
|
-
import { confirmOrderService } from
|
|
27
|
-
import { rejectOrderService } from
|
|
28
|
-
import { discountedEntitiesService } from
|
|
29
|
-
import { createManualOrderDiscountService } from
|
|
30
|
-
import { initializeEnrollmentService } from
|
|
31
|
-
import { activateEnrollmentService } from
|
|
32
|
-
import { terminateEnrollmentService } from
|
|
33
|
-
import { invalidateFilterCacheService } from
|
|
34
|
-
import { fullfillQuotationService } from
|
|
35
|
-
import { processQuotationService } from
|
|
36
|
-
import { proposeQuotationService } from
|
|
37
|
-
import { rejectQuotationService } from
|
|
38
|
-
import { verifyQuotationService } from
|
|
39
|
-
import { loadFiltersService } from
|
|
40
|
-
import { loadFilterOptionsService } from
|
|
41
|
-
import { ercMetadataService } from
|
|
42
|
-
import { simulateProductPricingService } from
|
|
43
|
-
import { simulateProductDispatchingService } from
|
|
44
|
-
import { simulateProductInventoryService } from
|
|
45
|
-
import { findOrInitCartService } from
|
|
46
|
-
import { addMessageService } from
|
|
47
|
-
import { generateOrderFromEnrollmentService } from
|
|
48
|
-
// Auto-Inject Unchained API as last parameter
|
|
49
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
|
|
1
|
+
import { migrateUserDataService } from "./migrateUserData.js";
|
|
2
|
+
import { updateUserAvatarAfterUploadService } from "./updateUserAvatarAfterUpload.js";
|
|
3
|
+
import { linkFileService } from "./linkFileService.js";
|
|
4
|
+
import { createSignedURLService } from "./createSignedURL.js";
|
|
5
|
+
import { uploadFileFromURLService } from "./uploadFileFromURL.js";
|
|
6
|
+
import { uploadFileFromStreamService } from "./uploadFileFromStream.js";
|
|
7
|
+
import { removeFilesService } from "./removeFiles.js";
|
|
8
|
+
import { createDownloadStreamService } from "./createDownloadStream.js";
|
|
9
|
+
import { migrateBookmarksService } from "./migrateBookmarks.js";
|
|
10
|
+
import { migrateOrderCartsService } from "./migrateOrderCart.js";
|
|
11
|
+
import { nextUserCartService } from "./nextUserCart.js";
|
|
12
|
+
import { removeProductService } from "./removeProduct.js";
|
|
13
|
+
import { initCartProvidersService } from "./initCartProviders.js";
|
|
14
|
+
import { updateCalculationService } from "./updateCalculation.js";
|
|
15
|
+
import { supportedDeliveryProvidersService } from "./supportedDeliveryProviders.js";
|
|
16
|
+
import { deleteUserService } from "./deleteUser.js";
|
|
17
|
+
import { supportedPaymentProvidersService } from "./supportedPaymentProviders.js";
|
|
18
|
+
import { supportedWarehousingProvidersService } from "./supportedWarehousingProviders.js";
|
|
19
|
+
import { createEnrollmentFromCheckoutService } from "./createEnrollmentFromCheckout.js";
|
|
20
|
+
import { searchAssortmentsService } from "./searchAssortments.js";
|
|
21
|
+
import { searchProductsService } from "./searchProducts.js";
|
|
22
|
+
import { calculateDiscountTotalService } from "./calculateDiscountTotal.js";
|
|
23
|
+
import { registerPaymentCredentialsService } from "./registerPaymentCredentials.js";
|
|
24
|
+
import { processOrderService } from "./processOrder.js";
|
|
25
|
+
import { checkoutOrderService } from "./checkoutOrder.js";
|
|
26
|
+
import { confirmOrderService } from "./confirmOrder.js";
|
|
27
|
+
import { rejectOrderService } from "./rejectOrder.js";
|
|
28
|
+
import { discountedEntitiesService } from "./discountedEntities.js";
|
|
29
|
+
import { createManualOrderDiscountService } from "./createManualOrderDiscount.js";
|
|
30
|
+
import { initializeEnrollmentService } from "./initializeEnrollment.js";
|
|
31
|
+
import { activateEnrollmentService } from "./activateEnrollment.js";
|
|
32
|
+
import { terminateEnrollmentService } from "./terminateEnrollment.js";
|
|
33
|
+
import { invalidateFilterCacheService } from "./invalidateFilterCache.js";
|
|
34
|
+
import { fullfillQuotationService } from "./fullfillQuotation.js";
|
|
35
|
+
import { processQuotationService } from "./processQuotation.js";
|
|
36
|
+
import { proposeQuotationService } from "./proposeQuotation.js";
|
|
37
|
+
import { rejectQuotationService } from "./rejectQuotation.js";
|
|
38
|
+
import { verifyQuotationService } from "./verifyQuotation.js";
|
|
39
|
+
import { loadFiltersService } from "./loadFilters.js";
|
|
40
|
+
import { loadFilterOptionsService } from "./loadFilterOptions.js";
|
|
41
|
+
import { ercMetadataService } from "./ercMetadata.js";
|
|
42
|
+
import { simulateProductPricingService } from "./simulateProductPricing.js";
|
|
43
|
+
import { simulateProductDispatchingService } from "./simulateProductDispatching.js";
|
|
44
|
+
import { simulateProductInventoryService } from "./simulateProductInventory.js";
|
|
45
|
+
import { findOrInitCartService } from "./findOrInitCart.js";
|
|
46
|
+
import { addMessageService } from "./addMessage.js";
|
|
47
|
+
import { generateOrderFromEnrollmentService } from "./generateOrderFromEnrollment.js";
|
|
50
48
|
function bindMethodsToModules(modules) {
|
|
51
49
|
return {
|
|
52
50
|
get(target, prop, receiver) {
|
|
@@ -132,7 +130,5 @@ export default function initServices(modules, customServices = {}) {
|
|
|
132
130
|
addMessage: addMessageService,
|
|
133
131
|
},
|
|
134
132
|
};
|
|
135
|
-
// This Proxy Binds all services to the Modules Object
|
|
136
133
|
return new Proxy({ ...services, ...customServices }, bindMethodsToModules(modules));
|
|
137
134
|
}
|
|
138
|
-
//# sourceMappingURL=index.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 initCartProvidersService(this: Modules, order: Order): Promise<Order>;
|
|
4
|
-
//# sourceMappingURL=initCartProviders.d.ts.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { deliverySettings } from '@unchainedshop/core-delivery';
|
|
2
2
|
import { paymentSettings } from '@unchainedshop/core-payment';
|
|
3
|
-
import { supportedDeliveryProvidersService } from
|
|
4
|
-
import { supportedPaymentProvidersService } from
|
|
3
|
+
import { supportedDeliveryProvidersService } from "./supportedDeliveryProviders.js";
|
|
4
|
+
import { supportedPaymentProvidersService } from "./supportedPaymentProviders.js";
|
|
5
5
|
export async function initCartProvidersService(order) {
|
|
6
6
|
let updatedOrder = order;
|
|
7
|
-
// Init delivery provider
|
|
8
7
|
const supportedDeliveryProviders = await supportedDeliveryProvidersService.bind(this)({
|
|
9
8
|
order: updatedOrder,
|
|
10
9
|
});
|
|
@@ -26,7 +25,6 @@ export async function initCartProvidersService(order) {
|
|
|
26
25
|
updatedOrder;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
|
-
// Init payment provider
|
|
30
28
|
const supportedPaymentProviders = await supportedPaymentProvidersService.bind(this)({
|
|
31
29
|
order: updatedOrder,
|
|
32
30
|
});
|
|
@@ -56,4 +54,3 @@ export async function initCartProvidersService(order) {
|
|
|
56
54
|
}
|
|
57
55
|
return updatedOrder;
|
|
58
56
|
}
|
|
59
|
-
//# sourceMappingURL=initCartProviders.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Enrollment } from '@unchainedshop/core-enrollments';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Enrollment } from '@unchainedshop/core-enrollments';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function initializeEnrollmentService(this: Modules, enrollment: Enrollment, params: {
|
|
4
4
|
orderIdForFirstPeriod?: string;
|
|
5
5
|
reason: string;
|
|
6
6
|
}): Promise<Enrollment>;
|
|
7
|
-
//# sourceMappingURL=initializeEnrollment.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EnrollmentDirector } from
|
|
2
|
-
import { processEnrollmentService } from
|
|
3
|
-
import { addMessageService } from
|
|
1
|
+
import { EnrollmentDirector } from "../core-index.js";
|
|
2
|
+
import { processEnrollmentService } from "./processEnrollment.js";
|
|
3
|
+
import { addMessageService } from "./addMessage.js";
|
|
4
4
|
export async function initializeEnrollmentService(enrollment, params) {
|
|
5
5
|
const product = await this.products.findProduct({
|
|
6
6
|
productId: enrollment.productId,
|
|
@@ -24,4 +24,3 @@ export async function initializeEnrollmentService(enrollment, params) {
|
|
|
24
24
|
});
|
|
25
25
|
return processedEnrollment;
|
|
26
26
|
}
|
|
27
|
-
//# sourceMappingURL=initializeEnrollment.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterDirector } from
|
|
1
|
+
import { FilterDirector } from "../core-index.js";
|
|
2
2
|
import { createLogger } from '@unchainedshop/logger';
|
|
3
3
|
const logger = createLogger('unchained:core');
|
|
4
4
|
export async function invalidateFilterCacheService() {
|
|
@@ -9,4 +9,3 @@ export async function invalidateFilterCacheService() {
|
|
|
9
9
|
return FilterDirector.invalidateProductIdCache(filter, { modules: this });
|
|
10
10
|
}, Promise.resolve(undefined));
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=invalidateFilterCache.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
2
|
export declare function linkFileService(this: Modules, { fileId, size, type }: {
|
|
3
3
|
fileId: string;
|
|
4
4
|
size?: number;
|
|
5
5
|
type?: string;
|
|
6
6
|
}): Promise<import("@unchainedshop/core-files").File | null>;
|
|
7
|
-
//# sourceMappingURL=linkFileService.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Filter, SearchQuery } from '@unchainedshop/core-filters';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type Filter, type SearchQuery } from '@unchainedshop/core-filters';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function loadFilterOptionsService(this: Modules, filter: Filter, params: {
|
|
4
4
|
searchQuery: SearchQuery;
|
|
5
5
|
forceLiveCollection: boolean;
|
|
@@ -11,4 +11,3 @@ export declare function loadFilterOptionsService(this: Modules, filter: Filter,
|
|
|
11
11
|
filter: Filter;
|
|
12
12
|
isSelected: boolean;
|
|
13
13
|
} | null)[]>;
|
|
14
|
-
//# sourceMappingURL=loadFilterOptions.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilterType } from '@unchainedshop/core-filters';
|
|
2
|
-
import { FilterDirector, parseQueryArray } from
|
|
2
|
+
import { FilterDirector, parseQueryArray } from "../directors/FilterDirector.js";
|
|
3
3
|
export async function loadFilterOptionsService(filter, params) {
|
|
4
4
|
const { forceLiveCollection, productIdSet, searchQuery } = params;
|
|
5
5
|
const filterQueryParsed = parseQueryArray(searchQuery?.filterQuery);
|
|
@@ -10,7 +10,7 @@ export async function loadFilterOptionsService(filter, params) {
|
|
|
10
10
|
values: [value],
|
|
11
11
|
forceLiveCollection,
|
|
12
12
|
}, { modules: this });
|
|
13
|
-
const filteredProductIdSet = productIdSet.intersection(
|
|
13
|
+
const filteredProductIdSet = productIdSet.intersection(filterOptionProductIds);
|
|
14
14
|
const normalizedValues = values && this.filters.parse(filter, values, [value]);
|
|
15
15
|
const isSelected = normalizedValues && normalizedValues.indexOf(value) !== -1;
|
|
16
16
|
if (!filteredProductIdSet.size && !isSelected) {
|
|
@@ -26,4 +26,3 @@ export async function loadFilterOptionsService(filter, params) {
|
|
|
26
26
|
}));
|
|
27
27
|
return mappedOptions.filter(Boolean);
|
|
28
28
|
}
|
|
29
|
-
//# sourceMappingURL=loadFilterOptions.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SearchQuery } from '@unchainedshop/core-filters';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type SearchQuery } from '@unchainedshop/core-filters';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function loadFiltersService(this: Modules, searchQuery: SearchQuery, options: {
|
|
4
4
|
productIds: string[];
|
|
5
5
|
forceLiveCollection?: boolean;
|
|
@@ -13,4 +13,3 @@ export declare function loadFiltersService(this: Modules, searchQuery: SearchQue
|
|
|
13
13
|
filteredByOtherFiltersSet: Set<string>;
|
|
14
14
|
filteredByThisFilterSet: Set<string>;
|
|
15
15
|
}[]>;
|
|
16
|
-
//# sourceMappingURL=loadFilters.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultFilterSelector } from '@unchainedshop/core-filters';
|
|
2
|
-
import { FilterDirector } from
|
|
2
|
+
import { FilterDirector } from "../directors/FilterDirector.js";
|
|
3
3
|
export async function loadFiltersService(searchQuery, options) {
|
|
4
4
|
const filterActions = await FilterDirector.actions({ searchQuery }, { modules: this });
|
|
5
5
|
const filterSelector = await filterActions.transformFilterSelector(defaultFilterSelector(searchQuery), options);
|
|
@@ -16,11 +16,12 @@ export async function loadFiltersService(searchQuery, options) {
|
|
|
16
16
|
const rightIndex = extractedFilterIds.indexOf(right._id);
|
|
17
17
|
return leftIndex - rightIndex;
|
|
18
18
|
});
|
|
19
|
+
const allProductIdSet = new Set(options.productIds || []);
|
|
19
20
|
return Promise.all(sortedFilters.map(async (filter) => {
|
|
20
21
|
const { examinedProductIdSet, filteredByOtherFiltersSet, filteredByThisFilterSet } = await FilterDirector.filterFacets(filter, {
|
|
21
22
|
searchQuery,
|
|
22
23
|
forceLiveCollection: !!options.forceLiveCollection,
|
|
23
|
-
|
|
24
|
+
allProductIdSet,
|
|
24
25
|
otherFilters: sortedFilters,
|
|
25
26
|
}, { modules: this });
|
|
26
27
|
return {
|
|
@@ -33,4 +34,3 @@ export async function loadFiltersService(searchQuery, options) {
|
|
|
33
34
|
};
|
|
34
35
|
}));
|
|
35
36
|
}
|
|
36
|
-
//# sourceMappingURL=loadFilters.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
2
|
export declare function migrateBookmarksService(this: Modules, { fromUserId, toUserId, shouldMerge, }: {
|
|
3
3
|
fromUserId: string;
|
|
4
4
|
toUserId: string;
|
|
5
5
|
shouldMerge: boolean;
|
|
6
6
|
countryCode: string;
|
|
7
7
|
}): Promise<void>;
|
|
8
|
-
//# sourceMappingURL=migrateBookmarks.d.ts.map
|
|
@@ -4,7 +4,6 @@ const hashBookmark = (bookmark) => {
|
|
|
4
4
|
export async function migrateBookmarksService({ fromUserId, toUserId, shouldMerge, }) {
|
|
5
5
|
const fromBookmarks = await this.bookmarks.findBookmarks({ userId: fromUserId });
|
|
6
6
|
if (!fromBookmarks) {
|
|
7
|
-
// No bookmarks no copy needed
|
|
8
7
|
return;
|
|
9
8
|
}
|
|
10
9
|
if (!shouldMerge) {
|
|
@@ -23,4 +22,3 @@ export async function migrateBookmarksService({ fromUserId, toUserId, shouldMerg
|
|
|
23
22
|
await this.bookmarks.replaceUserId(fromUserId, toUserId, newBookmarkIds);
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
//# sourceMappingURL=migrateBookmarks.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
2
|
export declare function migrateOrderCartsService(this: Modules, { fromUserId, toUserId, shouldMerge, countryCode, }: {
|
|
3
3
|
fromUserId: string;
|
|
4
4
|
toUserId: string;
|
|
5
5
|
shouldMerge: boolean;
|
|
6
6
|
countryCode: string;
|
|
7
7
|
}): Promise<import("@unchainedshop/core-orders").Order | null>;
|
|
8
|
-
//# sourceMappingURL=migrateOrderCart.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { updateCalculationService } from
|
|
1
|
+
import { updateCalculationService } from "./updateCalculation.js";
|
|
2
2
|
export async function migrateOrderCartsService({ fromUserId, toUserId, shouldMerge, countryCode, }) {
|
|
3
3
|
const fromCart = await this.orders.cart({
|
|
4
4
|
countryCode,
|
|
@@ -9,24 +9,18 @@ export async function migrateOrderCartsService({ fromUserId, toUserId, shouldMer
|
|
|
9
9
|
userId: toUserId,
|
|
10
10
|
});
|
|
11
11
|
if (!fromCart) {
|
|
12
|
-
// No cart, don't copy
|
|
13
12
|
return toCart;
|
|
14
13
|
}
|
|
15
14
|
if (!toCart || !shouldMerge) {
|
|
16
|
-
// No destination cart, move whole cart
|
|
17
15
|
this.orders.setCartOwner({ orderId: fromCart._id, userId: toUserId });
|
|
18
16
|
return updateCalculationService.bind(this)(fromCart._id);
|
|
19
17
|
}
|
|
20
|
-
// Move positions
|
|
21
18
|
this.orders.moveCartPositions({ fromOrderId: fromCart._id, toOrderId: toCart._id });
|
|
22
|
-
// Move billing address if target order has none
|
|
23
19
|
if (fromCart.billingAddress && !toCart.billingAddress) {
|
|
24
20
|
await this.orders.updateBillingAddress(toCart._id, fromCart.billingAddress);
|
|
25
21
|
}
|
|
26
|
-
// Move contact data if target order has none
|
|
27
22
|
if (fromCart.contact && !toCart.contact) {
|
|
28
23
|
await this.orders.updateContact(toCart._id, fromCart.contact);
|
|
29
24
|
}
|
|
30
25
|
return updateCalculationService.bind(this)(toCart._id);
|
|
31
26
|
}
|
|
32
|
-
//# sourceMappingURL=migrateOrderCart.js.map
|