feat(medusa): Allow to query order/product by SC (#1867)

**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
This commit is contained in:
Adrien de Peretti
2022-07-19 16:54:20 +00:00
committed by GitHub
parent 0e5f0d8cd6
commit 110c995a6a
11 changed files with 168 additions and 96 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ export class Product extends SoftDeletableEntity {
metadata: Record<string, unknown> | null
@FeatureFlagDecorators("sales_channels", [
ManyToMany(() => SalesChannel, { cascade: true }),
ManyToMany(() => SalesChannel, { cascade: ["remove", "soft-remove"] }),
JoinTable({
name: "product_sales_channel",
joinColumn: {