What
- Move sales channel integration tests from `/api` to `/http`
Deleted tests that do not belong in the suite:
- POST /admin/products/:id
- Mutation sales channels on products
- POST /admin/products
- Creating a product with a sales channel
- GET /admin/products
- Filtering products by sales channel
- Expanding with a sales channel
- GET /admin/orders
- Filtering orders by sales channel
- Expanding with a sales channel
- POST /admin/orders/:id/swaps
- Creating a swap with a sales channel
**What**
Add support for event emitting in the fulfillment module
**NOTE**
It does not include the review of the events for the abstract module factory if the method is not implemented in the module itself and rely on the default implementation
* chore: Move api key tests to http folder
* chore: Move some of the product category tests to http
* chore: Move collection tests to http
* chore: Remove unused database test
* fix: skip module loading if mod: false
* fix: don't include disabled modules in config
* add test
* fix: revert changes to module loading in medusaapp
what:
- when inventory_quantity is requested through the API, we calculate the inventory based on sales channels + stock locations and return the total available inventory.
A variant can have multiple inventory items. As an example:
Table: (variant)
- 4 (required_quantity via link) x legs (inventory item)
- 2 x table top
Only if all individual inventory items of a variant are available, do we mark the variant as available as a single unit.
RESOLVES CORE-2187
Remove the old handlers and definitions that does not work anymore or are not used anymore. This legacy was bothering a refactoring we have with @thetutlage
**What**
Update the module resources discovery to account to the source directory to look into.
example:
```ts
user: { resolve: 'user' }
```
The above config will load the resources from the resolved path looking from the node modules
```ts
user: { resolve: './modules/user' }
```
The above config will load the resources from the local directory under dist if not run with ts node and under src otherwise
**What**
- display the address of the location on the details page
- use address formatting utils
- fix caching keys for shipping options
---
CLOSES CORE-2127
**What**
- Allows users to customize the Vite config from `admin.vite` in `medusa-config.js`
**How**
```
/** @type {import('@medusajs/types').ConfigModule} */
module.exports = {
projectConfig,
admin: {
backendUrl: "http://localhost:9000",
// the config param is our default config
vite: (config) => {
return {
define: {
__TEST__: JSON.stringify("test"), // this will now be defined as a const that can be accessed in widgets
},
};
},
},
// ...
};
```
The `vite` param is a callback that takes our default config as a param. If the user does not need to access our config they don't have to use it, as we merge their config with our own, but accessing the default config can be useful in some cases.