fix: complete cart return type (#902)

This commit is contained in:
Zakaria El Asri
2021-12-08 22:37:13 +01:00
committed by GitHub
parent 36c0f468f9
commit 2e837fcdee
2 changed files with 15 additions and 8 deletions
@@ -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"