From 8bb2ac654ce928edf1c3a2040f35614c924800c8 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 12 Dec 2025 11:11:44 +0200 Subject: [PATCH] fix(types): add locale to the query parameters of product query types (#14282) --- .changeset/green-deserts-fix.md | 5 ++++ .../types/src/http/product/store/queries.ts | 23 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .changeset/green-deserts-fix.md diff --git a/.changeset/green-deserts-fix.md b/.changeset/green-deserts-fix.md new file mode 100644 index 0000000000..5ac788c657 --- /dev/null +++ b/.changeset/green-deserts-fix.md @@ -0,0 +1,5 @@ +--- +"@medusajs/types": patch +--- + +fix(types): add locale to the query parameters of product query types diff --git a/packages/core/types/src/http/product/store/queries.ts b/packages/core/types/src/http/product/store/queries.ts index 5b2de26f98..18196a1d28 100644 --- a/packages/core/types/src/http/product/store/queries.ts +++ b/packages/core/types/src/http/product/store/queries.ts @@ -25,7 +25,18 @@ export interface StoreProductPricingContext { */ cart_id?: string } -export interface StoreProductParams extends SelectParams, StoreProductPricingContext {} +export interface StoreProductParams extends SelectParams, StoreProductPricingContext { + /** + * The locale code in BCP 47 format. Information of the + * product and related entities will be localized based on the provided locale. + * + * Learn more in the [Serve Translations in Storefront](https://docs.medusajs.com/resources/commerce-modules/translations/storefront) guide. + * + * @example + * "en-US" + */ + locale?: string +} export interface StoreProductListParams extends Omit, StoreProductPricingContext { @@ -37,4 +48,14 @@ export interface StoreProductListParams * Filter by the product's variants. */ variants?: Pick + /** + * The locale code in BCP 47 format. Information of the + * product and related entities will be localized based on the provided locale. + * + * Learn more in the [Serve Translations in Storefront](https://docs.medusajs.com/resources/commerce-modules/translations/storefront) guide. + * + * @example + * "en-US" + */ + locale?: string }