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ć authored and GitHub committed 2024-12-03 17:15:26 +00:00
1 parent 56ae076fd2
commit ab948b7c65
21 files changed
+809 -22

No files matched your search

@@ -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 */
},
}
)
@@ -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"