feat: Enable filtering admin products by variant EAN, UPC, and barcode (#12815)
* Add filters for variant ean, upc, and barcode in product queries and validators * fix: Omit 'q' field from variants in product list and validation parameters * Add tests for admin products filtering by variants ean, upc, and barcode * Add changeset for filter admin products api by variant ean, upc, and barcode --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Oli Juhl
parent
fbf33885f5
commit
6ca755ede7
@@ -24,6 +24,18 @@ export interface AdminProductVariantParams
|
||||
* out of stock.
|
||||
*/
|
||||
allow_backorder?: boolean
|
||||
/**
|
||||
* Filter by variant ean(s).
|
||||
*/
|
||||
ean?: string | string[]
|
||||
/**
|
||||
* Filter by variant upc(s).
|
||||
*/
|
||||
upc?: string | string[]
|
||||
/**
|
||||
* Filter by variant barcode(s).
|
||||
*/
|
||||
barcode?: string | string[]
|
||||
/**
|
||||
* Apply filters on the variant's creation date.
|
||||
*/
|
||||
@@ -46,5 +58,5 @@ export interface AdminProductListParams
|
||||
/**
|
||||
* Apply filters on the product variants.
|
||||
*/
|
||||
variants?: AdminProductVariantParams
|
||||
variants?: Omit<AdminProductVariantParams, "q">
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user