@medusajs/core-flows 2.18.0 → 2.19.0-preview-20260811102316
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/dist/api-key/workflows/create-api-keys.d.ts +1 -1
- package/dist/api-key/workflows/create-api-keys.d.ts.map +1 -1
- package/dist/api-key/workflows/create-api-keys.js +1 -1
- package/dist/api-key/workflows/delete-api-keys.d.ts +1 -1
- package/dist/api-key/workflows/delete-api-keys.js +1 -1
- package/dist/api-key/workflows/link-sales-channels-to-publishable-key.d.ts +1 -1
- package/dist/api-key/workflows/link-sales-channels-to-publishable-key.js +1 -1
- package/dist/api-key/workflows/revoke-api-keys.d.ts +1 -1
- package/dist/api-key/workflows/revoke-api-keys.js +1 -1
- package/dist/api-key/workflows/update-api-keys.d.ts +1 -1
- package/dist/api-key/workflows/update-api-keys.js +1 -1
- package/dist/auth/workflows/generate-reset-password-token.d.ts +2 -2
- package/dist/auth/workflows/generate-reset-password-token.js +2 -2
- package/dist/cart/steps/get-line-item-actions.d.ts.map +1 -1
- package/dist/cart/steps/get-line-item-actions.js +3 -14
- package/dist/cart/steps/get-line-item-actions.js.map +1 -1
- package/dist/cart/steps/get-line-item-pricing-quantities.d.ts +40 -0
- package/dist/cart/steps/get-line-item-pricing-quantities.d.ts.map +1 -0
- package/dist/cart/steps/get-line-item-pricing-quantities.js +69 -0
- package/dist/cart/steps/get-line-item-pricing-quantities.js.map +1 -0
- package/dist/cart/steps/index.d.ts +1 -0
- package/dist/cart/steps/index.d.ts.map +1 -1
- package/dist/cart/steps/index.js +1 -0
- package/dist/cart/steps/index.js.map +1 -1
- package/dist/cart/utils/fields.d.ts.map +1 -1
- package/dist/cart/utils/fields.js +2 -0
- package/dist/cart/utils/fields.js.map +1 -1
- package/dist/cart/utils/find-matching-line-item.d.ts +24 -0
- package/dist/cart/utils/find-matching-line-item.d.ts.map +1 -0
- package/dist/cart/utils/find-matching-line-item.js +32 -0
- package/dist/cart/utils/find-matching-line-item.js.map +1 -0
- package/dist/cart/utils/prepare-confirm-inventory-input.d.ts +10 -0
- package/dist/cart/utils/prepare-confirm-inventory-input.d.ts.map +1 -1
- package/dist/cart/utils/prepare-confirm-inventory-input.js +19 -2
- package/dist/cart/utils/prepare-confirm-inventory-input.js.map +1 -1
- package/dist/cart/workflows/add-shipping-method-to-cart.d.ts +1 -1
- package/dist/cart/workflows/add-shipping-method-to-cart.js +1 -1
- package/dist/cart/workflows/add-to-cart.d.ts +1 -1
- package/dist/cart/workflows/add-to-cart.d.ts.map +1 -1
- package/dist/cart/workflows/add-to-cart.js +27 -5
- package/dist/cart/workflows/add-to-cart.js.map +1 -1
- package/dist/cart/workflows/complete-cart.d.ts +1 -1
- package/dist/cart/workflows/complete-cart.js +1 -1
- package/dist/cart/workflows/create-carts.d.ts +1 -1
- package/dist/cart/workflows/create-carts.js +1 -1
- package/dist/cart/workflows/create-payment-collection-for-cart.d.ts +1 -1
- package/dist/cart/workflows/create-payment-collection-for-cart.js +1 -1
- package/dist/cart/workflows/get-variants-and-items-with-prices.d.ts +19 -0
- package/dist/cart/workflows/get-variants-and-items-with-prices.d.ts.map +1 -1
- package/dist/cart/workflows/get-variants-and-items-with-prices.js +31 -2
- package/dist/cart/workflows/get-variants-and-items-with-prices.js.map +1 -1
- package/dist/cart/workflows/list-shipping-options-for-cart-with-pricing.d.ts.map +1 -1
- package/dist/cart/workflows/list-shipping-options-for-cart-with-pricing.js +0 -2
- package/dist/cart/workflows/list-shipping-options-for-cart-with-pricing.js.map +1 -1
- package/dist/cart/workflows/list-shipping-options-for-cart.d.ts +1 -1
- package/dist/cart/workflows/list-shipping-options-for-cart.js +1 -1
- package/dist/cart/workflows/transfer-cart-customer.d.ts +1 -1
- package/dist/cart/workflows/transfer-cart-customer.js +1 -1
- package/dist/cart/workflows/update-cart-promotions.d.ts +1 -1
- package/dist/cart/workflows/update-cart-promotions.js +1 -1
- package/dist/cart/workflows/update-cart.d.ts +1 -1
- package/dist/cart/workflows/update-cart.js +1 -1
- package/dist/cart/workflows/update-line-item-in-cart.d.ts +5 -33
- package/dist/cart/workflows/update-line-item-in-cart.d.ts.map +1 -1
- package/dist/cart/workflows/update-line-item-in-cart.js +16 -3
- package/dist/cart/workflows/update-line-item-in-cart.js.map +1 -1
- package/dist/cart/workflows/update-tax-lines.d.ts +1 -1
- package/dist/cart/workflows/update-tax-lines.js +1 -1
- package/dist/cart/workflows/upsert-tax-lines.d.ts +1 -1
- package/dist/cart/workflows/upsert-tax-lines.js +1 -1
- package/dist/customer/workflows/create-addresses.d.ts +2 -2
- package/dist/customer/workflows/create-addresses.d.ts.map +1 -1
- package/dist/customer/workflows/create-addresses.js +2 -2
- package/dist/customer/workflows/create-customer-account.d.ts +2 -2
- package/dist/customer/workflows/create-customer-account.js +2 -2
- package/dist/customer/workflows/create-customers.d.ts +1 -1
- package/dist/customer/workflows/create-customers.d.ts.map +1 -1
- package/dist/customer/workflows/create-customers.js +1 -1
- package/dist/customer/workflows/delete-addresses.d.ts +2 -2
- package/dist/customer/workflows/delete-addresses.js +2 -2
- package/dist/customer/workflows/remove-customer-account.d.ts +1 -1
- package/dist/customer/workflows/remove-customer-account.js +1 -1
- package/dist/customer/workflows/update-addresses.d.ts +2 -2
- package/dist/customer/workflows/update-addresses.d.ts.map +1 -1
- package/dist/customer/workflows/update-addresses.js +2 -2
- package/dist/customer/workflows/update-customers.d.ts +2 -2
- package/dist/customer/workflows/update-customers.d.ts.map +1 -1
- package/dist/customer/workflows/update-customers.js +2 -2
- package/dist/customer-group/workflows/create-customer-groups.d.ts +1 -1
- package/dist/customer-group/workflows/create-customer-groups.js +1 -1
- package/dist/customer-group/workflows/delete-customer-groups.d.ts +1 -1
- package/dist/customer-group/workflows/delete-customer-groups.js +1 -1
- package/dist/customer-group/workflows/link-customer-groups-customer.d.ts +1 -1
- package/dist/customer-group/workflows/link-customer-groups-customer.js +1 -1
- package/dist/customer-group/workflows/link-customers-customer-group.d.ts +1 -1
- package/dist/customer-group/workflows/link-customers-customer-group.js +1 -1
- package/dist/customer-group/workflows/update-customer-groups.d.ts +1 -1
- package/dist/customer-group/workflows/update-customer-groups.js +1 -1
- package/dist/draft-order/workflows/add-draft-order-items.d.ts +1 -1
- package/dist/draft-order/workflows/add-draft-order-items.js +1 -1
- package/dist/draft-order/workflows/add-draft-order-promotions.d.ts +1 -1
- package/dist/draft-order/workflows/add-draft-order-promotions.js +1 -1
- package/dist/draft-order/workflows/add-draft-order-shipping-methods.d.ts +1 -1
- package/dist/draft-order/workflows/add-draft-order-shipping-methods.js +1 -1
- package/dist/draft-order/workflows/begin-draft-order-edit.d.ts +1 -1
- package/dist/draft-order/workflows/begin-draft-order-edit.js +1 -1
- package/dist/draft-order/workflows/cancel-draft-order-edit.d.ts +1 -1
- package/dist/draft-order/workflows/cancel-draft-order-edit.js +1 -1
- package/dist/draft-order/workflows/confirm-draft-order-edit.d.ts +1 -1
- package/dist/draft-order/workflows/confirm-draft-order-edit.js +1 -1
- package/dist/draft-order/workflows/convert-draft-order.d.ts +1 -1
- package/dist/draft-order/workflows/convert-draft-order.d.ts.map +1 -1
- package/dist/draft-order/workflows/convert-draft-order.js +10 -1
- package/dist/draft-order/workflows/convert-draft-order.js.map +1 -1
- package/dist/draft-order/workflows/delete-draft-order.d.ts +1 -1
- package/dist/draft-order/workflows/delete-draft-order.js +1 -1
- package/dist/draft-order/workflows/remove-draft-order-action-item.d.ts +1 -1
- package/dist/draft-order/workflows/remove-draft-order-action-item.js +1 -1
- package/dist/draft-order/workflows/remove-draft-order-action-shipping-method.d.ts +1 -1
- package/dist/draft-order/workflows/remove-draft-order-action-shipping-method.js +1 -1
- package/dist/draft-order/workflows/remove-draft-order-promotions.d.ts +1 -1
- package/dist/draft-order/workflows/remove-draft-order-promotions.js +1 -1
- package/dist/draft-order/workflows/remove-draft-order-shipping-method.d.ts +1 -1
- package/dist/draft-order/workflows/remove-draft-order-shipping-method.js +1 -1
- package/dist/draft-order/workflows/request-draft-order-edit.d.ts +1 -1
- package/dist/draft-order/workflows/request-draft-order-edit.js +1 -1
- package/dist/draft-order/workflows/update-draft-order-action-item.d.ts +1 -1
- package/dist/draft-order/workflows/update-draft-order-action-item.js +1 -1
- package/dist/draft-order/workflows/update-draft-order-action-shipping-method.d.ts +1 -1
- package/dist/draft-order/workflows/update-draft-order-action-shipping-method.js +1 -1
- package/dist/draft-order/workflows/update-draft-order-item.d.ts +1 -1
- package/dist/draft-order/workflows/update-draft-order-item.js +1 -1
- package/dist/draft-order/workflows/update-draft-order-shipping-method.d.ts +1 -1
- package/dist/draft-order/workflows/update-draft-order-shipping-method.js +1 -1
- package/dist/draft-order/workflows/update-draft-order.d.ts +1 -1
- package/dist/draft-order/workflows/update-draft-order.d.ts.map +1 -1
- package/dist/draft-order/workflows/update-draft-order.js +13 -1
- package/dist/draft-order/workflows/update-draft-order.js.map +1 -1
- package/dist/file/workflows/delete-files.d.ts +1 -1
- package/dist/file/workflows/delete-files.js +1 -1
- package/dist/file/workflows/upload-files.d.ts +1 -1
- package/dist/file/workflows/upload-files.js +1 -1
- package/dist/fulfillment/workflows/batch-shipping-option-rules.d.ts +1 -1
- package/dist/fulfillment/workflows/batch-shipping-option-rules.js +1 -1
- package/dist/fulfillment/workflows/calculate-shipping-options-prices.d.ts +1 -1
- package/dist/fulfillment/workflows/calculate-shipping-options-prices.js +1 -1
- package/dist/fulfillment/workflows/cancel-fulfillment.d.ts +1 -1
- package/dist/fulfillment/workflows/cancel-fulfillment.js +1 -1
- package/dist/fulfillment/workflows/create-fulfillment.d.ts +1 -1
- package/dist/fulfillment/workflows/create-fulfillment.d.ts.map +1 -1
- package/dist/fulfillment/workflows/create-fulfillment.js +5 -9
- package/dist/fulfillment/workflows/create-fulfillment.js.map +1 -1
- package/dist/fulfillment/workflows/create-service-zones.d.ts +1 -1
- package/dist/fulfillment/workflows/create-service-zones.js +1 -1
- package/dist/fulfillment/workflows/create-shipment.d.ts +1 -1
- package/dist/fulfillment/workflows/create-shipment.js +1 -1
- package/dist/fulfillment/workflows/create-shipping-options.d.ts +1 -1
- package/dist/fulfillment/workflows/create-shipping-options.js +1 -1
- package/dist/fulfillment/workflows/create-shipping-profiles.d.ts +1 -1
- package/dist/fulfillment/workflows/create-shipping-profiles.js +1 -1
- package/dist/fulfillment/workflows/delete-fulfillment-sets.d.ts +1 -1
- package/dist/fulfillment/workflows/delete-fulfillment-sets.js +1 -1
- package/dist/fulfillment/workflows/delete-service-zones.d.ts +1 -1
- package/dist/fulfillment/workflows/delete-service-zones.js +1 -1
- package/dist/fulfillment/workflows/delete-shipping-options.d.ts +1 -1
- package/dist/fulfillment/workflows/delete-shipping-options.js +1 -1
- package/dist/fulfillment/workflows/update-service-zones.d.ts +1 -1
- package/dist/fulfillment/workflows/update-service-zones.js +1 -1
- package/dist/fulfillment/workflows/update-shipping-options.d.ts +1 -1
- package/dist/fulfillment/workflows/update-shipping-options.js +1 -1
- package/dist/fulfillment/workflows/update-shipping-profiles.d.ts +1 -1
- package/dist/fulfillment/workflows/update-shipping-profiles.js +1 -1
- package/dist/inventory/helpers/normalize-for-export.d.ts +28 -0
- package/dist/inventory/helpers/normalize-for-export.d.ts.map +1 -0
- package/dist/inventory/helpers/normalize-for-export.js +68 -0
- package/dist/inventory/helpers/normalize-for-export.js.map +1 -0
- package/dist/inventory/steps/export-inventory-items.d.ts +37 -0
- package/dist/inventory/steps/export-inventory-items.d.ts.map +1 -0
- package/dist/inventory/steps/export-inventory-items.js +113 -0
- package/dist/inventory/steps/export-inventory-items.js.map +1 -0
- package/dist/inventory/steps/index.d.ts +1 -0
- package/dist/inventory/steps/index.d.ts.map +1 -1
- package/dist/inventory/steps/index.js +1 -0
- package/dist/inventory/steps/index.js.map +1 -1
- package/dist/inventory/workflows/create-inventory-items.d.ts +1 -1
- package/dist/inventory/workflows/create-inventory-items.js +1 -1
- package/dist/inventory/workflows/create-inventory-levels.d.ts +1 -1
- package/dist/inventory/workflows/create-inventory-levels.js +1 -1
- package/dist/inventory/workflows/delete-inventory-items.d.ts +1 -1
- package/dist/inventory/workflows/delete-inventory-items.js +1 -1
- package/dist/inventory/workflows/delete-inventory-levels.d.ts +1 -1
- package/dist/inventory/workflows/delete-inventory-levels.js +1 -1
- package/dist/inventory/workflows/export-inventory-items.d.ts +46 -0
- package/dist/inventory/workflows/export-inventory-items.d.ts.map +1 -0
- package/dist/inventory/workflows/export-inventory-items.js +98 -0
- package/dist/inventory/workflows/export-inventory-items.js.map +1 -0
- package/dist/inventory/workflows/index.d.ts +1 -0
- package/dist/inventory/workflows/index.d.ts.map +1 -1
- package/dist/inventory/workflows/index.js +1 -0
- package/dist/inventory/workflows/index.js.map +1 -1
- package/dist/inventory/workflows/update-inventory-items.d.ts +1 -1
- package/dist/inventory/workflows/update-inventory-items.js +1 -1
- package/dist/inventory/workflows/update-inventory-levels.d.ts +1 -1
- package/dist/inventory/workflows/update-inventory-levels.js +1 -1
- package/dist/invite/workflows/accept-invite.d.ts +2 -2
- package/dist/invite/workflows/accept-invite.js +2 -2
- package/dist/invite/workflows/create-invites.d.ts +1 -1
- package/dist/invite/workflows/create-invites.js +1 -1
- package/dist/invite/workflows/delete-invites.d.ts +1 -1
- package/dist/invite/workflows/delete-invites.js +1 -1
- package/dist/invite/workflows/refresh-invite-tokens.d.ts +1 -1
- package/dist/invite/workflows/refresh-invite-tokens.js +1 -1
- package/dist/line-item/workflows/delete-line-items.d.ts +1 -1
- package/dist/line-item/workflows/delete-line-items.js +1 -1
- package/dist/order/steps/set-tax-lines-for-items.d.ts +7 -0
- package/dist/order/steps/set-tax-lines-for-items.d.ts.map +1 -1
- package/dist/order/steps/set-tax-lines-for-items.js +106 -32
- package/dist/order/steps/set-tax-lines-for-items.js.map +1 -1
- package/dist/order/workflows/archive-orders.d.ts +1 -1
- package/dist/order/workflows/archive-orders.js +1 -1
- package/dist/order/workflows/cancel-order-fulfillment.d.ts +1 -1
- package/dist/order/workflows/cancel-order-fulfillment.js +1 -1
- package/dist/order/workflows/cancel-order.d.ts +1 -1
- package/dist/order/workflows/cancel-order.js +1 -1
- package/dist/order/workflows/claim/begin-order-claim.d.ts +1 -1
- package/dist/order/workflows/claim/begin-order-claim.js +1 -1
- package/dist/order/workflows/claim/cancel-begin-order-claim.d.ts +1 -1
- package/dist/order/workflows/claim/cancel-begin-order-claim.js +1 -1
- package/dist/order/workflows/claim/cancel-claim.d.ts +1 -1
- package/dist/order/workflows/claim/cancel-claim.js +1 -1
- package/dist/order/workflows/claim/claim-add-new-item.d.ts +1 -1
- package/dist/order/workflows/claim/claim-add-new-item.js +1 -1
- package/dist/order/workflows/claim/claim-item.d.ts +1 -1
- package/dist/order/workflows/claim/claim-item.js +1 -1
- package/dist/order/workflows/claim/claim-request-item-return.d.ts +1 -1
- package/dist/order/workflows/claim/claim-request-item-return.js +1 -1
- package/dist/order/workflows/claim/confirm-claim-request.d.ts +1 -1
- package/dist/order/workflows/claim/confirm-claim-request.js +1 -1
- package/dist/order/workflows/claim/create-claim-shipping-method.d.ts +2 -2
- package/dist/order/workflows/claim/create-claim-shipping-method.js +2 -2
- package/dist/order/workflows/claim/remove-claim-add-item-action.d.ts +1 -1
- package/dist/order/workflows/claim/remove-claim-add-item-action.js +1 -1
- package/dist/order/workflows/claim/remove-claim-item-action.d.ts +1 -1
- package/dist/order/workflows/claim/remove-claim-item-action.js +1 -1
- package/dist/order/workflows/claim/remove-claim-shipping-method.d.ts +2 -2
- package/dist/order/workflows/claim/remove-claim-shipping-method.js +2 -2
- package/dist/order/workflows/claim/update-claim-add-item.d.ts +1 -1
- package/dist/order/workflows/claim/update-claim-add-item.js +1 -1
- package/dist/order/workflows/claim/update-claim-item.d.ts +1 -1
- package/dist/order/workflows/claim/update-claim-item.js +1 -1
- package/dist/order/workflows/claim/update-claim-shipping-method.d.ts +2 -2
- package/dist/order/workflows/claim/update-claim-shipping-method.js +2 -2
- package/dist/order/workflows/complete-orders.d.ts +1 -1
- package/dist/order/workflows/complete-orders.d.ts.map +1 -1
- package/dist/order/workflows/complete-orders.js +1 -1
- package/dist/order/workflows/create-fulfillment.d.ts +1 -1
- package/dist/order/workflows/create-fulfillment.d.ts.map +1 -1
- package/dist/order/workflows/create-fulfillment.js +10 -2
- package/dist/order/workflows/create-fulfillment.js.map +1 -1
- package/dist/order/workflows/create-order-payment-collection.d.ts +1 -1
- package/dist/order/workflows/create-order-payment-collection.js +1 -1
- package/dist/order/workflows/create-order.d.ts +1 -1
- package/dist/order/workflows/create-order.js +1 -1
- package/dist/order/workflows/create-shipment.d.ts +1 -1
- package/dist/order/workflows/create-shipment.js +1 -1
- package/dist/order/workflows/delete-order-payment-collection.d.ts +1 -1
- package/dist/order/workflows/delete-order-payment-collection.js +1 -1
- package/dist/order/workflows/exchange/begin-order-exchange.d.ts +1 -1
- package/dist/order/workflows/exchange/begin-order-exchange.js +1 -1
- package/dist/order/workflows/exchange/cancel-begin-order-exchange.d.ts +1 -1
- package/dist/order/workflows/exchange/cancel-begin-order-exchange.js +1 -1
- package/dist/order/workflows/exchange/cancel-exchange.d.ts +1 -1
- package/dist/order/workflows/exchange/cancel-exchange.js +1 -1
- package/dist/order/workflows/exchange/confirm-exchange-request.d.ts +1 -1
- package/dist/order/workflows/exchange/confirm-exchange-request.js +1 -1
- package/dist/order/workflows/exchange/create-exchange-shipping-method.d.ts +2 -2
- package/dist/order/workflows/exchange/create-exchange-shipping-method.js +2 -2
- package/dist/order/workflows/exchange/exchange-add-new-item.d.ts +1 -1
- package/dist/order/workflows/exchange/exchange-add-new-item.js +1 -1
- package/dist/order/workflows/exchange/exchange-request-item-return.d.ts +1 -1
- package/dist/order/workflows/exchange/exchange-request-item-return.js +1 -1
- package/dist/order/workflows/exchange/remove-exchange-item-action.d.ts +1 -1
- package/dist/order/workflows/exchange/remove-exchange-item-action.js +1 -1
- package/dist/order/workflows/exchange/remove-exchange-shipping-method.d.ts +2 -2
- package/dist/order/workflows/exchange/remove-exchange-shipping-method.js +2 -2
- package/dist/order/workflows/exchange/update-exchange-add-item.d.ts +1 -1
- package/dist/order/workflows/exchange/update-exchange-add-item.js +1 -1
- package/dist/order/workflows/exchange/update-exchange-shipping-method.d.ts +2 -2
- package/dist/order/workflows/exchange/update-exchange-shipping-method.js +2 -2
- package/dist/order/workflows/get-order-detail.d.ts +2 -2
- package/dist/order/workflows/get-order-detail.js +2 -2
- package/dist/order/workflows/get-orders-list.d.ts +2 -2
- package/dist/order/workflows/get-orders-list.js +2 -2
- package/dist/order/workflows/list-shipping-options-for-order.d.ts +1 -1
- package/dist/order/workflows/list-shipping-options-for-order.js +1 -1
- package/dist/order/workflows/mark-order-fulfillment-as-delivered.d.ts +1 -1
- package/dist/order/workflows/mark-order-fulfillment-as-delivered.js +1 -1
- package/dist/order/workflows/mark-payment-collection-as-paid.d.ts +1 -1
- package/dist/order/workflows/mark-payment-collection-as-paid.js +1 -1
- package/dist/order/workflows/order-edit/begin-order-edit.d.ts +1 -1
- package/dist/order/workflows/order-edit/begin-order-edit.js +1 -1
- package/dist/order/workflows/order-edit/cancel-begin-order-edit.d.ts +1 -1
- package/dist/order/workflows/order-edit/cancel-begin-order-edit.js +1 -1
- package/dist/order/workflows/order-edit/confirm-order-edit-request.d.ts +1 -1
- package/dist/order/workflows/order-edit/confirm-order-edit-request.d.ts.map +1 -1
- package/dist/order/workflows/order-edit/confirm-order-edit-request.js +3 -1
- package/dist/order/workflows/order-edit/confirm-order-edit-request.js.map +1 -1
- package/dist/order/workflows/order-edit/create-order-edit-shipping-method.d.ts +1 -1
- package/dist/order/workflows/order-edit/create-order-edit-shipping-method.js +1 -1
- package/dist/order/workflows/order-edit/order-edit-add-new-item.d.ts +1 -1
- package/dist/order/workflows/order-edit/order-edit-add-new-item.js +1 -1
- package/dist/order/workflows/order-edit/order-edit-update-item-quantity.d.ts +1 -1
- package/dist/order/workflows/order-edit/order-edit-update-item-quantity.js +1 -1
- package/dist/order/workflows/order-edit/remove-order-edit-item-action.d.ts +1 -1
- package/dist/order/workflows/order-edit/remove-order-edit-item-action.js +1 -1
- package/dist/order/workflows/order-edit/remove-order-edit-shipping-method.d.ts +1 -1
- package/dist/order/workflows/order-edit/remove-order-edit-shipping-method.js +1 -1
- package/dist/order/workflows/order-edit/request-order-edit.d.ts +10 -1
- package/dist/order/workflows/order-edit/request-order-edit.d.ts.map +1 -1
- package/dist/order/workflows/order-edit/request-order-edit.js +4 -2
- package/dist/order/workflows/order-edit/request-order-edit.js.map +1 -1
- package/dist/order/workflows/order-edit/update-order-edit-add-item.d.ts +1 -1
- package/dist/order/workflows/order-edit/update-order-edit-add-item.js +1 -1
- package/dist/order/workflows/order-edit/update-order-edit-shipping-method.d.ts +1 -1
- package/dist/order/workflows/order-edit/update-order-edit-shipping-method.js +1 -1
- package/dist/order/workflows/return/begin-receive-return.d.ts +1 -1
- package/dist/order/workflows/return/begin-receive-return.js +1 -1
- package/dist/order/workflows/return/begin-return.d.ts +1 -1
- package/dist/order/workflows/return/begin-return.js +1 -1
- package/dist/order/workflows/return/cancel-receive-return.d.ts +1 -1
- package/dist/order/workflows/return/cancel-receive-return.js +1 -1
- package/dist/order/workflows/return/cancel-request-return.d.ts +1 -1
- package/dist/order/workflows/return/cancel-request-return.js +1 -1
- package/dist/order/workflows/return/cancel-return.d.ts +1 -1
- package/dist/order/workflows/return/cancel-return.js +1 -1
- package/dist/order/workflows/return/confirm-receive-return-request.d.ts +1 -1
- package/dist/order/workflows/return/confirm-receive-return-request.js +1 -1
- package/dist/order/workflows/return/confirm-return-request.d.ts +1 -1
- package/dist/order/workflows/return/confirm-return-request.js +1 -1
- package/dist/order/workflows/return/create-complete-return.d.ts +1 -1
- package/dist/order/workflows/return/create-complete-return.js +1 -1
- package/dist/order/workflows/return/create-return-shipping-method.d.ts +1 -1
- package/dist/order/workflows/return/create-return-shipping-method.js +1 -1
- package/dist/order/workflows/return/dismiss-item-return-request.d.ts +1 -1
- package/dist/order/workflows/return/dismiss-item-return-request.js +1 -1
- package/dist/order/workflows/return/receive-item-return-request.d.ts +1 -1
- package/dist/order/workflows/return/receive-item-return-request.js +1 -1
- package/dist/order/workflows/return/remove-item-receive-return-action.d.ts +1 -1
- package/dist/order/workflows/return/remove-item-receive-return-action.js +1 -1
- package/dist/order/workflows/return/remove-item-return-action.d.ts +1 -1
- package/dist/order/workflows/return/remove-item-return-action.js +1 -1
- package/dist/order/workflows/return/remove-return-shipping-method.d.ts +1 -1
- package/dist/order/workflows/return/remove-return-shipping-method.js +1 -1
- package/dist/order/workflows/return/request-item-return.d.ts +1 -1
- package/dist/order/workflows/return/request-item-return.js +1 -1
- package/dist/order/workflows/return/update-receive-item-return-request.d.ts +1 -1
- package/dist/order/workflows/return/update-receive-item-return-request.js +1 -1
- package/dist/order/workflows/return/update-request-item-return.d.ts +1 -1
- package/dist/order/workflows/return/update-request-item-return.js +1 -1
- package/dist/order/workflows/return/update-return-shipping-method.d.ts +1 -1
- package/dist/order/workflows/return/update-return-shipping-method.js +1 -1
- package/dist/order/workflows/return/update-return.d.ts +1 -1
- package/dist/order/workflows/return/update-return.js +1 -1
- package/dist/order/workflows/transfer/accept-order-transfer.d.ts +1 -1
- package/dist/order/workflows/transfer/accept-order-transfer.js +1 -1
- package/dist/order/workflows/transfer/cancel-order-transfer.d.ts +2 -2
- package/dist/order/workflows/transfer/cancel-order-transfer.js +2 -2
- package/dist/order/workflows/transfer/decline-order-transfer.d.ts +1 -1
- package/dist/order/workflows/transfer/decline-order-transfer.js +1 -1
- package/dist/order/workflows/transfer/request-order-transfer.d.ts +2 -2
- package/dist/order/workflows/transfer/request-order-transfer.js +2 -2
- package/dist/order/workflows/transfer/transfer-order-to-guest.d.ts +1 -1
- package/dist/order/workflows/transfer/transfer-order-to-guest.js +1 -1
- package/dist/order/workflows/update-order.d.ts +7 -1
- package/dist/order/workflows/update-order.d.ts.map +1 -1
- package/dist/order/workflows/update-order.js +7 -1
- package/dist/order/workflows/update-order.js.map +1 -1
- package/dist/order/workflows/update-tax-lines.d.ts.map +1 -1
- package/dist/order/workflows/update-tax-lines.js +1 -0
- package/dist/order/workflows/update-tax-lines.js.map +1 -1
- package/dist/payment/workflows/capture-payment.d.ts +1 -1
- package/dist/payment/workflows/capture-payment.js +1 -1
- package/dist/payment/workflows/refund-payment.d.ts +1 -1
- package/dist/payment/workflows/refund-payment.js +1 -1
- package/dist/payment-collection/workflows/create-payment-session.d.ts +1 -1
- package/dist/payment-collection/workflows/create-payment-session.js +1 -1
- package/dist/payment-collection/workflows/create-refund-reasons.d.ts +1 -1
- package/dist/payment-collection/workflows/create-refund-reasons.js +1 -1
- package/dist/payment-collection/workflows/delete-refund-reasons.d.ts +1 -1
- package/dist/payment-collection/workflows/delete-refund-reasons.js +1 -1
- package/dist/payment-collection/workflows/update-refund-reasons.d.ts +1 -1
- package/dist/payment-collection/workflows/update-refund-reasons.js +1 -1
- package/dist/price-list/workflows/batch-price-list-prices.d.ts +1 -1
- package/dist/price-list/workflows/batch-price-list-prices.js +1 -1
- package/dist/price-list/workflows/create-price-lists.d.ts +1 -1
- package/dist/price-list/workflows/create-price-lists.js +1 -1
- package/dist/price-list/workflows/delete-price-lists.d.ts +1 -1
- package/dist/price-list/workflows/delete-price-lists.js +1 -1
- package/dist/price-list/workflows/update-price-lists.d.ts +1 -1
- package/dist/price-list/workflows/update-price-lists.js +1 -1
- package/dist/pricing/workflows/create-price-preferences.d.ts +1 -1
- package/dist/pricing/workflows/create-price-preferences.js +1 -1
- package/dist/pricing/workflows/delete-price-preferences.d.ts +1 -1
- package/dist/pricing/workflows/delete-price-preferences.js +1 -1
- package/dist/pricing/workflows/update-price-preferences.d.ts +1 -1
- package/dist/pricing/workflows/update-price-preferences.js +1 -1
- package/dist/product/steps/process-product-options-for-import.d.ts +1 -1
- package/dist/product/workflows/batch-image-variants.d.ts +1 -1
- package/dist/product/workflows/batch-image-variants.js +1 -1
- package/dist/product/workflows/batch-link-products-collection.d.ts +1 -1
- package/dist/product/workflows/batch-link-products-collection.js +1 -1
- package/dist/product/workflows/batch-product-variants.d.ts +1 -1
- package/dist/product/workflows/batch-product-variants.js +1 -1
- package/dist/product/workflows/batch-products-in-category.d.ts +1 -1
- package/dist/product/workflows/batch-products-in-category.js +1 -1
- package/dist/product/workflows/batch-products.d.ts +1 -1
- package/dist/product/workflows/batch-products.js +1 -1
- package/dist/product/workflows/batch-variant-images.d.ts +1 -1
- package/dist/product/workflows/batch-variant-images.js +1 -1
- package/dist/product/workflows/create-and-link-product-options-to-product.d.ts +1 -1
- package/dist/product/workflows/create-and-link-product-options-to-product.js +1 -1
- package/dist/product/workflows/create-collections.d.ts +1 -1
- package/dist/product/workflows/create-collections.d.ts.map +1 -1
- package/dist/product/workflows/create-collections.js +1 -1
- package/dist/product/workflows/create-product-options.d.ts +1 -1
- package/dist/product/workflows/create-product-options.d.ts.map +1 -1
- package/dist/product/workflows/create-product-options.js +1 -1
- package/dist/product/workflows/create-product-tags.d.ts +1 -1
- package/dist/product/workflows/create-product-tags.d.ts.map +1 -1
- package/dist/product/workflows/create-product-tags.js +1 -1
- package/dist/product/workflows/create-product-types.d.ts +1 -1
- package/dist/product/workflows/create-product-types.d.ts.map +1 -1
- package/dist/product/workflows/create-product-types.js +1 -1
- package/dist/product/workflows/create-product-variants.d.ts +1 -1
- package/dist/product/workflows/create-product-variants.js +1 -1
- package/dist/product/workflows/create-products.d.ts +1 -1
- package/dist/product/workflows/create-products.js +1 -1
- package/dist/product/workflows/delete-collections.d.ts +1 -1
- package/dist/product/workflows/delete-collections.js +1 -1
- package/dist/product/workflows/delete-product-options.d.ts +1 -1
- package/dist/product/workflows/delete-product-options.js +1 -1
- package/dist/product/workflows/delete-product-tags.d.ts +1 -1
- package/dist/product/workflows/delete-product-tags.js +1 -1
- package/dist/product/workflows/delete-product-types.d.ts +1 -1
- package/dist/product/workflows/delete-product-types.js +1 -1
- package/dist/product/workflows/delete-product-variants.d.ts +1 -1
- package/dist/product/workflows/delete-product-variants.js +1 -1
- package/dist/product/workflows/delete-products.d.ts +1 -1
- package/dist/product/workflows/delete-products.js +1 -1
- package/dist/product/workflows/export-products.d.ts +2 -2
- package/dist/product/workflows/export-products.js +2 -2
- package/dist/product/workflows/import-products-as-chunks.d.ts +2 -2
- package/dist/product/workflows/import-products-as-chunks.js +2 -2
- package/dist/product/workflows/import-products.d.ts +2 -2
- package/dist/product/workflows/import-products.js +2 -2
- package/dist/product/workflows/update-collections.d.ts +1 -1
- package/dist/product/workflows/update-collections.d.ts.map +1 -1
- package/dist/product/workflows/update-collections.js +1 -1
- package/dist/product/workflows/update-product-options.d.ts +1 -1
- package/dist/product/workflows/update-product-options.d.ts.map +1 -1
- package/dist/product/workflows/update-product-options.js +1 -1
- package/dist/product/workflows/update-product-tags.d.ts +1 -1
- package/dist/product/workflows/update-product-tags.d.ts.map +1 -1
- package/dist/product/workflows/update-product-tags.js +1 -1
- package/dist/product/workflows/update-product-types.d.ts +1 -1
- package/dist/product/workflows/update-product-types.d.ts.map +1 -1
- package/dist/product/workflows/update-product-types.js +1 -1
- package/dist/product/workflows/update-product-variants.d.ts +1 -1
- package/dist/product/workflows/update-product-variants.js +1 -1
- package/dist/product/workflows/update-products.d.ts +1 -1
- package/dist/product/workflows/update-products.js +1 -1
- package/dist/product-category/steps/delete-product-categories.d.ts +7 -0
- package/dist/product-category/steps/delete-product-categories.d.ts.map +1 -1
- package/dist/product-category/steps/delete-product-categories.js +7 -0
- package/dist/product-category/steps/delete-product-categories.js.map +1 -1
- package/dist/product-category/workflows/create-product-categories.d.ts +1 -1
- package/dist/product-category/workflows/create-product-categories.d.ts.map +1 -1
- package/dist/product-category/workflows/create-product-categories.js +1 -1
- package/dist/product-category/workflows/delete-product-categories.d.ts +21 -1
- package/dist/product-category/workflows/delete-product-categories.d.ts.map +1 -1
- package/dist/product-category/workflows/delete-product-categories.js +21 -1
- package/dist/product-category/workflows/delete-product-categories.js.map +1 -1
- package/dist/product-category/workflows/update-product-categories.d.ts +1 -1
- package/dist/product-category/workflows/update-product-categories.d.ts.map +1 -1
- package/dist/product-category/workflows/update-product-categories.js +1 -1
- package/dist/promotion/workflows/add-or-remove-campaign-promotions.d.ts +1 -1
- package/dist/promotion/workflows/add-or-remove-campaign-promotions.js +1 -1
- package/dist/promotion/workflows/batch-promotion-rules.d.ts +3 -3
- package/dist/promotion/workflows/batch-promotion-rules.js +3 -3
- package/dist/promotion/workflows/create-campaigns.d.ts +1 -1
- package/dist/promotion/workflows/create-campaigns.d.ts.map +1 -1
- package/dist/promotion/workflows/create-campaigns.js +1 -1
- package/dist/promotion/workflows/create-promotions.d.ts +1 -1
- package/dist/promotion/workflows/create-promotions.d.ts.map +1 -1
- package/dist/promotion/workflows/create-promotions.js +1 -1
- package/dist/promotion/workflows/delete-campaigns.d.ts +1 -1
- package/dist/promotion/workflows/delete-campaigns.js +1 -1
- package/dist/promotion/workflows/delete-promotions.d.ts +1 -1
- package/dist/promotion/workflows/delete-promotions.js +1 -1
- package/dist/promotion/workflows/update-campaigns.d.ts +1 -1
- package/dist/promotion/workflows/update-campaigns.d.ts.map +1 -1
- package/dist/promotion/workflows/update-campaigns.js +1 -1
- package/dist/promotion/workflows/update-promotions.d.ts +1 -1
- package/dist/promotion/workflows/update-promotions.d.ts.map +1 -1
- package/dist/promotion/workflows/update-promotions.js +1 -1
- package/dist/region/workflows/create-regions.d.ts +1 -1
- package/dist/region/workflows/create-regions.js +1 -1
- package/dist/region/workflows/delete-regions.d.ts +1 -1
- package/dist/region/workflows/delete-regions.js +1 -1
- package/dist/region/workflows/update-regions.d.ts +1 -1
- package/dist/region/workflows/update-regions.js +1 -1
- package/dist/reservation/workflows/create-reservations.d.ts +1 -1
- package/dist/reservation/workflows/create-reservations.js +1 -1
- package/dist/reservation/workflows/delete-reservations.d.ts +1 -1
- package/dist/reservation/workflows/delete-reservations.js +1 -1
- package/dist/reservation/workflows/update-reservations.d.ts +1 -1
- package/dist/reservation/workflows/update-reservations.js +1 -1
- package/dist/return-reason/workflows/create-return-reasons.d.ts +1 -1
- package/dist/return-reason/workflows/create-return-reasons.js +1 -1
- package/dist/return-reason/workflows/delete-return-reasons.d.ts +1 -1
- package/dist/return-reason/workflows/delete-return-reasons.js +1 -1
- package/dist/return-reason/workflows/update-return-reasons.d.ts +1 -1
- package/dist/return-reason/workflows/update-return-reasons.js +1 -1
- package/dist/sales-channel/workflows/create-sales-channels.d.ts +1 -1
- package/dist/sales-channel/workflows/create-sales-channels.js +1 -1
- package/dist/sales-channel/workflows/delete-sales-channels.d.ts +1 -1
- package/dist/sales-channel/workflows/delete-sales-channels.js +1 -1
- package/dist/sales-channel/workflows/link-products-to-sales-channel.d.ts +1 -1
- package/dist/sales-channel/workflows/link-products-to-sales-channel.js +1 -1
- package/dist/sales-channel/workflows/update-sales-channels.d.ts +1 -1
- package/dist/sales-channel/workflows/update-sales-channels.js +1 -1
- package/dist/settings/steps/create-view-configuration.d.ts +15 -0
- package/dist/settings/steps/create-view-configuration.d.ts.map +1 -1
- package/dist/settings/steps/create-view-configuration.js +12 -0
- package/dist/settings/steps/create-view-configuration.js.map +1 -1
- package/dist/settings/steps/set-active-view-configuration.d.ts +23 -0
- package/dist/settings/steps/set-active-view-configuration.d.ts.map +1 -1
- package/dist/settings/steps/set-active-view-configuration.js +11 -0
- package/dist/settings/steps/set-active-view-configuration.js.map +1 -1
- package/dist/settings/steps/update-view-configuration.d.ts +20 -0
- package/dist/settings/steps/update-view-configuration.d.ts.map +1 -1
- package/dist/settings/steps/update-view-configuration.js +11 -0
- package/dist/settings/steps/update-view-configuration.js.map +1 -1
- package/dist/settings/workflows/clear-layout-configuration.d.ts +1 -1
- package/dist/settings/workflows/clear-layout-configuration.js +1 -1
- package/dist/settings/workflows/create-view-configuration.d.ts +38 -0
- package/dist/settings/workflows/create-view-configuration.d.ts.map +1 -1
- package/dist/settings/workflows/create-view-configuration.js +30 -0
- package/dist/settings/workflows/create-view-configuration.js.map +1 -1
- package/dist/settings/workflows/set-layout-configuration.d.ts +1 -1
- package/dist/settings/workflows/set-layout-configuration.js +1 -1
- package/dist/settings/workflows/update-view-configuration.d.ts +37 -0
- package/dist/settings/workflows/update-view-configuration.d.ts.map +1 -1
- package/dist/settings/workflows/update-view-configuration.js +26 -0
- package/dist/settings/workflows/update-view-configuration.js.map +1 -1
- package/dist/shipping-options/workflows/create-shipping-option-types.d.ts +1 -1
- package/dist/shipping-options/workflows/create-shipping-option-types.d.ts.map +1 -1
- package/dist/shipping-options/workflows/create-shipping-option-types.js +1 -1
- package/dist/shipping-options/workflows/delete-shipping-option-types.d.ts +1 -1
- package/dist/shipping-options/workflows/delete-shipping-option-types.js +1 -1
- package/dist/shipping-options/workflows/update-shipping-option-types.d.ts +1 -1
- package/dist/shipping-options/workflows/update-shipping-option-types.d.ts.map +1 -1
- package/dist/shipping-options/workflows/update-shipping-option-types.js +1 -1
- package/dist/shipping-profile/workflows/delete-shipping-profile.d.ts +1 -1
- package/dist/shipping-profile/workflows/delete-shipping-profile.js +1 -1
- package/dist/stock-location/workflows/create-location-fulfillment-set.d.ts +1 -1
- package/dist/stock-location/workflows/create-location-fulfillment-set.js +1 -1
- package/dist/stock-location/workflows/create-stock-locations.d.ts +1 -1
- package/dist/stock-location/workflows/create-stock-locations.d.ts.map +1 -1
- package/dist/stock-location/workflows/create-stock-locations.js +1 -1
- package/dist/stock-location/workflows/delete-stock-locations.d.ts +1 -1
- package/dist/stock-location/workflows/delete-stock-locations.js +1 -1
- package/dist/stock-location/workflows/link-sales-channels-to-stock-location.d.ts +1 -1
- package/dist/stock-location/workflows/link-sales-channels-to-stock-location.js +1 -1
- package/dist/stock-location/workflows/update-stock-locations.d.ts +1 -1
- package/dist/stock-location/workflows/update-stock-locations.js +1 -1
- package/dist/store/workflows/update-stores.d.ts +1 -1
- package/dist/store/workflows/update-stores.js +1 -1
- package/dist/tax/workflows/create-tax-rate-rules.d.ts +1 -1
- package/dist/tax/workflows/create-tax-rate-rules.js +1 -1
- package/dist/tax/workflows/create-tax-rates.d.ts +1 -1
- package/dist/tax/workflows/create-tax-rates.js +1 -1
- package/dist/tax/workflows/create-tax-regions.d.ts +1 -1
- package/dist/tax/workflows/create-tax-regions.js +1 -1
- package/dist/tax/workflows/delete-tax-rate-rules.d.ts +1 -1
- package/dist/tax/workflows/delete-tax-rate-rules.js +1 -1
- package/dist/tax/workflows/delete-tax-rates.d.ts +1 -1
- package/dist/tax/workflows/delete-tax-rates.js +1 -1
- package/dist/tax/workflows/delete-tax-regions.d.ts +1 -1
- package/dist/tax/workflows/delete-tax-regions.js +1 -1
- package/dist/tax/workflows/update-tax-rates.d.ts +1 -1
- package/dist/tax/workflows/update-tax-rates.js +1 -1
- package/dist/tax/workflows/update-tax-regions.d.ts +1 -1
- package/dist/tax/workflows/update-tax-regions.js +1 -1
- package/dist/translation/workflows/batch-translation-settings.d.ts +1 -1
- package/dist/translation/workflows/batch-translation-settings.d.ts.map +1 -1
- package/dist/translation/workflows/batch-translation-settings.js +1 -1
- package/dist/translation/workflows/batch-translations.d.ts +1 -1
- package/dist/translation/workflows/batch-translations.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/user/workflows/create-user-account.d.ts +1 -1
- package/dist/user/workflows/create-user-account.js +1 -1
- package/dist/user/workflows/remove-user-account.d.ts +1 -1
- package/dist/user/workflows/remove-user-account.js +1 -1
- package/dist/user/workflows/update-users.d.ts +1 -1
- package/dist/user/workflows/update-users.js +1 -1
- package/package.json +3 -3
|
@@ -16,7 +16,7 @@ export type CreateApiKeysWorkflowOutput = ApiKeyDTO[];
|
|
|
16
16
|
export declare const createApiKeysWorkflowId = "create-api-keys";
|
|
17
17
|
/**
|
|
18
18
|
* This workflow creates one or more API keys, which can be secret or publishable. It's used by the
|
|
19
|
-
* [Create API Key Admin API Route](https://docs.medusajs.com/api/admin
|
|
19
|
+
* [Create API Key Admin API Route](https://docs.medusajs.com/api/admin/api-keys/create-api-key).
|
|
20
20
|
*
|
|
21
21
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
22
22
|
* create API keys within your custom flows.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-api-keys.d.ts","sourceRoot":"","sources":["../../../src/api-key/workflows/create-api-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3E,OAAO,EACL,YAAY,EAIb,MAAM,mCAAmC,CAAA;AAG1C;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,SAAS,EAAE,CAAA;AAErD,eAAO,MAAM,uBAAuB,oBAAoB,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,qBAAqB;;;
|
|
1
|
+
{"version":3,"file":"create-api-keys.d.ts","sourceRoot":"","sources":["../../../src/api-key/workflows/create-api-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3E,OAAO,EACL,YAAY,EAIb,MAAM,mCAAmC,CAAA;AAG1C;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,SAAS,EAAE,CAAA;AAErD,eAAO,MAAM,uBAAuB,oBAAoB,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,qBAAqB;;;gBAc4vB,CAAC;;;aAD9xB,CAAA"}
|
|
@@ -6,7 +6,7 @@ const steps_1 = require("../steps");
|
|
|
6
6
|
exports.createApiKeysWorkflowId = "create-api-keys";
|
|
7
7
|
/**
|
|
8
8
|
* This workflow creates one or more API keys, which can be secret or publishable. It's used by the
|
|
9
|
-
* [Create API Key Admin API Route](https://docs.medusajs.com/api/admin
|
|
9
|
+
* [Create API Key Admin API Route](https://docs.medusajs.com/api/admin/api-keys/create-api-key).
|
|
10
10
|
*
|
|
11
11
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
12
12
|
* create API keys within your custom flows.
|
|
@@ -10,7 +10,7 @@ export type DeleteApiKeysWorkflowInput = {
|
|
|
10
10
|
export declare const deleteApiKeysWorkflowId = "delete-api-keys";
|
|
11
11
|
/**
|
|
12
12
|
* This workflow deletes one or more secret or publishable API keys. It's used by the
|
|
13
|
-
* [Delete API Key Admin API Route](https://docs.medusajs.com/api/admin
|
|
13
|
+
* [Delete API Key Admin API Route](https://docs.medusajs.com/api/admin/api-keys/delete-an-api-key).
|
|
14
14
|
*
|
|
15
15
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
16
16
|
* delete API keys within your custom flows.
|
|
@@ -8,7 +8,7 @@ const utils_1 = require("@medusajs/framework/utils");
|
|
|
8
8
|
exports.deleteApiKeysWorkflowId = "delete-api-keys";
|
|
9
9
|
/**
|
|
10
10
|
* This workflow deletes one or more secret or publishable API keys. It's used by the
|
|
11
|
-
* [Delete API Key Admin API Route](https://docs.medusajs.com/api/admin
|
|
11
|
+
* [Delete API Key Admin API Route](https://docs.medusajs.com/api/admin/api-keys/delete-an-api-key).
|
|
12
12
|
*
|
|
13
13
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
14
14
|
* delete API keys within your custom flows.
|
|
@@ -10,7 +10,7 @@ export type LinkSalesChannelsToApiKeyWorkflowInput = LinkWorkflowInput;
|
|
|
10
10
|
export declare const linkSalesChannelsToApiKeyWorkflowId = "link-sales-channels-to-api-key";
|
|
11
11
|
/**
|
|
12
12
|
* This workflow manages the sales channels of a publishable API key. It's used by the
|
|
13
|
-
* [Manage Sales Channels API Route](https://docs.medusajs.com/api/admin
|
|
13
|
+
* [Manage Sales Channels API Route](https://docs.medusajs.com/api/admin/api-keys/manage-sales-channels).
|
|
14
14
|
*
|
|
15
15
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
16
16
|
* manage the sales channels of a publishable API key within your custom flows.
|
|
@@ -6,7 +6,7 @@ const steps_1 = require("../steps");
|
|
|
6
6
|
exports.linkSalesChannelsToApiKeyWorkflowId = "link-sales-channels-to-api-key";
|
|
7
7
|
/**
|
|
8
8
|
* This workflow manages the sales channels of a publishable API key. It's used by the
|
|
9
|
-
* [Manage Sales Channels API Route](https://docs.medusajs.com/api/admin
|
|
9
|
+
* [Manage Sales Channels API Route](https://docs.medusajs.com/api/admin/api-keys/manage-sales-channels).
|
|
10
10
|
*
|
|
11
11
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
12
12
|
* manage the sales channels of a publishable API key within your custom flows.
|
|
@@ -21,7 +21,7 @@ export declare const revokeApiKeysWorkflowId = "revoke-api-keys";
|
|
|
21
21
|
* This workflow revokes one or more API keys. If the API key is a secret,
|
|
22
22
|
* it can't be used for authentication anymore. If it's publishable, it can't be used by client applications.
|
|
23
23
|
*
|
|
24
|
-
* This workflow is used by the [Revoke API Key API Route](https://docs.medusajs.com/api/admin
|
|
24
|
+
* This workflow is used by the [Revoke API Key API Route](https://docs.medusajs.com/api/admin/api-keys/revoke-api-key).
|
|
25
25
|
*
|
|
26
26
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
27
27
|
* revoke API keys within your custom flows.
|
|
@@ -8,7 +8,7 @@ exports.revokeApiKeysWorkflowId = "revoke-api-keys";
|
|
|
8
8
|
* This workflow revokes one or more API keys. If the API key is a secret,
|
|
9
9
|
* it can't be used for authentication anymore. If it's publishable, it can't be used by client applications.
|
|
10
10
|
*
|
|
11
|
-
* This workflow is used by the [Revoke API Key API Route](https://docs.medusajs.com/api/admin
|
|
11
|
+
* This workflow is used by the [Revoke API Key API Route](https://docs.medusajs.com/api/admin/api-keys/revoke-api-key).
|
|
12
12
|
*
|
|
13
13
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
14
14
|
* revoke API keys within your custom flows.
|
|
@@ -19,7 +19,7 @@ export type UpdateApiKeysWorkflowOutput = ApiKeyDTO[];
|
|
|
19
19
|
export declare const updateApiKeysWorkflowId = "update-api-keys";
|
|
20
20
|
/**
|
|
21
21
|
* This workflow updates one or more secret or publishable API keys. It's used by the
|
|
22
|
-
* [Update API Key Admin API Route](https://docs.medusajs.com/api/admin
|
|
22
|
+
* [Update API Key Admin API Route](https://docs.medusajs.com/api/admin/api-keys/update-an-api-key).
|
|
23
23
|
*
|
|
24
24
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
25
25
|
* update API keys within your custom flows.
|
|
@@ -6,7 +6,7 @@ const steps_1 = require("../steps");
|
|
|
6
6
|
exports.updateApiKeysWorkflowId = "update-api-keys";
|
|
7
7
|
/**
|
|
8
8
|
* This workflow updates one or more secret or publishable API keys. It's used by the
|
|
9
|
-
* [Update API Key Admin API Route](https://docs.medusajs.com/api/admin
|
|
9
|
+
* [Update API Key Admin API Route](https://docs.medusajs.com/api/admin/api-keys/update-an-api-key).
|
|
10
10
|
*
|
|
11
11
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
12
12
|
* update API keys within your custom flows.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ProjectConfigOptions } from "@medusajs/framework/types";
|
|
2
2
|
/**
|
|
3
3
|
* This workflow generates a reset password token for a user. It's used by the
|
|
4
|
-
* [Generate Reset Password Token for Admin](https://docs.medusajs.com/api/admin
|
|
5
|
-
* and [Generate Reset Password Token for Customer](https://docs.medusajs.com/api/store
|
|
4
|
+
* [Generate Reset Password Token for Admin](https://docs.medusajs.com/api/admin/auth/generate-reset-password-token)
|
|
5
|
+
* and [Generate Reset Password Token for Customer](https://docs.medusajs.com/api/store/auth/generate-reset-password-token)
|
|
6
6
|
* API Routes.
|
|
7
7
|
*
|
|
8
8
|
* The workflow emits the `auth.password_reset` event, which you can listen to in
|
|
@@ -8,8 +8,8 @@ const steps_1 = require("../steps");
|
|
|
8
8
|
const RESET_PASSWORD_TOKEN_TTL_SECONDS = 15 * 60;
|
|
9
9
|
/**
|
|
10
10
|
* This workflow generates a reset password token for a user. It's used by the
|
|
11
|
-
* [Generate Reset Password Token for Admin](https://docs.medusajs.com/api/admin
|
|
12
|
-
* and [Generate Reset Password Token for Customer](https://docs.medusajs.com/api/store
|
|
11
|
+
* [Generate Reset Password Token for Admin](https://docs.medusajs.com/api/admin/auth/generate-reset-password-token)
|
|
12
|
+
* and [Generate Reset Password Token for Customer](https://docs.medusajs.com/api/store/auth/generate-reset-password-token)
|
|
13
13
|
* API Routes.
|
|
14
14
|
*
|
|
15
15
|
* The workflow emits the `auth.password_reset` event, which you can listen to in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-line-item-actions.d.ts","sourceRoot":"","sources":["../../../src/cart/steps/get-line-item-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,wBAAwB,EAExB,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"get-line-item-actions.d.ts","sourceRoot":"","sources":["../../../src/cart/steps/get-line-item-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,wBAAwB,EAExB,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,2BAA2B,CAAA;AAQlC;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,KAAK,EAAE,wBAAwB,EAAE,CAAA;CAClC;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,aAAa,EAAE,wBAAwB,EAAE,CAAA;IACzC;;OAEG;IACH,aAAa,EACT,6BAA6B,EAAE,GAC/B,gCAAgC,EAAE,CAAA;CACvC;AAED,eAAO,MAAM,wBAAwB,+BAA+B,CAAA;AACpE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sBAAsB,qHA0ElC,CAAA"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getLineItemActionsStep = exports.getLineItemActionsStepId = void 0;
|
|
4
4
|
const utils_1 = require("@medusajs/framework/utils");
|
|
5
5
|
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
6
|
+
const find_matching_line_item_1 = require("../utils/find-matching-line-item");
|
|
6
7
|
exports.getLineItemActionsStepId = "get-line-item-actions-step";
|
|
7
8
|
/**
|
|
8
9
|
* This step returns lists of cart line items to create or update based on the
|
|
@@ -29,14 +30,7 @@ exports.getLineItemActionsStep = (0, workflows_sdk_1.createStep)(exports.getLine
|
|
|
29
30
|
cart_id: data.id,
|
|
30
31
|
variant_id: variantIds,
|
|
31
32
|
}, {
|
|
32
|
-
select:
|
|
33
|
-
"id",
|
|
34
|
-
"metadata",
|
|
35
|
-
"variant_id",
|
|
36
|
-
"quantity",
|
|
37
|
-
"unit_price",
|
|
38
|
-
"compare_at_unit_price",
|
|
39
|
-
],
|
|
33
|
+
select: find_matching_line_item_1.lineItemFieldsForMerging,
|
|
40
34
|
});
|
|
41
35
|
const variantItemsMap = existingVariantItems.reduce((result, variantItem) => {
|
|
42
36
|
if (!result.has(variantItem.variant_id)) {
|
|
@@ -47,14 +41,9 @@ exports.getLineItemActionsStep = (0, workflows_sdk_1.createStep)(exports.getLine
|
|
|
47
41
|
}, new Map());
|
|
48
42
|
const itemsToCreate = [];
|
|
49
43
|
const itemsToUpdate = [];
|
|
50
|
-
const metadataMatches = (existingItem, newItem) => (!(0, utils_1.isPresent)(existingItem?.metadata) && !(0, utils_1.isPresent)(newItem.metadata)) ||
|
|
51
|
-
(0, utils_1.deepEqualObj)(existingItem?.metadata, newItem.metadata);
|
|
52
44
|
for (const item of data.items) {
|
|
53
45
|
const variantItems = variantItemsMap.get(item.variant_id);
|
|
54
|
-
const existingItem =
|
|
55
|
-
? metadataMatches(existingItem, item) &&
|
|
56
|
-
item.unit_price === existingItem.unit_price
|
|
57
|
-
: metadataMatches(existingItem, item) && !existingItem.is_custom_price);
|
|
46
|
+
const existingItem = (0, find_matching_line_item_1.findMatchingLineItem)(variantItems, item);
|
|
58
47
|
if (existingItem) {
|
|
59
48
|
const quantity = utils_1.MathBN.sum(existingItem.quantity, item.quantity ?? 1);
|
|
60
49
|
// In case of multiple items with the same variant_id, metadata and custom price, we accumulate the quantity.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-line-item-actions.js","sourceRoot":"","sources":["../../../src/cart/steps/get-line-item-actions.ts"],"names":[],"mappings":";;;AAOA,
|
|
1
|
+
{"version":3,"file":"get-line-item-actions.js","sourceRoot":"","sources":["../../../src/cart/steps/get-line-item-actions.ts"],"names":[],"mappings":";;;AAOA,qDAA2D;AAC3D,qEAA4E;AAC5E,8EAGyC;AA6B5B,QAAA,wBAAwB,GAAG,4BAA4B,CAAA;AACpE;;;;;;;;;;;;;;GAcG;AACU,QAAA,sBAAsB,GAAG,IAAA,0BAAU,EAC9C,gCAAwB,EACxB,KAAK,EAAE,IAAiC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACzD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACvB,OAAO,IAAI,4BAAY,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAA;IACzE,CAAC;IAED,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAqB,eAAO,CAAC,IAAI,CAAC,CAAA;IAEtE,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAW,CAAC,CAAA;IACvD,MAAM,oBAAoB,GAAG,MAAM,UAAU,CAAC,aAAa,CACzD;QACE,OAAO,EAAE,IAAI,CAAC,EAAE;QAChB,UAAU,EAAE,UAAU;KACvB,EACD;QACE,MAAM,EAAE,kDAAwB;KACjC,CACF,CAAA;IAED,MAAM,eAAe,GAAG,oBAAoB,CAAC,MAAM,CACjD,CAAC,M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AAE,IAAI,CAAC,UAAU,IAAI,YAAY,CAAC,UAAU;oBACtD,qBAAqB,EACnB,IAAI,CAAC,qBAAqB,IAAI,YAAY,CAAC,qBAAqB;iBACnE,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;aAAM,CAAC;YACN,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC1B,CAAC;IACH,CAAC;IAED,OAAO,IAAI,4BAAY,CACrB,EAAE,aAAa,EAAE,aAAa,EAAkC,EAChE,IAAI,CACL,CAAA;AACH,CAAC,CACF,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BigNumberInput } from "@medusajs/framework/types";
|
|
2
|
+
/**
|
|
3
|
+
* The details of the items to resolve pricing quantities for.
|
|
4
|
+
*/
|
|
5
|
+
export interface GetLineItemPricingQuantitiesStepInput {
|
|
6
|
+
/**
|
|
7
|
+
* The ID of the cart the items are added to.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The items being added to the cart.
|
|
12
|
+
*/
|
|
13
|
+
items?: {
|
|
14
|
+
variant_id?: string;
|
|
15
|
+
quantity?: BigNumberInput;
|
|
16
|
+
unit_price?: BigNumberInput;
|
|
17
|
+
metadata?: Record<string, unknown> | null;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
export declare const getLineItemPricingQuantitiesStepId = "get-line-item-pricing-quantities";
|
|
21
|
+
/**
|
|
22
|
+
* This step resolves the quantity that each item added to a cart must be priced
|
|
23
|
+
* for. When an item is merged into an existing line item of the cart, its price
|
|
24
|
+
* has to be selected for the resulting total quantity, not only for the added
|
|
25
|
+
* quantity. Otherwise, quantity-based prices (such as price list tiers) are
|
|
26
|
+
* resolved against the wrong quantity.
|
|
27
|
+
*
|
|
28
|
+
* The returned quantities are aligned, by index, with the input items.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* const quantities = getLineItemPricingQuantitiesStep({
|
|
32
|
+
* "id": "cart_123",
|
|
33
|
+
* "items": [{
|
|
34
|
+
* "variant_id": "variant_123",
|
|
35
|
+
* "quantity": 1,
|
|
36
|
+
* }]
|
|
37
|
+
* })
|
|
38
|
+
*/
|
|
39
|
+
export declare const getLineItemPricingQuantitiesStep: import("@medusajs/framework/workflows-sdk").StepFunction<GetLineItemPricingQuantitiesStepInput, number[]>;
|
|
40
|
+
//# sourceMappingURL=get-line-item-pricing-quantities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-line-item-pricing-quantities.d.ts","sourceRoot":"","sources":["../../../src/cart/steps/get-line-item-pricing-quantities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAGf,MAAM,2BAA2B,CAAA;AAQlC;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,QAAQ,CAAC,EAAE,cAAc,CAAA;QACzB,UAAU,CAAC,EAAE,cAAc,CAAA;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;KAC1C,EAAE,CAAA;CACJ;AAED,eAAO,MAAM,kCAAkC,qCACX,CAAA;AACpC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gCAAgC,2GAuE5C,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLineItemPricingQuantitiesStep = exports.getLineItemPricingQuantitiesStepId = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
6
|
+
const find_matching_line_item_1 = require("../utils/find-matching-line-item");
|
|
7
|
+
exports.getLineItemPricingQuantitiesStepId = "get-line-item-pricing-quantities";
|
|
8
|
+
/**
|
|
9
|
+
* This step resolves the quantity that each item added to a cart must be priced
|
|
10
|
+
* for. When an item is merged into an existing line item of the cart, its price
|
|
11
|
+
* has to be selected for the resulting total quantity, not only for the added
|
|
12
|
+
* quantity. Otherwise, quantity-based prices (such as price list tiers) are
|
|
13
|
+
* resolved against the wrong quantity.
|
|
14
|
+
*
|
|
15
|
+
* The returned quantities are aligned, by index, with the input items.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const quantities = getLineItemPricingQuantitiesStep({
|
|
19
|
+
* "id": "cart_123",
|
|
20
|
+
* "items": [{
|
|
21
|
+
* "variant_id": "variant_123",
|
|
22
|
+
* "quantity": 1,
|
|
23
|
+
* }]
|
|
24
|
+
* })
|
|
25
|
+
*/
|
|
26
|
+
exports.getLineItemPricingQuantitiesStep = (0, workflows_sdk_1.createStep)(exports.getLineItemPricingQuantitiesStepId, async (data, { container }) => {
|
|
27
|
+
const items = data.items ?? [];
|
|
28
|
+
const quantities = items.map((item) => utils_1.MathBN.convert(item.quantity ?? 1).toNumber());
|
|
29
|
+
const variantIds = items
|
|
30
|
+
.map((item) => item.variant_id)
|
|
31
|
+
.filter((id) => !!id);
|
|
32
|
+
if (!variantIds.length) {
|
|
33
|
+
return new workflows_sdk_1.StepResponse(quantities);
|
|
34
|
+
}
|
|
35
|
+
const cartModule = container.resolve(utils_1.Modules.CART);
|
|
36
|
+
const existingVariantItems = await cartModule.listLineItems({
|
|
37
|
+
cart_id: data.id,
|
|
38
|
+
variant_id: variantIds,
|
|
39
|
+
}, {
|
|
40
|
+
select: find_matching_line_item_1.lineItemFieldsForMerging,
|
|
41
|
+
});
|
|
42
|
+
const variantItemsMap = existingVariantItems.reduce((result, variantItem) => {
|
|
43
|
+
if (!result.has(variantItem.variant_id)) {
|
|
44
|
+
result.set(variantItem.variant_id, []);
|
|
45
|
+
}
|
|
46
|
+
result.get(variantItem.variant_id).push(variantItem);
|
|
47
|
+
return result;
|
|
48
|
+
}, new Map());
|
|
49
|
+
items.forEach((item, index) => {
|
|
50
|
+
if (!item.variant_id) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const existingItem = (0, find_matching_line_item_1.findMatchingLineItem)(variantItemsMap.get(item.variant_id), {
|
|
54
|
+
metadata: item.metadata,
|
|
55
|
+
unit_price: item.unit_price,
|
|
56
|
+
is_custom_price: (0, utils_1.isDefined)(item.unit_price),
|
|
57
|
+
});
|
|
58
|
+
if (!existingItem) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const quantity = utils_1.MathBN.sum(existingItem.quantity, item.quantity ?? 1);
|
|
62
|
+
// In case of multiple items merging into the same line item, the
|
|
63
|
+
// quantities accumulate, the same way they do when the items are updated.
|
|
64
|
+
existingItem.quantity = quantity;
|
|
65
|
+
quantities[index] = quantity.toNumber();
|
|
66
|
+
});
|
|
67
|
+
return new workflows_sdk_1.StepResponse(quantities);
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=get-line-item-pricing-quantities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-line-item-pricing-quantities.js","sourceRoot":"","sources":["../../../src/cart/steps/get-line-item-pricing-quantities.ts"],"names":[],"mappings":";;;AAKA,qDAAsE;AACtE,qEAA4E;AAC5E,8EAGyC;AAqB5B,QAAA,kCAAkC,GAC7C,kCAAkC,CAAA;AACpC;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,gCAAgC,GAAG,IAAA,0BAAU,EACxD,0CAAkC,EAClC,KAAK,EAAE,IAA2C,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACnE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAA;IAC9B,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACpC,cAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,CA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AI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,eAAe,EAAE,IAAA,iBAAS,EAAC,IAAI,CAAC,UAAU,CAAC;SAC5C,CACF,CAAA;QAED,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAM;QACR,CAAC;QAED,MAAM,QAAQ,GAAG,cAAM,CAAC,GAAG,CACzB,YAAY,CAAC,QAAkB,EAC/B,IAAI,CAAC,QAAQ,IAAI,CAAC,CACnB,CAAA;QAED,iEAAiE;QACjE,0EAA0E;QAC1E,YAAY,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAEhC,UAAU,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAA;IACzC,CAAC,CAAC,CAAA;IAEF,OAAO,IAAI,4BAAY,CAAC,UAAU,CAAC,CAAA;AACrC,CAAC,CACF,CAAA"}
|
|
@@ -11,6 +11,7 @@ export * from "./find-or-create-customer";
|
|
|
11
11
|
export * from "./find-sales-channel";
|
|
12
12
|
export * from "./get-actions-to-compute-from-promotions";
|
|
13
13
|
export * from "./get-line-item-actions";
|
|
14
|
+
export * from "./get-line-item-pricing-quantities";
|
|
14
15
|
export * from "./update-cart-items-translations";
|
|
15
16
|
export * from "./get-promotion-codes-to-apply";
|
|
16
17
|
export * from "./get-variant-price-sets";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cart/steps/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sCAAsC,CAAA;AACpD,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACp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AA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,8CAA8C,CAAA;AAC5D,cAAc,gCAAgC,CAAA;AAC9C,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kCAAkC,CAAA;AAChD,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qBAAqB,CAAA"}
|
package/dist/cart/steps/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./find-or-create-customer"), exports);
|
|
|
27
27
|
__exportStar(require("./find-sales-channel"), exports);
|
|
28
28
|
__exportStar(require("./get-actions-to-compute-from-promotions"), exports);
|
|
29
29
|
__exportStar(require("./get-line-item-actions"), exports);
|
|
30
|
+
__exportStar(require("./get-line-item-pricing-quantities"), exports);
|
|
30
31
|
__exportStar(require("./update-cart-items-translations"), exports);
|
|
31
32
|
__exportStar(require("./get-promotion-codes-to-apply"), exports);
|
|
32
33
|
__exportStar(require("./get-variant-price-sets"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cart/steps/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA6C;AAC7C,iEAA8C;AAC9C,sDAAmC;AACnC,iDAA8B;AAC9B,iEAA8C;AAC9C,sDAAmC;AACnC,8DAA2C;AAC3C,uEAAoD;AACpD,2DAAwC;AACxC,4DAAyC;AACzC,uDAAoC;AACpC,2EAAwD;AACxD,0DAAuC;AACvC,mEAAgD;AAChD,iEAA8C;AAC9C,2DAAwC;AACxC,iDAA8B;AAC9B,+EAA4D;AAC5D,iEAA8C;AAC9C,uEAAoD;AACpD,qEAAkD;AAClD,sDAAmC;AACnC,kDAA+B;AAC/B,4DAAyC;AACzC,2DAAwC;AACxC,iDAA8B;AAC9B,sDAAmC;AACnC,4DAAyC;AACzC,wDAAqC;AACrC,2DAAwC;AACxC,mEAAgD;AAChD,4DAAyC;AACzC,kDAA+B;AAC/B,8DAA2C;AAC3C,mEAAgD;AAChD,oEAAiD;AACjD,sDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cart/steps/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA6C;AAC7C,iEAA8C;AAC9C,sDAAmC;AACnC,iDAA8B;AAC9B,iEAA8C;AAC9C,sDAAmC;AACnC,8DAA2C;AAC3C,uEAAoD;AACpD,2DAAwC;AACxC,4DAAyC;AACzC,uDAAoC;AACpC,2EAAwD;AACxD,0DAAuC;AACvC,qEAAkD;AAClD,mEAAgD;AAChD,iEAA8C;AAC9C,2DAAwC;AACxC,iDAA8B;AAC9B,+EAA4D;AAC5D,iEAA8C;AAC9C,uEAAoD;AACpD,qEAAkD;AAClD,sDAAmC;AACnC,kDAA+B;AAC/B,4DAAyC;AACzC,2DAAwC;AACxC,iDAA8B;AAC9B,sDAAmC;AACnC,4DAAyC;AACzC,wDAAqC;AACrC,2DAAwC;AACxC,mEAAgD;AAChD,4DAAyC;AACzC,kDAA+B;AAC/B,8DAA2C;AAC3C,mEAAgD;AAChD,oEAAiD;AACjD,sDAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../../src/cart/utils/fields.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,yBAAyB,UAmDrC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,UAiF9B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,UAA+B,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,qBAAqB,UAoCjC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,2CAA2C,
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../../src/cart/utils/fields.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,yBAAyB,UAmDrC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,UAiF9B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,UAA+B,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,qBAAqB,UAoCjC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,2CAA2C,UAoBvD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../src/cart/utils/fields.ts"],"names":[],"mappings":";AAAA,yFAAyF;;;AAEzF,sDAAmE;AAEnE,yGAAyG;AACzG;;GAEG;AACU,QAAA,yBAAyB,GAAG;IACvC,IAAI;IACJ,OAAO;IACP,eAAe;IACf,UAAU;IACV,UAAU;IACV,qBAAqB;IACrB,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,wBAAwB;IACxB,eAAe;IACf,mBAAmB;IACnB,WAAW;IACX,UAAU;IACV,cAAc;IACd,kBAAkB;IAClB,UAAU;IACV,SAAS;IACT,kBAAkB;IAClB,2BAA2B;IAC3B,6BAA6B;IAC7B,6BAA6B;IAC7B,uBAAuB;IACvB,uBAAuB;IACvB,sBAAsB;IACtB,kBAAkB;IAClB,0BAA0B;IAC1B,2CAA2C;IAC3C,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,wBAAwB;IACxB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,gCAAgC;IAChC,8BAA8B;I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EAA+E;IAC/E,qEAAqE;IACrE,4EAA4E;IAC5E,8EAA8E;IAC9E,2FAA2F;IAC3F,6FAA6F;CAC9F,CAAA;AAED;;GAEG;AACU,QAAA,2BAA2B,GAAG,CAAC,GAAG,gCAAuB,CAAC,CAAA;AAEvE;;GAEG;AACU,QAAA,qBAAqB,GAAG;IACnC,IAAI;IACJ,OAAO;IACP,KAAK;IACL,kBAAkB;IAClB,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;IACjB,uBAAuB;IACvB,SAAS;IACT,WAAW;IACX,YAAY;IACZ,eAAe;IACf,qBAAqB;IACrB,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,iBAAiB;IACjB,0BAA0B;IAC1B,gBAAgB;IAChB,sBAAsB;IACtB,qBAAqB;IACrB,6BAA6B;IAC7B,mCAAmC;IACnC,mCAAmC;IACnC,6CAA6C;IAC7C,4DAA4D;IAC5D,6DAA6D;IAC7D,uDAAuD;IACvD,gEAAgE;IAChE,iEAAiE;IACjE,8DAA8D;IAC9D,gEAAgE;IAChE,6EAA6E;IAC7E,+EAA+E;CAChF,CAAA;AAED;;GAEG;AACU,QAAA,2CAA2C,GAAG;IACzD,IAAI;IACJ,QAAQ;IACR,SAAS;IACT,kBAAkB;IAClB,0BAA0B;IAC1B,2CAA2C;IAC3C,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,wBAAwB;IACxB,kBAAkB;IAClB,6BAA6B;IAC7B,6BAA6B;IAC7B,uBAAuB;IACvB,sBAAsB;IACtB,oBAAoB;CACrB,CAAA"}
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../src/cart/utils/fields.ts"],"names":[],"mappings":";AAAA,yFAAyF;;;AAEzF,sDAAmE;AAEnE,yGAAyG;AACzG;;GAEG;AACU,QAAA,yBAAyB,GAAG;IACvC,IAAI;IACJ,OAAO;IACP,eAAe;IACf,UAAU;IACV,UAAU;IACV,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;IACR,eAAe;IACf,WAAW;IACX,SAAS;IACT,kBAAkB;IAClB,0BAA0B;IAC1B,2CAA2C;IAC3C,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,wBAAwB;IACxB,kBAAkB;IAClB,6BAA6B;IAC7B,6BAA6B;IAC7B,uBAAuB;IACvB,sBAAsB;IACtB,oBAAoB;CACrB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BigNumberInput, CartLineItemDTO } from "@medusajs/framework/types";
|
|
2
|
+
/**
|
|
3
|
+
* The properties of a new line item that determine whether it can be merged
|
|
4
|
+
* into an existing cart line item.
|
|
5
|
+
*/
|
|
6
|
+
export interface MatchableLineItem {
|
|
7
|
+
metadata?: Record<string, unknown> | null;
|
|
8
|
+
unit_price?: BigNumberInput;
|
|
9
|
+
is_custom_price?: boolean;
|
|
10
|
+
}
|
|
11
|
+
type ExistingLineItem = Pick<CartLineItemDTO, "metadata" | "unit_price" | "is_custom_price">;
|
|
12
|
+
/**
|
|
13
|
+
* The line item fields that must be selected when looking for existing cart
|
|
14
|
+
* line items a new item can be merged into.
|
|
15
|
+
*/
|
|
16
|
+
export declare const lineItemFieldsForMerging: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Finds the line item, among the existing items of the same variant, that a new
|
|
19
|
+
* item should be merged into. Items are merged when their metadata matches and
|
|
20
|
+
* either both carry the same custom price, or neither has a custom price.
|
|
21
|
+
*/
|
|
22
|
+
export declare function findMatchingLineItem<T extends ExistingLineItem>(existingItems: T[] | undefined, newItem: MatchableLineItem): T | undefined;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=find-matching-line-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-matching-line-item.d.ts","sourceRoot":"","sources":["../../../src/cart/utils/find-matching-line-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG3E;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACzC,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,KAAK,gBAAgB,GAAG,IAAI,CAC1B,eAAe,EACf,UAAU,GAAG,YAAY,GAAG,iBAAiB,CAC9C,CAAA;AASD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,UAQpC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,gBAAgB,EAC7D,aAAa,EAAE,CAAC,EAAE,GAAG,SAAS,EAC9B,OAAO,EAAE,iBAAiB,GACzB,CAAC,GAAG,SAAS,CAOf"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lineItemFieldsForMerging = void 0;
|
|
4
|
+
exports.findMatchingLineItem = findMatchingLineItem;
|
|
5
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
6
|
+
const metadataMatches = (existingItem, newItem) => (!(0, utils_1.isPresent)(existingItem?.metadata) && !(0, utils_1.isPresent)(newItem.metadata)) ||
|
|
7
|
+
(0, utils_1.deepEqualObj)(existingItem?.metadata, newItem.metadata);
|
|
8
|
+
/**
|
|
9
|
+
* The line item fields that must be selected when looking for existing cart
|
|
10
|
+
* line items a new item can be merged into.
|
|
11
|
+
*/
|
|
12
|
+
exports.lineItemFieldsForMerging = [
|
|
13
|
+
"id",
|
|
14
|
+
"metadata",
|
|
15
|
+
"variant_id",
|
|
16
|
+
"quantity",
|
|
17
|
+
"unit_price",
|
|
18
|
+
"compare_at_unit_price",
|
|
19
|
+
"is_custom_price",
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* Finds the line item, among the existing items of the same variant, that a new
|
|
23
|
+
* item should be merged into. Items are merged when their metadata matches and
|
|
24
|
+
* either both carry the same custom price, or neither has a custom price.
|
|
25
|
+
*/
|
|
26
|
+
function findMatchingLineItem(existingItems, newItem) {
|
|
27
|
+
return existingItems?.find((existingItem) => newItem.is_custom_price
|
|
28
|
+
? metadataMatches(existingItem, newItem) &&
|
|
29
|
+
newItem.unit_price === existingItem.unit_price
|
|
30
|
+
: metadataMatches(existingItem, newItem) && !existingItem.is_custom_price);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=find-matching-line-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-matching-line-item.js","sourceRoot":"","sources":["../../../src/cart/utils/find-matching-line-item.ts"],"names":[],"mappings":";;;AA4CA,oDAUC;AArDD,qDAAmE;AAiBnE,MAAM,eAAe,GAAG,CACtB,YAA+C,EAC/C,OAA0B,EAC1B,EAAE,CACF,CAAC,CAAC,IAAA,iBAAS,EAAC,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAA,iBAAS,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpE,IAAA,oBAAY,EAAC,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;AAExD;;;GAGG;AACU,QAAA,wBAAwB,GAAG;IACtC,IAAI;IACJ,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,uBAAuB;IACvB,iBAAiB;CAClB,CAAA;AAED;;;;GAIG;AACH,SAAgB,oBAAoB,CAClC,aAA8B,EAC9B,OAA0B;IAE1B,OAAO,aAAa,EAAE,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CAC1C,OAAO,CAAC,eAAe;QACrB,CAAC,CAAC,eAAe,CAAC,YAAY,EAAE,OAAO,CAAC;YACtC,OAAO,CAAC,UAAU,KAAK,YAAY,CAAC,UAAU;QAChD,CAAC,CAAC,eAAe,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAC5E,CAAA;AACH,CAAC"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { BigNumberInput, ConfirmVariantInventoryWorkflowInputDTO } from "@medusajs/framework/types";
|
|
2
|
+
/**
|
|
3
|
+
* The order fields required to confirm inventory availability.
|
|
4
|
+
* Use these fields when querying an order to pass to
|
|
5
|
+
* `prepareConfirmInventoryInput`.
|
|
6
|
+
*/
|
|
2
7
|
export declare const requiredOrderFieldsForInventoryConfirmation: string[];
|
|
8
|
+
/**
|
|
9
|
+
* The variant fields required to confirm inventory availability.
|
|
10
|
+
* Use these fields when querying a variant to pass to
|
|
11
|
+
* `prepareConfirmInventoryInput`.
|
|
12
|
+
*/
|
|
3
13
|
export declare const requiredVariantFieldsForInventoryConfirmation: string[];
|
|
4
14
|
interface ConfirmInventoryItem {
|
|
5
15
|
id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-confirm-inventory-input.d.ts","sourceRoot":"","sources":["../../../src/cart/utils/prepare-confirm-inventory-input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,uCAAuC,EACxC,MAAM,2BAA2B,CAAA;AAQlC,eAAO,MAAM,2CAA2C,UAmBvD,CAAA;AAED,eAAO,MAAM,6CAA6C,UAczD,CAAA;
|
|
1
|
+
{"version":3,"file":"prepare-confirm-inventory-input.d.ts","sourceRoot":"","sources":["../../../src/cart/utils/prepare-confirm-inventory-input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,uCAAuC,EACxC,MAAM,2BAA2B,CAAA;AAQlC;;;;GAIG;AACH,eAAO,MAAM,2CAA2C,UAmBvD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,6CAA6C,UAczD,CAAA;AAuBD,UAAU,oBAAoB;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,eAAe,EAAE,OAAO,CAAA;IACxB,QAAQ,EAAE,cAAc,CAAA;IACxB,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,GAAI,MAAM;IACjD,KAAK,EAAE,uCAAuC,CAAA;CAC/C;;CAqIA,CAAA"}
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.prepareConfirmInventoryInput = exports.requiredVariantFieldsForInventoryConfirmation = exports.requiredOrderFieldsForInventoryConfirmation = void 0;
|
|
4
4
|
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
/**
|
|
6
|
+
* The order fields required to confirm inventory availability.
|
|
7
|
+
* Use these fields when querying an order to pass to
|
|
8
|
+
* `prepareConfirmInventoryInput`.
|
|
9
|
+
*/
|
|
5
10
|
exports.requiredOrderFieldsForInventoryConfirmation = [
|
|
6
11
|
"id",
|
|
7
12
|
"version",
|
|
@@ -22,6 +27,11 @@ exports.requiredOrderFieldsForInventoryConfirmation = [
|
|
|
22
27
|
"items.variant.inventory_items.inventory.location_levels.stock_locations.sales_channels.id",
|
|
23
28
|
"items.variant.inventory_items.inventory.location_levels.stock_locations.sales_channels.name",
|
|
24
29
|
];
|
|
30
|
+
/**
|
|
31
|
+
* The variant fields required to confirm inventory availability.
|
|
32
|
+
* Use these fields when querying a variant to pass to
|
|
33
|
+
* `prepareConfirmInventoryInput`.
|
|
34
|
+
*/
|
|
25
35
|
exports.requiredVariantFieldsForInventoryConfirmation = [
|
|
26
36
|
"manage_inventory",
|
|
27
37
|
"allow_backorder",
|
|
@@ -56,6 +66,12 @@ const prepareConfirmInventoryInput = (data) => {
|
|
|
56
66
|
const variantsWithLocationForChannel = new Set();
|
|
57
67
|
let hasManagedInventory = false;
|
|
58
68
|
const salesChannelId = data.input.sales_channel_id;
|
|
69
|
+
// Variants for which an item explicitly opts into backorder, overriding the
|
|
70
|
+
// variant's own `allow_backorder` setting (e.g. an admin adding an
|
|
71
|
+
// out-of-stock item to a draft order).
|
|
72
|
+
const itemBackorderVariantIds = new Set((data.input.items ?? [])
|
|
73
|
+
.filter((item) => item.allow_backorder && item.variant_id)
|
|
74
|
+
.map((item) => item.variant_id));
|
|
59
75
|
for (const updateItem of data.input.itemsToUpdate ?? []) {
|
|
60
76
|
const updateItem_ = "data" in updateItem ? updateItem.data : updateItem;
|
|
61
77
|
const item = data.input.items.find((item) => item.variant_id === updateItem_.variant_id);
|
|
@@ -114,7 +130,8 @@ const prepareConfirmInventoryInput = (data) => {
|
|
|
114
130
|
for (const variant of allVariants.values()) {
|
|
115
131
|
if (variant.manage_inventory &&
|
|
116
132
|
!variantsWithLocationForChannel.has(variant.id) &&
|
|
117
|
-
!variant.allow_backorder
|
|
133
|
+
!variant.allow_backorder &&
|
|
134
|
+
!itemBackorderVariantIds.has(variant.id)) {
|
|
118
135
|
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `Sales channel ${salesChannelId} is not associated with any stock location for variant ${variant.id}.`);
|
|
119
136
|
}
|
|
120
137
|
}
|
|
@@ -155,7 +172,7 @@ const formatInventoryInput = ({ product_variant_inventory_items, location_ids, i
|
|
|
155
172
|
id: item.id,
|
|
156
173
|
inventory_item_id: variantInventoryItem.inventory_item_id,
|
|
157
174
|
required_quantity: variantInventoryItem.required_quantity,
|
|
158
|
-
allow_backorder: !!variant.allow_backorder,
|
|
175
|
+
allow_backorder: !!variant.allow_backorder || !!item.allow_backorder,
|
|
159
176
|
quantity: item.quantity,
|
|
160
177
|
location_ids: locationsWithAvailability.length
|
|
161
178
|
? locationsWithAvailability
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-confirm-inventory-input.js","sourceRoot":"","sources":["../../../src/cart/utils/prepare-confirm-inventory-input.ts"],"names":[],"mappings":";;;AAIA,qDAKkC;
|
|
1
|
+
{"version":3,"file":"prepare-confirm-inventory-input.js","sourceRoot":"","sources":["../../../src/cart/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BACX,EAAE,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAChD,CAAA;YAED,cAAc,CAAC,IAAI,CAAC;gBAClB,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,iBAAiB,EAAE,oBAAoB,CAAC,iBAAiB;gBACzD,iBAAiB,EAAE,oBAAoB,CAAC,iBAAiB;gBACzD,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,IAAI,CAAC,CAAC,IAAI,CAAC,eAAe;gBACpE,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,YAAY,EAAE,yBAAyB,CAAC,MAAM;oBAC5C,CAAC,CAAC,yBAAyB;oBAC3B,CAAC,CAAC,kBAAkB,CAAC,MAAM;wBAC3B,CAAC,CAAC,kBAAkB;wBACpB,CAAC,CAAC,YAAY;aACjB,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
|
|
@@ -27,7 +27,7 @@ export interface AddShippingMethodToCartWorkflowInput {
|
|
|
27
27
|
export declare const addShippingMethodToCartWorkflowId = "add-shipping-method-to-cart";
|
|
28
28
|
/**
|
|
29
29
|
* This workflow adds a shipping method to a cart. It's executed by the
|
|
30
|
-
* [Add Shipping Method Store API Route](https://docs.medusajs.com/api/store
|
|
30
|
+
* [Add Shipping Method Store API Route](https://docs.medusajs.com/api/store/carts/add-shipping-method).
|
|
31
31
|
*
|
|
32
32
|
* You can use this workflow within your own customizations or custom workflows, allowing you to wrap custom logic around adding a shipping method to the cart.
|
|
33
33
|
*
|
|
@@ -16,7 +16,7 @@ const refresh_cart_items_1 = require("./refresh-cart-items");
|
|
|
16
16
|
exports.addShippingMethodToCartWorkflowId = "add-shipping-method-to-cart";
|
|
17
17
|
/**
|
|
18
18
|
* This workflow adds a shipping method to a cart. It's executed by the
|
|
19
|
-
* [Add Shipping Method Store API Route](https://docs.medusajs.com/api/store
|
|
19
|
+
* [Add Shipping Method Store API Route](https://docs.medusajs.com/api/store/carts/add-shipping-method).
|
|
20
20
|
*
|
|
21
21
|
* You can use this workflow within your own customizations or custom workflows, allowing you to wrap custom logic around adding a shipping method to the cart.
|
|
22
22
|
*
|
|
@@ -2,7 +2,7 @@ import { AdditionalData, AddToCartWorkflowInputDTO } from "@medusajs/framework/t
|
|
|
2
2
|
export declare const addToCartWorkflowId = "add-to-cart";
|
|
3
3
|
/**
|
|
4
4
|
* This workflow adds a product variant to a cart as a line item. It's executed by the
|
|
5
|
-
* [Add Line Item Store API Route](https://docs.medusajs.com/api/store
|
|
5
|
+
* [Add Line Item Store API Route](https://docs.medusajs.com/api/store/carts/add-line-item).
|
|
6
6
|
*
|
|
7
7
|
* You can use this workflow within your own customizations or custom workflows, allowing you to wrap custom logic around adding an item to the cart.
|
|
8
8
|
* For example, you can use this workflow to add a line item to the cart with a custom price.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-to-cart.d.ts","sourceRoot":"","sources":["../../../src/cart/workflows/add-to-cart.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,yBAAyB,EAG1B,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"add-to-cart.d.ts","sourceRoot":"","sources":["../../../src/cart/workflows/add-to-cart.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,yBAAyB,EAG1B,MAAM,2BAA2B,CAAA;AAiDlC,eAAO,MAAM,mBAAmB,gBAAgB,CAAA;AAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;qCA4Q7B,CAAA"}
|