chore: Internal medusa service proper typings with DML (#7792)

This commit is contained in:
Adrien de Peretti
2024-06-21 12:36:54 +02:00
committed by GitHub
parent 944051a951
commit 90e6ca0e9e
29 changed files with 198 additions and 142 deletions
@@ -8,11 +8,9 @@ type InjectedDependencies = {
inventoryLevelRepository: InventoryLevelRepository
}
export default class InventoryLevelService<
TEntity extends InventoryLevel = InventoryLevel
> extends ModulesSdkUtils.MedusaInternalService<InjectedDependencies>(
export default class InventoryLevelService extends ModulesSdkUtils.MedusaInternalService<InjectedDependencies>(
InventoryLevel
)<TEntity> {
)<InventoryLevel> {
protected readonly inventoryLevelRepository: InventoryLevelRepository
constructor(container: InjectedDependencies) {
@@ -30,7 +30,7 @@ import { IInventoryService } from "@medusajs/types/dist/inventory"
type InjectedDependencies = {
baseRepository: DAL.RepositoryService
inventoryItemService: ModulesSdkTypes.IMedusaInternalService<any>
inventoryLevelService: InventoryLevelService<any>
inventoryLevelService: InventoryLevelService
reservationItemService: ModulesSdkTypes.IMedusaInternalService<any>
}
@@ -59,7 +59,7 @@ export default class InventoryModuleService
protected readonly inventoryItemService_: ModulesSdkTypes.IMedusaInternalService<InventoryItem>
protected readonly reservationItemService_: ModulesSdkTypes.IMedusaInternalService<ReservationItem>
protected readonly inventoryLevelService_: InventoryLevelService<InventoryLevel>
protected readonly inventoryLevelService_: InventoryLevelService
constructor(
{