fix(medusa): use correct request and response types for batch location levels route (#11055)

Use HTTP types for request / response types of the new batch location levels route
This commit is contained in:
Shahed Nasser
2025-01-20 17:03:07 +00:00
committed by GitHub
parent 24a952a83a
commit 45b47bf813
4 changed files with 30 additions and 3 deletions
@@ -104,9 +104,25 @@ export interface AdminBatchUpdateInventoryItemsLocationLevels
id?: string
}
/**
* A list of inventory levels to create, update, or delete.
*/
export interface AdminBatchInventoryItemsLocationLevels {
/**
* The inventory levels to create.
*/
create: AdminBatchCreateInventoryItemsLocationLevels[]
/**
* The inventory levels to update.
*/
update: AdminBatchUpdateInventoryItemsLocationLevels[]
/**
* The IDs of the inventory levels to delete.
*/
delete: string[]
/**
* If enabled, the inventory levels will be deleted
* even if they have stocked quantity.
*/
force?: boolean
}
@@ -15,6 +15,9 @@ export type AdminInventoryLevelListResponse = PaginatedResponse<{
inventory_levels: InventoryLevel[]
}>
/**
* The result of creating, updating or deleting inventory levels.
*/
export interface AdminBatchInventoryItemLocationLevelsResponse {
/**
* The created inventory levels.
@@ -30,5 +33,8 @@ export interface AdminBatchInventoryItemLocationLevelsResponse {
deleted?: string[]
}
/**
* The result of creating, updating or deleting inventory levels.
*/
export interface AdminBatchInventoryItemsLocationLevelsResponse
extends AdminBatchInventoryItemLocationLevelsResponse {}