Skip to content

Commit

Permalink
fix(medusa, types): filter product by external_id (#10010)
Browse files Browse the repository at this point in the history
  • Loading branch information
fPolic authored Nov 11, 2024
1 parent 34f4f69 commit fb05ca2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/types/src/product/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,10 @@ export interface FilterableProductProps
* The IDs to filter products by.
*/
id?: string | string[]
/**
* The external IDs to filter products by.
*/
external_id?: string | string[]
/**
* Filters only or excluding gift card products
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const StoreGetProductParamsDirectFields = z.object({
handle: z.string().optional(),
is_giftcard: booleanString().optional(),
category_id: z.union([z.string(), z.array(z.string())]).optional(),
external_id: z.union([z.string(), z.array(z.string())]).optional(),
collection_id: z.union([z.string(), z.array(z.string())]).optional(),
tag_id: z.union([z.string(), z.array(z.string())]).optional(),
type_id: z.union([z.string(), z.array(z.string())]).optional(),
Expand Down

0 comments on commit fb05ca2

Please sign in to comment.