fix(medusa): fix type of product variant request param (#14342)

Fix type argument for requests which is necessary for generating OpenAPI specs

## Why

The `StoreVariantListRequest` type used in the `/store/product-variants` route doesn't match the convention of other routes since it doesn't accept a type parameter for the query (or body, but here that's not necessary). This makes it difficult for us to infer the query parameter type of the request.

This change would adapt the `StoreVariantListRequest` to match other conventions in our API routes so that we can generate correct OAS for docs
This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-12-17 16:20:54 +00:00
1 parent 1c4c4b8e9a
commit 92d240d749
2 files changed
+8 -3

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix(medusa): fix type of product variant request param
@@ -12,9 +12,9 @@ import { wrapVariantsWithInventoryQuantityForSalesChannel } from "../../utils/mi
import { StoreRequestWithContext } from "../types" import { StoreRequestWithContext } from "../types"
import { wrapVariantsWithTaxPrices } from "./helpers" import { wrapVariantsWithTaxPrices } from "./helpers"
type StoreVariantListRequest = type StoreVariantListRequest<T = HttpTypes.StoreProductVariantParams> =
StoreRequestWithContext<HttpTypes.StoreProductVariantParams> & StoreRequestWithContext<T> &
AuthenticatedMedusaRequest<HttpTypes.StoreProductVariantParams> AuthenticatedMedusaRequest<T>
/** /**
* @since 2.11.2 * @since 2.11.2