feat(medusa, types, utils, core-flows, order) request & accept order transfer (#10106)

**What**
- add request order transfer workflow
- add admin endpoint for transferring an order to a customer
- accept order transfer storefront endpoint
- accept transfer workflow
- changes in the order module to introduce new change and action types

---

**Note**
- we return 400 instead 409 currently if there is already an active order edit, I will revisit this in a followup
- endpoint for requesting order transfer from the storefront will be added in a separate PR

---

RESOLVES CMRC-701
RESOLVES CMRC-703
RESOLVES CMRC-704
RESOLVES CMRC-705
This commit is contained in:
Frane Polić
2024-11-19 09:53:22 +01:00
committed by GitHub
parent b1b7a4abf1
commit 36460a3a07
21 changed files with 660 additions and 4 deletions

View File

@@ -25,6 +25,8 @@ export const OrderWorkflowEvents = {
CLAIM_CREATED: "order.claim_created",
EXCHANGE_CREATED: "order.exchange_created",
TRANSFER_REQUESTED: "order.transfer_requested",
}
export const UserWorkflowEvents = {

View File

@@ -14,4 +14,5 @@ export enum ChangeActionType {
SHIP_ITEM = "SHIP_ITEM",
WRITE_OFF_ITEM = "WRITE_OFF_ITEM",
REINSTATE_ITEM = "REINSTATE_ITEM",
TRANSFER_CUSTOMER = "TRANSFER_CUSTOMER",
}