@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,9 +1,8 @@
|
|
|
1
|
-
import { PaymentConfiguration } from '@unchainedshop/core-payment';
|
|
2
|
-
import { PaymentContext, PaymentChargeActionResult } from '../core-index.
|
|
1
|
+
import type { PaymentConfiguration } from '@unchainedshop/core-payment';
|
|
2
|
+
import { type PaymentContext, type PaymentChargeActionResult } from '../core-index.ts';
|
|
3
3
|
export default function registerInvoicePayment({ adapterId, active, payLaterAllowed, charge, }: {
|
|
4
4
|
adapterId: string;
|
|
5
5
|
active?: boolean;
|
|
6
6
|
payLaterAllowed?: boolean;
|
|
7
7
|
charge: false | ((configuration: PaymentConfiguration, context: PaymentContext) => Promise<PaymentChargeActionResult | false>);
|
|
8
8
|
}): void;
|
|
9
|
-
//# sourceMappingURL=registerInvoicePayment.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaymentAdapter, PaymentDirector, } from
|
|
1
|
+
import { PaymentAdapter, PaymentDirector, } from "../core-index.js";
|
|
2
2
|
import { PaymentProviderType } from '@unchainedshop/core-payment';
|
|
3
3
|
export default function registerInvoicePayment({ adapterId, active, payLaterAllowed, charge, }) {
|
|
4
4
|
PaymentDirector.registerAdapter({
|
|
@@ -29,4 +29,3 @@ export default function registerInvoicePayment({ adapterId, active, payLaterAllo
|
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
//# sourceMappingURL=registerInvoicePayment.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WarehousingConfiguration } from '@unchainedshop/core-warehousing';
|
|
2
|
-
import { WarehousingContext } from '../core-index.
|
|
1
|
+
import type { WarehousingConfiguration } from '@unchainedshop/core-warehousing';
|
|
2
|
+
import { type WarehousingContext } from '../core-index.ts';
|
|
3
3
|
export default function registerPhysicalWarehousing({ adapterId, orderIndex, stock, productionTime, commissioningTime, }: {
|
|
4
4
|
adapterId: string;
|
|
5
5
|
orderIndex?: number;
|
|
@@ -7,4 +7,3 @@ export default function registerPhysicalWarehousing({ adapterId, orderIndex, sto
|
|
|
7
7
|
productionTime?: number | ((quantityToProduct: number, configuration: WarehousingConfiguration, context: WarehousingContext) => Promise<number>);
|
|
8
8
|
commissioningTime?: number | ((quantity: number, configuration: WarehousingConfiguration, context: WarehousingContext) => Promise<number>);
|
|
9
9
|
}): void;
|
|
10
|
-
//# sourceMappingURL=registerPhysicalWarehousing.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WarehousingProviderType } from '@unchainedshop/core-warehousing';
|
|
2
|
-
import { WarehousingAdapter, WarehousingDirector } from
|
|
2
|
+
import { WarehousingAdapter, WarehousingDirector } from "../core-index.js";
|
|
3
3
|
export default function registerPhysicalWarehousing({ adapterId, orderIndex = 0, stock, productionTime, commissioningTime, }) {
|
|
4
4
|
WarehousingDirector.registerAdapter({
|
|
5
5
|
...WarehousingAdapter,
|
|
@@ -51,4 +51,3 @@ export default function registerPhysicalWarehousing({ adapterId, orderIndex = 0,
|
|
|
51
51
|
},
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
//# sourceMappingURL=registerPhysicalWarehousing.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DeliveryConfiguration, DeliveryLocation } from '@unchainedshop/core-delivery';
|
|
2
|
-
import { DeliveryContext } from '../core-index.
|
|
3
|
-
import { Work } from '@unchainedshop/core-worker';
|
|
1
|
+
import { type DeliveryConfiguration, type DeliveryLocation } from '@unchainedshop/core-delivery';
|
|
2
|
+
import { type DeliveryContext } from '../core-index.ts';
|
|
3
|
+
import type { Work } from '@unchainedshop/core-worker';
|
|
4
4
|
export default function registerPickUpDelivery({ adapterId, locations, active, autoReleaseAllowed, estimatedDeliveryThroughput, send, }: {
|
|
5
5
|
adapterId: string;
|
|
6
6
|
active?: boolean;
|
|
@@ -9,4 +9,3 @@ export default function registerPickUpDelivery({ adapterId, locations, active, a
|
|
|
9
9
|
send: boolean | ((configuration: DeliveryConfiguration, context: DeliveryContext) => Promise<boolean | Work>);
|
|
10
10
|
locations: DeliveryLocation[] | ((context: DeliveryContext) => Promise<DeliveryLocation[]>);
|
|
11
11
|
}): void;
|
|
12
|
-
//# sourceMappingURL=registerPickUpDelivery.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeliveryProviderType, } from '@unchainedshop/core-delivery';
|
|
2
|
-
import { DeliveryAdapter, DeliveryDirector } from
|
|
2
|
+
import { DeliveryAdapter, DeliveryDirector } from "../core-index.js";
|
|
3
3
|
export default function registerPickUpDelivery({ adapterId, locations, active, autoReleaseAllowed, estimatedDeliveryThroughput, send, }) {
|
|
4
4
|
DeliveryDirector.registerAdapter({
|
|
5
5
|
...DeliveryAdapter,
|
|
@@ -43,4 +43,3 @@ export default function registerPickUpDelivery({ adapterId, locations, active, a
|
|
|
43
43
|
},
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
//# sourceMappingURL=registerPickUpDelivery.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterAdapter, FilterDirector } from
|
|
1
|
+
import { FilterAdapter, FilterDirector } from "../core-index.js";
|
|
2
2
|
export default function registerProductDiscoverabilityFilter({ orderIndex = 0, hiddenTagValue = 'hidden', }) {
|
|
3
3
|
FilterDirector.registerAdapter({
|
|
4
4
|
...FilterAdapter,
|
|
@@ -24,4 +24,3 @@ export default function registerProductDiscoverabilityFilter({ orderIndex = 0, h
|
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
//# sourceMappingURL=registerProductDiscoverabilityFilter.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchQuery } from '@unchainedshop/core-filters';
|
|
1
|
+
import type { SearchQuery } from '@unchainedshop/core-filters';
|
|
2
2
|
export default function registerProductSearchFilter({ orderIndex, search, }: {
|
|
3
3
|
orderIndex?: number;
|
|
4
4
|
search: (params: SearchQuery & {
|
|
@@ -6,4 +6,3 @@ export default function registerProductSearchFilter({ orderIndex, search, }: {
|
|
|
6
6
|
locale: Intl.Locale;
|
|
7
7
|
}) => Promise<string[]>;
|
|
8
8
|
}): void;
|
|
9
|
-
//# sourceMappingURL=registerProductSearchFilter.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterAdapter, FilterDirector } from
|
|
1
|
+
import { FilterAdapter, FilterDirector } from "../core-index.js";
|
|
2
2
|
export default function registerProductSearchFilter({ orderIndex = 0, search, }) {
|
|
3
3
|
FilterDirector.registerAdapter({
|
|
4
4
|
...FilterAdapter,
|
|
@@ -21,4 +21,3 @@ export default function registerProductSearchFilter({ orderIndex = 0, search, })
|
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
//# sourceMappingURL=registerProductSearchFilter.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DeliveryConfiguration } from '@unchainedshop/core-delivery';
|
|
2
|
-
import { DeliveryContext } from '../core-index.
|
|
3
|
-
import { Work } from '@unchainedshop/core-worker';
|
|
1
|
+
import type { DeliveryConfiguration } from '@unchainedshop/core-delivery';
|
|
2
|
+
import { type DeliveryContext } from '../core-index.ts';
|
|
3
|
+
import type { Work } from '@unchainedshop/core-worker';
|
|
4
4
|
export default function registerShippingDelivery({ adapterId, active, autoReleaseAllowed, estimatedDeliveryThroughput, send, }: {
|
|
5
5
|
adapterId: string;
|
|
6
6
|
active?: boolean;
|
|
@@ -8,4 +8,3 @@ export default function registerShippingDelivery({ adapterId, active, autoReleas
|
|
|
8
8
|
estimatedDeliveryThroughput?: (warehousingThroughputTime: number, context: DeliveryContext) => Promise<number | null>;
|
|
9
9
|
send: boolean | ((configuration: DeliveryConfiguration, context: DeliveryContext) => Promise<boolean | Work>);
|
|
10
10
|
}): void;
|
|
11
|
-
//# sourceMappingURL=registerShippingDelivery.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeliveryProviderType } from '@unchainedshop/core-delivery';
|
|
2
|
-
import { DeliveryAdapter, DeliveryDirector } from
|
|
2
|
+
import { DeliveryAdapter, DeliveryDirector } from "../core-index.js";
|
|
3
3
|
export default function registerShippingDelivery({ adapterId, active, autoReleaseAllowed, estimatedDeliveryThroughput, send, }) {
|
|
4
4
|
DeliveryDirector.registerAdapter({
|
|
5
5
|
...DeliveryAdapter,
|
|
@@ -35,4 +35,3 @@ export default function registerShippingDelivery({ adapterId, active, autoReleas
|
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//# sourceMappingURL=registerShippingDelivery.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TokenSurrogate, WarehousingConfiguration } from '@unchainedshop/core-warehousing';
|
|
2
|
-
import { WarehousingContext } from '../core-index.
|
|
1
|
+
import { type TokenSurrogate, type WarehousingConfiguration } from '@unchainedshop/core-warehousing';
|
|
2
|
+
import { type WarehousingContext } from '../core-index.ts';
|
|
3
3
|
export default function registerVirtualWarehousing<Metadata = Record<string, any>>({ adapterId, orderIndex, stock, tokenize, tokenMetadata, isInvalidateable, }: {
|
|
4
4
|
adapterId: string;
|
|
5
5
|
orderIndex?: number;
|
|
@@ -8,4 +8,3 @@ export default function registerVirtualWarehousing<Metadata = Record<string, any
|
|
|
8
8
|
tokenMetadata?: (serialNumber: string, referenceDate: Date, configuration: WarehousingConfiguration, context: WarehousingContext) => Promise<Metadata>;
|
|
9
9
|
isInvalidateable?: (serialNumber: string, referenceDate: Date, configuration: WarehousingConfiguration, context: WarehousingContext) => Promise<boolean>;
|
|
10
10
|
}): void;
|
|
11
|
-
//# sourceMappingURL=registerVirtualWarehousing.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WarehousingProviderType, } from '@unchainedshop/core-warehousing';
|
|
2
|
-
import { WarehousingAdapter, WarehousingDirector } from
|
|
2
|
+
import { WarehousingAdapter, WarehousingDirector } from "../core-index.js";
|
|
3
3
|
export default function registerVirtualWarehousing({ adapterId, orderIndex = 0, stock, tokenize, tokenMetadata, isInvalidateable, }) {
|
|
4
4
|
WarehousingDirector.registerAdapter({
|
|
5
5
|
...WarehousingAdapter,
|
|
@@ -48,4 +48,3 @@ export default function registerVirtualWarehousing({ adapterId, orderIndex = 0,
|
|
|
48
48
|
},
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
//# sourceMappingURL=registerVirtualWarehousing.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WorkerAdapter, WorkerDirector } from
|
|
1
|
+
import { WorkerAdapter, WorkerDirector } from "../core-index.js";
|
|
2
2
|
export default function registerWorker({ type, external, maxParallelAllocations, process, }) {
|
|
3
3
|
WorkerDirector.registerAdapter({
|
|
4
4
|
...WorkerAdapter,
|
|
@@ -32,4 +32,3 @@ export default function registerWorker({ type, external, maxParallelAllocations,
|
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=registerWorker.js.map
|
package/lib/modules.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { AssortmentsModule, AssortmentsSettingsOptions } from '@unchainedshop/core-assortments';
|
|
2
|
-
import { BookmarksModule } from '@unchainedshop/core-bookmarks';
|
|
3
|
-
import { CountriesModule } from '@unchainedshop/core-countries';
|
|
4
|
-
import { CurrenciesModule } from '@unchainedshop/core-currencies';
|
|
5
|
-
import { DeliveryModule, DeliverySettingsOptions } from '@unchainedshop/core-delivery';
|
|
6
|
-
import { EnrollmentsModule, EnrollmentsSettingsOptions } from '@unchainedshop/core-enrollments';
|
|
7
|
-
import { EventsModule } from '@unchainedshop/core-events';
|
|
8
|
-
import { FilesModule, FilesSettingsOptions } from '@unchainedshop/core-files';
|
|
9
|
-
import { FiltersModule, FiltersSettingsOptions } from '@unchainedshop/core-filters';
|
|
10
|
-
import { LanguagesModule } from '@unchainedshop/core-languages';
|
|
11
|
-
import { OrdersModule, OrdersSettingsOptions } from '@unchainedshop/core-orders';
|
|
12
|
-
import { PaymentModule, PaymentSettingsOptions } from '@unchainedshop/core-payment';
|
|
13
|
-
import { ProductsModule, ProductsSettingsOptions } from '@unchainedshop/core-products';
|
|
14
|
-
import { QuotationsModule, QuotationsSettingsOptions } from '@unchainedshop/core-quotations';
|
|
15
|
-
import { UserSettingsOptions, UsersModule } from '@unchainedshop/core-users';
|
|
16
|
-
import { WarehousingModule } from '@unchainedshop/core-warehousing';
|
|
17
|
-
import { WorkerModule, WorkerSettingsOptions } from '@unchainedshop/core-worker';
|
|
18
|
-
import { MigrationRepository, ModuleInput, mongodb } from '@unchainedshop/mongodb';
|
|
1
|
+
import { type AssortmentsModule, type AssortmentsSettingsOptions } from '@unchainedshop/core-assortments';
|
|
2
|
+
import { type BookmarksModule } from '@unchainedshop/core-bookmarks';
|
|
3
|
+
import { type CountriesModule } from '@unchainedshop/core-countries';
|
|
4
|
+
import { type CurrenciesModule } from '@unchainedshop/core-currencies';
|
|
5
|
+
import { type DeliveryModule, type DeliverySettingsOptions } from '@unchainedshop/core-delivery';
|
|
6
|
+
import { type EnrollmentsModule, type EnrollmentsSettingsOptions } from '@unchainedshop/core-enrollments';
|
|
7
|
+
import { type EventsModule } from '@unchainedshop/core-events';
|
|
8
|
+
import { type FilesModule, type FilesSettingsOptions } from '@unchainedshop/core-files';
|
|
9
|
+
import { type FiltersModule, type FiltersSettingsOptions } from '@unchainedshop/core-filters';
|
|
10
|
+
import { type LanguagesModule } from '@unchainedshop/core-languages';
|
|
11
|
+
import { type OrdersModule, type OrdersSettingsOptions } from '@unchainedshop/core-orders';
|
|
12
|
+
import { type PaymentModule, type PaymentSettingsOptions } from '@unchainedshop/core-payment';
|
|
13
|
+
import { type ProductsModule, type ProductsSettingsOptions } from '@unchainedshop/core-products';
|
|
14
|
+
import { type QuotationsModule, type QuotationsSettingsOptions } from '@unchainedshop/core-quotations';
|
|
15
|
+
import { type UserSettingsOptions, type UsersModule } from '@unchainedshop/core-users';
|
|
16
|
+
import { type WarehousingModule } from '@unchainedshop/core-warehousing';
|
|
17
|
+
import { type WorkerModule, type WorkerSettingsOptions } from '@unchainedshop/core-worker';
|
|
18
|
+
import { type MigrationRepository, type ModuleInput, type mongodb } from '@unchainedshop/mongodb';
|
|
19
19
|
export interface Modules {
|
|
20
20
|
assortments: AssortmentsModule;
|
|
21
21
|
bookmarks: BookmarksModule;
|
|
@@ -55,4 +55,3 @@ export default function initModules({ db, migrationRepository, options, }: {
|
|
|
55
55
|
}, customModules: Record<string, {
|
|
56
56
|
configure: (params: ModuleInput<any>) => any;
|
|
57
57
|
}>): Promise<Modules>;
|
|
58
|
-
//# sourceMappingURL=modules.d.ts.map
|
package/lib/modules.js
CHANGED
|
@@ -5,16 +5,17 @@ import { configureCurrenciesModule } from '@unchainedshop/core-currencies';
|
|
|
5
5
|
import { configureDeliveryModule, } from '@unchainedshop/core-delivery';
|
|
6
6
|
import { configureEnrollmentsModule, } from '@unchainedshop/core-enrollments';
|
|
7
7
|
import { configureEventsModule } from '@unchainedshop/core-events';
|
|
8
|
-
import { configureFilesModule } from '@unchainedshop/core-files';
|
|
8
|
+
import { configureFilesModule, } from '@unchainedshop/core-files';
|
|
9
9
|
import { configureFiltersModule, } from '@unchainedshop/core-filters';
|
|
10
10
|
import { configureLanguagesModule } from '@unchainedshop/core-languages';
|
|
11
|
-
import { configureOrdersModule } from '@unchainedshop/core-orders';
|
|
11
|
+
import { configureOrdersModule, } from '@unchainedshop/core-orders';
|
|
12
12
|
import { configurePaymentModule, } from '@unchainedshop/core-payment';
|
|
13
13
|
import { configureProductsModule, } from '@unchainedshop/core-products';
|
|
14
14
|
import { configureQuotationsModule, } from '@unchainedshop/core-quotations';
|
|
15
|
-
import { configureUsersModule } from '@unchainedshop/core-users';
|
|
15
|
+
import { configureUsersModule, } from '@unchainedshop/core-users';
|
|
16
16
|
import { configureWarehousingModule } from '@unchainedshop/core-warehousing';
|
|
17
|
-
import { configureWorkerModule } from '@unchainedshop/core-worker';
|
|
17
|
+
import { configureWorkerModule, } from '@unchainedshop/core-worker';
|
|
18
|
+
import {} from '@unchainedshop/mongodb';
|
|
18
19
|
export default async function initModules({ db, migrationRepository, options, }, customModules) {
|
|
19
20
|
const assortments = await configureAssortmentsModule({
|
|
20
21
|
db,
|
|
@@ -123,4 +124,3 @@ export default async function initModules({ db, migrationRepository, options, },
|
|
|
123
124
|
}
|
|
124
125
|
return modules;
|
|
125
126
|
}
|
|
126
|
-
//# sourceMappingURL=modules.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
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 activateEnrollmentService(this: Modules, enrollment: Enrollment): Promise<Enrollment>;
|
|
4
|
-
//# sourceMappingURL=activateEnrollment.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 activateEnrollmentService(enrollment) {
|
|
5
5
|
if (enrollment.status === EnrollmentStatus.TERMINATED)
|
|
6
6
|
return enrollment;
|
|
@@ -18,4 +18,3 @@ export async function activateEnrollmentService(enrollment) {
|
|
|
18
18
|
});
|
|
19
19
|
return updatedEnrollment;
|
|
20
20
|
}
|
|
21
|
-
//# sourceMappingURL=activateEnrollment.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Work } from '@unchainedshop/core-worker';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Work } from '@unchainedshop/core-worker';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function addMessageService<T = Record<string, any>>(this: Modules, template: string, input: T): Promise<Work | null>;
|
|
4
|
-
//# sourceMappingURL=addMessage.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MessagingDirector } from
|
|
1
|
+
import { MessagingDirector } from "../core-index.js";
|
|
2
2
|
export async function addMessageService(template, input) {
|
|
3
|
-
const templateResolver = MessagingDirector.getTemplate(template);
|
|
3
|
+
const templateResolver = MessagingDirector.getTemplate(template);
|
|
4
4
|
if (!templateResolver)
|
|
5
5
|
return null;
|
|
6
6
|
return this.worker.addWork({
|
|
@@ -12,4 +12,3 @@ export async function addMessageService(template, input) {
|
|
|
12
12
|
retries: 0,
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=addMessage.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
|
+
import type { Order } from '@unchainedshop/core-orders';
|
|
3
|
+
export declare function addMultipleCartProductsService(this: Modules, { orderId, items, context, }: {
|
|
4
|
+
orderId: string;
|
|
5
|
+
items: {
|
|
6
|
+
productId: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
configuration?: {
|
|
9
|
+
key: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
}[];
|
|
13
|
+
context: {
|
|
14
|
+
localeContext: Intl.Locale;
|
|
15
|
+
userId?: string;
|
|
16
|
+
countryCode?: string;
|
|
17
|
+
};
|
|
18
|
+
}): Promise<Order | null>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ordersSettings } from '@unchainedshop/core-orders';
|
|
2
|
+
export async function addMultipleCartProductsService({ orderId, items, context, }) {
|
|
3
|
+
const order = await this.orders.findOrder({ orderId });
|
|
4
|
+
if (!order)
|
|
5
|
+
return null;
|
|
6
|
+
for (const { productId, quantity, configuration } of items) {
|
|
7
|
+
const originalProduct = await this.products.findProduct({ productId });
|
|
8
|
+
if (!originalProduct) {
|
|
9
|
+
throw new Error(`Product not found: ${productId}`);
|
|
10
|
+
}
|
|
11
|
+
if (quantity < 1) {
|
|
12
|
+
throw new Error(`Invalid quantity for product: ${productId}`);
|
|
13
|
+
}
|
|
14
|
+
const product = await this.products.resolveOrderableProduct(originalProduct, { configuration });
|
|
15
|
+
await ordersSettings.validateOrderPosition({ order, product, configuration, quantityDiff: quantity }, { modules: this, ...context });
|
|
16
|
+
await this.orders.positions.addProductItem({
|
|
17
|
+
quantity,
|
|
18
|
+
configuration,
|
|
19
|
+
originalProductId: originalProduct._id,
|
|
20
|
+
productId: product._id,
|
|
21
|
+
orderId: order._id,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return order;
|
|
25
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Order, OrderDiscount } from '@unchainedshop/core-orders';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Order, OrderDiscount } from '@unchainedshop/core-orders';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function calculateDiscountTotalService(this: Modules, order: Order, orderDiscount: OrderDiscount): Promise<{
|
|
4
4
|
amount: number;
|
|
5
5
|
currencyCode: string;
|
|
6
6
|
}>;
|
|
7
|
-
//# sourceMappingURL=calculateDiscountTotal.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { OrderPricingRowCategory, OrderPricingSheet, DeliveryPricingRowCategory, DeliveryPricingSheet, ProductPricingRowCategory, ProductPricingSheet, PaymentPricingRowCategory, PaymentPricingSheet, } from
|
|
1
|
+
import { OrderPricingRowCategory, OrderPricingSheet, DeliveryPricingRowCategory, DeliveryPricingSheet, ProductPricingRowCategory, ProductPricingSheet, PaymentPricingRowCategory, PaymentPricingSheet, } from "../directors/index.js";
|
|
2
2
|
export async function calculateDiscountTotalService(order, orderDiscount) {
|
|
3
3
|
const orderDiscountId = orderDiscount._id;
|
|
4
|
-
// Delivery discounts
|
|
5
4
|
const orderDelivery = await this.orders.deliveries.findDelivery({
|
|
6
5
|
orderDeliveryId: order.deliveryId,
|
|
7
6
|
});
|
|
@@ -9,7 +8,6 @@ export async function calculateDiscountTotalService(order, orderDiscount) {
|
|
|
9
8
|
calculation: orderDelivery?.calculation || [],
|
|
10
9
|
currencyCode: order.currencyCode,
|
|
11
10
|
}).total({ category: DeliveryPricingRowCategory.Discount, discountId: orderDiscountId });
|
|
12
|
-
// Payment discounts
|
|
13
11
|
const orderPayment = await this.orders.payments.findOrderPayment({
|
|
14
12
|
orderPaymentId: order.paymentId,
|
|
15
13
|
});
|
|
@@ -17,7 +15,6 @@ export async function calculateDiscountTotalService(order, orderDiscount) {
|
|
|
17
15
|
calculation: orderPayment?.calculation || [],
|
|
18
16
|
currencyCode: order.currencyCode,
|
|
19
17
|
}).total({ category: PaymentPricingRowCategory.Discount, discountId: orderDiscountId });
|
|
20
|
-
// Position discounts
|
|
21
18
|
const orderPositions = await this.orders.positions.findOrderPositions({
|
|
22
19
|
orderId: order._id,
|
|
23
20
|
});
|
|
@@ -29,7 +26,6 @@ export async function calculateDiscountTotalService(order, orderDiscount) {
|
|
|
29
26
|
category: ProductPricingRowCategory.Discount,
|
|
30
27
|
discountId: orderDiscountId,
|
|
31
28
|
}));
|
|
32
|
-
// order discounts
|
|
33
29
|
const orderDiscountSum = OrderPricingSheet({
|
|
34
30
|
calculation: order.calculation,
|
|
35
31
|
currencyCode: order.currencyCode,
|
|
@@ -46,4 +42,3 @@ export async function calculateDiscountTotalService(order, orderDiscount) {
|
|
|
46
42
|
currencyCode: order.currencyCode,
|
|
47
43
|
};
|
|
48
44
|
}
|
|
49
|
-
//# sourceMappingURL=calculateDiscountTotal.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { OrderStatus } from '@unchainedshop/core-orders';
|
|
2
|
-
import { Modules } from '../modules.
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function checkoutOrderService(this: Modules, orderId: string, transactionContext: {
|
|
4
4
|
paymentContext?: any;
|
|
5
5
|
deliveryContext?: any;
|
|
6
6
|
comment?: string;
|
|
7
7
|
nextStatus?: OrderStatus;
|
|
8
8
|
}): Promise<import("@unchainedshop/core-orders").Order | null>;
|
|
9
|
-
//# sourceMappingURL=checkoutOrder.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { OrderStatus } from '@unchainedshop/core-orders';
|
|
2
|
+
import { nextUserCartService } from "./nextUserCart.js";
|
|
3
|
+
import { validateOrderService } from "./validateOrder.js";
|
|
4
|
+
import { processOrderService } from "./processOrder.js";
|
|
4
5
|
export async function checkoutOrderService(orderId, transactionContext) {
|
|
5
6
|
const order = await this.orders.findOrder({ orderId });
|
|
6
7
|
if (!order)
|
|
@@ -11,14 +12,12 @@ export async function checkoutOrderService(orderId, transactionContext) {
|
|
|
11
12
|
const lock = await this.orders.acquireLock(order._id, 'checkout');
|
|
12
13
|
try {
|
|
13
14
|
const processedOrder = await processOrderService.bind(this)(order, transactionContext);
|
|
14
|
-
// After checkout, store last checkout information on user
|
|
15
15
|
if (processedOrder.billingAddress) {
|
|
16
16
|
await this.users.updateLastBillingAddress(processedOrder.userId, processedOrder.billingAddress);
|
|
17
17
|
}
|
|
18
18
|
if (processedOrder.contact) {
|
|
19
19
|
await this.users.updateLastContact(processedOrder.userId, processedOrder.contact);
|
|
20
20
|
}
|
|
21
|
-
// Then eventually build next cart
|
|
22
21
|
const user = (await this.users.findUserById(processedOrder.userId));
|
|
23
22
|
const locale = this.users.userLocale(user);
|
|
24
23
|
await nextUserCartService.bind(this)({
|
|
@@ -31,4 +30,3 @@ export async function checkoutOrderService(orderId, transactionContext) {
|
|
|
31
30
|
await lock.release();
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
//# sourceMappingURL=checkoutOrder.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Order, OrderStatus } from '@unchainedshop/core-orders';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type Order, OrderStatus } from '@unchainedshop/core-orders';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function confirmOrderService(this: Modules, order: Order, transactionContext: {
|
|
4
4
|
paymentContext?: any;
|
|
5
5
|
deliveryContext?: any;
|
|
6
6
|
comment?: string;
|
|
7
7
|
nextStatus?: OrderStatus;
|
|
8
8
|
}): Promise<Order>;
|
|
9
|
-
//# sourceMappingURL=confirmOrder.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrderStatus } from '@unchainedshop/core-orders';
|
|
2
|
-
import { processOrderService } from
|
|
2
|
+
import { processOrderService } from "./processOrder.js";
|
|
3
3
|
export async function confirmOrderService(order, transactionContext) {
|
|
4
4
|
if (order.status !== OrderStatus.PENDING)
|
|
5
5
|
return order;
|
|
@@ -14,4 +14,3 @@ export async function confirmOrderService(order, transactionContext) {
|
|
|
14
14
|
await lock.release();
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
//# sourceMappingURL=confirmOrder.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
2
|
export declare function createDownloadStreamService(this: Modules, { fileId, }: {
|
|
3
3
|
fileId: string;
|
|
4
|
-
}): Promise<import("stream").Readable | null>;
|
|
5
|
-
//# sourceMappingURL=createDownloadStream.d.ts.map
|
|
4
|
+
}): Promise<import("node:stream").Readable | null>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Order, OrderPosition } from '@unchainedshop/core-orders';
|
|
2
|
-
import { Product } from '@unchainedshop/core-products';
|
|
3
|
-
import { Enrollment } from '@unchainedshop/core-enrollments';
|
|
4
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Order, OrderPosition } from '@unchainedshop/core-orders';
|
|
2
|
+
import type { Product } from '@unchainedshop/core-products';
|
|
3
|
+
import type { Enrollment } from '@unchainedshop/core-enrollments';
|
|
4
|
+
import type { Modules } from '../modules.ts';
|
|
5
5
|
export declare function createEnrollmentFromCheckoutService(this: Modules, order: Order, { items, context, }: {
|
|
6
6
|
items: {
|
|
7
7
|
orderPosition: OrderPosition;
|
|
@@ -12,4 +12,3 @@ export declare function createEnrollmentFromCheckoutService(this: Modules, order
|
|
|
12
12
|
deliveryContext?: any;
|
|
13
13
|
};
|
|
14
14
|
}): Promise<Enrollment[]>;
|
|
15
|
-
//# sourceMappingURL=createEnrollmentFromCheckout.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EnrollmentDirector } from
|
|
2
|
-
import { initializeEnrollmentService } from
|
|
1
|
+
import { EnrollmentDirector } from "../directors/index.js";
|
|
2
|
+
import { initializeEnrollmentService } from "./initializeEnrollment.js";
|
|
3
3
|
export async function createEnrollmentFromCheckoutService(order, { items, context, }) {
|
|
4
4
|
const orderId = order._id;
|
|
5
5
|
const payment = await this.orders.payments.findOrderPayment({
|
|
@@ -37,4 +37,3 @@ export async function createEnrollmentFromCheckoutService(order, { items, contex
|
|
|
37
37
|
});
|
|
38
38
|
}))).filter(Boolean);
|
|
39
39
|
}
|
|
40
|
-
//# sourceMappingURL=createEnrollmentFromCheckout.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type File } from '@unchainedshop/core-files';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
|
+
export declare function createFileDownloadURLService(this: Modules, { file, expires, params, }: {
|
|
4
|
+
file: File;
|
|
5
|
+
expires?: number;
|
|
6
|
+
params?: Record<string, any>;
|
|
7
|
+
}): Promise<string | null>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getFileAdapter } from '@unchainedshop/core-files';
|
|
2
|
+
export async function createFileDownloadURLService({ file, expires, params = {}, }) {
|
|
3
|
+
if (!file)
|
|
4
|
+
return null;
|
|
5
|
+
const fileUploadAdapter = getFileAdapter();
|
|
6
|
+
const url = await fileUploadAdapter.createDownloadURL(file, expires);
|
|
7
|
+
if (!url)
|
|
8
|
+
return null;
|
|
9
|
+
return this.files.normalizeUrl(url, params);
|
|
10
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
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 createManualOrderDiscountService(this: Modules, { order, code }: {
|
|
4
4
|
code: string;
|
|
5
5
|
order: Order;
|
|
6
6
|
}): Promise<import("mongodb").WithId<import("@unchainedshop/core-orders").OrderDiscount> | null>;
|
|
7
|
-
//# sourceMappingURL=createManualOrderDiscount.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { OrderDiscountDirector } from
|
|
1
|
+
import { OrderDiscountDirector } from "../directors/OrderDiscountDirector.js";
|
|
2
2
|
export async function createManualOrderDiscountService({ order, code }) {
|
|
3
|
-
// Use an already existing discount if available!
|
|
4
3
|
const spareDiscount = await this.orders.discounts.findSpareDiscount({ code });
|
|
5
4
|
if (spareDiscount) {
|
|
6
5
|
const Adapter = OrderDiscountDirector.getAdapter(spareDiscount.discountKey);
|
|
@@ -44,4 +43,3 @@ export async function createManualOrderDiscountService({ order, code }) {
|
|
|
44
43
|
throw error;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
//# sourceMappingURL=createManualOrderDiscount.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { SignedFileUpload } from '@unchainedshop/core-files';
|
|
2
|
-
import { Modules } from '../modules.
|
|
1
|
+
import { type SignedFileUpload } from '@unchainedshop/core-files';
|
|
2
|
+
import type { Modules } from '../modules.ts';
|
|
3
3
|
export declare function createSignedURLService(this: Modules, { directoryName, fileName, meta }: {
|
|
4
4
|
directoryName: string;
|
|
5
5
|
fileName: string;
|
|
6
6
|
meta?: any;
|
|
7
7
|
}): Promise<SignedFileUpload>;
|
|
8
|
-
//# sourceMappingURL=createSignedURL.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Modules } from '../modules.
|
|
1
|
+
import type { Modules } from '../modules.ts';
|
|
2
2
|
export declare function deleteUserService(this: Modules, { userId }: {
|
|
3
3
|
userId: string;
|
|
4
4
|
}): Promise<import("mongodb").WithId<import("@unchainedshop/core-users").User> | null>;
|
|
5
|
-
//# sourceMappingURL=deleteUser.d.ts.map
|
|
@@ -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
|