Commit Graph

9160 Commits

Author SHA1 Message Date
Shahed Nasser
cc1a37f2f5 chore: fixes to HTTP and request types for carts (#13821) 2025-10-28 10:04:27 +01:00
Shahed Nasser
24ff9d3382 chore: fixes to HTTP and request types for promotions (#13820) 2025-10-28 10:03:41 +01:00
Shahed Nasser
5b0c6e6a94 chore: fixes to HTTP and request types for API Keys (#13819) 2025-10-28 10:02:28 +01:00
Nicolas Gorga
c0cc70b2fb Add PG_CONNECTION to Medusa Container docs (#13871)
* Add PG_CONNECTION to Medusa Container docs

Fixes #13870

* Update www/apps/resources/app/medusa-container-resources/page.mdx

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2025-10-28 10:39:58 +02:00
Pedro Guzman
cf1001f11d use truncate in db teardown (#13875)
* use truncate in db teardown

* fix empty table list condition
2025-10-27 13:39:48 -04:00
Shahed Nasser
39f2893738 docs: fix runtime error occuring with code tabs (#13873) 2025-10-27 17:52:42 +02:00
Nicolas Gorga
9f154c308e fix(dashboard): tax region override too large payload (#13860)
* Limit the number of ids passed to the different queries to render the tooltip details to 10, for products, product types and shipping options

* Add changeset

* Extract common additional field computation into variable
2025-10-27 10:48:34 -04:00
Siddartha Nepal
ef798160ea fix(dashboard): Resolve issue with product attributes input (#13863)
Co-authored-by: Siddartha Nepal <siddarthanepal5@gmail.com>
Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
2025-10-27 09:42:18 -04:00
Kevin Leung
2eca81ec0f feat(dashboard): add input field for tracking_url and label_url in shipment form (#13787)
* fix: fix label init logic

* feat(dashboard): add input field for tracking_url and label_url in shipment form

* fix: cleanup leftovers

* chore: update schema

* fix: filter out empty rows

* chore: remove unrelated change

* fix: allow any filled field
2025-10-27 08:26:49 -04:00
Pedro Guzman
cc2614ded7 add Medusa Cloud Email provider (#13781)
* add Medusa Cloud Email provider

* move cloud config to project level

* add tests

* Create breezy-flowers-fly.md

* rename medusa_cloud_config to cloud

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-27 12:39:32 +01:00
Shahed Nasser
a9dbd035a5 docs: documented admin translations (#13864) 2025-10-27 12:04:31 +02:00
Shahed Nasser
ec44432876 chore: fixes to http and request types for products (#13833)
## Summary

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

This PR is part of a series of PRs to fix HTTP and request type arguments.

This is the last PR in the series. It includes a changeset for the changes made.

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

These types impact the outputted OAS which we show on the API reference. By fixing up the types, we ensure accurate request parameters in the API reference.

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

Made changes to HTTP types and request type arguments

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

-

---

## Examples

-
---

## 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

-
2025-10-27 08:52:27 +00:00
MBLVD
799b57c396 docs: fix spelling and grammar (#13862)
Fixed various spelling errors and grammatical issues across multiple .mdx documentation files.
2025-10-27 10:48:59 +02:00
github-actions[bot]
dbf8fb9bda chore(docs): Generated References (automated) (#13857)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2025-10-27 09:17:23 +02:00
github-actions[bot]
340d826e72 chore(docs): Generated + Updated UI Reference (automated) (#13856)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2025-10-27 08:53:05 +02:00
github-actions[bot]
a76d5b63da chore(docs): Generated DML JSON files (automated) (#13855)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2025-10-27 08:52:33 +02:00
github-actions[bot]
e6e41a9ca4 chore(docs): Update version in documentation (automated) (#13854)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2025-10-27 08:52:14 +02:00
Frane Polić
4757281677 feat(core-flows,product,types): scoped variant images (#13623)
* wip(product): variant images

* fix: return type

* wip: repo and list approach

* fix: redo repo method, make test pass

* fix: change getVariantImages impl

* feat: update test

* feat: API and core flows layer

* wip: integration spec

* fix: deterministic test

* chore: refactor and simplify, cleanup, remove repo method

* wip: batch add all images to all vairants

* fix: remove, expand testing

* refactor: pass variants instead of refetch

* chore: expand integration test

* feat: test multi assign route

* fix: remove `/admin/products/:id/variants/images` route

* feat: batch images to variant endpoint

* fix: length assertion

* feat: variant thumbnail

* fix: send variant thumbnail by default

* fix: product export test assertion

* fix: test

* feat: variant thumbnail on line item

* fix: add missing list and count method, update types

* feat: optimise variant images lookups

* feat: thumbnail management in core flows

* fix: typos, type, build

* feat: cascade delete to pivot table, rm unused unused fields

* feat(dashboard): variant images management UI (#13670)

* wip(dashboard): setup variant media form

* wip: cleanup table and images, wip check handler

* feat: proper sidebar functionallity

* fefat: add js-sdk and hooks

* feat: allow only one selection

* wip: lazy load variants in the table

* feat: new variants management for images on product details

* chore: refactor

* wip: variant details page work

* fix: cleanup media section, fix issues and types

* feat: correct scoped images, cleanup in edit modal

* feat: js sdk and hooks, filter out product images on variant details, labels, add API call and wrap UI

* chore: cleanup

* refacto: rename route

* feat: thumbnail functionallity

* fix: refresh checked after revalidation load

* fix: rm unused, refactor type

* Create thirty-clocks-refuse.md

* feat: new add remove variant media layout

* feat: new image add UX

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

* fix: table name in migration

* chore: update changesets

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-26 15:15:40 +01:00
olivermrbl
bafd006094 chore: Release 2025-10-25 21:56:37 +02:00
github-actions[bot]
6e73f8b376 chore: Version Packages (#13800)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-25 21:52:10 +02:00
Oli Juhl
f055bfd723 fix(pricing): Update store + list price preferences (#13852)
* fix(pricing): Update store + list price preferencs

* Create afraid-kids-return.md
2025-10-25 21:45:26 +02:00
Shahed Nasser
c4e1d05c39 docs: updates to installation doc (#13848)
* docs: updates to installation doc

* small iteration
2025-10-24 13:51:25 +03:00
Shahed Nasser
1d3231d37a docs: fixes to docker installation guide (#13847)
* docs: fixes to docker installation guide

* more fixes

* re-organize troubleshooting

* add title
2025-10-24 12:18:36 +03:00
Shahed Nasser
7c31276f98 docs: show possible similar pages on 404 page (#13840)
* docs: show possible similar pages on 404 page

* fix 404 page in api reference
2025-10-24 10:00:38 +03:00
Shahed Nasser
61565d243a chore: improve TSDocs for tax provider module (#13846) 2025-10-24 09:44:59 +03:00
Shahed Nasser
8d574d6f29 docs: improvements to tax related docs (#13845) 2025-10-24 09:44:47 +03:00
Leonardo Benini
226984cf0f feat(admin-*,dashboard): add dashboard i18n extensions (#13763)
* virtual i18n module

* changeset

* fallback ns

fallback to the default "translation" ns if the key isnt found. Allows to use a single "useTranslation("customNs")" hook for both custom and medusa-provided keys

* simplify merges

* optional for backward compat

* fix HMR

* fix generated deepMerge

* test
2025-10-23 15:16:43 -04:00
Shahed Nasser
012e30801e docs: add error page (#13839) 2025-10-23 18:10:42 +03:00
Shahed Nasser
4ab185c685 docs: clarify how emitEventStep emits an event in a workflow (#13836) 2025-10-23 16:30:25 +03:00
Shahed Nasser
90966633bb chore: update description of emitEventStep (#13838) 2025-10-23 16:03:00 +03:00
Anders Semb Hermansen
22d23b148e fix(js-sdk): add missing query param to deleteLineItem jsdoc (#13835) 2025-10-23 09:02:05 -04:00
Shahed Nasser
2ce0e37e98 docs-util: remove inferring of query parameters (#13834) 2025-10-23 14:15:59 +03:00
Adrien de Peretti
d51ae2768b chore(workflow-engine-*): cleanup and improvements (#13789)
**What**
Cleanup recent work on workflows
2025-10-23 10:50:24 +00:00
Shahed Nasser
356dcc94ce docs: avalara integration tutorial (#13808)
* docs: avalara integration tutorial

* fix getTaxLines method

* fixes

* fix broken link

* fix build error

* fix vale errors
2025-10-23 13:07:27 +03:00
Frane Polić
90162ebeac fix(medusa): images recreate on product update (#13813) 2025-10-23 09:32:34 +02:00
Shahed Nasser
5dd2e9aecf docs: add cache to comparison document + pricing fixes (#13812) 2025-10-22 18:43:50 +03:00
Shahed Nasser
55c42e112e docs: change binary encoding to base64 in file upload references (#13811) 2025-10-22 18:43:35 +03:00
Shahed Nasser
c7bb8d3beb docs: fix text in payload guide (#13815) 2025-10-22 18:43:14 +03:00
William Bouchard
fe4e7481a9 feat(order,dashboard): version order credit lines (#13766)
* feat(): version order credit lines

* undo last change

* adjust where

* remove date on ui

* Create five-donuts-obey.md

* add test

* nit comment

* woops
2025-10-22 10:26:05 +02:00
Sebastian Rindom
bad0858348 fix: prevent jobId collisions on workflow step retries (#13786)
## Summary

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

This PR fixes a bug where async workflow steps with retry intervals would get stuck after the first retry attempt due to Bull queue jobId collisions preventing retry jobs from executing.

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

Workflows using async steps with retry configurations (e.g., `retryInterval: 1`, `maxRetries: 5`) would fail once, schedule a retry, but the retry job would never execute, causing workflows to hang indefinitely.

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

**Root Cause:** Bull queue was rejecting retry jobs because they had identical jobIds to the async execution jobs that already completed. Both used the format: `retry:workflow:transaction:step_id:attempts`.

**Solution:** Modified `getJobId()` in `workflow-orchestrator-storage.ts` to append a `:retry` suffix when `interval > 0`, creating unique jobIds:
- Async execution (interval=0): `retry:...:step_id:1`
- Retry scheduling (interval>0): `retry:...:step_id:1:retry`

Updated methods: `getJobId()`, `scheduleRetry()`, `removeJob()`, and `clearRetry()` to pass and handle the interval parameter.

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

Added integration test `retry-interval.spec.ts` that verifies:
1. Step with `retryInterval: 1` and `maxRetries: 3` executes 3 times
2. Retry intervals are approximately 1 second between attempts
3. Workflow completes successfully after retries
4. Uses proper async workflow completion pattern with `subscribe()` and `onFinish` event

---

## Examples

```ts
// Example workflow step that would previously get stuck
export const testRetryStep = createStep(
  {
    name: "test-retry-step",
    async: true,
    retryInterval: 1, // 1 second retry interval
    maxRetries: 3,
  },
  async (input: any) => {
    // Simulate failure on first 2 attempts
    if (attempts < 3) {
      throw new Error("Temporary failure - will retry")
    }
    return { success: true }
  }
)

// Before fix: Step would fail once, schedule retry, but retry job never fired (jobId collision)
// After fix: Step properly retries up to 3 times with 1-second intervals
```

---

## 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
-

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-10-21 18:27:21 +00:00
Pepijn
5df903f5fb Added shipping method data to tax module context (#13747) 2025-10-21 13:36:29 -04:00
Nathan John
17fb3e2e10 feat(payment-stripe): merge custom metadata along with session_id on payment initiation (#13801)
* Merge custom metadata along with session_id on payment initiation

* update changeset
2025-10-21 13:35:13 -04:00
Shahed Nasser
a540256137 docs: change Medusa Cache setup information (#13802) 2025-10-21 17:31:56 +03:00
Adrien de Peretti
2d1d51a2af fix(test-utils): Duplicated subscribers re insertion (#13798)
* fix

* Create pink-boats-type.md
2025-10-21 16:00:48 +02:00
debashish
a34fcfab35 fix(): Remove redundant indexes to resolve schema warnings (#13736)
Fixes #13735

### What

This Pull Request introduces new database migrations to remove multiple redundant indexes across several core modules, including product, cart, order, customer, and inventory.

### Why

As detailed in issue #13735, a fresh Medusa installation produces numerous "Duplicate Index" warnings. These legacy indexes add unnecessary write overhead and provide no performance benefit. This PR cleans up the schema to resolve these warnings and improve database health.

### How

I have added one new, reversible migration file for each of the five affected modules:
- `@medusajs/product`
- `@medusajs/cart`
- `@medusajs/order`
- `@medusajs/customer`
- `@medusajs/inventory`

Each migration's `up()` method safely drops the older, redundant index, and its `down()` method re-creates it, ensuring the change is fully reversible and non-destructive.


### Testing

I have tested these migrations by following the local development workflow outlined in the `CONTRIBUTING.md` guide.

1.  **Setup:**
    *   Cloned my forked Medusa repository locally .
    *   Created a separate, fresh test project using `npx create-medusa-app@latest my-medusa-store`.
    *   The test project's PostgreSQL database, which already contained the schema with the duplicate indexes.

2.  **Linking Local Source Code:**
    *   In the test project's `package.json`, I modified all `@medusajs/*` dependencies and resolutions to point to the local packages in my forked repository (e.g., `"@medusajs/product": "file:../medusa/packages/modules/product"`).
    *   From the test project's directory, I ran `yarn install` to link the local, modified Medusa source code into its `node_modules`.

3.  **Build & Migration:**
    *   Inside my forked Medusa repository, I ran `yarn build` to compile the new TypeScript migration files.
    *   From the root of the **test project**, I then executed the migration command: `npx medusa migration run`.

4.  **Verification:**
    *   The command successfully identified and ran only the new migration files I had created.
    *   I also confirmed via direct SQL queries that the old, redundant indexes were correctly dropped from all affected tables (`product_collection`, `customer_group`, etc.).
2025-10-21 13:50:10 +00:00
Shahed Nasser
0d83918348 docs: fixes to type errors in guides (#13797) 2025-10-21 16:12:35 +03:00
Shahed Nasser
d9249be6e6 chore: fixes to refund reasons tsdocs (#13796) 2025-10-21 15:05:30 +03:00
Shahed Nasser
c6e58e5144 docs: fixes to API and JS SDK references (#13795) 2025-10-21 13:32:25 +03:00
github-actions[bot]
3d0f4086b4 chore(docs): Updated API Reference (automated) (#13794)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2025-10-21 09:14:39 +00:00
github-actions[bot]
1d63ed8ce9 chore(docs): Generated + Updated UI Reference (automated) (#13792)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2025-10-21 11:56:58 +03:00