Feat(admin-next, core-flows, link-modules, medusa, types): Inventory end to end flows (#7020)
* add reservation endpoints * add changeset * initial * add reservations table * add edit-item modal * udpate inventory item attributes * manage locations skeleton * add combi batch endpoint * cleanup * fix manage locations * add adjust inventory * prep for pr * update versions * fix for pr * fix for pr * cleanup * Update packages/core-flows/src/inventory/workflows/bulk-create-delete-levels.ts Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com> * Update packages/core-flows/src/inventory/steps/delete-levels-by-item-and-location.ts Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com> * rm wack import * fix build --------- Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
co-authored by
Carlos R. L. Rodrigues
parent
276278cbe7
commit
ab7ff64c4a
@@ -1,6 +1,7 @@
|
||||
export * from "./api-key"
|
||||
export * from "./customer"
|
||||
export * from "./fulfillment"
|
||||
export * from "./inventory"
|
||||
export * from "./pricing"
|
||||
export * from "./sales-channel"
|
||||
export * from "./stock-locations"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./inventory"
|
||||
export * from "./inventory-level"
|
||||
@@ -0,0 +1,26 @@
|
||||
import { AdminInventoryItemResponse } from "./inventory"
|
||||
import { PaginatedResponse } from "../common"
|
||||
|
||||
interface InventoryLevelResponse {
|
||||
id: string
|
||||
inventory_item_id: string
|
||||
location_id: string
|
||||
stocked_quantity: number
|
||||
reserved_quantity: number
|
||||
available_quantity: number
|
||||
incoming_quantity: number
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface AdminInventoryLevelResponse {
|
||||
inventory_item: AdminInventoryItemResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface AdminInventoryLevelListResponse extends PaginatedResponse {
|
||||
inventory_levels: InventoryLevelResponse[]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { PaginatedResponse } from "../common"
|
||||
|
||||
interface InventoryItemResponse {
|
||||
id: string
|
||||
sku?: string | null
|
||||
origin_country?: string | null
|
||||
hs_code?: string | null
|
||||
requires_shipping: boolean
|
||||
mid_code?: string | null
|
||||
material?: string | null
|
||||
weight?: number | null
|
||||
length?: number | null
|
||||
height?: number | null
|
||||
width?: number | null
|
||||
title?: string | null
|
||||
description?: string | null
|
||||
thumbnail?: string | null
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface AdminInventoryItemResponse {
|
||||
inventory_item: InventoryItemResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface AdminInventoryItemListResponse extends PaginatedResponse {
|
||||
inventory_items: InventoryItemResponse[]
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
import { BaseFilterable, OperatorMap } from "../../dal"
|
||||
|
||||
import { NumericalComparisonOperator } from "../../common"
|
||||
|
||||
/**
|
||||
* The inventory level details.
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ export interface CreateInventoryLevelInput {
|
||||
/**
|
||||
* The stocked quantity of the associated inventory item in the associated location.
|
||||
*/
|
||||
stocked_quantity: number
|
||||
stocked_quantity?: number
|
||||
/**
|
||||
* The reserved quantity of the associated inventory item in the associated location.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user