feat(workflows-sdk,core-flows,medusa,types): add workflow to update promotions to cart (#6474)

what:

- adds API + workflow to add/remove promotions in a cart
- minor fixes in promotions module
- minor type fixes in cart module
- typing fix in workflows-sdk (Thanks @adrien2p)
- fix step result in workflows-sdk (Thanks @adrien2p)

RESOLVES CORE-1768

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
Riqwan Thamir
2024-02-26 12:43:57 +00:00
committed by GitHub
co-authored by Adrien de Peretti
parent 63be07031b
commit ac86362e81
30 changed files with 1187 additions and 101 deletions
@@ -5,7 +5,7 @@ import {
WorkflowManager,
} from "@medusajs/orchestration"
import { LoadedModule, MedusaContainer } from "@medusajs/types"
import { isString, OrchestrationUtils } from "@medusajs/utils"
import { OrchestrationUtils, isString } from "@medusajs/utils"
import { ExportedWorkflow, exportWorkflow } from "../../helper"
import { proxify } from "./helpers/proxy"
import {
@@ -42,6 +42,7 @@ export type WorkflowData<T = unknown> = (T extends object
[Key in keyof T]: WorkflowData<T[Key]>
}
: T & WorkflowDataProperties<T>) &
T &
WorkflowDataProperties<T> & {
config(
config: { name?: string } & Omit<