Commit Graph

766 Commits

Author SHA1 Message Date
juanzgc
ef15868ca8 feat(promotion): Add metadata column to promotion (#13999)
* feat(promotion): Add metadata column to promotion

Add metadata column to the promotion model.

Closes CORE-1276

* Add changeset

---------

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
2025-11-17 19:50:57 +01:00
Adrien de Peretti
1ea932a56f fix(): Identify step that should require a save on checkpoint (#14037)
* fix(): Identify step that force save checkpoint

* Create sour-peas-provide.md
2025-11-17 12:47:57 +01:00
Adrien de Peretti
e59cdae336 fix(): Proper schema usage when running migrations (#14036)
* fix(): Proper schema usage when running migrations

* Create thick-pugs-dance.md
2025-11-12 15:56:50 +01: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
github-actions[bot]
645266c200 chore: Version Packages (#13923)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 12:52:44 +01:00
Adrien de Peretti
9d9d0397a8 fix(): Index integration tests flackyness (#13953)
* fix(): Index integration tests flackyness

* fix

* Create twenty-eels-remain.md

* fix

* fix

* fix

* fix

* finalize

* finalize

* finalize

* finalize

* finalize

* finalize

* chore: empty commit

* finalize

* finalize

* chore: empty commit

* finalize

* finalize
2025-11-05 10:40:12 +01:00
Adrien de Peretti
afb40d437b chore(): Cleanup and organize deps (#13940)
* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* Create lucky-poets-scream.md

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* dedupe snapshot this build

* split into 4 shard

* re configure packages integration tests

* re configure packages integration tests

* re configure packages integration tests

* re configure packages integration tests

* update scripts

* update scripts

* update scripts

* update scripts

* update scripts

* update scripts

* update scripts

* update scripts

* reduce shard for packages
2025-11-03 19:06:37 +01:00
Adrien de Peretti
37563987b8 chore(): Fix dependencies (#13932) 2025-11-02 17:46:46 +01:00
Adrien de Peretti
224ab39a81 chore(): Update dependencies usage (#13910)
* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* fix for wxios 1.6

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* push scripts

* update build concurrency

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* fixes

* update yarn

* fixes

* fix script

* Create heavy-suns-tickle.md

* update changeset

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-10-31 16:44:14 +01:00
Shahed Nasser
0fd9f27ca5 chore: add missing since and featureFlag tags (#13926) 2025-10-31 16:17:19 +02:00
Carlos R. L. Rodrigues
13d7d15be5 chore(modules-sdk): parallel migrations (#13898) 2025-10-31 11:05:53 -03:00
Stevche Radevski
7c72e7bae9 fix: Updates to medusa payments provider (#13914) 2025-10-31 11:45:00 +01:00
github-actions[bot]
31b9ae3d28 chore: Version Packages (#13853)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-31 10:11:18 +01:00
Adrien de Peretti
0f79f22ebc fix(pricing): price list prices perf issues (#13899)
* update package

* fix(pricing): update price list prices perf issues

* Create lemon-clocks-sing.md

* fix(pricing): update price list prices perf issues

* fix(pricing): update price list prices perf issues

* update package

* update package

* improvements

* remove unnecessary comments

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-29 19:50:33 +01:00
Oli Juhl
01ee437926 chore(types,notification): Make template nullable on emails (#13889)
* chore: Make template nullable on emails

* Create curvy-lamps-float.md
2025-10-29 18:36:06 +01:00
Stevche Radevski
ef7b9b9375 feat: Implement medusa payments provider (#13772)
* feat: Implement medusa payments provider

* chore: Improvements after testing

* chore: Add typings to medusa payments

* fix: Final changes to complete medusa payment provider

* update package

* fix: Final changes to complete medusa payment provider

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-29 15:07:33 +01:00
Oli Juhl
1defb3c29b chore: Inject sandbox handle in cloud config (#13879)
* chore: Inject sandbox handle in cloud config

* Create wet-seas-lie.md

* chore: rename medusaCloudOptions to cloud

* fix tests
2025-10-29 10:02:37 +01:00
Adrien de Peretti
85b1f3d43a feat(index): Add http/module api to interact with the index engine (#13869)
* feat(index): Add support to trigger sync manually

* feat(index): Add API route to interact with

* feat(index): Add API route to interact with

* feat(index): Add API route to interact with

* test(): Add http integration tests

* Create weak-elephants-reply.md
2025-10-28 20:31:39 +01:00
Frane Polić
0b202cc509 feat(product): build variant images when retrieving product (#13731)
**What**
-  build variant images when retrieving product

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-28 09:35:55 +00: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
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
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
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
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
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
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
github-actions[bot]
e47f0d0271 chore: Version Packages (#13545)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-21 09:24:59 +02:00
Shahed Nasser
150aa50397 feat(tax,types): Add method to retrieve a Tax Module Provider's service (#13784)
## Summary

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

Add a method in the Tax Module's servie to retrieve a provider by its ID.

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

The Tax Module Provider could be used for use cases other than calculating tax lines. For example, Avalara supports importing products to manage product-specific taxes. However, it's not possible right now to listen to the `product.created` event and create the product in Avalara with its provider. Instead, you'll have to create a separate module that also connects to Avalara and resolve it in the subsriber.

This also matches the pattern in the Analytics Module, which allows retrieving the underlying provider.

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

Add a `getProvider` method to the Tax Module's service and its interface.

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

Added integration test for the method.

---

## 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
const avalaraProvider = taxModuleService.getProvider("tp_avalara_avalara")
```

---

## 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
- [x] The changes are covered by relevant **tests**
- [x] 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-10-20 16:18:48 +00:00
Adrien de Peretti
516f5a3896 fix: workflow async concurrency (#13769)
* executeAsync

* || 1

* wip

* stepId

* stepId

* wip

* wip

* continue versioning management changes

* fix and improve concurrency

* update in memory engine

* remove duplicated test

* fix script

* Create weak-drinks-confess.md

* fixes

* fix

* fix

* continuation

* centralize merge checkepoint

* centralize merge checkpoint

* fix locking

* rm only

* Continue improvements and fixes

* fixes

* fixes

* hasAwaiting will be recomputed

* fix orchestrator engine

* bump version on async parallel steps only

* mark as delivered fix

* changeset

* check partitions

* avoid saving when having parent step

* cart test

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-20 15:29:19 +02:00
Stevche Radevski
ee1c77a01f feat: Add support for multiple active keys at a time (#13754) 2025-10-16 10:07:08 +02:00
Oli Juhl
b5ecdfcd12 feat: Add allocation method type ONCE (#13700)
### What
Add a new `once` allocation strategy to promotions that limits application to a maximum number of items across the entire cart, rather than per line item.

### Why
Merchants want to create promotions that apply to a limited number of items across the entire cart. For example:
- "Get $10 off, applied to one item only"
- "20% off up to 2 items in your cart"

Current allocation strategies:
- `each`: Applies to each line item independently (respects `max_quantity` per item)
- `across`: Distributes proportionally across all items

Neither supports limiting total applications across the entire cart.

### How

Add `once` to the `ApplicationMethodAllocation` enum.

Behavior:
- Applies promotion to maximum `max_quantity` items across entire cart
- Always prioritizes lowest-priced eligible items first
- Distributes sequentially across items until quota exhausted
- Requires `max_quantity` field to be set

### Example Usage

**Scenario 1: Fixed discount**
```javascript
{
  type: "fixed",
  allocation: "once",
  value: 10,        // $10 off
  max_quantity: 2   // Apply to 2 items max across cart
}

Cart:
- Item A: 3 units @ $100/unit
- Item B: 5 units @ $50/unit (lowest price)

Result: $20 discount on Item B (2 units × $10)
```

**Scenario 2: Distribution across items**
```javascript
{
  type: "fixed",
  allocation: "once",
  value: 5,
  max_quantity: 4
}

Cart:
- Item A: 2 units @ $50/unit
- Item B: 3 units @ $60/unit

Result:
- Item A: $10 discount (2 units × $5)
- Item B: $10 discount (2 units × $5, remaining quota)
```

**Scenario 3: Percentage discount - single item**
```javascript
{
  type: "percentage",
  allocation: "once",
  value: 20,         // 20% off
  max_quantity: 3    // Apply to 3 items max
}

Cart:
- Item A: 5 units @ $100/unit
- Item B: 4 units @ $50/unit (lowest price)

Result: $30 discount on Item B (3 units × $50 × 20% = $30)
```

**Scenario 4: Percentage discount - distributed across items**
```javascript
{
  type: "percentage",
  allocation: "once",
  value: 15,         // 15% off
  max_quantity: 5
}

Cart:
- Item A: 2 units @ $40/unit (lowest price)
- Item B: 4 units @ $80/unit

Result:
- Item A: $12 discount (2 units × $40 × 15% = $12)
- Item B: $36 discount (3 units × $80 × 15% = $36, remaining quota)
Total: $48 discount
```

**Scenario 5: Percentage with max_quantity = 1**
```javascript
{
  type: "percentage",
  allocation: "once",
  value: 25,         // 25% off
  max_quantity: 1    // Only one item
}

Cart:
- Item A: 3 units @ $60/unit
- Item B: 2 units @ $30/unit (lowest price)

Result: $7.50 discount on Item B (1 unit × $30 × 25%)
```
2025-10-14 11:01:00 +00:00
Shahed Nasser
958b003a11 chore: add since tags for latest release (#13739) 2025-10-13 11:24:51 +03:00
Adrien de Peretti
c54c5ed6de chore(): improve cart operations + Mikro orm 6.4.16 (#13712)
* chore(): Mikro orm 6.4.16

* Create small-ghosts-draw.md

* update config

* update config

* fix delete

* update config

* update workflows

* order improvements

* test pricing quuery

* test pricing quuery

* configurable connection options

* configurable connection options

* configurable connection options

* Update packages/modules/pricing/src/models/price.ts

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

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-10 08:58:19 +02:00
Frane Polić
7dc3b0c5ff feat(core-flows,dashboard,js-sdk,promotion,medusa,types,utils): limit promotion usage per customer (#13451)
**What**
- implement promotion usage limits per customer/email
- fix registering spend usage over the limit
- fix type errors in promotion module tests

**How**
- introduce a new type of campaign budget that can be defined by an attribute such as customer id or email
- add `CampaignBudgetUsage` entity to keep track of the number of uses per attribute value
- update `registerUsage` and `computeActions` in the promotion module to work with the new type
- update `core-flows` to pass context needed for usage calculation to the promotion module

**Breaking**
- registering promotion usage now throws (and cart complete fails) if the budget limit is exceeded or if the cart completion would result in a breached limit

---

CLOSES CORE-1172
CLOSES CORE-1173
CLOSES CORE-1174
CLOSES CORE-1175


Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2025-10-09 12:35:54 +00:00
Adrien de Peretti
b43b285125 fix(): Workflow save to db + index integration instability (#13707)
**What**
- Fix index integration tests instability
- Fix workflow engine storage save to db
2025-10-08 08:45:15 +00:00
Adrien de Peretti
51859c38a7 chore(): Default caching configuration and gracefull redis error handling (#13663)
* chore(): Default caching configuration and gracefull redis error handling

* Create odd-moons-crash.md

* chore(): Default caching configuration and gracefull redis error handling

* fixes

* address feedback

* revert(): Test utils imit module fix

* reconnect

* reconnect

* reconnect
2025-10-06 17:57:11 +02:00
Adrien de Peretti
62d340b897 fix(): caching better identify default provider (#13675) 2025-10-03 21:04:27 +02:00
Adrien de Peretti
4165172145 chore(): Downgrade mikro orm (performance regression) (#13680)
**What**
After lot of investigation, we finally found one of our performance regerssion point (see [here](https://github.com/mikro-orm/mikro-orm/issues/6905)), this pr downgrade mikro orm and move the strategy back to select in where needed
2025-10-03 15:31:40 +00:00
Adrien de Peretti
d58462c9c9 chore(): Caching improvements (#13660)
* chore(): Caching improvements

* Create proud-windows-sleep.md

* naming

* fix tests

* address feedback
2025-10-03 10:05:44 +02:00
Adrien de Peretti
76aa4a48b3 fix(): workflows concurrency (#13645) 2025-10-02 11:11:38 -03:00
Nicolas Gorga
ca334b7cc1 fix(inventory): delete reservation item inventory level required quantity (#13633)
Fixes #13625


---

> [!NOTE]
> Ensure `reserved_quantity` is adjusted when deleting reservation items via `deleteReservationItems`, with new integration tests covering deletion and inventory updates.
> 
> - **Inventory Module Service (`packages/modules/inventory/src/services/inventory-module.ts`)**:
>   - Add `deleteReservationItems` API (and transactional `_` variant) that hard-deletes reservations, then updates related inventory levels via `adjustInventoryLevelsForReservationsDeletion`.
>   - Wire through event emission/manager decorators consistent with existing patterns.
> - **Integration Tests (`packages/modules/inventory/integration-tests/__tests__/inventory-module-service.spec.ts`)**:
>   - Add tests for `deleteReservationItems` to verify deletion by id and `reserved_quantity` adjustments on inventory levels.
>   - Minor import update to include `ReservationItemDTO`.
> - **Changeset**:
>   - Patch release note for `@medusajs/inventory` documenting the fix.
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ac6641a9ec9543115504407f708f81bd427c3444. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
2025-10-02 12:59:13 +00:00
William Bouchard
bb08edd41f fix(medusa,file-local,file-s3,core-flows): fix csv parsing special characters (#13649)
* fix(): fix csv parsing special characters

* remove other tries

* tweak

* remove comments

* Create rude-mirrors-hang.md
2025-10-02 08:24:18 -04:00
Adrien de Peretti
8fb7e04be7 fix(): Fulfillment custom schema error on provider (#13656) 2025-10-02 14:01:54 +02:00
martinerko
9361f9c25a fix(index): preserve existing fields configuration (#13639) (#13640)
Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
2025-10-02 11:53:56 +02:00
Adrien de Peretti
b9d6f73320 Feat(): distributed caching (#13435)
RESOLVES CORE-1153

**What**
- This pr mainly lay the foundation the caching layer. It comes with a modules (built in memory cache) and a redis provider.
- Apply caching to few touch point to test

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-09-30 16:19:06 +00:00
Adrien de Peretti
5b135a41fe fix(): workflow engine migration issue (#13629)
**What**
The extension creation have been pushed by mistake
2025-09-30 15:41:09 +00:00
Shahed Nasser
0c7cbfb2e7 feat(payment-stripe): Allow passing shared payment token in Stripe (#13632)
* feat(@medusajs/payment-stripe): Allow passing shared payment token in Stripe

* fix changeset
2025-09-30 18:40:36 +03:00
Adrien de Peretti
9c7c1d48c7 fix(): Pricing preference context loss (#13626)
**What**
The context reference is being mutated by the repository leading to an empty context. Also, the filter is built from the pricing context instead of pricing context -> context leading to always fetch all preferences all the time
2025-09-30 12:38:04 +00:00