fix(types, medusa): request / response types clean-up (#9043)
More clean-up of request / response types
This commit is contained in:
@@ -5,11 +5,10 @@ import { prepareRetrieveQuery } from "../../../../../utils/get-query-config"
|
||||
import { refetchOrder } from "../../../orders/helpers"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import { defaultStoreCartFields } from "../../query-config"
|
||||
import { StoreCompleteCartType } from "../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest<StoreCompleteCartType>,
|
||||
req: MedusaRequest,
|
||||
res: MedusaResponse<HttpTypes.StoreCompleteCartResponse>
|
||||
) => {
|
||||
const cart_id = req.params.id
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
StoreAddCartPromotions,
|
||||
StoreAddCartShippingMethods,
|
||||
StoreCalculateCartTaxes,
|
||||
StoreCompleteCart,
|
||||
StoreCreateCart,
|
||||
StoreGetCartsCart,
|
||||
StoreRemoveCartPromotions,
|
||||
@@ -134,7 +133,6 @@ export const storeCartRoutesMiddlewares: MiddlewareRoute[] = [
|
||||
method: ["POST"],
|
||||
matcher: "/store/carts/:id/complete",
|
||||
middlewares: [
|
||||
validateAndTransformBody(StoreCompleteCart),
|
||||
validateAndTransformQuery(
|
||||
StoreGetOrderParams,
|
||||
OrderQueryConfig.retrieveTransformQueryConfig
|
||||
|
||||
@@ -86,13 +86,6 @@ export const StoreAddCartShippingMethods = z
|
||||
})
|
||||
.strict()
|
||||
|
||||
export const StoreCompleteCart = z
|
||||
.object({
|
||||
idempotency_key: z.string().optional(),
|
||||
})
|
||||
.strict()
|
||||
export type StoreCompleteCartType = z.infer<typeof StoreCompleteCart>
|
||||
|
||||
export type StoreCreateCartPaymentCollectionType = z.infer<
|
||||
typeof StoreCreateCartPaymentCollection
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user