chore(medusa,types): [10] Add request types to API routes (#8567)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { DeleteResponse, PaginatedResponse } from "../../common"
|
||||
import { AdminPrice } from "../../pricing"
|
||||
import { AdminPriceList } from "./entities"
|
||||
|
||||
export interface AdminPriceListResponse {
|
||||
@@ -12,3 +13,13 @@ export interface AdminPriceListListResponse
|
||||
|
||||
export interface AdminPriceListDeleteResponse
|
||||
extends DeleteResponse<"price_list"> {}
|
||||
|
||||
export interface AdminPriceListBatchResponse {
|
||||
created: AdminPrice[]
|
||||
updated: AdminPrice[]
|
||||
deleted: {
|
||||
ids: string[]
|
||||
object: "price"
|
||||
deleted: boolean
|
||||
}
|
||||
}
|
||||
@@ -29,3 +29,11 @@ export interface AdminProduct
|
||||
tags?: AdminProductTag[] | null
|
||||
}
|
||||
export type AdminProductStatus = ProductStatus
|
||||
export interface AdminProductVariantInventoryLink {
|
||||
productService: {
|
||||
variant_id: string
|
||||
}
|
||||
inventoryService: {
|
||||
inventory_item_id: string
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
AdminProduct,
|
||||
AdminProductOption,
|
||||
AdminProductVariant,
|
||||
AdminProductVariantInventoryLink,
|
||||
} from "./entitites"
|
||||
import { AdminInventoryItem } from "../../inventory"
|
||||
|
||||
@@ -59,3 +60,18 @@ export type AdminProductOptionListResponse = PaginatedResponse<{
|
||||
|
||||
export interface AdminProductOptionDeleteResponse
|
||||
extends DeleteResponse<"product_option", AdminProduct> {}
|
||||
|
||||
export type AdminProductVariantInventoryResponse = AdminProductVariantInventoryLink | AdminProductVariantInventoryLink[]
|
||||
|
||||
export interface AdminProductVariantInventoryBatchResponse {
|
||||
created: AdminProductVariantInventoryResponse
|
||||
updated: AdminProductVariantInventoryResponse
|
||||
deleted: AdminProductVariantInventoryResponse
|
||||
}
|
||||
|
||||
export interface AdminProductVariantInventoryLinkDeleteResponse {
|
||||
id: AdminProductVariantInventoryLink
|
||||
object: "variant-inventory-item-link"
|
||||
deleted: boolean
|
||||
parent: AdminProductVariant
|
||||
}
|
||||
Reference in New Issue
Block a user