feat(medusa,types): product variant store endpoints (#13730)

* wip(medusa): product variant store endpoints

* chore: refactor types

* chore: changesets

* fix: address feedback 1

* feat: load images for variants by default

* fix: use query.graph directly instead of refetchEntity

* feat: enable cache for variants endpoint
This commit is contained in:
Frane Polić
2025-10-28 10:12:07 +01:00
committed by GitHub
parent 4f4ab6208d
commit 25a20ca95f
16 changed files with 901 additions and 29 deletions
@@ -1,5 +1,5 @@
import { PaginatedResponse } from "../../common"
import { StoreProduct } from "../store"
import { StoreProduct, StoreProductVariant } from "../store"
export interface StoreProductResponse {
/**
@@ -14,3 +14,17 @@ export type StoreProductListResponse = PaginatedResponse<{
*/
products: StoreProduct[]
}>
export interface StoreProductVariantResponse {
/**
* The product variant's details.
*/
variant: StoreProductVariant
}
export type StoreProductVariantListResponse = PaginatedResponse<{
/**
* The list of product variants.
*/
variants: StoreProductVariant[]
}>