Chore/rm main entity concept (#7709)
**What** Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate. This pr also includes various fixes in different modules Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Stevche Radevski
Oli Juhl
parent
2895ccfba8
commit
48963f55ef
@@ -1,8 +1,7 @@
|
||||
import { ModuleRegistrationName, Modules } from "@medusajs/modules-sdk"
|
||||
import {
|
||||
IFulfillmentModuleService,
|
||||
ISalesChannelModuleService,
|
||||
IStockLocationServiceNext,
|
||||
IStockLocationService,
|
||||
} from "@medusajs/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
@@ -20,8 +19,7 @@ medusaIntegrationTestRunner({
|
||||
describe("FulfillmentSet and Location", () => {
|
||||
let appContainer
|
||||
let fulfillmentModule: IFulfillmentModuleService
|
||||
let locationModule: IStockLocationServiceNext
|
||||
let scService: ISalesChannelModuleService
|
||||
let locationModule: IStockLocationService
|
||||
let remoteQuery
|
||||
let remoteLink
|
||||
|
||||
@@ -33,7 +31,6 @@ medusaIntegrationTestRunner({
|
||||
locationModule = appContainer.resolve(
|
||||
ModuleRegistrationName.STOCK_LOCATION
|
||||
)
|
||||
scService = appContainer.resolve(ModuleRegistrationName.SALES_CHANNEL)
|
||||
remoteQuery = appContainer.resolve(
|
||||
ContainerRegistrationKeys.REMOTE_QUERY
|
||||
)
|
||||
@@ -41,12 +38,12 @@ medusaIntegrationTestRunner({
|
||||
})
|
||||
|
||||
it("should query fulfillment set and location link with remote query", async () => {
|
||||
const fulfillmentSet = await fulfillmentModule.create({
|
||||
const fulfillmentSet = await fulfillmentModule.createFulfillmentSets({
|
||||
name: "Test fulfillment set",
|
||||
type: "delivery",
|
||||
})
|
||||
|
||||
const euWarehouse = await locationModule.create({
|
||||
const euWarehouse = await locationModule.createStockLocations({
|
||||
name: "EU Warehouse",
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user