@unchainedshop/core 4.0.0-rc.9 → 4.0.1
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/lib/bulk-importer/createBulkImporter.d.ts +84 -0
- package/lib/bulk-importer/createBulkImporter.d.ts.map +1 -0
- package/lib/bulk-importer/createBulkImporter.js +142 -0
- package/lib/bulk-importer/createBulkImporter.js.map +1 -0
- package/lib/bulk-importer/handlers/assortment/create.d.ts +565 -0
- package/lib/bulk-importer/handlers/assortment/create.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/assortment/create.js +89 -0
- package/lib/bulk-importer/handlers/assortment/create.js.map +1 -0
- package/lib/bulk-importer/handlers/assortment/index.d.ts +4 -0
- package/lib/bulk-importer/handlers/assortment/index.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/assortment/index.js +4 -0
- package/lib/bulk-importer/handlers/assortment/index.js.map +1 -0
- package/lib/bulk-importer/handlers/assortment/remove.d.ts +30 -0
- package/lib/bulk-importer/handlers/assortment/remove.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/assortment/remove.js +18 -0
- package/lib/bulk-importer/handlers/assortment/remove.js.map +1 -0
- package/lib/bulk-importer/handlers/assortment/update.d.ts +566 -0
- package/lib/bulk-importer/handlers/assortment/update.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/assortment/update.js +98 -0
- package/lib/bulk-importer/handlers/assortment/update.js.map +1 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts +29 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js +45 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js.map +1 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts +29 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js +41 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js.map +1 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts +29 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js +46 -0
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js.map +1 -0
- package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts +76 -0
- package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/assortment/upsertMedia.js +53 -0
- package/lib/bulk-importer/handlers/assortment/upsertMedia.js.map +1 -0
- package/lib/bulk-importer/handlers/filter/create.d.ts +138 -0
- package/lib/bulk-importer/handlers/filter/create.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/filter/create.js +80 -0
- package/lib/bulk-importer/handlers/filter/create.js.map +1 -0
- package/lib/bulk-importer/handlers/filter/index.d.ts +4 -0
- package/lib/bulk-importer/handlers/filter/index.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/filter/index.js +4 -0
- package/lib/bulk-importer/handlers/filter/index.js.map +1 -0
- package/lib/bulk-importer/handlers/filter/remove.d.ts +20 -0
- package/lib/bulk-importer/handlers/filter/remove.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/filter/remove.js +18 -0
- package/lib/bulk-importer/handlers/filter/remove.js.map +1 -0
- package/lib/bulk-importer/handlers/filter/update.d.ts +138 -0
- package/lib/bulk-importer/handlers/filter/update.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/filter/update.js +70 -0
- package/lib/bulk-importer/handlers/filter/update.js.map +1 -0
- package/lib/bulk-importer/handlers/product/create.d.ts +1330 -0
- package/lib/bulk-importer/handlers/product/create.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/product/create.js +132 -0
- package/lib/bulk-importer/handlers/product/create.js.map +1 -0
- package/lib/bulk-importer/handlers/product/index.d.ts +4 -0
- package/lib/bulk-importer/handlers/product/index.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/product/index.js +4 -0
- package/lib/bulk-importer/handlers/product/index.js.map +1 -0
- package/lib/bulk-importer/handlers/product/remove.d.ts +32 -0
- package/lib/bulk-importer/handlers/product/remove.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/product/remove.js +18 -0
- package/lib/bulk-importer/handlers/product/remove.js.map +1 -0
- package/lib/bulk-importer/handlers/product/update.d.ts +1330 -0
- package/lib/bulk-importer/handlers/product/update.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/product/update.js +132 -0
- package/lib/bulk-importer/handlers/product/update.js.map +1 -0
- package/lib/bulk-importer/handlers/product/upsertMedia.d.ts +75 -0
- package/lib/bulk-importer/handlers/product/upsertMedia.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/product/upsertMedia.js +59 -0
- package/lib/bulk-importer/handlers/product/upsertMedia.js.map +1 -0
- package/lib/bulk-importer/handlers/product/upsertVariations.d.ts +79 -0
- package/lib/bulk-importer/handlers/product/upsertVariations.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/product/upsertVariations.js +72 -0
- package/lib/bulk-importer/handlers/product/upsertVariations.js.map +1 -0
- package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.d.ts +3 -0
- package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.d.ts.map +1 -0
- package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.js +6 -0
- package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.js.map +1 -0
- package/lib/bulk-importer/index.d.ts +4 -0
- package/lib/bulk-importer/index.d.ts.map +1 -0
- package/lib/bulk-importer/index.js +4 -0
- package/lib/bulk-importer/index.js.map +1 -0
- package/lib/bulk-importer/upsertAsset.d.ts +28 -0
- package/lib/bulk-importer/upsertAsset.d.ts.map +1 -0
- package/lib/bulk-importer/upsertAsset.js +41 -0
- package/lib/bulk-importer/upsertAsset.js.map +1 -0
- package/lib/core-index.d.ts +9 -6
- package/lib/core-index.d.ts.map +1 -1
- package/lib/core-index.js +5 -1
- package/lib/core-index.js.map +1 -1
- package/lib/directors/BaseDiscountAdapter.d.ts +4 -4
- package/lib/directors/BaseDiscountAdapter.d.ts.map +1 -1
- package/lib/directors/BaseDiscountAdapter.js +1 -1
- package/lib/directors/BaseDiscountAdapter.js.map +1 -1
- package/lib/directors/BaseDiscountDirector.d.ts +1 -1
- package/lib/directors/BaseDiscountDirector.d.ts.map +1 -1
- package/lib/directors/BaseDiscountDirector.js +1 -1
- package/lib/directors/BaseDiscountDirector.js.map +1 -1
- package/lib/directors/BasePricingAdapter.d.ts +2 -2
- package/lib/directors/BasePricingAdapter.d.ts.map +1 -1
- package/lib/directors/BasePricingDirector.d.ts.map +1 -1
- package/lib/directors/BasePricingDirector.js +3 -3
- package/lib/directors/BasePricingDirector.js.map +1 -1
- package/lib/directors/BasePricingSheet.js.map +1 -1
- package/lib/directors/BaseWorker.js +1 -1
- package/lib/directors/BaseWorker.js.map +1 -1
- package/lib/directors/DeliveryAdapter.d.ts +3 -3
- package/lib/directors/DeliveryAdapter.d.ts.map +1 -1
- package/lib/directors/DeliveryDirector.d.ts +3 -3
- package/lib/directors/DeliveryDirector.d.ts.map +1 -1
- package/lib/directors/DeliveryDirector.js +29 -16
- package/lib/directors/DeliveryDirector.js.map +1 -1
- package/lib/directors/DeliveryPricingAdapter.d.ts +1 -1
- package/lib/directors/DeliveryPricingAdapter.d.ts.map +1 -1
- package/lib/directors/DeliveryPricingDirector.d.ts.map +1 -1
- package/lib/directors/DeliveryPricingDirector.js +3 -4
- package/lib/directors/DeliveryPricingDirector.js.map +1 -1
- package/lib/directors/DeliveryPricingSheet.d.ts.map +1 -1
- package/lib/directors/DeliveryPricingSheet.js +2 -1
- package/lib/directors/DeliveryPricingSheet.js.map +1 -1
- package/lib/directors/EnrollmentAdapter.d.ts +7 -4
- package/lib/directors/EnrollmentAdapter.d.ts.map +1 -1
- package/lib/directors/EnrollmentAdapter.js +1 -4
- package/lib/directors/EnrollmentAdapter.js.map +1 -1
- package/lib/directors/EnrollmentDirector.d.ts +1 -1
- package/lib/directors/EnrollmentDirector.d.ts.map +1 -1
- package/lib/directors/EnrollmentDirector.js +1 -5
- package/lib/directors/EnrollmentDirector.js.map +1 -1
- package/lib/directors/FilterAdapter.d.ts +3 -3
- package/lib/directors/FilterAdapter.d.ts.map +1 -1
- package/lib/directors/FilterDirector.d.ts +1 -1
- package/lib/directors/FilterDirector.d.ts.map +1 -1
- package/lib/directors/FilterDirector.js +7 -8
- package/lib/directors/FilterDirector.js.map +1 -1
- package/lib/directors/MessagingDirector.d.ts +2 -2
- package/lib/directors/MessagingDirector.d.ts.map +1 -1
- package/lib/directors/OrderDiscountAdapter.d.ts +1 -1
- package/lib/directors/OrderDiscountAdapter.d.ts.map +1 -1
- package/lib/directors/OrderDiscountAdapter.js.map +1 -1
- package/lib/directors/OrderPricingAdapter.d.ts +2 -2
- package/lib/directors/OrderPricingAdapter.d.ts.map +1 -1
- package/lib/directors/OrderPricingDirector.d.ts +2 -2
- package/lib/directors/OrderPricingDirector.d.ts.map +1 -1
- package/lib/directors/OrderPricingDirector.js +1 -1
- package/lib/directors/OrderPricingDirector.js.map +1 -1
- package/lib/directors/OrderPricingSheet.d.ts.map +1 -1
- package/lib/directors/OrderPricingSheet.js +2 -1
- package/lib/directors/OrderPricingSheet.js.map +1 -1
- package/lib/directors/PaymentAdapter.d.ts +2 -2
- package/lib/directors/PaymentAdapter.d.ts.map +1 -1
- package/lib/directors/PaymentDirector.d.ts +4 -4
- package/lib/directors/PaymentDirector.d.ts.map +1 -1
- package/lib/directors/PaymentDirector.js +24 -6
- package/lib/directors/PaymentDirector.js.map +1 -1
- package/lib/directors/PaymentPricingAdapter.d.ts +2 -2
- package/lib/directors/PaymentPricingAdapter.d.ts.map +1 -1
- package/lib/directors/PaymentPricingDirector.d.ts +1 -1
- package/lib/directors/PaymentPricingDirector.d.ts.map +1 -1
- package/lib/directors/PaymentPricingDirector.js +3 -5
- package/lib/directors/PaymentPricingDirector.js.map +1 -1
- package/lib/directors/PaymentPricingSheet.d.ts.map +1 -1
- package/lib/directors/PaymentPricingSheet.js +2 -1
- package/lib/directors/PaymentPricingSheet.js.map +1 -1
- package/lib/directors/ProductDiscountAdapter.d.ts +1 -1
- package/lib/directors/ProductDiscountAdapter.d.ts.map +1 -1
- package/lib/directors/ProductDiscountAdapter.js.map +1 -1
- package/lib/directors/ProductDiscountConfiguration.d.ts +1 -1
- package/lib/directors/ProductDiscountConfiguration.d.ts.map +1 -1
- package/lib/directors/ProductPricingAdapter.d.ts +1 -1
- package/lib/directors/ProductPricingAdapter.d.ts.map +1 -1
- package/lib/directors/ProductPricingDirector.d.ts +2 -2
- package/lib/directors/ProductPricingDirector.d.ts.map +1 -1
- package/lib/directors/ProductPricingDirector.js +5 -5
- package/lib/directors/ProductPricingDirector.js.map +1 -1
- package/lib/directors/ProductPricingSheet.d.ts +2 -2
- package/lib/directors/ProductPricingSheet.d.ts.map +1 -1
- package/lib/directors/ProductPricingSheet.js +2 -1
- package/lib/directors/ProductPricingSheet.js.map +1 -1
- package/lib/directors/QuotationAdapter.d.ts +2 -2
- package/lib/directors/QuotationAdapter.d.ts.map +1 -1
- package/lib/directors/QuotationDirector.js +2 -2
- package/lib/directors/WarehousingAdapter.d.ts +3 -4
- package/lib/directors/WarehousingAdapter.d.ts.map +1 -1
- package/lib/directors/WarehousingAdapter.js.map +1 -1
- package/lib/directors/WarehousingDirector.d.ts +5 -5
- package/lib/directors/WarehousingDirector.d.ts.map +1 -1
- package/lib/directors/WarehousingDirector.js +10 -13
- package/lib/directors/WarehousingDirector.js.map +1 -1
- package/lib/directors/WorkerAdapter.d.ts +3 -2
- package/lib/directors/WorkerAdapter.d.ts.map +1 -1
- package/lib/directors/WorkerAdapter.js +1 -1
- package/lib/directors/WorkerAdapter.js.map +1 -1
- package/lib/directors/WorkerDirector.d.ts +2 -2
- package/lib/directors/WorkerDirector.d.ts.map +1 -1
- package/lib/directors/WorkerDirector.js +2 -3
- package/lib/directors/WorkerDirector.js.map +1 -1
- package/lib/factory/index.d.ts +3 -0
- package/lib/factory/index.d.ts.map +1 -0
- package/lib/factory/index.js +3 -0
- package/lib/factory/index.js.map +1 -0
- package/lib/factory/registerProductDiscoverabilityFilter.d.ts +5 -0
- package/lib/factory/registerProductDiscoverabilityFilter.d.ts.map +1 -0
- package/lib/factory/registerProductDiscoverabilityFilter.js +27 -0
- package/lib/factory/registerProductDiscoverabilityFilter.js.map +1 -0
- package/lib/modules.d.ts +4 -5
- package/lib/modules.d.ts.map +1 -1
- package/lib/modules.js +3 -3
- package/lib/modules.js.map +1 -1
- package/lib/services/activateEnrollment.d.ts.map +1 -1
- package/lib/services/activateEnrollment.js +8 -12
- package/lib/services/activateEnrollment.js.map +1 -1
- package/lib/services/addMessage.d.ts +4 -0
- package/lib/services/addMessage.d.ts.map +1 -0
- package/lib/services/addMessage.js +15 -0
- package/lib/services/addMessage.js.map +1 -0
- package/lib/services/calculateDiscountTotal.js +2 -2
- package/lib/services/calculateDiscountTotal.js.map +1 -1
- package/lib/services/checkoutOrder.d.ts +1 -1
- package/lib/services/checkoutOrder.d.ts.map +1 -1
- package/lib/services/checkoutOrder.js +10 -4
- package/lib/services/checkoutOrder.js.map +1 -1
- package/lib/services/confirmOrder.d.ts +1 -1
- package/lib/services/confirmOrder.d.ts.map +1 -1
- package/lib/services/createDownloadStream.d.ts +1 -1
- package/lib/services/createDownloadStream.d.ts.map +1 -1
- package/lib/services/createDownloadStream.js +2 -0
- package/lib/services/createDownloadStream.js.map +1 -1
- package/lib/services/createEnrollmentFromCheckout.d.ts.map +1 -1
- package/lib/services/createEnrollmentFromCheckout.js +2 -2
- package/lib/services/createEnrollmentFromCheckout.js.map +1 -1
- package/lib/services/createManualOrderDiscount.d.ts +2 -2
- package/lib/services/createManualOrderDiscount.d.ts.map +1 -1
- package/lib/services/createSignedURL.d.ts.map +1 -1
- package/lib/services/createSignedURL.js +2 -0
- package/lib/services/createSignedURL.js.map +1 -1
- package/lib/services/deleteUser.d.ts +1 -1
- package/lib/services/deleteUser.d.ts.map +1 -1
- package/lib/services/deleteUser.js +4 -2
- package/lib/services/deleteUser.js.map +1 -1
- package/lib/services/discountedEntities.js.map +1 -1
- package/lib/services/findOrInitCart.d.ts +1 -2
- package/lib/services/findOrInitCart.d.ts.map +1 -1
- package/lib/services/findOrInitCart.js.map +1 -1
- package/lib/services/fullfillQuotation.d.ts +1 -1
- package/lib/services/fullfillQuotation.d.ts.map +1 -1
- package/lib/services/fullfillQuotation.js.map +1 -1
- package/lib/services/generateOrderFromEnrollment.d.ts +7 -0
- package/lib/services/generateOrderFromEnrollment.d.ts.map +1 -0
- package/lib/services/generateOrderFromEnrollment.js +34 -0
- package/lib/services/generateOrderFromEnrollment.js.map +1 -0
- package/lib/services/index.d.ts +6 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +6 -0
- package/lib/services/index.js.map +1 -1
- package/lib/services/initCartProviders.d.ts.map +1 -1
- package/lib/services/initCartProviders.js +6 -2
- package/lib/services/initCartProviders.js.map +1 -1
- package/lib/services/initializeEnrollment.d.ts +1 -1
- package/lib/services/initializeEnrollment.d.ts.map +1 -1
- package/lib/services/initializeEnrollment.js +11 -12
- package/lib/services/initializeEnrollment.js.map +1 -1
- package/lib/services/linkFileService.d.ts +1 -1
- package/lib/services/linkFileService.d.ts.map +1 -1
- package/lib/services/linkFileService.js +3 -1
- package/lib/services/linkFileService.js.map +1 -1
- package/lib/services/loadFilterOptions.d.ts +2 -2
- package/lib/services/loadFilterOptions.d.ts.map +1 -1
- package/lib/services/migrateOrderCart.d.ts +1 -1
- package/lib/services/migrateOrderCart.d.ts.map +1 -1
- package/lib/services/nextUserCart.d.ts +1 -1
- package/lib/services/nextUserCart.d.ts.map +1 -1
- package/lib/services/nextUserCart.js +1 -1
- package/lib/services/nextUserCart.js.map +1 -1
- package/lib/services/processEnrollment.d.ts.map +1 -1
- package/lib/services/processEnrollment.js +13 -5
- package/lib/services/processEnrollment.js.map +1 -1
- package/lib/services/processOrder.d.ts.map +1 -1
- package/lib/services/processOrder.js +30 -30
- package/lib/services/processOrder.js.map +1 -1
- package/lib/services/processQuotation.d.ts.map +1 -1
- package/lib/services/processQuotation.js +10 -14
- package/lib/services/processQuotation.js.map +1 -1
- package/lib/services/proposeQuotation.d.ts +1 -1
- package/lib/services/proposeQuotation.d.ts.map +1 -1
- package/lib/services/proposeQuotation.js +2 -2
- package/lib/services/proposeQuotation.js.map +1 -1
- package/lib/services/registerPaymentCredentials.d.ts +1 -2
- package/lib/services/registerPaymentCredentials.d.ts.map +1 -1
- package/lib/services/registerPaymentCredentials.js +4 -6
- package/lib/services/registerPaymentCredentials.js.map +1 -1
- package/lib/services/rejectOrder.d.ts +1 -1
- package/lib/services/rejectOrder.d.ts.map +1 -1
- package/lib/services/rejectQuotation.d.ts +1 -1
- package/lib/services/rejectQuotation.d.ts.map +1 -1
- package/lib/services/rejectQuotation.js +2 -2
- package/lib/services/rejectQuotation.js.map +1 -1
- package/lib/services/removeFiles.js +2 -2
- package/lib/services/removeFiles.js.map +1 -1
- package/lib/services/removeProduct.js +3 -3
- package/lib/services/removeProduct.js.map +1 -1
- package/lib/services/searchAssortments.d.ts.map +1 -1
- package/lib/services/searchAssortments.js +3 -2
- package/lib/services/searchAssortments.js.map +1 -1
- package/lib/services/searchProducts.d.ts.map +1 -1
- package/lib/services/searchProducts.js +3 -2
- package/lib/services/searchProducts.js.map +1 -1
- package/lib/services/simulateProductDispatching.d.ts +1 -1
- package/lib/services/simulateProductDispatching.d.ts.map +1 -1
- package/lib/services/simulateProductInventory.d.ts +1 -1
- package/lib/services/simulateProductInventory.d.ts.map +1 -1
- package/lib/services/simulateProductInventory.js.map +1 -1
- package/lib/services/simulateProductPricing.d.ts +7 -4
- package/lib/services/simulateProductPricing.d.ts.map +1 -1
- package/lib/services/simulateProductPricing.js.map +1 -1
- package/lib/services/terminateEnrollment.d.ts.map +1 -1
- package/lib/services/terminateEnrollment.js +5 -9
- package/lib/services/terminateEnrollment.js.map +1 -1
- package/lib/services/updateCalculation.d.ts +2 -1
- package/lib/services/updateCalculation.d.ts.map +1 -1
- package/lib/services/updateCalculation.js +20 -12
- package/lib/services/updateCalculation.js.map +1 -1
- package/lib/services/updateScheduling.d.ts +1 -1
- package/lib/services/updateScheduling.d.ts.map +1 -1
- package/lib/services/updateScheduling.js +7 -11
- package/lib/services/updateScheduling.js.map +1 -1
- package/lib/services/updateUserAvatarAfterUpload.d.ts +1 -1
- package/lib/services/updateUserAvatarAfterUpload.d.ts.map +1 -1
- package/lib/services/updateUserAvatarAfterUpload.js.map +1 -1
- package/lib/services/uploadFileFromStream.d.ts.map +1 -1
- package/lib/services/uploadFileFromStream.js +4 -1
- package/lib/services/uploadFileFromStream.js.map +1 -1
- package/lib/services/uploadFileFromURL.d.ts +1 -2
- package/lib/services/uploadFileFromURL.d.ts.map +1 -1
- package/lib/services/uploadFileFromURL.js.map +1 -1
- package/lib/services/validateOrder.d.ts +1 -1
- package/lib/services/validateOrder.d.ts.map +1 -1
- package/lib/services/validateOrder.js +17 -24
- package/lib/services/validateOrder.js.map +1 -1
- package/lib/services/verifyQuotation.d.ts +1 -1
- package/lib/services/verifyQuotation.d.ts.map +1 -1
- package/lib/services/verifyQuotation.js +2 -2
- package/lib/services/verifyQuotation.js.map +1 -1
- package/package.json +21 -20
- package/src/bulk-importer/createBulkImporter.ts +205 -0
- package/src/bulk-importer/handlers/assortment/create.ts +118 -0
- package/src/bulk-importer/handlers/assortment/index.ts +3 -0
- package/src/bulk-importer/handlers/assortment/remove.ts +26 -0
- package/src/bulk-importer/handlers/assortment/update.ts +133 -0
- package/src/bulk-importer/handlers/assortment/upsertAssortmentChildren.ts +77 -0
- package/src/bulk-importer/handlers/assortment/upsertAssortmentFilters.ts +70 -0
- package/src/bulk-importer/handlers/assortment/upsertAssortmentProducts.ts +76 -0
- package/src/bulk-importer/handlers/assortment/upsertMedia.ts +76 -0
- package/src/bulk-importer/handlers/filter/create.ts +104 -0
- package/src/bulk-importer/handlers/filter/index.ts +3 -0
- package/src/bulk-importer/handlers/filter/remove.ts +25 -0
- package/src/bulk-importer/handlers/filter/update.ts +94 -0
- package/src/bulk-importer/handlers/product/create.ts +170 -0
- package/src/bulk-importer/handlers/product/index.ts +3 -0
- package/src/bulk-importer/handlers/product/remove.ts +27 -0
- package/src/bulk-importer/handlers/product/update.ts +175 -0
- package/src/bulk-importer/handlers/product/upsertMedia.ts +81 -0
- package/src/bulk-importer/handlers/product/upsertVariations.ts +110 -0
- package/src/bulk-importer/handlers/utils/convertTagsToLowerCase.ts +4 -0
- package/src/bulk-importer/index.ts +3 -0
- package/src/bulk-importer/upsertAsset.ts +50 -0
- package/src/core-index.ts +10 -7
- package/src/directors/BaseDiscountAdapter.test.ts +1 -1
- package/src/directors/BaseDiscountAdapter.ts +5 -5
- package/src/directors/BaseDiscountDirector.ts +2 -2
- package/src/directors/BasePricingAdapter.ts +2 -2
- package/src/directors/BasePricingDirector.ts +47 -44
- package/src/directors/BasePricingSheet.ts +1 -1
- package/src/directors/BaseWorker.ts +1 -1
- package/src/directors/DeliveryAdapter.ts +3 -3
- package/src/directors/DeliveryDirector.ts +33 -23
- package/src/directors/DeliveryPricingAdapter.ts +1 -1
- package/src/directors/DeliveryPricingDirector.ts +5 -6
- package/src/directors/DeliveryPricingSheet.ts +3 -2
- package/src/directors/EnrollmentAdapter.ts +9 -6
- package/src/directors/EnrollmentDirector.ts +9 -8
- package/src/directors/FilterAdapter.ts +3 -3
- package/src/directors/FilterDirector.ts +11 -12
- package/src/directors/MessagingDirector.ts +1 -1
- package/src/directors/OrderDiscountAdapter.ts +2 -2
- package/src/directors/OrderPricingAdapter.ts +2 -2
- package/src/directors/OrderPricingDirector.ts +3 -3
- package/src/directors/OrderPricingSheet.ts +3 -2
- package/src/directors/PaymentAdapter.ts +2 -2
- package/src/directors/PaymentDirector.ts +34 -10
- package/src/directors/PaymentPricingAdapter.ts +2 -2
- package/src/directors/PaymentPricingDirector.ts +6 -8
- package/src/directors/PaymentPricingSheet.ts +3 -2
- package/src/directors/ProductDiscountAdapter.ts +2 -2
- package/src/directors/ProductDiscountConfiguration.ts +1 -1
- package/src/directors/ProductPricingAdapter.ts +1 -1
- package/src/directors/ProductPricingDirector.ts +9 -9
- package/src/directors/ProductPricingSheet.ts +4 -3
- package/src/directors/QuotationAdapter.ts +2 -2
- package/src/directors/QuotationDirector.ts +2 -2
- package/src/directors/WarehousingAdapter.ts +3 -4
- package/src/directors/WarehousingDirector.ts +20 -23
- package/src/directors/WorkerAdapter.ts +9 -4
- package/src/directors/WorkerDirector.ts +5 -6
- package/src/factory/index.ts +3 -0
- package/src/factory/registerProductDiscoverabilityFilter.ts +36 -0
- package/src/modules.ts +6 -7
- package/src/services/activateEnrollment.ts +9 -13
- package/src/services/addMessage.ts +20 -0
- package/src/services/calculateDiscountTotal.ts +4 -4
- package/src/services/checkoutOrder.ts +10 -5
- package/src/services/createDownloadStream.ts +1 -0
- package/src/services/createEnrollmentFromCheckout.ts +22 -20
- package/src/services/createManualOrderDiscount.ts +2 -2
- package/src/services/createSignedURL.ts +1 -0
- package/src/services/deleteUser.ts +7 -2
- package/src/services/discountedEntities.ts +6 -6
- package/src/services/findOrInitCart.ts +1 -2
- package/src/services/fullfillQuotation.ts +1 -1
- package/src/services/generateOrderFromEnrollment.ts +54 -0
- package/src/services/index.ts +8 -0
- package/src/services/initCartProviders.ts +8 -10
- package/src/services/initializeEnrollment.ts +16 -13
- package/src/services/linkFileService.ts +3 -1
- package/src/services/nextUserCart.ts +1 -1
- package/src/services/processEnrollment.ts +18 -6
- package/src/services/processOrder.ts +37 -36
- package/src/services/processQuotation.ts +10 -14
- package/src/services/proposeQuotation.ts +2 -2
- package/src/services/registerPaymentCredentials.ts +6 -8
- package/src/services/rejectQuotation.ts +2 -2
- package/src/services/removeFiles.ts +2 -2
- package/src/services/removeProduct.ts +3 -3
- package/src/services/searchAssortments.ts +3 -2
- package/src/services/searchProducts.ts +4 -2
- package/src/services/simulateProductDispatching.ts +1 -1
- package/src/services/simulateProductInventory.ts +7 -3
- package/src/services/simulateProductPricing.ts +6 -3
- package/src/services/terminateEnrollment.ts +5 -9
- package/src/services/updateCalculation.ts +37 -20
- package/src/services/updateScheduling.ts +19 -20
- package/src/services/updateUserAvatarAfterUpload.ts +4 -1
- package/src/services/uploadFileFromStream.ts +3 -1
- package/src/services/uploadFileFromURL.ts +2 -2
- package/src/services/validateOrder.ts +34 -38
- package/src/services/verifyQuotation.ts +2 -2
|
@@ -2,6 +2,7 @@ import { Order, OrderDelivery, OrderPosition } from '@unchainedshop/core-orders'
|
|
|
2
2
|
import { WarehousingDirector } from '../directors/index.js';
|
|
3
3
|
import { Modules } from '../modules.js';
|
|
4
4
|
import { supportedWarehousingProvidersService } from './supportedWarehousingProviders.js';
|
|
5
|
+
import { Product } from '@unchainedshop/core-products';
|
|
5
6
|
|
|
6
7
|
export async function updateSchedulingService(
|
|
7
8
|
this: Modules,
|
|
@@ -9,7 +10,7 @@ export async function updateSchedulingService(
|
|
|
9
10
|
orderPositions,
|
|
10
11
|
order,
|
|
11
12
|
orderDelivery,
|
|
12
|
-
}: { orderPositions: OrderPosition[]; order: Order; orderDelivery: OrderDelivery },
|
|
13
|
+
}: { orderPositions: OrderPosition[]; order: Order; orderDelivery: OrderDelivery | null },
|
|
13
14
|
) {
|
|
14
15
|
const deliveryProvider =
|
|
15
16
|
orderDelivery &&
|
|
@@ -17,14 +18,14 @@ export async function updateSchedulingService(
|
|
|
17
18
|
deliveryProviderId: orderDelivery.deliveryProviderId,
|
|
18
19
|
}));
|
|
19
20
|
|
|
21
|
+
if (!deliveryProvider) return [];
|
|
22
|
+
|
|
20
23
|
return (await Promise.all(
|
|
21
24
|
orderPositions.map(async (orderPosition) => {
|
|
22
25
|
// scheduling (store in db for auditing)
|
|
23
|
-
const product = await this.products.findProduct({
|
|
26
|
+
const product = (await this.products.findProduct({
|
|
24
27
|
productId: orderPosition.productId,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const { countryCode, userId } = order;
|
|
28
|
+
})) as Product;
|
|
28
29
|
|
|
29
30
|
const scheduling = await Promise.all(
|
|
30
31
|
(
|
|
@@ -33,22 +34,20 @@ export async function updateSchedulingService(
|
|
|
33
34
|
deliveryProvider,
|
|
34
35
|
})
|
|
35
36
|
).map(async (warehousingProvider) => {
|
|
36
|
-
const
|
|
37
|
+
const director = await WarehousingDirector.actions(
|
|
37
38
|
warehousingProvider,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
modules: this,
|
|
51
|
-
});
|
|
39
|
+
{
|
|
40
|
+
deliveryProvider,
|
|
41
|
+
product,
|
|
42
|
+
orderPosition,
|
|
43
|
+
order,
|
|
44
|
+
referenceDate: order.ordered,
|
|
45
|
+
quantity: orderPosition.quantity,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
modules: this,
|
|
49
|
+
},
|
|
50
|
+
);
|
|
52
51
|
const dispatch = await director.estimatedDispatch();
|
|
53
52
|
|
|
54
53
|
return {
|
|
@@ -5,7 +5,10 @@ import { createLogger } from '@unchainedshop/logger';
|
|
|
5
5
|
|
|
6
6
|
const logger = createLogger('unchained:core');
|
|
7
7
|
|
|
8
|
-
export async function updateUserAvatarAfterUploadService(
|
|
8
|
+
export async function updateUserAvatarAfterUploadService(
|
|
9
|
+
this: Modules,
|
|
10
|
+
{ file }: { file: Pick<File, '_id' | 'path' | 'meta'> },
|
|
11
|
+
) {
|
|
9
12
|
const { userId } = file.meta as { userId: string };
|
|
10
13
|
|
|
11
14
|
const files = await this.files.findFiles({
|
|
@@ -21,5 +21,7 @@ export async function uploadFileFromStreamService(
|
|
|
21
21
|
);
|
|
22
22
|
const fileData = getFileFromFileData(uploadFileData, meta);
|
|
23
23
|
const fileId = await this.files.create(fileData);
|
|
24
|
-
|
|
24
|
+
const file = await this.files.findFile({ fileId });
|
|
25
|
+
if (!file) throw new Error('File not found after upload');
|
|
26
|
+
return file;
|
|
25
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getFileFromFileData, getFileAdapter
|
|
1
|
+
import { getFileFromFileData, getFileAdapter } from '@unchainedshop/core-files';
|
|
2
2
|
import { Modules } from '../modules.js';
|
|
3
3
|
|
|
4
4
|
export async function uploadFileFromURLService(
|
|
@@ -17,7 +17,7 @@ export async function uploadFileFromURLService(
|
|
|
17
17
|
};
|
|
18
18
|
meta?: any;
|
|
19
19
|
},
|
|
20
|
-
)
|
|
20
|
+
) {
|
|
21
21
|
const fileUploadAdapter = getFileAdapter();
|
|
22
22
|
|
|
23
23
|
const uploadFileData = await fileUploadAdapter.uploadFileFromURL(directoryName, fileInput, {
|
|
@@ -2,52 +2,48 @@ import { Order, ordersSettings } from '@unchainedshop/core-orders';
|
|
|
2
2
|
import { Modules } from '../modules.js';
|
|
3
3
|
|
|
4
4
|
export async function validateOrderService(this: Modules, order: Order) {
|
|
5
|
-
|
|
6
|
-
if (!order.
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
if (!order.contact) throw new Error('Contact data not provided');
|
|
6
|
+
if (!order.billingAddress) throw new Error('Billing address not provided');
|
|
7
|
+
if (
|
|
8
|
+
!order.deliveryId ||
|
|
9
|
+
!(await this.orders.deliveries.findDelivery({ orderDeliveryId: order.deliveryId }))
|
|
10
|
+
)
|
|
11
|
+
throw new Error('No delivery provider selected');
|
|
12
|
+
if (
|
|
13
|
+
!order.paymentId ||
|
|
14
|
+
!(await this.orders.payments.findOrderPayment({ orderPaymentId: order.paymentId }))
|
|
15
|
+
)
|
|
16
|
+
throw new Error('No payment provider selected');
|
|
12
17
|
|
|
13
18
|
const orderPositions = await this.orders.positions.findOrderPositions({ orderId: order._id });
|
|
14
19
|
if (orderPositions.length === 0) {
|
|
15
20
|
const NoItemsError = new Error('No items to checkout');
|
|
16
21
|
NoItemsError.name = 'NoItemsError';
|
|
17
|
-
|
|
22
|
+
throw NoItemsError;
|
|
18
23
|
}
|
|
19
|
-
await Promise.all(
|
|
20
|
-
orderPositions.map(async (orderPosition) => {
|
|
21
|
-
const product = await this.products.findProduct({
|
|
22
|
-
productId: orderPosition.productId,
|
|
23
|
-
});
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
product,
|
|
30
|
-
configuration: orderPosition.configuration,
|
|
31
|
-
quantityDiff: 0,
|
|
32
|
-
},
|
|
33
|
-
{ modules: this },
|
|
34
|
-
);
|
|
35
|
-
} catch (e) {
|
|
36
|
-
errors.push(e);
|
|
37
|
-
}
|
|
25
|
+
for (const orderPosition of orderPositions) {
|
|
26
|
+
const product = await this.products.findProduct({
|
|
27
|
+
productId: orderPosition.productId,
|
|
28
|
+
});
|
|
38
29
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
);
|
|
30
|
+
await ordersSettings.validateOrderPosition(
|
|
31
|
+
{
|
|
32
|
+
order,
|
|
33
|
+
product,
|
|
34
|
+
configuration: orderPosition.configuration,
|
|
35
|
+
quantityDiff: 0,
|
|
36
|
+
},
|
|
37
|
+
{ modules: this },
|
|
38
|
+
);
|
|
49
39
|
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
const quotation =
|
|
41
|
+
orderPosition.quotationId &&
|
|
42
|
+
(await this.quotations.findQuotation({
|
|
43
|
+
quotationId: orderPosition.quotationId,
|
|
44
|
+
}));
|
|
45
|
+
if (quotation && !this.quotations.isProposalValid(quotation)) {
|
|
46
|
+
throw new Error('Quotation expired or fullfiled, please request a new offer');
|
|
47
|
+
}
|
|
52
48
|
}
|
|
53
49
|
}
|
|
@@ -9,10 +9,10 @@ export async function verifyQuotationService(
|
|
|
9
9
|
) {
|
|
10
10
|
if (quotation.status !== QuotationStatus.REQUESTED) return quotation;
|
|
11
11
|
|
|
12
|
-
const updatedQuotation = await this.quotations.updateStatus(quotation._id, {
|
|
12
|
+
const updatedQuotation = (await this.quotations.updateStatus(quotation._id, {
|
|
13
13
|
status: QuotationStatus.PROCESSING,
|
|
14
14
|
info: 'verified elligibility manually',
|
|
15
|
-
});
|
|
15
|
+
})) as Quotation;
|
|
16
16
|
|
|
17
17
|
return await processQuotationService.bind(this)(updatedQuotation, { quotationContext });
|
|
18
18
|
}
|