feat: refactor module joiner config and links generation (#7859)
* feat: refactor module joiner config and links generation * improve typings * WIP * WIP * WIP * rename type file * create link config * finish typings and add utils * improve links * WIP typings * finalize ExportModule utils * finalize ExportModule utils * fix: dml tests * improve and fixes * simplify typings with id changes * add toJSON * multiple fixes and entity builder fixes * fix currency searchable * fix tests * medusa service refactoring * cleanup * cleanup and fixes * make module name optional * renaming --------- Co-authored-by: Harminder Virk <virk.officials@gmail.com>
This commit is contained in:
co-authored by
Harminder Virk
parent
5aa62e59e4
commit
617a5972bf
@@ -8,9 +8,10 @@ type InjectedDependencies = {
|
||||
inventoryLevelRepository: InventoryLevelRepository
|
||||
}
|
||||
|
||||
export default class InventoryLevelService extends ModulesSdkUtils.MedusaInternalService<InjectedDependencies>(
|
||||
export default class InventoryLevelService extends ModulesSdkUtils.MedusaInternalService<
|
||||
InjectedDependencies,
|
||||
InventoryLevel
|
||||
)<InventoryLevel> {
|
||||
>(InventoryLevel) {
|
||||
protected readonly inventoryLevelRepository: InventoryLevelRepository
|
||||
|
||||
constructor(container: InjectedDependencies) {
|
||||
|
||||
@@ -11,22 +11,22 @@ import {
|
||||
} from "@medusajs/types"
|
||||
import { IInventoryService } from "@medusajs/types/dist/inventory"
|
||||
import {
|
||||
arrayDifference,
|
||||
CommonEvents,
|
||||
EmitEvents,
|
||||
InjectManager,
|
||||
InjectTransactionManager,
|
||||
InventoryEvents,
|
||||
isDefined,
|
||||
isString,
|
||||
MedusaContext,
|
||||
MedusaError,
|
||||
MedusaService,
|
||||
arrayDifference,
|
||||
isDefined,
|
||||
isString,
|
||||
partitionArray,
|
||||
promiseAll,
|
||||
} from "@medusajs/utils"
|
||||
import { InventoryItem, InventoryLevel, ReservationItem } from "@models"
|
||||
import { entityNameToLinkableKeysMap, joinerConfig } from "../joiner-config"
|
||||
import { joinerConfig } from "../joiner-config"
|
||||
import InventoryLevelService from "./inventory-level"
|
||||
|
||||
type InjectedDependencies = {
|
||||
@@ -47,14 +47,11 @@ export default class InventoryModuleService
|
||||
ReservationItem: {
|
||||
dto: InventoryTypes.ReservationItemDTO
|
||||
}
|
||||
}>(
|
||||
{
|
||||
InventoryItem,
|
||||
InventoryLevel,
|
||||
ReservationItem,
|
||||
},
|
||||
entityNameToLinkableKeysMap
|
||||
)
|
||||
}>({
|
||||
InventoryItem,
|
||||
InventoryLevel,
|
||||
ReservationItem,
|
||||
})
|
||||
implements IInventoryService
|
||||
{
|
||||
protected baseRepository_: DAL.RepositoryService
|
||||
|
||||
Reference in New Issue
Block a user