fix(core-flows): Fix line item ids passed to deleteReservationsByLineItemsStep (#11465)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/core-flows": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(core-flows): Fix line item ids passed to deleteReservationsByLineItemsStep
|
||||||
+9
-9
@@ -44,14 +44,14 @@ export type ConfirmOrderEditRequestValidationStepInput = {
|
|||||||
/**
|
/**
|
||||||
* This step validates that a requested order edit can be confirmed.
|
* This step validates that a requested order edit can be confirmed.
|
||||||
* If the order is canceled or the order change is not active, the step will throw an error.
|
* If the order is canceled or the order change is not active, the step will throw an error.
|
||||||
*
|
*
|
||||||
* :::note
|
* :::note
|
||||||
*
|
*
|
||||||
* You can retrieve an order and order change details using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query),
|
* You can retrieve an order and order change details using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query),
|
||||||
* or [useQueryGraphStep](https://docs.medusajs.com/resources/references/medusa-workflows/steps/useQueryGraphStep).
|
* or [useQueryGraphStep](https://docs.medusajs.com/resources/references/medusa-workflows/steps/useQueryGraphStep).
|
||||||
*
|
*
|
||||||
* :::
|
* :::
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const data = confirmOrderEditRequestValidationStep({
|
* const data = confirmOrderEditRequestValidationStep({
|
||||||
* order: {
|
* order: {
|
||||||
@@ -93,10 +93,10 @@ export const confirmOrderEditRequestWorkflowId = "confirm-order-edit-request"
|
|||||||
/**
|
/**
|
||||||
* This workflow confirms an order edit request. It's used by the
|
* This workflow confirms an order edit request. It's used by the
|
||||||
* [Confirm Order Edit Admin API Route](https://docs.medusajs.com/api/admin#order-edits_postordereditsidconfirm).
|
* [Confirm Order Edit Admin API Route](https://docs.medusajs.com/api/admin#order-edits_postordereditsidconfirm).
|
||||||
*
|
*
|
||||||
* You can use this workflow within your customizations or your own custom workflows, allowing you to confirm an order edit
|
* You can use this workflow within your customizations or your own custom workflows, allowing you to confirm an order edit
|
||||||
* in your custom flow.
|
* in your custom flow.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const { result } = await confirmOrderEditRequestWorkflow(container)
|
* const { result } = await confirmOrderEditRequestWorkflow(container)
|
||||||
* .run({
|
* .run({
|
||||||
@@ -104,9 +104,9 @@ export const confirmOrderEditRequestWorkflowId = "confirm-order-edit-request"
|
|||||||
* order_id: "order_123",
|
* order_id: "order_123",
|
||||||
* }
|
* }
|
||||||
* })
|
* })
|
||||||
*
|
*
|
||||||
* @summary
|
* @summary
|
||||||
*
|
*
|
||||||
* Confirm an order edit request.
|
* Confirm an order edit request.
|
||||||
*/
|
*/
|
||||||
export const confirmOrderEditRequestWorkflow = createWorkflow(
|
export const confirmOrderEditRequestWorkflow = createWorkflow(
|
||||||
@@ -198,7 +198,7 @@ export const confirmOrderEditRequestWorkflow = createWorkflow(
|
|||||||
({ id }) => id
|
({ id }) => id
|
||||||
) // items that have been removed with the change
|
) // items that have been removed with the change
|
||||||
const newItemIds = data.orderItems.items.map(({ id }) => id)
|
const newItemIds = data.orderItems.items.map(({ id }) => id)
|
||||||
return [...new Set([...previousItemIds, newItemIds])]
|
return [...new Set([...previousItemIds, ...newItemIds])]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user