100 Commits
Author SHA1 Message Date
Shahed Nasser 250b6fdf22 chore: add claude skills for docs (#14533) 2026-01-15 10:26:37 +02:00
Shahed Nasser 41e1d5e506 fix(utils): fix import of caching and translation modules to be from @medusajs/medusa (#14519)
* fix(utils): fix import of caching and translation modules to be from @medusajs/medusa

* fix tests
2026-01-14 18:48:54 +01:00
Shahed Nasser 73631604cc docs: document incompatibility for Next.js storefront + Node v25 (#14538) 2026-01-14 15:26:26 +02:00
Shahed Nasser 42235825ee feat(medusa-cli): add codemod command + codemod for replacing zod imports (#14520)
* feat(medusa-cli): add codemod command + codemod for replacing zod imports

* fixes
2026-01-14 08:48:04 +02:00
Shahed Nasser 00fc32bc37 docs: paypal integration tutorial (#14253) 2026-01-13 15:39:49 +02:00
Shahed Nasser 43951ce60e docs: add npx2yarn component (#14512)
* initial

* initial

* update tests

* remove unused import

* allow passing with no tests

* vale fixes
2026-01-12 13:42:30 +02:00
Shahed Nasser 5f90cd0650 feat(create-medusa-app): add support for pnpm and specifying package manager (#14443)
* feat(create-medusa-app): add support for pnpm and specifying package manager

* fixes

* add medusa command method

* add tests for package manager

* fix duplicate messages

* throw if chosen package manager is not available

* better package manager and version detector

* add debug message

* fix version detection

* fix for yarn v3

* fix migration command

* yarn v3 fix

* remove .yarn directory for non-yarn package managers

* run npm ci to validate npm installation

* fixes

* fixes

* remove corepack line

* remove if condition
2026-01-12 12:55:26 +02:00
Shahed Nasser 1ca3516a5c feat(deps,framework): add zod as framework dependency (#14441)
## Summary

**What** — What changes are introduced in this PR?

Export Zod as a dependency of `@medusajs/framework`.

Closes DX-2414

**Why** — Why are these changes relevant or necessary?  

Zod is an essential part of Medusa development. We use it in the core and developers use it in their customizations.

Developers using pnpm won't have access to Zod, as it's not a top-level dependency. While they can install any version, since Zod is an essential aspect of our framework, it's more convenient that we export it and make it accessible to developers.

**How** — How have these changes been implemented?

1. Add Zod as a dependency in `@medusajs/deps` and export it in `@medusajs/framework`
2. Change imports of Zod across projects to import from `@medusajs/framework` and remove the Zod dependency.

> Note: this change doesn't cover admin extensions (and our related packages), as they're not related to the Medusa framework and using Zod in them isn't part of the conventions we document.

Developers can import Zod like this now:

```ts
import { z } from "@medusajs/framework/zod"
```

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

Use the following import in a Medusa project to create an validate zod schemas:

```bash
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http";
import { z } from "@medusajs/framework/zod"

export const PostCustomSchema = z.object({
  name: z.string(),
})

type PostCustomSchema = z.infer<typeof PostCustomSchema>

export async function POST(
  req: MedusaRequest<PostCustomSchema>,
  res: MedusaResponse
) {
  res.json({
    message: `Hello, ${req.validatedBody.name}`
  })
}

// in middleware
import { defineMiddlewares, validateAndTransformBody } from "@medusajs/framework/http"
import { PostCustomSchema } from "./admin/custom/route"

export default defineMiddlewares({
  routes: [
    {
      matcher: "/custom",
      middlewares: [validateAndTransformBody(PostCustomSchema)],
    },
  ],
})
```

---

## Examples

-

---

## Checklist

Please ensure the following before requesting a review:

- [x] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [x] I have linked the related issue(s) if applicable

---

## Additional Context

-
2026-01-09 13:20:01 +00:00
Shahed Nasser 66f8fe084c chore: add missing packages to eslint configurations (#14463) 2026-01-09 13:03:27 +02:00
Shahed NasserandStevche Radevski baaee11114 docs: updates for storefront in cloud (#14491)
* docs: updates for storefront in cloud

* comment-out pnpm

* fix broken link

* npm prerequisites

* Update www/apps/cloud/app/storefront/page.mdx

Co-authored-by: Stevche Radevski <sradevski@live.com>

* remove global cdn

---------

Co-authored-by: Stevche Radevski <sradevski@live.com>
2026-01-08 17:39:19 +02:00
Shahed Nasser 7161cf1903 docs: auth in cloud + restructure deployment guides (#14457)
* docs: auth in cloud + restructure deployment guides

* added details about enabling cloud auth

* fix vale errors
2026-01-07 13:51:23 +02:00
Shahed Nasser 76ff8dcca8 docs: fix locale option passed to query (#14472) 2026-01-06 18:59:44 +02:00
Shahed Nasser a2210ea5e7 docs: docs for next release (#14456) 2026-01-06 17:40:26 +02:00
Shahed Nasser b300a93345 fix(create-medusa-app): fix version option not working with Next.js storefront (#14462)
1. Fix error when passing `--version` and installing Next.js storefront. The error is because the UI package doesn't follow the same versioning as other Medusa packages, so this will skip updating the version of the UI package.
2. Other: added error logging for installation errors
2026-01-06 14:40:54 +00:00
Shahed Nasser 60f68ff492 chore: update TSDocs + export getTranslatedShippingOptionsStep from core-flows (#14460) 2026-01-06 15:26:23 +02:00
Shahed Nasser ab7b04dbc9 fix(js-sdk): add metadata parameter to request body type of reset-password route (#14458)
* fix(js-sdk): add metadata parameter to request body type

* update changeset
2026-01-06 12:36:29 +01:00
Shahed Nasser a01b748217 chore: fix eslint config in root (#14444) 2026-01-06 08:17:14 +02:00
Shahed Nasser 4bc15b4dc4 docs: fix styling of code elements in headers (#14440) 2026-01-05 12:49:58 +02:00
Shahed Nasser 4d632e7a5d docs: added tests for components in api-reference project (#14428)
* add tests (WIP)

* added test for h2

* finished adding tests

* fixes

* fixes

* fixes
2026-01-05 10:56:56 +02:00
Shahed Nasser 499dec6d31 docs: added callouts in search and AI assistant (#14421)
* docs: added callouts in search and AI assistant

* added more suggestions

* fix search tests

* add mock for links
2025-12-30 16:57:18 +02:00
Shahed Nasser 1ed6e6b308 docs: add examples for migrations (#14420) 2025-12-30 15:42:34 +02:00
Shahed Nasser 40db4c22d3 docs: added support for tests in www workspace (#14415)
* tests for components (WIP)

* finished adding tests to components

* added tests for providers

* add test command to doc tests

* fix imports

* exclude test files

* remove import

* add vitest as dev dependency

* fix build error

* ignore test files from eslint

* fix test from docs-ui
2025-12-30 13:19:57 +02:00
Shahed Nasser e110c08970 docs: add how-to guide for removing country code in storefront prefix (#14419) 2025-12-30 13:01:55 +02:00
Shahed Nasser 1de4d1e700 docs: use 200 for routes response across docs (#14418) 2025-12-30 09:36:10 +02:00
Shahed Nasser 4ac7b72d10 fix(dashboard): fix customer details page crashing when their order is refunded (#14413)
1. Fix the customer details page crashing when a customer's order is fully refunded. The error was originating from the payment collections of the order not being retrieved, since they're being used to calculate the refunded total.
2. Other: fix country not showing as well due to incorrectly trying to retrieving and access the shipping address's country

Closes #14409
2025-12-29 09:38:21 +00:00
Shahed Nasser 89a0adc612 fix(types): add missing completed_at property for carts (#14412) 2025-12-29 11:08:37 +02:00
Shahed Nasser ba3a572a89 docs: various improvements to introduction guides (#14398) 2025-12-24 15:37:37 +02:00
Shahed Nasser 10dab3a47a docs: allow stop answer generation in AI assistant (#14387) 2025-12-23 08:58:16 +02:00
Shahed Nasser 662ec7430b docs: resolve example tag in DML properties (#14383) 2025-12-22 17:52:24 +02:00
Shahed Nasser 04a6343951 docs-utils: performance improvements for the clean OAS script (#14386) 2025-12-22 17:06:55 +02:00
Shahed Nasser dc52dfd1dd docs: small fixes and improvements to text (#14385) 2025-12-22 17:06:25 +02:00
Shahed Nasser b221e882d4 docs-utils: add operator map to docs generator knowledge base (#14382) 2025-12-22 14:41:01 +02:00
Shahed Nasser cb33388202 docs: add line highlight validation (#14380)
* docs: add line highlight validation

* add to all projects

* fixes

* fixes

* fix

* fixes
2025-12-22 14:10:39 +02:00
Shahed Nasser 6380c1fdf4 fix(medusa): allow passing null to cart API routes (#14381)
Allow passing `null` as the locale for cart API route, as `optional` only allow passing `undefined`.
2025-12-22 08:51:01 +00:00
Shahed Nasser e07f22c4eb docs: add admin extensions to navbar (#14368) 2025-12-19 19:51:05 +02:00
Shahed Nasser 797878af26 docs: fix total descriptions across docs (#14366) 2025-12-19 15:31:28 +02:00
Shahed Nasser 365468d3da chore: fix TSDocs of total fields to be accurate (#14367) 2025-12-19 15:16:55 +02:00
Shahed Nasser fb11f0f272 docs: fixes related to troubleshooting (#14353) 2025-12-18 17:00:59 +02:00
Shahed Nasser 7172995bde docs: add vite configuration to docker guide (#14352) 2025-12-18 15:52:27 +02:00
Shahed Nasser 92d240d749 fix(medusa): fix type of product variant request param (#14342)
Fix type argument for requests which is necessary for generating OpenAPI specs

## Why

The `StoreVariantListRequest` type used in the `/store/product-variants` route doesn't match the convention of other routes since it doesn't accept a type parameter for the query (or body, but here that's not necessary). This makes it difficult for us to infer the query parameter type of the request.

This change would adapt the `StoreVariantListRequest` to match other conventions in our API routes so that we can generate correct OAS for docs
2025-12-17 16:20:54 +00:00
Shahed Nasser 1c4c4b8e9a docs: generate references manually for 2.12.3 (#14340) 2025-12-17 18:20:19 +02:00
Shahed Nasser 52e965f411 docs: generate API reference for 2.12.3 (#14341) 2025-12-17 18:19:46 +02:00
Shahed Nasser c0ec54fc15 fix(core-flows): fix type of getTranslatedLineItemsStep (#14338)
Fix the return type of the `getTranslatedLineItemsStep`, otherwise our reference generator can't pick up the step's typing correctly
2025-12-17 15:56:38 +00:00
Shahed Nasser 07bb931254 docs: document cloud sign in methods, usage and add-on changes (#14333) 2025-12-17 16:27:34 +02:00
Shahed Nasser c1a5390fc6 docs: translation module (#14271)
* docs: translation module

* fix link in JS SDK

* add translations user guides [WIP]

* updates

* fix broken link

* remove mentions of default locale

* change header

* updates

* updated user guides

* handle todos

* fix build error

* fix lint errors
2025-12-17 13:07:43 +02:00
Shahed Nasser bee86bf1d5 chore: add missing since tag for js sdk (#14325) 2025-12-16 18:26:52 +02:00
Shahed Nasser b8c2b9607b chore: added since tag to new routes (#14322) 2025-12-16 16:04:31 +02:00
Shahed Nasser 53cdbaa069 chore: generate and update OAS for translations (#14281)
* chore: generate and update OAS for translations

* support localization header

* add locale to all store routes

* fixes

* small fix
2025-12-16 15:52:33 +02:00
Shahed Nasser 88a3cf7172 chore: TSDocs for Translation Module (#14280)
* tsdocs for translation module

* fixes
2025-12-16 13:30:26 +02:00
Shahed Nasser accb778039 feat(js-sdk,types,medusa): add list locales store method to JS SDK (#14314)
* feat(js-sdk,types,medusa): add list locales store method to JS SDK

* add missing locale parameter
2025-12-16 11:11:49 +01:00
Shahed Nasser 8bb2ac654c fix(types): add locale to the query parameters of product query types (#14282) 2025-12-12 11:11:44 +02:00
Shahed Nasser 31a057558c fix(types,translations): fix types for translation and locale updates (#14278)
* fix(types,translations): fix types for translation and locale updates

* remove array type
2025-12-12 10:11:01 +01:00
Shahed Nasser a4ca4ef170 fix(translation): add index file for models (#14272) 2025-12-12 10:10:16 +01:00
Shahed Nasser 4bf0dac97d docs: update next and react (#14288) 2025-12-12 09:55:13 +02:00
Shahed Nasser 62c637d709 docs: updates for next release (#14275) 2025-12-11 15:56:34 +02:00
Shahed Nasser a78f68fa46 fix(utils,core-flows): add events constant for translations and use it in workflows (#14277) 2025-12-11 11:22:08 +02:00
Shahed Nasser c26f5643b6 docs: improve build with AI chapter (#14259)
* docs: improve build with AI chapter

* update sidebar
2025-12-09 16:59:39 +02:00
Shahed Nasser cc84b9ac49 chore: improvements of TSDocs of link steps (#14261) 2025-12-09 16:59:15 +02:00
Shahed Nasser 0084460765 docs: various improvements and fixes (#14257) 2025-12-09 16:16:45 +02:00
Shahed Nasser 75eac9ebec docs: okta integration tutorial (#14188)
* initial

* docs: okta integration tutorial
2025-12-09 08:36:31 +02:00
Shahed Nasser b517137466 fix(utils): fix error when generating migrations for a module with existing snapshot (#14218) 2025-12-08 08:54:32 +02:00
Shahed Nasser e3e3c725db docs: triage issues + revamp troubleshooting guides (#14216)
* docs: triage issues + revamp troubleshooting guides

* small change
2025-12-04 17:12:48 +02:00
Shahed Nasser a33ef1e4d9 docs: update Next.js + React (#14210) 2025-12-04 11:50:25 +02:00
Shahed Nasser 2087c8d155 docs: add best practices doc for third-party syncing (#14203)
* docs: add best practices doc for third-party syncing

* small fix
2025-12-03 15:47:41 +02:00
Shahed Nasser fe3c28488c docs: improve CORS troubleshooting guide (#14194) 2025-12-03 08:45:21 +02:00
Shahed Nasser 00052b9e50 docs: track code copy + AI assistant event (#14193)
* docs: track code copy + AI assistant event

* add pathname to callback
2025-12-02 17:24:31 +02:00
Shahed Nasser 0158554020 docs: strapi integration guide (#14075) 2025-12-02 12:30:47 +02:00
Shahed Nasser 92769b2b1c chore: fixes to TSDocs (#14186)
* chore: fixes to TSDocs

* update comments for auth provider
2025-12-02 11:57:04 +02:00
Shahed Nasser 9372a17d1f docs: generate API reference for 2.12.0 (#14185) 2025-12-02 11:56:37 +02:00
Shahed Nasser 223ccb4add docs: docs for next release (#14110) 2025-12-01 20:20:01 +02:00
Shahed Nasser 3cf1e5e9de chore: change 2.11.4 to 2.12.0 in TSDocs (#14174) 2025-12-01 17:33:28 +02:00
Shahed Nasser ee1be833c3 chore: improve completeCartWorkflow TSDocs (#14153)
* chore: improve completeCartWorkflow TSDocs

* small improvement
2025-12-01 14:20:07 +02:00
Shahed Nasser 73ae136965 chore: improve and add TSDocs for next release (#14170) 2025-12-01 13:41:31 +02:00
Shahed Nasser d9e3965a10 docs: fix highlights in digital products recipe (#14171) 2025-12-01 13:41:14 +02:00
Shahed Nasser 00aa2c13bc fix(js-sdk,types,medusa): add HTTP types for update order change API route (#14169)
## Summary

**What** — What changes are introduced in this PR?

- Add HTTP type for update order API route payload + use it in the JS SDK and API route
- other: add `since` tag

**Why** — Why are these changes relevant or necessary?  

*Please provide answer here*

**How** — How have these changes been implemented?

*Please provide answer here*

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

*Please provide answer here*

---

## Examples

Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.  
This helps with documentation and ensures maintainers can quickly understand and verify the change.

```ts
// Example usage
```

---

## Checklist

Please ensure the following before requesting a review:

- [ ] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [ ] I have verified the code works as intended locally
- [ ] I have linked the related issue(s) if applicable

---

## Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.
2025-12-01 11:28:08 +00:00
Shahed Nasser 815464e007 docs: clarify how links with cascade deletion are deleted (#14155)
* docs: clarify how links with cascade deletion are deleted

* small change
2025-12-01 09:01:50 +02:00
Shahed Nasser 1e2f40b623 docs: update recipes and tutorials to support locks and idempotency (#14151) 2025-12-01 09:01:25 +02:00
Shahed Nasser ccc8588ea3 docs: mention managed inventory toggle in multi-part product user guide (#14142) 2025-11-27 10:57:51 +02:00
Shahed Nasser fda7689ed2 docs: fixed keywords usage in some pages (#14140)
* docs: fixed keywords usage in some pages

* fix vale error

* fix vale error
2025-11-27 10:57:39 +02:00
Shahed Nasser 8c19061644 docs: handle product status change in MeiliSearch and Algolia guides (#14141)
* docs: handle product status change in MeiliSearch and Algolia guides

* added missing status field
2025-11-27 10:41:57 +02:00
Shahed Nasser 2cc42ca0ef docs: add guide on clearing cache (#14133)
* docs: add guide on clearing cache

* update llms
2025-11-26 18:00:45 +02:00
Shahed Nasser e8990133e5 chore: fix payloads of events in TSDocs + description of emitEventStep (#14132) 2025-11-26 18:00:21 +02:00
Shahed Nasser c3cebdfe80 docs: fix events payloads (#14131) 2025-11-26 16:12:00 +02:00
Shahed Nasser c1ede88a7e docs: document locks for nested workflows (#14130)
* docs: document locks for nested workflows

* smal text change

* fix build error
2025-11-26 15:36:58 +02:00
Shahed Nasser 76660fb6cc docs: add keywords to cloud, fixes to installation and Index Module docs (#14129)
* docs: add keywords to cloud, fixes to installation and Index Module docs

* fix vale error
2025-11-26 14:36:29 +02:00
Shahed Nasser 458dc9d22b docs: customer tiers tutorial (#14122)
* docs: customer tiers tutorial

* fix lint error
2025-11-26 10:07:28 +02:00
Shahed Nasser 0ddd9e36b5 fix(product): add missing decorators to updateProductOptionValues method (#14060) 2025-11-25 11:02:21 +02:00
Shahed Nasser 22ca22a2f0 docs: fix callback validation for third-party authentication (#14109)
* docs: fix callback validation for third-party authentication

* address comment
2025-11-24 15:43:05 +02:00
Shahed Nasser d6a9e36bf0 docs: updates to billing details (#14096)
* docs: updates to billing details

* fix installation errors
2025-11-24 09:34:52 +02:00
Shahed Nasser b3f4ddc27c docs: fix filters in meilisearch and algolia guides (#14098) 2025-11-24 08:53:29 +02:00
Shahed Nasser 4e1c474dfa docs: emails in cloud (#14040)
* docs: emails in cloud

* add notes to user guides

* small updates

* small change

* fix link

* addressed feedback
2025-11-17 10:54:01 +02:00
Shahed Nasser 2c61a413dc docs: add redis prerequisite for Caching Module (#14051)
* docs: add redis prerequisite for Caching Module

* fix vale error
2025-11-17 09:16:42 +02:00
Shahed Nasser 76fd6d1438 docs: fix required properties marked as optional in OAS with allOf schemas (#14062) 2025-11-14 16:45:48 +02:00
Shahed Nasser 20892aee87 docs: add a copy button to AI assistant answers (#14052) 2025-11-14 16:03:00 +02:00
Shahed Nasser efed4d7346 docs: mobile app guide with react native and expo (#13982)
* docs: mobile app guide with react native and expo

* fix vale error
2025-11-12 12:48:52 +02:00
Shahed Nasser 66d4ba105e docs: generate OAS for 2.11.3 (#13973) 2025-11-12 09:24:54 +02:00
Shahed Nasser a85778679e fix(product, types): add missing types for variant images and thumbnails (#14026)
## Summary

**What** — What changes are introduced in this PR?

- Add missing `images` field of variants to the HTTP types
- Add missing `thumbnail` field to product variant schema, which leads to the thumbnail missing from auto generated types

**Why** — Why are these changes relevant or necessary?  

*Please provide answer here*

**How** — How have these changes been implemented?

*Please provide answer here*

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

*Please provide answer here*

---

## Examples

Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.  
This helps with documentation and ensures maintainers can quickly understand and verify the change.

```ts
// Example usage
```

---

## Checklist

Please ensure the following before requesting a review:

- [ ] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [ ] I have verified the code works as intended locally
- [ ] I have linked the related issue(s) if applicable

---

## Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.
2025-11-11 15:25:39 +00:00
Shahed Nasser aae92d5447 chore(medusa): fix query http type parameter for get claim route (#13974)
## Summary

**What** — What changes are introduced in this PR?

Use correct HTTP type parameter for the get claim API route

**Why** — Why are these changes relevant or necessary?  

*Please provide answer here*

**How** — How have these changes been implemented?

*Please provide answer here*

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

*Please provide answer here*

---

## Examples

Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.  
This helps with documentation and ensures maintainers can quickly understand and verify the change.

```ts
// Example usage
```

---

## Checklist

Please ensure the following before requesting a review:

- [ ] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [ ] I have verified the code works as intended locally
- [ ] I have linked the related issue(s) if applicable

---

## Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.
2025-11-07 13:08:26 +00:00
Shahed Nasser dc6f253d31 docs: add JSON-LD schemas to docs (#14007) 2025-11-07 14:43:50 +02:00
Shahed Nasser c9648cc9cc docs: added kapa logo + link to mcp server (#14005) 2025-11-07 13:05:25 +02:00