fix: complete cart return type (#902)
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { Router } from "express"
|
||||
import "reflect-metadata"
|
||||
import { Cart } from "../../../../models/cart"
|
||||
import { Cart, Order, Swap } from "../../../../"
|
||||
import { DeleteResponse } from "../../../../types/common"
|
||||
import middlewares from "../../../middlewares"
|
||||
|
||||
const route = Router()
|
||||
|
||||
export default (app, container) => {
|
||||
@@ -127,6 +126,17 @@ export type StoreCartsRes = {
|
||||
cart: Omit<Cart, "refundable_amount" | "refunded_total">
|
||||
}
|
||||
|
||||
export type StoreCompleteCartRes = {
|
||||
type: "cart"
|
||||
data: Cart
|
||||
} | {
|
||||
type: "order"
|
||||
data: Order
|
||||
} | {
|
||||
type: "swap"
|
||||
data: Swap
|
||||
}
|
||||
|
||||
export type StoreCartsDeleteRes = DeleteResponse
|
||||
|
||||
export * from "./add-shipping-method"
|
||||
|
||||
Reference in New Issue
Block a user