Commit Graph

6703 Commits

Author SHA1 Message Date
Oli Juhl
853187410e fix(product): Always add q if defined (#9505) 2024-10-09 11:52:02 +02:00
Shahed Nasser
e23d2b9ed7 docs: updates in recipes (#9472)
Updates in recipes following release changes
2024-10-07 17:53:53 +00:00
Shahed Nasser
f3c8f5efef docs: document using conditional operators in workflows (#9464) 2024-10-07 17:52:30 +00:00
Jakub Andrzejewski
6e5d9acc4a fix(payment): correct import of MedusaError (#9474) 2024-10-07 19:50:42 +02:00
Frane Polić
57177133e2 fix(dashboard): manage inventory flags (#9487)
**What**
- allow to create a variant without managed inventory (we need to explicitly pass `false` now since the default on the model is `true` for `manage_inventory`)

---

FIXES CC-575
2024-10-07 17:50:32 +00:00
Carlos R. L. Rodrigues
8fbef8a667 fix(order): searchable fields (#9493)
FIXES: TRI-353
2024-10-07 17:45:20 +00:00
Frane Polić
dc9c23be34 fix(core-flows): remove reservations on order edit confirm (#9477)
**What**
- remove reservations from the old version of the order and create a new ones

---

FIXES CC-566
2024-10-07 17:43:30 +00:00
Riqwan Thamir
70564c3c66 fix(medusa): use transform order for store order endpoints (#9489)
* fix(medusa): use transform order for store order endpoints

* chore: update amount when unit price is present
2024-10-07 13:55:06 +02:00
Carlos R. L. Rodrigues
f9e8403d29 fix(orchestrator, workflows-sdk): skip async step (#9482) 2024-10-07 07:35:30 -03:00
Adrien de Peretti
ad3524ffbe feat: Add useQueryStep (#9384)
* feat: Query step replacement

* fix

* fix types
2024-10-07 12:07:06 +02:00
Harminder Virk
2d8ce6fd5b refactor: convert modules enum to a const (#9486) 2024-10-07 14:42:59 +05:30
Riqwan Thamir
2d1f4bcabc feat(dashboard,core-flows,types,order): change order accepts price updates (#9476)
* chore: change order can accept price updates

* chore: add changes to transformed order

* chore: fix transform

* chore: transform raw unit price
2024-10-07 10:54:21 +02:00
Shahed Nasser
781d0ca624 docs: added docs for reset password (#9306)
- Added to docs on implementing auth flows using the module and API routes how to update a user's password
- Added guide on how to send a notification when a password token is generated
- Added a guide on implementing reset password flow in storefront
- Added OAS for the `/update` and `/reset-password` routes + generated specs for the API reference
2024-10-07 08:04:01 +00:00
Damien Thiesson
adb3a8246a docs: fix import path in the workflow basic documentation (#9481)
The import is three levels up, but, the `src/api/workflow/route.ts` file is only two levels down from `src/workflow`.

![Screenshot 2024-10-06 at 6 09 38 PM](https://github.com/user-attachments/assets/0d94338f-a8db-406b-80fe-a64ffe500ca3)
2024-10-07 07:22:15 +00:00
Shahed Nasser
522d3ce764 docs: improvements to API reference intro sections (#9397)
- Improve intro sections of API reference to utilize divided columns
- Improve the content of the intro sections
- Add a new Workflows section to explain the workflows badge and how to use it
- Fixes to headings and add anchor for copying the link to a section
- Fixes responsiveness of intro sections on mobile devices
- Other: fix loading not showing when a sidebar category is opened.

Closes DOCS-932, DOCS-934, DOCS-937

Preview: https://api-reference-v2-git-docs-api-ref-intro-fixes-medusajs.vercel.app/v2/api/store
2024-10-06 16:51:08 +00:00
Frane Polić
d6b452b734 feat(dashboard, medusa) add metadata to pages (#9433)
**WIP**
- add metadata component and edit route to missing pages
- fix API issues around metadata in certain domains

---

FIXES CC-554
2024-10-06 11:57:56 +00:00
Adrien de Peretti
ffc35f2b6e fix: Remove extra saving on serialization which breaks the chain (#9465)
**What**
The extra serialization check hapen to break the serialization chain by reusing already serialized entities when they have been serialized from a different parents sequence
2024-10-05 07:53:56 +00:00
Carlos R. L. Rodrigues
cc77ca1413 chore(types): index module type (#9473) 2024-10-04 16:54:43 +00:00
Oli Juhl
67e08dc989 fix(payment): Capture payment (#9469)
What
- Add missing `captured_at` field to payment retrieval
- Properly delete Medusa captures in case 3rd party capture call fails
2024-10-04 15:15:10 +00:00
Adrien de Peretti
eea2bfdef1 chore(cli): Update start description (#9448)
**What**
Update description of the start command
2024-10-04 15:11:29 +00:00
Carlos R. L. Rodrigues
d06ea6985d fix: add order to pagination types (#9471) 2024-10-04 12:57:44 +00:00
Oli Juhl
f7472a6fa6 fix: Idempotent cart completion (#9231)
What
- Store result of cart-completion workflow for three days by default
  - This enables the built-in idempotency mechanism to kick-in, provided the same transaction ID is used on workflow executions
- Return order from cart-completion workflow if the cart has already been completed
  - In case transaction ID is not used on workflow executions, we still only want to complete a cart once
2024-10-04 12:01:09 +00:00
Oli Juhl
6055f4c9cf fix: If country on cart has no tax region, clear tax lines (#9447)
**What**

If the country on the shipping address changes to a country without an associated tax region, we clear the tax lines on shipping methods and line items.
2024-10-04 11:55:53 +00:00
Oli Juhl
a114f90358 fix: Handle region updates on cart (1/n) (#9369)
**What**

On cart creation:
- If region only has one country -> create cart with country code

On cart updates:
- If shipping address country code is provided in input ->
  - If cart region doesn't include that country -> throw
  - If cart includes the country -> update shipping address
- If region is provided in input and is different from the one currently on the cart -> 
  - If there is a shipping address on the cart -> clear the address
    - If the region only has one country -> set country code of address
  - If there is not a shipping address on the cart ->
    - If the region only has one country -> set country code of address


Closes CC-545
2024-10-04 11:33:36 +00:00
Shahed Nasser
ed174826a4 docs: update modules chapter in basics (#9452)
* docs: update modules chapter in basics

* address PR feedback
2024-10-04 14:15:41 +03:00
Harminder Virk
d98f22c7d6 Feat: Move container bindings declaration merging within the framework (#9467) 2024-10-04 15:47:06 +05:30
Frane Polić
0a2ecdc889 feat(dashboard, js-sdk): reset password UI (#9451)
**What**
- add password reset flow on Admin

---

https://github.com/user-attachments/assets/3438ace2-c661-4121-a580-794a69ad4518

---

CLOSES CC-568


Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-10-04 09:10:26 +00:00
Frane Polić
b2a8c897f7 fix(dashboard): allow to unset PL rule (#9276)
**What**
- unset customer groups rule if no groups are selected
- preserve other rules when updating a PL

---

CLOSES https://github.com/medusajs/medusa/issues/9376
2024-10-04 09:09:27 +00:00
Shahed Nasser
bc8de8e5b1 docs: add section on testing providers (#9453) 2024-10-04 10:29:45 +03:00
Shahed Nasser
aec99b49cc chore: fix action name in update on rc release action (#9463) 2024-10-04 10:29:35 +03:00
Adrien de Peretti
5a573928c4 fix(core-flows): update cart promotion data usage (#9456)
**What**
The nullish coalescing can't really work since we are using proxies under the hood which is present
2024-10-04 07:19:47 +00:00
Shahed Nasser
00a51b59b1 docs: update imports of middlewares and http types (#9440) 2024-10-03 15:56:58 +00:00
Stevche Radevski
a461e21ae7 fix: Get backend URL from environment variable if available (#9450) 2024-10-03 11:50:28 +00:00
Harminder Virk
1e046f2b81 feat: allow using typescript path aliases when using ts-node (#9443) 2024-10-03 16:56:36 +05:30
Shahed Nasser
1bb3f8b5b1 docs: add a troubleshooting guide for dist imports (#9442) 2024-10-03 14:17:48 +03:00
Shahed Nasser
ab5a7ca691 docs: fix infinite scroll, update next.js, other fixes (#9441)
* update nextjs

* badge + scroll fixes
2024-10-03 14:17:33 +03:00
Harminder Virk
48e00169d2 breaking: move shared HTTP utils to the framework (#9402)
Fixes: FRMW-2728, FRMW-2729

After this PR gets merged the following middleware will be exported from the `@medusajs/framework/http` import path.

- applyParamsAsFilters
- clearFiltersByKey
- applyDefaultFilters
- setContext
- getQueryConfig
- httpCompression
- maybeApplyLinkFilter
- refetchEntities
- unlessPath
- validateBody
- validateQuery

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-10-03 09:42:00 +00:00
Adrien de Peretti
193f93464f fix(core-flows): Remove concurrent steps that rely on the same data update (#9438)
**What**
The `updateTaxLinesWorkflow` rely on the cart shipping method meaning that concurrent refresh of shipping method can impact tax lines therefore leading to wrong tax lines
2024-10-03 09:00:32 +00:00
github-actions[bot]
c536f7caf5 chore(docs): Generated References (automated) (#9436)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2024-10-03 11:03:35 +03:00
Stevche Radevski
bffb36cd11 fix: Use the default admin port in create medusa app env definition (#9439) 2024-10-03 09:53:57 +02:00
github-actions[bot]
21badd069d chore(docs): Updated API Reference (v2) (#9437)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2024-10-03 07:48:54 +00:00
Shahed Nasser
97c193be1b chore: add action to update starter dependencies + update reference actions (#9385)
* chore: add action to update starter dependencies

* change trigger type

* trigger generating references on new RC release
2024-10-03 10:21:12 +03:00
Adrien de Peretti
225d00cd09 chore: improve mikro orm serializer circular ref and link serialization (#9411) 2024-10-03 08:22:11 +02:00
Harminder Virk
2d1cf12dac feature: Add MikroORM CLI wrapper to bypass hardcoded module system (#9426)
FIXES: FRMW-2727

MikroORM (with version 5.9) has [hardcoded the TypeScript module](https://github.com/mikro-orm/mikro-orm/blob/5.x/packages/core/src/utils/ConfigurationLoader.ts#L138-L139) system to `commonjs`, which makes it incompatible with the module system we are using, ie `Node16`.

So, in order to continue using the Mikro ORM CLI within our modules, we will have to monkey-patch the block of code responsible for configuring `ts-node`. However, the monkey-patching must be done before their CLI gets booted.

As a result of this, we have to create a wrapper CLI on top of Mikro ORM CLI that performs the following steps.

- Monkey-patch the relevant code
- Register Mikro ORM CLI as the second step.

Due do this, we will have to use this new wrapper CLI within the modules, which is exposed as `medusa-db`. Maybe, `medusa-db` is not a great name, so please send your suggestions.
2024-10-03 04:51:20 +00:00
Shahed Nasser
a94f30ba97 chore(oas): add more details link to pagination and select fields (#9414)
find-and-replace to add a link to the pagination and field selection sections in parameters.

Closes DOCS-940
2024-10-02 18:41:51 +00:00
Riqwan Thamir
fbbfb0cb62 feat(framework,medusa): Ensure publishable key middleware is set for all store endpoints (#9429)
* feat(framework,medusa): Ensure publishable key middleware is set for all store endpoints

* chore: fix tests
2024-10-02 18:01:50 +02:00
Zaid Rashid
c4f26120b0 docs: Fix typo. Use instead yuse (#9431)
Fix typo. Use instead of use. I found this while reading through the documents here https://docs.medusajs.com/v2/resources/references/auth/provider#validatecallback
2024-10-02 16:01:14 +00:00
Shahed Nasser
0f6f56e764 docs: DX and performance improvements in API reference (#9430)
- Improve scroll behavior between active sections
- Improve lag when clicking on a sidebar item
- Refactor internal working of the `SidebarProvider` to find active items faster.
- Use Next.js's `useRouter` hook for changing the hash (since they added the option to disable scroll)
- Change `isBrowser` from a hook to a provider since it's widely used across applications.
- Other general improvements and fixes.

Closes DOCS-952
2024-10-02 15:51:02 +00:00
Shahed Nasser
5fb9c1f82e chore(oas): general fixes to OAS (#9413)
General fixes to OAS
2024-10-02 15:21:40 +00:00
github-actions[bot]
34eebb61eb chore(docs): Generated References (automated) (#9419)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2024-10-02 17:13:09 +02:00