* feat(medusa): Allow to create/update object sales channels assignment
* feat(medusa): cleanup
* feat(medusa): Update oas
* feat(medusa): Only add relation if required
* feat(medusa): Add feature flag decorators
* style(medusa): PR feedback
* feat(medusa): Remove circular by moving sales channel product existence check to the repo layer
* feat(medusa): Reduce selected column as they are not necessary
* feat(medusa): Refactor repository and usage
* feat(medusa): Improve entity name formatting
* feat(medusa): Add feature flag to the service
* fix(medusa): typo
* test(medusa): fix unit tests
* feat(medusa): include feedback
* feat(medusa): Adds validator pipe for Sales Channel existence (#1930)
* feat(medusa): Allow to create/update object sales channels assignment
* feat(medusa): cleanup
* feat(medusa): Update oas
* feat(medusa): Only add relation if required
* feat(medusa): Add feature flag decorators
* style(medusa): PR feedback
* feat(medusa): Remove circular by moving sales channel product existence check to the repo layer
* feat(medusa): Reduce selected column as they are not necessary
* feat(medusa): Refactor repository and usage
* feat(medusa): Improve entity name formatting
* feat(medusa): Add feature flag to the service
* fix(medusa): typo
* test(medusa): fix unit tests
* feat(medusa): Adds validator pipe for Sales Channel existence
* feat: Move product payload classes to types file
* fix unit tests
* fix integration test
Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
* feat(medusa): Revert base repository and related
* feat(medusa): cleanup
* remove base repo export
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
What
Allow to create a cart with a sales channel, otherwise the default one is attached.
Also allow to update the sales channel on an existing cart and in that case the line items that does not belongs to the new sales channel attached are removed
How
Updating existing end points and service method to integrate the new requirements
Tests
Add new integration tests
Fixes CORE-270
Fixes CORE-272
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
Allow to query the products and orders by sales channels
**How**
Updating the existing end points and repositories (if necessary) to take a new query params that is sales_channel_id as an array of string
**Tests**
Add new integration tests
Fixes CORE-295
Fixes CORE-288
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
**What**
- Add `transformQuery` to get endpoints for product, order and cart
- ensure that the default relations (when getting a singular entity) includes sales channels when enabled
- Add `EmptyQueryParams` class in common types to prevent query parameters while using `transformQuery`
- update product-, order- and cartFactory to include sales channels if provided
- remove `packages/medusa/src/controllers/products/admin-list-products.ts`
**Testing**
- expands sales channel for single order
- expands sales channels for orders with expand parameter
- returns single product with sales channel
- expands sales channels for products with expand parameter
- returns cart with sales channel for single cart
Fixes CORE-293
Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
**What**
- Add `feature_flags` string array to store response
**Why**
- to provide conditional ui in admin corresponding to enabled features
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
* fix: return prices when lsiting products with a query
* add: integration test
* fix: integration test
* fix: move WithRequiredProperty to common.ts
* fix: comment
* feat(medusa): Add /admin/products/:id/variants end point
* test(medusa): Fix get-variants test casees
* feat(medusa): Include the config to the ProdutService#retrieveVariants as a method parameter
* feat(medusa): Improve get-variants endpoint
* feat(medusa): Improve get-variants endpoint
* test(medusa): Fix unit tests
* test(medusa): Fix unit tests
* feat(medusa): Improve typings
* feat(medusa): Update according to feedback
* feat(medusa): Update according to feedback
* test(medusa): Fix list-variants tests
* feat(medusa): Getting the variants from the product end point should use the productVariantService
* fix(medusa): list-variants expand possibly undefined
* Fix(medusa): List-variants endpoint
* fix(medusa): Tests suite for list-variant
* test(integration-tests): Fix yarn lock
* test(integration-tests): Fix yarn lock
* add customer groups to price list factory
* add integration test for filtering price lists by customer group
* normalize list price list query
* add customer groups to list-price-list queryparameters
* query based on customergroups if they exist for price lists
* remove verbose flag
* add another price list with a customer group
* remove console.log
* pr feedback
* add query type to repository
* add query type to repository
* set groups to undefined instead of deleting parameter
* remove wildcard destructing
* make buildQuery type specific to price lists
* steal Adriens types
* fix(medusa): support searching for price lists (#1407)
* delete instead of settting groups to undefined
* add groups to query with q
* use simple customer group factory instead of manual creation
* Update simple-customer-group-factory.ts
* remove comma that breaks integration-tests
Co-authored-by: Zakaria El Asri <33696020+zakariaelas@users.noreply.github.com>
* feat: add product list for price lists
* feat: add product list for price lists
* refactor: product list controller
* fix: add integration test for price list products
* fix: use getListConfig