feat(core-flows,medusa,order,types): update orders (#10373)

**What**
- add order update endpoint
- add workflows and steps for updating orders
- add `registerChanges` method to Order module + workflow step

---

CLOSES CMRC-633
This commit is contained in:
Frane Polić
2024-12-03 18:15:26 +01:00
committed by GitHub
parent 56ae076fd2
commit ab948b7c65
21 changed files with 809 additions and 22 deletions

View File

@@ -0,0 +1,20 @@
import { ChangeActionType } from "@medusajs/framework/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
import { setActionReference } from "../set-action-reference"
OrderChangeProcessing.registerActionType(
ChangeActionType.UPDATE_ORDER_PROPERTIES,
{
operation({ action, currentOrder, options }) {
/**
* NOOP: used as a reference for the change
*/
setActionReference(currentOrder, action, options)
},
validate({ action }) {
/* noop */
},
}
)

View File

@@ -14,3 +14,4 @@ export * from "./shipping-add"
export * from "./shipping-remove"
export * from "./write-off-item"
export * from "./transfer-customer"
export * from "./change-shipping-address"