Chore(medusa,utils,types,inventory,stock-location): remove core dependency modules (#3531)
This commit is contained in:
@@ -7,7 +7,6 @@ export * from "./notification-service"
|
||||
export * from "./payment-processor"
|
||||
export * from "./payment-service"
|
||||
export * from "./price-selection-strategy"
|
||||
export * from "./services"
|
||||
export * from "./tax-calculation-strategy"
|
||||
export * from "./tax-service"
|
||||
export * from "./transaction-base-service"
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
export interface ICacheService {
|
||||
get<T>(key: string): Promise<T | null>
|
||||
|
||||
set(key: string, data: unknown, ttl?: number): Promise<void>
|
||||
|
||||
invalidate(key: string): Promise<void>
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export * from "./cache"
|
||||
export * from "./inventory"
|
||||
export * from "./stock-location"
|
||||
@@ -1,114 +0,0 @@
|
||||
import { FindConfig } from "../../types/common"
|
||||
|
||||
import {
|
||||
InventoryItemDTO,
|
||||
ReservationItemDTO,
|
||||
InventoryLevelDTO,
|
||||
FilterableInventoryItemProps,
|
||||
CreateInventoryItemInput,
|
||||
CreateReservationItemInput,
|
||||
FilterableInventoryLevelProps,
|
||||
FilterableReservationItemProps,
|
||||
CreateInventoryLevelInput,
|
||||
UpdateInventoryLevelInput,
|
||||
UpdateReservationItemInput,
|
||||
} from "../../types/inventory"
|
||||
|
||||
export interface IInventoryService {
|
||||
listInventoryItems(
|
||||
selector: FilterableInventoryItemProps,
|
||||
config?: FindConfig<InventoryItemDTO>
|
||||
): Promise<[InventoryItemDTO[], number]>
|
||||
|
||||
listReservationItems(
|
||||
selector: FilterableReservationItemProps,
|
||||
config?: FindConfig<ReservationItemDTO>
|
||||
): Promise<[ReservationItemDTO[], number]>
|
||||
|
||||
listInventoryLevels(
|
||||
selector: FilterableInventoryLevelProps,
|
||||
config?: FindConfig<InventoryLevelDTO>
|
||||
): Promise<[InventoryLevelDTO[], number]>
|
||||
|
||||
retrieveInventoryItem(
|
||||
inventoryItemId: string,
|
||||
config?: FindConfig<InventoryItemDTO>
|
||||
): Promise<InventoryItemDTO>
|
||||
|
||||
retrieveInventoryLevel(
|
||||
inventoryItemId: string,
|
||||
locationId: string
|
||||
): Promise<InventoryLevelDTO>
|
||||
|
||||
retrieveReservationItem(reservationId: string): Promise<ReservationItemDTO>
|
||||
|
||||
createReservationItem(
|
||||
input: CreateReservationItemInput
|
||||
): Promise<ReservationItemDTO>
|
||||
|
||||
createInventoryItem(
|
||||
input: CreateInventoryItemInput
|
||||
): Promise<InventoryItemDTO>
|
||||
|
||||
createInventoryLevel(
|
||||
data: CreateInventoryLevelInput
|
||||
): Promise<InventoryLevelDTO>
|
||||
|
||||
updateInventoryLevel(
|
||||
inventoryItemId: string,
|
||||
locationId: string,
|
||||
update: UpdateInventoryLevelInput
|
||||
): Promise<InventoryLevelDTO>
|
||||
|
||||
updateInventoryItem(
|
||||
inventoryItemId: string,
|
||||
input: CreateInventoryItemInput
|
||||
): Promise<InventoryItemDTO>
|
||||
|
||||
updateReservationItem(
|
||||
reservationItemId: string,
|
||||
input: UpdateReservationItemInput
|
||||
): Promise<ReservationItemDTO>
|
||||
|
||||
deleteReservationItemsByLineItem(lineItemId: string): Promise<void>
|
||||
|
||||
deleteReservationItem(reservationItemId: string | string[]): Promise<void>
|
||||
|
||||
deleteInventoryItem(inventoryItemId: string): Promise<void>
|
||||
|
||||
deleteInventoryItemLevelByLocationId(locationId: string): Promise<void>
|
||||
|
||||
deleteReservationItemByLocationId(locationId: string): Promise<void>
|
||||
|
||||
deleteInventoryLevel(
|
||||
inventoryLevelId: string,
|
||||
locationId: string
|
||||
): Promise<void>
|
||||
|
||||
adjustInventory(
|
||||
inventoryItemId: string,
|
||||
locationId: string,
|
||||
adjustment: number
|
||||
): Promise<InventoryLevelDTO>
|
||||
|
||||
confirmInventory(
|
||||
inventoryItemId: string,
|
||||
locationIds: string[],
|
||||
quantity: number
|
||||
): Promise<boolean>
|
||||
|
||||
retrieveAvailableQuantity(
|
||||
inventoryItemId: string,
|
||||
locationIds: string[]
|
||||
): Promise<number>
|
||||
|
||||
retrieveStockedQuantity(
|
||||
inventoryItemId: string,
|
||||
locationIds: string[]
|
||||
): Promise<number>
|
||||
|
||||
retrieveReservedQuantity(
|
||||
inventoryItemId: string,
|
||||
locationIds: string[]
|
||||
): Promise<number>
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import { FindConfig } from "../../types/common"
|
||||
import {
|
||||
CreateStockLocationInput,
|
||||
FilterableStockLocationProps,
|
||||
StockLocationDTO,
|
||||
UpdateStockLocationInput,
|
||||
} from "../../types/stock-location"
|
||||
|
||||
export interface IStockLocationService {
|
||||
list(
|
||||
selector: FilterableStockLocationProps,
|
||||
config?: FindConfig<StockLocationDTO>
|
||||
): Promise<StockLocationDTO[]>
|
||||
|
||||
listAndCount(
|
||||
selector: FilterableStockLocationProps,
|
||||
config?: FindConfig<StockLocationDTO>
|
||||
): Promise<[StockLocationDTO[], number]>
|
||||
|
||||
retrieve(
|
||||
id: string,
|
||||
config?: FindConfig<StockLocationDTO>
|
||||
): Promise<StockLocationDTO>
|
||||
|
||||
create(input: CreateStockLocationInput): Promise<StockLocationDTO>
|
||||
|
||||
update(id: string, input: UpdateStockLocationInput): Promise<StockLocationDTO>
|
||||
|
||||
delete(id: string): Promise<void>
|
||||
}
|
||||
Reference in New Issue
Block a user