Commit Graph

8397 Commits

Author SHA1 Message Date
Shahed Nasser
9b3218885c docs: redesign search (#12628)
* docs: redesign search

* add shadow in dark mode
2025-05-28 10:01:04 +03:00
Shahed Nasser
d155f492be chore(core-flows, types): change base64 comment fo files in TSDocs to binary (#12627)
* chore(core-flows, types): change base64 comment fo files in TSDocs to binary

* add in generatd
2025-05-27 18:35:39 +03:00
GuyPaikowsky
562f6288cd feat: add hebrew admin translation (#12603) 2025-05-27 16:45:49 +02:00
Shahed Nasser
528ab9f8a8 chore(types): fix example for createProductOptionValues in TSDocs and docs (#12623) 2025-05-27 12:45:21 +03:00
Shahed Nasser
41c29ffadd docs: phone authentication + otp guide (#12544)
* initial

* docs: phone authentication guide

* small fix

* Twilio SMS -> Twilio

* vale fix

* fix

* fix to auth sidebar

* fixes

* generate
2025-05-27 12:01:04 +03:00
Michael
5b86b3b2bc update Chinese translation files (#12611)
Co-authored-by: Stevche Radevski <sradevski@live.com>
2025-05-27 09:17:17 +02:00
Ammar Abbas
fda885bb2b docs: add missing equal sign for DATABASE_URL in env example (#12620)
The DATABASE_URL variable in the .env file examples was missing an equal sign, preventing it from parsing correctly. This fix ensures the environment variable is properly loaded and available during application runtime.
2025-05-27 07:16:51 +00:00
Harminder Virk
791276e80f feat: introduce bulkDelete method for IFileProvider (#12614)
Fixes: FRMW-2974

Currently during the product imports, we create multiple chunks that must be deleted after the import has finished (either successfully or with an error). Deleting files one by one leads to multiple network calls and slows down everything.

The `bulkDelete` method deletes multiple files (with their fileKey) in one go
2025-05-27 06:52:11 +00:00
Shahed Nasser
730cac0ed2 docs: add setup details to contribution guidelines (#12619) 2025-05-26 19:30:17 +03:00
Shahed Nasser
e7cf2219b6 docs: document using env vars in plugins (#12618) 2025-05-26 18:50:05 +03:00
Harminder Virk
1f5f50010a fix: expand method ALL for bodyparser config and additional validator (#12612)
Fixes: FRMW-2969
2025-05-26 10:22:26 +00:00
Shahed Nasser
7b3b4ff68a chore(core-flows): ignore hooks in complete cart workflow (#12600) 2025-05-23 18:48:46 +03:00
Shahed Nasser
8303aed701 docs: add support for ignoring hooks (#12599) 2025-05-23 18:48:08 +03:00
Harminder Virk
117fc25aea feat: run workflow hooks inside a when/then block (#11963)
* feat: run workflow hooks inside a when/then block

* fix conditionals and add 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-05-23 09:52:18 -03:00
Shahed Nasser
044c5dd138 docs: fix example in marketplace recipe (#12595) 2025-05-23 12:39:49 +03:00
Harminder Virk
f6f34cc0e4 fix: module import paths to contain unix slash (#12592)
Currently when types are generated on Windows, they result in using Windows slash for relative imports. This PR, fixes that to always use Unix imports
2025-05-23 08:09:34 +00:00
Adrien de Peretti
da5e278a78 chore(modules-sdk): Log full error when a loader fail to run (#12584)
* chore(modules-sdk): Log full error when a loader fail to run

* Create blue-ties-bow.md
2025-05-22 16:54:09 +02:00
github-actions[bot]
1e7ce4af10 chore(docs): Generated + Updated UI Reference (automated) (#12579)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2025-05-22 16:55:33 +03:00
Adrien de Peretti
7685d66c07 fix(framework): Fix compiler to create the dist after clean-up (#12582)
* fix(framework): Fix compiler to create the dist after clean-up

* Create angry-stingrays-fetch.md
2025-05-22 15:30:39 +02:00
Stevche Radevski
98798f305c fix: Correctly list files for all ids that are passed (#12575) 2025-05-22 14:52:05 +02:00
github-actions[bot]
3c6aa979a6 chore(docs): Updated API Reference (automated) (#12581)
* chore(docs): Generated API Reference (automated)

* fixes

* fixes

---------

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2025-05-22 15:46:13 +03:00
github-actions[bot]
6725bee130 chore(docs): Generated References (automated) (#12580)
Generated the following references:
- `_index.mdx`
- `api_key_models`
- `auth_models`
- `cart_models`
- `core_flows`
- `currency_models`
- `customer_models`
- `file_service`
- `fulfillment_models`
- `inventory_next_models`
- `js_sdk`
- `medusa`
- `modules`
- `modules_sdk`
- `order_models`
- `payment_models`
- `pricing_models`
- `product_models`
- `promotion_models`
- `region_models`
- `sales_channel_models`
- `stock_location_next_models`
- `store_models`
- `tax_models`
- `types`
- `user_models`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-05-22 12:35:49 +00:00
github-actions[bot]
fcaf454849 chore(docs): Update version in documentation (automated) (#12578)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2025-05-22 15:25:09 +03:00
olivermrbl
4936315b2d chore: Release 2025-05-22 14:08:05 +02:00
Shahed Nasser
04e0b43ed8 docs: document analytics module (#12563) 2025-05-22 15:05:04 +03:00
github-actions[bot]
5ad3615830 chore: Version Packages (#12576)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-22 14:04:27 +02:00
Christian
ca9ffcc80b feat: add presignedUrl method to upload sdk (#12569) 2025-05-21 22:21:50 +02:00
Frane Polić
c5a6573e26 fix(product, utils): handle metadata key deletion on product update (#12478) 2025-05-21 21:32:12 +02:00
Shahed Nasser
4e49cebcf0 fix(core-flows, types): export steps and types related to credit lines (#12567)
- Export steps that are used in credit-line related workflows
- Move workflow's input type to the `workflows.ts` type file
- Add and update TSDocs
2025-05-21 19:18:29 +00:00
Shahed Nasser
32c89abe67 docs: show when condition in workflows reference (#12566) 2025-05-21 19:34:55 +03:00
Shahed Nasser
bc965eb6aa docs: improve module isolation chapter (#12565)
* docs: improve module isolation chapter

* add note about loaders running with migrations
2025-05-21 18:57:28 +03:00
Adrien de Peretti
499381d119 chore(index): Few adjustments (#12557)
**What**
- Adjust lock duration, it is in seconds and not in ms
- Log on lock release 
- Renew lock separately from the other promises
- Add more logs 
  - Log when lock can't be acquired. It can be expected in case two processes try to sync the same entity and in that case it can be ignored. But at least it gives some information in case it happens for another reason
  - Log when the release lock failed, the lock will remain in the locking provider for 1 minute before being removed. But it wont prevent other entities to be synced
2025-05-21 15:06:35 +00:00
Aditya Erlangga Wibowo
22687d694e Fix: Incorrect Example File Name in Subscriber Section (#12560)
Solving issue [#12559](https://github.com/medusajs/medusa/issues/12559) this PR corrects the example file name provided in the Events and Subscribers section of the documentation. Previously, the guide instructed users to create a file at:

_`src/subscribers/order-placed.ts`_
However, the appropriate file name should be:

_`src/subscribers/product-created.ts`_
This fix aligns the documentation with the actual subscriber example, ensuring clarity and preventing confusion for developers following the guide.

<img width="1497" alt="subscriber-wrong-file-name" src="https://github.com/user-attachments/assets/23320e3d-75ee-4df9-9a9c-5b77edfe08ff" />

Changes
Updated the incorrect file name in the Subscriber section example from order-placed.ts to product_created.ts.

Review
@shahednasser – kindly review when you get the chance. Thanks!
2025-05-21 14:54:43 +00:00
Shahed Nasser
e6b6c0d3b7 chore(types, utils): update TSDocs related to analytics module (#12564) 2025-05-21 14:43:09 +00:00
Frane Polić
3071d09a03 fix(core-flows): skip location check if inventory is not managed (#12540)
* fix: skip location check if inventory is not managed

* fix: rm todo

* chore: changeset
2025-05-21 15:37:43 +02:00
Shahed Nasser
db33616cf9 chore(core-flows): add tsdocs for hooks in complete cart (#12555) 2025-05-21 14:25:53 +03:00
Shahed Nasser
61d3bdde4a docs-util: extract feature flags in generated OAS (#12554) 2025-05-21 14:25:40 +03:00
Shahed Nasser
bda143673d docs: show hooks in when condition in workflows reference (#12552) 2025-05-21 13:00:15 +03:00
coded
13f29e5ca3 chore(docs): Update npm command (#12547)
`npm run install` in the first place is not a valid command, `yarn run install` will also be fixed by this change as we are using  **npm-to-yarn** package for its conversion (tested).

`yarn run start` is a valid command, i know `yarn start` is a **short-hand** but i cant help here as we have't hardcoded it in the docs its being converted through the same package mentioned above, anyways both are valid so should be fine ig.
2025-05-21 06:58:33 +00:00
Shahed Nasser
9f376ff1f1 fix(js-sdk): allow passing custom request body parameters in auth.register method (#12545)
The `auth.login` method of the JS SDK allows passing custom, which is useful for custom authentication providers. For example:

```ts
const response = await sdk.auth.login("customer", "phone-auth", {
      phone
    })
```

However, the `auth.register` method doesn't allow that, so we can't do the following:

```ts
const response = await sdk.auth.register("customer", "phone-auth", {
      phone
    })
```

Instead, we'd have to use the `client.fetch` method.

This PR fixes the input type of the payload passed to the `register` method to be similar to that of `login`,  which would allow using it with custom authentication providers
2025-05-20 16:27:13 +00:00
Harminder Virk
d9fdabe96d fix: mark posthog-node as a peer dependency (#12539)
Since the runtime of the `@medusajs/analytics-posthog` relies on `posthog-node` package. It should be either installed as a dependency or a peerDependency that will be satisfied by the user project.

In this PR, I have added it as a peer dependency
2025-05-20 14:51:51 +00:00
Adrien de Peretti
41054a3419 fix(product): Deep update data retrieval bottleneck (#12538)
* fix(product): Deep update data retrieval bottleneck

* Create shiny-spiders-matter.md

* fix(product): Deep update data retrieval bottleneck
2025-05-20 16:42:42 +02:00
Carlos R. L. Rodrigues
ebe5cc7acd chore(index): return ids only (#12543) 2025-05-20 11:16:02 -03:00
Harminder Virk
fca5ad77b4 feat: process import from pre-processed chunks (#12527)
Fixes: FRMW-2968

In this PR we have done two major things.

- First, we remove storing CSV contents within the workflow storage and neither store the JSON payloads to be created/updated in workflows. Earlier, they all were workflow inputs, hence were stored in the workflow
- Introduce a naive concept of chunks and process chunks one by one. The next PR making chunking a bit more robust while using streams, adding ability to resume from the failed chunk and so on.

> [!IMPORTANT]  
> The new endpoint `/admin/product/imports` is not in use yet. But it will be after the next (final) PR.

## Old context in workflow storage

![CleanShot 2025-05-19 at 17 11 08@2x](https://github.com/user-attachments/assets/798bdcc9-a368-4c1f-afdd-2a77f5ce43e0)

## New context in workflow storage

![CleanShot 2025-05-19 at 17 15 08@2x](https://github.com/user-attachments/assets/0463d035-403f-4600-a9cd-5af24d5fee7c)
2025-05-20 12:33:18 +00:00
Stevche Radevski
3e5794d657 fix: Correctly import MedusaError in the analytics module (#12542) 2025-05-20 13:29:51 +02:00
Shahed Nasser
07ecb8595a docs: added re-order guide (#12363)
* docs: added re-order guide

* reiteration to intro

* adjustment to title

* fix vale error

* generate

* fix vale
2025-05-20 13:10:31 +03:00
Cypress
54809b8499 fix(i18n): Correct Chinese translations in zhCN.json (#12537) 2025-05-20 09:47:41 +02:00
Carlos R. L. Rodrigues
59bbff62d8 fix(index): Apply various fixes to the index engine (#12501) 2025-05-19 15:14:25 -03:00
Carlos R. L. Rodrigues
32be40a2c0 fix(medusa): add estimate count to admin products (#12467)
what:
 * Add `estimate_count` property to `/admin/products` endpoint when index engine FF is on
2025-05-19 18:06:28 +00:00
Stevche Radevski
b9a51e217d feat: Add an analytics module and local and posthog providers (#12505)
* feat: Add an analytics module and local and posthog providers

* fix: Add tests and wire up in missing places

* fix: Address feedback and add missing module typing

* fix: Address feedback and add missing module typing

---------

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-05-19 19:57:13 +02:00