@medusajs/medusa 1.3.2 → 1.3.3
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/CHANGELOG.md +43 -0
- package/dist/api/index.d.ts +15 -14
- package/dist/api/index.js +15 -14
- package/dist/api/index.js.map +1 -1
- package/dist/api/middlewares/authenticate-customer.d.ts +2 -1
- package/dist/api/middlewares/authenticate-customer.js +1 -2
- package/dist/api/middlewares/authenticate-customer.js.map +1 -1
- package/dist/api/middlewares/authenticate.d.ts +2 -1
- package/dist/api/middlewares/authenticate.js.map +1 -1
- package/dist/api/middlewares/await-middleware.d.ts +3 -1
- package/dist/api/middlewares/await-middleware.js +2 -31
- package/dist/api/middlewares/await-middleware.js.map +1 -1
- package/dist/api/middlewares/error-handler.d.ts +3 -1
- package/dist/api/middlewares/error-handler.js.map +1 -1
- package/dist/api/middlewares/feature-flag-enabled.d.ts +2 -0
- package/dist/api/middlewares/feature-flag-enabled.js +57 -0
- package/dist/api/middlewares/feature-flag-enabled.js.map +1 -0
- package/dist/api/middlewares/index.d.ts +10 -10
- package/dist/api/middlewares/index.js +5 -1
- package/dist/api/middlewares/index.js.map +1 -1
- package/dist/api/middlewares/normalized-query.d.ts +6 -1
- package/dist/api/middlewares/normalized-query.js +5 -2
- package/dist/api/middlewares/normalized-query.js.map +1 -1
- package/dist/api/middlewares/transform-body.d.ts +4 -0
- package/dist/api/middlewares/transform-body.js +66 -0
- package/dist/api/middlewares/transform-body.js.map +1 -0
- package/dist/api/middlewares/transform-query.d.ts +6 -0
- package/dist/api/middlewares/transform-query.js +86 -0
- package/dist/api/middlewares/transform-query.js.map +1 -0
- package/dist/api/routes/admin/batch/cancel-batch-job.d.ts +22 -0
- package/dist/api/routes/admin/batch/cancel-batch-job.js +74 -0
- package/dist/api/routes/admin/batch/cancel-batch-job.js.map +1 -0
- package/dist/api/routes/admin/batch/confirm-batch-job.d.ts +22 -0
- package/dist/api/routes/admin/batch/confirm-batch-job.js +74 -0
- package/dist/api/routes/admin/batch/confirm-batch-job.js.map +1 -0
- package/dist/api/routes/admin/batch/create-batch-job.d.ts +30 -0
- package/dist/api/routes/admin/batch/create-batch-job.js +125 -0
- package/dist/api/routes/admin/batch/create-batch-job.js.map +1 -0
- package/dist/api/routes/admin/batch/get-batch-job.d.ts +22 -0
- package/dist/api/routes/admin/batch/get-batch-job.js +67 -0
- package/dist/api/routes/admin/batch/get-batch-job.js.map +1 -0
- package/dist/api/routes/admin/batch/index.d.ts +4 -0
- package/dist/api/routes/admin/batch/index.js +36 -7
- package/dist/api/routes/admin/batch/index.js.map +1 -1
- package/dist/api/routes/admin/batch/list-batch-jobs.d.ts +15 -7
- package/dist/api/routes/admin/batch/list-batch-jobs.js +61 -46
- package/dist/api/routes/admin/batch/list-batch-jobs.js.map +1 -1
- package/dist/api/routes/admin/collections/add-products.d.ts +2 -1
- package/dist/api/routes/admin/collections/add-products.js +4 -7
- package/dist/api/routes/admin/collections/add-products.js.map +1 -1
- package/dist/api/routes/admin/collections/create-collection.d.ts +2 -1
- package/dist/api/routes/admin/collections/create-collection.js +6 -8
- package/dist/api/routes/admin/collections/create-collection.js.map +1 -1
- package/dist/api/routes/admin/collections/delete-collection.d.ts +2 -1
- package/dist/api/routes/admin/collections/delete-collection.js.map +1 -1
- package/dist/api/routes/admin/collections/get-collection.d.ts +2 -1
- package/dist/api/routes/admin/collections/get-collection.js +4 -5
- package/dist/api/routes/admin/collections/get-collection.js.map +1 -1
- package/dist/api/routes/admin/collections/index.js +32 -12
- package/dist/api/routes/admin/collections/index.js.map +1 -1
- package/dist/api/routes/admin/collections/list-collections.d.ts +2 -1
- package/dist/api/routes/admin/collections/list-collections.js +9 -19
- package/dist/api/routes/admin/collections/list-collections.js.map +1 -1
- package/dist/api/routes/admin/collections/remove-products.d.ts +2 -1
- package/dist/api/routes/admin/collections/remove-products.js +5 -8
- package/dist/api/routes/admin/collections/remove-products.js.map +1 -1
- package/dist/api/routes/admin/collections/update-collection.d.ts +2 -1
- package/dist/api/routes/admin/collections/update-collection.js +5 -8
- package/dist/api/routes/admin/collections/update-collection.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/add-customers-batch.d.ts +2 -1
- package/dist/api/routes/admin/customer-groups/add-customers-batch.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/create-customer-group.d.ts +2 -1
- package/dist/api/routes/admin/customer-groups/create-customer-group.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/delete-customer-group.d.ts +2 -1
- package/dist/api/routes/admin/customer-groups/delete-customer-group.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/delete-customers-batch.d.ts +2 -1
- package/dist/api/routes/admin/customer-groups/delete-customers-batch.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/get-customer-group-customers.d.ts +2 -1
- package/dist/api/routes/admin/customer-groups/get-customer-group-customers.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/get-customer-group.d.ts +2 -1
- package/dist/api/routes/admin/customer-groups/get-customer-group.js +3 -17
- package/dist/api/routes/admin/customer-groups/get-customer-group.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/index.js +29 -11
- package/dist/api/routes/admin/customer-groups/index.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/list-customer-groups.d.ts +2 -1
- package/dist/api/routes/admin/customer-groups/list-customer-groups.js +10 -45
- package/dist/api/routes/admin/customer-groups/list-customer-groups.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/update-customer-group.d.ts +2 -1
- package/dist/api/routes/admin/customer-groups/update-customer-group.js.map +1 -1
- package/dist/api/routes/admin/customers/create-customer.d.ts +1 -1
- package/dist/api/routes/admin/customers/create-customer.js.map +1 -1
- package/dist/api/routes/admin/customers/update-customer.d.ts +1 -1
- package/dist/api/routes/admin/customers/update-customer.js.map +1 -1
- package/dist/api/routes/admin/discounts/add-valid-product.d.ts +23 -0
- package/dist/api/routes/admin/discounts/add-valid-product.js +82 -0
- package/dist/api/routes/admin/discounts/add-valid-product.js.map +1 -0
- package/dist/api/routes/admin/discounts/remove-valid-product.d.ts +23 -0
- package/dist/api/routes/admin/discounts/remove-valid-product.js +82 -0
- package/dist/api/routes/admin/discounts/remove-valid-product.js.map +1 -0
- package/dist/api/routes/admin/draft-orders/index.d.ts +1 -1
- package/dist/api/routes/admin/draft-orders/index.js +1 -0
- package/dist/api/routes/admin/draft-orders/index.js.map +1 -1
- package/dist/api/routes/admin/draft-orders/list-draft-orders.js +7 -6
- package/dist/api/routes/admin/draft-orders/list-draft-orders.js.map +1 -1
- package/dist/api/routes/admin/gift-cards/create-gift-card.d.ts +2 -2
- package/dist/api/routes/admin/gift-cards/create-gift-card.js +0 -1
- package/dist/api/routes/admin/gift-cards/create-gift-card.js.map +1 -1
- package/dist/api/routes/admin/gift-cards/index.d.ts +1 -1
- package/dist/api/routes/admin/gift-cards/index.js +19 -5
- package/dist/api/routes/admin/gift-cards/index.js.map +1 -1
- package/dist/api/routes/admin/gift-cards/list-gift-cards.js +24 -18
- package/dist/api/routes/admin/gift-cards/list-gift-cards.js.map +1 -1
- package/dist/api/routes/admin/gift-cards/update-gift-card.d.ts +1 -1
- package/dist/api/routes/admin/gift-cards/update-gift-card.js.map +1 -1
- package/dist/api/routes/admin/orders/create-claim.d.ts +4 -14
- package/dist/api/routes/admin/orders/create-claim.js +3 -14
- package/dist/api/routes/admin/orders/create-claim.js.map +1 -1
- package/dist/api/routes/admin/orders/fulfill-claim.d.ts +1 -1
- package/dist/api/routes/admin/orders/fulfill-claim.js.map +1 -1
- package/dist/api/routes/admin/orders/update-claim.d.ts +1 -1
- package/dist/api/routes/admin/orders/update-claim.js.map +1 -1
- package/dist/api/routes/admin/price-lists/create-price-list.d.ts +2 -1
- package/dist/api/routes/admin/price-lists/create-price-list.js +4 -7
- package/dist/api/routes/admin/price-lists/create-price-list.js.map +1 -1
- package/dist/api/routes/admin/price-lists/index.js +26 -7
- package/dist/api/routes/admin/price-lists/index.js.map +1 -1
- package/dist/api/routes/admin/price-lists/list-price-list-products.d.ts +3 -7
- package/dist/api/routes/admin/price-lists/list-price-list-products.js +21 -59
- package/dist/api/routes/admin/price-lists/list-price-list-products.js.map +1 -1
- package/dist/api/routes/admin/price-lists/list-price-lists.d.ts +2 -1
- package/dist/api/routes/admin/price-lists/list-price-lists.js +8 -40
- package/dist/api/routes/admin/price-lists/list-price-lists.js.map +1 -1
- package/dist/api/routes/admin/products/add-option.js +26 -6
- package/dist/api/routes/admin/products/add-option.js.map +1 -1
- package/dist/api/routes/admin/products/create-product.d.ts +3 -3
- package/dist/api/routes/admin/products/create-product.js +13 -9
- package/dist/api/routes/admin/products/create-product.js.map +1 -1
- package/dist/api/routes/admin/products/delete-variant.js +26 -6
- package/dist/api/routes/admin/products/delete-variant.js.map +1 -1
- package/dist/api/routes/admin/products/get-product.js +24 -4
- package/dist/api/routes/admin/products/get-product.js.map +1 -1
- package/dist/api/routes/admin/products/get-variants.d.ts +24 -0
- package/dist/api/routes/admin/products/get-variants.js +76 -0
- package/dist/api/routes/admin/products/get-variants.js.map +1 -0
- package/dist/api/routes/admin/products/index.d.ts +3 -2
- package/dist/api/routes/admin/products/index.js +1 -4
- package/dist/api/routes/admin/products/index.js.map +1 -1
- package/dist/api/routes/admin/products/list-products.d.ts +1 -6
- package/dist/api/routes/admin/products/list-products.js +3 -9
- package/dist/api/routes/admin/products/list-products.js.map +1 -1
- package/dist/api/routes/admin/products/update-product.d.ts +3 -3
- package/dist/api/routes/admin/products/update-product.js +28 -7
- package/dist/api/routes/admin/products/update-product.js.map +1 -1
- package/dist/api/routes/admin/products/update-variant.js +27 -10
- package/dist/api/routes/admin/products/update-variant.js.map +1 -1
- package/dist/api/routes/admin/shipping-options/list-shipping-options.js +6 -2
- package/dist/api/routes/admin/shipping-options/list-shipping-options.js.map +1 -1
- package/dist/api/routes/admin/store/get-store.js +4 -2
- package/dist/api/routes/admin/store/get-store.js.map +1 -1
- package/dist/api/routes/admin/store/update-store.d.ts +1 -0
- package/dist/api/routes/admin/store/update-store.js +5 -0
- package/dist/api/routes/admin/store/update-store.js.map +1 -1
- package/dist/api/routes/admin/uploads/create-upload.d.ts +1 -1
- package/dist/api/routes/admin/uploads/create-upload.js +5 -5
- package/dist/api/routes/admin/uploads/create-upload.js.map +1 -1
- package/dist/api/routes/admin/uploads/delete-upload.d.ts +4 -1
- package/dist/api/routes/admin/uploads/delete-upload.js +29 -11
- package/dist/api/routes/admin/uploads/delete-upload.js.map +1 -1
- package/dist/api/routes/admin/uploads/get-download-url.d.ts +28 -0
- package/dist/api/routes/admin/uploads/get-download-url.js +99 -0
- package/dist/api/routes/admin/uploads/get-download-url.js.map +1 -0
- package/dist/api/routes/admin/uploads/index.d.ts +10 -3
- package/dist/api/routes/admin/uploads/index.js +19 -4
- package/dist/api/routes/admin/uploads/index.js.map +1 -1
- package/dist/api/routes/store/carts/add-shipping-method.js +6 -2
- package/dist/api/routes/store/carts/add-shipping-method.js.map +1 -1
- package/dist/api/routes/store/carts/calculate-taxes.js +9 -2
- package/dist/api/routes/store/carts/calculate-taxes.js.map +1 -1
- package/dist/api/routes/store/carts/create-cart.js +6 -2
- package/dist/api/routes/store/carts/create-cart.js.map +1 -1
- package/dist/api/routes/store/carts/create-line-item.js +6 -2
- package/dist/api/routes/store/carts/create-line-item.js.map +1 -1
- package/dist/api/routes/store/carts/create-payment-sessions.js +6 -2
- package/dist/api/routes/store/carts/create-payment-sessions.js.map +1 -1
- package/dist/api/routes/store/carts/decorate-line-items-with-totals.d.ts +5 -0
- package/dist/api/routes/store/carts/decorate-line-items-with-totals.js +71 -0
- package/dist/api/routes/store/carts/decorate-line-items-with-totals.js.map +1 -0
- package/dist/api/routes/store/carts/delete-discount.js +6 -2
- package/dist/api/routes/store/carts/delete-discount.js.map +1 -1
- package/dist/api/routes/store/carts/delete-line-item.js +6 -2
- package/dist/api/routes/store/carts/delete-line-item.js.map +1 -1
- package/dist/api/routes/store/carts/delete-payment-session.js +6 -2
- package/dist/api/routes/store/carts/delete-payment-session.js.map +1 -1
- package/dist/api/routes/store/carts/get-cart.js +6 -2
- package/dist/api/routes/store/carts/get-cart.js.map +1 -1
- package/dist/api/routes/store/carts/refresh-payment-session.js +6 -2
- package/dist/api/routes/store/carts/refresh-payment-session.js.map +1 -1
- package/dist/api/routes/store/carts/set-payment-session.js +6 -2
- package/dist/api/routes/store/carts/set-payment-session.js.map +1 -1
- package/dist/api/routes/store/carts/update-cart.js +6 -2
- package/dist/api/routes/store/carts/update-cart.js.map +1 -1
- package/dist/api/routes/store/carts/update-line-item.js +6 -2
- package/dist/api/routes/store/carts/update-line-item.js.map +1 -1
- package/dist/api/routes/store/carts/update-payment-method.d.ts +38 -0
- package/dist/api/routes/store/carts/update-payment-method.js +122 -0
- package/dist/api/routes/store/carts/update-payment-method.js.map +1 -0
- package/dist/api/routes/store/carts/update-payment-session.js +6 -2
- package/dist/api/routes/store/carts/update-payment-session.js.map +1 -1
- package/dist/api/routes/store/customers/get-payment-methods.js +6 -7
- package/dist/api/routes/store/customers/get-payment-methods.js.map +1 -1
- package/dist/api/routes/store/customers/index.d.ts +1 -1
- package/dist/api/routes/store/customers/index.js.map +1 -1
- package/dist/api/routes/store/customers/update-address.js +1 -1
- package/dist/api/routes/store/customers/update-address.js.map +1 -1
- package/dist/api/routes/store/customers/update-customer.d.ts +1 -1
- package/dist/api/routes/store/customers/update-customer.js.map +1 -1
- package/dist/api/routes/store/gift-cards/index.d.ts +1 -1
- package/dist/api/routes/store/gift-cards/index.js +6 -1
- package/dist/api/routes/store/gift-cards/index.js.map +1 -1
- package/dist/api/routes/store/products/get-product.js +51 -12
- package/dist/api/routes/store/products/get-product.js.map +1 -1
- package/dist/api/routes/store/products/list-products.js +30 -7
- package/dist/api/routes/store/products/list-products.js.map +1 -1
- package/dist/api/routes/store/shipping-options/list-options.js +6 -2
- package/dist/api/routes/store/shipping-options/list-options.js.map +1 -1
- package/dist/api/routes/store/shipping-options/list-shipping-options.js +8 -2
- package/dist/api/routes/store/shipping-options/list-shipping-options.js.map +1 -1
- package/dist/api/routes/store/variants/get-variant.js +51 -12
- package/dist/api/routes/store/variants/get-variant.js.map +1 -1
- package/dist/api/routes/store/variants/list-variants.js +29 -6
- package/dist/api/routes/store/variants/list-variants.js.map +1 -1
- package/dist/commands/migrate.js +29 -14
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/seed.js +14 -10
- package/dist/commands/seed.js.map +1 -1
- package/dist/commands/start.js +1 -1
- package/dist/commands/utils/get-migrations.d.ts +2 -1
- package/dist/commands/utils/get-migrations.js +95 -36
- package/dist/commands/utils/get-migrations.js.map +1 -1
- package/dist/config/index.d.ts +14 -0
- package/dist/config/index.js +40 -0
- package/dist/config/index.js.map +1 -0
- package/dist/controllers/products/admin-list-products.js +16 -8
- package/dist/controllers/products/admin-list-products.js.map +1 -1
- package/dist/helpers/test-request.js +21 -15
- package/dist/helpers/test-request.js.map +1 -1
- package/dist/interfaces/abstract-parser.d.ts +25 -0
- package/dist/interfaces/abstract-parser.js +14 -0
- package/dist/interfaces/abstract-parser.js.map +1 -0
- package/dist/interfaces/base-service.d.ts +66 -0
- package/dist/interfaces/base-service.js +377 -0
- package/dist/interfaces/base-service.js.map +1 -0
- package/dist/interfaces/batch-job-strategy.d.ts +34 -0
- package/dist/interfaces/batch-job-strategy.js +182 -0
- package/dist/interfaces/batch-job-strategy.js.map +1 -0
- package/dist/interfaces/csv-parser.d.ts +46 -0
- package/dist/interfaces/csv-parser.js +15 -0
- package/dist/interfaces/csv-parser.js.map +1 -0
- package/dist/interfaces/file-service.d.ts +66 -0
- package/dist/interfaces/file-service.js +32 -0
- package/dist/interfaces/file-service.js.map +1 -0
- package/dist/interfaces/index.d.ts +2 -0
- package/dist/interfaces/index.js +2 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/loaders/config.js +3 -2
- package/dist/loaders/config.js.map +1 -1
- package/dist/loaders/feature-flags/index.d.ts +6 -0
- package/dist/loaders/feature-flags/index.js +71 -0
- package/dist/loaders/feature-flags/index.js.map +1 -0
- package/dist/loaders/index.d.ts +1 -1
- package/dist/loaders/index.js +8 -5
- package/dist/loaders/index.js.map +1 -1
- package/dist/loaders/plugins.d.ts +4 -3
- package/dist/loaders/plugins.js +71 -34
- package/dist/loaders/plugins.js.map +1 -1
- package/dist/loaders/redis.d.ts +1 -1
- package/dist/loaders/redis.js.map +1 -1
- package/dist/loaders/search-index.js +1 -0
- package/dist/loaders/search-index.js.map +1 -1
- package/dist/loaders/strategies.d.ts +2 -2
- package/dist/loaders/strategies.js +21 -7
- package/dist/loaders/strategies.js.map +1 -1
- package/dist/migrations/1649775522087-add_batch_job_model.js +4 -4
- package/dist/migrations/1649775522087-add_batch_job_model.js.map +1 -1
- package/dist/models/batch-job.d.ts +45 -4
- package/dist/models/batch-job.js +94 -7
- package/dist/models/batch-job.js.map +1 -1
- package/dist/models/customer.d.ts +1 -1
- package/dist/models/customer.js +1 -1
- package/dist/models/customer.js.map +1 -1
- package/dist/models/draft-order.d.ts +1 -2
- package/dist/models/draft-order.js +2 -2
- package/dist/models/draft-order.js.map +1 -1
- package/dist/models/line-item.d.ts +9 -2
- package/dist/models/line-item.js +2 -2
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/product.d.ts +17 -17
- package/dist/models/product.js +34 -34
- package/dist/models/product.js.map +1 -1
- package/dist/models/shipping-method.d.ts +1 -1
- package/dist/models/shipping-method.js +1 -1
- package/dist/models/shipping-method.js.map +1 -1
- package/dist/models/shipping-option.d.ts +1 -1
- package/dist/models/shipping-option.js +1 -1
- package/dist/models/shipping-option.js.map +1 -1
- package/dist/repositories/customer.d.ts +2 -1
- package/dist/repositories/customer.js +18 -7
- package/dist/repositories/customer.js.map +1 -1
- package/dist/repositories/gift-card.d.ts +5 -1
- package/dist/repositories/gift-card.js +124 -29
- package/dist/repositories/gift-card.js.map +1 -1
- package/dist/repositories/image.d.ts +1 -0
- package/dist/repositories/image.js +100 -0
- package/dist/repositories/image.js.map +1 -1
- package/dist/repositories/price-list.js.map +1 -1
- package/dist/repositories/product-tag.d.ts +6 -0
- package/dist/repositories/product-tag.js +113 -0
- package/dist/repositories/product-tag.js.map +1 -1
- package/dist/repositories/product-type.d.ts +5 -0
- package/dist/repositories/product-type.js +64 -0
- package/dist/repositories/product-type.js.map +1 -1
- package/dist/repositories/product-variant.js +4 -5
- package/dist/repositories/product-variant.js.map +1 -1
- package/dist/repositories/product.d.ts +14 -17
- package/dist/repositories/product.js +64 -2
- package/dist/repositories/product.js.map +1 -1
- package/dist/repositories/tax-rate.d.ts +1 -1
- package/dist/repositories/tax-rate.js +2 -9
- package/dist/repositories/tax-rate.js.map +1 -1
- package/dist/services/auth.d.ts +16 -7
- package/dist/services/auth.js +130 -93
- package/dist/services/auth.js.map +1 -1
- package/dist/services/batch-job.d.ts +30 -5
- package/dist/services/batch-job.js +437 -2
- package/dist/services/batch-job.js.map +1 -1
- package/dist/services/cart.js +34 -13
- package/dist/services/cart.js.map +1 -1
- package/dist/services/claim-item.d.ts +23 -27
- package/dist/services/claim-item.js +217 -247
- package/dist/services/claim-item.js.map +1 -1
- package/dist/services/claim.d.ts +89 -71
- package/dist/services/claim.js +911 -879
- package/dist/services/claim.js.map +1 -1
- package/dist/services/csv-parser.d.ts +17 -0
- package/dist/services/csv-parser.js +319 -0
- package/dist/services/csv-parser.js.map +1 -0
- package/dist/services/custom-shipping-option.d.ts +30 -32
- package/dist/services/custom-shipping-option.js +78 -74
- package/dist/services/custom-shipping-option.js.map +1 -1
- package/dist/services/customer.d.ts +48 -50
- package/dist/services/customer.js +465 -428
- package/dist/services/customer.js.map +1 -1
- package/dist/services/discount-condition.d.ts +13 -13
- package/dist/services/discount-condition.js +5 -16
- package/dist/services/discount-condition.js.map +1 -1
- package/dist/services/discount.d.ts +22 -16
- package/dist/services/discount.js +530 -484
- package/dist/services/discount.js.map +1 -1
- package/dist/services/draft-order.d.ts +69 -66
- package/dist/services/draft-order.js +375 -353
- package/dist/services/draft-order.js.map +1 -1
- package/dist/services/event-bus.d.ts +72 -56
- package/dist/services/event-bus.js +122 -99
- package/dist/services/event-bus.js.map +1 -1
- package/dist/services/file.d.ts +14 -0
- package/dist/services/file.js +43 -0
- package/dist/services/file.js.map +1 -0
- package/dist/services/fulfillment.d.ts +63 -64
- package/dist/services/fulfillment.js +200 -194
- package/dist/services/fulfillment.js.map +1 -1
- package/dist/services/gift-card.d.ts +54 -45
- package/dist/services/gift-card.js +239 -221
- package/dist/services/gift-card.js.map +1 -1
- package/dist/services/idempotency-key.d.ts +1 -5
- package/dist/services/idempotency-key.js +2 -5
- package/dist/services/idempotency-key.js.map +1 -1
- package/dist/services/index.d.ts +11 -9
- package/dist/services/index.js +23 -19
- package/dist/services/index.js.map +1 -1
- package/dist/services/line-item.d.ts +3 -2
- package/dist/services/line-item.js +9 -7
- package/dist/services/line-item.js.map +1 -1
- package/dist/services/price-list.d.ts +4 -1
- package/dist/services/price-list.js +7 -4
- package/dist/services/price-list.js.map +1 -1
- package/dist/services/pricing.d.ts +101 -0
- package/dist/services/pricing.js +588 -0
- package/dist/services/pricing.js.map +1 -0
- package/dist/services/product-variant.d.ts +0 -11
- package/dist/services/product-variant.js +28 -138
- package/dist/services/product-variant.js.map +1 -1
- package/dist/services/product.d.ts +107 -145
- package/dist/services/product.js +708 -1036
- package/dist/services/product.js.map +1 -1
- package/dist/services/region.js +4 -4
- package/dist/services/region.js.map +1 -1
- package/dist/services/shipping-option.d.ts +43 -108
- package/dist/services/shipping-option.js +305 -352
- package/dist/services/shipping-option.js.map +1 -1
- package/dist/services/shipping-profile.d.ts +2 -2
- package/dist/services/shipping-profile.js +1 -1
- package/dist/services/store.d.ts +36 -45
- package/dist/services/store.js +207 -217
- package/dist/services/store.js.map +1 -1
- package/dist/services/strategy-resolver.d.ts +13 -0
- package/dist/services/strategy-resolver.js +40 -0
- package/dist/services/strategy-resolver.js.map +1 -0
- package/dist/services/tax-provider.d.ts +7 -3
- package/dist/services/tax-provider.js +6 -6
- package/dist/services/tax-provider.js.map +1 -1
- package/dist/services/tax-rate.d.ts +1 -1
- package/dist/services/tax-rate.js +2 -2
- package/dist/services/tax-rate.js.map +1 -1
- package/dist/services/totals.js.map +1 -1
- package/dist/services/user.d.ts +8 -9
- package/dist/services/user.js +216 -168
- package/dist/services/user.js.map +1 -1
- package/dist/strategies/__fixtures__/order-export-data.d.ts +3 -0
- package/dist/strategies/__fixtures__/order-export-data.js +70 -0
- package/dist/strategies/__fixtures__/order-export-data.js.map +1 -0
- package/dist/strategies/__fixtures__/product-export-data.d.ts +319 -0
- package/dist/strategies/__fixtures__/product-export-data.js +401 -0
- package/dist/strategies/__fixtures__/product-export-data.js.map +1 -0
- package/dist/strategies/batch-jobs/order/export.d.ts +36 -0
- package/dist/strategies/batch-jobs/order/export.js +351 -0
- package/dist/strategies/batch-jobs/order/export.js.map +1 -0
- package/dist/strategies/batch-jobs/order/index.d.ts +29 -0
- package/dist/strategies/batch-jobs/order/index.js +115 -0
- package/dist/strategies/batch-jobs/order/index.js.map +1 -0
- package/dist/strategies/batch-jobs/product/export.d.ts +36 -0
- package/dist/strategies/batch-jobs/product/export.js +546 -0
- package/dist/strategies/batch-jobs/product/export.js.map +1 -0
- package/dist/strategies/batch-jobs/product/index.d.ts +45 -0
- package/dist/strategies/batch-jobs/product/index.js +272 -0
- package/dist/strategies/batch-jobs/product/index.js.map +1 -0
- package/dist/subscribers/batch-job.d.ts +17 -0
- package/dist/subscribers/batch-job.js +96 -0
- package/dist/subscribers/batch-job.js.map +1 -0
- package/dist/types/batch-job.d.ts +23 -2
- package/dist/types/batch-job.js +4 -1
- package/dist/types/batch-job.js.map +1 -1
- package/dist/types/claim.d.ts +67 -0
- package/dist/types/claim.js +3 -0
- package/dist/types/claim.js.map +1 -0
- package/dist/types/common.d.ts +27 -3
- package/dist/types/common.js.map +1 -1
- package/dist/types/customers.d.ts +24 -0
- package/dist/types/customers.js.map +1 -1
- package/dist/types/discount.d.ts +2 -1
- package/dist/types/discount.js.map +1 -1
- package/dist/types/feature-flags.d.ts +9 -0
- package/dist/types/feature-flags.js +3 -0
- package/dist/types/feature-flags.js.map +1 -0
- package/dist/types/fulfillment.d.ts +27 -0
- package/dist/types/fulfillment.js +3 -0
- package/dist/types/fulfillment.js.map +1 -0
- package/dist/types/gift-card.d.ts +21 -0
- package/dist/types/gift-card.js +3 -0
- package/dist/types/gift-card.js.map +1 -0
- package/dist/types/global.d.ts +12 -1
- package/dist/types/price-list.d.ts +9 -0
- package/dist/types/pricing.d.ts +30 -0
- package/dist/types/pricing.js +3 -0
- package/dist/types/pricing.js.map +1 -0
- package/dist/types/product-variant.d.ts +4 -3
- package/dist/types/product-variant.js.map +1 -1
- package/dist/types/product.d.ts +110 -8
- package/dist/types/product.js +8 -11
- package/dist/types/product.js.map +1 -1
- package/dist/types/shipping-options.d.ts +62 -0
- package/dist/types/shipping-options.js +3 -0
- package/dist/types/shipping-options.js.map +1 -0
- package/dist/types/store.d.ts +9 -0
- package/dist/types/store.js +3 -0
- package/dist/types/store.js.map +1 -0
- package/dist/utils/build-query.d.ts +7 -7
- package/dist/utils/build-query.js +9 -5
- package/dist/utils/build-query.js.map +1 -1
- package/dist/utils/countries.d.ts +3 -2
- package/dist/utils/countries.js.map +1 -1
- package/dist/utils/currencies.d.ts +10 -1899
- package/dist/utils/currencies.js.map +1 -1
- package/dist/utils/db-aware-column.js +2 -2
- package/dist/utils/db-aware-column.js.map +1 -1
- package/dist/utils/feature-flag-decorators.d.ts +4 -0
- package/dist/utils/feature-flag-decorators.js +52 -0
- package/dist/utils/feature-flag-decorators.js.map +1 -0
- package/dist/utils/flag-router.d.ts +7 -0
- package/dist/utils/flag-router.js +19 -0
- package/dist/utils/flag-router.js.map +1 -0
- package/dist/utils/format-registration-name.d.ts +4 -4
- package/dist/utils/format-registration-name.js +7 -10
- package/dist/utils/format-registration-name.js.map +1 -1
- package/dist/utils/get-query-config.d.ts +4 -6
- package/dist/utils/get-query-config.js +46 -1
- package/dist/utils/get-query-config.js.map +1 -1
- package/dist/utils/omit-relation-if-exists.d.ts +7 -0
- package/dist/utils/omit-relation-if-exists.js +16 -0
- package/dist/utils/omit-relation-if-exists.js.map +1 -0
- package/dist/utils/set-metadata.d.ts +6 -6
- package/dist/utils/set-metadata.js +5 -5
- package/dist/utils/set-metadata.js.map +1 -1
- package/dist/utils/sleep.d.ts +1 -0
- package/dist/utils/sleep.js +50 -0
- package/dist/utils/sleep.js.map +1 -0
- package/package.json +6 -4
- package/yarn-error.log +29038 -0
|
@@ -73,54 +73,37 @@ var __values = (this && this.__values) || function(o) {
|
|
|
73
73
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
74
74
|
};
|
|
75
75
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
-
var medusa_interfaces_1 = require("medusa-interfaces");
|
|
77
76
|
var medusa_core_utils_1 = require("medusa-core-utils");
|
|
77
|
+
var interfaces_1 = require("../interfaces");
|
|
78
|
+
var utils_1 = require("../utils");
|
|
78
79
|
/**
|
|
79
80
|
* Handles Fulfillments
|
|
80
|
-
* @extends BaseService
|
|
81
81
|
*/
|
|
82
82
|
var FulfillmentService = /** @class */ (function (_super) {
|
|
83
83
|
__extends(FulfillmentService, _super);
|
|
84
84
|
function FulfillmentService(_a) {
|
|
85
|
-
var manager = _a.manager, totalsService = _a.totalsService, fulfillmentRepository = _a.fulfillmentRepository, trackingLinkRepository = _a.trackingLinkRepository, shippingProfileService = _a.shippingProfileService, lineItemService = _a.lineItemService, fulfillmentProviderService = _a.fulfillmentProviderService;
|
|
86
|
-
var _this =
|
|
87
|
-
|
|
85
|
+
var manager = _a.manager, totalsService = _a.totalsService, fulfillmentRepository = _a.fulfillmentRepository, trackingLinkRepository = _a.trackingLinkRepository, shippingProfileService = _a.shippingProfileService, lineItemService = _a.lineItemService, fulfillmentProviderService = _a.fulfillmentProviderService, lineItemRepository = _a.lineItemRepository;
|
|
86
|
+
var _this =
|
|
87
|
+
// eslint-disable-next-line prefer-rest-params
|
|
88
|
+
_super.call(this, arguments[0]) || this;
|
|
88
89
|
_this.manager_ = manager;
|
|
89
|
-
|
|
90
|
+
_this.lineItemRepository_ = lineItemRepository;
|
|
90
91
|
_this.totalsService_ = totalsService;
|
|
91
|
-
/** @private @const {FulfillmentRepository} */
|
|
92
92
|
_this.fulfillmentRepository_ = fulfillmentRepository;
|
|
93
|
-
/** @private @const {TrackingLinkRepository} */
|
|
94
93
|
_this.trackingLinkRepository_ = trackingLinkRepository;
|
|
95
|
-
/** @private @const {ShippingProfileService} */
|
|
96
94
|
_this.shippingProfileService_ = shippingProfileService;
|
|
97
|
-
/** @private @const {LineItemService} */
|
|
98
95
|
_this.lineItemService_ = lineItemService;
|
|
99
|
-
/** @private @const {FulfillmentProviderService} */
|
|
100
96
|
_this.fulfillmentProviderService_ = fulfillmentProviderService;
|
|
101
97
|
return _this;
|
|
102
98
|
}
|
|
103
|
-
FulfillmentService.prototype.withTransaction = function (transactionManager) {
|
|
104
|
-
if (!transactionManager) {
|
|
105
|
-
return this;
|
|
106
|
-
}
|
|
107
|
-
var cloned = new FulfillmentService({
|
|
108
|
-
manager: transactionManager,
|
|
109
|
-
totalsService: this.totalsService_,
|
|
110
|
-
trackingLinkRepository: this.trackingLinkRepository_,
|
|
111
|
-
fulfillmentRepository: this.fulfillmentRepository_,
|
|
112
|
-
shippingProfileService: this.shippingProfileService_,
|
|
113
|
-
lineItemService: this.lineItemService_,
|
|
114
|
-
fulfillmentProviderService: this.fulfillmentProviderService_,
|
|
115
|
-
});
|
|
116
|
-
cloned.transactionManager_ = transactionManager;
|
|
117
|
-
return cloned;
|
|
118
|
-
};
|
|
119
99
|
FulfillmentService.prototype.partitionItems_ = function (shippingMethods, items) {
|
|
120
100
|
var e_1, _a;
|
|
121
101
|
var partitioned = [];
|
|
122
102
|
var _loop_1 = function (method) {
|
|
123
|
-
var temp = {
|
|
103
|
+
var temp = {
|
|
104
|
+
shipping_method: method,
|
|
105
|
+
items: [],
|
|
106
|
+
};
|
|
124
107
|
// for each method find the items in the order, that are associated
|
|
125
108
|
// with the profile on the current shipping method
|
|
126
109
|
if (shippingMethods.length === 1) {
|
|
@@ -153,15 +136,15 @@ var FulfillmentService = /** @class */ (function (_super) {
|
|
|
153
136
|
};
|
|
154
137
|
/**
|
|
155
138
|
* Retrieves the order line items, given an array of items.
|
|
156
|
-
* @param
|
|
157
|
-
* @param
|
|
158
|
-
* @param
|
|
139
|
+
* @param order - the order to get line items from
|
|
140
|
+
* @param items - the items to get
|
|
141
|
+
* @param transformer - a function to apply to each of the items
|
|
159
142
|
* retrieved from the order, should return a line item. If the transformer
|
|
160
143
|
* returns an undefined value the line item will be filtered from the
|
|
161
144
|
* returned array.
|
|
162
|
-
* @return
|
|
145
|
+
* @return the line items generated by the transformer.
|
|
163
146
|
*/
|
|
164
|
-
FulfillmentService.prototype.getFulfillmentItems_ = function (order, items
|
|
147
|
+
FulfillmentService.prototype.getFulfillmentItems_ = function (order, items) {
|
|
165
148
|
return __awaiter(this, void 0, void 0, function () {
|
|
166
149
|
var toReturn;
|
|
167
150
|
var _this = this;
|
|
@@ -173,7 +156,7 @@ var FulfillmentService = /** @class */ (function (_super) {
|
|
|
173
156
|
var item;
|
|
174
157
|
return __generator(this, function (_b) {
|
|
175
158
|
item = order.items.find(function (i) { return i.id === item_id; });
|
|
176
|
-
return [2 /*return*/,
|
|
159
|
+
return [2 /*return*/, this.validateFulfillmentLineItem_(item, quantity)];
|
|
177
160
|
});
|
|
178
161
|
});
|
|
179
162
|
}))];
|
|
@@ -189,13 +172,16 @@ var FulfillmentService = /** @class */ (function (_super) {
|
|
|
189
172
|
* fulfillable quantity is lower than the requested fulfillment quantity.
|
|
190
173
|
* Fulfillable quantity is calculated by subtracting the already fulfilled
|
|
191
174
|
* quantity from the quantity that was originally purchased.
|
|
192
|
-
* @param
|
|
175
|
+
* @param item - the line item to check has sufficient fulfillable
|
|
193
176
|
* quantity.
|
|
194
|
-
* @param
|
|
195
|
-
* @return
|
|
177
|
+
* @param quantity - the quantity that is requested to be fulfilled.
|
|
178
|
+
* @return a line item that has the requested fulfillment quantity
|
|
196
179
|
* set.
|
|
197
180
|
*/
|
|
198
181
|
FulfillmentService.prototype.validateFulfillmentLineItem_ = function (item, quantity) {
|
|
182
|
+
var _a;
|
|
183
|
+
var manager = (_a = this.transactionManager_) !== null && _a !== void 0 ? _a : this.manager_;
|
|
184
|
+
var lineItemRepo = manager.getCustomRepository(this.lineItemRepository_);
|
|
199
185
|
if (!item) {
|
|
200
186
|
// This will in most cases be called by a webhook so to ensure that
|
|
201
187
|
// things go through smoothly in instances where extra items outside
|
|
@@ -205,31 +191,38 @@ var FulfillmentService = /** @class */ (function (_super) {
|
|
|
205
191
|
if (quantity > item.quantity - item.fulfilled_quantity) {
|
|
206
192
|
throw new medusa_core_utils_1.MedusaError(medusa_core_utils_1.MedusaError.Types.NOT_ALLOWED, "Cannot fulfill more items than have been purchased");
|
|
207
193
|
}
|
|
208
|
-
return __assign(__assign({}, item), { quantity: quantity });
|
|
194
|
+
return lineItemRepo.create(__assign(__assign({}, item), { quantity: quantity }));
|
|
209
195
|
};
|
|
210
196
|
/**
|
|
211
197
|
* Retrieves a fulfillment by its id.
|
|
212
|
-
* @param
|
|
213
|
-
* @param
|
|
214
|
-
* @return
|
|
198
|
+
* @param id - the id of the fulfillment to retrieve
|
|
199
|
+
* @param config - optional values to include with fulfillmentRepository query
|
|
200
|
+
* @return the fulfillment
|
|
215
201
|
*/
|
|
216
202
|
FulfillmentService.prototype.retrieve = function (id, config) {
|
|
217
203
|
if (config === void 0) { config = {}; }
|
|
218
204
|
return __awaiter(this, void 0, void 0, function () {
|
|
219
|
-
var
|
|
205
|
+
var _this = this;
|
|
220
206
|
return __generator(this, function (_a) {
|
|
221
207
|
switch (_a.label) {
|
|
222
|
-
case 0:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
208
|
+
case 0: return [4 /*yield*/, this.atomicPhase_(function (manager) { return __awaiter(_this, void 0, void 0, function () {
|
|
209
|
+
var fulfillmentRepository, query, fulfillment;
|
|
210
|
+
return __generator(this, function (_a) {
|
|
211
|
+
switch (_a.label) {
|
|
212
|
+
case 0:
|
|
213
|
+
fulfillmentRepository = manager.getCustomRepository(this.fulfillmentRepository_);
|
|
214
|
+
query = (0, utils_1.buildQuery)({ id: id }, config);
|
|
215
|
+
return [4 /*yield*/, fulfillmentRepository.findOne(query)];
|
|
216
|
+
case 1:
|
|
217
|
+
fulfillment = _a.sent();
|
|
218
|
+
if (!fulfillment) {
|
|
219
|
+
throw new medusa_core_utils_1.MedusaError(medusa_core_utils_1.MedusaError.Types.NOT_FOUND, "Fulfillment with id: ".concat(id, " was not found"));
|
|
220
|
+
}
|
|
221
|
+
return [2 /*return*/, fulfillment];
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}); })];
|
|
225
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
233
226
|
}
|
|
234
227
|
});
|
|
235
228
|
});
|
|
@@ -239,55 +232,58 @@ var FulfillmentService = /** @class */ (function (_super) {
|
|
|
239
232
|
* If items needs to be fulfilled by different provider, we make
|
|
240
233
|
* sure to partition those items, and create fulfillment for
|
|
241
234
|
* those partitions.
|
|
242
|
-
* @param
|
|
243
|
-
* @param
|
|
244
|
-
* @param
|
|
245
|
-
* @return
|
|
235
|
+
* @param order - order to create fulfillment for
|
|
236
|
+
* @param itemsToFulfill - the items in the order to fulfill
|
|
237
|
+
* @param custom - potential custom values to add
|
|
238
|
+
* @return the created fulfillments
|
|
246
239
|
*/
|
|
247
240
|
FulfillmentService.prototype.createFulfillment = function (order, itemsToFulfill, custom) {
|
|
248
241
|
if (custom === void 0) { custom = {}; }
|
|
249
242
|
return __awaiter(this, void 0, void 0, function () {
|
|
250
243
|
var _this = this;
|
|
251
244
|
return __generator(this, function (_a) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
245
|
+
switch (_a.label) {
|
|
246
|
+
case 0: return [4 /*yield*/, this.atomicPhase_(function (manager) { return __awaiter(_this, void 0, void 0, function () {
|
|
247
|
+
var fulfillmentRepository, lineItems, shipping_methods, fulfillments, created;
|
|
248
|
+
var _this = this;
|
|
249
|
+
return __generator(this, function (_a) {
|
|
250
|
+
switch (_a.label) {
|
|
251
|
+
case 0:
|
|
252
|
+
fulfillmentRepository = manager.getCustomRepository(this.fulfillmentRepository_);
|
|
253
|
+
return [4 /*yield*/, this.getFulfillmentItems_(order, itemsToFulfill)];
|
|
254
|
+
case 1:
|
|
255
|
+
lineItems = _a.sent();
|
|
256
|
+
shipping_methods = order.shipping_methods;
|
|
257
|
+
fulfillments = this.partitionItems_(shipping_methods, lineItems);
|
|
258
|
+
return [4 /*yield*/, Promise.all(fulfillments.map(function (_a) {
|
|
259
|
+
var shipping_method = _a.shipping_method, items = _a.items;
|
|
260
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
261
|
+
var ful, result, _b;
|
|
262
|
+
return __generator(this, function (_c) {
|
|
263
|
+
switch (_c.label) {
|
|
264
|
+
case 0:
|
|
265
|
+
ful = fulfillmentRepository.create(__assign(__assign({}, custom), { provider_id: shipping_method.shipping_option.provider_id, items: items.map(function (i) { return ({ item_id: i.id, quantity: i.quantity }); }), data: {} }));
|
|
266
|
+
return [4 /*yield*/, fulfillmentRepository.save(ful)];
|
|
267
|
+
case 1:
|
|
268
|
+
result = _c.sent();
|
|
269
|
+
_b = result;
|
|
270
|
+
return [4 /*yield*/, this.fulfillmentProviderService_.createFulfillment(shipping_method, items, __assign({}, order), __assign({}, result))];
|
|
271
|
+
case 2:
|
|
272
|
+
_b.data =
|
|
273
|
+
_c.sent();
|
|
274
|
+
return [2 /*return*/, fulfillmentRepository.save(result)];
|
|
275
|
+
}
|
|
276
|
+
});
|
|
282
277
|
});
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
|
|
278
|
+
}))];
|
|
279
|
+
case 2:
|
|
280
|
+
created = _a.sent();
|
|
281
|
+
return [2 /*return*/, created];
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}); })];
|
|
285
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
286
|
+
}
|
|
291
287
|
});
|
|
292
288
|
});
|
|
293
289
|
};
|
|
@@ -295,84 +291,90 @@ var FulfillmentService = /** @class */ (function (_super) {
|
|
|
295
291
|
* Cancels a fulfillment with the fulfillment provider. Will decrement the
|
|
296
292
|
* fulfillment_quantity on the line items associated with the fulfillment.
|
|
297
293
|
* Throws if the fulfillment has already been shipped.
|
|
298
|
-
* @param
|
|
299
|
-
* @return
|
|
294
|
+
* @param fulfillmentOrId - the fulfillment object or id.
|
|
295
|
+
* @return the result of the save operation
|
|
300
296
|
*
|
|
301
297
|
*/
|
|
302
298
|
FulfillmentService.prototype.cancelFulfillment = function (fulfillmentOrId) {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
299
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
300
|
+
var _this = this;
|
|
301
|
+
return __generator(this, function (_a) {
|
|
302
|
+
switch (_a.label) {
|
|
303
|
+
case 0: return [4 /*yield*/, this.atomicPhase_(function (manager) { return __awaiter(_this, void 0, void 0, function () {
|
|
304
|
+
var id, fulfillment, lineItemService, _a, _b, fItem, item, fulfilledQuantity, e_2_1, fulfillmentRepo, canceled;
|
|
305
|
+
var e_2, _c;
|
|
306
|
+
return __generator(this, function (_d) {
|
|
307
|
+
switch (_d.label) {
|
|
308
|
+
case 0:
|
|
309
|
+
id = typeof fulfillmentOrId === "string"
|
|
310
|
+
? fulfillmentOrId
|
|
311
|
+
: fulfillmentOrId.id;
|
|
312
|
+
return [4 /*yield*/, this.retrieve(id, {
|
|
313
|
+
relations: ["items", "claim_order", "swap"],
|
|
314
|
+
})];
|
|
315
|
+
case 1:
|
|
316
|
+
fulfillment = _d.sent();
|
|
317
|
+
if (fulfillment.shipped_at) {
|
|
318
|
+
throw new medusa_core_utils_1.MedusaError(medusa_core_utils_1.MedusaError.Types.NOT_ALLOWED, "The fulfillment has already been shipped. Shipped fulfillments cannot be canceled");
|
|
319
|
+
}
|
|
320
|
+
return [4 /*yield*/, this.fulfillmentProviderService_.cancelFulfillment(fulfillment)];
|
|
321
|
+
case 2:
|
|
322
|
+
_d.sent();
|
|
323
|
+
fulfillment.canceled_at = new Date();
|
|
324
|
+
lineItemService = this.lineItemService_.withTransaction(manager);
|
|
325
|
+
_d.label = 3;
|
|
326
|
+
case 3:
|
|
327
|
+
_d.trys.push([3, 9, 10, 11]);
|
|
328
|
+
_a = __values(fulfillment.items), _b = _a.next();
|
|
329
|
+
_d.label = 4;
|
|
330
|
+
case 4:
|
|
331
|
+
if (!!_b.done) return [3 /*break*/, 8];
|
|
332
|
+
fItem = _b.value;
|
|
333
|
+
return [4 /*yield*/, lineItemService.retrieve(fItem.item_id)];
|
|
334
|
+
case 5:
|
|
335
|
+
item = _d.sent();
|
|
336
|
+
fulfilledQuantity = item.fulfilled_quantity - fItem.quantity;
|
|
337
|
+
return [4 /*yield*/, lineItemService.update(item.id, {
|
|
338
|
+
fulfilled_quantity: fulfilledQuantity,
|
|
339
|
+
})];
|
|
340
|
+
case 6:
|
|
341
|
+
_d.sent();
|
|
342
|
+
_d.label = 7;
|
|
343
|
+
case 7:
|
|
344
|
+
_b = _a.next();
|
|
345
|
+
return [3 /*break*/, 4];
|
|
346
|
+
case 8: return [3 /*break*/, 11];
|
|
347
|
+
case 9:
|
|
348
|
+
e_2_1 = _d.sent();
|
|
349
|
+
e_2 = { error: e_2_1 };
|
|
350
|
+
return [3 /*break*/, 11];
|
|
351
|
+
case 10:
|
|
352
|
+
try {
|
|
353
|
+
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
354
|
+
}
|
|
355
|
+
finally { if (e_2) throw e_2.error; }
|
|
356
|
+
return [7 /*endfinally*/];
|
|
357
|
+
case 11:
|
|
358
|
+
fulfillmentRepo = manager.getCustomRepository(this.fulfillmentRepository_);
|
|
359
|
+
return [4 /*yield*/, fulfillmentRepo.save(fulfillment)];
|
|
360
|
+
case 12:
|
|
361
|
+
canceled = _d.sent();
|
|
362
|
+
return [2 /*return*/, canceled];
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
}); })];
|
|
366
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
365
367
|
}
|
|
366
368
|
});
|
|
367
|
-
});
|
|
369
|
+
});
|
|
368
370
|
};
|
|
369
371
|
/**
|
|
370
372
|
* Creates a shipment by marking a fulfillment as shipped. Adds
|
|
371
373
|
* tracking links and potentially more metadata.
|
|
372
|
-
* @param
|
|
373
|
-
* @param
|
|
374
|
-
* @param
|
|
375
|
-
* @return
|
|
374
|
+
* @param fulfillmentId - the fulfillment to ship
|
|
375
|
+
* @param trackingLinks - tracking links for the shipment
|
|
376
|
+
* @param config - potential configuration settings, such as no_notification and metadata
|
|
377
|
+
* @return the shipped fulfillment
|
|
376
378
|
*/
|
|
377
379
|
FulfillmentService.prototype.createShipment = function (fulfillmentId, trackingLinks, config) {
|
|
378
380
|
if (config === void 0) { config = {
|
|
@@ -383,40 +385,44 @@ var FulfillmentService = /** @class */ (function (_super) {
|
|
|
383
385
|
var metadata, no_notification;
|
|
384
386
|
var _this = this;
|
|
385
387
|
return __generator(this, function (_a) {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
return
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
388
|
+
switch (_a.label) {
|
|
389
|
+
case 0:
|
|
390
|
+
metadata = config.metadata, no_notification = config.no_notification;
|
|
391
|
+
return [4 /*yield*/, this.atomicPhase_(function (manager) { return __awaiter(_this, void 0, void 0, function () {
|
|
392
|
+
var fulfillmentRepository, trackingLinkRepo, fulfillment, now;
|
|
393
|
+
return __generator(this, function (_a) {
|
|
394
|
+
switch (_a.label) {
|
|
395
|
+
case 0:
|
|
396
|
+
fulfillmentRepository = manager.getCustomRepository(this.fulfillmentRepository_);
|
|
397
|
+
trackingLinkRepo = manager.getCustomRepository(this.trackingLinkRepository_);
|
|
398
|
+
return [4 /*yield*/, this.retrieve(fulfillmentId, {
|
|
399
|
+
relations: ["items"],
|
|
400
|
+
})];
|
|
401
|
+
case 1:
|
|
402
|
+
fulfillment = _a.sent();
|
|
403
|
+
if (fulfillment.canceled_at) {
|
|
404
|
+
throw new medusa_core_utils_1.MedusaError(medusa_core_utils_1.MedusaError.Types.NOT_ALLOWED, "Fulfillment has been canceled");
|
|
405
|
+
}
|
|
406
|
+
now = new Date();
|
|
407
|
+
fulfillment.shipped_at = now;
|
|
408
|
+
fulfillment.tracking_links = (trackingLinks || []).map(function (tl) {
|
|
409
|
+
return trackingLinkRepo.create(tl);
|
|
410
|
+
});
|
|
411
|
+
if (typeof no_notification !== "undefined") {
|
|
412
|
+
fulfillment.no_notification = no_notification;
|
|
413
|
+
}
|
|
414
|
+
fulfillment.metadata = __assign(__assign({}, fulfillment.metadata), metadata);
|
|
415
|
+
return [4 /*yield*/, fulfillmentRepository.save(fulfillment)];
|
|
416
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
409
417
|
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
});
|
|
415
|
-
}); })];
|
|
418
|
+
});
|
|
419
|
+
}); })];
|
|
420
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
421
|
+
}
|
|
416
422
|
});
|
|
417
423
|
});
|
|
418
424
|
};
|
|
419
425
|
return FulfillmentService;
|
|
420
|
-
}(
|
|
426
|
+
}(interfaces_1.TransactionBaseService));
|
|
421
427
|
exports.default = FulfillmentService;
|
|
422
428
|
//# sourceMappingURL=fulfillment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fulfillment.js","sourceRoot":"","sources":["../../src/services/fulfillment.
|
|
1
|
+
{"version":3,"file":"fulfillment.js","sourceRoot":"","sources":["../../src/services/fulfillment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