chore: price list prices of a product can be deleted (#7700)
This commit is contained in:
@@ -2,8 +2,10 @@ import { Client } from "../client"
|
||||
import { Customer } from "./customer"
|
||||
import { Fulfillment } from "./fulfillment"
|
||||
import { FulfillmentSet } from "./fulfillment-set"
|
||||
import { InventoryItem } from "./inventory-item"
|
||||
import { Invite } from "./invite"
|
||||
import { Order } from "./order"
|
||||
import { PriceList } from "./price-list"
|
||||
import { Product } from "./product"
|
||||
import { ProductCategory } from "./product-category"
|
||||
import { ProductCollection } from "./product-collection"
|
||||
@@ -15,13 +17,13 @@ import { StockLocation } from "./stock-location"
|
||||
import { TaxRate } from "./tax-rate"
|
||||
import { TaxRegion } from "./tax-region"
|
||||
import { Upload } from "./upload"
|
||||
import { InventoryItem } from "./inventory-item"
|
||||
|
||||
export class Admin {
|
||||
public invite: Invite
|
||||
public customer: Customer
|
||||
public productCollection: ProductCollection
|
||||
public productCategory: ProductCategory
|
||||
public priceList: PriceList
|
||||
public product: Product
|
||||
public upload: Upload
|
||||
public region: Region
|
||||
@@ -41,6 +43,7 @@ export class Admin {
|
||||
this.customer = new Customer(client)
|
||||
this.productCollection = new ProductCollection(client)
|
||||
this.productCategory = new ProductCategory(client)
|
||||
this.priceList = new PriceList(client)
|
||||
this.product = new Product(client)
|
||||
this.upload = new Upload(client)
|
||||
this.region = new Region(client)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { Client } from "../client"
|
||||
import { ClientHeaders } from "../types"
|
||||
|
||||
export class PriceList {
|
||||
private client: Client
|
||||
|
||||
constructor(client: Client) {
|
||||
this.client = client
|
||||
}
|
||||
|
||||
async linkProducts(
|
||||
id: string,
|
||||
body: HttpTypes.AdminLinkPriceListProducts,
|
||||
query?: HttpTypes.AdminPriceListParams,
|
||||
headers?: ClientHeaders
|
||||
) {
|
||||
return this.client.fetch<HttpTypes.AdminPriceListResponse>(
|
||||
`/admin/price-lists/${id}/products`,
|
||||
{
|
||||
method: "POST",
|
||||
headers,
|
||||
body,
|
||||
query,
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user