fix: listVariantsList types (#11441)

This commit is contained in:
Harminder Virk
2025-02-13 20:53:35 +05:30
committed by GitHub
parent cd2f2900e8
commit 1a3843a92a
2 changed files with 22 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/types": patch
---
fix: listVariantsList types

View File

@@ -726,8 +726,13 @@ export interface FilterableProductProps
* Filters on a product's variant properties.
*/
variants?: {
options?: { value: string; option_id: string }
options?: {
value?: string
option_id?: string
option?: Record<string, any>
}
}
/**
* Filter a product by the ID of the associated type
*/
@@ -899,22 +904,29 @@ export interface FilterableProductVariantProps
* Search through the title and different code attributes on the variant
*/
q?: string
/**
* The IDs to filter product variants by.
*/
id?: string | string[]
id?: string | string[] | OperatorMap<string | string[]>
/**
* The SKUs to filter product variants by.
*/
sku?: string | string[]
sku?: string | string[] | OperatorMap<string | string[]>
/**
* Filter the product variants by their associated products' IDs.
*/
product_id?: string | string[]
product_id?: string | string[] | OperatorMap<string | string[]>
/**
* Filter product variants by their associated options.
*/
options?: Record<string, string>
options?: {
value?: string
option_id?: string
option?: Record<string, any>
}
}
/**