docs: fix ModuleRegistrationName import (#8434)

Closes #8433
This commit is contained in:
Viktor Bakurin
2024-08-05 07:24:27 +00:00
committed by GitHub
parent 8cb416e661
commit be8afcaa63
26 changed files with 30 additions and 30 deletions
@@ -76,7 +76,7 @@ const newKey = await apiKeyModuleService.createApiKeys({
## How to Use API Key Module's Service
You can use the API Key Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.API_KEY` imported from `@medusajs/modules-sdk`.
You can use the API Key Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.API_KEY` imported from `@medusajs/utils`.
For example:
@@ -78,7 +78,7 @@ Refer to [this documentation](./module-options/page.mdx) for details on the modu
## How to Use Auth Module's Service
You can use the Auth Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.AUTH` imported from `@medusajs/modules-sdk`.
You can use the Auth Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.AUTH` imported from `@medusajs/utils`.
For example:
@@ -110,7 +110,7 @@ export async function GET(
```ts title="src/subscribers/custom-handler.ts"
import { SubscriberArgs } from "@medusajs/medusa"
import { IAuthModuleService } from "@medusajs/types"
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
import { ModuleRegistrationName } from "@medusajs/utils"
export default async function subscriberHandler({ container }: SubscriberArgs) {
const authModuleService: IAuthModuleService = container.resolve(
@@ -127,7 +127,7 @@ export default async function subscriberHandler({ container }: SubscriberArgs) {
```ts title="src/workflows/hello-world/step1.ts"
import { createStep } from "@medusajs/workflows-sdk"
import { IAuthModuleService } from "@medusajs/types"
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
import { ModuleRegistrationName } from "@medusajs/utils"
const step1 = createStep("step-1", async (_, { container }) => {
const authModuleService: IAuthModuleService = container.resolve(
@@ -64,7 +64,7 @@ When used with their respective modules and other commerce modules, you benefit
## How to Use Cart Module's Service
You can use the Cart Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.CART` imported from `@medusajs/modules-sdk`.
You can use the Cart Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.CART` imported from `@medusajs/utils`.
For example:
@@ -35,7 +35,7 @@ const currency = await currencyModuleService.retrieveCurrency(
## How to Use Currency Module's Service
You can use the Currency Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.CURRENCY` imported from `@medusajs/modules-sdk`.
You can use the Currency Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.CURRENCY` imported from `@medusajs/utils`.
For example:
@@ -41,7 +41,7 @@ await customerModuleService.addCustomerToGroup({
## How to Use Customer Module's Service
You can use the Customer Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.CUSTOMER` imported from `@medusajs/modules-sdk`.
You can use the Customer Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.CUSTOMER` imported from `@medusajs/utils`.
For example:
@@ -106,7 +106,7 @@ Refer to [this documentation](./module-options/page.mdx) for details on the modu
## How to Use Fulfillment Module's Service
You can use the Fulfillment Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.API_KEY` imported from `@medusajs/modules-sdk`.
You can use the Fulfillment Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.API_KEY` imported from `@medusajs/utils`.
For example:
@@ -68,7 +68,7 @@ const isAvailable = await inventoryModuleService.confirmInventory(
## How to Use Inventory Module's Service
You can use the Inventory Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.INVENTORY` imported from `@medusajs/modules-sdk`.
You can use the Inventory Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.INVENTORY` imported from `@medusajs/utils`.
For example:
@@ -82,7 +82,7 @@ const orderReturn = await orderModuleService.createReturn({
## How to Use Order Module's Service
You can use the Order Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.ORDER` imported from `@medusajs/modules-sdk`.
You can use the Order Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.ORDER` imported from `@medusajs/utils`.
For example:
@@ -73,7 +73,7 @@ Refer to [this documentation](./module-options/page.mdx) for details on the modu
## How to Use Payment Module's Service
You can use the Payment Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.PAYMENT` imported from `@medusajs/modules-sdk`.
You can use the Payment Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.PAYMENT` imported from `@medusajs/utils`.
For example:
@@ -99,7 +99,7 @@ const price = await pricingModuleService.calculatePrices(
## How to Use Pricing Module's Service
You can use the Pricing Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.PRICING` imported from `@medusajs/modules-sdk`.
You can use the Pricing Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.PRICING` imported from `@medusajs/utils`.
For example:
@@ -62,7 +62,7 @@ const products = await productService.updateProducts([
## How to Use Product Module's Service
You can use the Product Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.PRODUCT` imported from `@medusajs/modules-sdk`.
You can use the Product Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.PRODUCT` imported from `@medusajs/utils`.
For example:
@@ -72,7 +72,7 @@ const campaign = await promotionModuleService.createCampaigns({
## How to Use the Promotion Module's Service
You can use the Promotion Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.PROMOTION` imported from `@medusajs/modules-sdk`.
You can use the Promotion Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.PROMOTION` imported from `@medusajs/utils`.
For example:
@@ -69,7 +69,7 @@ const regions = await regionModuleService.createRegions([
## How to Use Region Module's Service
You can use the Region Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.REGION` imported from `@medusajs/modules-sdk`.
You can use the Region Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.REGION` imported from `@medusajs/utils`.
For example:
@@ -53,7 +53,7 @@ Orders are also scoped to a sales channel due to the relation between the Sales
## How to Use Sales Channel Module's Service
You can use the Sales Channel Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.SALES_CHANNEL` imported from `@medusajs/modules-sdk`.
You can use the Sales Channel Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.SALES_CHANNEL` imported from `@medusajs/utils`.
For example:
@@ -40,7 +40,7 @@ const stockLocation = await stockLocationModuleService.updateStockLocations({
## How to Use Stock Location Module's Service
You can use the Stock Location Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.STOCK_LOCATION` imported from `@medusajs/modules-sdk`.
You can use the Stock Location Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.STOCK_LOCATION` imported from `@medusajs/utils`.
For example:
@@ -42,7 +42,7 @@ const stores = await storeModuleService.createStores([
## How to Use Store Module's Service
You can use the Store Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.STORE` imported from `@medusajs/modules-sdk`.
You can use the Store Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.STORE` imported from `@medusajs/utils`.
For example:
@@ -84,7 +84,7 @@ Refer to [this documentation](./module-options/page.mdx) for details on the modu
## How to Use Tax Module's Service
You can use the Tax Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.TAX` imported from `@medusajs/modules-sdk`.
You can use the Tax Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.TAX` imported from `@medusajs/utils`.
For example:
@@ -45,7 +45,7 @@ Refer to [this documentation](./module-options/page.mdx) for details on the modu
## How to Use User Module's Service
You can use the User Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.USER` imported from `@medusajs/modules-sdk`.
You can use the User Module's main service by resolving from the Medusa container the resource `ModuleRegistrationName.USER` imported from `@medusajs/utils`.
For example: