diff --git a/www/apps/book/app/basics/commerce-modules/page.mdx b/www/apps/book/app/basics/commerce-modules/page.mdx index 90865c42e175d..3d744abbb5c02 100644 --- a/www/apps/book/app/basics/commerce-modules/page.mdx +++ b/www/apps/book/app/basics/commerce-modules/page.mdx @@ -48,6 +48,6 @@ When you resolve the `ModuleRegistrationName.PRODUCT` (or `productModuleService` -To resolve the main service of any commerce module, use the registration name defined in the `ModuleRegistrationName` enum imported from `@medusajs/modules-sdk`. +To resolve the main service of any commerce module, use the registration name defined in the `ModuleRegistrationName` enum imported from `@medusajs/utils`. diff --git a/www/apps/book/app/basics/events-and-subscribers/page.mdx b/www/apps/book/app/basics/events-and-subscribers/page.mdx index b09278cbd6468..6c38a7f3d3367 100644 --- a/www/apps/book/app/basics/events-and-subscribers/page.mdx +++ b/www/apps/book/app/basics/events-and-subscribers/page.mdx @@ -83,7 +83,7 @@ For example: export const highlights = [ ["7", "container", "Recieve the Medusa Container in the object parameter."], ["10", "resolve", "Resolve the Product Module's main service."], - ["10", "ModuleRegistrationName.PRODUCT", "The module's registration name imported from `@medusajs/modules-sdk`."] + ["10", "ModuleRegistrationName.PRODUCT", "The module's registration name imported from `@medusajs/utils`."] ] ```ts title="src/subscribers/product-created.ts" highlights={highlights} diff --git a/www/apps/book/app/basics/medusa-container/page.mdx b/www/apps/book/app/basics/medusa-container/page.mdx index cede456b466ac..8fa9a62c07bd7 100644 --- a/www/apps/book/app/basics/medusa-container/page.mdx +++ b/www/apps/book/app/basics/medusa-container/page.mdx @@ -19,7 +19,7 @@ export const highlights = [ [ "10", "ModuleRegistrationName.PRODUCT", - "The resource registration name imported from `@medusajs/modules-sdk`.", + "The resource registration name imported from `@medusajs/utils`.", ], ] diff --git a/www/apps/book/app/basics/scheduled-jobs/page.mdx b/www/apps/book/app/basics/scheduled-jobs/page.mdx index 87849e847a779..b7f941cfcaef5 100644 --- a/www/apps/book/app/basics/scheduled-jobs/page.mdx +++ b/www/apps/book/app/basics/scheduled-jobs/page.mdx @@ -87,7 +87,7 @@ For example: export const highlights = [ ["11", "resolve", "Resolve the Product Module's main service."], - ["11", "ModuleRegistrationName.PRODUCT", "The module's registration name imported from `@medusajs/modules-sdk`."] + ["11", "ModuleRegistrationName.PRODUCT", "The module's registration name imported from `@medusajs/utils`."] ] ```ts title="src/jobs/hello-world.ts" highlights={highlights} diff --git a/www/apps/book/app/basics/workflows/page.mdx b/www/apps/book/app/basics/workflows/page.mdx index b5bb6228696c8..879a5d57e8664 100644 --- a/www/apps/book/app/basics/workflows/page.mdx +++ b/www/apps/book/app/basics/workflows/page.mdx @@ -230,7 +230,7 @@ export const highlights = [ [ "12", "ModuleRegistrationName.PRODUCT", - "The resource registration name imported from `@medusajs/modules-sdk`.", + "The resource registration name imported from `@medusajs/utils`.", ], ] diff --git a/www/apps/resources/app/commerce-modules/api-key/page.mdx b/www/apps/resources/app/commerce-modules/api-key/page.mdx index 457485bb62fe6..5f8c022b2183a 100644 --- a/www/apps/resources/app/commerce-modules/api-key/page.mdx +++ b/www/apps/resources/app/commerce-modules/api-key/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/auth/page.mdx b/www/apps/resources/app/commerce-modules/auth/page.mdx index d8ec0585047b7..56e0a4637ed90 100644 --- a/www/apps/resources/app/commerce-modules/auth/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/page.mdx @@ -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( diff --git a/www/apps/resources/app/commerce-modules/cart/page.mdx b/www/apps/resources/app/commerce-modules/cart/page.mdx index 162e5c26d405d..5ac8c82c6c327 100644 --- a/www/apps/resources/app/commerce-modules/cart/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/currency/page.mdx b/www/apps/resources/app/commerce-modules/currency/page.mdx index fc2603fb26c34..d881e42886481 100644 --- a/www/apps/resources/app/commerce-modules/currency/page.mdx +++ b/www/apps/resources/app/commerce-modules/currency/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/customer/page.mdx b/www/apps/resources/app/commerce-modules/customer/page.mdx index 418d29e91973f..01626034ad366 100644 --- a/www/apps/resources/app/commerce-modules/customer/page.mdx +++ b/www/apps/resources/app/commerce-modules/customer/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/fulfillment/page.mdx b/www/apps/resources/app/commerce-modules/fulfillment/page.mdx index 8c9b9275c38ac..7e06eff731fb9 100644 --- a/www/apps/resources/app/commerce-modules/fulfillment/page.mdx +++ b/www/apps/resources/app/commerce-modules/fulfillment/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/inventory/page.mdx b/www/apps/resources/app/commerce-modules/inventory/page.mdx index 793815a5ec384..059fcc4d89679 100644 --- a/www/apps/resources/app/commerce-modules/inventory/page.mdx +++ b/www/apps/resources/app/commerce-modules/inventory/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/order/page.mdx b/www/apps/resources/app/commerce-modules/order/page.mdx index d3be76aab91e5..b17fc7a9124c7 100644 --- a/www/apps/resources/app/commerce-modules/order/page.mdx +++ b/www/apps/resources/app/commerce-modules/order/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/payment/page.mdx b/www/apps/resources/app/commerce-modules/payment/page.mdx index b315f8f977679..9eaf2bace114f 100644 --- a/www/apps/resources/app/commerce-modules/payment/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/pricing/page.mdx b/www/apps/resources/app/commerce-modules/pricing/page.mdx index d922fd8ad1f3c..01f35637cd862 100644 --- a/www/apps/resources/app/commerce-modules/pricing/page.mdx +++ b/www/apps/resources/app/commerce-modules/pricing/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/product/page.mdx b/www/apps/resources/app/commerce-modules/product/page.mdx index ee740c07c744e..2938b25ff0a8f 100644 --- a/www/apps/resources/app/commerce-modules/product/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/promotion/page.mdx b/www/apps/resources/app/commerce-modules/promotion/page.mdx index f261789ddd714..5f5f3bd8cd331 100644 --- a/www/apps/resources/app/commerce-modules/promotion/page.mdx +++ b/www/apps/resources/app/commerce-modules/promotion/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/region/page.mdx b/www/apps/resources/app/commerce-modules/region/page.mdx index 60cae41d85f66..15061fdf8c276 100644 --- a/www/apps/resources/app/commerce-modules/region/page.mdx +++ b/www/apps/resources/app/commerce-modules/region/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/sales-channel/page.mdx b/www/apps/resources/app/commerce-modules/sales-channel/page.mdx index 71543e5edb1dd..5aab8825a635d 100644 --- a/www/apps/resources/app/commerce-modules/sales-channel/page.mdx +++ b/www/apps/resources/app/commerce-modules/sales-channel/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/stock-location/page.mdx b/www/apps/resources/app/commerce-modules/stock-location/page.mdx index c462567a46f21..6f22c69a2c5e4 100644 --- a/www/apps/resources/app/commerce-modules/stock-location/page.mdx +++ b/www/apps/resources/app/commerce-modules/stock-location/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/store/page.mdx b/www/apps/resources/app/commerce-modules/store/page.mdx index 46ace11b10efb..556b3301afa80 100644 --- a/www/apps/resources/app/commerce-modules/store/page.mdx +++ b/www/apps/resources/app/commerce-modules/store/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/tax/page.mdx b/www/apps/resources/app/commerce-modules/tax/page.mdx index 7c503d7c5872f..98a313611e2fe 100644 --- a/www/apps/resources/app/commerce-modules/tax/page.mdx +++ b/www/apps/resources/app/commerce-modules/tax/page.mdx @@ -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: diff --git a/www/apps/resources/app/commerce-modules/user/page.mdx b/www/apps/resources/app/commerce-modules/user/page.mdx index 46c49802f718b..1534787f10648 100644 --- a/www/apps/resources/app/commerce-modules/user/page.mdx +++ b/www/apps/resources/app/commerce-modules/user/page.mdx @@ -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: diff --git a/www/apps/resources/app/medusa-container-resources/page.mdx b/www/apps/resources/app/medusa-container-resources/page.mdx index 1d8dfdaf6ee83..3509f1043f407 100644 --- a/www/apps/resources/app/medusa-container-resources/page.mdx +++ b/www/apps/resources/app/medusa-container-resources/page.mdx @@ -116,7 +116,7 @@ This documentation page includes the list of resources registered in the Medusa - For custom modules, the registration name is the key of the module in the `modules` configuration. - - For Medusa's commerce modules, you can use the `ModuleRegistrationName` enum imported from `@medusajs/modules-sdk`. + - For Medusa's commerce modules, you can use the `ModuleRegistrationName` enum imported from `@medusajs/utils`. diff --git a/www/apps/resources/app/recipes/commerce-automation/page.mdx b/www/apps/resources/app/recipes/commerce-automation/page.mdx index 2fa04e1c370ba..3682b45cf6885 100644 --- a/www/apps/resources/app/recipes/commerce-automation/page.mdx +++ b/www/apps/resources/app/recipes/commerce-automation/page.mdx @@ -475,7 +475,7 @@ export const syncProductsWorkflowHighlight = [ ```ts title="src/workflows/sync-products.ts" highlights={syncProductsWorkflowHighlight} collapsibleLines="1-16" expandButtonLabel="Show Imports" import { ModuleRegistrationName - } from "@medusajs/modules-sdk" + } from "@medusajs/utils" import { IProductModuleService, IStoreModuleService, @@ -786,7 +786,7 @@ The `order.placed` event is currently not emitted. } from "@medusajs/medusa" import { ModuleRegistrationName, - } from "@medusajs/modules-sdk" + } from "@medusajs/utils" import { ICustomerModuleService, IOrderModuleService, @@ -902,7 +902,7 @@ export const newsletterHighlights = [ } from "@medusajs/medusa" import { ModuleRegistrationName, - } from "@medusajs/modules-sdk" + } from "@medusajs/utils" import { ICustomerModuleService, IProductModuleService, diff --git a/www/apps/resources/app/recipes/integrate-ecommerce-stack/page.mdx b/www/apps/resources/app/recipes/integrate-ecommerce-stack/page.mdx index 64a9015b13de6..c0fff34c7ec67 100644 --- a/www/apps/resources/app/recipes/integrate-ecommerce-stack/page.mdx +++ b/www/apps/resources/app/recipes/integrate-ecommerce-stack/page.mdx @@ -319,7 +319,7 @@ For example, suppose an administrator changes the product data in the ERP system } from "@medusajs/types" import { ModuleRegistrationName - } from "@medusajs/modules-sdk" + } from "@medusajs/utils" type WebhookReq = { id: string