diff --git a/packages/core-flows/src/definition/index.ts b/packages/core-flows/src/definition/index.ts index 2eef7cc60d..9200339f2b 100644 --- a/packages/core-flows/src/definition/index.ts +++ b/packages/core-flows/src/definition/index.ts @@ -2,4 +2,3 @@ export * from "./cart" export * from "./inventory" export * from "./price-list" export * from "./product" -export * from "./promotion" diff --git a/packages/core-flows/src/index.ts b/packages/core-flows/src/index.ts index 844b249bef..b6819d03ff 100644 --- a/packages/core-flows/src/index.ts +++ b/packages/core-flows/src/index.ts @@ -1,3 +1,4 @@ export * from "./definition" export * from "./definitions" export * as Handlers from "./handlers" +export * from "./promotion" diff --git a/packages/core-flows/src/promotion/index.ts b/packages/core-flows/src/promotion/index.ts new file mode 100644 index 0000000000..68de82c9f9 --- /dev/null +++ b/packages/core-flows/src/promotion/index.ts @@ -0,0 +1,2 @@ +export * from "./steps" +export * from "./workflows" diff --git a/packages/core-flows/src/handlers/promotion/create-campaigns.ts b/packages/core-flows/src/promotion/steps/create-campaigns.ts similarity index 100% rename from packages/core-flows/src/handlers/promotion/create-campaigns.ts rename to packages/core-flows/src/promotion/steps/create-campaigns.ts diff --git a/packages/core-flows/src/handlers/promotion/create-promotions.ts b/packages/core-flows/src/promotion/steps/create-promotions.ts similarity index 100% rename from packages/core-flows/src/handlers/promotion/create-promotions.ts rename to packages/core-flows/src/promotion/steps/create-promotions.ts diff --git a/packages/core-flows/src/handlers/promotion/delete-campaigns.ts b/packages/core-flows/src/promotion/steps/delete-campaigns.ts similarity index 100% rename from packages/core-flows/src/handlers/promotion/delete-campaigns.ts rename to packages/core-flows/src/promotion/steps/delete-campaigns.ts diff --git a/packages/core-flows/src/handlers/promotion/delete-promotions.ts b/packages/core-flows/src/promotion/steps/delete-promotions.ts similarity index 100% rename from packages/core-flows/src/handlers/promotion/delete-promotions.ts rename to packages/core-flows/src/promotion/steps/delete-promotions.ts diff --git a/packages/core-flows/src/definition/promotion/index.ts b/packages/core-flows/src/promotion/steps/index.ts similarity index 100% rename from packages/core-flows/src/definition/promotion/index.ts rename to packages/core-flows/src/promotion/steps/index.ts diff --git a/packages/core-flows/src/handlers/promotion/update-campaigns.ts b/packages/core-flows/src/promotion/steps/update-campaigns.ts similarity index 100% rename from packages/core-flows/src/handlers/promotion/update-campaigns.ts rename to packages/core-flows/src/promotion/steps/update-campaigns.ts diff --git a/packages/core-flows/src/handlers/promotion/update-promotions.ts b/packages/core-flows/src/promotion/steps/update-promotions.ts similarity index 100% rename from packages/core-flows/src/handlers/promotion/update-promotions.ts rename to packages/core-flows/src/promotion/steps/update-promotions.ts diff --git a/packages/core-flows/src/definition/promotion/create-campaigns.ts b/packages/core-flows/src/promotion/workflows/create-campaigns.ts similarity index 88% rename from packages/core-flows/src/definition/promotion/create-campaigns.ts rename to packages/core-flows/src/promotion/workflows/create-campaigns.ts index af5bc0cd81..d364475447 100644 --- a/packages/core-flows/src/definition/promotion/create-campaigns.ts +++ b/packages/core-flows/src/promotion/workflows/create-campaigns.ts @@ -1,6 +1,6 @@ import { CampaignDTO, CreateCampaignDTO } from "@medusajs/types" import { WorkflowData, createWorkflow } from "@medusajs/workflows-sdk" -import { createCampaignsStep } from "../../handlers/promotion" +import { createCampaignsStep } from "../steps" type WorkflowInput = { campaignsData: CreateCampaignDTO[] } diff --git a/packages/core-flows/src/definition/promotion/create-promotions.ts b/packages/core-flows/src/promotion/workflows/create-promotions.ts similarity index 88% rename from packages/core-flows/src/definition/promotion/create-promotions.ts rename to packages/core-flows/src/promotion/workflows/create-promotions.ts index 227be13dd0..a19dce1015 100644 --- a/packages/core-flows/src/definition/promotion/create-promotions.ts +++ b/packages/core-flows/src/promotion/workflows/create-promotions.ts @@ -1,6 +1,6 @@ import { CreatePromotionDTO, PromotionDTO } from "@medusajs/types" import { WorkflowData, createWorkflow } from "@medusajs/workflows-sdk" -import { createPromotionsStep } from "../../handlers/promotion" +import { createPromotionsStep } from "../steps" type WorkflowInput = { promotionsData: CreatePromotionDTO[] } diff --git a/packages/core-flows/src/definition/promotion/delete-campaigns.ts b/packages/core-flows/src/promotion/workflows/delete-campaigns.ts similarity index 85% rename from packages/core-flows/src/definition/promotion/delete-campaigns.ts rename to packages/core-flows/src/promotion/workflows/delete-campaigns.ts index 578e95e89b..a6c14f4e04 100644 --- a/packages/core-flows/src/definition/promotion/delete-campaigns.ts +++ b/packages/core-flows/src/promotion/workflows/delete-campaigns.ts @@ -1,5 +1,5 @@ import { createWorkflow, WorkflowData } from "@medusajs/workflows-sdk" -import { deleteCampaignsStep } from "../../handlers/promotion" +import { deleteCampaignsStep } from "../steps" type WorkflowInput = { ids: string[] } diff --git a/packages/core-flows/src/definition/promotion/delete-promotions.ts b/packages/core-flows/src/promotion/workflows/delete-promotions.ts similarity index 85% rename from packages/core-flows/src/definition/promotion/delete-promotions.ts rename to packages/core-flows/src/promotion/workflows/delete-promotions.ts index ab4794d4ac..7223afaa8a 100644 --- a/packages/core-flows/src/definition/promotion/delete-promotions.ts +++ b/packages/core-flows/src/promotion/workflows/delete-promotions.ts @@ -1,5 +1,5 @@ import { createWorkflow, WorkflowData } from "@medusajs/workflows-sdk" -import { deletePromotionsStep } from "../../handlers/promotion" +import { deletePromotionsStep } from "../steps" type WorkflowInput = { ids: string[] } diff --git a/packages/core-flows/src/handlers/promotion/index.ts b/packages/core-flows/src/promotion/workflows/index.ts similarity index 100% rename from packages/core-flows/src/handlers/promotion/index.ts rename to packages/core-flows/src/promotion/workflows/index.ts diff --git a/packages/core-flows/src/definition/promotion/update-campaigns.ts b/packages/core-flows/src/promotion/workflows/update-campaigns.ts similarity index 88% rename from packages/core-flows/src/definition/promotion/update-campaigns.ts rename to packages/core-flows/src/promotion/workflows/update-campaigns.ts index d517c1f080..dac3086857 100644 --- a/packages/core-flows/src/definition/promotion/update-campaigns.ts +++ b/packages/core-flows/src/promotion/workflows/update-campaigns.ts @@ -1,6 +1,6 @@ import { CampaignDTO, UpdateCampaignDTO } from "@medusajs/types" import { WorkflowData, createWorkflow } from "@medusajs/workflows-sdk" -import { updateCampaignsStep } from "../../handlers/promotion" +import { updateCampaignsStep } from "../steps" type WorkflowInput = { campaignsData: UpdateCampaignDTO[] } diff --git a/packages/core-flows/src/definition/promotion/update-promotions.ts b/packages/core-flows/src/promotion/workflows/update-promotions.ts similarity index 88% rename from packages/core-flows/src/definition/promotion/update-promotions.ts rename to packages/core-flows/src/promotion/workflows/update-promotions.ts index 157c3ca81e..dcd44846cb 100644 --- a/packages/core-flows/src/definition/promotion/update-promotions.ts +++ b/packages/core-flows/src/promotion/workflows/update-promotions.ts @@ -1,6 +1,6 @@ import { PromotionDTO, UpdatePromotionDTO } from "@medusajs/types" import { WorkflowData, createWorkflow } from "@medusajs/workflows-sdk" -import { updatePromotionsStep } from "../../handlers/promotion" +import { updatePromotionsStep } from "../steps" type WorkflowInput = { promotionsData: UpdatePromotionDTO[] }