**What**
DML class name and mikro orm entity name are different, it was ok and the idea was to accept that and do the transformation when needed. But since class name are usually upper case first we decided to re integrate that convention in the DML class name as well to simplify consumption of the dml name without having to worry about the normal case
* feat(core-flows,framework,medusa): list shipping options pass in cart as pricing context
* chore: add test for shipping options returning free shipping
RESOLVES FRMW-2813
**What**
Extract what we have done in the order module DML migration.
This includes all the changes we discussed around default value and nullable management
From now on, when the default is being set through the DML on a property, no default initializer will be created, this means that when a mikro orm class is being instantiated, no default will be applied at instantiation time. This fixes the issue when retrieving data and not selecting fields that have a default. The default initializer was taking the relay making you think the data was present except that it was the value of the default initializer. From now on, the default value is applied as follows
- db column default
- before flush
- on persist
The same applies for nullable properties/columns
Co-authored-by: Harminder Virk <1706381+thetutlage@users.noreply.github.com>
what:
- adds price rule operators when doing price calculations
- rules now accepts a key where the value can be an array of objects `({ operator: string, value: number })`
- validation for available types of operator and value to be a number
```
await service.createPriceSets({
prices: [
{
amount: 50,
currency_code: "usd",
rules: {
region_id: "de",
cart_total: [
{ operator: "gte", value: 400 },
{ operator: "lte", value: 500 },
]
},
},
]
})
```
- price calculations will now account for the operators - lte, gte, lt, gt when the price context is a number
RESOLVES CMRC-747
Remove the request body type passed as a type argument for admin and store routes for order transfer cancelation. Since the type is empty, it leads to a generated empty request body schema in the API reference.
Issues Addressed:
- Missing provinces (e.g., Ceuta, Melilla).
- Incorrect inclusion of states as provinces (e.g., Andalucía).
- Inclusion of a province from another country (e.g., Nouvelle-Calédonie).
Solution:
This update provides an accurate list of Spain's provinces based on the ISO 3166-2 standard. Reference: [ISO 3166-2:ES - Provincias](https://es.wikipedia.org/wiki/ISO_3166-2:ES#Provincias).
**What**
- Updates existing translation files with missing keys. Done using AI, so quality is debatable. Will depend on community to provide better translations if needed.
This PR improves the French translations already submitted.
- Corrected missing translations.
- Ensured the JSON structure matches the English version.
- Verified consistency across all keys.
The file is very large and it's hard to make sure everything is right.
The previous Similar PR is [Add french trad in i18n translations #9885](https://github.com/medusajs/medusa/pull/9885)
Let me know if additional changes are needed! Happy to help :)
Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
* feat: convert MikroORM entities to DML entities
* feat: wip on repository changes
* continue repositories and types rework
* fix order repository usage
* continue to update product category repository
* Add foreign key as part of the inferred DML type
* ../../core/types/src/dml/index.ts
* ../../core/types/src/dml/index.ts
* fix: relationships mapping
* handle nullable foreign keys types
* handle nullable foreign keys types
* handle nullable foreign keys types
* continue to update product category repository
* fix all product category repositories issues
* fix product category service types
* fix product module service types
* fix product module service types
* fix repository template type
* refactor: use a singleton DMLToMikroORM factory instance
Since the MikroORM MetadataStorage is global, we will also have to turn DML
to MikroORM entities conversion use a global bucket as well
* refactor: update product module to use DML in tests
* wip: tests
* WIP product linkable fixes
* continue type fixing and start test fixing
* test: fix more tests
* fix repository
* fix pivot table computaion + fix mikro orm repository
* fix many to many management and configuration
* fix many to many management and configuration
* fix many to many management and configuration
* update product tag relation configuration
* Introduce experimental dml hooks to fix some issues with categories
* more fixes
* fix product tests
* add missing id prefixes
* fix product category handle management
* test: fix more failing tests
* test: make it all green
* test: fix breaking tests
* fix: build issues
* fix: build issues
* fix: more breaking tests
* refactor: fix issues after merge
* refactor: fix issues after merge
* refactor: surpress types error
* test: fix DML failing tests
* improve many to many inference + tests
* Wip fix columns from product entity
* remove product model before create hook and manage handle validation and transformation at the service level
* test: fix breaking unit tests
* fix: product module service to not update handle on product update
* fix define link and joiner config
* test: fix joiner config test
* test: fix joiner config test
* fix joiner config primary keys
* Fix joiner config builder
* Fix joiner config builder
* test: remove only modifier from test
* refactor: remove hooks usage from product collection
* refactor: remove hooks usage from product-option
* refactor: remove hooks usage for computing category handle
* refactor: remove hooks usage from productCategory model
* refactor: remove hooks from DML
* refactor: remove cruft
* cleanup
* re add foerign key indexes
* chore: remove unused types
* refactor: cleanup
* migration and models configuration adjustments
* cleanup
* fix random ordering
* fix
* test: fix product-category tests
* test: update breaking DML tests
* test: array assertion to not care about ordering
* fix: temporarily apply id ordering for products
* fix ordering
* fix ordering remove logs
---------
Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
- Allow passing a `disabledTooltip` for actions in a `ActionMenu`. Useful for providing context for the user why a option is disabled. E.g. `{ disabled: sales_channel.is_default, disabledTooltip: "Deleting the default Sales Channel is not allowed. Please assign a different default Sales Channel for your store". }`
* migration
* fix snapshot
* primarykey
* init work on dnd
* progress
* dnd
* undo changes
* undo changes
* undo changes
* undo changes
* fix firefox issue
* lint
* lint
* lint
* add changeset
* undo changes to product module
* set activator node
* init work on service layer
* alternative
* switch to OneToMany
* add tests
* progress
* update migration
* update approach and remove all references to images in product.ts tests
* handle delete images on empty array
* fix config and order type
* update changeset
* rm flag
* export type and fix type in test
* fix type
---------
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
- **core-flows**:
- cancel transfer
- decline transfer
- **API**:
- admin cancel transfer
- store decline transfer
- store cancel transfer
- **js-sdk**:
- add methods for store endpoints
---
CLOSES CMRC-726