Commit Graph

5321 Commits

Author SHA1 Message Date
Riqwan Thamir
db9483140a fix(medusa): Fix store return API (#12284)
what:

- fixes the middleware to point to the right API route
- adds a test to store return API
2025-04-24 13:25:22 +00:00
Shahed Nasser
cb16f79b8f chore(types): claify province code format in TSDocs (#12283) 2025-04-24 13:53:26 +03:00
Shahed Nasser
71a5dc448d chore(core-flows, types): add tsdocs for draft orders workflows (#12279) 2025-04-24 11:31:28 +03:00
Shahed Nasser
876a14eb98 chore(js-sdk): fix TSDocs of draft orders in JS SDK (#12270) 2025-04-23 12:48:13 +03:00
Harminder Virk
cb53b8a529 feat: upgrade opentelemetry packages to support the latest release (#12266)
Fixes: FRMW-2947
2025-04-23 08:26:03 +00:00
olivermrbl
2fec5f4aa0 chore: Version packages 2025-04-23 09:27:02 +02:00
Harminder Virk
71a9a7210c fix: oas CLI to convert Windows paths to unix (#12254)
* fix: oas CLI to convert Windows paths to unix

* Create tidy-pigs-heal.md

* refactor: revert to isolate the issue

* refactor: add back the change with logs

* fix: remove external dependency
2025-04-22 14:41:58 +02:00
Frane Polić
ad74ba2ca4 fix(core-flows, link-modules): return fulfillment creation (#12227)
* fix: return fulfillment creation

* chore: changeset

* fix: link

* fix: cancel claim flow

* chore: test fulfillment creation as a part of return lifecycle test

* fix: exchanges cancle flow

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-04-22 14:33:46 +02:00
Bastien
d2dde19b73 feat(core-flows): emit updated event in update line item workflow (#12119)
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-04-22 14:05:29 +02:00
Harminder Virk
c2fe3f1520 fix: steps to return undefined and still chain the config method (#12255)
Fixes: FRMW-2946
2025-04-22 10:57:15 +00:00
Adrien de Peretti
49c526399e fix(medusa): sales_channel_id middleware manipulation (#12234)
* fix(medusa): sales_channel_id middleware manipulation leading to lost of the sc

* fix(medusa): sales_channel_id middleware manipulation leading to lost of the sc

* add unit tests

* add unit tests

* improve

* integration tests
2025-04-20 17:42:59 +02:00
Shahed Nasser
2e65f7ffc0 chore(types): small tsdoc change to file service (#12240) 2025-04-18 14:41:39 +03:00
Harminder Virk
24af8f2d8e fix: expose beforeRefreshingPaymentCollection hook (#12232)
Fixes: FRMW-2942
Fixes: #12228
2025-04-18 09:31:19 +00:00
Adrien de Peretti
28958b2e26 Chore/orchestration storage improvements (#12178)
**What**
Cleanup and improve workflow storage utility
2025-04-18 08:35:23 +00:00
Oli Juhl
fe74e77a7a chore: Pass more data to fulfillment provider (#12186)
* fix(core-flows): Add more fulfillment data

* fix(core-flows): Add more fulfillment data

* add more fields

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2025-04-18 10:24:46 +02:00
Stevche Radevski
c4a0b63778 feat: Add support for uploading a file directly to the file provider from the client (#12224)
* feat: Add support for uploading a file directly to the file provider from the client

* fix: Add missing types and add a couple of module tests

* fix: Allow nested routes, add test for it
2025-04-18 10:22:00 +02:00
Shahed Nasser
6f83dbc019 chore: fixes and updates to promotion and shipping option TSDocs (#12222) 2025-04-17 18:29:39 +03:00
Shahed Nasser
19d71fdc63 fix(core-flows): export registerOrderDeliveryStep (#12221)
Export registerOrderDeliveryStep to ensure devs can use it and to show it in the docs
2025-04-17 15:08:26 +00:00
Carlos R. L. Rodrigues
e180253d60 feat(orchestration): skip on permanent failure (#12027)
What:
 - Added step config `skipOnPermanentFailure`. Skip all the next steps when the current step fails. If a string is used, the workflow will resume from the given step.
 - Fix `continueOnPermanentFailure` to continue the execution of the flow when a step fails.
 
```ts
createWorkflow("some-workflow", () => {
  errorStep().config({
    skipOnPermanentFailure: true,
  })
  nextStep1() // skipped
  nextStep2() // skipped
})


createWorkflow("some-workflow", () => {
  errorStep().config({
    skipOnPermanentFailure: "resume-from-here",
  });
  nextStep1(); // skipped
  nextStep2(); // skipped
  nextStep3().config({ name: "resume-from-here" }); // executed
  nextStep4(); // executed
});
```
2025-04-17 12:49:58 +00:00
Shahed Nasser
1c5e82af51 chore(core-flows,types): fix links in TSDocs pointing to architectural modules (#12213) 2025-04-17 15:01:28 +03:00
Ionut
191965bbfe fix: Ensure shipment includes tracking numbers from fulfillment (#11775)
What: Added existing tracking numbers during shipment creation from the admin dashboard

Bug details: See #11160
2025-04-17 10:42:45 +00:00
Adrien de Peretti
8618e6ee38 fix(): Properly handle workflow as step now that events are fixed entirely (#12196)
**What**
Now that all events management are fixed in the workflows life cycle, the run as step needs to leverage the workflow engine if present (which should always be the case for async workflows) in order to ensure the continuation and the ability to mark parent step in parent workflow as success or failure

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-04-17 09:34:19 +00:00
Frane Polić
f6b20a943e fix(dashboard): properly register settings custom routes (#12198)
**What**
- custom setting routes were registered under `/settings/settings/custom-route` instead of `/settings/custom-route`

---

CLOSES SUP-1384

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-04-16 18:11:36 +00:00
Harminder Virk
ee35f3ce90 fix: apply additional data validator using a global middleware (#12194) 2025-04-16 16:26:44 +05:30
Harminder Virk
b890263725 feature: add support for dynamoDB for storing sessions and some types cleanup (#12140) 2025-04-16 14:55:14 +05:30
Frane Polić
9851598dae fix(payment): properly delete refund (#12193)
**What**
- properly delete the refund record if refunding with the provider fails

---

CLOSES SUP-1398
2025-04-16 07:57:39 +00:00
Frane Polić
01542f6973 feat(core-flows, js-sdk, medusa): draft order shipping removal (#12124)
**What**
- allow removal of a shipping method

---

CLOSES CMRC-1013
2025-04-16 06:10:24 +00:00
Adrien de Peretti
2f6963a5fb fix(): Event group id propagation and event managements (#12157) 2025-04-14 15:57:52 -03:00
Gergo Vandor
3a481290ea added hungarian admin translation (#12176)
* added hungarian admin translation

* added missing keys
2025-04-14 14:45:17 +02:00
Adrien de Peretti
4ea1a2e09f fix(index): Default schema typings (#12183)
**What**
Fix wrongly type is_giftcard property
2025-04-14 12:00:53 +00:00
harmvdhorst
bbe7389d30 added dutch translation (#12167) 2025-04-14 09:51:51 +02:00
Frane Polić
413a0da26c fix(core-flows): draft order reservations (#12115)
* fix: draft order reservations

* feat: add test case

* fix: assert item ids
2025-04-13 17:40:16 +02:00
Shahed Nasser
1f73281ab8 fix(types): fix type of application_method_type filter (#12160)
The `application_method_type` filter has a `string` type in the HTTP types. This PR accurately sets the type. This is useful for the generated OAS to show the possible filter values.
2025-04-13 13:16:57 +00:00
Shahed Nasser
90f9149735 chore: fixes to JS SDK TSDocs (#12159) 2025-04-11 16:41:52 +03:00
Frane Polić
9d0b6a136f fix(dashboard): display null sku (#12155) 2025-04-11 13:30:32 +02:00
Kunut Mix Chirdchai
ff9d1624b2 docs: Fix incorrect syntax in code snippets on Create Payment Provider page. (#12012) 2025-04-11 13:41:49 +03:00
olivermrbl
d61694385d chore: Version packages 2025-04-11 10:25:36 +02:00
Adrien de Peretti
6015dcc16d chore(product): Missing index in migration (#12150)
* chore(product): Missing index in migration

* Create silent-parrots-tickle.md
2025-04-11 10:18:58 +02:00
Frane Polić
95a8c7b57e fix(dashboard): product type metadata form (#12149) 2025-04-11 09:14:32 +02:00
Adrien de Peretti
3a1cf2212a chore: Cache available price rule attributes (#12144)
**What**
We found out that the pricing context from the cart always contains the entire cart, even though it is kind of wrong. The issue is that even though we improve the performances of the query, it will cost a lot to have hundreds of constraint for nothing potentially. For that reason, we cache the attributes in memory with the best possible query we can do to gather them and we renew them when we perform a calculate prices if it has been reset. That way, we ensure we don't have unnecessary checks on attributes that does not have rules.

Since we don't have the type table anymore which was doing that for us and until we have a proper caching layer it would do IMO. But the rules type table was very useful for these attributes findings
2025-04-10 15:55:35 +00:00
Adrien de Peretti
d87b25203c chore(promotion): Improve performances [1] (#12129)
**What**
Reduce database queries when possible and use proper data structure and aggregation when possible in order to reduce performance decrease overall
2025-04-10 15:53:39 +00:00
Carlos R. L. Rodrigues
31abba8cde fix(orchestrator): save checkpoint before async step (#12138) 2025-04-10 15:36:36 +00:00
Adrien de Peretti
07252691c5 chore(pricing): Pricing retrieval improvements (#12128)
**What**
I have removed the check for the context key where it was fetching all attributes available and then stripping out the one that does not exists.. On big dataset these would remove multiple hundreds of ms of query execution
2025-04-10 09:39:21 +00:00
Adrien de Peretti
6ae1e7b708 chore(medusa-test-utils): Prevent waiting for event indefinately (#12137)
**What**
Currently the util await for event infinitely, this can lead to chain crashes in the jest tests suites leading to too much noise to investigate proper issues.
We now have a default time out raced against the promise that is configurable to prevent from waiting for an excessive amount of time
2025-04-10 09:09:29 +00:00
Pedro Guzman
8804ca2f9c fix: allow backorder variants to be added to cart even if no locations (#12083)
* fix: allow backorder variants to be added to cart even if no locations

* document and unit test prepareConfirmInventoryInput
2025-04-09 19:15:42 +02:00
Adrien de Peretti
cb26c224ea chore(pricing): improve calculate prices performances (#12120)
* chore(pricing): Try to improve performances

* chore(pricing): new indexes

* chore(pricing): new indexes

* fix orderr

* Create olive-horses-judge.md

* feedback
2025-04-09 13:21:33 +02:00
Adrien de Peretti
13e159d8ad fix(workflow-engine-*): Prevent passing shared context reference (#11873)
* fix(workflow-engine-*): Prevent passing shared context reference

* fix(workflow-engine-*): Prevent passing shared context reference

* prevent tests from hanging

* fix event handling

* add integration tests

* use interval for scheduled in tests

* skip tests for now

* Create silent-glasses-enjoy.md

* fix cancel

* changeset

* push multiple aliases

* test multiple field alias

* increase wait time to index on test

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
2025-04-09 10:39:29 +02:00
Adrien de Peretti
2a18a75353 chore(framework): slightly improve maybe apply link filter middleware (#12113)
**What**
- Use the resource id filtering when possible instead of relying on programmatic intersection checks over potential hundreds thousands of resources from the link when in fact it is not necessary to fetch everything to check in memory but instead check in the db 
- Also fix normalizeDataForContext middlewares
2025-04-09 04:03:10 +00:00
Adrien de Peretti
74381addc3 chore(): Emit events in batch and index process event ids in batch (#12097)
**What**
First iteration to prevent events from overwhelming the systems.
- Group emitted event ids when possible instead of creating a message per id which leads to reduced amount of events to process massively in cases of import for example
- Update the index engine to process event data in batches of 100
- Update event handling by the index engine to be able to upsert by batch as well
- Fix index engine build config for intermediate listeners inferrence
2025-04-08 16:57:08 +00:00
Paolo Rossi
b05807bfc1 feat(inventory): Add quantity across locations translation and formatting (#11564)
Co-authored-by: Stevche Radevski <sradevski@live.com>
2025-04-08 15:31:18 +02:00