* chore: Clean up authentication middlewares
* chore: Rename AuthUser to AuthIdentity
* feat: Define link between user, customer, and auth identity
* feat: Use links for auth, update auth context content
* fix: Adjust user create command with new auth setup
* fix: Make auth login more dynamic, review fixes
* fix: Change test assertions for created by
* 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
Before we would swallow the error and return a generic error to the user. This will provide more information to the caller if it is one of the known errors.
Add V2 sales channel management to admin
`@medusajs/medusa`
- Add `POST /admin/sales-channels/:id/products/batch/remove`
- Refactor cross-module filter middleware to comply with the latest convention
`@medusajs/admin-next`
- Add all sales channel routes
- Moves the following sales channel UI to shared components in `modules/sales-channel`:
- sales-channel-list
- sales-channel-edit
- sales-channel-details
- sales-channel-general-section
- sales-channel-create
The sales-channel-product-section is not shared because the API in V2 will change.
The sales-channel-add-products component is not shared because the API in V2 will change.
`@medusajs/core-flows`
- Add `detachProductsFromSalesChannelsStep`
- Add `removeProductsFromSalesChannelsWorkflow`
This PR achieves the following
- Remove dependency on internals for seeding the tests (more work left, but major work done)
- Adds the workflow for updating variant's price
I will do a follow-up PR to further clean up the tests and remove all internal dependencies
**What**
- Add workflow + step for detaching sales channels from pub API keys
- Tweak linking error message to be more helpful
- Add `removeRemoteLink` step to delete API key workflow
There are several things done in this PR, namely:
Unify the service endpoints API to always work with a model rather than allowing to pass both ID and model (eg. both type_id and type being available in the request to create).
Start using upsertWithReplace to simplify the code and fix some deassociation bugs
Apply some changes to tests to deal with the pricing breaking changes
Correctly define the model relationships (with both ID and entity fields available)
All tests for the product are passing, which should bring us back to a great baseline.
What
- Add link between API key and sales channels
- Add API route for batch adding sales channels to a publishable API key
- Clean up API key API routes responses
- Move API key test suite from `integration-tests/modules` to `integration-tests/api`