feat(core-flows, order): add workflow to create change order actions (#8056)

what:

- adds workflow to create change order actions
This commit is contained in:
Riqwan Thamir
2024-07-10 12:35:03 +02:00
committed by GitHub
parent 04ec8e758f
commit bec2dcd667
37 changed files with 290 additions and 46 deletions

View File

@@ -1,16 +0,0 @@
export enum ChangeActionType {
CANCEL = "CANCEL",
FULFILL_ITEM = "FULFILL_ITEM",
CANCEL_ITEM_FULFILLMENT = "CANCEL_ITEM_FULFILLMENT",
ITEM_ADD = "ITEM_ADD",
ITEM_REMOVE = "ITEM_REMOVE",
RECEIVE_DAMAGED_RETURN_ITEM = "RECEIVE_DAMAGED_RETURN_ITEM",
RECEIVE_RETURN_ITEM = "RECEIVE_RETURN_ITEM",
RETURN_ITEM = "RETURN_ITEM",
CANCEL_RETURN_ITEM = "CANCEL_RETURN_ITEM",
SHIPPING_ADD = "SHIPPING_ADD",
SHIPPING_REMOVE = "SHIPPING_REMOVE",
SHIP_ITEM = "SHIP_ITEM",
WRITE_OFF_ITEM = "WRITE_OFF_ITEM",
REINSTATE_ITEM = "REINSTATE_ITEM",
}

View File

@@ -1,5 +1,9 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import { ChangeActionType } from "../action-key"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,5 +1,9 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import { ChangeActionType } from "../action-key"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,4 +1,4 @@
import { ChangeActionType } from "../action-key"
import { ChangeActionType } from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
OrderChangeProcessing.registerActionType(ChangeActionType.CANCEL, {

View File

@@ -1,5 +1,9 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import { ChangeActionType } from "../action-key"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,6 +1,10 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { VirtualOrder } from "@types"
import { ChangeActionType } from "../action-key"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,6 +1,10 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { VirtualOrder } from "@types"
import { ChangeActionType } from "../action-key"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,6 +1,10 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { EVENT_STATUS } from "@types"
import { ChangeActionType } from "../action-key"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,11 +1,11 @@
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
transformPropertiesToBigNumber,
} from "@medusajs/utils"
import { EVENT_STATUS } from "@types"
import { ChangeActionType } from "../action-key"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,5 +1,9 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import { ChangeActionType } from "../action-key"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,5 +1,9 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import { ChangeActionType } from "../action-key"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,5 +1,9 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import { ChangeActionType } from "../action-key"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,5 +1,4 @@
import { MedusaError, isDefined } from "@medusajs/utils"
import { ChangeActionType } from "../action-key"
import { ChangeActionType, MedusaError, isDefined } from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
import { setActionReference } from "../set-action-reference"

View File

@@ -1,5 +1,4 @@
import { MedusaError, isDefined } from "@medusajs/utils"
import { ChangeActionType } from "../action-key"
import { ChangeActionType, MedusaError, isDefined } from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
OrderChangeProcessing.registerActionType(ChangeActionType.SHIPPING_REMOVE, {

View File

@@ -1,5 +1,9 @@
import { MathBN, MedusaError, isDefined } from "@medusajs/utils"
import { ChangeActionType } from "../action-key"
import {
ChangeActionType,
MathBN,
MedusaError,
isDefined,
} from "@medusajs/utils"
import { OrderChangeProcessing } from "../calculate-order-change"
import {
setActionReference,

View File

@@ -1,4 +1,3 @@
export * from "./action-key"
export * from "./actions"
export * from "./apply-order-changes"
export * from "./calculate-order-change"