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:
Riqwan Thamir
2024-02-27 12:09:30 +00:00
committed by GitHub
parent 608c10383a
commit f5c2256286
20 changed files with 435 additions and 96 deletions
+4 -4
View File
@@ -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
+11
View File
@@ -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
}
+2 -2
View File
@@ -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"