* add "get-variant" endpoint
* import from a different place
* fix unit test
* add changeset
* inventory management for orders
* add changeset
* initial create-fulfillment
* add changeset
* type oas and admin
* Move inv. creation and listing from admin repo
* Fix location editing bug (CORE-1216)
* Fix default warehouse on inventory table view
* remove actions from each table line
* Use feature flag hook instead of context directly
* remove manage inventory action if inventory management is not enabled
* Address review comments
* fix queries made when inventorymodules are disabled
* variant form changes for feature enabled
* move exclamation icon into warning icon
* ensure queries are not run unless feature is enabled for create-fulfillment
---------
Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com>
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
**What**
- update PK endpoint
- medusa-js/react implementation
- add a title property to the entity
- update the migration file
- pass a title on create
- list PKs by title
- update the client libs with new param signatures
- change id prefix to: "pk_"
**what**
- Add support to remove resources by batch on discount conditions
- Add support on medusa-js and medusa-react
**Tests**
- Add integration tests to validate that the resources have been deleted and the length is the one expected
- Add unit tests on medusa react
FIXES CORE-609
* feat(medusa): Allow to add items to a discount condition by batch + cleanup of discounts and discount conditions end points
* style(medusa): cleanup catch and log
* feat(medusa-react, medusa-js): Add support to add item batch to discount condition
* cleanup
* cleanup
* rename items to resources
* fix(medusa-js): url
* Create fast-suns-repair.md
* update naming
* tests(integration): Update tests to reflect API changes
* feat(medusa): Delete a condition should be idempotent on discount and condition
* revert
* wait for update to order edit model
* delete line item tests
* create remove method for lineitem with tax lines
* add remove item tests
* split delete allocation tests into two: more and less than total
* remove unused import
* cleanup
* add medusa-js and react endpoints
* pr feedback fixes
* linting
* remove unused relation from query
* remove removed-event and unused imports
* add await
**What**
Allow a customer to complete a requested order edit.
**Test**
- Unit tests complete flow
- Unit tests medusa react
- Integration tests of order edit completion
FIXES CORE-501
**what**
Support confirm of an order edit:
Upon confirmation, the items of the original order are detached and the items from the order edit are attached to the order.
The order total is recomputed with the correct total which can defer from the paid_total and refundable_amount (based on the paid_total)
**Tests**
- Unit tests medusa-js and medusa-react as well as the core
- Integration test of the confirmation flow which check that the order edit is properly confirmed and can be confirmed idempotently. Also validate the totals and that the order items correspond to the order edit items. Also validate the order totals.
FIXES CORE-498
**What**
- Implement adding a line item to order (edit)
**How**
- _by implementing the following "flow"_
- generate a line item
- computing line item adjustments for that line item
- creating tax lines
- creating a change record
**Testing**
- **_integration tests_**
- check if line item and order item change objects are created (with correct tax lines)
- line item adjustments are generated if
- fixed discount is applied to cart
- percentage discount is applied
- **_unit tests_**
- ensure that methods from Inventory, LineItem, LineItemAdjustment etc. services are called
---
RESOLVES CORE-495
**what**
Support `updateLineItem` which does the following:
- If no item change exist then create a new one and attaches the clone item with the adjustments and tax lines
- if an item change exists then delete/create adjustments and tax lines and update the cloned item quantity
**Tests**
- Unit tests core + client
- integration tests
- When no item change already exists
- When an item change already exists
FIXES CORE-497
**What**
- Implements the admin create end point
- Service implementation of the create method and the retrieveActive as well as the totals computation
- Improve compute line items
- client
- medusa-js api
- medusa-react mutations hooks
**Tests**
- Unit tests of the create end points
- Unit tests of the service create method
- Integration tests for admin that also take into account totals computations
- client
- medusa-js tests
- medusa-react hooks tests
FIXES CORE-491
**What**
- Implements the admin/store retrieval end point
- Service implementation of the retrieve method
- Service implementation of the computeLineItems method which aggregates the right line item based on the changes that are made
- client
- medusa-js api
- medusa-react queries hooks
**Tests**
- Unit tests of the retrieval end points
- Unit tests of the service retrieve method and computeLineItems
- Integration tests for admin/store
- client
- medusa-js tests
- medusa-react hooks tests
FIXES CORE-492
What
Support sales channel remove product batch in medusa, medusa-js and medusa-react
How
By implementing a new endpoint and the associated service method as well as the repository methods.
Medusa-js new removeProductd method in the resource
Medusa-react new hook in the mutations
Tests
Endpoint test
Service test
Integration test
Hook tests
Fixes CORE-292
**What**
Support sales channel list in medusa, medusa-js and medusa-react
**How**
By implementing a new endpoint and the associated service method as well as the repository methods.
Medusa-js new list method in the resource
Medusa-react new hook in the queries
**Tests**
Endpoint test
Service test
Integration test
Hook tests
Fixes CORE-280
* export everything from price lists in core
* medusa-js price list
* feat: add product list for price lists
* feat: add product list for price lists
* add price list to admin module
* add price list hooks initial
* refactor: product list controller
* fix: add integration test for price list products
* update types
* add tests for price lists
* update medusa react tests
* update update request for price lists
* Apply suggestions from code review
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* rename methods
* pr feedback
* list products from price list
* fix errors after merge
* update medusa react with medusa-js method name changes
* redo changes
* update hook names
* fix: routes in msw handler
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
Co-authored-by: Zakaria El Asri <zakaria.elas@gmail.com>