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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user