feat(medusa): add sku to variant query params (#11151)
what: - adds sku to variant query params
This commit is contained in:
@@ -697,6 +697,10 @@ export interface FilterableProductProps
|
|||||||
* The handles to filter products by.
|
* The handles to filter products by.
|
||||||
*/
|
*/
|
||||||
handle?: string | string[]
|
handle?: string | string[]
|
||||||
|
/**
|
||||||
|
* The skus to filter products by.
|
||||||
|
*/
|
||||||
|
sku?: string | string[]
|
||||||
/**
|
/**
|
||||||
* The IDs to filter products by.
|
* The IDs to filter products by.
|
||||||
*/
|
*/
|
||||||
@@ -1239,7 +1243,7 @@ export interface UpdateProductOptionValueDTO {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @interface
|
* @interface
|
||||||
*
|
*
|
||||||
* Inventory kit for creating a product variant.
|
* Inventory kit for creating a product variant.
|
||||||
*/
|
*/
|
||||||
export interface CreateProductVariantInventoryKit {
|
export interface CreateProductVariantInventoryKit {
|
||||||
|
|||||||
@@ -28,7 +28,10 @@ export const StoreGetProductParams = createSelectParams().merge(
|
|||||||
export const StoreGetProductVariantsParamsFields = z.object({
|
export const StoreGetProductVariantsParamsFields = z.object({
|
||||||
q: z.string().optional(),
|
q: z.string().optional(),
|
||||||
id: z.union([z.string(), z.array(z.string())]).optional(),
|
id: z.union([z.string(), z.array(z.string())]).optional(),
|
||||||
options: z.object({ value: z.string().optional(), option_id: z.string().optional() }).optional(),
|
sku: z.union([z.string(), z.array(z.string())]).optional(),
|
||||||
|
options: z
|
||||||
|
.object({ value: z.string().optional(), option_id: z.string().optional() })
|
||||||
|
.optional(),
|
||||||
created_at: createOperatorMap().optional(),
|
created_at: createOperatorMap().optional(),
|
||||||
updated_at: createOperatorMap().optional(),
|
updated_at: createOperatorMap().optional(),
|
||||||
deleted_at: createOperatorMap().optional(),
|
deleted_at: createOperatorMap().optional(),
|
||||||
@@ -64,10 +67,12 @@ export const StoreGetProductsParams = createFindParams({
|
|||||||
z
|
z
|
||||||
.object({
|
.object({
|
||||||
variants: z
|
variants: z
|
||||||
|
|
||||||
.object({
|
.object({
|
||||||
options: z
|
options: z
|
||||||
.object({ value: z.string().optional(), option_id: z.string().optional() })
|
.object({
|
||||||
|
value: z.string().optional(),
|
||||||
|
option_id: z.string().optional(),
|
||||||
|
})
|
||||||
.optional(),
|
.optional(),
|
||||||
})
|
})
|
||||||
.merge(applyAndAndOrOperators(StoreGetProductVariantsParamsFields))
|
.merge(applyAndAndOrOperators(StoreGetProductVariantsParamsFields))
|
||||||
|
|||||||
Reference in New Issue
Block a user