Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core-flows): reorganize folder structure for promotion workflows #6243

Merged
merged 5 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fluffy-balloons-eat.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: does it make sense to include these for v2 work since it's not user facing yet? Or maybe we should at least indicate that this is for v2 so the changelog will reflect it. cc: @olivermrbl

Copy link
Contributor

@olivermrbl olivermrbl Jan 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can omit the changeset.

However, since this package can contain both v1 and v2 updates, we can't guarantee these changes won't be part of a future release anyway.

Also, not sure how noting the FF would work with PRs that touch several packages and with both v1 and v2 changes. Perhaps, breaking up the changesets could be an approach for having a sensible changelog for this case.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/core-flows": patch
---

chore(core-flows): reorganize folder structure for promotion workflows
1 change: 0 additions & 1 deletion packages/core-flows/src/definition/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ export * from "./cart"
export * from "./inventory"
export * from "./price-list"
export * from "./product"
export * from "./promotion"
1 change: 1 addition & 0 deletions packages/core-flows/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./definition"
export * from "./definitions"
export * as Handlers from "./handlers"
export * from "./promotion"
2 changes: 2 additions & 0 deletions packages/core-flows/src/promotion/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./steps"
export * from "./workflows"
Original file line number Diff line number Diff line change
@@ -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[] }

Expand Down
Original file line number Diff line number Diff line change
@@ -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[] }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createWorkflow, WorkflowData } from "@medusajs/workflows-sdk"
import { deleteCampaignsStep } from "../../handlers/promotion"
import { deleteCampaignsStep } from "../steps"

type WorkflowInput = { ids: string[] }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createWorkflow, WorkflowData } from "@medusajs/workflows-sdk"
import { deletePromotionsStep } from "../../handlers/promotion"
import { deletePromotionsStep } from "../steps"

type WorkflowInput = { ids: string[] }

Expand Down
Original file line number Diff line number Diff line change
@@ -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[] }

Expand Down
Original file line number Diff line number Diff line change
@@ -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[] }

Expand Down
Loading