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
+4
-4
@@ -1,4 +1,4 @@
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
import {ModuleRegistrationName} from "@medusajs/modules-sdk"
|
||||
import {
|
||||
BatchWorkflowInput,
|
||||
CreateShippingOptionRuleDTO,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
ShippingProfileDTO,
|
||||
UpdateShippingOptionRuleDTO,
|
||||
} from "@medusajs/types"
|
||||
import { medusaIntegrationTestRunner } from "medusa-test-utils/dist"
|
||||
import {medusaIntegrationTestRunner} from "medusa-test-utils/dist"
|
||||
import {
|
||||
batchShippingOptionRulesWorkflow,
|
||||
createShippingOptionsWorkflow,
|
||||
@@ -35,7 +35,7 @@ async function createShippingOptionFixture({
|
||||
ModuleRegistrationName.REGION
|
||||
) as IRegionModuleService
|
||||
|
||||
const [region] = await regionService.create([
|
||||
const [region] = await regionService.createRegions([
|
||||
{
|
||||
name: "Test region",
|
||||
currency_code: "eur",
|
||||
@@ -136,7 +136,7 @@ medusaIntegrationTestRunner({
|
||||
type: "default",
|
||||
})
|
||||
|
||||
fulfillmentSet = await service.create({
|
||||
fulfillmentSet = await service.createFulfillmentSets({
|
||||
name: "Test fulfillment set",
|
||||
type: "manual_test",
|
||||
})
|
||||
|
||||
+3
-3
@@ -42,7 +42,7 @@ medusaIntegrationTestRunner({
|
||||
type: "default",
|
||||
})
|
||||
|
||||
fulfillmentSet = await service.create({
|
||||
fulfillmentSet = await service.createFulfillmentSets({
|
||||
name: "Test fulfillment set",
|
||||
type: "manual_test",
|
||||
})
|
||||
@@ -64,7 +64,7 @@ medusaIntegrationTestRunner({
|
||||
ModuleRegistrationName.REGION
|
||||
) as IRegionModuleService
|
||||
|
||||
const [region] = await regionService.create([
|
||||
const [region] = await regionService.createRegions([
|
||||
{
|
||||
name: "Test region",
|
||||
currency_code: "eur",
|
||||
@@ -180,7 +180,7 @@ medusaIntegrationTestRunner({
|
||||
ModuleRegistrationName.REGION
|
||||
) as IRegionModuleService
|
||||
|
||||
const [region] = await regionService.create([
|
||||
const [region] = await regionService.createRegions([
|
||||
{
|
||||
name: "Test region",
|
||||
currency_code: "eur",
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ medusaIntegrationTestRunner({
|
||||
type: "default",
|
||||
})
|
||||
|
||||
fulfillmentSet = await service.create({
|
||||
fulfillmentSet = await service.createFulfillmentSets({
|
||||
name: "Test fulfillment set",
|
||||
type: "manual_test",
|
||||
})
|
||||
@@ -67,7 +67,7 @@ medusaIntegrationTestRunner({
|
||||
ModuleRegistrationName.REGION
|
||||
) as IRegionModuleService
|
||||
|
||||
const [region] = await regionService.create([
|
||||
const [region] = await regionService.createRegions([
|
||||
{
|
||||
name: "Test region",
|
||||
currency_code: "eur",
|
||||
@@ -150,7 +150,7 @@ medusaIntegrationTestRunner({
|
||||
ModuleRegistrationName.REGION
|
||||
) as IRegionModuleService
|
||||
|
||||
const [region] = await regionService.create([
|
||||
const [region] = await regionService.createRegions([
|
||||
{
|
||||
name: "Test region",
|
||||
currency_code: "eur",
|
||||
|
||||
+3
-3
@@ -46,7 +46,7 @@ medusaIntegrationTestRunner({
|
||||
type: "default",
|
||||
})
|
||||
|
||||
fulfillmentSet = await service.create({
|
||||
fulfillmentSet = await service.createFulfillmentSets({
|
||||
name: "Test fulfillment set",
|
||||
type: "manual_test",
|
||||
})
|
||||
@@ -68,7 +68,7 @@ medusaIntegrationTestRunner({
|
||||
ModuleRegistrationName.REGION
|
||||
) as IRegionModuleService
|
||||
|
||||
const [region] = await regionService.create([
|
||||
const [region] = await regionService.createRegions([
|
||||
{
|
||||
name: "Test region",
|
||||
currency_code: "eur",
|
||||
@@ -233,7 +233,7 @@ medusaIntegrationTestRunner({
|
||||
ModuleRegistrationName.REGION
|
||||
) as IRegionModuleService
|
||||
|
||||
const [region] = await regionService.create([
|
||||
const [region] = await regionService.createRegions([
|
||||
{
|
||||
name: "Test region",
|
||||
currency_code: "eur",
|
||||
|
||||
Reference in New Issue
Block a user