* feat: Completely revamp the pricing module
* chore: Update all places to the new pricing interfaces
* fix: Remove unnecessary join to itself
* chore: Add data migration for existing users
* fix: Apply the correct index to price rule
**What**
Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate.
This pr also includes various fixes in different modules
Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
* chore: Remove unused validations and utilities
* chore: Remove all resources that are not being loaded
* chore: Remove unused dependencies, typeorm related code and fix tests
* chore: Use createAdminUser in all module tests
* feat: Add search capability to api keys
* feat: Add support for searching to currency and customer endpoints
* fix: Clean up product search filters
* feat: Add search support to regions
* feat: Add search support to sales channels
* feat: Add search support to store module
* feat: Add search support to user module
* fix: Clean up inventory search
* feat: Add search support for payments
* fix: Add searchable attributes to stock location models
* feat: Add search support to tax
* feat: Add search support to promotions
* feat: Add search support for pricing, filtering cleanup
* fix: Further cleanups around search
The changes in this PR are:
1. Change how product options are created and stored. The relationship changed from
`options --> option values <-- variants`
to
`options --> option values --> variant options <-- variants`
Now we can enforce non-duplicate option values, easier creation and updates of options, and more.
2. Refactors the product module. The product module did a lot of things in a non-ideal approach, and this is a step towards a more consistent usage of the base repository and methods exposed by a module. There is still work left to improve the module, but a large chunk of the changes are included in this PR
Things to do as a follow-up:
1. Remove many-to-many relationships if an empty list is passed in the base repository.
2. Improve the typings of the module
3. Further cleanup and improvements (there are few questions that I need answered before I can improve the API)
Apologies for the giant PR in advance, but most of these are removing of files and migrations from old workflows and routes to new.
What:
- Adds CRUD endpoints for price lists
- Migrate workflows from old sdk to new
- Added missing updatePriceListPrices method to pricing module
new wrapper for medusa integration tests.
for now it is only applied to the modules directory, but it could be used in the api integration tests or any other integrations that requires a db and a server up and running.
It is not perfect, but I wanted to have something working and centralised before improving it, also avoiding too many conflicts with other prs