Commit Graph

9179 Commits

Author SHA1 Message Date
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
Shahed Nasser
540ae996ff docs: fix mikro-orm imports from framework (#13885) 2025-10-28 18:27:34 +02:00
Leonardo Benini
0244f029aa feat(dashboard): type-safe i18n for UI extensions (#13851)
## Summary

**What** 

Exports the type of medusa's i18n keys from the dashboard package, for autocomplete support.

**Why** 

Currently i18next is not able to provide proper ts autocomplete support when adding translations to projects or plugins.   
For example when adding a data table or form, I have to go back multiple times to the source i18n files in the medusa repo and search for the exact key name(is it "actions.confirm" or "general.confirm"? etc) and I forget it right after every single time.

Even if all medusa components were provided already translated, it's still very convinient to use keys from medusa(if context appropriate) for some custom components, since they are already translated into many languages(eg "yes", "no" and other very basic strings). Hence why ts support for the base keys would be very helpful

**How** 

Modified the generateTypes script to also copy the `en.json` file to the dist folder, and export a `Resources` type with the inferred keys in index.d.ts.
This allows users to define their own i18next type definitions including the base "translation" namespace, example below.

**Testing** 

Manual testing

---

## Examples

```ts
// In src/admin/i18next.d.ts
import type enTranslation from "./i18n/en.json"         // custom keys
import type { Resources } from "@medusajs/dashboard"    // medusa keys
declare module "i18next" {
    interface CustomTypeOptions {
        fallbackNS: "translation"
        resources: {
            translation: Resources["translation"]                     
            // all custom namespaces need to merge Resources["translation"] as well
            // otherwise when falling back to "translation", strings will have type "never"
            myCustomNs: typeof enTranslation & Resources["translation"]  
        }
    }
}

```

Then, both `useTranslation()` and `useTranslation("myCustomNs")` will have proper autocomplete support

---

## 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
- [x] I have linked the related issue(s) if applicable
2025-10-28 14:52:36 +00:00
Frane Polić
1594c13962 fix(dashboard): preserve old image ids when deleting a product image (#13881) 2025-10-28 15:18:36 +01:00
Radek Napora
c1c0e1490a fix(dashboard) Standardize heading levels for consistent hierarchy (#13861)
## Summary

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

This PR standardizes heading levels across dashboard components to maintain proper semantic HTML hierarchy.

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

*Please provide answer here*

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

- Added optional `headingLevel` prop `"h1" | "h2" | "h3"` to `DataTable` component with default value of `"h1"`

- Modified `Heading` component usage to explicitly specify the appropriate level based on context

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

*Please provide answer here*

---

## 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
- [ ] 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
2025-10-28 12:11:50 +00: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
Bastien
ac6754f008 feat(admin): change admin order list default sort (#13874)
*  Change admin order list default sort

* Create hot-laws-give.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-28 10:23:16 +01:00
Bastien
47b2f7f888 fix(admin): fix admin promotion list sort (#13872)
* 🐛 Fix admin promotion list sort

* Create six-squids-vanish.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-28 10:23:01 +01:00
Shahed Nasser
fa93f18f7d chore: fixes to http and request types for orders (1) (#13822) 2025-10-28 11:14:43 +02:00
Frane Polić
25a20ca95f feat(medusa,types): product variant store endpoints (#13730)
* wip(medusa): product variant store endpoints

* chore: refactor types

* chore: changesets

* fix: address feedback 1

* feat: load images for variants by default

* fix: use query.graph directly instead of refetchEntity

* feat: enable cache for variants endpoint
2025-10-28 10:12:07 +01:00
Shahed Nasser
4f4ab6208d chore: fixes to http and request types for sales channes, taxes, and store (#13832) 2025-10-28 10:10:14 +01:00
Shahed Nasser
a2b6ef36d9 chore: fixes to http and request types for payment and regions (#13831) 2025-10-28 10:09:51 +01:00
Shahed Nasser
64c5019b3b chore: fixes to http and request types for payments (#13830) 2025-10-28 10:09:24 +01:00
Shahed Nasser
83f2d87fa5 chore: fixes to http and request types for users (#13828) 2025-10-28 10:08:51 +01:00
Shahed Nasser
aa34d0fe9c chore: fixes to http and request types for inventory (#13827)
* chore: fixes to http and request types for inventory

* fix type error
2025-10-28 10:08:32 +01:00
Shahed Nasser
bc87c9a0ba chore: fixes to http and request types for fulfillment (#13826)
* chore: fixes to http and request types for fulfillment

* fix type error
2025-10-28 10:08:07 +01:00
Shahed Nasser
faea42316a chore: fixes to http and request types for customers (#13825) 2025-10-28 10:07:35 +01:00
Shahed Nasser
db777dc3d5 chore: fixes to http and request types for orders (3) (#13824)
* chore: fixes to http and request types for orders (3)

* add order store routes
2025-10-28 10:07:10 +01:00
Shahed Nasser
f253b325f9 chore: fixes to http and request types for orders (2) (#13823) 2025-10-28 10:06:26 +01:00
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