feat: Line Items API Routes (#6478)
**What** - `POST /store/carts/:id/line-items` - `POST /store/carts/:id/line-items/:id` - `DELETE /store/carts/:id/line-items/:id` **Outstanding** - Integration tests - Module integrations: Payment, Fulfillment, Promotions Depends on #6475 and #6449.
This commit is contained in:
@@ -400,6 +400,10 @@ export interface CartLineItemDTO extends CartLineItemTotalsDTO {
|
||||
* When the line item was updated.
|
||||
*/
|
||||
updated_at?: Date
|
||||
/**
|
||||
* When the line item was deleted.
|
||||
*/
|
||||
deleted_at?: Date
|
||||
}
|
||||
|
||||
export interface CartDTO {
|
||||
|
||||
@@ -189,6 +189,7 @@ export interface UpdateLineItemDTO
|
||||
title?: string
|
||||
quantity?: number
|
||||
unit_price?: number
|
||||
metadata?: Record<string, unknown> | null
|
||||
|
||||
tax_lines?: UpdateTaxLineDTO[] | CreateTaxLineDTO[]
|
||||
adjustments?: UpdateAdjustmentDTO[] | CreateAdjustmentDTO[]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { CartDTO } from "./common"
|
||||
import { CartDTO, CartLineItemDTO } from "./common"
|
||||
import { UpdateLineItemDTO } from "./mutations"
|
||||
|
||||
export interface CreateCartCreateLineItemDTO {
|
||||
quantity: number
|
||||
@@ -32,6 +33,12 @@ export interface CreateCartCreateLineItemDTO {
|
||||
metadata?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export interface UpdateLineItemInCartWorkflowInputDTO {
|
||||
cart: CartDTO
|
||||
item: CartLineItemDTO
|
||||
update: Partial<UpdateLineItemDTO>
|
||||
}
|
||||
|
||||
export interface CreateCartAddressDTO {
|
||||
first_name?: string
|
||||
last_name?: string
|
||||
|
||||
Reference in New Issue
Block a user