what:
- santizes inputs to prevent reserved_quantity from being updated directly
- inventory items create api can create location levels
- add validation to update quantity of reservation items
- general cleanup
RESOLVES CORE-2254
WIP, not ready to review
**what**
- add events
- integration tests of emitted events
- remove integration tests on auto generated services in favor of module method integration tests
**What**
- In the latest design changes, the Switch component needs to be wrapped in a container with a label and description. It doesn't make sense to add this "variant" to `@medusajs/ui`, so I have created a local component that we can use every time the design calls for this setup, to avoid re-implementing it multiple times, and the design being inconsistent across usages.
- Updates the Product domain forms to use the component. There are other places that needs to be updated to use it, but we can tackle those in our clean up tasks. I have checked with Ludvig and this design should be used everywhere we previously had the design shown in the first image.
<img width="604" alt="image" src="https://github.com/medusajs/medusa/assets/45367945/053e40c4-fa8f-4cac-96b3-659deeb6d760">
<img width="745" alt="image" src="https://github.com/medusajs/medusa/assets/45367945/890eb28f-83ac-4fa6-968f-cc204f1acd1e">
**What**
- Return the updated/deleted/created entities from the upsert with replace according to the configuration
This will help to emit the events from the product module as it rely on this abstraction in many places
* chore: Move publishable api key tests to HTTP
* chore: Move store tests to HTTP folder
* fix: Add tests for store products, fix several bugs around publishable keys
**What**
- Paginates comboboxes
- Loads categories relation on details page.
- Fix the endpoint used by client to fetch product tags (temp until we add sdk methods)
Resolves CORE-2073
what:
When creating a variant, we can now create inventory as a part of the product and variants create endpoint.
This applies only to variants where `manage_inventory=true`. 2 cases present itself:
1. When inventory_items are present
- Link an inventory item with required_quantity to the variant
- the inventory item already needs to be present
2. When inventory_items are not present
- A default inventory item will be created
- links the created item to the variant with a default required_quantity
RESOLVES CORE-2220
what:
- adds variant inventory link management endpoints:
```
Link inventory item to variant
POST /products/:id/variants/:vid/inventory-items
Update variant's inventory item link
POST /products/:id/variants/:vid/inventory-items/:iid
Unlink variant's inventory item
DELETE /products/:id/variants/:vid/inventory-items/:iid
```
- a batch endpoint that does the above 3 across variants
```
POST /products/:id/variants/inventory-items
```
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