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
+1 -1
View File
@@ -206,7 +206,7 @@ export interface CartShippingMethodDTO {
/**
* The price of the shipping method
*/
unit_price: number
amount: number
/**
* Whether the shipping method price is tax inclusive or not
+4 -4
View File
@@ -22,8 +22,8 @@ import {
} from "./common"
import {
CreateAddressDTO,
CreateAdjustmentDTO,
CreateCartDTO,
CreateLineItemAdjustmentDTO,
CreateLineItemDTO,
CreateLineItemForCartDTO,
CreateLineItemTaxLineDTO,
@@ -185,14 +185,14 @@ export interface ICartModuleService extends IModuleService {
): Promise<LineItemAdjustmentDTO[]>
addLineItemAdjustments(
data: CreateAdjustmentDTO[]
data: CreateLineItemAdjustmentDTO[]
): Promise<LineItemAdjustmentDTO[]>
addLineItemAdjustments(
data: CreateAdjustmentDTO
data: CreateLineItemAdjustmentDTO
): Promise<LineItemAdjustmentDTO[]>
addLineItemAdjustments(
cartId: string,
data: CreateAdjustmentDTO[]
data: CreateLineItemAdjustmentDTO[]
): Promise<LineItemAdjustmentDTO[]>
setLineItemAdjustments(