From da4466a6872ff51ee3307eb10da3aad9cd587626 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Tue, 13 Aug 2024 15:17:49 +0200 Subject: [PATCH] chore: fixes build fails --- .../order-edit/create-order-edit-shipping-method.ts | 6 ++++-- .../order/workflows/order-edit/order-edit-add-new-item.ts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/core/core-flows/src/order/workflows/order-edit/create-order-edit-shipping-method.ts b/packages/core/core-flows/src/order/workflows/order-edit/create-order-edit-shipping-method.ts index 99f1f57d602a5..b7611b00d1ba0 100644 --- a/packages/core/core-flows/src/order/workflows/order-edit/create-order-edit-shipping-method.ts +++ b/packages/core/core-flows/src/order/workflows/order-edit/create-order-edit-shipping-method.ts @@ -8,12 +8,12 @@ import { } from "@medusajs/workflows-sdk" import { useRemoteQueryStep } from "../../../common" import { previewOrderChangeStep } from "../../steps" -import { createOrderChangeActionsStep } from "../../steps/create-order-change-actions" import { createOrderShippingMethods } from "../../steps/create-order-shipping-methods" import { throwIfIsCancelled, throwIfOrderChangeIsNotActive, } from "../../utils/order-validation" +import { createOrderChangeActionsWorkflow } from "../create-order-change-actions" /** * This step validates that a shipping method can be created for an order edit. @@ -141,7 +141,9 @@ export const createOrderEditShippingMethodWorkflow = createWorkflow( } ) - createOrderChangeActionsStep([orderChangeActionInput]) + createOrderChangeActionsWorkflow.runAsStep({ + input: [orderChangeActionInput], + }) return new WorkflowResponse(previewOrderChangeStep(order.id)) } diff --git a/packages/core/core-flows/src/order/workflows/order-edit/order-edit-add-new-item.ts b/packages/core/core-flows/src/order/workflows/order-edit/order-edit-add-new-item.ts index d100436002cab..fb9495f2e1ec8 100644 --- a/packages/core/core-flows/src/order/workflows/order-edit/order-edit-add-new-item.ts +++ b/packages/core/core-flows/src/order/workflows/order-edit/order-edit-add-new-item.ts @@ -8,13 +8,13 @@ import { transform, } from "@medusajs/workflows-sdk" import { useRemoteQueryStep } from "../../../common" -import { createOrderChangeActionsStep } from "../../steps/create-order-change-actions" import { previewOrderChangeStep } from "../../steps/preview-order-change" import { throwIfIsCancelled, throwIfOrderChangeIsNotActive, } from "../../utils/order-validation" import { addOrderLineItemsWorkflow } from "../add-line-items" +import { createOrderChangeActionsWorkflow } from "../create-order-change-actions" /** * This step validates that new items can be added to an order edit. @@ -93,7 +93,9 @@ export const orderOrderEditAddNewItemWorkflow = createWorkflow( } ) - createOrderChangeActionsStep(orderChangeActionInput) + createOrderChangeActionsWorkflow.runAsStep({ + input: orderChangeActionInput, + }) return new WorkflowResponse(previewOrderChangeStep(input.order_id)) }