feat(core-flows,medusa,types,utils): adds update cart API with promotions (#6514)
what: - adds update cart API - workflow - promotions - sales channel - region - customer
This commit is contained in:
@@ -41,12 +41,12 @@ export interface CreateCartDTO {
|
||||
}
|
||||
|
||||
export interface UpdateCartDataDTO {
|
||||
region_id?: string | null
|
||||
region_id?: string
|
||||
customer_id?: string | null
|
||||
sales_channel_id?: string | null
|
||||
|
||||
email?: string | null
|
||||
currency_code?: string | null
|
||||
currency_code?: string
|
||||
|
||||
shipping_address_id?: string | null
|
||||
billing_address_id?: string | null
|
||||
@@ -58,7 +58,7 @@ export interface UpdateCartDataDTO {
|
||||
}
|
||||
|
||||
export interface UpdateCartDTO extends UpdateCartDataDTO {
|
||||
id?: string
|
||||
id: string
|
||||
}
|
||||
|
||||
/** CART END */
|
||||
@@ -176,7 +176,7 @@ export interface UpdateLineItemWithSelectorDTO {
|
||||
|
||||
export interface UpdateCartWithSelectorDTO {
|
||||
selector: Partial<CartDTO>
|
||||
data: UpdateCartDTO
|
||||
data: UpdateCartDataDTO
|
||||
}
|
||||
|
||||
export interface UpdateLineItemDTO
|
||||
|
||||
@@ -65,3 +65,14 @@ export interface AddToCartWorkflowInputDTO {
|
||||
items: CreateCartCreateLineItemDTO[]
|
||||
cart: CartDTO
|
||||
}
|
||||
|
||||
export interface UpdateCartWorkflowInputDTO {
|
||||
id: string
|
||||
promo_codes?: string[]
|
||||
region_id?: string
|
||||
customer_id?: string | null
|
||||
sales_channel_id?: string | null
|
||||
email?: string | null
|
||||
currency_code?: string
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from "./address"
|
||||
export * from "./api-key"
|
||||
export * from "./auth"
|
||||
export * from "./bundles"
|
||||
export * from "./cache"
|
||||
@@ -27,10 +28,9 @@ export * from "./sales-channel"
|
||||
export * from "./search"
|
||||
export * from "./shared-context"
|
||||
export * from "./stock-location"
|
||||
export * from "./store"
|
||||
export * from "./tax"
|
||||
export * from "./totals"
|
||||
export * from "./transaction-base"
|
||||
export * from "./user"
|
||||
export * from "./workflow"
|
||||
export * from "./api-key"
|
||||
export * from "./store"
|
||||
|
||||
Reference in New Issue
Block a user