From 2e16949979a509fdbd8ee8a1356b02be5b93cf68 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 1 Oct 2024 12:03:42 +0300 Subject: [PATCH] docs: update imports and package names across docs (#9375) * docs: update imports and package names across docs + reference configs * generate files * fix import * change preview to rc --- .../admin/widgets/page.mdx | 2 +- .../api-routes/additional-data/page.mdx | 6 +- .../api-routes/cors/page.mdx | 4 +- .../api-routes/errors/page.mdx | 6 +- .../api-routes/protected-routes/page.mdx | 8 +- .../custom-cli-scripts/page.mdx | 6 +- .../data-models/configure-properties/page.mdx | 6 +- .../data-models/index/page.mdx | 10 +- .../data-models/infer-type/page.mdx | 6 +- .../data-models/primary-key/page.mdx | 2 +- .../data-models/property-types/page.mdx | 20 +- .../data-models/relationships/page.mdx | 10 +- .../data-models/searchable-property/page.mdx | 2 +- .../emit-event/page.mdx | 6 +- .../modules/container/page.mdx | 2 +- .../modules/module-links/page.mdx | 14 +- .../modules/options/page.mdx | 4 +- .../modules/query/page.mdx | 2 +- .../modules/remote-link/page.mdx | 12 +- .../modules/service-constraints/page.mdx | 2 +- .../modules/service-factory/page.mdx | 4 +- .../workflows/add-workflow-hook/page.mdx | 4 +- .../workflows/compensation-function/page.mdx | 10 +- .../workflows/conditions/page.mdx | 4 +- .../constructor-constraints/page.mdx | 8 +- .../execute-another-workflow/page.mdx | 18 +- .../workflows/long-running-workflow/page.mdx | 14 +- .../workflows/parallel-steps/page.mdx | 4 +- .../workflows/retry-failed-steps/page.mdx | 2 +- .../workflows/variable-manipulation/page.mdx | 6 +- .../workflows/workflow-hooks/page.mdx | 8 +- .../workflows/workflow-timeout/page.mdx | 2 +- .../book/app/basics/commerce-modules/page.mdx | 6 +- www/apps/book/app/basics/data-models/page.mdx | 4 +- .../basics/events-and-subscribers/page.mdx | 6 +- .../book/app/basics/medusa-container/page.mdx | 6 +- .../app/basics/modules-and-services/page.mdx | 4 +- .../book/app/basics/scheduled-jobs/page.mdx | 6 +- www/apps/book/app/basics/workflows/page.mdx | 20 +- .../custom-features/module/page.mdx | 8 +- .../custom-features/workflow/page.mdx | 4 +- .../customize-admin/widget/page.mdx | 2 +- .../extend-models/create-links/page.mdx | 6 +- .../extend-models/define-link/page.mdx | 6 +- .../extend-create-product/page.mdx | 6 +- .../query-linked-records/page.mdx | 2 +- .../integrate-systems/handle-event/page.mdx | 8 +- .../integrate-systems/schedule-task/page.mdx | 20 +- .../integrate-systems/service/page.mdx | 6 +- .../debugging-and-testing/logging/page.mdx | 2 +- .../integration-tests/api-routes/page.mdx | 2 +- .../integration-tests/workflows/page.mdx | 2 +- .../modules-tests/module-example/page.mdx | 2 +- .../testing-tools/modules-tests/page.mdx | 2 +- .../testing-tools/page.mdx | 4 +- www/apps/book/app/page.mdx | 2 +- www/apps/book/generated/edit-dates.mjs | 110 ++++----- .../app/admin-widget-injection-zones/page.mdx | 112 ++++----- .../cache/create/page.mdx | 8 +- .../cache/in-memory/page.mdx | 22 +- .../cache/redis/page.mdx | 22 +- .../event/create/page.mdx | 10 +- .../event/local/page.mdx | 20 +- .../event/redis/page.mdx | 20 +- .../architectural-modules/file/local/page.mdx | 24 +- .../architectural-modules/file/s3/page.mdx | 20 +- .../notification/local/page.mdx | 24 +- .../notification/page.mdx | 6 +- .../notification/send-notification/page.mdx | 4 +- .../notification/sendgrid/page.mdx | 26 +- .../workflow-engine/in-memory/page.mdx | 20 +- .../workflow-engine/redis/page.mdx | 18 +- .../api-key/examples/page.mdx | 30 +-- .../app/commerce-modules/api-key/page.mdx | 18 +- .../auth/auth-providers/emailpass/page.mdx | 8 +- .../auth/auth-providers/github/page.mdx | 16 +- .../auth/auth-providers/google/page.mdx | 16 +- .../auth/create-actor-type/page.mdx | 18 +- .../commerce-modules/auth/examples/page.mdx | 40 +-- .../auth/module-options/page.mdx | 6 +- .../app/commerce-modules/auth/page.mdx | 18 +- .../commerce-modules/cart/examples/page.mdx | 50 ++-- .../app/commerce-modules/cart/page.mdx | 18 +- .../commerce-modules/cart/promotions/page.mdx | 4 +- .../currency/examples/page.mdx | 12 +- .../app/commerce-modules/currency/page.mdx | 18 +- .../customer/examples/page.mdx | 24 +- .../app/commerce-modules/customer/page.mdx | 18 +- .../fulfillment/module-options/page.mdx | 6 +- .../app/commerce-modules/fulfillment/page.mdx | 18 +- .../inventory/examples/page.mdx | 54 ++--- .../app/commerce-modules/inventory/page.mdx | 18 +- .../app/commerce-modules/order/page.mdx | 18 +- .../order/promotion-adjustments/page.mdx | 4 +- .../payment/examples/page.mdx | 36 +-- .../payment/module-options/page.mdx | 6 +- .../app/commerce-modules/payment/page.mdx | 18 +- .../payment/payment-provider/page.mdx | 2 +- .../payment/payment-provider/stripe/page.mdx | 22 +- .../pricing/examples/page.mdx | 40 +-- .../app/commerce-modules/pricing/page.mdx | 18 +- .../product/examples/page.mdx | 36 +-- .../product/guides/price-with-taxes/page.mdx | 12 +- .../product/guides/price/page.mdx | 2 +- .../app/commerce-modules/product/page.mdx | 18 +- .../promotion/examples/page.mdx | 24 +- .../app/commerce-modules/promotion/page.mdx | 18 +- .../commerce-modules/region/examples/page.mdx | 30 +-- .../app/commerce-modules/region/page.mdx | 18 +- .../sales-channel/examples/page.mdx | 30 +-- .../commerce-modules/sales-channel/page.mdx | 18 +- .../stock-location/examples/page.mdx | 24 +- .../commerce-modules/stock-location/page.mdx | 18 +- .../commerce-modules/store/examples/page.mdx | 30 +-- .../app/commerce-modules/store/page.mdx | 18 +- .../commerce-modules/tax/examples/page.mdx | 30 +-- .../tax/module-options/page.mdx | 4 +- .../app/commerce-modules/tax/page.mdx | 18 +- .../commerce-modules/user/examples/page.mdx | 42 ++-- .../user/module-options/page.mdx | 4 +- .../app/commerce-modules/user/page.mdx | 18 +- .../medusa-application/railway/page.mdx | 12 +- .../app/medusa-container-resources/page.mdx | 4 +- .../app/medusa-workflows-reference/page.mdx | 2 +- www/apps/resources/app/recipes/b2b/page.mdx | 18 +- .../app/recipes/commerce-automation/page.mdx | 28 +-- .../examples/standard/page.mdx | 102 ++++---- .../resources/app/recipes/ecommerce/page.mdx | 2 +- .../integrate-ecommerce-stack/page.mdx | 14 +- .../examples/restaurant-delivery/page.mdx | 160 ++++++------ .../marketplace/examples/vendors/page.mdx | 70 +++--- www/apps/resources/app/recipes/pos/page.mdx | 6 +- .../subscriptions/examples/standard/page.mdx | 88 +++---- .../app/storefront-development/tips/page.mdx | 2 +- .../outdated-preview.mdx | 4 +- .../resources/app/troubleshooting/page.mdx | 4 +- www/apps/resources/generated/edit-dates.mjs | 228 ++++++++++-------- .../page.mdx | 24 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 6 +- .../core_flows.Common.Steps_Common/page.mdx | 20 +- .../core_flows.Steps_Common/page.mdx | 20 +- .../dml.Model_Methods.cascades/page.mdx | 2 +- .../dml.Model_Methods.indexes/page.mdx | 6 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../methods/dml.Property_Types.array/page.mdx | 2 +- .../dml.Property_Types.bigNumber/page.mdx | 2 +- .../dml.Property_Types.boolean/page.mdx | 2 +- .../dml.Property_Types.dateTime/page.mdx | 2 +- .../methods/dml.Property_Types.enum/page.mdx | 2 +- .../methods/dml.Property_Types.id/page.mdx | 2 +- .../methods/dml.Property_Types.json/page.mdx | 2 +- .../dml.Property_Types.number/page.mdx | 2 +- .../methods/dml.Property_Types.text/page.mdx | 2 +- .../dml.Relationship_Methods.hasMany/page.mdx | 2 +- .../dml.Relationship_Methods.hasOne/page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../file.AbstractFileProviderService/page.mdx | 10 +- .../page.mdx | 6 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../helper_steps.emitEventStep/page.mdx | 2 +- .../page.mdx | 4 +- .../helper_steps.useRemoteQueryStep/page.mdx | 6 +- .../medusa_config.ConfigModule/page.mdx | 2 +- .../references/modules/core_flows/page.mdx | 20 +- .../references/modules/workflows/page.mdx | 2 +- .../page.mdx | 12 +- .../page.mdx | 32 +-- .../search.AbstractSearchService/page.mdx | 8 +- .../tax_provider.ITaxProvider/page.mdx | 4 +- .../types.CommonTypes.ConfigModule/page.mdx | 2 +- .../types.DetailWidgetProps/page.mdx | 2 +- .../page.mdx | 2 +- .../functions/workflows.createHook/page.mdx | 4 +- .../functions/workflows.createStep/page.mdx | 4 +- .../workflows.createWorkflow/page.mdx | 4 +- .../functions/workflows.parallelize/page.mdx | 4 +- .../functions/workflows.transform/page.mdx | 4 +- .../functions/workflows.when/page.mdx | 2 +- .../merger-custom-options/auth-provider.ts | 8 +- .../merger-custom-options/core-flows.ts | 4 +- .../constants/merger-custom-options/file.ts | 8 +- .../fulfillment-provider.ts | 8 +- .../merger-custom-options/helper-steps.ts | 4 +- .../merger-custom-options/notification.ts | 8 +- .../merger-custom-options/payment-provider.ts | 8 +- .../constants/merger-custom-options/search.ts | 2 +- .../merger-custom-options/workflows.ts | 4 +- 196 files changed, 1379 insertions(+), 1491 deletions(-) diff --git a/www/apps/book/app/advanced-development/admin/widgets/page.mdx b/www/apps/book/app/advanced-development/admin/widgets/page.mdx index 47f0a385b0..a1ae8871f6 100644 --- a/www/apps/book/app/advanced-development/admin/widgets/page.mdx +++ b/www/apps/book/app/advanced-development/admin/widgets/page.mdx @@ -94,7 +94,7 @@ import { Container, Heading } from "@medusajs/ui" import { DetailWidgetProps, AdminProduct, -} from "@medusajs/types" +} from "@medusajs/framework/types" // The widget const ProductWidget = ({ diff --git a/www/apps/book/app/advanced-development/api-routes/additional-data/page.mdx b/www/apps/book/app/advanced-development/api-routes/additional-data/page.mdx index e90528ae2e..31c7ce6dbb 100644 --- a/www/apps/book/app/advanced-development/api-routes/additional-data/page.mdx +++ b/www/apps/book/app/advanced-development/api-routes/additional-data/page.mdx @@ -135,9 +135,9 @@ For example, consider you want to store the data passed in `additional_data` in To do that, create the file `src/workflows/hooks/product-created.ts` with the following content: ```ts title="src/workflows/hooks/product-created.ts" -import { StepResponse } from "@medusajs/workflows-sdk" -import { createProductsWorkflow } from "@medusajs/core-flows" -import { Modules } from "@medusajs/utils" +import { StepResponse } from "@medusajs/framework/workflows-sdk" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" +import { Modules } from "@medusajs/framework/utils" createProductsWorkflow.hooks.productsCreated( async ({ products, additional_data }, { container }) => { diff --git a/www/apps/book/app/advanced-development/api-routes/cors/page.mdx b/www/apps/book/app/advanced-development/api-routes/cors/page.mdx index 48f5244e56..f193c26b41 100644 --- a/www/apps/book/app/advanced-development/api-routes/cors/page.mdx +++ b/www/apps/book/app/advanced-development/api-routes/cors/page.mdx @@ -87,8 +87,8 @@ import type { MedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { ConfigModule } from "@medusajs/types" -import { parseCorsOrigins } from "@medusajs/utils" +import { ConfigModule } from "@medusajs/framework/types" +import { parseCorsOrigins } from "@medusajs/framework/utils" import cors from "cors" export default defineMiddlewares({ diff --git a/www/apps/book/app/advanced-development/api-routes/errors/page.mdx b/www/apps/book/app/advanced-development/api-routes/errors/page.mdx index f4b09b6b0f..7151b12850 100644 --- a/www/apps/book/app/advanced-development/api-routes/errors/page.mdx +++ b/www/apps/book/app/advanced-development/api-routes/errors/page.mdx @@ -10,7 +10,7 @@ In this guide, you'll learn how to throw errors in your Medusa application, how ## Throw MedusaError -When throwing an error in your API routes, middlewares, workflows, or any customization, throw a `MedusaError`, which is imported from `@medusajs/utils`. +When throwing an error in your API routes, middlewares, workflows, or any customization, throw a `MedusaError`, which is imported from `@medusajs/framework/utils`. The Medusa application's API route error handler then wraps your thrown error in a uniform object and returns it in the response. @@ -18,7 +18,7 @@ For example: ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" export const GET = async ( req: MedusaRequest, @@ -258,7 +258,7 @@ import { MedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" export default defineMiddlewares({ errorHandler: ( diff --git a/www/apps/book/app/advanced-development/api-routes/protected-routes/page.mdx b/www/apps/book/app/advanced-development/api-routes/protected-routes/page.mdx index 163b9257c2..46706bb2b2 100644 --- a/www/apps/book/app/advanced-development/api-routes/protected-routes/page.mdx +++ b/www/apps/book/app/advanced-development/api-routes/protected-routes/page.mdx @@ -125,8 +125,8 @@ import type { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { Modules } from "@medusajs/utils" -import { ICustomerModuleService } from "@medusajs/types" +import { Modules } from "@medusajs/framework/utils" +import { ICustomerModuleService } from "@medusajs/framework/types" export const GET = async ( req: AuthenticatedMedusaRequest, @@ -160,8 +160,8 @@ import type { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { Modules } from "@medusajs/utils" -import { IUserModuleService } from "@medusajs/types" +import { Modules } from "@medusajs/framework/utils" +import { IUserModuleService } from "@medusajs/framework/types" export const GET = async ( req: AuthenticatedMedusaRequest, diff --git a/www/apps/book/app/advanced-development/custom-cli-scripts/page.mdx b/www/apps/book/app/advanced-development/custom-cli-scripts/page.mdx index 366153061d..847045051d 100644 --- a/www/apps/book/app/advanced-development/custom-cli-scripts/page.mdx +++ b/www/apps/book/app/advanced-development/custom-cli-scripts/page.mdx @@ -22,8 +22,8 @@ For example, create the file `src/scripts/my-script.ts` with the following conte import { ExecArgs, IProductModuleService, -} from "@medusajs/types" -import { Modules } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export default async function myScript({ container }: ExecArgs) { const productModuleService: IProductModuleService = container.resolve( @@ -58,7 +58,7 @@ Your script can accept arguments from the command line. Arguments are passed to For example: ```ts -import { ExecArgs } from "@medusajs/types" +import { ExecArgs } from "@medusajs/framework/types" export default async function myScript({ args }: ExecArgs) { console.log(`The arguments you passed: ${args}`) diff --git a/www/apps/book/app/advanced-development/data-models/configure-properties/page.mdx b/www/apps/book/app/advanced-development/data-models/configure-properties/page.mdx index 7739769bd5..bf9ecaf7ff 100644 --- a/www/apps/book/app/advanced-development/data-models/configure-properties/page.mdx +++ b/www/apps/book/app/advanced-development/data-models/configure-properties/page.mdx @@ -18,7 +18,7 @@ export const defaultHighlights = [ ] ```ts highlights={defaultHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { color: model @@ -48,7 +48,7 @@ export const nullableHighlights = [ ] ```ts highlights={nullableHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { price: model.bigNumber().nullable(), @@ -71,7 +71,7 @@ export const uniqueHighlights = [ ] ```ts highlights={uniqueHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const User = model.define("user", { email: model.text().unique(), diff --git a/www/apps/book/app/advanced-development/data-models/index/page.mdx b/www/apps/book/app/advanced-development/data-models/index/page.mdx index e1babac983..b66ad3bbaf 100644 --- a/www/apps/book/app/advanced-development/data-models/index/page.mdx +++ b/www/apps/book/app/advanced-development/data-models/index/page.mdx @@ -18,7 +18,7 @@ export const highlights = [ ] ```ts highlights={highlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id().primaryKey(), @@ -48,7 +48,7 @@ export const dataModelIndexHighlights = [ ] ```ts highlights={dataModelIndexHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id().primaryKey(), @@ -77,7 +77,7 @@ export const conditionHighlights = [ ] ```ts highlights={conditionHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id().primaryKey(), @@ -106,7 +106,7 @@ export const negationHighlights = [ ] ```ts highlights={negationHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id().primaryKey(), @@ -141,7 +141,7 @@ export const uniqueHighlights = [ ] ```ts highlights={uniqueHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id().primaryKey(), diff --git a/www/apps/book/app/advanced-development/data-models/infer-type/page.mdx b/www/apps/book/app/advanced-development/data-models/infer-type/page.mdx index 9db0843586..6191f160e8 100644 --- a/www/apps/book/app/advanced-development/data-models/infer-type/page.mdx +++ b/www/apps/book/app/advanced-development/data-models/infer-type/page.mdx @@ -10,12 +10,12 @@ In this chapter, you'll learn how to infer the type of a data model. Consider you have a `MyCustom` data model. You can't reference this data model in a type, such as a workflow input or service method output types, since it's a variable. -Instead, Medusa provides an `InferTypeOf` utility imported from `@medusajs/types` that transforms your data model to a type. +Instead, Medusa provides an `InferTypeOf` utility imported from `@medusajs/framework/types` that transforms your data model to a type. For example: ```ts -import { InferTypeOf } from "@medusajs/types" +import { InferTypeOf } from "@medusajs/framework/types" import { MyCustom } from "../models/my-custom" // relative path to the model export type MyCustom = InferTypeOf @@ -29,7 +29,7 @@ You can now use the `MyCustom` type to reference a data model in other types, su ```ts title="Example Service" // other imports... -import { InferTypeOf } from "@medusajs/types" +import { InferTypeOf } from "@medusajs/framework/types" import { MyCustom } from "../models/my-custom" type MyCustom = InferTypeOf diff --git a/www/apps/book/app/advanced-development/data-models/primary-key/page.mdx b/www/apps/book/app/advanced-development/data-models/primary-key/page.mdx index d88c910670..6d378228ba 100644 --- a/www/apps/book/app/advanced-development/data-models/primary-key/page.mdx +++ b/www/apps/book/app/advanced-development/data-models/primary-key/page.mdx @@ -17,7 +17,7 @@ export const highlights = [ ] ```ts highlights={highlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id().primaryKey(), diff --git a/www/apps/book/app/advanced-development/data-models/property-types/page.mdx b/www/apps/book/app/advanced-development/data-models/property-types/page.mdx index b2ca1f2829..aa747de235 100644 --- a/www/apps/book/app/advanced-development/data-models/property-types/page.mdx +++ b/www/apps/book/app/advanced-development/data-models/property-types/page.mdx @@ -6,7 +6,7 @@ export const metadata = { In this chapter, you’ll learn about the types of properties in a data model’s schema. -These types are available as methods on the `model` utility imported from `@medusajs/utils`. +These types are available as methods on the `model` utility imported from `@medusajs/framework/utils`. ## id @@ -17,7 +17,7 @@ For example: export const idHighlights = [["4", ".id()", "Define an `id` property."]] ```ts highlights={idHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id(), @@ -38,7 +38,7 @@ For example: export const textHighlights = [["4", "text", "Define a `text` property."]] ```ts highlights={textHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { name: model.text(), @@ -59,7 +59,7 @@ For example: export const numberHighlights = [["4", "number", "Define a `number` property."]] ```ts highlights={numberHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { age: model.number(), @@ -80,7 +80,7 @@ For example: export const bigNumberHighlights = [["4", "bigNumber", "Define a `bigNumber` property."]] ```ts highlights={bigNumberHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { price: model.bigNumber(), @@ -101,7 +101,7 @@ For example: export const booleanHighlights = [["4", "boolean", "Define a `boolean` property."]] ```ts highlights={booleanHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { hasAccount: model.boolean(), @@ -122,7 +122,7 @@ For example: export const enumHighlights = [["4", "enum", "Define a `enum` property."]] ```ts highlights={enumHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { color: model.enum(["black", "white"]), @@ -145,7 +145,7 @@ For example: export const dateTimeHighlights = [["4", "dateTime", "Define a `dateTime` property."]] ```ts highlights={dateTimeHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { date_of_birth: model.dateTime(), @@ -166,7 +166,7 @@ For example: export const jsonHighlights = [["4", "json", "Define a `json` property."]] ```ts highlights={jsonHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { metadata: model.json(), @@ -187,7 +187,7 @@ For example: export const arrHightlights = [["4", "array", "Define an `array` property."]] ```ts highlights={arrHightlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { names: model.array(), diff --git a/www/apps/book/app/advanced-development/data-models/relationships/page.mdx b/www/apps/book/app/advanced-development/data-models/relationships/page.mdx index 9946a51ac3..47078fa213 100644 --- a/www/apps/book/app/advanced-development/data-models/relationships/page.mdx +++ b/www/apps/book/app/advanced-development/data-models/relationships/page.mdx @@ -46,7 +46,7 @@ export const oneToOneHighlights = [ ] ```ts highlights={oneToOneHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const User = model.define("user", { id: model.id().primaryKey(), @@ -100,7 +100,7 @@ export const oneToManyHighlights = [ ] ```ts highlights={oneToManyHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const Store = model.define("store", { id: model.id().primaryKey(), @@ -146,7 +146,7 @@ export const manyToManyHighlights = [ ] ```ts highlights={manyToManyHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const Order = model.define("order", { id: model.id().primaryKey(), @@ -193,7 +193,7 @@ export const relationNameHighlights = [ ] ```ts highlights={relationNameHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const User = model.define("user", { id: model.id().primaryKey(), @@ -229,7 +229,7 @@ export const highlights = [ ] ```ts highlights={highlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const Store = model.define("store", { id: model.id().primaryKey(), diff --git a/www/apps/book/app/advanced-development/data-models/searchable-property/page.mdx b/www/apps/book/app/advanced-development/data-models/searchable-property/page.mdx index d35148b74f..b1dbeb9d65 100644 --- a/www/apps/book/app/advanced-development/data-models/searchable-property/page.mdx +++ b/www/apps/book/app/advanced-development/data-models/searchable-property/page.mdx @@ -25,7 +25,7 @@ export const searchableHighlights = [ ] ```ts highlights={searchableHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { name: model.text().searchable(), diff --git a/www/apps/book/app/advanced-development/events-and-subscribers/emit-event/page.mdx b/www/apps/book/app/advanced-development/events-and-subscribers/emit-event/page.mdx index f14ea2bc10..7f768aa385 100644 --- a/www/apps/book/app/advanced-development/events-and-subscribers/emit-event/page.mdx +++ b/www/apps/book/app/advanced-development/events-and-subscribers/emit-event/page.mdx @@ -8,7 +8,7 @@ In this chapter, you'll learn how to emit an event in a workflow. ## Emit Event Step -Medusa provides an `emitEventStep` helper step in the `@medusajs/core-flows` package that emits an event. +Medusa provides an `emitEventStep` helper step in the `@medusajs/medusa/core-flows` package that emits an event. When you emit an event, you specify the event's name and data payload to pass with the event. @@ -23,10 +23,10 @@ export const highlights = [ ```ts highlights={highlights} import { createWorkflow, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { emitEventStep, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" const helloWorldWorkflow = createWorkflow( "hello-world", diff --git a/www/apps/book/app/advanced-development/modules/container/page.mdx b/www/apps/book/app/advanced-development/modules/container/page.mdx index d97e33c6b5..61c03c7b3f 100644 --- a/www/apps/book/app/advanced-development/modules/container/page.mdx +++ b/www/apps/book/app/advanced-development/modules/container/page.mdx @@ -53,7 +53,7 @@ For example: ```ts highlights={[["9"]]} import { LoaderOptions, -} from "@medusajs/modules-sdk" +} from "@medusajs/framework/modules-sdk" import { Logger } from "@medusajs/medusa" export default async function helloWorldLoader({ diff --git a/www/apps/book/app/advanced-development/modules/module-links/page.mdx b/www/apps/book/app/advanced-development/modules/module-links/page.mdx index ac02b1db54..8f9690bc1c 100644 --- a/www/apps/book/app/advanced-development/modules/module-links/page.mdx +++ b/www/apps/book/app/advanced-development/modules/module-links/page.mdx @@ -32,7 +32,7 @@ You want to create a relationship between data models in the same module. Use da ### 1. Create Link File -Links are defined in a TypeScript or JavaScript file under the `src/links` directory. The file defines the link using the `defineLink` function imported from `@medusajs/utils` and exports it. +Links are defined in a TypeScript or JavaScript file under the `src/links` directory. The file defines the link using the `defineLink` function imported from `@medusajs/framework/utils` and exports it. For example: @@ -43,8 +43,8 @@ export const highlights = [ ```ts title="src/links/hello-product.ts" highlights={highlights} import HelloModule from "../modules/hello" -import ProductModule from "@medusajs/product" -import { defineLink } from "@medusajs/utils" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( ProductModule.linkable.product, @@ -84,8 +84,8 @@ For example: ```ts import HelloModule from "../modules/hello" -import ProductModule from "@medusajs/product" -import { defineLink } from "@medusajs/utils" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( ProductModule.linkable.product, @@ -130,8 +130,8 @@ For example: ```ts import HelloModule from "../modules/hello" -import ProductModule from "@medusajs/product" -import { defineLink } from "@medusajs/utils" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( ProductModule.linkable.product, diff --git a/www/apps/book/app/advanced-development/modules/options/page.mdx b/www/apps/book/app/advanced-development/modules/options/page.mdx index d3f5f93930..f76f39bd11 100644 --- a/www/apps/book/app/advanced-development/modules/options/page.mdx +++ b/www/apps/book/app/advanced-development/modules/options/page.mdx @@ -47,7 +47,7 @@ The module’s main service receives the module options as a second parameter. For example: ```ts title="src/modules/hello/service.ts" highlights={[["12"], ["14", "options?: ModuleOptions"], ["17"], ["18"], ["19"]]} -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import MyCustom from "./models/my-custom" // recommended to define type in another file @@ -83,7 +83,7 @@ For example: ```ts title="src/modules/hello/loaders/hello-world.ts" highlights={[["11"], ["12", "ModuleOptions", "The type of expected module options."], ["16"]]} import { LoaderOptions, -} from "@medusajs/modules-sdk" +} from "@medusajs/framework/modules-sdk" // recommended to define type in another file type ModuleOptions = { diff --git a/www/apps/book/app/advanced-development/modules/query/page.mdx b/www/apps/book/app/advanced-development/modules/query/page.mdx index 5ea407e4b4..6cbc612ec6 100644 --- a/www/apps/book/app/advanced-development/modules/query/page.mdx +++ b/www/apps/book/app/advanced-development/modules/query/page.mdx @@ -40,7 +40,7 @@ import { } from "@medusajs/medusa" import { ContainerRegistrationKeys, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export const GET = async ( req: MedusaRequest, diff --git a/www/apps/book/app/advanced-development/modules/remote-link/page.mdx b/www/apps/book/app/advanced-development/modules/remote-link/page.mdx index 691262dfe7..ef054f4ac4 100644 --- a/www/apps/book/app/advanced-development/modules/remote-link/page.mdx +++ b/www/apps/book/app/advanced-development/modules/remote-link/page.mdx @@ -21,10 +21,10 @@ import { } from "@medusajs/medusa" import { ContainerRegistrationKeys, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { RemoteLink, -} from "@medusajs/modules-sdk" +} from "@medusajs/framework/modules-sdk" export async function POST( req: MedusaRequest, @@ -49,7 +49,7 @@ To create a link between records of two data models, use the `create` method of For example: ```ts -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" // ... @@ -84,7 +84,7 @@ To remove a link between records of two data models, use the `dismiss` method of For example: ```ts -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" // ... @@ -115,7 +115,7 @@ If a record is deleted, use the `delete` method of the remote link to delete all For example: ```ts -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" // ... @@ -139,7 +139,7 @@ If a record that was previously soft-deleted is now restored, use the `restore` For example: ```ts -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" // ... diff --git a/www/apps/book/app/advanced-development/modules/service-constraints/page.mdx b/www/apps/book/app/advanced-development/modules/service-constraints/page.mdx index a5414bd243..d4607c959b 100644 --- a/www/apps/book/app/advanced-development/modules/service-constraints/page.mdx +++ b/www/apps/book/app/advanced-development/modules/service-constraints/page.mdx @@ -13,7 +13,7 @@ Medusa wraps adds wrappers around your service's methods and executes them as as So, make sure your service's methods are always async to avoid unexpected errors or behavior. ```ts highlights={[["8", "", "Method must be async."], ["13", "async", "Correct way of defining the method."]]} -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import MyCustom from "./models/my-custom" class HelloModuleService extends MedusaService({ diff --git a/www/apps/book/app/advanced-development/modules/service-factory/page.mdx b/www/apps/book/app/advanced-development/modules/service-factory/page.mdx index 71623b16f3..b4d2dbfb83 100644 --- a/www/apps/book/app/advanced-development/modules/service-factory/page.mdx +++ b/www/apps/book/app/advanced-development/modules/service-factory/page.mdx @@ -34,7 +34,7 @@ export const highlights = [ ] ```ts title="src/modules/hello/service.ts" highlights={highlights} -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import MyCustom from "./models/my-custom" class HelloModuleService extends MedusaService({ @@ -284,7 +284,7 @@ If you implement the `constructor` of your service, make sure to call `super` pa For example: ```ts highlights={[["8"]]} -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import MyCustom from "./models/my-custom" class HelloModuleService extends MedusaService({ diff --git a/www/apps/book/app/advanced-development/workflows/add-workflow-hook/page.mdx b/www/apps/book/app/advanced-development/workflows/add-workflow-hook/page.mdx index 2625de36e3..5ab8883b95 100644 --- a/www/apps/book/app/advanced-development/workflows/add-workflow-hook/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/add-workflow-hook/page.mdx @@ -24,7 +24,7 @@ Your workflow isn't reusable by other applications. Use a step that performs wha ## How to Expose a Hook in a Workflow? -To expose a hook in your workflow, use the `createHook` function imported from `@medusajs/workflows-sdk`. +To expose a hook in your workflow, use the `createHook` function imported from `@medusajs/framework/workflows-sdk`. For example: @@ -41,7 +41,7 @@ import { createHook, createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { createProductStep } from "./steps/create-product" export const myWorkflow = createWorkflow( diff --git a/www/apps/book/app/advanced-development/workflows/compensation-function/page.mdx b/www/apps/book/app/advanced-development/workflows/compensation-function/page.mdx index fb0c3b2a33..6d1ff1d434 100644 --- a/www/apps/book/app/advanced-development/workflows/compensation-function/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/compensation-function/page.mdx @@ -26,7 +26,7 @@ For example, create the file `src/workflows/hello-world.ts` with the following c import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" const step1 = createStep( "step-1", @@ -66,7 +66,7 @@ Then, create a workflow that uses the steps: import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" // other imports... // steps... @@ -135,7 +135,7 @@ export const inputHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" const step1 = createStep( "step-1", @@ -172,8 +172,8 @@ export const containerHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" -import { ContainerRegistrationKeys } from "@medusajs/utils" +} from "@medusajs/framework/workflows-sdk" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" const step1 = createStep( "step-1", diff --git a/www/apps/book/app/advanced-development/workflows/conditions/page.mdx b/www/apps/book/app/advanced-development/workflows/conditions/page.mdx index fe7155101e..fc4b73e99f 100644 --- a/www/apps/book/app/advanced-development/workflows/conditions/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/conditions/page.mdx @@ -37,7 +37,7 @@ import { createWorkflow, WorkflowResponse, when, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" // step imports... const workflow = createWorkflow( @@ -70,7 +70,7 @@ In this code snippet, you execute the `isActiveStep` only if the `input.is_activ ### When Parameters -`when` utility is a function imported from `@medusajs/workflows-sdk`. It accepts the following parameters: +`when` utility is a function imported from `@medusajs/framework/workflows-sdk`. It accepts the following parameters: 1. The first parameter is either an object or the workflow's input. This data is passed as a parameter to the function in `when`'s second parameter. 2. The second parameter is a function that returns a boolean indicating whether to execute the action in `then`. diff --git a/www/apps/book/app/advanced-development/workflows/constructor-constraints/page.mdx b/www/apps/book/app/advanced-development/workflows/constructor-constraints/page.mdx index 1bee88f1b8..7383e2c5ee 100644 --- a/www/apps/book/app/advanced-development/workflows/constructor-constraints/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/constructor-constraints/page.mdx @@ -38,7 +38,7 @@ Learn more about why you can't manipulate variables [in this chapter](../conditi -Instead, use the `transform` utility function imported from `@medusajs/workflows-sdk`: +Instead, use the `transform` utility function imported from `@medusajs/framework/workflows-sdk`: export const highlights = [ ["9", "", "Don't manipulate variables directly."], @@ -89,7 +89,7 @@ Learn more about why you can't use if-conditions [in this chapter](../conditions -Instead, use the when-then utility function imported from `@medusajs/workflows-sdk`: +Instead, use the when-then utility function imported from `@medusajs/framework/workflows-sdk`: ```ts // Don't @@ -129,7 +129,7 @@ Values of other types, such as Maps, aren't allowed. import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" const step1 = createStep( "step-1", @@ -148,7 +148,7 @@ const step1 = createStep( import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" const step1 = createStep( "step-1", diff --git a/www/apps/book/app/advanced-development/workflows/execute-another-workflow/page.mdx b/www/apps/book/app/advanced-development/workflows/execute-another-workflow/page.mdx index 0994482f61..f9acd8896a 100644 --- a/www/apps/book/app/advanced-development/workflows/execute-another-workflow/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/execute-another-workflow/page.mdx @@ -20,10 +20,10 @@ export const workflowsHighlights = [ ```ts highlights={workflowsHighlights} collapsibleLines="1-7" expandMoreButton="Show Imports" import { createWorkflow, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { createProductsWorkflow, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" const workflow = createWorkflow( "hello-world", @@ -49,7 +49,7 @@ The object has an `input` property to pass input to the workflow. ## Preparing Input Data -If you need to perform some data manipulation to prepare the other workflow's input data, use the `transform` utility function imported from `@medusajs/workflows-sdk`. +If you need to perform some data manipulation to prepare the other workflow's input data, use the `transform` utility function imported from `@medusajs/framework/workflows-sdk`. @@ -68,10 +68,10 @@ export const transformHighlights = [ import { createWorkflow, transform, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { createProductsWorkflow, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" type WorkflowInput = { title: string @@ -105,7 +105,7 @@ In this example, you use the `transform` function to prepend `Hello` to the titl ## Run Workflow Conditionally -To run a workflow in another based on a condition, use the when-then utility functions imported from `@medusajs/workflows-sdk`. +To run a workflow in another based on a condition, use the when-then utility functions imported from `@medusajs/framework/workflows-sdk`. @@ -124,13 +124,13 @@ export const whenHighlights = [ import { createWorkflow, when, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { createProductsWorkflow, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" import { CreateProductWorkflowInputDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" type WorkflowInput = { product?: CreateProductWorkflowInputDTO diff --git a/www/apps/book/app/advanced-development/workflows/long-running-workflow/page.mdx b/www/apps/book/app/advanced-development/workflows/long-running-workflow/page.mdx index 0f2610c911..b9f4f7b3a2 100644 --- a/www/apps/book/app/advanced-development/workflows/long-running-workflow/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/long-running-workflow/page.mdx @@ -35,7 +35,7 @@ import { createWorkflow, WorkflowResponse, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" const step1 = createStep("step-1", async () => { return new StepResponse({}) @@ -114,11 +114,11 @@ export const successStatusHighlights = [ import { Modules, TransactionHandlerType, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { StepResponse, createStep, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" type SetStepSuccessStepInput = { transactionId: string @@ -232,11 +232,11 @@ export const failureStatusHighlights = [ import { Modules, TransactionHandlerType, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { StepResponse, createStep, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" type SetStepFailureStepInput = { transactionId: string @@ -288,8 +288,8 @@ import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa" import myWorkflow from "../../../workflows/hello-world" import { IWorkflowEngineService, -} from "@medusajs/types" -import { Modules } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export async function GET(req: MedusaRequest, res: MedusaResponse) { const { transaction, result } = await myWorkflow(req.scope).run() diff --git a/www/apps/book/app/advanced-development/workflows/parallel-steps/page.mdx b/www/apps/book/app/advanced-development/workflows/parallel-steps/page.mdx index 31941584f1..2fc5abf218 100644 --- a/www/apps/book/app/advanced-development/workflows/parallel-steps/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/parallel-steps/page.mdx @@ -8,7 +8,7 @@ In this chapter, you’ll learn how to run workflow steps in parallel. ## parallelize Utility Function -If your workflow has steps that don’t rely on one another’s results, run them in parallel using the `parallelize` utility function imported from the `@medusajs/workflows-sdk`. +If your workflow has steps that don’t rely on one another’s results, run them in parallel using the `parallelize` utility function imported from the `@medusajs/framework/workflows-sdk`. The workflow waits until all steps passed to the `parallelize` function finish executing before continuing to the next step. @@ -24,7 +24,7 @@ import { createWorkflow, WorkflowResponse, parallelize, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { createProductStep, getProductStep, diff --git a/www/apps/book/app/advanced-development/workflows/retry-failed-steps/page.mdx b/www/apps/book/app/advanced-development/workflows/retry-failed-steps/page.mdx index 103a7a80d9..8e5f5643de 100644 --- a/www/apps/book/app/advanced-development/workflows/retry-failed-steps/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/retry-failed-steps/page.mdx @@ -19,7 +19,7 @@ import { createStep, createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" const step1 = createStep( { diff --git a/www/apps/book/app/advanced-development/workflows/variable-manipulation/page.mdx b/www/apps/book/app/advanced-development/workflows/variable-manipulation/page.mdx index b2cd4f66fe..edb7acfbdb 100644 --- a/www/apps/book/app/advanced-development/workflows/variable-manipulation/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/variable-manipulation/page.mdx @@ -43,7 +43,7 @@ import { createWorkflow, WorkflowResponse, transform, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" // step imports... const myWorkflow = createWorkflow( @@ -62,7 +62,7 @@ const myWorkflow = createWorkflow( ) ``` -The `transform` utility function is imported from `@medusajs/workflows-sdk`. It accepts two parameters: +The `transform` utility function is imported from `@medusajs/framework/workflows-sdk`. It accepts two parameters: 1. The first parameter is an object of variables to manipulate. The object is passed as a parameter to `transform`'s second parameter function. 2. The second parameter is the function performing the variable manipulation. @@ -84,7 +84,7 @@ import { createWorkflow, WorkflowResponse, transform, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" // step imports... type WorkflowInput = { diff --git a/www/apps/book/app/advanced-development/workflows/workflow-hooks/page.mdx b/www/apps/book/app/advanced-development/workflows/workflow-hooks/page.mdx index a90e7be0ca..be8a3d6d2b 100644 --- a/www/apps/book/app/advanced-development/workflows/workflow-hooks/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/workflow-hooks/page.mdx @@ -43,7 +43,7 @@ export const handlerHighlights = [ ] ```ts title="src/workflows/hooks/product-created.ts" highlights={handlerHighlights} -import { createProductsWorkflow } from "@medusajs/core-flows" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" createProductsWorkflow.hooks.productsCreated( async ({ products }, { container }) => { @@ -83,7 +83,7 @@ Since the hook handler is a step function, you can set its compensation function For example: ```ts title="src/workflows/hooks/product-created.ts" -import { createProductsWorkflow } from "@medusajs/core-flows" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" createProductsWorkflow.productCreated( async ({ productId }, { container }) => { @@ -108,7 +108,7 @@ It also accepts as a second parameter an object holding a `container` property t Medusa's workflows pass in the hook's input an `additional_data` property: ```ts title="src/workflows/hooks/product-created.ts" highlights={[["4", "additional_data"]]} -import { createProductsWorkflow } from "@medusajs/core-flows" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" createProductsWorkflow.hooks.productsCreated( async ({ products, additional_data }, { container }) => { @@ -131,7 +131,7 @@ You can also pass that additional data when executing the workflow. Pass it as a ```ts title="src/workflows/hooks/product-created.ts" highlights={[["10", "additional_data"]]} import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { createProductsWorkflow } from "@medusajs/core-flows" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" export async function POST(req: MedusaRequest, res: MedusaResponse) { await createProductsWorkflow(req.scope).run({ diff --git a/www/apps/book/app/advanced-development/workflows/workflow-timeout/page.mdx b/www/apps/book/app/advanced-development/workflows/workflow-timeout/page.mdx index e7488827b9..a318ddf970 100644 --- a/www/apps/book/app/advanced-development/workflows/workflow-timeout/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/workflow-timeout/page.mdx @@ -31,7 +31,7 @@ import { createStep, createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" const step1 = createStep( "step-1", diff --git a/www/apps/book/app/basics/commerce-modules/page.mdx b/www/apps/book/app/basics/commerce-modules/page.mdx index 511cab64c4..d2a5a2c575 100644 --- a/www/apps/book/app/basics/commerce-modules/page.mdx +++ b/www/apps/book/app/basics/commerce-modules/page.mdx @@ -26,8 +26,8 @@ For example, you saw this code snippet in the [Medusa container chapter](../medu ```ts highlights={[["10"]]} import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { IProductModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { IProductModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const GET = async ( req: MedusaRequest, @@ -50,6 +50,6 @@ When you resolve the `Modules.PRODUCT` (or `productModuleService`) registration -To resolve the main service of any commerce module, use the registration name defined in the `Modules` enum imported from `@medusajs/utils`. +To resolve the main service of any commerce module, use the registration name defined in the `Modules` enum imported from `@medusajs/framework/utils`. diff --git a/www/apps/book/app/basics/data-models/page.mdx b/www/apps/book/app/basics/data-models/page.mdx index 2fe9704636..17dfe23c27 100644 --- a/www/apps/book/app/basics/data-models/page.mdx +++ b/www/apps/book/app/basics/data-models/page.mdx @@ -16,12 +16,12 @@ A data model is created in a module, and its record are managed in the database ## How to Create a Data Model? -A data model is created in a TypeScript or JavaScript file under a module's `models` directory. It's defined using the `model` utility imported from `@medusajs/utils`. +A data model is created in a TypeScript or JavaScript file under a module's `models` directory. It's defined using the `model` utility imported from `@medusajs/framework/utils`. For example, create the file `src/modules/hello/models/my-custom.ts` with the following content: ```ts title="src/modules/hello/models/my-custom.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id().primaryKey(), 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 ef970ff9f1..f8aae6bafd 100644 --- a/www/apps/book/app/basics/events-and-subscribers/page.mdx +++ b/www/apps/book/app/basics/events-and-subscribers/page.mdx @@ -85,13 +85,13 @@ 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", "Modules.PRODUCT", "The module's registration name imported from `@medusajs/utils`."] + ["10", "Modules.PRODUCT", "The module's registration name imported from `@medusajs/framework/utils`."] ] ```ts title="src/subscribers/product-created.ts" highlights={highlights} import { SubscriberArgs, type SubscriberConfig } from "@medusajs/medusa" -import { IProductModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { IProductModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export default async function productCreateHandler({ event: { data }, diff --git a/www/apps/book/app/basics/medusa-container/page.mdx b/www/apps/book/app/basics/medusa-container/page.mdx index a5b8624f3b..745a8cddf4 100644 --- a/www/apps/book/app/basics/medusa-container/page.mdx +++ b/www/apps/book/app/basics/medusa-container/page.mdx @@ -19,14 +19,14 @@ export const highlights = [ [ "10", "Modules.PRODUCT", - "The resource registration name imported from `@medusajs/utils`.", + "The resource registration name imported from `@medusajs/framework/utils`.", ], ] ```ts highlights={highlights} import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { IProductModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { IProductModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const GET = async ( req: MedusaRequest, diff --git a/www/apps/book/app/basics/modules-and-services/page.mdx b/www/apps/book/app/basics/modules-and-services/page.mdx index b780ede382..568a7cb833 100644 --- a/www/apps/book/app/basics/modules-and-services/page.mdx +++ b/www/apps/book/app/basics/modules-and-services/page.mdx @@ -52,7 +52,7 @@ For example, create the file `src/modules/hello/index.ts` with the following con ```ts title="src/modules/hello/index.ts" highlights={[["7", "", "The main service of the module."]]} import HelloModuleService from "./service" -import { Module } from "@medusajs/utils" +import { Module } from "@medusajs/framework/utils" export const HELLO_MODULE = "helloModuleService" @@ -61,7 +61,7 @@ export default Module(HELLO_MODULE, { }) ``` -You use the `Module` function imported from `@medusajs/utils` to create the module definition. It requires two parameters: +You use the `Module` function imported from `@medusajs/framework/utils` to create the module definition. It requires two parameters: 1. The module's name. 2. An object with a required property `service` indicating the module's main service. diff --git a/www/apps/book/app/basics/scheduled-jobs/page.mdx b/www/apps/book/app/basics/scheduled-jobs/page.mdx index f242cff466..f589ae46c6 100644 --- a/www/apps/book/app/basics/scheduled-jobs/page.mdx +++ b/www/apps/book/app/basics/scheduled-jobs/page.mdx @@ -87,15 +87,15 @@ For example: export const highlights = [ ["11", "resolve", "Resolve the Product Module's main service."], - ["11", "Modules.PRODUCT", "The module's registration name imported from `@medusajs/utils`."] + ["11", "Modules.PRODUCT", "The module's registration name imported from `@medusajs/framework/utils`."] ] ```ts title="src/jobs/hello-world.ts" highlights={highlights} import { IProductModuleService, MedusaContainer, -} from "@medusajs/types" -import { Modules } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export default async function myCustomJob( container: MedusaContainer diff --git a/www/apps/book/app/basics/workflows/page.mdx b/www/apps/book/app/basics/workflows/page.mdx index f34a6279d8..6c6643f74b 100644 --- a/www/apps/book/app/basics/workflows/page.mdx +++ b/www/apps/book/app/basics/workflows/page.mdx @@ -22,12 +22,12 @@ By using a workflow, you can track its execution's progress, provide roll-back l ### 1. Create the Steps -A workflow is made of a series of steps. A step is created using the `createStep` utility function imported from `@medusajs/workflows-sdk`. +A workflow is made of a series of steps. A step is created using the `createStep` utility function imported from `@medusajs/framework/workflows-sdk`. Create the file `src/workflows/hello-world.ts` with the following content: ```ts title="src/workflows/hello-world.ts" -import { createStep, StepResponse } from "@medusajs/workflows-sdk" +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" const step1 = createStep("step-1", async () => { return new StepResponse(`Hello from step one!`) @@ -59,7 +59,7 @@ import { // other imports... createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" // ... @@ -127,8 +127,8 @@ To execute the workflow, invoke it passing the Medusa container as a parameter. type SubscriberArgs, } from "@medusajs/medusa" import myWorkflow from "../workflows/hello-world" - import { Modules } from "@medusajs/utils" - import { IUserModuleService } from "@medusajs/types" + import { Modules } from "@medusajs/framework/utils" + import { IUserModuleService } from "@medusajs/framework/types" export default async function handleCustomerCreate({ event: { data }, @@ -160,7 +160,7 @@ To execute the workflow, invoke it passing the Medusa container as a parameter. ```ts title="src/jobs/message-daily.ts" highlights={[["7"], ["8"], ["9"], ["10"], ["11"], ["12"]]} - import { MedusaContainer } from "@medusajs/types" + import { MedusaContainer } from "@medusajs/framework/types" import myWorkflow from "../workflows/hello-world" export default async function myCustomJob( @@ -230,7 +230,7 @@ export const highlights = [ [ "12", "Modules.PRODUCT", - "The resource registration name imported from `@medusajs/utils`.", + "The resource registration name imported from `@medusajs/framework/utils`.", ], ] @@ -240,9 +240,9 @@ import { StepResponse, createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" -import { IProductModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +} from "@medusajs/framework/workflows-sdk" +import { IProductModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, context) => { const productModuleService: IProductModuleService = diff --git a/www/apps/book/app/customization/custom-features/module/page.mdx b/www/apps/book/app/customization/custom-features/module/page.mdx index b30f5bb0f7..53ce9e786e 100644 --- a/www/apps/book/app/customization/custom-features/module/page.mdx +++ b/www/apps/book/app/customization/custom-features/module/page.mdx @@ -21,7 +21,7 @@ Start by creating the directory `src/modules/brand` that will hold the Brand Mod To create a data model that represents a new `brand` table in the database, create the file `src/modules/brand/models/brand.ts` with the following content: ```ts title="src/modules/brand/models/brand.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" export const Brand = model.define("brand", { id: model.id().primaryKey(), @@ -44,7 +44,7 @@ export const serviceHighlights = [ ] ```ts title="src/modules/brand/service.ts" highlights={serviceHighlights} -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import { Brand } from "./models/brand" class BrandModuleService extends MedusaService({ @@ -56,7 +56,7 @@ class BrandModuleService extends MedusaService({ export default BrandModuleService ``` -The `BrandModuleService` extends a `MedusaService` function imported from `@medusajs/utils` which is a service factory. +The `BrandModuleService` extends a `MedusaService` function imported from `@medusajs/framework/utils` which is a service factory. The `MedusaService` function receives an object of the module's data models as a parameter, and generates methods to manage those data models, such as `createBrands` and `updateBrands`. @@ -75,7 +75,7 @@ Find a reference of the generated methods in [this guide](!resources!/service-fa To export the module's definition, create the file `src/modules/brand/index.ts` with the following content: ```ts title="src/modules/brand/index.ts" -import { Module } from "@medusajs/utils" +import { Module } from "@medusajs/framework/utils" import BrandModuleService from "./service" export const BRAND_MODULE = "brandModuleService" diff --git a/www/apps/book/app/customization/custom-features/workflow/page.mdx b/www/apps/book/app/customization/custom-features/workflow/page.mdx index 7919e6c0de..cd283ecdfd 100644 --- a/www/apps/book/app/customization/custom-features/workflow/page.mdx +++ b/www/apps/book/app/customization/custom-features/workflow/page.mdx @@ -45,7 +45,7 @@ Create the file `src/workflows/create-brand/index.ts` with the following content import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" export type CreateBrandInput = { name: string @@ -71,7 +71,7 @@ Create the file `src/workflows/create-brand/steps/create-brand.ts` with the foll import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { CreateBrandInput } from ".." import { BRAND_MODULE } from "../../../modules/brand" import BrandModuleService from "../../../modules/brand/service" diff --git a/www/apps/book/app/customization/customize-admin/widget/page.mdx b/www/apps/book/app/customization/customize-admin/widget/page.mdx index 7f745f489e..a1c10153e1 100644 --- a/www/apps/book/app/customization/customize-admin/widget/page.mdx +++ b/www/apps/book/app/customization/customize-admin/widget/page.mdx @@ -34,7 +34,7 @@ export const highlights = [ ```tsx title="src/admin/widgets/product-brand.tsx" highlights={highlights} import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { DetailWidgetProps, AdminProduct } from "@medusajs/types" +import { DetailWidgetProps, AdminProduct } from "@medusajs/framework/types" import { useEffect, useState } from "react" import { Container, Heading } from "@medusajs/ui" diff --git a/www/apps/book/app/customization/extend-models/create-links/page.mdx b/www/apps/book/app/customization/extend-models/create-links/page.mdx index 7e4035ed9f..0db80a28e0 100644 --- a/www/apps/book/app/customization/extend-models/create-links/page.mdx +++ b/www/apps/book/app/customization/extend-models/create-links/page.mdx @@ -29,11 +29,11 @@ export const stepHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { Modules, ContainerRegistrationKeys, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BRAND_MODULE } from "../../modules/brand" type LinkProductToBrandStepInput = { @@ -71,7 +71,7 @@ The `create` method accepts as a parameter an object whose properties are the na -Use the `Modules` enum imported from `@medusajs/utils` to for the commerce module's names. +Use the `Modules` enum imported from `@medusajs/framework/utils` to for the commerce module's names. diff --git a/www/apps/book/app/customization/extend-models/define-link/page.mdx b/www/apps/book/app/customization/extend-models/define-link/page.mdx index 8f6977c077..0891dbfc97 100644 --- a/www/apps/book/app/customization/extend-models/define-link/page.mdx +++ b/www/apps/book/app/customization/extend-models/define-link/page.mdx @@ -23,7 +23,7 @@ This chapter covers how to define a link between the `Brand` and `Product`data m ]} /> -Links are defined in a TypeScript or JavaScript file under the `src/links` directory. The file defines and exports the link using the `defineLink` function imported from `@medusajs/utils`. +Links are defined in a TypeScript or JavaScript file under the `src/links` directory. The file defines and exports the link using the `defineLink` function imported from `@medusajs/framework/utils`. So, create the file `src/links/product-brand.ts` with the following content: @@ -34,8 +34,8 @@ export const highlights = [ ```ts title="src/links/product-brand.ts" highlights={highlights} import BrandModule from "../modules/brand" -import ProductModule from "@medusajs/product" -import { defineLink } from "@medusajs/utils" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( { diff --git a/www/apps/book/app/customization/extend-models/extend-create-product/page.mdx b/www/apps/book/app/customization/extend-models/extend-create-product/page.mdx index 41b7df42f4..3f6be8ec48 100644 --- a/www/apps/book/app/customization/extend-models/extend-create-product/page.mdx +++ b/www/apps/book/app/customization/extend-models/extend-create-product/page.mdx @@ -86,9 +86,9 @@ export const hookHighlights = [ ] ```ts title="src/workflows/hooks/created-product.ts" highlights={hookHighlights} -import { createProductsWorkflow } from "@medusajs/core-flows" -import { StepResponse } from "@medusajs/workflows-sdk" -import { Modules, ContainerRegistrationKeys } from "@medusajs/utils" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" +import { StepResponse } from "@medusajs/framework/workflows-sdk" +import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" import { BRAND_MODULE } from "../../modules/brand" import BrandModuleService from "../../modules/brand/service" diff --git a/www/apps/book/app/customization/extend-models/query-linked-records/page.mdx b/www/apps/book/app/customization/extend-models/query-linked-records/page.mdx index b8bc1c8efb..4e96f96fe4 100644 --- a/www/apps/book/app/customization/extend-models/query-linked-records/page.mdx +++ b/www/apps/book/app/customization/extend-models/query-linked-records/page.mdx @@ -52,7 +52,7 @@ import { } from "@medusajs/medusa" import { ContainerRegistrationKeys, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export const GET = async ( req: MedusaRequest, diff --git a/www/apps/book/app/customization/integrate-systems/handle-event/page.mdx b/www/apps/book/app/customization/integrate-systems/handle-event/page.mdx index 295e127c7d..c75850fec6 100644 --- a/www/apps/book/app/customization/integrate-systems/handle-event/page.mdx +++ b/www/apps/book/app/customization/integrate-systems/handle-event/page.mdx @@ -25,7 +25,7 @@ This chapter covers how to emit an event when a brand is created, listen to that To handle brand-creation event, you'll emit a custom event when a brand is created. -In the `createBrandWorkflow` defined in `src/workflows/create-brand/index.ts`, use the `emitEventStep` helper step imported from `@medusajs/core-flows` after the `createBrandStep`: +In the `createBrandWorkflow` defined in `src/workflows/create-brand/index.ts`, use the `emitEventStep` helper step imported from `@medusajs/medusa/core-flows` after the `createBrandStep`: export const eventHighlights = [ ["13", "emitEventStep", "Emit an event."], @@ -37,7 +37,7 @@ export const eventHighlights = [ // other imports... import { emitEventStep, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" // ... @@ -75,7 +75,7 @@ Create the file `src/workflows/sync-brand-to-system/index.ts` with the following import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" export type SyncBrandToSystemInput = { id: string @@ -104,7 +104,7 @@ export const stepHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { SyncBrandToSystemInput } from ".." import BrandModuleService from "../../../modules/brand/service" import { BRAND_MODULE } from "../../../modules/brand" diff --git a/www/apps/book/app/customization/integrate-systems/schedule-task/page.mdx b/www/apps/book/app/customization/integrate-systems/schedule-task/page.mdx index 32d0153e61..8e8ae9515e 100644 --- a/www/apps/book/app/customization/integrate-systems/schedule-task/page.mdx +++ b/www/apps/book/app/customization/integrate-systems/schedule-task/page.mdx @@ -39,7 +39,7 @@ To create the step that retrieves the brands from the third-party service, creat import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import BrandModuleService from "../../../modules/brand/service" import { BRAND_MODULE } from "../../../modules/brand" @@ -74,8 +74,8 @@ export const createBrandsHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" -import { InferTypeOf } from "@medusajs/types" +} from "@medusajs/framework/workflows-sdk" +import { InferTypeOf } from "@medusajs/framework/types" import BrandModuleService from "../../../modules/brand/service" import { BRAND_MODULE } from "../../../modules/brand" import { Brand } from "../../../modules/brand/models/brand" @@ -109,7 +109,7 @@ This step receives the brands to create as input. -Since a data model is a variable, use the `InferTypeOf` utility imported from `@medusajs/types` to infer its type. +Since a data model is a variable, use the `InferTypeOf` utility imported from `@medusajs/framework/types` to infer its type. @@ -131,8 +131,8 @@ export const updateBrandsHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" -import { InferTypeOf } from "@medusajs/types" +} from "@medusajs/framework/workflows-sdk" +import { InferTypeOf } from "@medusajs/framework/types" import BrandModuleService from "../../../modules/brand/service" import { BRAND_MODULE } from "../../../modules/brand" import { Brand } from "../../../modules/brand/models/brand" @@ -181,8 +181,8 @@ import { createWorkflow, WorkflowResponse, transform, -} from "@medusajs/workflows-sdk" -import { InferTypeOf } from "@medusajs/types" +} from "@medusajs/framework/workflows-sdk" +import { InferTypeOf } from "@medusajs/framework/types" import { retrieveBrandsFromSystemStep } from "./steps/retrieve-brands-from-system" import { createBrandsStep } from "./steps/create-brands" import { updateBrandsStep } from "./steps/update-brands" @@ -206,7 +206,7 @@ Next, you need to identify which brands must be created or updated. Since workflows are constructed internally and are only evaluated during execution, you can't access any data's value to perform data manipulation or checks. -Instead, use the `transform` utility function imported from `@medusajs/workflows-sdk`, which gives you access to the real-time values of the data to perfrom actions on them. +Instead, use the `transform` utility function imported from `@medusajs/framework/workflows-sdk`, which gives you access to the real-time values of the data to perfrom actions on them. So, replace the `TODO` with the following: @@ -275,7 +275,7 @@ Then, you return the created and updated brands. To schedule a task that syncs brands from the third-party system, create a scheduled job at `src/jobs/sync-brands-from-system.ts`: ```ts title="src/jobs/sync-brands-from-system.ts" -import { MedusaContainer } from "@medusajs/types" +import { MedusaContainer } from "@medusajs/framework/types" import { syncBrandsFromSystemWorkflow } from "../workflows/sync-brands-from-system" export default async function (container: MedusaContainer) { diff --git a/www/apps/book/app/customization/integrate-systems/service/page.mdx b/www/apps/book/app/customization/integrate-systems/service/page.mdx index d81a6aec74..260d5d5224 100644 --- a/www/apps/book/app/customization/integrate-systems/service/page.mdx +++ b/www/apps/book/app/customization/integrate-systems/service/page.mdx @@ -32,7 +32,7 @@ export const serviceHighlights = [ ] ```ts title="src/modules/brand/services/client.ts" highlights={serviceHighlights} -import { Logger, ConfigModule } from "@medusajs/types" +import { Logger, ConfigModule } from "@medusajs/framework/types" import { BRAND_MODULE } from ".." export type BrandClientOptions = { @@ -88,7 +88,7 @@ export const methodsHighlights = [ ```ts title="src/modules/brand/services/client.ts" highlights={methodsHighlights} // other imports... -import { InferTypeOf } from "@medusajs/types" +import { InferTypeOf } from "@medusajs/framework/types" import { Brand } from "../models/brand" export class BrandClient { @@ -125,7 +125,7 @@ The `sendRequest` method is a dummy method to simulate sending a request to a th You also add three methods that use the `sendRequest` method: -- `createBrand` that creates a brand in the third-party system. To reference a brand's type, you use the `InferTypeOf` utility imported from `@medusajs/types`. This transforms a data model, which is a variable, to its equivalent type. +- `createBrand` that creates a brand in the third-party system. To reference a brand's type, you use the `InferTypeOf` utility imported from `@medusajs/framework/types`. This transforms a data model, which is a variable, to its equivalent type. - `deleteBrand` that deletes the brand in the third-party system. - `retrieveBrands` to retrieve a brand from the third-party system. diff --git a/www/apps/book/app/debugging-and-testing/logging/page.mdx b/www/apps/book/app/debugging-and-testing/logging/page.mdx index 45204e8f4b..7cc54c5d9a 100644 --- a/www/apps/book/app/debugging-and-testing/logging/page.mdx +++ b/www/apps/book/app/debugging-and-testing/logging/page.mdx @@ -27,7 +27,7 @@ export const highlights = [ ```ts title="src/jobs/log-message.ts" highlights={highlights} import { Logger } from "@medusajs/medusa" -import { MedusaContainer } from "@medusajs/types" +import { MedusaContainer } from "@medusajs/framework/types" export default async function myCustomJob( container: MedusaContainer diff --git a/www/apps/book/app/debugging-and-testing/testing-tools/integration-tests/api-routes/page.mdx b/www/apps/book/app/debugging-and-testing/testing-tools/integration-tests/api-routes/page.mdx index eb30944739..e83982d9fe 100644 --- a/www/apps/book/app/debugging-and-testing/testing-tools/integration-tests/api-routes/page.mdx +++ b/www/apps/book/app/debugging-and-testing/testing-tools/integration-tests/api-routes/page.mdx @@ -93,7 +93,7 @@ This runs your Medusa application and runs the tests available under the `src/in Suppose you have a `hello` module whose main service extends the service factory, and that has the following model: ```ts title="src/modules/hello/models/my-custom.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id().primaryKey(), diff --git a/www/apps/book/app/debugging-and-testing/testing-tools/integration-tests/workflows/page.mdx b/www/apps/book/app/debugging-and-testing/testing-tools/integration-tests/workflows/page.mdx index c2da893cf8..3895378754 100644 --- a/www/apps/book/app/debugging-and-testing/testing-tools/integration-tests/workflows/page.mdx +++ b/www/apps/book/app/debugging-and-testing/testing-tools/integration-tests/workflows/page.mdx @@ -27,7 +27,7 @@ import { createStep, StepResponse, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" const step1 = createStep("step-1", () => { return new StepResponse("Hello, World!") diff --git a/www/apps/book/app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx b/www/apps/book/app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx index 2d1e286530..713a5337a3 100644 --- a/www/apps/book/app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx +++ b/www/apps/book/app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx @@ -22,7 +22,7 @@ In this chapter, find an example of writing an integration test for a module usi Consider a `hello` module with a `HelloModuleService` that has a `getMessage` method: ```ts title="src/modules/hello/service.ts" -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import MyCustom from "./models/my-custom" class HelloModuleService extends MedusaService({ diff --git a/www/apps/book/app/debugging-and-testing/testing-tools/modules-tests/page.mdx b/www/apps/book/app/debugging-and-testing/testing-tools/modules-tests/page.mdx index 4ec365d0d4..b116eca15b 100644 --- a/www/apps/book/app/debugging-and-testing/testing-tools/modules-tests/page.mdx +++ b/www/apps/book/app/debugging-and-testing/testing-tools/modules-tests/page.mdx @@ -105,7 +105,7 @@ For example: ```ts import { moduleIntegrationTestRunner } from "medusa-test-utils" import HelloModuleService from "../service" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const DummyModel = model.define("dummy_model", { id: model.id().primaryKey(), diff --git a/www/apps/book/app/debugging-and-testing/testing-tools/page.mdx b/www/apps/book/app/debugging-and-testing/testing-tools/page.mdx index f28af7be52..1fe81dfaec 100644 --- a/www/apps/book/app/debugging-and-testing/testing-tools/page.mdx +++ b/www/apps/book/app/debugging-and-testing/testing-tools/page.mdx @@ -15,7 +15,7 @@ Medusa provides a `medusa-test-utils` package with utility tools to create integ To use the `medusa-test-utils` package, install it as a `devDependency`: ```bash npm2yarn -npm install --save-dev medusa-test-utils@preview +npm install --save-dev medusa-test-utils@rc ``` --- @@ -41,7 +41,7 @@ npm install --save-dev jest @types/jest @swc/jest Then, create the file `jest.config.js` with the following content: ```js title="jest.config.js" -const { loadEnv } = require("@medusajs/utils") +const { loadEnv } = require("@medusajs/framework/utils") loadEnv("test", process.cwd()) module.exports = { diff --git a/www/apps/book/app/page.mdx b/www/apps/book/app/page.mdx index 9838644f89..3b53183279 100644 --- a/www/apps/book/app/page.mdx +++ b/www/apps/book/app/page.mdx @@ -39,7 +39,7 @@ With these tools, you save time you would spend with other platforms on maintain Create your first Medusa store by running the following command: ```bash -npx create-medusa-app@preview +npx create-medusa-app@rc ``` --- diff --git a/www/apps/book/generated/edit-dates.mjs b/www/apps/book/generated/edit-dates.mjs index 5acefcd780..c9b65ef825 100644 --- a/www/apps/book/generated/edit-dates.mjs +++ b/www/apps/book/generated/edit-dates.mjs @@ -1,110 +1,110 @@ export const generatedEditDates = { - "app/basics/scheduled-jobs/page.mdx": "2024-08-05T07:24:27+00:00", - "app/basics/workflows/page.mdx": "2024-09-18T08:01:24.328Z", + "app/basics/scheduled-jobs/page.mdx": "2024-09-30T08:43:53.132Z", + "app/basics/workflows/page.mdx": "2024-09-30T08:43:53.132Z", "app/deployment/page.mdx": "2024-08-05T07:24:05+00:00", "app/page.mdx": "2024-09-03T07:09:09.034Z", - "app/basics/modules-and-services/page.mdx": "2024-09-11T10:48:35.195Z", - "app/basics/commerce-modules/page.mdx": "2024-09-03T07:48:48.148Z", - "app/advanced-development/workflows/retry-failed-steps/page.mdx": "2024-07-31T17:01:33+03:00", - "app/advanced-development/workflows/workflow-hooks/page.mdx": "2024-09-18T12:27:15.321Z", + "app/basics/modules-and-services/page.mdx": "2024-09-30T08:43:53.132Z", + "app/basics/commerce-modules/page.mdx": "2024-09-30T08:43:53.131Z", + "app/advanced-development/workflows/retry-failed-steps/page.mdx": "2024-09-30T08:43:53.130Z", + "app/advanced-development/workflows/workflow-hooks/page.mdx": "2024-09-30T08:43:53.131Z", "app/cheatsheet/page.mdx": "2024-07-11T13:53:40+03:00", - "app/debugging-and-testing/logging/page.mdx": "2024-07-04T17:26:03+03:00", + "app/debugging-and-testing/logging/page.mdx": "2024-09-30T08:43:53.135Z", "app/more-resources/page.mdx": "2024-07-04T17:26:03+03:00", "app/storefront-development/page.mdx": "2024-09-11T10:58:59.290Z", "app/storefront-development/nextjs-starter/page.mdx": "2024-07-04T17:26:03+03:00", "app/basics/page.mdx": "2024-09-03T07:11:06.879Z", "app/basics/admin-customizations/page.mdx": "2024-09-03T08:07:35.584Z", - "app/advanced-development/workflows/workflow-timeout/page.mdx": "2024-09-18T13:03:13.095Z", - "app/advanced-development/workflows/parallel-steps/page.mdx": "2024-09-18T12:56:50.436Z", + "app/advanced-development/workflows/workflow-timeout/page.mdx": "2024-09-30T08:43:53.131Z", + "app/advanced-development/workflows/parallel-steps/page.mdx": "2024-09-30T08:43:53.130Z", "app/advanced-development/page.mdx": "2024-07-04T17:26:03+03:00", "app/first-customizations/page.mdx": "2024-09-11T10:48:42.374Z", "app/debugging-and-testing/page.mdx": "2024-05-03T17:36:38+03:00", - "app/basics/medusa-container/page.mdx": "2024-09-03T07:31:40.214Z", + "app/basics/medusa-container/page.mdx": "2024-09-30T08:43:53.132Z", "app/basics/project-directories-files/page.mdx": "2024-07-04T17:26:03+03:00", "app/basics/api-routes/page.mdx": "2024-09-11T10:48:31.777Z", "app/basics/modules-directory-structure/page.mdx": "2024-05-07T18:00:28+02:00", "app/advanced-development/workflows/access-workflow-errors/page.mdx": "2024-09-18T12:54:04.695Z", - "app/basics/events-and-subscribers/page.mdx": "2024-09-03T08:01:30.986Z", - "app/advanced-development/modules/container/page.mdx": "2024-08-05T07:23:49+00:00", - "app/basics/data-models/page.mdx": "2024-09-19T07:24:38.584Z", - "app/advanced-development/workflows/execute-another-workflow/page.mdx": "2024-09-18T13:29:11.644Z", + "app/basics/events-and-subscribers/page.mdx": "2024-09-30T08:43:53.131Z", + "app/advanced-development/modules/container/page.mdx": "2024-09-30T08:43:53.125Z", + "app/basics/data-models/page.mdx": "2024-09-30T08:43:53.131Z", + "app/advanced-development/workflows/execute-another-workflow/page.mdx": "2024-09-30T08:43:53.129Z", "app/basics/loaders/page.mdx": "2024-09-03T08:00:45.993Z", - "app/advanced-development/admin/widgets/page.mdx": "2024-08-06T09:44:22+02:00", + "app/advanced-development/admin/widgets/page.mdx": "2024-09-30T08:43:53.120Z", "app/advanced-development/data-models/page.mdx": "2024-09-19T07:26:43.535Z", - "app/advanced-development/modules/remote-link/page.mdx": "2024-07-24T09:16:01+02:00", - "app/advanced-development/api-routes/protected-routes/page.mdx": "2024-09-11T10:45:44.293Z", - "app/advanced-development/workflows/add-workflow-hook/page.mdx": "2024-09-18T12:52:24.511Z", + "app/advanced-development/modules/remote-link/page.mdx": "2024-09-30T08:43:53.127Z", + "app/advanced-development/api-routes/protected-routes/page.mdx": "2024-09-30T08:43:53.121Z", + "app/advanced-development/workflows/add-workflow-hook/page.mdx": "2024-09-30T08:43:53.128Z", "app/advanced-development/events-and-subscribers/data-payload/page.mdx": "2024-07-16T17:12:05+01:00", "app/advanced-development/data-models/default-properties/page.mdx": "2024-09-19T07:32:06.118Z", "app/advanced-development/workflows/advanced-example/page.mdx": "2024-09-11T10:46:59.975Z", - "app/advanced-development/events-and-subscribers/emit-event/page.mdx": "2024-09-10T11:39:51.168Z", - "app/advanced-development/workflows/conditions/page.mdx": "2024-09-18T08:52:40.755Z", + "app/advanced-development/events-and-subscribers/emit-event/page.mdx": "2024-09-30T08:43:53.125Z", + "app/advanced-development/workflows/conditions/page.mdx": "2024-09-30T08:43:53.128Z", "app/advanced-development/modules/module-link-directions/page.mdx": "2024-07-24T09:16:01+02:00", "app/advanced-development/admin/page.mdx": "2024-05-29T13:50:19+03:00", - "app/advanced-development/workflows/long-running-workflow/page.mdx": "2024-09-18T13:26:19.706Z", - "app/advanced-development/workflows/constructor-constraints/page.mdx": "2024-09-18T08:58:08.705Z", + "app/advanced-development/workflows/long-running-workflow/page.mdx": "2024-09-30T08:43:53.129Z", + "app/advanced-development/workflows/constructor-constraints/page.mdx": "2024-09-30T08:43:53.128Z", "app/advanced-development/data-models/write-migration/page.mdx": "2024-07-15T17:46:10+02:00", "app/advanced-development/data-models/manage-relationships/page.mdx": "2024-09-10T11:39:51.167Z", "app/advanced-development/modules/remote-query/page.mdx": "2024-07-21T21:20:24+02:00", - "app/advanced-development/modules/options/page.mdx": "2024-08-05T07:23:49+00:00", - "app/advanced-development/data-models/relationships/page.mdx": "2024-09-11T11:28:55.494Z", - "app/advanced-development/workflows/compensation-function/page.mdx": "2024-09-18T09:13:11.941Z", - "app/advanced-development/modules/service-factory/page.mdx": "2024-07-26T14:40:56+00:00", - "app/advanced-development/data-models/primary-key/page.mdx": "2024-07-02T12:34:44+03:00", - "app/advanced-development/modules/module-links/page.mdx": "2024-07-24T09:16:01+02:00", - "app/advanced-development/data-models/searchable-property/page.mdx": "2024-09-19T08:48:53.599Z", + "app/advanced-development/modules/options/page.mdx": "2024-09-30T08:43:53.126Z", + "app/advanced-development/data-models/relationships/page.mdx": "2024-09-30T08:43:53.125Z", + "app/advanced-development/workflows/compensation-function/page.mdx": "2024-09-30T08:43:53.128Z", + "app/advanced-development/modules/service-factory/page.mdx": "2024-09-30T08:43:53.127Z", + "app/advanced-development/data-models/primary-key/page.mdx": "2024-09-30T08:43:53.123Z", + "app/advanced-development/modules/module-links/page.mdx": "2024-09-30T08:43:53.126Z", + "app/advanced-development/data-models/searchable-property/page.mdx": "2024-09-30T08:43:53.125Z", "app/advanced-development/scheduled-jobs/execution-number/page.mdx": "2024-07-02T09:41:15+00:00", "app/advanced-development/api-routes/parameters/page.mdx": "2024-09-11T10:44:13.491Z", "app/advanced-development/api-routes/http-methods/page.mdx": "2024-09-11T10:43:33.169Z", "app/advanced-development/admin/tips/page.mdx": "2024-09-10T11:39:51.165Z", - "app/advanced-development/api-routes/cors/page.mdx": "2024-09-04T08:24:47.068Z", + "app/advanced-development/api-routes/cors/page.mdx": "2024-09-30T08:43:53.121Z", "app/advanced-development/admin/ui-routes/page.mdx": "2024-08-06T09:44:22+02:00", "app/advanced-development/api-routes/middlewares/page.mdx": "2024-09-11T10:45:31.861Z", "app/advanced-development/modules/isolation/page.mdx": "2024-07-04T17:26:03+03:00", - "app/advanced-development/data-models/configure-properties/page.mdx": "2024-07-04T17:26:03+03:00", - "app/advanced-development/data-models/index/page.mdx": "2024-09-19T08:47:12.961Z", - "app/advanced-development/custom-cli-scripts/page.mdx": "2024-07-04T17:26:03+03:00", - "app/advanced-development/data-models/property-types/page.mdx": "2024-09-19T07:31:20.696Z", - "app/debugging-and-testing/testing-tools/integration-tests/api-routes/page.mdx": "2024-09-11T10:48:09.593Z", + "app/advanced-development/data-models/configure-properties/page.mdx": "2024-09-30T08:43:53.122Z", + "app/advanced-development/data-models/index/page.mdx": "2024-09-30T08:43:53.122Z", + "app/advanced-development/custom-cli-scripts/page.mdx": "2024-09-30T08:43:53.122Z", + "app/advanced-development/data-models/property-types/page.mdx": "2024-09-30T08:43:53.124Z", + "app/debugging-and-testing/testing-tools/integration-tests/api-routes/page.mdx": "2024-09-30T08:43:53.136Z", "app/debugging-and-testing/testing-tools/integration-tests/page.mdx": "2024-09-10T11:39:51.170Z", - "app/debugging-and-testing/testing-tools/integration-tests/workflows/page.mdx": "2024-09-10T11:39:51.171Z", - "app/debugging-and-testing/testing-tools/page.mdx": "2024-09-10T11:39:51.172Z", + "app/debugging-and-testing/testing-tools/integration-tests/workflows/page.mdx": "2024-09-30T08:43:53.139Z", + "app/debugging-and-testing/testing-tools/page.mdx": "2024-09-30T08:43:53.139Z", "app/debugging-and-testing/testing-tools/unit-tests/module-example/page.mdx": "2024-09-02T11:04:27.232Z", "app/debugging-and-testing/testing-tools/unit-tests/page.mdx": "2024-09-02T11:03:26.997Z", - "app/advanced-development/modules/service-constraints/page.mdx": "2024-09-04T15:37:04.166Z", + "app/advanced-development/modules/service-constraints/page.mdx": "2024-09-30T08:43:53.127Z", "app/advanced-development/api-routes/page.mdx": "2024-09-04T09:36:33.961Z", "app/advanced-development/api-routes/responses/page.mdx": "2024-09-11T10:44:37.016Z", "app/advanced-development/api-routes/validation/page.mdx": "2024-09-11T10:46:31.476Z", - "app/advanced-development/api-routes/errors/page.mdx": "2024-09-10T11:39:51.166Z", + "app/advanced-development/api-routes/errors/page.mdx": "2024-09-30T08:43:53.121Z", "app/advanced-development/admin/constraints/page.mdx": "2024-09-10T11:39:51.165Z", - "app/advanced-development/modules/query/page.mdx": "2024-09-11T10:46:49.512Z", - "app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx": "2024-09-10T11:39:51.171Z", - "app/debugging-and-testing/testing-tools/modules-tests/page.mdx": "2024-09-10T11:39:51.171Z", + "app/advanced-development/modules/query/page.mdx": "2024-09-30T08:43:53.127Z", + "app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx": "2024-09-30T08:43:53.139Z", + "app/debugging-and-testing/testing-tools/modules-tests/page.mdx": "2024-09-30T08:43:53.139Z", "app/debugging-and-testing/instrumentation/page.mdx": "2024-09-17T08:53:15.910Z", - "app/advanced-development/api-routes/additional-data/page.mdx": "2024-09-18T12:22:26.063Z", + "app/advanced-development/api-routes/additional-data/page.mdx": "2024-09-30T08:43:53.120Z", "app/advanced-development/workflows/page.mdx": "2024-09-18T08:00:57.364Z", - "app/advanced-development/workflows/variable-manipulation/page.mdx": "2024-09-18T09:03:20.805Z", + "app/advanced-development/workflows/variable-manipulation/page.mdx": "2024-09-30T08:43:53.130Z", "app/customization/custom-features/api-route/page.mdx": "2024-09-12T12:42:34.201Z", - "app/customization/custom-features/module/page.mdx": "2024-09-12T12:39:37.928Z", - "app/customization/custom-features/workflow/page.mdx": "2024-09-12T12:40:39.582Z", - "app/customization/extend-models/create-links/page.mdx": "2024-09-26T08:31:08.177Z", - "app/customization/extend-models/extend-create-product/page.mdx": "2024-09-12T12:43:57.702Z", + "app/customization/custom-features/module/page.mdx": "2024-09-30T08:43:53.133Z", + "app/customization/custom-features/workflow/page.mdx": "2024-09-30T08:43:53.133Z", + "app/customization/extend-models/create-links/page.mdx": "2024-09-30T08:43:53.133Z", + "app/customization/extend-models/extend-create-product/page.mdx": "2024-09-30T08:43:53.134Z", "app/customization/custom-features/page.mdx": "2024-09-12T11:18:13.271Z", "app/customization/customize-admin/page.mdx": "2024-09-12T12:25:29.853Z", "app/customization/customize-admin/route/page.mdx": "2024-09-12T12:45:39.258Z", - "app/customization/customize-admin/widget/page.mdx": "2024-09-12T12:26:36.013Z", - "app/customization/extend-models/define-link/page.mdx": "2024-09-12T12:38:53.230Z", + "app/customization/customize-admin/widget/page.mdx": "2024-09-30T08:43:53.133Z", + "app/customization/extend-models/define-link/page.mdx": "2024-09-30T08:43:53.134Z", "app/customization/extend-models/page.mdx": "2024-09-12T12:38:57.394Z", - "app/customization/extend-models/query-linked-records/page.mdx": "2024-09-12T12:44:41.089Z", - "app/customization/integrate-systems/handle-event/page.mdx": "2024-09-26T08:34:57.278Z", + "app/customization/extend-models/query-linked-records/page.mdx": "2024-09-30T08:43:53.134Z", + "app/customization/integrate-systems/handle-event/page.mdx": "2024-09-30T08:43:53.135Z", "app/customization/integrate-systems/page.mdx": "2024-09-12T12:33:29.827Z", - "app/customization/integrate-systems/schedule-task/page.mdx": "2024-09-26T08:40:26.509Z", - "app/customization/integrate-systems/service/page.mdx": "2024-09-26T08:34:30.313Z", + "app/customization/integrate-systems/schedule-task/page.mdx": "2024-09-30T08:43:53.135Z", + "app/customization/integrate-systems/service/page.mdx": "2024-09-30T08:43:53.135Z", "app/customization/next-steps/page.mdx": "2024-09-12T10:50:04.873Z", "app/customization/page.mdx": "2024-09-12T11:16:18.504Z", "app/more-resources/cheatsheet/page.mdx": "2024-07-11T16:11:26.480Z", "app/more-resources/examples/page.mdx": "2024-09-19T10:30:30.398Z", "app/architecture/architectural-modules/page.mdx": "2024-09-23T12:51:04.520Z", "app/architecture/overview/page.mdx": "2024-09-23T12:55:01.339Z", - "app/advanced-development/data-models/infer-type/page.mdx": "2024-09-26T08:28:13.041Z" + "app/advanced-development/data-models/infer-type/page.mdx": "2024-09-30T08:43:53.123Z" } \ No newline at end of file diff --git a/www/apps/resources/app/admin-widget-injection-zones/page.mdx b/www/apps/resources/app/admin-widget-injection-zones/page.mdx index e01ba4306b..63f2cd91b7 100644 --- a/www/apps/resources/app/admin-widget-injection-zones/page.mdx +++ b/www/apps/resources/app/admin-widget-injection-zones/page.mdx @@ -114,7 +114,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -137,7 +137,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -160,7 +160,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -183,7 +183,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -254,7 +254,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -277,7 +277,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -334,7 +334,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -357,7 +357,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -428,7 +428,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -451,7 +451,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -474,7 +474,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -497,7 +497,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -554,7 +554,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -577,7 +577,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -634,7 +634,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -657,7 +657,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -680,7 +680,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -703,7 +703,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -774,7 +774,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -797,7 +797,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -820,7 +820,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -843,7 +843,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -914,7 +914,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -937,7 +937,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -960,7 +960,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -983,7 +983,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1040,7 +1040,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1063,7 +1063,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1086,7 +1086,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1109,7 +1109,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1182,7 +1182,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1205,7 +1205,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1242,7 +1242,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1265,7 +1265,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1302,7 +1302,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1325,7 +1325,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1396,7 +1396,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1419,7 +1419,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1490,7 +1490,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1513,7 +1513,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1584,7 +1584,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1607,7 +1607,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1630,7 +1630,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1653,7 +1653,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1724,7 +1724,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1747,7 +1747,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1818,7 +1818,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1841,7 +1841,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1864,7 +1864,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1887,7 +1887,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1958,7 +1958,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -1981,7 +1981,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -2052,7 +2052,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -2075,7 +2075,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -2146,7 +2146,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { @@ -2169,7 +2169,7 @@ This documentation page includes the list of injection zones you can add Admin W - Type `DetailWidgetProps` imported from `@medusajs/types` + Type `DetailWidgetProps` imported from `@medusajs/framework/types` ```ts blockStyle="inline" { diff --git a/www/apps/resources/app/architectural-modules/cache/create/page.mdx b/www/apps/resources/app/architectural-modules/cache/create/page.mdx index 775ce8a876..4c9d1e83c4 100644 --- a/www/apps/resources/app/architectural-modules/cache/create/page.mdx +++ b/www/apps/resources/app/architectural-modules/cache/create/page.mdx @@ -16,10 +16,10 @@ Start by creating a new directory for your module. For example, `src/modules/my- Create the file `src/modules/my-cache/service.ts` that holds the implementation of the cache service. -The Cache Module's main service must implement the `ICacheService` interface imported from `@medusajs/types`: +The Cache Module's main service must implement the `ICacheService` interface imported from `@medusajs/framework/types`: ```ts title="src/modules/my-cache/service.ts" -import { ICacheService } from "@medusajs/types" +import { ICacheService } from "@medusajs/framework/types" class MyCacheService implements ICacheService { get(key: string): Promise { @@ -135,7 +135,7 @@ Create the file `src/modules/my-cache/index.ts` with the following content: ```ts title="src/modules/my-cache/index.ts" import MyCacheService from "./service" -import { Module } from "@medusajs/utils" +import { Module } from "@medusajs/framework/utils" export default Module("my-cache", { service: MyCacheService, @@ -153,7 +153,7 @@ To use your Cache Module, add it to the `modules` object exported as part of the For example: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/app/architectural-modules/cache/in-memory/page.mdx b/www/apps/resources/app/architectural-modules/cache/in-memory/page.mdx index 9bce2dba0d..d6a11dcd33 100644 --- a/www/apps/resources/app/architectural-modules/cache/in-memory/page.mdx +++ b/www/apps/resources/app/architectural-modules/cache/in-memory/page.mdx @@ -14,30 +14,18 @@ For production, it’s recommended to use modules like [Redis Cache Module](../r --- -## Install the In-Memory Cache Module +## Register the In-Memory Cache Module -The In-Memory Cache Module is installed by default in your application. +The In-Memory Cache Module is registered by default in your application. -To install the In-Memory Cache Module, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/cache-inmemory@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module into the `modules` property of the exported object in `medusa-config.js`: +Add the module into the `modules` property of the exported object in `medusa-config.js`: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -45,7 +33,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.CACHE]: { - resolve: "@medusajs/cache-inmemory", + resolve: "@medusajs/medusa/cache-inmemory", options: { // optional options }, diff --git a/www/apps/resources/app/architectural-modules/cache/redis/page.mdx b/www/apps/resources/app/architectural-modules/cache/redis/page.mdx index 50dbdd7726..fb7dc2adc9 100644 --- a/www/apps/resources/app/architectural-modules/cache/redis/page.mdx +++ b/www/apps/resources/app/architectural-modules/cache/redis/page.mdx @@ -10,7 +10,7 @@ The Redis Cache Module uses Redis to cache data in your store. In production, it --- -## Install the Redis Cache Module +## Register the Redis Cache Module -To install Redis Cache Module, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/cache-redis@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module into the `modules` property of the exported object in `medusa-config.js`: +Add the module into the `modules` property of the exported object in `medusa-config.js`: export const highlights = [ ["11", "redisUrl", "The Redis connection URL."] ] ```js title="medusa-config.js" highlights={highlights} -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -46,7 +34,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.CACHE]: { - resolve: "@medusajs/cache-redis", + resolve: "@medusajs/medusa/cache-redis", options: { redisUrl: process.env.CACHE_REDIS_URL, }, @@ -166,6 +154,8 @@ CACHE_REDIS_URL= +--- + ## Test the Module To test the module, start the Medusa application: diff --git a/www/apps/resources/app/architectural-modules/event/create/page.mdx b/www/apps/resources/app/architectural-modules/event/create/page.mdx index b683a73919..474a8a0310 100644 --- a/www/apps/resources/app/architectural-modules/event/create/page.mdx +++ b/www/apps/resources/app/architectural-modules/event/create/page.mdx @@ -16,11 +16,11 @@ Start by creating a new directory for your module. For example, `src/modules/my- Create the file `src/modules/my-event/service.ts` that holds the implementation of the event service. -The Event Module's main service must extend the `AbstractEventBusModuleService` class imported from `@medusajs/utils`: +The Event Module's main service must extend the `AbstractEventBusModuleService` class imported from `@medusajs/framework/utils`: ```ts title="src/modules/my-event/service.ts" -import { EmitData, Message } from "@medusajs/types" -import { AbstractEventBusModuleService } from "@medusajs/utils" +import { EmitData, Message } from "@medusajs/framework/types" +import { AbstractEventBusModuleService } from "@medusajs/framework/utils" class MyEventService extends AbstractEventBusModuleService { emit(eventName: string, data: T, options: Record): Promise; @@ -90,7 +90,7 @@ Create the file `src/modules/my-event/index.ts` with the following content: ```ts title="src/modules/my-event/index.ts" import MyEventService from "./service" -import { Module } from "@medusajs/utils" +import { Module } from "@medusajs/framework/utils" export default Module("my-event", { service: MyEventService, @@ -108,7 +108,7 @@ To use your Event Module, add it to the `modules` object exported as part of the For example: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/app/architectural-modules/event/local/page.mdx b/www/apps/resources/app/architectural-modules/event/local/page.mdx index dd60b75c93..5666d240ab 100644 --- a/www/apps/resources/app/architectural-modules/event/local/page.mdx +++ b/www/apps/resources/app/architectural-modules/event/local/page.mdx @@ -12,30 +12,18 @@ For production, it’s recommended to use modules like [Redis Event Bus Module]( --- -## Install the Local Event Bus Module +## Register the Local Event Bus Module -The Local Event Bus Module is installed by default in your application. +The Local Event Bus Module is registered by default in your application. -To install Local Event Bus Module, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/event-bus-local@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module into the `modules` property of the exported object in `medusa-config.js`: +Add the module into the `modules` property of the exported object in `medusa-config.js`: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/app/architectural-modules/event/redis/page.mdx b/www/apps/resources/app/architectural-modules/event/redis/page.mdx index 97e0d5b243..98f42af3ce 100644 --- a/www/apps/resources/app/architectural-modules/event/redis/page.mdx +++ b/www/apps/resources/app/architectural-modules/event/redis/page.mdx @@ -14,7 +14,7 @@ In production, it's recommended to use this module. --- -## Install the Redis Events Bus Module +## Register the Redis Events Bus Module -To install Redis Event Bus Module, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/event-bus-redis@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module into the `modules` property of the exported object in `medusa-config.js`: +Add the module into the `modules` property of the exported object in `medusa-config.js`: export const highlights = [ ["11", "redisUrl", "The Redis connection URL."] ] ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -50,7 +38,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.EVENT_BUS]: { - resolve: "@medusajs/event-bus-redis", + resolve: "@medusajs/medusa/event-bus-redis", options: { redisUrl: process.env.EVENTS_REDIS_URL, }, diff --git a/www/apps/resources/app/architectural-modules/file/local/page.mdx b/www/apps/resources/app/architectural-modules/file/local/page.mdx index c6d1b25154..fddb557622 100644 --- a/www/apps/resources/app/architectural-modules/file/local/page.mdx +++ b/www/apps/resources/app/architectural-modules/file/local/page.mdx @@ -16,27 +16,15 @@ The Local File Module Provider is only for development purposes. Use the [S3 Fil --- -## Install the Local File Module +## Register the Local File Module -The Local File Module is installed by default in your application. +The Local File Module Provider is registered by default in your application. -To install the Local File Module Provider, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/file-local-next@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module into the `providers` array of the File Module: +Add the module into the `providers` array of the File Module: @@ -45,7 +33,7 @@ The File Module accepts one provider only. ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -53,11 +41,11 @@ module.exports = { // ... modules: { [Modules.FILE]: { - resolve: "@medusajs/file", + resolve: "@medusajs/medusa/file", options: { providers: [ { - resolve: "@medusajs/file-local-next", + resolve: "@medusajs/medusa/file-local-next", id: "local", options: { // provider options... diff --git a/www/apps/resources/app/architectural-modules/file/s3/page.mdx b/www/apps/resources/app/architectural-modules/file/s3/page.mdx index 9108e6179e..359c0a145e 100644 --- a/www/apps/resources/app/architectural-modules/file/s3/page.mdx +++ b/www/apps/resources/app/architectural-modules/file/s3/page.mdx @@ -102,15 +102,9 @@ The S3 File Module Provider integrates Amazon S3 and services following a compat --- -## Install the S3 File Module +## Register the S3 File Module -To install the S3 File Module Provider, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/file-s3@preview -``` - -Next, add the module into the `providers` array of the File Module: +Add the module into the `providers` array of the File Module: @@ -119,7 +113,7 @@ The File Module accepts one provider only. ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -128,11 +122,11 @@ module.exports = { modules: { // ... [Modules.FILE]: { - resolve: "@medusajs/file", + resolve: "@medusajs/medusa/file", options: { providers: [ { - resolve: "@medusajs/file-s3", + resolve: "@medusajs/medusa/file-s3", id: "s3", options: { file_url: process.env.S3_FILE_URL, @@ -360,11 +354,11 @@ module.exports = defineConfig({ // ... modules: { [Modules.FILE]: { - resolve: "@medusajs/file", + resolve: "@medusajs/medusa/file", options: { providers: [ { - resolve: "@medusajs/file-s3", + resolve: "@medusajs/medusa/file-s3", id: "s3", options: { // ... diff --git a/www/apps/resources/app/architectural-modules/notification/local/page.mdx b/www/apps/resources/app/architectural-modules/notification/local/page.mdx index 507732fb9b..33d3a51efa 100644 --- a/www/apps/resources/app/architectural-modules/notification/local/page.mdx +++ b/www/apps/resources/app/architectural-modules/notification/local/page.mdx @@ -10,27 +10,15 @@ The Local Notification Module Provider simulates sending a notification, but onl --- -## Install the Local Notification Module +## Register the Local Notification Module -The Local Notification Module Provider is installed by default in your application. +The Local Notification Module Provider is registered by default in your application. It's configured to run on the `feed` channel. -To install the Local Notification Module Provider, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/notification-local@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module into the `providers` array of the Notification Module: +Add the module into the `providers` array of the Notification Module: @@ -39,7 +27,7 @@ Only one provider can be defined for a channel. ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -47,12 +35,12 @@ module.exports = defineConfig({ // ... modules: { [Modules.NOTIFICATION]: { - resolve: "@medusajs/notification", + resolve: "@medusajs/medusa/notification", options: { providers: [ // ... { - resolve: "@medusajs/notification-local", + resolve: "@medusajs/medusa/notification-local", id: "local", options: { channels: ["email"], diff --git a/www/apps/resources/app/architectural-modules/notification/page.mdx b/www/apps/resources/app/architectural-modules/notification/page.mdx index 22ae8ccd63..2f1436ed6b 100644 --- a/www/apps/resources/app/architectural-modules/notification/page.mdx +++ b/www/apps/resources/app/architectural-modules/notification/page.mdx @@ -31,7 +31,7 @@ When you send a notification, you specify the channel to send it through, such a For example: ```js title="medusa-config.js" highlights={[["19"]]} -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -40,12 +40,12 @@ module.exports = { modules: { // ... [Modules.NOTIFICATION]: { - resolve: "@medusajs/notification", + resolve: "@medusajs/medusa/notification", options: { providers: [ // ... { - resolve: "@medusajs/notification-local", + resolve: "@medusajs/medusa/notification-local", id: "notification", options: { channels: ["email"], diff --git a/www/apps/resources/app/architectural-modules/notification/send-notification/page.mdx b/www/apps/resources/app/architectural-modules/notification/send-notification/page.mdx index 54f7ba6a75..16e7cc286b 100644 --- a/www/apps/resources/app/architectural-modules/notification/send-notification/page.mdx +++ b/www/apps/resources/app/architectural-modules/notification/send-notification/page.mdx @@ -37,8 +37,8 @@ import type { SubscriberArgs, SubscriberConfig, } from "@medusajs/medusa" -import { Modules } from "@medusajs/utils" -import { INotificationModuleService } from "@medusajs/types" +import { Modules } from "@medusajs/framework/utils" +import { INotificationModuleService } from "@medusajs/framework/types" export default async function productCreateHandler({ event: { data }, diff --git a/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx b/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx index d10c3eae1c..6be6db58fb 100644 --- a/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx +++ b/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx @@ -10,7 +10,7 @@ The SendGrid Notification Module Provider integrates [SendGrid](https://sendgrid --- -## Install the SendGrid Notification Module +## Register the SendGrid Notification Module -To install the SendGrid Notification Module Provider, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/notification-sendgrid@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module into the `providers` array of the Notification Module: +Add the module into the `providers` array of the Notification Module: @@ -50,7 +38,7 @@ Only one provider can be defined for a channel. ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -58,12 +46,12 @@ module.exports = defineConfig({ // ... modules: { [Modules.NOTIFICATION]: { - resolve: "@medusajs/notification", + resolve: "@medusajs/medusa/notification", options: { providers: [ // ... { - resolve: "@medusajs/notification-sendgrid", + resolve: "@medusajs/medusa/notification-sendgrid", id: "sendgrid", options: { channels: ["email"], @@ -144,8 +132,8 @@ import type { SubscriberArgs, SubscriberConfig, } from "@medusajs/medusa" -import { Modules } from "@medusajs/utils" -import { INotificationModuleService } from "@medusajs/types" +import { Modules } from "@medusajs/framework/utils" +import { INotificationModuleService } from "@medusajs/framework/types" export default async function productCreateHandler({ event: { data }, diff --git a/www/apps/resources/app/architectural-modules/workflow-engine/in-memory/page.mdx b/www/apps/resources/app/architectural-modules/workflow-engine/in-memory/page.mdx index fd8978b384..dc25afe86a 100644 --- a/www/apps/resources/app/architectural-modules/workflow-engine/in-memory/page.mdx +++ b/www/apps/resources/app/architectural-modules/workflow-engine/in-memory/page.mdx @@ -14,30 +14,18 @@ For production, it’s recommended to use modules like [Redis Workflow Engine Mo --- -## Install the In-Memory Workflow Engine Module +## Register the In-Memory Workflow Engine Module -The In-Memory Workflow Engine Module is installed by default in your application. +The In-Memory Workflow Engine Module is registered by default in your application. -To install the In-Memory Workflow Engine Module, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/workflow-engine-inmemory@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module into the `modules` property of the exported object in `medusa-config.js`: +Add the module into the `modules` property of the exported object in `medusa-config.js`: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/app/architectural-modules/workflow-engine/redis/page.mdx b/www/apps/resources/app/architectural-modules/workflow-engine/redis/page.mdx index 710e9d6b5e..a13295a7f2 100644 --- a/www/apps/resources/app/architectural-modules/workflow-engine/redis/page.mdx +++ b/www/apps/resources/app/architectural-modules/workflow-engine/redis/page.mdx @@ -10,7 +10,7 @@ The Redis Workflow Engine Module uses Redis to track workflow executions and han --- -## Install the Redis Workflow Engine Module +## Register the Redis Workflow Engine Module -To install Redis Workflow Engine Module, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/workflow-engine-redis@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module into the `modules` property of the exported object in `medusa-config.js`: +Add the module into the `modules` property of the exported object in `medusa-config.js`: export const highlights = [ ["12", "url", "The Redis connection URL."] ] ```js title="medusa-config.js" highlights={highlights} -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/app/commerce-modules/api-key/examples/page.mdx b/www/apps/resources/app/commerce-modules/api-key/examples/page.mdx index 7334ec2a64..392201c1af 100644 --- a/www/apps/resources/app/commerce-modules/api-key/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/api-key/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the API Key Modu ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IApiKeyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IApiKeyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST(request: MedusaRequest, res: MedusaResponse) { const apiKeyModuleService: IApiKeyModuleService = request.scope.resolve( @@ -41,7 +41,7 @@ export async function POST(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeApiKeyModule } from "@medusajs/api-key" +import { initialize as initializeApiKeyModule } from "@medusajs/medusa/api-key" export async function POST(request: Request) { const apiKeyModuleService = await initializeApiKeyModule() @@ -70,8 +70,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IApiKeyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IApiKeyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET(request: MedusaRequest, res: MedusaResponse) { const apiKeyModuleService: IApiKeyModuleService = request.scope.resolve( @@ -90,7 +90,7 @@ export async function GET(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeApiKeyModule } from "@medusajs/api-key" +import { initialize as initializeApiKeyModule } from "@medusajs/medusa/api-key" export async function GET(request: Request) { const apiKeyModuleService = await initializeApiKeyModule() @@ -113,8 +113,8 @@ export async function GET(request: Request) { ```ts collapsibleLines="1-9" expandButtonLabel="Show Imports" import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { IApiKeyModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { IApiKeyModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export async function POST( request: AuthenticatedMedusaRequest, @@ -140,7 +140,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeApiKeyModule } from "@medusajs/api-key" +import { initialize as initializeApiKeyModule } from "@medusajs/medusa/api-key" type ContextType = { params: { @@ -174,8 +174,8 @@ export async function POST(request: Request, { params }: ContextType) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IApiKeyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IApiKeyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST(request: MedusaRequest, res: MedusaResponse) { const apiKeyModuleService: IApiKeyModuleService = request.scope.resolve( @@ -198,7 +198,7 @@ export async function POST(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeApiKeyModule } from "@medusajs/api-key" +import { initialize as initializeApiKeyModule } from "@medusajs/medusa/api-key" type ContextType = { params: { @@ -234,8 +234,8 @@ export async function POST(request: Request, { params }: ContextType) { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" - import { IApiKeyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IApiKeyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: AuthenticatedMedusaRequest, @@ -267,7 +267,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeApiKeyModule } from "@medusajs/api-key" +import { initialize as initializeApiKeyModule } from "@medusajs/medusa/api-key" type ContextType = { params: { 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 3913de5744..d69b7af4bc 100644 --- a/www/apps/resources/app/commerce-modules/api-key/page.mdx +++ b/www/apps/resources/app/commerce-modules/api-key/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The API Key Module is the `@medusajs/api-key` NPM package that provides API-key-related features in your Medusa and Node.js applications. +The API Key Module is the `@medusajs/medusa/api-key` NPM package that provides API-key-related features in your Medusa and Node.js applications. ## 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 `Modules.API_KEY` imported from `@medusajs/utils`. +You can use the API Key Module's main service by resolving from the Medusa container the resource `Modules.API_KEY` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IApiKeyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IApiKeyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IApiKeyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IApiKeyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const apiKeyModuleService: IApiKeyModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IApiKeyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IApiKeyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const apiKeyModuleService: IApiKeyModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/auth/auth-providers/emailpass/page.mdx b/www/apps/resources/app/commerce-modules/auth/auth-providers/emailpass/page.mdx index 2ca08e7188..4a0cef2c82 100644 --- a/www/apps/resources/app/commerce-modules/auth/auth-providers/emailpass/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/auth-providers/emailpass/page.mdx @@ -12,26 +12,26 @@ Using the Emailpass auth module provider, you allow users to register and login --- -## Install the Emailpass Auth Module Provider +## Register the Emailpass Auth Module Provider The Emailpass auth provider is registered by default with the Auth Module. If you want to pass options to the provider, add the provider to the `providers` option of the Auth Module: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... const modules = { // ... [Modules.AUTH]: { - resolve: "@medusajs/auth", + resolve: "@medusajs/medusa/auth", options: { providers: [ // other providers... { - resolve: "@medusajs/auth-emailpass", + resolve: "@medusajs/medusa/auth-emailpass", id: "emailpass", options: { // options... diff --git a/www/apps/resources/app/commerce-modules/auth/auth-providers/github/page.mdx b/www/apps/resources/app/commerce-modules/auth/auth-providers/github/page.mdx index f5cea508c3..24e3f02632 100644 --- a/www/apps/resources/app/commerce-modules/auth/auth-providers/github/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/auth-providers/github/page.mdx @@ -18,7 +18,7 @@ Learn about the authentication flow in [this guide](../../authentication-route/p --- -## Install the Github Auth Module Provider +## Register the Github Auth Module Provider -To install the GitHub auth module provider, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/auth-github@preview -``` - -Next, add the module to the array of providers passed to the Auth Module: +Add the module to the array of providers passed to the Auth Module: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... const modules = { // ... [Modules.AUTH]: { - resolve: "@medusajs/auth", + resolve: "@medusajs/medusa/auth", options: { providers: [ // other providers... { - resolve: "@medusajs/auth-github", + resolve: "@medusajs/medusa/auth-github", id: "github", options: { clientId: process.env.GITHUB_CLIENT_ID, diff --git a/www/apps/resources/app/commerce-modules/auth/auth-providers/google/page.mdx b/www/apps/resources/app/commerce-modules/auth/auth-providers/google/page.mdx index 7c9c0da8a6..ee7df1eb9b 100644 --- a/www/apps/resources/app/commerce-modules/auth/auth-providers/google/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/auth-providers/google/page.mdx @@ -18,7 +18,7 @@ Learn about the authentication flow in [this guide](../../authentication-route/p --- -## Install the Google Auth Module Provider +## Register the Google Auth Module Provider -To install the Google auth module provider, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/auth-google@preview -``` - -Next, add the module to the array of providers passed to the Auth Module: +Add the module to the array of providers passed to the Auth Module: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... const modules = { // ... [Modules.AUTH]: { - resolve: "@medusajs/auth", + resolve: "@medusajs/medusa/auth", options: { providers: [ // other providers... { - resolve: "@medusajs/auth-google", + resolve: "@medusajs/medusa/auth-google", id: "google", options: { clientId: process.env.GOOGLE_CLIENT_ID, diff --git a/www/apps/resources/app/commerce-modules/auth/create-actor-type/page.mdx b/www/apps/resources/app/commerce-modules/auth/create-actor-type/page.mdx index 084a6c8c00..88c6a6c8e6 100644 --- a/www/apps/resources/app/commerce-modules/auth/create-actor-type/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/create-actor-type/page.mdx @@ -13,7 +13,7 @@ Before creating an actor type, you must define a data model the actor type belon The rest of this guide uses this `Manager` data model as an example: ```ts title="src/modules/manager/models/manager.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const Manager = model.define("manager", { id: model.id().primaryKey(), @@ -49,10 +49,10 @@ import { createStep, StepResponse, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { setAuthAppMetadataStep, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" import ManagerModuleService from "../modules/manager/service" type CreateManagerWorkflowInput = { @@ -106,7 +106,7 @@ This workflow accepts the manager’s data and the associated auth identity’s The workflow has two steps: 1. Create the manager using the `createManagerStep`. -2. Set the `app_metadata` property of the associated auth identity using the `setAuthAppMetadataStep` step imported from `@medusajs/core-flows`. You specify the actor type `manager` in the `actorType` property of the step’s input. +2. Set the `app_metadata` property of the associated auth identity using the `setAuthAppMetadataStep` step imported from `@medusajs/medusa/core-flows`. You specify the actor type `manager` in the `actorType` property of the step’s input. --- @@ -127,7 +127,7 @@ import type { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import createManagerWorkflow from "../../workflows/create-manager" type RequestBody = { @@ -308,7 +308,7 @@ For example, create the following workflow that deletes a manager and updates it import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import ManagerModuleService from "../modules/manager/service" export type DeleteManagerWorkflow = { @@ -348,17 +348,17 @@ export const deleteHighlights = [ ```ts title="src/workflows/delete-manager.ts" collapsibleLines="1-15" expandButtonLabel="Show Imports" highlights={deleteHighlights} // other imports -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import { WorkflowData, WorkflowResponse, createWorkflow, transform, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { setAuthAppMetadataStep, useRemoteQueryStep, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" // ... diff --git a/www/apps/resources/app/commerce-modules/auth/examples/page.mdx b/www/apps/resources/app/commerce-modules/auth/examples/page.mdx index dc8a402ec1..4cd080b0d9 100644 --- a/www/apps/resources/app/commerce-modules/auth/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/examples/page.mdx @@ -24,9 +24,9 @@ This example uses the [jsonwebtoken NPM package](https://www.npmjs.com/package/j import { IAuthModuleService, AuthenticationInput, - } from "@medusajs/types" - import { Modules } from "@medusajs/utils" - import { MedusaError } from "@medusajs/utils" + } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" + import { MedusaError } from "@medusajs/framework/utils" import jwt from "jsonwebtoken" export async function POST( @@ -69,7 +69,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeAuthModule } from "@medusajs/auth" +import { initialize as initializeAuthModule } from "@medusajs/medusa/auth" export async function POST(request: Request) { const authModuleService = await initializeAuthModule() @@ -127,9 +127,9 @@ This example uses the [jsonwebtoken NPM package](https://www.npmjs.com/package/j import { IAuthModuleService, AuthenticationInput, - } from "@medusajs/types" - import { Modules } from "@medusajs/utils" - import { MedusaError } from "@medusajs/utils" + } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" + import { MedusaError } from "@medusajs/framework/utils" import jwt from "jsonwebtoken" export async function POST( @@ -174,7 +174,7 @@ export async function POST( ```ts collapsibleLines="1-7" expandButtonLabel="Show Imports" import { NextResponse } from "next/server" -import { initialize as initializeAuthModule } from "@medusajs/auth" +import { initialize as initializeAuthModule } from "@medusajs/medusa/auth" export async function POST(request: Request) { const authModuleService = await initializeAuthModule() @@ -226,8 +226,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IAuthModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IAuthModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -253,7 +253,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeAuthModule } from "@medusajs/auth" +import { initialize as initializeAuthModule } from "@medusajs/medusa/auth" export async function POST(request: Request) { const authModuleService = await initializeAuthModule() @@ -282,8 +282,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IAuthModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IAuthModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -305,7 +305,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeAuthModule } from "@medusajs/auth" +import { initialize as initializeAuthModule } from "@medusajs/medusa/auth" export async function GET(request: Request) { const authModuleService = await initializeAuthModule() @@ -328,8 +328,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IAuthModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IAuthModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -358,7 +358,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeAuthModule } from "@medusajs/auth" +import { initialize as initializeAuthModule } from "@medusajs/medusa/auth" type ContextType = { params: { @@ -394,8 +394,8 @@ export async function POST(request: Request, { params }: ContextType) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IAuthModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IAuthModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( req: MedusaRequest, @@ -417,7 +417,7 @@ export async function DELETE( ```ts import { NextResponse } from "next/server" -import { initialize as initializeAuthModule } from "@medusajs/auth" +import { initialize as initializeAuthModule } from "@medusajs/medusa/auth" type ContextType = { params: { diff --git a/www/apps/resources/app/commerce-modules/auth/module-options/page.mdx b/www/apps/resources/app/commerce-modules/auth/module-options/page.mdx index 4e5cc3a0f5..bb1cb41211 100644 --- a/www/apps/resources/app/commerce-modules/auth/module-options/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/module-options/page.mdx @@ -21,18 +21,18 @@ When the Medusa application starts, these providers are registered and can be us For example: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... module.exports = defineConfig({ // ... modules: { - resolve: "@medusajs/auth", + resolve: "@medusajs/medusa/auth", options: { providers: [ { - resolve: "@medusajs/auth-emailpass", + resolve: "@medusajs/medusa/auth-emailpass", id: "emailpass", options: { // provider options... diff --git a/www/apps/resources/app/commerce-modules/auth/page.mdx b/www/apps/resources/app/commerce-modules/auth/page.mdx index 0392cf615c..dbc46547ae 100644 --- a/www/apps/resources/app/commerce-modules/auth/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Auth Module is the `@medusajs/auth` NPM package that provides authentication-related features in your Medusa and Node.js applications. +The Auth Module is the `@medusajs/medusa/auth` NPM package that provides authentication-related features in your Medusa and Node.js applications. ## How to Use Auth Module's Service -You can use the Auth Module's main service by resolving from the Medusa container the resource `Modules.AUTH` imported from `@medusajs/utils`. +You can use the Auth Module's main service by resolving from the Medusa container the resource `Modules.AUTH` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { IAuthModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { IAuthModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" -import { IAuthModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { IAuthModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const authModuleService: IAuthModuleService = container.resolve( @@ -57,9 +57,9 @@ 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 { Modules } from "@medusajs/utils" +import { createStep } from "@medusajs/framework/workflows-sdk" +import { IAuthModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const authModuleService: IAuthModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/cart/examples/page.mdx b/www/apps/resources/app/commerce-modules/cart/examples/page.mdx index 646c13b76f..49fe34410e 100644 --- a/www/apps/resources/app/commerce-modules/cart/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the Cart Module ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -51,7 +51,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeCartModule } from "@medusajs/cart" +import { initialize as initializeCartModule } from "@medusajs/medusa/cart" export async function POST(request: Request) { const cartModuleService = await initializeCartModule() @@ -89,8 +89,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -112,7 +112,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeCartModule } from "@medusajs/cart" +import { initialize as initializeCartModule } from "@medusajs/medusa/cart" export async function GET(request: Request) { const cartModuleService = await initializeCartModule() @@ -137,8 +137,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -167,7 +167,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeCartModule } from "@medusajs/cart" +import { initialize as initializeCartModule } from "@medusajs/medusa/cart" export async function POST(request: Request) { const cartModuleService = await initializeCartModule() @@ -197,8 +197,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -226,7 +226,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeCartModule } from "@medusajs/cart" +import { initialize as initializeCartModule } from "@medusajs/medusa/cart" export async function POST(request: Request) { const cartModuleService = await initializeCartModule() @@ -255,8 +255,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -284,7 +284,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeCartModule } from "@medusajs/cart" +import { initialize as initializeCartModule } from "@medusajs/medusa/cart" export async function POST(request: Request) { const cartModuleService = await initializeCartModule() @@ -313,8 +313,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -343,7 +343,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeCartModule } from "@medusajs/cart" +import { initialize as initializeCartModule } from "@medusajs/medusa/cart" export async function POST(request: Request) { const cartModuleService = await initializeCartModule() @@ -373,8 +373,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( req: MedusaRequest, @@ -396,7 +396,7 @@ export async function DELETE( ```ts import { NextResponse } from "next/server" -import { initialize as initializeCartModule } from "@medusajs/cart" +import { initialize as initializeCartModule } from "@medusajs/medusa/cart" export async function DELETE(request: Request) { const cartModuleService = await initializeCartModule() @@ -417,8 +417,8 @@ export async function DELETE(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( req: MedusaRequest, @@ -439,8 +439,8 @@ export async function DELETE( ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( req: MedusaRequest, diff --git a/www/apps/resources/app/commerce-modules/cart/page.mdx b/www/apps/resources/app/commerce-modules/cart/page.mdx index e4a331a8e9..6192ee98ef 100644 --- a/www/apps/resources/app/commerce-modules/cart/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Cart Module is the `@medusajs/cart` NPM package that provides cart-related features in your Medusa and Node.js applications. +The Cart Module is the `@medusajs/medusa/cart` NPM package that provides cart-related features in your Medusa and Node.js applications. ## How to Use Cart Module's Service -You can use the Cart Module's main service by resolving from the Medusa container the resource `Modules.CART` imported from `@medusajs/utils`. +You can use the Cart Module's main service by resolving from the Medusa container the resource `Modules.CART` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const cartModuleService: ICartModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { ICartModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { ICartModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const cartModuleService: ICartModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/cart/promotions/page.mdx b/www/apps/resources/app/commerce-modules/cart/promotions/page.mdx index 3e8228f0bc..f7bd4e5023 100644 --- a/www/apps/resources/app/commerce-modules/cart/promotions/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/promotions/page.mdx @@ -47,7 +47,7 @@ import { ComputeActionItemLine, ComputeActionShippingLine, // ... -} from "@medusajs/types" +} from "@medusajs/framework/types" // retrieve the cart const cart = await cartModuleService.retrieveCart("cart_123", { @@ -106,7 +106,7 @@ import { AddItemAdjustmentAction, AddShippingMethodAdjustment, // ... -} from "@medusajs/types" +} from "@medusajs/framework/types" // ... diff --git a/www/apps/resources/app/commerce-modules/currency/examples/page.mdx b/www/apps/resources/app/commerce-modules/currency/examples/page.mdx index 87b13dddb8..468b0d0e63 100644 --- a/www/apps/resources/app/commerce-modules/currency/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/currency/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the Currency Mod ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICurrencyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICurrencyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -38,7 +38,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeCurrencyModule } from "@medusajs/currency" +import { initialize as initializeCurrencyModule } from "@medusajs/medusa/currency" export async function GET(request: Request) { const currencyModuleService = await initializeCurrencyModule() @@ -61,8 +61,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICurrencyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICurrencyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -86,7 +86,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeCurrencyModule } from "@medusajs/currency" +import { initialize as initializeCurrencyModule } from "@medusajs/medusa/currency" export async function GET(request: Request) { const currencyModuleService = await initializeCurrencyModule() diff --git a/www/apps/resources/app/commerce-modules/currency/page.mdx b/www/apps/resources/app/commerce-modules/currency/page.mdx index d96f19bcd0..159ee2ff7c 100644 --- a/www/apps/resources/app/commerce-modules/currency/page.mdx +++ b/www/apps/resources/app/commerce-modules/currency/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Currency Module is the `@medusajs/currency` NPM package that provides currency-related features in your Medusa and Node.js applications. +The Currency Module is the `@medusajs/medusa/currency` NPM package that provides currency-related features in your Medusa and Node.js applications. ## How to Use Currency Module's Service -You can use the Currency Module's main service by resolving from the Medusa container the resource `Modules.CURRENCY` imported from `@medusajs/utils`. +You can use the Currency Module's main service by resolving from the Medusa container the resource `Modules.CURRENCY` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICurrencyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICurrencyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { ICurrencyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICurrencyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const currencyModuleService: ICurrencyModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { ICurrencyModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { ICurrencyModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const currencyModuleService: ICurrencyModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/customer/examples/page.mdx b/www/apps/resources/app/commerce-modules/customer/examples/page.mdx index 333642908e..102350af9c 100644 --- a/www/apps/resources/app/commerce-modules/customer/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/customer/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the Customer Mod ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICustomerModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICustomerModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST(request: MedusaRequest, res: MedusaResponse) { const customerModuleService: ICustomerModuleService = request.scope.resolve( @@ -41,7 +41,7 @@ export async function POST(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeCustomerModule } from "@medusajs/customer" +import { initialize as initializeCustomerModule } from "@medusajs/medusa/customer" export async function POST(request: Request) { const customerModuleService = await initializeCustomerModule() @@ -70,8 +70,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICustomerModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICustomerModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST(request: MedusaRequest, res: MedusaResponse) { const customerModuleService: ICustomerModuleService = request.scope.resolve( @@ -94,7 +94,7 @@ export async function POST(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeCustomerModule } from "@medusajs/customer" +import { initialize as initializeCustomerModule } from "@medusajs/medusa/customer" export async function POST(request: Request) { const customerModuleService = await initializeCustomerModule() @@ -121,8 +121,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICustomerModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICustomerModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST(request: MedusaRequest, res: MedusaResponse) { const customerModuleService: ICustomerModuleService = request.scope.resolve( @@ -144,7 +144,7 @@ export async function POST(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeCustomerModule } from "@medusajs/customer" +import { initialize as initializeCustomerModule } from "@medusajs/medusa/customer" export async function POST(request: Request) { const customerModuleService = await initializeCustomerModule() @@ -170,8 +170,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICustomerModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICustomerModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST(request: MedusaRequest, res: MedusaResponse) { const customerModuleService: ICustomerModuleService = request.scope.resolve( @@ -194,7 +194,7 @@ export async function POST(request: MedusaRequest, res: MedusaResponse) { import { NextResponse } from "next/server" // eslint-disable-next-line prettier/prettier -import { initialize as initializeCustomerModule } from "@medusajs/customer" +import { initialize as initializeCustomerModule } from "@medusajs/medusa/customer" export async function POST(request: Request) { const customerModuleService = await initializeCustomerModule() diff --git a/www/apps/resources/app/commerce-modules/customer/page.mdx b/www/apps/resources/app/commerce-modules/customer/page.mdx index 783b009c0d..422389bab5 100644 --- a/www/apps/resources/app/commerce-modules/customer/page.mdx +++ b/www/apps/resources/app/commerce-modules/customer/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Customer Module is the `@medusajs/customer` NPM package that provides customer-related features in your Medusa and Node.js applications. +The Customer Module is the `@medusajs/medusa/customer` NPM package that provides customer-related features in your Medusa and Node.js applications. ## How to Use Customer Module's Service -You can use the Customer Module's main service by resolving from the Medusa container the resource `Modules.CUSTOMER` imported from `@medusajs/utils`. +You can use the Customer Module's main service by resolving from the Medusa container the resource `Modules.CUSTOMER` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ICustomerModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICustomerModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET(request: MedusaRequest, res: MedusaResponse) { const customerModuleService: ICustomerModuleService = request.scope.resolve( @@ -38,8 +38,8 @@ export async function GET(request: MedusaRequest, res: MedusaResponse) { ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { ICustomerModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ICustomerModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const customerModuleService: ICustomerModuleService = container.resolve( @@ -54,9 +54,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { ICustomerModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { ICustomerModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const customerModuleService: ICustomerModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/fulfillment/module-options/page.mdx b/www/apps/resources/app/commerce-modules/fulfillment/module-options/page.mdx index 54862384e4..570a48615a 100644 --- a/www/apps/resources/app/commerce-modules/fulfillment/module-options/page.mdx +++ b/www/apps/resources/app/commerce-modules/fulfillment/module-options/page.mdx @@ -21,7 +21,7 @@ When the Medusa application starts, these providers are registered and can be us For example: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -29,11 +29,11 @@ module.exports = defineConfig({ // ... modules: { [Modules.FULFILLMENT]: { - resolve: "@medusajs/fulfillment", + resolve: "@medusajs/medusa/fulfillment", options: { providers: [ { - resolve: `@medusajs/fulfillment-manual`, + resolve: `@medusajs/medusa/fulfillment-manual`, id: "manual", options: { // provider options... diff --git a/www/apps/resources/app/commerce-modules/fulfillment/page.mdx b/www/apps/resources/app/commerce-modules/fulfillment/page.mdx index 4e6a3620ef..798ae19a8d 100644 --- a/www/apps/resources/app/commerce-modules/fulfillment/page.mdx +++ b/www/apps/resources/app/commerce-modules/fulfillment/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Fulfillment Module is the `@medusajs/fulfillment` NPM package that provides fulfillment-related features in your Medusa and Node.js applications. +The Fulfillment Module is the `@medusajs/medusa/fulfillment` NPM package that provides fulfillment-related features in your Medusa and Node.js applications. ## How to Use Fulfillment Module's Service -You can use the Fulfillment Module's main service by resolving from the Medusa container the resource `Modules.API_KEY` imported from `@medusajs/utils`. +You can use the Fulfillment Module's main service by resolving from the Medusa container the resource `Modules.API_KEY` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IFulfillmentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IFulfillmentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IFulfillmentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IFulfillmentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const fulfillmentModuleService: IFulfillmentModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IFulfillmentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IFulfillmentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const fulfillmentModuleService: IFulfillmentModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/inventory/examples/page.mdx b/www/apps/resources/app/commerce-modules/inventory/examples/page.mdx index 9eb1b8ade5..92dcd78544 100644 --- a/www/apps/resources/app/commerce-modules/inventory/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/inventory/examples/page.mdx @@ -15,8 +15,8 @@ In this document, you’ll find common examples of how you can use the Inventory ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -42,7 +42,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeInventoryModule } from "@medusajs/inventory-next" +import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next" export async function POST(request: Request) { const inventoryModuleService = await initializeInventoryModule({}) @@ -70,8 +70,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -93,7 +93,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeInventoryModule } from "@medusajs/inventory-next" +import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next" export async function GET(request: Request) { const inventoryModuleService = await initializeInventoryModule({}) @@ -116,8 +116,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -141,7 +141,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeInventoryModule } from "@medusajs/inventory-next" +import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next" type ContextType = { params: { @@ -172,8 +172,8 @@ export async function GET(request: Request, { params }: ContextType) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -199,7 +199,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeInventoryModule } from "@medusajs/inventory-next" +import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next" export async function POST(request: Request) { const inventoryModuleService = await initializeInventoryModule({}) @@ -227,8 +227,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -254,7 +254,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeInventoryModule } from "@medusajs/inventory-next" +import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next" export async function POST(request: Request) { const inventoryModuleService = await initializeInventoryModule({}) @@ -282,8 +282,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -309,7 +309,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeInventoryModule } from "@medusajs/inventory-next" +import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next" export async function POST(request: Request) { const inventoryModuleService = await initializeInventoryModule({}) @@ -337,8 +337,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -364,7 +364,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeInventoryModule } from "@medusajs/inventory-next" +import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next" export async function POST(request: Request) { const inventoryModuleService = await initializeInventoryModule({}) @@ -394,8 +394,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -434,7 +434,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeInventoryModule } from "@medusajs/inventory-next" +import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next" type ContextType = { params: { @@ -481,8 +481,8 @@ export async function POST(request: Request, { params }: ContextType) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( request: MedusaRequest, @@ -504,7 +504,7 @@ export async function DELETE( ```ts -import { initialize as initializeInventoryModule } from "@medusajs/inventory-next" +import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next" type ContextType = { params: { diff --git a/www/apps/resources/app/commerce-modules/inventory/page.mdx b/www/apps/resources/app/commerce-modules/inventory/page.mdx index 8ac1e4d14a..5e261b07b9 100644 --- a/www/apps/resources/app/commerce-modules/inventory/page.mdx +++ b/www/apps/resources/app/commerce-modules/inventory/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Inventory Module is the `@medusajs/inventory-next` NPM package that provides inventory-related features in your Medusa and Node.js applications. +The Inventory Module is the `@medusajs/medusa/inventory-next` NPM package that provides inventory-related features in your Medusa and Node.js applications. ## How to Use Inventory Module's Service -You can use the Inventory Module's main service by resolving from the Medusa container the resource `Modules.INVENTORY` imported from `@medusajs/utils`. +You can use the Inventory Module's main service by resolving from the Medusa container the resource `Modules.INVENTORY` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const inventoryModuleService: IInventoryService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IInventoryService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IInventoryService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const inventoryModuleService: IInventoryService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/order/page.mdx b/www/apps/resources/app/commerce-modules/order/page.mdx index 50318def02..350d07220e 100644 --- a/www/apps/resources/app/commerce-modules/order/page.mdx +++ b/www/apps/resources/app/commerce-modules/order/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Order Module is the `@medusajs/order` NPM package that provides order-related features in your Medusa and Node.js applications. +The Order Module is the `@medusajs/medusa/order` NPM package that provides order-related features in your Medusa and Node.js applications. ## How to Use Order Module's Service -You can use the Order Module's main service by resolving from the Medusa container the resource `Modules.ORDER` imported from `@medusajs/utils`. +You can use the Order Module's main service by resolving from the Medusa container the resource `Modules.ORDER` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IOrderModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IOrderModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IOrderModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IOrderModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const orderModuleService: IOrderModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IOrderModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IOrderModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const orderModuleService: IOrderModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/order/promotion-adjustments/page.mdx b/www/apps/resources/app/commerce-modules/order/promotion-adjustments/page.mdx index be72e65dd0..f7ccc4fdbc 100644 --- a/www/apps/resources/app/commerce-modules/order/promotion-adjustments/page.mdx +++ b/www/apps/resources/app/commerce-modules/order/promotion-adjustments/page.mdx @@ -53,7 +53,7 @@ import { ComputeActionItemLine, ComputeActionShippingLine, // ... -} from "@medusajs/types" +} from "@medusajs/framework/types" // ... @@ -116,7 +116,7 @@ import { AddItemAdjustmentAction, AddShippingMethodAdjustment, // ... -} from "@medusajs/types" +} from "@medusajs/framework/types" // ... diff --git a/www/apps/resources/app/commerce-modules/payment/examples/page.mdx b/www/apps/resources/app/commerce-modules/payment/examples/page.mdx index 6a9167a342..ef04b477ae 100644 --- a/www/apps/resources/app/commerce-modules/payment/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the Payment Modu ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPaymentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPaymentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -46,7 +46,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePaymentModule } from "@medusajs/payment" +import { initialize as initializePaymentModule } from "@medusajs/medusa/payment" export async function POST(request: Request) { const paymentModuleService = await initializePaymentModule() @@ -77,8 +77,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPaymentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPaymentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -110,7 +110,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePaymentModule } from "@medusajs/payment" +import { initialize as initializePaymentModule } from "@medusajs/medusa/payment" export async function POST(request: Request) { const paymentModuleService = await initializePaymentModule() @@ -143,8 +143,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPaymentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPaymentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -170,7 +170,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializePaymentModule } from "@medusajs/payment" +import { initialize as initializePaymentModule } from "@medusajs/medusa/payment" export async function POST(request: Request) { const paymentModuleService = await initializePaymentModule() @@ -197,8 +197,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPaymentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPaymentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -225,7 +225,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePaymentModule } from "@medusajs/payment" +import { initialize as initializePaymentModule } from "@medusajs/medusa/payment" export async function POST(request: Request) { const paymentModuleService = await initializePaymentModule() @@ -253,8 +253,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPaymentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPaymentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -280,7 +280,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializePaymentModule } from "@medusajs/payment" +import { initialize as initializePaymentModule } from "@medusajs/medusa/payment" export async function GET(request: Request) { const paymentModuleService = await initializePaymentModule() @@ -307,8 +307,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPaymentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPaymentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -334,7 +334,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePaymentModule } from "@medusajs/payment" +import { initialize as initializePaymentModule } from "@medusajs/medusa/payment" export async function POST(request: Request) { const paymentModuleService = await initializePaymentModule() diff --git a/www/apps/resources/app/commerce-modules/payment/module-options/page.mdx b/www/apps/resources/app/commerce-modules/payment/module-options/page.mdx index 3e8af8b055..21fc5aa2eb 100644 --- a/www/apps/resources/app/commerce-modules/payment/module-options/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/module-options/page.mdx @@ -102,7 +102,7 @@ When the Medusa application starts, these providers are registered and can be us For example: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -110,11 +110,11 @@ module.exports = defineConfig({ // ... modules: { [Modules.PAYMENT]: { - resolve: "@medusajs/payment", + resolve: "@medusajs/medusa/payment", options: { providers: [ { - resolve: "@medusajs/payment-stripe", + resolve: "@medusajs/medusa/payment-stripe", id: "stripe", options: { // ... diff --git a/www/apps/resources/app/commerce-modules/payment/page.mdx b/www/apps/resources/app/commerce-modules/payment/page.mdx index 56e69bda51..5a21929f14 100644 --- a/www/apps/resources/app/commerce-modules/payment/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/page.mdx @@ -7,11 +7,11 @@ export const metadata = { # {metadata.title} -The Payment Module is the `@medusajs/payment` NPM package that provides payment-related features in your Medusa and Node.js applications. +The Payment Module is the `@medusajs/medusa/payment` NPM package that provides payment-related features in your Medusa and Node.js applications. ## How to Use Payment Module's Service -You can use the Payment Module's main service by resolving from the Medusa container the resource `Modules.PAYMENT` imported from `@medusajs/utils`. +You can use the Payment Module's main service by resolving from the Medusa container the resource `Modules.PAYMENT` imported from `@medusajs/framework/utils`. For example: @@ -20,8 +20,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPaymentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPaymentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -42,8 +42,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IPaymentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPaymentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const paymentModuleService: IPaymentModuleService = container.resolve( @@ -59,9 +59,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IPaymentModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IPaymentModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const paymentModuleService: IPaymentModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/payment/payment-provider/page.mdx b/www/apps/resources/app/commerce-modules/payment/payment-provider/page.mdx index 41879f08db..431c248b05 100644 --- a/www/apps/resources/app/commerce-modules/payment/payment-provider/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/payment-provider/page.mdx @@ -30,7 +30,7 @@ The Payment Module provides a `system` payment provider that acts as a placehold ## How are Payment Providers Created? -A payment provider is a TypeScript or JavaScript class that extends the `AbstractPaymentProvider` imported from `@medusajs/utils`. It can then be exported as the main service of a module. +A payment provider is a TypeScript or JavaScript class that extends the `AbstractPaymentProvider` imported from `@medusajs/framework/utils`. It can then be exported as the main service of a module. diff --git a/www/apps/resources/app/commerce-modules/payment/payment-provider/stripe/page.mdx b/www/apps/resources/app/commerce-modules/payment/payment-provider/stripe/page.mdx index 80881645d2..e01581b7bc 100644 --- a/www/apps/resources/app/commerce-modules/payment/payment-provider/stripe/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/payment-provider/stripe/page.mdx @@ -20,7 +20,7 @@ These features are also available in a safe test environment, allowing for a con --- -## Install the Stripe Module Provider +## Register the Stripe Module Provider -To install the Stripe Module Provider, run the following command in the directory of your Medusa application: - -```bash npm2yarn -npm install @medusajs/payment-stripe@preview -``` - - - -Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future. - - - -Next, add the module to the array of providers passed to the Payment Module: +Add the module to the array of providers passed to the Payment Module: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -60,11 +48,11 @@ module.exports = defineConfig({ // ... modules: { [Modules.PAYMENT]: { - resolve: "@medusajs/payment", + resolve: "@medusajs/medusa/payment", options: { providers: [ { - resolve: "@medusajs/payment-stripe", + resolve: "@medusajs/medusa/payment-stripe", id: "stripe", options: { apiKey: process.env.STRIPE_API_KEY, diff --git a/www/apps/resources/app/commerce-modules/pricing/examples/page.mdx b/www/apps/resources/app/commerce-modules/pricing/examples/page.mdx index 7275c1d478..c83cdde18b 100644 --- a/www/apps/resources/app/commerce-modules/pricing/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/pricing/examples/page.mdx @@ -15,8 +15,8 @@ In this document, you’ll find common examples of how you can use the Pricing M ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPricingModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPricingModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -50,7 +50,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePricingModule } from "@medusajs/pricing" +import { initialize as initializePricingModule } from "@medusajs/medusa/pricing" export async function POST(request: Request) { const pricingModuleService = await initializePricingModule() @@ -86,8 +86,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPricingModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPricingModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -109,7 +109,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializePricingModule } from "@medusajs/pricing" +import { initialize as initializePricingModule } from "@medusajs/medusa/pricing" export async function GET(request: Request) { const pricingModuleService = await initializePricingModule() @@ -132,8 +132,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPricingModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPricingModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -155,7 +155,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializePricingModule } from "@medusajs/pricing" +import { initialize as initializePricingModule } from "@medusajs/medusa/pricing" export async function GET(request: Request) { const pricingModuleService = await initializePricingModule() @@ -178,8 +178,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPricingModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPricingModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -212,7 +212,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePricingModule } from "@medusajs/pricing" +import { initialize as initializePricingModule } from "@medusajs/medusa/pricing" export async function POST(request: Request) { const pricingModuleService = await initializePricingModule() @@ -247,9 +247,9 @@ export async function POST(request: Request) { ```ts collapsibleLines="1-8" expandButtonLabel="Show Imports" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPricingModuleService } from "@medusajs/types" - import { PriceListType } from "@medusajs/utils" - import { Modules } from "@medusajs/utils" + import { IPricingModuleService } from "@medusajs/framework/types" + import { PriceListType } from "@medusajs/framework/utils" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -290,8 +290,8 @@ export async function POST( import { NextResponse } from "next/server" import { PriceListType } from "@medusajs/medusa" -import { initialize as initializePricingModule } from "@medusajs/pricing" -import { PriceListType } from "@medusajs/utils" +import { initialize as initializePricingModule } from "@medusajs/medusa/pricing" +import { PriceListType } from "@medusajs/framework/utils" export async function POST(request: Request) { const pricingModuleService = await initializePricingModule() @@ -332,8 +332,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPricingModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPricingModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -364,7 +364,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePricingModule } from "@medusajs/pricing" +import { initialize as initializePricingModule } from "@medusajs/medusa/pricing" export async function GET(request: Request) { const pricingModuleService = await initializePricingModule() diff --git a/www/apps/resources/app/commerce-modules/pricing/page.mdx b/www/apps/resources/app/commerce-modules/pricing/page.mdx index d05e3813ac..a704257822 100644 --- a/www/apps/resources/app/commerce-modules/pricing/page.mdx +++ b/www/apps/resources/app/commerce-modules/pricing/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Pricing Module is the `@medusajs/pricing` NPM package that provides pricing-related features in your Medusa and Node.js applications. +The Pricing Module is the `@medusajs/medusa/pricing` NPM package that provides pricing-related features in your Medusa and Node.js applications. ## How to Use Pricing Module's Service -You can use the Pricing Module's main service by resolving from the Medusa container the resource `Modules.PRICING` imported from `@medusajs/utils`. +You can use the Pricing Module's main service by resolving from the Medusa container the resource `Modules.PRICING` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPricingModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPricingModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IPricingModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPricingModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const pricingModuleService: IPricingModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IPricingModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IPricingModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const pricingModuleService: IPricingModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/product/examples/page.mdx b/www/apps/resources/app/commerce-modules/product/examples/page.mdx index 2a5f8b5ec2..c446b308e2 100644 --- a/www/apps/resources/app/commerce-modules/product/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the Product Modu ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST(request: MedusaRequest, res: MedusaResponse) { const productModuleService: IProductModuleService = request.scope.resolve( @@ -54,7 +54,7 @@ export async function POST(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeProductModule } from "@medusajs/product" +import { initialize as initializeProductModule } from "@medusajs/medusa/product" export async function POST(request: Request) { const productModuleService = await initializeProductModule() @@ -96,8 +96,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET(request: MedusaRequest, res: MedusaResponse) { const productModuleService: IProductModuleService = request.scope.resolve( @@ -116,7 +116,7 @@ export async function GET(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeProductModule } from "@medusajs/product" +import { initialize as initializeProductModule } from "@medusajs/medusa/product" export async function GET(request: Request) { const productModuleService = await initializeProductModule() @@ -139,8 +139,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET(request: MedusaRequest, res: MedusaResponse) { const productModuleService: IProductModuleService = request.scope.resolve( @@ -159,7 +159,7 @@ export async function GET(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeProductModule } from "@medusajs/product" +import { initialize as initializeProductModule } from "@medusajs/medusa/product" export async function GET( request: Request, @@ -186,8 +186,8 @@ export async function GET( ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET(request: MedusaRequest, res: MedusaResponse) { const productModuleService: IProductModuleService = request.scope.resolve( @@ -208,7 +208,7 @@ export async function GET(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeProductModule } from "@medusajs/product" +import { initialize as initializeProductModule } from "@medusajs/medusa/product" export async function GET(request: Request) { const productModuleService = await initializeProductModule() @@ -233,8 +233,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST(request: MedusaRequest, res: MedusaResponse) { const productModuleService: IProductModuleService = request.scope.resolve( @@ -253,7 +253,7 @@ export async function POST(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeProductModule } from "@medusajs/product" +import { initialize as initializeProductModule } from "@medusajs/medusa/product" export async function GET(request: Request) { const productModuleService = await initializeProductModule() @@ -276,8 +276,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST(request: MedusaRequest, res: MedusaResponse) { const productModuleService: IProductModuleService = request.scope.resolve( @@ -298,7 +298,7 @@ export async function POST(request: MedusaRequest, res: MedusaResponse) { ```ts import { NextResponse } from "next/server" -import { initialize as initializeProductModule } from "@medusajs/product" +import { initialize as initializeProductModule } from "@medusajs/medusa/product" export async function GET( request: Request, diff --git a/www/apps/resources/app/commerce-modules/product/guides/price-with-taxes/page.mdx b/www/apps/resources/app/commerce-modules/product/guides/price-with-taxes/page.mdx index 3918f3441e..a1e91676a5 100644 --- a/www/apps/resources/app/commerce-modules/product/guides/price-with-taxes/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/guides/price-with-taxes/page.mdx @@ -22,7 +22,7 @@ You'll need the following resources for the taxes calculation: import { Modules, ContainerRegistrationKeys, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" // In an API route, workflow step, etc... const query = container.resolve(ContainerRegistrationKeys.QUERY) @@ -38,7 +38,7 @@ const taxModuleService = container.resolve( After resolving the resources, use Query to retrieve the products with the variants' prices for a context: ```ts -import { QueryContext } from "@medusajs/utils" +import { QueryContext } from "@medusajs/framework/utils" // ... @@ -80,7 +80,7 @@ To retrieve the tax line of each product, first, add the following utility metho import { HttpTypes, TaxableItemDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" // ... const asTaxItem = (product: HttpTypes.StoreProduct): TaxableItemDTO[] => { @@ -116,7 +116,7 @@ Then, use it when retrieving the tax lines of the products retrieved earlier: // other imports... import { ItemTaxLineDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" // ... const taxLines = (await taxModuleService.getTaxLines( @@ -179,7 +179,7 @@ export const calculateTaxHighlights = [ // other imports... import { calculateAmountsWithTax, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" // ... products.forEach((product) => { @@ -204,7 +204,7 @@ products.forEach((product) => { For each product variant, you: 1. Retrieve its tax lines from the `taxLinesMap`. -2. Calculate its prices with and without taxes using the `calculateAmountsWithTax` function imported from `@medusajs/utils`. +2. Calculate its prices with and without taxes using the `calculateAmountsWithTax` function imported from `@medusajs/framework/utils`. 3. The `calculateAmountsWithTax` function returns an object having two properties: - `priceWithTax`: The variant's price with the taxes applied. - `priceWithoutTax`: The variant's price without taxes applied. diff --git a/www/apps/resources/app/commerce-modules/product/guides/price/page.mdx b/www/apps/resources/app/commerce-modules/product/guides/price/page.mdx index e5b5988627..aecc1c9f5a 100644 --- a/www/apps/resources/app/commerce-modules/product/guides/price/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/guides/price/page.mdx @@ -62,7 +62,7 @@ To retrieve calculated prices of variants based on a context, retrieve the produ For example: ```ts highlights={[["6"], ["12"], ["13"], ["14"], ["15"], ["16"], ["17"]]} -import { QueryContext } from "@medusajs/utils" +import { QueryContext } from "@medusajs/framework/utils" // ... diff --git a/www/apps/resources/app/commerce-modules/product/page.mdx b/www/apps/resources/app/commerce-modules/product/page.mdx index 44aa43ac37..4d1146660f 100644 --- a/www/apps/resources/app/commerce-modules/product/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Product Module is the `@medusajs/product` NPM package that provides product-related features in your Medusa and Node.js applications. +The Product Module is the `@medusajs/medusa/product` NPM package that provides product-related features in your Medusa and Node.js applications. ## How to Use Product Module's Service -You can use the Product Module's main service by resolving from the Medusa container the resource `Modules.PRODUCT` imported from `@medusajs/utils`. +You can use the Product Module's main service by resolving from the Medusa container the resource `Modules.PRODUCT` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET(request: MedusaRequest, res: MedusaResponse) { const productModuleService: IProductModuleService = request.scope.resolve( @@ -38,8 +38,8 @@ export async function GET(request: MedusaRequest, res: MedusaResponse) { ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const productModuleService: IProductModuleService = container.resolve( @@ -54,9 +54,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const productModuleService: IProductModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/promotion/examples/page.mdx b/www/apps/resources/app/commerce-modules/promotion/examples/page.mdx index dcad198ab9..503beb8cc2 100644 --- a/www/apps/resources/app/commerce-modules/promotion/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/promotion/examples/page.mdx @@ -15,8 +15,8 @@ In this document, you’ll find common examples of how you can use the Promotion ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPromotionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPromotionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -47,7 +47,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePromotionModule } from "@medusajs/promotion" +import { initialize as initializePromotionModule } from "@medusajs/medusa/promotion" export async function POST(request: Request) { const promotionModuleService = await initializePromotionModule() @@ -80,8 +80,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPromotionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPromotionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -108,7 +108,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePromotionModule } from "@medusajs/promotion" +import { initialize as initializePromotionModule } from "@medusajs/medusa/promotion" export async function POST(request: Request) { const promotionModuleService = await initializePromotionModule() @@ -137,8 +137,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPromotionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPromotionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -176,7 +176,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializePromotionModule } from "@medusajs/promotion" +import { initialize as initializePromotionModule } from "@medusajs/medusa/promotion" export async function POST(request: Request) { const promotionModuleService = await initializePromotionModule() @@ -215,8 +215,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPromotionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPromotionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -238,7 +238,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializePromotionModule } from "@medusajs/promotion" +import { initialize as initializePromotionModule } from "@medusajs/medusa/promotion" export async function GET(request: Request) { const promotionModuleService = await initializePromotionModule() diff --git a/www/apps/resources/app/commerce-modules/promotion/page.mdx b/www/apps/resources/app/commerce-modules/promotion/page.mdx index 95afe2bd79..e154b7d5c6 100644 --- a/www/apps/resources/app/commerce-modules/promotion/page.mdx +++ b/www/apps/resources/app/commerce-modules/promotion/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Promotion Module is the `@medusajs/promotion` NPM package that provides promotion-related features in your Medusa and Node.js applications. +The Promotion Module is the `@medusajs/medusa/promotion` NPM package that provides promotion-related features in your Medusa and Node.js applications. ## 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 `Modules.PROMOTION` imported from `@medusajs/utils`. +You can use the Promotion Module's main service by resolving from the Medusa container the resource `Modules.PROMOTION` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IPromotionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPromotionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IPromotionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IPromotionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const promotionModuleService: IPromotionModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IPromotionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IPromotionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const promotionModuleService: IPromotionModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/region/examples/page.mdx b/www/apps/resources/app/commerce-modules/region/examples/page.mdx index 53fb219285..6ae287bb90 100644 --- a/www/apps/resources/app/commerce-modules/region/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/region/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the Region Modul ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IRegionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IRegionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -43,7 +43,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeRegionModule } from "@medusajs/region" +import { initialize as initializeRegionModule } from "@medusajs/medusa/region" export async function POST(request: Request) { const regionModuleService = await initializeRegionModule() @@ -71,8 +71,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IRegionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IRegionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -94,7 +94,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeRegionModule } from "@medusajs/region" +import { initialize as initializeRegionModule } from "@medusajs/medusa/region" export async function GET(request: Request) { const regionModuleService = await initializeRegionModule() @@ -117,8 +117,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IRegionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IRegionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -140,7 +140,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeRegionModule } from "@medusajs/region" +import { initialize as initializeRegionModule } from "@medusajs/medusa/region" export async function GET(request: Request) { const regionModuleService = await initializeRegionModule() @@ -163,8 +163,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IRegionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IRegionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -188,7 +188,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeRegionModule } from "@medusajs/region" +import { initialize as initializeRegionModule } from "@medusajs/medusa/region" export async function POST(request: Request) { const regionModuleService = await initializeRegionModule() @@ -213,8 +213,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IRegionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IRegionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( req: MedusaRequest, @@ -236,7 +236,7 @@ export async function DELETE( ```ts import { NextResponse } from "next/server" -import { initialize as initializeRegionModule } from "@medusajs/region" +import { initialize as initializeRegionModule } from "@medusajs/medusa/region" export async function DELETE(request: Request) { const regionModuleService = await initializeRegionModule() diff --git a/www/apps/resources/app/commerce-modules/region/page.mdx b/www/apps/resources/app/commerce-modules/region/page.mdx index 0e77c8363a..08145bde63 100644 --- a/www/apps/resources/app/commerce-modules/region/page.mdx +++ b/www/apps/resources/app/commerce-modules/region/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Region Module is the `@medusajs/region` NPM package that provides region-related features in your Medusa and Node.js applications. +The Region Module is the `@medusajs/medusa/region` NPM package that provides region-related features in your Medusa and Node.js applications. ## How to Use Region Module's Service -You can use the Region Module's main service by resolving from the Medusa container the resource `Modules.REGION` imported from `@medusajs/utils`. +You can use the Region Module's main service by resolving from the Medusa container the resource `Modules.REGION` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IRegionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IRegionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IRegionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IRegionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const regionModuleService: IRegionModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IRegionModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IRegionModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const regionModuleService: IRegionModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/sales-channel/examples/page.mdx b/www/apps/resources/app/commerce-modules/sales-channel/examples/page.mdx index 488c4e1e57..df2e4c248b 100644 --- a/www/apps/resources/app/commerce-modules/sales-channel/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/sales-channel/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the Sales Channe ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ISalesChannelModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ISalesChannelModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -41,7 +41,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeSalesChannelModule } from "@medusajs/sales-channel" +import { initialize as initializeSalesChannelModule } from "@medusajs/medusa/sales-channel" export async function POST(request: Request) { const salesChannelModuleService = await initializeSalesChannelModule() @@ -66,8 +66,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ISalesChannelModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ISalesChannelModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -88,7 +88,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeSalesChannelModule } from "@medusajs/sales-channel" +import { initialize as initializeSalesChannelModule } from "@medusajs/medusa/sales-channel" export async function GET(request: Request) { const salesChannelModuleService = await initializeSalesChannelModule() @@ -111,8 +111,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ISalesChannelModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ISalesChannelModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -137,7 +137,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeSalesChannelModule } from "@medusajs/sales-channel" +import { initialize as initializeSalesChannelModule } from "@medusajs/medusa/sales-channel" export async function GET(request: Request) { const salesChannelModuleService = await initializeSalesChannelModule() @@ -162,8 +162,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ISalesChannelModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ISalesChannelModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -189,7 +189,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeSalesChannelModule } from "@medusajs/sales-channel" +import { initialize as initializeSalesChannelModule } from "@medusajs/medusa/sales-channel" export async function POST(request: Request) { const salesChannelModuleService = await initializeSalesChannelModule() @@ -215,8 +215,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ISalesChannelModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ISalesChannelModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( request: MedusaRequest, @@ -237,7 +237,7 @@ export async function DELETE( ```ts import { NextResponse } from "next/server" -import { initialize as initializeSalesChannelModule } from "@medusajs/sales-channel" +import { initialize as initializeSalesChannelModule } from "@medusajs/medusa/sales-channel" export async function DELETE(request: Request) { const salesChannelModuleService = await initializeSalesChannelModule() 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 97357e1e75..9ebb0d2fb6 100644 --- a/www/apps/resources/app/commerce-modules/sales-channel/page.mdx +++ b/www/apps/resources/app/commerce-modules/sales-channel/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Sales Channel Module is the `@medusajs/sales-channel` NPM package that provides sales-channel-related features in your Medusa and Node.js applications. +The Sales Channel Module is the `@medusajs/medusa/sales-channel` NPM package that provides sales-channel-related features in your Medusa and Node.js applications. ## 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 `Modules.SALES_CHANNEL` imported from `@medusajs/utils`. +You can use the Sales Channel Module's main service by resolving from the Medusa container the resource `Modules.SALES_CHANNEL` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ISalesChannelModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ISalesChannelModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -40,8 +40,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { ISalesChannelModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ISalesChannelModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const salesChannelModuleService: ISalesChannelModuleService = @@ -55,9 +55,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { ISalesChannelModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { ISalesChannelModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const salesChannelModuleService: ISalesChannelModuleService = diff --git a/www/apps/resources/app/commerce-modules/stock-location/examples/page.mdx b/www/apps/resources/app/commerce-modules/stock-location/examples/page.mdx index dc97842260..e6539e9890 100644 --- a/www/apps/resources/app/commerce-modules/stock-location/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/stock-location/examples/page.mdx @@ -15,8 +15,8 @@ In this document, you’ll find common examples of how you can use the Stock Loc ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStockLocationService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStockLocationService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -41,7 +41,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeStockLocationModule } from "@medusajs/stock-location-next" +import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location-next" export async function POST(request: Request) { const stockLocationModuleService = await initializeStockLocationModule({}) @@ -66,8 +66,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStockLocationService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStockLocationService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -88,7 +88,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeStockLocationModule } from "@medusajs/stock-location-next" +import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location-next" export async function GET(request: Request) { const stockLocationModuleService = await initializeStockLocationModule({}) @@ -111,8 +111,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStockLocationService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStockLocationService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -143,7 +143,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeStockLocationModule } from "@medusajs/stock-location-next" +import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location-next" export async function POST(request: Request) { const stockLocationModuleService = await initializeStockLocationModule({}) @@ -176,8 +176,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStockLocationService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStockLocationService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( request: MedusaRequest, @@ -198,7 +198,7 @@ export async function DELETE( ```ts import { NextResponse } from "next/server" -import { initialize as initializeStockLocationModule } from "@medusajs/stock-location-next" +import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location-next" export async function DELETE(request: Request) { const stockLocationModuleService = await initializeStockLocationModule({}) 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 7f797747e1..982a7afbc8 100644 --- a/www/apps/resources/app/commerce-modules/stock-location/page.mdx +++ b/www/apps/resources/app/commerce-modules/stock-location/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Stock Location Module is the `@medusajs/stock-location-next` NPM package that provides stock-location-related features in your Medusa and Node.js applications. +The Stock Location Module is the `@medusajs/medusa/stock-location-next` NPM package that provides stock-location-related features in your Medusa and Node.js applications. ## 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 `Modules.STOCK_LOCATION` imported from `@medusajs/utils`. +You can use the Stock Location Module's main service by resolving from the Medusa container the resource `Modules.STOCK_LOCATION` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStockLocationService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStockLocationService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -40,8 +40,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IStockLocationService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStockLocationService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const stockLocationModuleService: IStockLocationService = container.resolve( @@ -56,9 +56,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IStockLocationService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IStockLocationService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const stockLocationModuleService: IStockLocationService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/store/examples/page.mdx b/www/apps/resources/app/commerce-modules/store/examples/page.mdx index b97fc5d40b..8a706681c3 100644 --- a/www/apps/resources/app/commerce-modules/store/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/store/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the Store Module ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStoreModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStoreModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -48,7 +48,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeStoreModule } from "@medusajs/store" +import { initialize as initializeStoreModule } from "@medusajs/medusa/store" export async function POST(request: Request) { const storeModuleService = await initializeStoreModule() @@ -81,8 +81,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStoreModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStoreModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -104,7 +104,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeStoreModule } from "@medusajs/store" +import { initialize as initializeStoreModule } from "@medusajs/medusa/store" export async function GET(request: Request) { const storeModuleService = await initializeStoreModule() @@ -129,8 +129,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStoreModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStoreModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -154,7 +154,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeStoreModule } from "@medusajs/store" +import { initialize as initializeStoreModule } from "@medusajs/medusa/store" export async function GET(request: Request, { params }: ContextType) { const storeModuleService = await initializeStoreModule() @@ -177,8 +177,8 @@ export async function GET(request: Request, { params }: ContextType) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStoreModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStoreModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( request: MedusaRequest, @@ -204,7 +204,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeStoreModule } from "@medusajs/store" +import { initialize as initializeStoreModule } from "@medusajs/medusa/store" export async function POST(request: Request, { params }: ContextType) { const storeModuleService = await initializeStoreModule() @@ -229,8 +229,8 @@ export async function POST(request: Request, { params }: ContextType) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStoreModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStoreModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( request: MedusaRequest, @@ -252,7 +252,7 @@ export async function DELETE( ```ts import { NextResponse } from "next/server" -import { initialize as initializeStoreModule } from "@medusajs/store" +import { initialize as initializeStoreModule } from "@medusajs/medusa/store" export async function DELETE(request: Request, { params }: ContextType) { const storeModuleService = await initializeStoreModule() diff --git a/www/apps/resources/app/commerce-modules/store/page.mdx b/www/apps/resources/app/commerce-modules/store/page.mdx index 7fb4aeed90..607b263742 100644 --- a/www/apps/resources/app/commerce-modules/store/page.mdx +++ b/www/apps/resources/app/commerce-modules/store/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Store Module is the `@medusajs/store` NPM package that provides store-related features in your Medusa and Node.js applications. +The Store Module is the `@medusajs/medusa/store` NPM package that provides store-related features in your Medusa and Node.js applications. ## How to Use Store Module's Service -You can use the Store Module's main service by resolving from the Medusa container the resource `Modules.STORE` imported from `@medusajs/utils`. +You can use the Store Module's main service by resolving from the Medusa container the resource `Modules.STORE` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IStoreModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStoreModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( request: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IStoreModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IStoreModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const storeModuleService: IStoreModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IStoreModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IStoreModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const storeModuleService: IStoreModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/tax/examples/page.mdx b/www/apps/resources/app/commerce-modules/tax/examples/page.mdx index 56642c5316..5b8e4e9b7d 100644 --- a/www/apps/resources/app/commerce-modules/tax/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/tax/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the Tax Module i ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ITaxModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ITaxModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -46,7 +46,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeTaxModule } from "@medusajs/tax" +import { initialize as initializeTaxModule } from "@medusajs/medusa/tax" export async function POST(request: Request) { const taxModuleService = await initializeTaxModule() @@ -77,8 +77,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ITaxModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ITaxModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -100,7 +100,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeTaxModule } from "@medusajs/tax" +import { initialize as initializeTaxModule } from "@medusajs/medusa/tax" export async function GET(request: Request) { const taxModuleService = await initializeTaxModule() @@ -123,8 +123,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ITaxModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ITaxModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -162,7 +162,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeTaxModule } from "@medusajs/tax" +import { initialize as initializeTaxModule } from "@medusajs/medusa/tax" export async function POST(request: Request) { const taxModuleService = await initializeTaxModule() @@ -201,8 +201,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ITaxModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ITaxModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -224,7 +224,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeTaxModule } from "@medusajs/tax" +import { initialize as initializeTaxModule } from "@medusajs/medusa/tax" export async function GET(request: Request) { const taxModuleService = await initializeTaxModule() @@ -247,8 +247,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ITaxModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ITaxModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -296,7 +296,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeTaxModule } from "@medusajs/tax" +import { initialize as initializeTaxModule } from "@medusajs/medusa/tax" export async function GET(request: Request) { const taxModuleService = await initializeTaxModule() diff --git a/www/apps/resources/app/commerce-modules/tax/module-options/page.mdx b/www/apps/resources/app/commerce-modules/tax/module-options/page.mdx index 6f58db2e3e..b983ba5f71 100644 --- a/www/apps/resources/app/commerce-modules/tax/module-options/page.mdx +++ b/www/apps/resources/app/commerce-modules/tax/module-options/page.mdx @@ -19,7 +19,7 @@ The `providers` option is an array of either tax module providers, tax plugins, When the Medusa application starts, these providers are registered and can be used to retrieve tax lines. ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -27,7 +27,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.TAX]: { - resolve: "@medusajs/tax", + resolve: "@medusajs/medusa/tax", options: { providers: [ { diff --git a/www/apps/resources/app/commerce-modules/tax/page.mdx b/www/apps/resources/app/commerce-modules/tax/page.mdx index 8a42beb45c..a592c6193f 100644 --- a/www/apps/resources/app/commerce-modules/tax/page.mdx +++ b/www/apps/resources/app/commerce-modules/tax/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The Tax Module is the `@medusajs/tax` NPM package that provides tax-related features in your Medusa and Node.js applications. +The Tax Module is the `@medusajs/medusa/tax` NPM package that provides tax-related features in your Medusa and Node.js applications. ## How to Use Tax Module's Service -You can use the Tax Module's main service by resolving from the Medusa container the resource `Modules.TAX` imported from `@medusajs/utils`. +You can use the Tax Module's main service by resolving from the Medusa container the resource `Modules.TAX` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { ITaxModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ITaxModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { ITaxModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { ITaxModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const taxModuleService: ITaxModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { ITaxModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { ITaxModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const taxModuleService: ITaxModuleService = container.resolve( diff --git a/www/apps/resources/app/commerce-modules/user/examples/page.mdx b/www/apps/resources/app/commerce-modules/user/examples/page.mdx index 475a804777..75ebe6b083 100644 --- a/www/apps/resources/app/commerce-modules/user/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/user/examples/page.mdx @@ -15,8 +15,8 @@ In this guide, you’ll find common examples of how you can use the User Module ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -42,7 +42,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeUserModule } from "@medusajs/user" +import { initialize as initializeUserModule } from "@medusajs/medusa/user" export async function POST(request: Request) { const userModuleService = await initializeUserModule() @@ -71,8 +71,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -94,7 +94,7 @@ export async function GET( ```ts import { NextResponse } from "next/server" -import { initialize as initializeUserModule } from "@medusajs/user" +import { initialize as initializeUserModule } from "@medusajs/medusa/user" export async function GET(request: Request) { const userModuleService = await initializeUserModule() @@ -117,8 +117,8 @@ export async function GET(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -143,7 +143,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeUserModule } from "@medusajs/user" +import { initialize as initializeUserModule } from "@medusajs/medusa/user" export async function POST(request: Request) { const userModuleService = await initializeUserModule() @@ -171,8 +171,8 @@ export async function POST(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function DELETE( req: MedusaRequest, @@ -192,7 +192,7 @@ export async function DELETE( ```ts import { NextResponse } from "next/server" -import { initialize as initializeUserModule } from "@medusajs/user" +import { initialize as initializeUserModule } from "@medusajs/medusa/user" export async function DELETE(request: Request) { const userModuleService = await initializeUserModule() @@ -213,8 +213,8 @@ export async function DELETE(request: Request) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -240,7 +240,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeUserModule } from "@medusajs/user" +import { initialize as initializeUserModule } from "@medusajs/medusa/user" export async function POST(request: Request, { params }: ContextType) { const userModuleService = await initializeUserModule() @@ -267,8 +267,8 @@ export async function POST(request: Request, { params }: ContextType) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -302,7 +302,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeUserModule } from "@medusajs/user" +import { initialize as initializeUserModule } from "@medusajs/medusa/user" export async function POST(request: Request, { params }: ContextType) { const userModuleService = await initializeUserModule() @@ -337,8 +337,8 @@ export async function POST(request: Request, { params }: ContextType) { ```ts import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function POST( req: MedusaRequest, @@ -362,7 +362,7 @@ export async function POST( ```ts import { NextResponse } from "next/server" -import { initialize as initializeUserModule } from "@medusajs/user" +import { initialize as initializeUserModule } from "@medusajs/medusa/user" export async function POST(request: Request, { params }: ContextType) { const userModuleService = await initializeUserModule() diff --git a/www/apps/resources/app/commerce-modules/user/module-options/page.mdx b/www/apps/resources/app/commerce-modules/user/module-options/page.mdx index ed62b29149..0f9cf0268f 100644 --- a/www/apps/resources/app/commerce-modules/user/module-options/page.mdx +++ b/www/apps/resources/app/commerce-modules/user/module-options/page.mdx @@ -15,7 +15,7 @@ In this document, you'll learn about the options of the User Module. ## Module Options ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -23,7 +23,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.USER]: { - resolve: "@medusajs/user", + resolve: "@medusajs/medusa/user", options: { jwt_secret: process.env.JWT_SECRET, }, diff --git a/www/apps/resources/app/commerce-modules/user/page.mdx b/www/apps/resources/app/commerce-modules/user/page.mdx index 1ea3daf98e..df6c8f5acf 100644 --- a/www/apps/resources/app/commerce-modules/user/page.mdx +++ b/www/apps/resources/app/commerce-modules/user/page.mdx @@ -6,11 +6,11 @@ export const metadata = { # {metadata.title} -The User Module is the `@medusajs/user` NPM package that provides user-related features in your Medusa and Node.js applications. +The User Module is the `@medusajs/medusa/user` NPM package that provides user-related features in your Medusa and Node.js applications. ## How to Use User Module's Service -You can use the User Module's main service by resolving from the Medusa container the resource `Modules.USER` imported from `@medusajs/utils`. +You can use the User Module's main service by resolving from the Medusa container the resource `Modules.USER` imported from `@medusajs/framework/utils`. For example: @@ -19,8 +19,8 @@ For example: ```ts title="src/api/store/custom/route.ts" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export async function GET( req: MedusaRequest, @@ -41,8 +41,8 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" import { SubscriberArgs } from "@medusajs/medusa" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" export default async function subscriberHandler({ container }: SubscriberArgs) { const userModuleService: IUserModuleService = container.resolve( @@ -57,9 +57,9 @@ export default async function subscriberHandler({ container }: SubscriberArgs) { ```ts title="src/workflows/hello-world/step1.ts" - import { createStep } from "@medusajs/workflows-sdk" - import { IUserModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + import { createStep } from "@medusajs/framework/workflows-sdk" + import { IUserModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" const step1 = createStep("step-1", async (_, { container }) => { const userModuleService: IUserModuleService = container.resolve( diff --git a/www/apps/resources/app/deployment/medusa-application/railway/page.mdx b/www/apps/resources/app/deployment/medusa-application/railway/page.mdx index 29f67c591b..f3b3d33973 100644 --- a/www/apps/resources/app/deployment/medusa-application/railway/page.mdx +++ b/www/apps/resources/app/deployment/medusa-application/railway/page.mdx @@ -134,29 +134,29 @@ For example, add the following dependencies in `package.json` for the Cache, Eve ```json "dependencies": { // ... - "@medusajs/cache-redis": "preview", - "@medusajs/event-bus-redis": "preview", - "@medusajs/workflow-engine-redis": "preview" + "@medusajs/medusa/cache-redis": "rc", + "@medusajs/medusa/event-bus-redis": "rc", + "@medusajs/workflow-engine-redis": "rc" } ``` Then, add these modules in `medusa-config.js`: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") module.exports = defineConfig({ // ... modules: { // ... [Modules.CACHE]: { - resolve: "@medusajs/cache-redis", + resolve: "@medusajs/medusa/cache-redis", options: { redisUrl: process.env.REDIS_URL, }, }, [Modules.EVENT_BUS]: { - resolve: "@medusajs/event-bus-redis", + resolve: "@medusajs/medusa/event-bus-redis", options: { redisUrl: process.env.REDIS_URL, }, diff --git a/www/apps/resources/app/medusa-container-resources/page.mdx b/www/apps/resources/app/medusa-container-resources/page.mdx index b5f8c36dde..0b62afbe8e 100644 --- a/www/apps/resources/app/medusa-container-resources/page.mdx +++ b/www/apps/resources/app/medusa-container-resources/page.mdx @@ -10,7 +10,7 @@ This documentation page includes the list of resources registered in the Medusa -Use the `ContainerRegistrationKeys` enum imported from `@medusajs/utils` to resolve these resources' names. +Use the `ContainerRegistrationKeys` enum imported from `@medusajs/framework/utils` to resolve these resources' names. @@ -122,7 +122,7 @@ Use the `ContainerRegistrationKeys` enum imported from `@medusajs/utils` to reso - 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 `Modules` enum imported from `@medusajs/utils`. + - For Medusa's commerce modules, you can use the `Modules` enum imported from `@medusajs/framework/utils`. diff --git a/www/apps/resources/app/medusa-workflows-reference/page.mdx b/www/apps/resources/app/medusa-workflows-reference/page.mdx index 90f5208a2e..731b4615b0 100644 --- a/www/apps/resources/app/medusa-workflows-reference/page.mdx +++ b/www/apps/resources/app/medusa-workflows-reference/page.mdx @@ -8,6 +8,6 @@ export const metadata = { This section of the documentation provides a reference to the workflows created by Medusa. These workflows are used in the Store and Admin API routes. -You can use these workflows in your customizations as well. They're available in the `@medusajs/core-flows` package. +You can use these workflows in your customizations as well. They're available in the `@medusajs/medusa/core-flows` package. diff --git a/www/apps/resources/app/recipes/b2b/page.mdx b/www/apps/resources/app/recipes/b2b/page.mdx index c0aa8a2c14..42b8f49d27 100644 --- a/www/apps/resources/app/recipes/b2b/page.mdx +++ b/www/apps/resources/app/recipes/b2b/page.mdx @@ -202,7 +202,7 @@ You can create a B2B module that adds necessary data models to represent a B2B c Then, create the file `src/modules/b2b/models/company.ts` with the following content: ```ts title="src/modules/b2b/models/company.ts" highlights={[["8", "", "The property will be used to create a relationship to customer groups."]]} - import { model } from "@medusajs/utils" + import { model } from "@medusajs/framework/utils" const Company = model.define("company", { id: model.id().primaryKey(), @@ -239,7 +239,7 @@ You can create a B2B module that adds necessary data models to represent a B2B c Then, create the module's main service at `src/modules/b2b/service.ts` with the following content: ```ts title="src/modules/b2b/service.ts" - import { MedusaService } from "@medusajs/utils" + import { MedusaService } from "@medusajs/framework/utils" import Company from "./models/company" class B2bModuleService extends MedusaService({ @@ -257,7 +257,7 @@ You can create a B2B module that adds necessary data models to represent a B2B c ```ts title="src/modules/b2b/index.ts" import B2bModuleService from "./service" - import { Module } from "@medusajs/utils" + import { Module } from "@medusajs/framework/utils" export default Module("b2b", { service: B2bModuleService, @@ -293,7 +293,7 @@ You can create a B2B module that adds necessary data models to represent a B2B c Start by creating the file `src/types/b2b/index.ts` with some helper types: ```ts title="src/types/b2b/index.ts" - import { CustomerGroupDTO } from "@medusajs/types" + import { CustomerGroupDTO } from "@medusajs/framework/types" export type CompanyDTO = { id: string @@ -327,11 +327,11 @@ export const workflowHighlights = [ StepResponse, createStep, createWorkflow, - } from "@medusajs/workflows-sdk" + } from "@medusajs/framework/workflows-sdk" import { createCustomerGroupsWorkflow, - } from "@medusajs/core-flows" - import { CreateCustomerGroupDTO } from "@medusajs/types" + } from "@medusajs/medusa/core-flows" + import { CreateCustomerGroupDTO } from "@medusajs/framework/types" import { CompanyDTO, CreateCompanyDTO } from "../types/b2b" import B2bModuleService from "../modules/b2b/service" @@ -609,8 +609,8 @@ export const checkCustomerHighlights = [ AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" - import { Modules } from "@medusajs/utils" - import { ICustomerModuleService } from "@medusajs/types" + import { Modules } from "@medusajs/framework/utils" + import { ICustomerModuleService } from "@medusajs/framework/types" import B2bModuleService from "../../../../modules/b2b/service" export async function GET( diff --git a/www/apps/resources/app/recipes/commerce-automation/page.mdx b/www/apps/resources/app/recipes/commerce-automation/page.mdx index f22a4b9e5b..2d08da1052 100644 --- a/www/apps/resources/app/recipes/commerce-automation/page.mdx +++ b/www/apps/resources/app/recipes/commerce-automation/page.mdx @@ -81,7 +81,7 @@ export const restockModelHighlights = [ ] ```ts title="src/modules/restock-notification/models/restock-notification.ts" highlights={restockModelHighlights} - import { model } from "@medusajs/utils" + import { model } from "@medusajs/framework/utils" const RestockNotification = model.define("restock_notification", { id: model.id().primaryKey(), @@ -125,7 +125,7 @@ export const restockModelHighlights = [ Then, create the module's main service at `src/modules/restock-notification/service.ts` with the following content: ```ts title="src/modules/restock-notification/service.ts" - import { MedusaService } from "@medusajs/utils" + import { MedusaService } from "@medusajs/framework/utils" import RestockNotification from "./models/restock-notification" class RestockNotificationModuleService extends MedusaService({ @@ -143,7 +143,7 @@ export const restockModelHighlights = [ ```ts title="src/modules/restock-notification/index.ts" import RestockNotificationModuleService from "./service" - import { Module } from "@medusajs/utils" + import { Module } from "@medusajs/framework/utils" export default Module("restock-notification", { service: RestockNotificationModuleService, @@ -247,15 +247,15 @@ export const subscriberHighlights = [ IInventoryService, INotificationModuleService, RemoteQueryFunction, - } from "@medusajs/types" + } from "@medusajs/framework/types" import { ContainerRegistrationKeys, Modules, remoteQueryObjectFromString, - } from "@medusajs/utils" + } from "@medusajs/framework/utils" import { RemoteLink, - } from "@medusajs/modules-sdk" + } from "@medusajs/framework/modules-sdk" import RestockNotificationModuleService from "../modules/restock-notification/service" @@ -462,18 +462,18 @@ export const syncProductsWorkflowHighlight = [ ```ts title="src/workflows/sync-products.ts" highlights={syncProductsWorkflowHighlight} collapsibleLines="1-16" expandButtonLabel="Show Imports" import { Modules - } from "@medusajs/utils" + } from "@medusajs/framework/utils" import { IProductModuleService, IStoreModuleService, ProductDTO, StoreDTO - } from "@medusajs/types" + } from "@medusajs/framework/types" import { StepResponse, createStep, createWorkflow, - } from "@medusajs/workflows-sdk" + } from "@medusajs/framework/workflows-sdk" type RetrieveStoreStepInput = { id: string @@ -616,7 +616,7 @@ export const syncProductsWorkflowHighlight = [ Then, create a scheduled job at `src/jobs/sync-products.ts` that executes the workflow at the specified interval: ```ts - import { MedusaContainer } from "@medusajs/types" + import { MedusaContainer } from "@medusajs/framework/types" import { syncProductsWorkflow, } from "../workflows/sync-products" @@ -765,11 +765,11 @@ The `order.placed` event is currently not emitted. } from "@medusajs/medusa" import { Modules, - } from "@medusajs/utils" + } from "@medusajs/framework/utils" import { ICustomerModuleService, IOrderModuleService, - } from "@medusajs/types" + } from "@medusajs/framework/types" export default async function orderCreatedHandler({ event: { data }, @@ -879,13 +879,13 @@ export const newsletterHighlights = [ } from "@medusajs/medusa" import { Modules, - } from "@medusajs/utils" + } from "@medusajs/framework/utils" import { ICustomerModuleService, IProductModuleService, IStoreModuleService, INotificationModuleService, - } from "@medusajs/types" + } from "@medusajs/framework/types" export default async function productCreateHandler({ container, diff --git a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx index bc623e0a6e..ebae4b215e 100644 --- a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx @@ -60,7 +60,7 @@ Create the directory `src/modules/digital-product`. Create the file `src/modules/digital-product/models/digital-product.ts` with the following content: ```ts title="src/modules/digital-product/models/digital-product.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import DigitalProductMedia from "./digital-product-media" import DigitalProductOrder from "./digital-product-order" @@ -90,7 +90,7 @@ export const dpmModelHighlights = [ ] ```ts title="src/modules/digital-product/models/digital-product-media.ts" highlights={dpmModelHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import { MediaType } from "../types" import DigitalProduct from "./digital-product" @@ -123,7 +123,7 @@ This enum indicates that a digital product media can either be used to preview t Next, create the file `src/modules/digital-product/models/digital-product-order.ts` with the following content: ```ts title="src/modules/digital-product/models/digital-product-order.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import { OrderStatus } from "../types" import DigitalProduct from "./digital-product" @@ -154,7 +154,7 @@ export enum OrderStatus { Next, create the main service of the module at `src/modules/digital-product/service.ts` with the following content: ```ts title="src/modules/digital-product/service.ts" -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import DigitalProduct from "./models/digital-product" import DigitalProductOrder from "./models/digital-product-order" import DigitalProductMedia from "./models/digital-product-media" @@ -178,7 +178,7 @@ After that, create the module definition at `src/modules/digital-product/index.t ```ts title="src/modules/digital-product/index.ts" import DigitalProductModuleService from "./service" -import { Module } from "@medusajs/utils" +import { Module } from "@medusajs/framework/utils" export const DIGITAL_PRODUCT_MODULE = "digitalProductModuleService" @@ -217,8 +217,8 @@ Start by creating the file `src/links/digital-product-variant.ts` with the follo ```ts title="src/links/digital-product-variant.ts" import DigitalProductModule from "../modules/digital-product" -import ProductModule from "@medusajs/product" -import { defineLink } from "@medusajs/utils" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( DigitalProductModule.linkable.digitalProduct, @@ -236,8 +236,8 @@ export const orderLinkHighlights = [ ```ts title="src/links/digital-product-order.ts" import DigitalProductModule from "../modules/digital-product" -import OrderModule from "@medusajs/order" -import { defineLink } from "@medusajs/utils" +import OrderModule from "@medusajs/medusa/order" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( { @@ -288,7 +288,7 @@ import { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { ContainerRegistrationKeys } from "@medusajs/utils" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" export const GET = async ( req: AuthenticatedMedusaRequest, @@ -379,10 +379,10 @@ graph TD createDigitalProductMediasStep --> createRemoteLinkStep["createRemoteLinkStep (Medusa)"] ``` -1. `createProductsWorkflow`: Create the Medusa product that the digital product is associated with its variant. Medusa provides this workflow through the `@medusajs/core-flows` package, which you can use as a step. +1. `createProductsWorkflow`: Create the Medusa product that the digital product is associated with its variant. Medusa provides this workflow through the `@medusajs/medusa/core-flows` package, which you can use as a step. 2. `createDigitalProductStep`: Create the digital product. 3. `createDigitalProductMediasStep`: Create the medias associated with the digital product. -4. `createRemoteLinkStep`: Create the link between the digital product and the product variant. Medusa provides this step through the `@medusajs/core-flows` package. +4. `createRemoteLinkStep`: Create the link between the digital product and the product variant. Medusa provides this step through the `@medusajs/medusa/core-flows` package. You’ll implement the second and third steps. @@ -400,7 +400,7 @@ export const createDpHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import DigitalProductModuleService from "../../../modules/digital-product/service" import { DIGITAL_PRODUCT_MODULE } from "../../../modules/digital-product" @@ -454,7 +454,7 @@ export const createDigitalProductMediaHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import DigitalProductModuleService from "../../../modules/digital-product/service" import { DIGITAL_PRODUCT_MODULE } from "../../../modules/digital-product" import { MediaType } from "../../../modules/digital-product/types" @@ -520,17 +520,17 @@ import { createWorkflow, transform, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { CreateProductWorkflowInputDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { createProductsWorkflow, createRemoteLinkStep, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" import { Modules, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import createDigitalProductStep, { CreateDigitalProductStepInput, } from "./steps/create-digital-product" @@ -744,8 +744,8 @@ import { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { uploadFilesWorkflow } from "@medusajs/core-flows" -import { MedusaError } from "@medusajs/utils" +import { uploadFilesWorkflow } from "@medusajs/medusa/core-flows" +import { MedusaError } from "@medusajs/framework/utils" export const POST = async ( req: AuthenticatedMedusaRequest, @@ -779,7 +779,7 @@ export const POST = async ( This adds a `POST` API route at `/admin/digital-products/upload/[type]` where `[type]` is either `preview` or `main`. -In the route handler, you use the `uploadFilesWorkflow` imported from `@medusajs/core-flows` to upload the file. If the file type is `main`, it’s uploaded with private access, as only customers who purchased it can download it. Otherwise, it’s uploaded with `public` access. +In the route handler, you use the `uploadFilesWorkflow` imported from `@medusajs/medusa/core-flows` to upload the file. If the file type is `main`, it’s uploaded with private access, as only customers who purchased it can download it. Otherwise, it’s uploaded with `public` access. Next, add to the file `src/api/middlewares.ts` the `multer` middleware on this API route: @@ -814,7 +814,7 @@ In this step, you’ll add a UI route to the Medusa Admin that displays a list o Before you create the UI route, create the file `src/admin/types/index.ts` that holds the following types: ```ts title="src/admin/types/index.ts" -import { ProductVariantDTO } from "@medusajs/types" +import { ProductVariantDTO } from "@medusajs/framework/types" export enum MediaType { MAIN = "main", @@ -1435,7 +1435,7 @@ Start by creating the `src/modules/digital-product-fulfillment` directory. Then, create the file `src/modules/digital-product-fulfillment/service.ts` with the following content: ```ts title="src/modules/digital-product-fulfillment/service.ts" -import { AbstractFulfillmentProviderService } from "@medusajs/utils" +import { AbstractFulfillmentProviderService } from "@medusajs/framework/utils" class DigitalProductFulfillmentService extends AbstractFulfillmentProviderService { static identifier = "digital" @@ -1488,7 +1488,7 @@ The fulfillment provider registers one fulfillment option, and doesn't perform a Then, create the module provider's definition in the file `src/modules/digital-product-fulfillment/index.ts`: ```ts title="src/modules/digital-product-fulfillment/index.ts" -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import DigitalProductFulfillmentService from "./service" const services = [DigitalProductFulfillmentService] @@ -1506,17 +1506,17 @@ Finally, register the module provider in `medusa-config.js`: ```js title="medusa-config.js" // other imports... -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") module.exports = defineConfig({ modules: { // ... [Modules.FULFILLMENT]: { - resolve: "@medusajs/fulfillment", + resolve: "@medusajs/medusa/fulfillment", options: { providers: [ { - resolve: "@medusajs/fulfillment-manual", + resolve: "@medusajs/medusa/fulfillment-manual", id: "manual", }, { @@ -1560,13 +1560,13 @@ graph TD The workflow has the following steps: -1. `completeCartWorkflow` to create a Medusa order from the cart. Medusa provides this workflow through the `@medusajs/core-flows` package and you can use it as a step. -2. `useRemoteQueryStep` to retrieve the order’s items with the digital products associated with the purchased product variants. Medusa provides this step through the `@medusajs/core-flows` package. +1. `completeCartWorkflow` to create a Medusa order from the cart. Medusa provides this workflow through the `@medusajs/medusa/core-flows` package and you can use it as a step. +2. `useRemoteQueryStep` to retrieve the order’s items with the digital products associated with the purchased product variants. Medusa provides this step through the `@medusajs/medusa/core-flows` package. 3. If the order has digital products, you: 1. create the digital product order. - 2. link the digital product order with the Medusa order. Medusa provides a `createRemoteLinkStep` in the `@medusajs/core-flows` package that can be used here. - 3. Create a fulfillment for the digital products in the order. Medusa provides a `createOrderFulfillmentWorkflow` in the `@medusajs/core-flows` package that you can use as a step here. - 4. Emit the `digital_product_order.created` custom event to handle it later in a subscriber and send the customer an email. Medusa provides a `emitEventStep` in the `@medusajs/core-flows` that you can use as a step here. + 2. link the digital product order with the Medusa order. Medusa provides a `createRemoteLinkStep` in the `@medusajs/medusa/core-flows` package that can be used here. + 3. Create a fulfillment for the digital products in the order. Medusa provides a `createOrderFulfillmentWorkflow` in the `@medusajs/medusa/core-flows` package that you can use as a step here. + 4. Emit the `digital_product_order.created` custom event to handle it later in a subscriber and send the customer an email. Medusa provides a `emitEventStep` in the `@medusajs/medusa/core-flows` that you can use as a step here. You’ll only implement the `3.a` step of the workflow. @@ -1585,12 +1585,12 @@ export const createDpoHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { OrderLineItemDTO, ProductVariantDTO, InferTypeOf, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { OrderStatus } from "../../../modules/digital-product/types" import DigitalProductModuleService from "../../../modules/digital-product/service" import { DIGITAL_PRODUCT_MODULE } from "../../../modules/digital-product" @@ -1662,15 +1662,15 @@ import { transform, when, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { completeCartWorkflow, useRemoteQueryStep, createRemoteLinkStep, createOrderFulfillmentWorkflow, emitEventStep, -} from "@medusajs/core-flows" -import { Modules } from "@medusajs/utils" +} from "@medusajs/medusa/core-flows" +import { Modules } from "@medusajs/framework/utils" import createDigitalProductOrderStep from "./steps/create-digital-product-order" import { DIGITAL_PRODUCT_MODULE } from "../../modules/digital-product" @@ -1823,7 +1823,7 @@ In this step, you'll create a workflow that fulfills a digital order by sending The workflow has the following steps: -1. Retrieve the digital product order's details. For this, you'll use the `useRemoteQueryStep` imported from `@medusajs/core-flows`. +1. Retrieve the digital product order's details. For this, you'll use the `useRemoteQueryStep` imported from `@medusajs/medusa/core-flows`. 2. Send a notification to the customer with the digital products to download. So, you only need to implement the second step. @@ -1833,7 +1833,7 @@ So, you only need to implement the second step. Before creating the step, add to `src/modules/digital-product/types/index.ts` the following: ```ts -import { OrderDTO, InferTypeOf } from "@medusajs/types" +import { OrderDTO, InferTypeOf } from "@medusajs/framework/types" import DigitalProductOrder from "../models/digital-product-order" // ... @@ -1856,12 +1856,12 @@ To create the step, create the file `src/workflows/fulfill-digital-order/steps/s import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { INotificationModuleService, IFileModuleService, -} from "@medusajs/types" -import { ModuleRegistrationName } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { ModuleRegistrationName } from "@medusajs/framework/utils" import { DigitalProductOrder, MediaType } from "../../../modules/digital-product/types" type SendDigitalOrderNotificationStepInput = { @@ -1948,10 +1948,10 @@ export const fulfillWorkflowHighlights = [ import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" import { sendDigitalOrderNotificationStep } from "./steps/send-digital-order-notification" type FulfillDigitalOrderWorkflowInput = { @@ -1991,7 +1991,7 @@ export const fulfillDigitalOrderWorkflow = createWorkflow( In the workflow, you: -1. Retrieve the digital product order's details using the `useRemoteQueryStep` imported from `@medusajs/core-flows`. +1. Retrieve the digital product order's details using the `useRemoteQueryStep` imported from `@medusajs/medusa/core-flows`. 2. Send a notification to the customer with the digital product download links using the `sendDigitalOrderNotificationStep`. ### Configure Notification Module Provider @@ -2008,11 +2008,11 @@ module.exports = defineConfig({ modules: { // ... [Modules.NOTIFICATION]: { - resolve: "@medusajs/notification", + resolve: "@medusajs/medusa/notification", options: { providers: [ { - resolve: "@medusajs/notification-local", + resolve: "@medusajs/medusa/notification-local", id: "local", options: { name: "Local Notification Provider", @@ -2094,7 +2094,7 @@ import { } from "@medusajs/medusa" import { Modules, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { DIGITAL_PRODUCT_MODULE, } from "../../../../../modules/digital-product" @@ -2160,7 +2160,7 @@ import { } from "@medusajs/medusa" import { ContainerRegistrationKeys, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export const GET = async ( req: AuthenticatedMedusaRequest, @@ -2218,7 +2218,7 @@ import { Modules, ContainerRegistrationKeys, MedusaError, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export const POST = async ( req: AuthenticatedMedusaRequest, @@ -2312,7 +2312,7 @@ In this section, you’ll customize the [Next.js Starter storefront](../../../.. In `src/types/global.ts`, add the following types that you’ll use in your customizations: ```ts title="src/types/global.ts" -import { BaseProductVariant } from "@medusajs/types/dist/http/product/common" +import { BaseProductVariant } from "@medusajs/framework/types/dist/http/product/common" // ... diff --git a/www/apps/resources/app/recipes/ecommerce/page.mdx b/www/apps/resources/app/recipes/ecommerce/page.mdx index 86e5fdb8df..eaadb0653e 100644 --- a/www/apps/resources/app/recipes/ecommerce/page.mdx +++ b/www/apps/resources/app/recipes/ecommerce/page.mdx @@ -32,7 +32,7 @@ Medusa provides all essential commerce features out-of-the-box. Businesses can g Use the following command to install an ecommerce store with Medusa: ```bash -npx create-medusa-app@preview --with-nextjs-starter +npx create-medusa-app@rc --with-nextjs-starter ``` This installs: 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 311add2a8e..7c170cf9c1 100644 --- a/www/apps/resources/app/recipes/integrate-ecommerce-stack/page.mdx +++ b/www/apps/resources/app/recipes/integrate-ecommerce-stack/page.mdx @@ -53,7 +53,7 @@ export const serviceHighlights = [ ```ts title="src/modules/erp/service.ts" highlights={serviceHighlights} import axios, { AxiosInstance } from "axios" - import { ProductDTO } from "@medusajs/types" + import { ProductDTO } from "@medusajs/framework/types" type ErpModuleOptions = { apiKey: string @@ -109,7 +109,7 @@ export const serviceHighlights = [ ```ts title="src/modules/erp/index.ts" import ErpModuleService from "./service" - import { Module } from "@medusajs/utils" + import { Module } from "@medusajs/framework/utils" export default Module("erp", { service: ErpModuleService, @@ -180,9 +180,9 @@ export const workflowHighlights = [ StepResponse, createWorkflow, WorkflowResponse, - } from "@medusajs/workflows-sdk" - import { IProductModuleService } from "@medusajs/types" - import { Modules } from "@medusajs/utils" + } from "@medusajs/framework/workflows-sdk" + import { IProductModuleService } from "@medusajs/framework/types" + import { Modules } from "@medusajs/framework/utils" import ErpModuleService from "../modules/erp/service" type WorkflowInput = { @@ -313,10 +313,10 @@ For example, suppose an administrator changes the product data in the ERP system import { IProductModuleService, UpdateProductDTO - } from "@medusajs/types" + } from "@medusajs/framework/types" import { Modules - } from "@medusajs/utils" + } from "@medusajs/framework/utils" type WebhookReq = { id: string diff --git a/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx b/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx index 77ec3c2a96..5ad8e5bd8b 100644 --- a/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx +++ b/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx @@ -74,7 +74,7 @@ Create the directory `src/modules/restaurant`. Create the file `src/modules/restaurant/models/restaurant.ts` with the following content: ```ts title="src/modules/restaurant/models/restaurant.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import { RestaurantAdmin } from "./restaurant-admin" export const Restaurant = model.define("restaurant", { @@ -100,7 +100,7 @@ It also has a relation to the `RestaurantAdmin` data model that you’ll define Create the file `src/modules/restaurant/models/restaurant-admin.ts` with the following content: ```ts title="src/modules/restaurant/models/restaurant-admin.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import { Restaurant } from "./restaurant" export const RestaurantAdmin = model.define("restaurant_admin", { @@ -124,7 +124,7 @@ This defines a `RestaurantAdmin` data model, which belongs to a restaurant. It r Next, create the main service of the module at `src/modules/restaurant/service.ts` with the following content: ```ts title="src/modules/restaurant/service.ts" -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import { Restaurant } from "./models/restaurant" import { RestaurantAdmin } from "./models/restaurant-admin" @@ -144,7 +144,7 @@ Then, create the file `src/modules/restaurant/index.ts` that holds the module de ```ts title="src/modules/restaurant/index.ts" import Service from "./service" -import { Module } from "@medusajs/utils" +import { Module } from "@medusajs/framework/utils" export const RESTAURANT_MODULE = "restaurantModuleService" @@ -197,7 +197,7 @@ export enum DeliveryStatus { DELIVERED = "delivered", } -declare module "@medusajs/types" { +declare module "@medusajs/framework/types" { export interface ModuleImplementations { deliveryModuleService: DeliveryModuleService; } @@ -211,7 +211,7 @@ This adds an enum that is used by the data models. It also adds a type for `deli Create the file `src/modules/delivery/models/driver.ts` with the following content: ```ts title="src/modules/delivery/models/driver.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import { Delivery } from "./delivery" export const Driver = model.define("driver", { @@ -237,7 +237,7 @@ It has a relation to a `Delivery` data model that you’ll create next. Create the file `src/modules/delivery/models/delivery.ts` with the following content: ```ts title="src/modules/delivery/models/delivery.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import { DeliveryStatus } from "../types/common" import { Driver } from "./driver" @@ -268,7 +268,7 @@ It also has a relation to the `Driver` data model, indicating the driver handlin Then, create the main service of the Delivery Module at `src/modules/delivery/service.ts` with the following content: ```ts title="src/modules/delivery/service.ts" -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import { Delivery } from "./models/delivery" import { Driver } from "./models/driver" @@ -288,7 +288,7 @@ Next, create the file `src/modules/delivery/index.ts` holding the module’s def ```ts title="src/modules/delivery/index.ts" import Service from "./service" -import { Module } from "@medusajs/utils" +import { Module } from "@medusajs/framework/utils" export const DELIVERY_MODULE = "deliveryModuleService" @@ -326,8 +326,8 @@ Create the file `src/links/restaurant-products.ts` with the following content: ```ts title="src/links/restaurant-products.ts" import RestaurantModule from "../modules/restaurant" -import ProductModule from "@medusajs/product" -import { defineLink } from "@medusajs/utils" +import ProductModule from "@medusajs/medusa/product" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( RestaurantModule.linkable.restaurant, @@ -349,7 +349,7 @@ Create the file `src/links/restaurant-delivery.ts` with the following content: ```ts title="src/links/restaurant-delivery.ts" import RestaurantModule from "../modules/restaurant" import DeliveryModule from "../modules/delivery" -import { defineLink } from "@medusajs/utils" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( RestaurantModule.linkable.restaurant, @@ -371,8 +371,8 @@ Create the file `src/links/delivery-cart.ts` with the following content: ```ts title="src/links/delivery-cart.ts" import DeliveryModule from "../modules/delivery" -import CartModule from "@medusajs/cart" -import { defineLink } from "@medusajs/utils" +import CartModule from "@medusajs/medusa/cart" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( DeliveryModule.linkable.delivery, @@ -388,8 +388,8 @@ Create the file `src/links/delivery-order.ts` with the following content: ```ts title="src/links/delivery-order.ts" import DeliveryModule from "../modules/delivery" -import OrderModule from "@medusajs/order" -import { defineLink } from "@medusajs/utils" +import OrderModule from "@medusajs/medusa/order" +import { defineLink } from "@medusajs/framework/utils" export default defineLink( DeliveryModule.linkable.delivery, @@ -435,7 +435,7 @@ Before implementing the functionalities, you’ll create type files in the Resta Create the file `src/modules/restaurant/types/index.ts` with the following content: ```ts title="src/modules/restaurant/types/index.ts" -import { InferTypeOf } from "@medusajs/types" +import { InferTypeOf } from "@medusajs/framework/types" import RestaurantModuleService from "../service" import { Restaurant } from "../models/restaurant" @@ -443,7 +443,7 @@ export type CreateRestaurant = Omit< InferTypeOf, "id" | "admins" > -declare module "@medusajs/types" { +declare module "@medusajs/framework/types" { export interface ModuleImplementations { restaurantModuleService: RestaurantModuleService; } @@ -454,7 +454,7 @@ This adds a type used for inputs in creating a restaurant. It also adds a type f -Since the `Restaurant` data model is a variable, use the `InferTypeOf` utility imported from `@medusajs/types` to infer its type. +Since the `Restaurant` data model is a variable, use the `InferTypeOf` utility imported from `@medusajs/framework/types` to infer its type. @@ -472,7 +472,7 @@ export const createRestaurantHighlight = [ ] ```ts title="src/workflows/restaurant/steps/create-restaurant.ts" highlights={createRestaurantHighlight} collapsibleLines="1-6" expandMoreLabel="Show Imports" -import { StepResponse, createStep } from "@medusajs/workflows-sdk" +import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk" import { CreateRestaurantDTO, } from "../../../modules/restaurant/types/mutations" @@ -507,7 +507,7 @@ Next, create the workflow at `src/workflows/restaurant/workflows/create-restaura import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { createRestaurantStep } from "../steps/create-restaurant" import { CreateRestaurant } from "../../../modules/restaurant/types" @@ -554,7 +554,7 @@ export const createRestaurantRouteHighlights = [ ```ts title="src/api/restaurants/route.ts" highlights={createRestaurantRouteHighlights} collapsibleLines="1-10" expandMoreLabel="Show Imports" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import { CreateRestaurantDTO, } from "../../modules/restaurant/types/mutations" @@ -633,7 +633,7 @@ import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" import { ContainerRegistrationKeys, QueryContext, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" // ... @@ -708,13 +708,13 @@ Medusa provides an authentication flow that allows you to authenticate custom us Start by implementing the functionality to create a user in a workflow. The workflow has two steps: 1. Create the user in the database. -2. Set the actor type of the user’s authentication identity (created by the `/auth/{actor_type}/{provider}/register` API route). For this step, you’ll use the `setAuthAppMetadataStep` step imported from the `@medusajs/core-flows` package. +2. Set the actor type of the user’s authentication identity (created by the `/auth/{actor_type}/{provider}/register` API route). For this step, you’ll use the `setAuthAppMetadataStep` step imported from the `@medusajs/medusa/core-flows` package. To implement the first step, create the file `src/workflows/user/steps/create-user.ts` with the following content: ```ts title="src/workflows/user/steps/create-user.ts" collapsibleLines="1-9" expandButtonLabel="Show Imports" -import { MedusaError } from "@medusajs/utils" -import { createStep, StepResponse } from "@medusajs/workflows-sdk" +import { MedusaError } from "@medusajs/framework/utils" +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" import { CreateDriverInput, CreateRestaurantAdminInput, @@ -814,12 +814,12 @@ In the compensation function, if the `actor_type` is a restaurant, you delete th Next, create the workflow in the file `src/workflows/user/workflows/create-user.ts`: ```ts title="src/workflows/user/workflows/create-user.ts" collapsibleLines="1-12" expandButtonLabel="Show Imports" -import { setAuthAppMetadataStep } from "@medusajs/core-flows" +import { setAuthAppMetadataStep } from "@medusajs/medusa/core-flows" import { createWorkflow, transform, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { CreateDriverInput, CreateRestaurantAdminInput, @@ -878,7 +878,7 @@ In the workflow, you: 1. Use the `createUserStep` to create the user. 2. Use the `transform` utility function to create the input to be passed to the next step. -3. Use the `setAuthAppMetadataStep` imported from `@medusajs/core-flows` to update the authentication identity and associate it with the new user. +3. Use the `setAuthAppMetadataStep` imported from `@medusajs/medusa/core-flows` to update the authentication identity and associate it with the new user. 4. Return the created user. ### Create API Route @@ -1056,7 +1056,7 @@ First, create the step that deletes the restaurant admin at `restaurant-marketpl import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { RESTAURANT_MODULE } from "../../../modules/restaurant" import { DeleteRestaurantAdminWorkflow } from "../workflows/delete-restaurant-admin" @@ -1090,17 +1090,17 @@ In this step, you resolve the Restaurant Module's service and delete the admin. Then, create the workflow that deletes the restaurant admin at `restaurant-marketplace/src/workflows/restaurant/workflows/delete-restaurant-admin.ts`: ```ts title="restaurant-marketplace/src/workflows/restaurant/workflows/delete-restaurant-admin.ts" collapsibleLines="1-13" expandButtonLabel="Show Imports" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import { WorkflowData, WorkflowResponse, createWorkflow, transform, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { setAuthAppMetadataStep, useRemoteQueryStep, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" import { deleteRestaurantAdminStep } from "../steps/delete-restaurant-admin" export type DeleteRestaurantAdminWorkflow = { @@ -1165,7 +1165,7 @@ After deleting the restaurant admin, you: 1. Retrieve its auth identity using Query. To do that, you filter its `app_metadata` property by checking that its `restaurant_id` property's value is the admin's ID. For drivers, you replace `restaurant_id` with `driver_id`. 2. Check that the auth identity exists using the `transform` utility. Otherwise, throw an error. -3. Unset the association between the auth identity and the restaurant admin using the `setAuthAppMetadataStep` imported from `@medusajs/core-flows`. +3. Unset the association between the auth identity and the restaurant admin using the `setAuthAppMetadataStep` imported from `@medusajs/medusa/core-flows`. ### Create API Route @@ -1240,8 +1240,8 @@ In this step, you’ll create the API route that creates a product for a restaur You’ll start by creating a workflow that creates the restaurant’s products. It has two steps: -1. Create the product using Medusa’s `createProductsWorkflow` as a step. It’s imported from the `@medusajs/core-flows` package. -2. Create a link between the restaurant and the products using the `createRemoateLinkStep` imported from the `@medusajs/core-flows` package. +1. Create the product using Medusa’s `createProductsWorkflow` as a step. It’s imported from the `@medusajs/medusa/core-flows` package. +2. Create a link between the restaurant and the products using the `createRemoateLinkStep` imported from the `@medusajs/medusa/core-flows` package. So, create the workflow in the file `src/workflows/restaurant/workflows/create-restaurant-products.ts` with the following content: @@ -1255,14 +1255,14 @@ export const createProductHighlights = [ import { createProductsWorkflow, createRemoteLinkStep, -} from "@medusajs/core-flows" -import { CreateProductDTO } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +} from "@medusajs/medusa/core-flows" +import { CreateProductDTO } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { WorkflowResponse, createWorkflow, transform, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { RESTAURANT_MODULE } from "../../../modules/restaurant" type WorkflowInput = { @@ -1392,7 +1392,7 @@ The workflow to create a delivery has three steps: 1. `validateRestaurantStep` that checks whether a restaurant with the specified ID exists. 2. `createDeliveryStep` that creates the delivery. -3. `createRemoteLinkStep` that creates links between the different data model records. This step is imported from `@medusajs/core-flows`. +3. `createRemoteLinkStep` that creates links between the different data model records. This step is imported from `@medusajs/medusa/core-flows`. ### Create validateRestaurantStep @@ -1401,7 +1401,7 @@ To create the first step, create the file `src/workflows/delivery/steps/validate ```ts title="src/workflows/delivery/steps/validate-restaurant.ts" import { createStep, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { RESTAURANT_MODULE } from "../../../modules/restaurant" type ValidateRestaurantStepInput = { @@ -1435,7 +1435,7 @@ export const createDeliveryStepHighlights = [ ] ```ts title="src/workflows/delivery/steps/create-delivery.ts" highlights={createDeliveryStepHighlights} -import { StepResponse, createStep } from "@medusajs/workflows-sdk" +import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk" import { DELIVERY_MODULE } from "../../../modules/delivery" export const createDeliveryStep = createStep( @@ -1476,9 +1476,9 @@ import { WorkflowResponse, createWorkflow, transform, -} from "@medusajs/workflows-sdk" -import { Modules } from "@medusajs/utils" -import { createRemoteLinkStep } from "@medusajs/core-flows" +} from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" import { DELIVERY_MODULE } from "../../../modules/delivery" import { RESTAURANT_MODULE } from "../../../modules/restaurant" import { validateRestaurantStep } from "../steps/validate-restaurant" @@ -1589,7 +1589,7 @@ Steps that have a `*` next to their names are async steps. { type: "step", name: "createRemoteLinkStep", - description: "Creates the links returned by the previous step between the order and delivery. This is imported from `@medusajs/core-flows`.", + description: "Creates the links returned by the previous step between the order and delivery. This is imported from `@medusajs/medusa/core-flows`.", link: "/references/helper-steps/createRemoteLinkStep" }, { @@ -1638,7 +1638,7 @@ export const setTransactionIdStepHighlights = [ ] ```ts title="src/workflows/delivery/steps/set-transaction-id.ts" highlights={setTransactionIdStepHighlights} -import { StepResponse, createStep } from "@medusajs/workflows-sdk" +import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk" import { DELIVERY_MODULE } from "../../../modules/delivery" export const setTransactionIdStep = createStep( @@ -1683,8 +1683,8 @@ export const notifyRestaurantStepHighlights = [ import { Modules, ContainerRegistrationKeys, -} from "@medusajs/utils" -import { createStep } from "@medusajs/workflows-sdk" +} from "@medusajs/framework/utils" +import { createStep } from "@medusajs/framework/workflows-sdk" export const notifyRestaurantStepId = "notify-restaurant-step" export const notifyRestaurantStep = createStep( @@ -1736,7 +1736,7 @@ A step is async if the `async` option is specified in the first object parameter Create the file `src/workflows/delivery/steps/await-driver-claim.ts` with the following content: ```ts title="src/workflows/delivery/steps/await-driver-claim.ts" -import { createStep } from "@medusajs/workflows-sdk" +import { createStep } from "@medusajs/framework/workflows-sdk" export const awaitDriverClaimStepId = "await-driver-claim-step" export const awaitDriverClaimStep = createStep( @@ -1764,12 +1764,12 @@ export const createOrderStepHighlights1 = [ ] ```ts title="src/workflows/delivery/steps/create-order.ts" highlights={createOrderStepHighlights1} collapsibleLines="1-9" expandButtonLabel="Show Imports" -import { CreateOrderShippingMethodDTO } from "@medusajs/types" +import { CreateOrderShippingMethodDTO } from "@medusajs/framework/types" import { Modules, ContainerRegistrationKeys, -} from "@medusajs/utils" -import { StepResponse, createStep } from "@medusajs/workflows-sdk" +} from "@medusajs/framework/utils" +import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk" import { DELIVERY_MODULE } from "../../../modules/delivery" export const createOrderStep = createStep( @@ -1862,7 +1862,7 @@ You delete the order in the compensation function. Create the file `src/workflows/delivery/steps/await-start-preparation.ts` with the following content: ```ts title="src/workflows/delivery/steps/await-start-preparation.ts" -import { createStep } from "@medusajs/workflows-sdk" +import { createStep } from "@medusajs/framework/workflows-sdk" export const awaitStartPreparationStepId = "await-start-preparation-step" export const awaitStartPreparationStep = createStep( @@ -1881,7 +1881,7 @@ This step is async and its only purpose is to wait until it’s marked as succes Create the file `src/workflows/delivery/steps/await-preparation.ts` with the following content: ```ts title="src/workflows/delivery/steps/await-preparation.ts" -import { createStep } from "@medusajs/workflows-sdk" +import { createStep } from "@medusajs/framework/workflows-sdk" export const awaitPreparationStepId = "await-preparation-step" export const awaitPreparationStep = createStep( @@ -1905,9 +1905,9 @@ export const createFulfillmentStepHighlights = [ ] ```ts title="src/workflows/delivery/steps/create-fulfillment.ts" highlights={createFulfillmentStepHighlights} -import { OrderDTO } from "@medusajs/types" -import { Modules } from "@medusajs/utils" -import { StepResponse, createStep } from "@medusajs/workflows-sdk" +import { OrderDTO } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" +import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk" export const createFulfillmentStep = createStep( "create-fulfillment-step", @@ -1954,7 +1954,7 @@ In the compensation function, you cancel the fulfillment. Create the file `src/workflows/delivery/steps/await-pick-up.ts` with the following content: ```ts title="src/workflows/delivery/steps/await-pick-up.ts" -import { createStep } from "@medusajs/workflows-sdk" +import { createStep } from "@medusajs/framework/workflows-sdk" export const awaitPickUpStepId = "await-pick-up-step" export const awaitPickUpStep = createStep( @@ -1974,7 +1974,7 @@ This step is async and its only purpose is to wait until it’s marked as succes Create the file `src/workflows/delivery/steps/await-delivery.ts` with the following content: ```ts title="src/workflows/delivery/steps/await-delivery.ts" -import { createStep } from "@medusajs/workflows-sdk" +import { createStep } from "@medusajs/framework/workflows-sdk" export const awaitDeliveryStepId = "await-delivery-step" export const awaitDeliveryStep = createStep( @@ -2001,8 +2001,8 @@ export const handleDeliveryWorkflowHighlights = [ import { WorkflowResponse, createWorkflow, -} from "@medusajs/workflows-sdk" -import { createRemoteLinkStep } from "@medusajs/core-flows" +} from "@medusajs/framework/workflows-sdk" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" import { setTransactionIdStep } from "../steps/set-transaction-id" import { notifyRestaurantStep } from "../steps/notify-restaurant" import { awaitDriverClaimStep } from "../steps/await-driver-claim" @@ -2081,7 +2081,7 @@ export const createDeliveryRouteHighlights = [ ```ts title="src/api/store/deliveries/route.ts" highlights={createDeliveryRouteHighlights} collapsibleLines="1-7" expandButtonLabel="Show Imports" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import zod from "zod" import { DELIVERY_MODULE } from "../../../modules/delivery" import { createDeliveryWorkflow } from "../../../workflows/delivery/workflows/create-delivery" @@ -2261,7 +2261,7 @@ Before implementing the necessary functionalities, add the following types to `s ```ts title="src/modules/delivery/types/index.ts" // other imports... -import { InferTypeOf } from "@medusajs/types" +import { InferTypeOf } from "@medusajs/framework/types" import { Delivery } from "../models/delivery" // ... @@ -2277,7 +2277,7 @@ These types are useful in the upcoming implementation steps. -Since the `Delivery` data model is a variable, use the `InferTypeOf` utility imported from `@medusajs/types` to infer its type. +Since the `Delivery` data model is a variable, use the `InferTypeOf` utility imported from `@medusajs/framework/types` to infer its type. @@ -2300,7 +2300,7 @@ export const updateDeliveryStepHighlights = [ ] ```ts title="src/workflows/delivery/steps/update-delivery.ts" highlights={updateDeliveryStepHighlights} -import { createStep, StepResponse } from "@medusajs/workflows-sdk" +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" import { DELIVERY_MODULE } from "../../../modules/delivery" import { UpdateDelivery } from "../../../modules/delivery/types" @@ -2343,8 +2343,8 @@ export const setStepSuccessStepHighlights = [ import { Modules, TransactionHandlerType, -} from "@medusajs/utils" -import { StepResponse, createStep } from "@medusajs/workflows-sdk" +} from "@medusajs/framework/utils" +import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk" import { Delivery } from "../../../modules/delivery/types" import { handleDeliveryWorkflowId } from "../workflows/handle-delivery" @@ -2394,8 +2394,8 @@ export const setStepFailedStepHighlights = [ import { Modules, TransactionHandlerType, -} from "@medusajs/utils" -import { StepResponse, createStep } from "@medusajs/workflows-sdk" +} from "@medusajs/framework/utils" +import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk" import { Delivery } from "../../../modules/delivery/types" import { handleDeliveryWorkflowId } from "../../delivery/workflows/handle-delivery" @@ -2447,7 +2447,7 @@ import { createWorkflow, WorkflowResponse, when, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { setStepSuccessStep } from "../steps/set-step-success" import { setStepFailedStep } from "../steps/set-step-failed" import { updateDeliveryStep } from "../steps/update-delivery" @@ -2510,7 +2510,7 @@ export const acceptRouteHighlights = [ ```ts title="src/api/deliveries/[id]/accept/route.ts" highlights={acceptRouteHighlights} collapsibleLines="1-6" expandButtonLabel="Show Imports" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { notifyRestaurantStepId } from "../../../../workflows/delivery/steps/notify-restaurant" import { updateDeliveryWorkflow } from "../../../../workflows/delivery/workflows/update-delivery" @@ -2577,7 +2577,7 @@ import { } from "@medusajs/medusa" import { ContainerRegistrationKeys, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { RESTAURANT_MODULE } from "../../modules/restaurant" export const isDeliveryRestaurant = async ( @@ -2709,7 +2709,7 @@ export const claimDeliveryWorkflowHighlights = [ import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { DeliveryStatus } from "../../../modules/delivery/types" import { awaitDriverClaimStepId } from "../steps/await-driver-claim" import { setStepSuccessStep } from "../steps/set-step-success" @@ -2844,7 +2844,7 @@ export const prepareRouteHighlights = [ ```ts title="src/api/deliveries/[id]/prepare/route.ts" highlights={prepareRouteHighlights} collapsibleLines="1-10" expandButtonLabel="Show Imports" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { updateDeliveryWorkflow, @@ -2934,7 +2934,7 @@ export const readyRouteHighlights = [ ```ts title="src/api/deliveries/[id]/ready/route.ts" highlights={readyRouteHighlights} collapsibleLines="1-10" expandButtonLabel="Show Imports" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { updateDeliveryWorkflow, @@ -3026,7 +3026,7 @@ export const pickUpRouteHighlights = [ ```ts title="src/api/deliveries/[id]/pick-up/route.ts" highlights={pickUpRouteHighlights} collapsibleLines="1-10" expandButtonLabel="Show Imports" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { updateDeliveryWorkflow, @@ -3166,7 +3166,7 @@ export const completeRouteHighlights = [ ```ts title="src/api/deliveries/[id]/complete/route.ts" highlights={completeRouteHighlights} collapsibleLines="1-10" expandButtonLabel="Show Imports" import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { updateDeliveryWorkflow, @@ -3261,7 +3261,7 @@ import { } from "@medusajs/medusa" import { Modules, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { handleDeliveryWorkflowId, } from "../../../../../workflows/delivery/workflows/handle-delivery" diff --git a/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx b/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx index dc3c9752f4..519334c72e 100644 --- a/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx +++ b/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx @@ -59,7 +59,7 @@ Create the directory `src/modules/marketplace`. Create the file `src/modules/marketplace/models/vendor.ts` with the following content: ```ts title="src/modules/marketplace/models/vendor.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import VendorAdmin from "./vendor-admin" const Vendor = model.define("vendor", { @@ -80,7 +80,7 @@ Notice that the `Vendor` has many admins whose data model you’ll create next. Create the file `src/modules/marketplace/models/vendor-admin.ts` with the following content: ```ts title="src/modules/marketplace/models/vendor-admin.ts" -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import Vendor from "./vendor" const VendorAdmin = model.define("vendor_admin", { @@ -103,7 +103,7 @@ This creates a `VendorAdmin` data model, which represents an admin of a vendor. Next, create the main service of the module at `src/modules/marketplace/service.ts` with the following content: ```ts title="src/modules/marketplace/service.ts" -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import Vendor from "./models/vendor" import VendorAdmin from "./models/vendor-admin" @@ -123,7 +123,7 @@ The service extends the [service factory](!docs!/advanced-development/modules/se After that, create the module definition at `src/modules/marketplace/index.ts` with the following content: ```ts title="src/modules/marketplace/index.ts" -import { Module } from "@medusajs/utils" +import { Module } from "@medusajs/framework/utils" import MarketplaceModuleService from "./service" export const MARKETPLACE_MODULE = "marketplaceModuleService" @@ -168,9 +168,9 @@ If your use case requires linking the vendor to other data models, such as `Sale Create the file `src/links/vendor-product.ts` with the following content: ```ts title="src/links/vendor-product.ts" -import { defineLink } from "@medusajs/utils" +import { defineLink } from "@medusajs/framework/utils" import MarketplaceModule from "../modules/marketplace" -import ProductModule from "@medusajs/product" +import ProductModule from "@medusajs/medusa/product" export default defineLink( MarketplaceModule.linkable.vendor, @@ -186,9 +186,9 @@ This adds a list link between the `Vendor` and `Product` data models, indicating Then, create the file `src/links/vendor-order.ts` with the following content: ```ts title="src/links/vendor-order.ts" -import { defineLink } from "@medusajs/utils" +import { defineLink } from "@medusajs/framework/utils" import MarketplaceModule from "../modules/marketplace" -import OrderModule from "@medusajs/order" +import OrderModule from "@medusajs/medusa/order" export default defineLink( MarketplaceModule.linkable.vendor, @@ -244,7 +244,7 @@ export const createVendorAdminStepHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { CreateVendorAdminWorkflowInput } from ".." import MarketplaceModuleService from "../../../../modules/marketplace/service" import { MARKETPLACE_MODULE } from "../../../../modules/marketplace" @@ -286,17 +286,17 @@ Then, create the workflow at `src/workflows/marketplace/create-vendor-admin/inde export const vendorAdminWorkflowHighlights = [ ["23", "createVendorAdminStep", "Create the vendor admin."], - ["27", "setAuthAppMetadataStep", "Step is imported from `@medusajs/core-flows`."] + ["27", "setAuthAppMetadataStep", "Step is imported from `@medusajs/medusa/core-flows`."] ] ```ts title="src/workflows/marketplace/create-vendor-admin/index.ts" highlights={vendorAdminWorkflowHighlights} import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { setAuthAppMetadataStep, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" import createVendorAdminStep from "./steps/create-vendor-admin" export type CreateVendorAdminWorkflowInput = { @@ -332,7 +332,7 @@ export default createVendorAdminWorkflow In this workflow, you run the following steps: 1. `createVendorAdminStep` to create the vendor admin. -2. `setAuthAppMetadataStep` to create the `vendor` actor type. This step is provided by Medusa in the `@medusajs/core-flows` package. +2. `setAuthAppMetadataStep` to create the `vendor` actor type. This step is provided by Medusa in the `@medusajs/medusa/core-flows` package. You return the created vendor admin. @@ -360,7 +360,7 @@ import { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import { z } from "zod" import MarketplaceModuleService from "../../modules/marketplace/service" import createVendorAdminWorkflow from "../../workflows/marketplace/create-vendor-admin" @@ -570,7 +570,7 @@ export const retrieveProductHighlights = [ import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/medusa" import { ContainerRegistrationKeys, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import MarketplaceModuleService from "../../../modules/marketplace/service" import { MARKETPLACE_MODULE } from "../../../modules/marketplace" @@ -614,16 +614,16 @@ export const createProducts1Highlights = [ ```ts title="src/api/vendors/products/route.ts" highlights={createProducts1Highlights} // other imports... -import { createProductsWorkflow } from "@medusajs/core-flows" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" import { CreateProductWorkflowInputDTO, IProductModuleService, ISalesChannelModuleService, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { Modules, Modules, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" // GET method... @@ -795,11 +795,11 @@ graph TD createVendorOrdersStep --> createRemoteLinkStep["Create Links (createRemoteLinkStep from Medusa)"] ``` -1. Retrieve the cart using its ID. Medusa provides a `useRemoteQueryStep` in the `@medusajs/core-flows` package that you can use. -2. Create a parent order for the cart and its items. Medusa also has a `completeCartWorkflow` in the `@medusajs/core-flows` package that you can use as a step. +1. Retrieve the cart using its ID. Medusa provides a `useRemoteQueryStep` in the `@medusajs/medusa/core-flows` package that you can use. +2. Create a parent order for the cart and its items. Medusa also has a `completeCartWorkflow` in the `@medusajs/medusa/core-flows` package that you can use as a step. 3. Group the cart items by their product’s associated vendor. 4. For each vendor, create a child order with the cart items of their products, and return the orders with the links to be created. -5. Create the links created by the previous step. Medusa provides a `createRemoteLinkStep` in the `@medusajs/core-flows` package that you can use. +5. Create the links created by the previous step. Medusa provides a `createRemoteLinkStep` in the `@medusajs/medusa/core-flows` package that you can use. You'll implement the third and fourth steps. @@ -811,9 +811,9 @@ Create the third step in the file `src/workflows/marketplace/create-vendor-order import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" -import { CartDTO, CartLineItemDTO } from "@medusajs/types" -import { ContainerRegistrationKeys } from "@medusajs/utils" +} from "@medusajs/framework/workflows-sdk" +import { CartDTO, CartLineItemDTO } from "@medusajs/framework/types" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" type StepInput = { cart: CartDTO @@ -870,18 +870,18 @@ export const vendorOrder1Highlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { CartLineItemDTO, OrderDTO, LinkDefinition, InferTypeOf, -} from "@medusajs/types" -import { Modules } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { createOrdersWorkflow, cancelOrderWorkflow, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" import MarketplaceModuleService from "../../../../modules/marketplace/service" import { MARKETPLACE_MODULE } from "../../../../modules/marketplace" import Vendor from "../../../../modules/marketplace/models/vendor" @@ -1036,7 +1036,7 @@ try { In this snippet, you create multiple child orders for each vendor and link the orders to the vendors. -If an error occurs, the created orders in the `createdOrders` array are canceled using Medusa's `cancelOrderWorkflow` from the `@medusajs/core-flows` package. +If an error occurs, the created orders in the `createdOrders` array are canceled using Medusa's `cancelOrderWorkflow` from the `@medusajs/medusa/core-flows` package. The order's data is formatted using the `prepareOrderData` function. Replace its definition with the following: @@ -1112,7 +1112,7 @@ await Promise.all(created_orders.map((createdOrder) => { })) ``` -The compensation function cancels all child orders received from the step. It uses the `cancelOrderWorkflow` that Medusa provides in the `@medusajs/core-flows` package. +The compensation function cancels all child orders received from the step. It uses the `cancelOrderWorkflow` that Medusa provides in the `@medusajs/medusa/core-flows` package. ### Create Workflow @@ -1130,13 +1130,13 @@ export const createVendorOrdersWorkflowHighlights = [ import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep, createRemoteLinkStep, completeCartWorkflow, -} from "@medusajs/core-flows" -import { CartDTO } from "@medusajs/types" +} from "@medusajs/medusa/core-flows" +import { CartDTO } from "@medusajs/framework/types" import groupVendorItemsStep from "./steps/group-vendor-items" import createVendorOrdersStep from "./steps/create-vendor-orders" @@ -1250,8 +1250,8 @@ export const getOrderHighlights = [ ```ts title="src/api/vendors/orders/route.ts" highlights={getOrderHighlights} collapsibleLines="1-6" expandMoreLabel="Show Imports" import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/medusa" -import { ContainerRegistrationKeys } from "@medusajs/utils" -import { getOrdersListWorkflow } from "@medusajs/core-flows" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" +import { getOrdersListWorkflow } from "@medusajs/medusa/core-flows" import MarketplaceModuleService from "../../../modules/marketplace/service" import { MARKETPLACE_MODULE } from "../../../modules/marketplace" diff --git a/www/apps/resources/app/recipes/pos/page.mdx b/www/apps/resources/app/recipes/pos/page.mdx index 60e462be9a..691d3790ea 100644 --- a/www/apps/resources/app/recipes/pos/page.mdx +++ b/www/apps/resources/app/recipes/pos/page.mdx @@ -77,9 +77,9 @@ Here’s an example of creating a custom API Route at `/store/pos/search-barcode MedusaRequest, MedusaResponse, } from "@medusajs/medusa" - import { MedusaError } from "@medusajs/utils" - import { Modules } from "@medusajs/utils" - import { IProductModuleService } from "@medusajs/types" + import { MedusaError } from "@medusajs/framework/utils" + import { Modules } from "@medusajs/framework/utils" + import { IProductModuleService } from "@medusajs/framework/types" export const GET = async (req: MedusaRequest, res: MedusaResponse) => { const barcode = (req.query.barcode as string) || "" diff --git a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx index 34209e537a..6d1feaeeb0 100644 --- a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx @@ -71,7 +71,7 @@ export const subscriptionHighlights = [ ] ```ts title="src/modules/subscription/models/subscription.ts" highlights={subscriptionHighlights} -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import { SubscriptionInterval, SubscriptionStatus } from "../types" const Subscription = model.define("subscription", { @@ -121,7 +121,7 @@ export enum SubscriptionInterval { Create the module’s main service in the file `src/modules/subscription/service.ts` with the following content: ```ts title="src/modules/subscription/service.ts" -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import Subscription from "./models/subscription" class SubscriptionModuleService extends MedusaService({ @@ -139,7 +139,7 @@ The main service extends the service factory to provide data-management features Create the file `src/modules/subscription/index.ts` that holds the module’s definition: ```ts title="src/modules/subscription/index.ts" -import { Module } from "@medusajs/utils" +import { Module } from "@medusajs/framework/utils" import SubscriptionModuleService from "./service" export const SUBSCRIPTION_MODULE = "subscriptionModuleService" @@ -183,9 +183,9 @@ In this step, you’ll define links between the Subscription Module’s `Subscri To link a subscription to the cart used to make the purchase, create the file `src/links/subscription-cart.ts` with the following content: ```ts title="src/links/subscription-cart.ts" -import { defineLink } from "@medusajs/utils" +import { defineLink } from "@medusajs/framework/utils" import SubscriptionModule from "../modules/subscription" -import CartModule from "@medusajs/cart" +import CartModule from "@medusajs/medusa/cart" export default defineLink( SubscriptionModule.linkable.subscription, @@ -206,9 +206,9 @@ When you create a new order for the subscription, you’ll retrieve the linked c To link a subscription to the customer who purchased it, create the file `src/links/subscription-customer.ts` with the following content: ```ts title="src/links/subscription-customer.ts" -import { defineLink } from "@medusajs/utils" +import { defineLink } from "@medusajs/framework/utils" import SubscriptionModule from "../modules/subscription" -import CustomerModule from "@medusajs/customer" +import CustomerModule from "@medusajs/medusa/customer" export default defineLink( { @@ -226,9 +226,9 @@ This defines a list link to the `Subscription` data model, since a customer may To link a subscription to the orders created for it, create the file `src/links/subscription-order.ts` with the following content: ```ts title="src/links/subscription-order.ts" -import { defineLink } from "@medusajs/utils" +import { defineLink } from "@medusajs/framework/utils" import SubscriptionModule from "../modules/subscription" -import OrderModule from "@medusajs/order" +import OrderModule from "@medusajs/medusa/order" export default defineLink( SubscriptionModule.linkable.subscription, @@ -363,7 +363,7 @@ The `getExpirationDate` method accepts a subscription’s date, interval, and pe Before overriding the `createSubscriptions` method, add the following types to `src/modules/subscription/types/index.ts`: ```ts title="src/modules/subscription/types/index.ts" -import { InferTypeOf } from "@medusajs/types" +import { InferTypeOf } from "@medusajs/framework/types" import Subscription from "../models/subscription" // ... @@ -381,7 +381,7 @@ export type SubscriptionData = InferTypeOf -Since the `Subscription` data model is a variable, use the `InferTypeOf` utility imported from `@medusajs/types` to infer its type. +Since the `Subscription` data model is a variable, use the `InferTypeOf` utility imported from `@medusajs/framework/types` to infer its type. @@ -444,7 +444,7 @@ The workflow accepts a cart’s ID, and it has three steps: 2. Create a subscription. 3. Link the subscription to the order, cart, and customer. -Medusa provides the first and last steps in the `@medusajs/core-flows` package, so you only need to implement the second step. +Medusa provides the first and last steps in the `@medusajs/medusa/core-flows` package, so you only need to implement the second step. ### Create a Subscription Step (Second Step) @@ -458,9 +458,9 @@ export const createSubscriptionsHighlights = [ ] ```ts title="src/workflows/create-subscription/steps/create-subscription.ts" highlights={createSubscriptionsHighlights} collapsibleLines="1-7" expandMoreLabel="Show Imports" -import { createStep, StepResponse } from "@medusajs/workflows-sdk" -import { Modules } from "@medusajs/utils" -import { LinkDefinition } from "@medusajs/types" +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" +import { LinkDefinition } from "@medusajs/framework/types" import { SubscriptionInterval } from "../../../modules/subscription/types" import SubscriptionModuleService from "../../../modules/subscription/service" import { SUBSCRIPTION_MODULE } from "../../../modules/subscription" @@ -584,11 +584,11 @@ export const createSubscriptionWorkflowHighlights = [ import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { createRemoteLinkStep, completeCartWorkflow, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" import { SubscriptionInterval, } from "../../modules/subscription/types" @@ -632,9 +632,9 @@ export default createSubscriptionWorkflow This workflow accepts the cart’s ID, along with the subscription details. It executes the following steps: -1. `completeCartWorkflow` from `@medusajs/core-flows` that completes a cart and creates an order. +1. `completeCartWorkflow` from `@medusajs/medusa/core-flows` that completes a cart and creates an order. 2. `createSubscriptionStep`, which is the step you created previously. -3. `createRemoteLinkStep` from `@medusajs/core-flows`, which accepts links to create. These links are in the `linkDefs` array returned by the previous step. +3. `createRemoteLinkStep` from `@medusajs/medusa/core-flows`, which accepts links to create. These links are in the `linkDefs` array returned by the previous step. The workflow returns the created subscription and order. @@ -666,7 +666,7 @@ import { import { ContainerRegistrationKeys, MedusaError, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import createSubscriptionWorkflow from "../../../../../workflows/create-subscription" export const POST = async ( @@ -728,7 +728,7 @@ After installation, create the file `src/modules/checkout/components/subscriptio ```tsx title="src/modules/checkout/components/subscriptions/index.tsx" badgeLabel="Storefront" badgeColor="orange" collapsibleLines="1-13" expandMoreLabel="Show Imports" "use client" -import { StoreCart } from "@medusajs/types" +import { StoreCart } from "@medusajs/framework/types" import { Button, clx, Heading, Text } from "@medusajs/ui" import { CheckCircleSolid } from "@medusajs/icons" import { usePathname, useRouter, useSearchParams } from "next/navigation" @@ -978,7 +978,7 @@ import { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { ContainerRegistrationKeys } from "@medusajs/utils" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" export const GET = async ( req: AuthenticatedMedusaRequest, @@ -1039,7 +1039,7 @@ import { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { ContainerRegistrationKeys } from "@medusajs/utils" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" export const GET = async ( req: AuthenticatedMedusaRequest, @@ -1089,7 +1089,7 @@ Before creating the UI routes, create the file `src/admin/types/index.ts` that h import { OrderDTO, CustomerDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" export enum SubscriptionStatus { ACTIVE = "active", @@ -1452,13 +1452,13 @@ graph TD capturePaymentStep["capturePaymentStep (Medusa)"] --> updateSubscriptionStep ``` -1. Retrieve the subscription’s linked cart. Medusa provides a `useRemoteQueryStep` in the `@medusajs/core-flows` package that can be used as a step. -2. Create a payment collection for the new order. Medusa provides a `createPaymentCollectionsStep` in the `@medusajs/core-flows` package that you can use. -3. Create payment sessions in the payment collection. Medusa provides a `createPaymentSessionsWorkflow` in the `@medusajs/core-flows` package that can be used as a step. -4. Authorize the payment session. Medusa also provides the `authorizePaymentSessionStep` in the `@medusajs/core-flows` package, which can be used. +1. Retrieve the subscription’s linked cart. Medusa provides a `useRemoteQueryStep` in the `@medusajs/medusa/core-flows` package that can be used as a step. +2. Create a payment collection for the new order. Medusa provides a `createPaymentCollectionsStep` in the `@medusajs/medusa/core-flows` package that you can use. +3. Create payment sessions in the payment collection. Medusa provides a `createPaymentSessionsWorkflow` in the `@medusajs/medusa/core-flows` package that can be used as a step. +4. Authorize the payment session. Medusa also provides the `authorizePaymentSessionStep` in the `@medusajs/medusa/core-flows` package, which can be used. 5. Create the subscription’s new order. -6. Create links between the subscription and the order using the `createRemoteLinkStep` provided in the `@medusajs/core-flows` package. -7. Capture the order’s payment using the `capturePaymentStep` provided by Medusa in the `@medusajs/core-flows` package. +6. Create links between the subscription and the order using the `createRemoteLinkStep` provided in the `@medusajs/medusa/core-flows` package. +7. Capture the order’s payment using the `capturePaymentStep` provided by Medusa in the `@medusajs/medusa/core-flows` package. 8. Update the subscription’s `last_order_date` and `next_order_date` properties. You’ll only implement the fifth and eighth steps. @@ -1481,17 +1481,17 @@ export const createSubscriptionOrderStep1Highlights = [ ] ```ts title="src/workflows/create-subscription-order/steps/create-subscription-order.ts" highlights={createSubscriptionOrderStep1Highlights} collapsibleLines="1-15" expandMoreLabel="Show Imports" -import { createStep, StepResponse } from "@medusajs/workflows-sdk" +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" import { CartWorkflowDTO, PaymentCollectionDTO, IOrderModuleService, LinkDefinition, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { Modules, -} from "@medusajs/utils" -import { createOrdersWorkflow } from "@medusajs/core-flows" +} from "@medusajs/framework/utils" +import { createOrdersWorkflow } from "@medusajs/medusa/core-flows" import { SubscriptionData } from "../../../modules/subscription/types" import { SUBSCRIPTION_MODULE } from "../../../modules/subscription" @@ -1536,7 +1536,7 @@ const createSubscriptionOrderStep = createStep( export default createSubscriptionOrderStep ``` -This creates a `createSubscriptionOrderStep` that uses the `createOrdersWorkflow`, which Medusa provides in the `@medusajs/core-flows` package. The step returns the created order and an array of links to be created. +This creates a `createSubscriptionOrderStep` that uses the `createOrdersWorkflow`, which Medusa provides in the `@medusajs/medusa/core-flows` package. The step returns the created order and an array of links to be created. In this step, you use a `getOrderData` function to format the order’s input data. @@ -1666,7 +1666,7 @@ export const updateSubscriptionStepHighlights = [ import { createStep, StepResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { SUBSCRIPTION_MODULE, } from "../../../modules/subscription" @@ -1750,25 +1750,25 @@ export const createSubscriptionOrderWorkflowHighlights = [ import { createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep, createPaymentSessionsWorkflow, createRemoteLinkStep, capturePaymentStep, -} from "@medusajs/core-flows" +} from "@medusajs/medusa/core-flows" import { CartWorkflowDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { SubscriptionData, } from "../../modules/subscription/types" import { authorizePaymentSessionStep, -} from "@medusajs/core-flows/dist/payment/steps/authorize-payment-session" +} from "@medusajs/medusa/core-flows/dist/payment/steps/authorize-payment-session" import { createPaymentCollectionsStep, -} from "@medusajs/core-flows/dist/definition/cart/steps/create-payment-collection" +} from "@medusajs/medusa/core-flows/dist/cart/steps/create-payment-collection" import createSubscriptionOrderStep from "./steps/create-subscription-order" import updateSubscriptionStep from "./steps/update-subscription" @@ -1889,7 +1889,7 @@ export const createSubscriptionOrdersJob1Highlights = [ ] ```ts title="src/jobs/create-subscription-orders.ts" highlights={createSubscriptionOrdersJob1Highlights} collapsibleLines="1-7" expandMoreLabel="Show Imports" -import { MedusaContainer } from "@medusajs/types" +import { MedusaContainer } from "@medusajs/framework/types" import SubscriptionModuleService from "../modules/subscription/service" import { SUBSCRIPTION_MODULE } from "../modules/subscription" import moment from "moment" @@ -2033,7 +2033,7 @@ export const expireSubscriptionOrdersJobHighlights = [ ] ```ts title="src/jobs/expire-subscription-orders.ts" highlights={expireSubscriptionOrdersJobHighlights} collapsibleLines="1-6" expandMoreLabel="Show Imports" -import { MedusaContainer } from "@medusajs/types" +import { MedusaContainer } from "@medusajs/framework/types" import SubscriptionModuleService from "../modules/subscription/service" import { SUBSCRIPTION_MODULE } from "../modules/subscription" import moment from "moment" @@ -2120,7 +2120,7 @@ import { AuthenticatedMedusaRequest, MedusaResponse, } from "@medusajs/medusa" -import { ContainerRegistrationKeys } from "@medusajs/utils" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" export const GET = async ( req: AuthenticatedMedusaRequest, diff --git a/www/apps/resources/app/storefront-development/tips/page.mdx b/www/apps/resources/app/storefront-development/tips/page.mdx index b7342cdea8..9a7f78a488 100644 --- a/www/apps/resources/app/storefront-development/tips/page.mdx +++ b/www/apps/resources/app/storefront-development/tips/page.mdx @@ -29,7 +29,7 @@ The `@medusajs/types` package provide API routes' request and response types. If you're not using the JS Client or Medusa React, install `@medusajs/types` to use the correct request and response types: ```bash npm2yarn -npm install @medusajs/types@preview +npm install @medusajs/types@rc ``` --- diff --git a/www/apps/resources/app/troubleshooting/_sections/common-installation-errors/outdated-preview.mdx b/www/apps/resources/app/troubleshooting/_sections/common-installation-errors/outdated-preview.mdx index fd6034e7f0..e78821b2c4 100644 --- a/www/apps/resources/app/troubleshooting/_sections/common-installation-errors/outdated-preview.mdx +++ b/www/apps/resources/app/troubleshooting/_sections/common-installation-errors/outdated-preview.mdx @@ -1,9 +1,9 @@ -If you've installed a preview version of a package, such as `@medusajs/file-s3`, make sure its version in `package.json` is set to `preview`: +If you've installed an `rc` version of a package, such as `@medusajs/medusa/file-s3`, make sure its version in `package.json` is set to `rc`: ```json title="package.json" "dependencies": { // ... - "@medusajs/file-s3": "preview" + "@medusajs/medusa/file-s3": "rc" } ``` diff --git a/www/apps/resources/app/troubleshooting/page.mdx b/www/apps/resources/app/troubleshooting/page.mdx index 51500ec43c..6f94588722 100644 --- a/www/apps/resources/app/troubleshooting/page.mdx +++ b/www/apps/resources/app/troubleshooting/page.mdx @@ -8,7 +8,7 @@ export const metadata = { ## Update Medusa Version -While Medusa v2 is still in active development, a version is released every three hours under the `preview` tag. +While Medusa v2 is still in active development, a version is released every three hours under the `rc` tag. If you run into issues during your development, try first to remove the `node_modules` directory and `yarn.lock` file (or `package-lock.json`) and re-install the dependencies: @@ -18,7 +18,7 @@ rm yarn.lock # or package-lock.json yarn install # or npm install ``` -This updates the Medusa v2 dependencies to the latest `preview` version, which may have resolved your issue. +This updates the Medusa v2 dependencies to the latest `rc` version, which may have resolved your issue. If your issue still persists, check out the troubleshooting guides below or [create a GitHub issue](https://github.com/medusajs/medusa/issues/new?assignees=&labels=status:+needs+triaging,+version:+2.0&projects=&template=bug_report_v2.md&title=). diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index 70f44b00f3..e09760ac62 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -1,158 +1,158 @@ export const generatedEditDates = { - "app/commerce-modules/auth/auth-providers/emailpass/page.mdx": "2024-09-05T12:08:19.945Z", + "app/commerce-modules/auth/auth-providers/emailpass/page.mdx": "2024-09-30T08:43:53.153Z", "app/commerce-modules/auth/auth-providers/page.mdx": "2024-09-05T12:15:19.491Z", "app/commerce-modules/auth/authentication-route/page.mdx": "2024-09-05T12:06:38.155Z", - "app/commerce-modules/auth/examples/page.mdx": "2024-09-05T08:09:32.466Z", - "app/commerce-modules/auth/module-options/page.mdx": "2024-07-04T17:26:03+03:00", - "app/commerce-modules/auth/page.mdx": "2024-09-05T14:59:56.146Z", + "app/commerce-modules/auth/examples/page.mdx": "2024-09-30T08:43:53.154Z", + "app/commerce-modules/auth/module-options/page.mdx": "2024-09-30T08:43:53.156Z", + "app/commerce-modules/auth/page.mdx": "2024-09-30T08:43:53.156Z", "app/commerce-modules/cart/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/cart/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/cart/concepts/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/cart/examples/page.mdx": "2024-07-04T17:26:03+03:00", - "app/commerce-modules/cart/promotions/page.mdx": "2024-06-26T07:55:59+00:00", + "app/commerce-modules/cart/examples/page.mdx": "2024-09-30T08:43:53.157Z", + "app/commerce-modules/cart/promotions/page.mdx": "2024-09-30T08:43:53.158Z", "app/commerce-modules/cart/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", "app/commerce-modules/cart/tax-lines/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/cart/page.mdx": "2024-09-05T15:00:13.786Z", + "app/commerce-modules/cart/page.mdx": "2024-09-30T08:43:53.157Z", "app/commerce-modules/currency/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/currency/_events/page.mdx": "2024-07-03T19:27:13+03:00", - "app/commerce-modules/currency/examples/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/currency/examples/page.mdx": "2024-09-30T08:43:53.158Z", "app/commerce-modules/currency/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/currency/page.mdx": "2024-09-05T15:00:24.903Z", + "app/commerce-modules/currency/page.mdx": "2024-09-30T08:43:53.159Z", "app/commerce-modules/customer/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/customer/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/customer/customer-accounts/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/customer/examples/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/customer/examples/page.mdx": "2024-09-30T08:43:53.159Z", "app/commerce-modules/customer/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/customer/page.mdx": "2024-09-05T15:00:39.831Z", + "app/commerce-modules/customer/page.mdx": "2024-09-30T08:43:53.160Z", "app/commerce-modules/fulfillment/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/fulfillment/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/fulfillment/concepts/page.mdx": "2024-06-19T13:02:16+00:00", "app/commerce-modules/fulfillment/fulfillment-provider/page.mdx": "2024-07-01T10:21:19+03:00", "app/commerce-modules/fulfillment/item-fulfillment/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/fulfillment/module-options/page.mdx": "2024-07-22T07:17:15+00:00", + "app/commerce-modules/fulfillment/module-options/page.mdx": "2024-09-30T08:43:53.160Z", "app/commerce-modules/fulfillment/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", "app/commerce-modules/fulfillment/shipping-option/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/fulfillment/page.mdx": "2024-09-05T15:00:57.269Z", + "app/commerce-modules/fulfillment/page.mdx": "2024-09-30T08:43:53.160Z", "app/commerce-modules/inventory/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/inventory/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/inventory/concepts/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/inventory/examples/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/inventory/examples/page.mdx": "2024-09-30T08:43:53.161Z", "app/commerce-modules/inventory/inventory-in-flows/page.mdx": "2024-06-26T07:55:59+00:00", "app/commerce-modules/inventory/relations-to-other-modules/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/inventory/page.mdx": "2024-09-05T15:01:10.522Z", + "app/commerce-modules/inventory/page.mdx": "2024-09-30T08:43:53.161Z", "app/commerce-modules/order/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/order/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/order/claim/page.mdx": "2024-07-09T18:14:30+03:00", "app/commerce-modules/order/concepts/page.mdx": "2024-07-09T18:14:30+03:00", "app/commerce-modules/order/exchange/page.mdx": "2024-07-09T18:14:30+03:00", "app/commerce-modules/order/order-versioning/page.mdx": "2024-07-09T18:14:30+03:00", - "app/commerce-modules/order/promotion-adjustments/page.mdx": "2024-07-15T17:46:10+02:00", + "app/commerce-modules/order/promotion-adjustments/page.mdx": "2024-09-30T08:43:53.161Z", "app/commerce-modules/order/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", "app/commerce-modules/order/return/page.mdx": "2024-07-09T18:14:30+03:00", "app/commerce-modules/order/tax-lines/page.mdx": "2024-07-09T18:14:30+03:00", "app/commerce-modules/order/transactions/page.mdx": "2024-07-09T18:14:30+03:00", - "app/commerce-modules/order/page.mdx": "2024-09-05T15:01:23.809Z", + "app/commerce-modules/order/page.mdx": "2024-09-30T08:43:53.161Z", "app/commerce-modules/payment/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/payment/_events/page.mdx": "2024-07-03T19:27:13+03:00", - "app/commerce-modules/payment/examples/page.mdx": "2024-07-04T17:26:03+03:00", - "app/commerce-modules/payment/module-options/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/payment/examples/page.mdx": "2024-09-30T08:43:53.162Z", + "app/commerce-modules/payment/module-options/page.mdx": "2024-09-30T08:43:53.162Z", "app/commerce-modules/payment/payment/page.mdx": "2024-06-26T07:55:59+00:00", "app/commerce-modules/payment/payment-collection/page.mdx": "2024-05-29T11:08:06+00:00", "app/commerce-modules/payment/payment-flow/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/payment/payment-provider/stripe/page.mdx": "2024-07-18T13:04:29+02:00", - "app/commerce-modules/payment/payment-provider/page.mdx": "2024-07-01T10:21:19+03:00", + "app/commerce-modules/payment/payment-provider/stripe/page.mdx": "2024-09-30T08:43:53.163Z", + "app/commerce-modules/payment/payment-provider/page.mdx": "2024-09-30T08:43:53.163Z", "app/commerce-modules/payment/payment-session/page.mdx": "2024-06-26T07:55:59+00:00", "app/commerce-modules/payment/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", "app/commerce-modules/payment/webhook-events/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/payment/page.mdx": "2024-09-05T15:01:36.073Z", + "app/commerce-modules/payment/page.mdx": "2024-09-30T08:43:53.162Z", "app/commerce-modules/pricing/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/pricing/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/pricing/concepts/page.mdx": "2024-07-01T16:34:13+00:00", - "app/commerce-modules/pricing/examples/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/pricing/examples/page.mdx": "2024-09-30T08:43:53.164Z", "app/commerce-modules/pricing/price-calculation/page.mdx": "2024-07-26T10:09:41+03:00", "app/commerce-modules/pricing/price-rules/page.mdx": "2024-07-01T16:34:13+00:00", "app/commerce-modules/pricing/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", "app/commerce-modules/pricing/tax-inclusive-pricing/page.mdx": "2024-07-18T19:03:37+02:00", - "app/commerce-modules/pricing/page.mdx": "2024-09-05T15:01:47.750Z", + "app/commerce-modules/pricing/page.mdx": "2024-09-30T08:43:53.164Z", "app/commerce-modules/product/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/product/_events/page.mdx": "2024-07-03T19:27:13+03:00", - "app/commerce-modules/product/examples/page.mdx": "2024-07-04T17:26:03+03:00", - "app/commerce-modules/product/guides/price/page.mdx": "2024-07-31T17:01:33+03:00", - "app/commerce-modules/product/guides/price-with-taxes/page.mdx": "2024-08-01T15:32:54+00:00", + "app/commerce-modules/product/examples/page.mdx": "2024-09-30T08:43:53.164Z", + "app/commerce-modules/product/guides/price/page.mdx": "2024-09-30T08:43:53.165Z", + "app/commerce-modules/product/guides/price-with-taxes/page.mdx": "2024-09-30T08:43:53.165Z", "app/commerce-modules/product/relations-to-other-modules/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/product/page.mdx": "2024-09-05T15:02:02.758Z", + "app/commerce-modules/product/page.mdx": "2024-09-30T08:43:53.165Z", "app/commerce-modules/promotion/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/promotion/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/promotion/actions/page.mdx": "2024-06-26T07:55:59+00:00", "app/commerce-modules/promotion/application-method/page.mdx": "2024-06-26T07:55:59+00:00", "app/commerce-modules/promotion/campaign/page.mdx": "2024-05-29T11:08:06+00:00", "app/commerce-modules/promotion/concepts/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/promotion/examples/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/promotion/examples/page.mdx": "2024-09-30T08:43:53.166Z", "app/commerce-modules/promotion/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/promotion/page.mdx": "2024-09-05T15:02:15.009Z", + "app/commerce-modules/promotion/page.mdx": "2024-09-30T08:43:53.166Z", "app/commerce-modules/region/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/region/_events/page.mdx": "2024-07-03T19:27:13+03:00", - "app/commerce-modules/region/examples/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/region/examples/page.mdx": "2024-09-30T08:43:53.166Z", "app/commerce-modules/region/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/region/page.mdx": "2024-09-05T15:02:29.153Z", + "app/commerce-modules/region/page.mdx": "2024-09-30T08:43:53.167Z", "app/commerce-modules/sales-channel/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/sales-channel/_events/page.mdx": "2024-07-03T19:27:13+03:00", - "app/commerce-modules/sales-channel/examples/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/sales-channel/examples/page.mdx": "2024-09-30T08:43:53.167Z", "app/commerce-modules/sales-channel/publishable-api-keys/page.mdx": "2024-05-29T11:08:06+00:00", "app/commerce-modules/sales-channel/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/sales-channel/page.mdx": "2024-09-05T15:02:40.658Z", + "app/commerce-modules/sales-channel/page.mdx": "2024-09-30T08:43:53.167Z", "app/commerce-modules/stock-location/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/stock-location/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/stock-location/concepts/page.mdx": "2024-05-03T17:36:38+03:00", - "app/commerce-modules/stock-location/examples/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/stock-location/examples/page.mdx": "2024-09-30T08:43:53.168Z", "app/commerce-modules/stock-location/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/stock-location/page.mdx": "2024-09-05T15:02:53.237Z", + "app/commerce-modules/stock-location/page.mdx": "2024-09-30T08:43:53.168Z", "app/commerce-modules/store/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/store/_events/page.mdx": "2024-07-03T19:27:13+03:00", - "app/commerce-modules/store/examples/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/store/examples/page.mdx": "2024-09-30T08:43:53.168Z", "app/commerce-modules/store/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/store/page.mdx": "2024-09-05T15:03:06.211Z", + "app/commerce-modules/store/page.mdx": "2024-09-30T08:43:53.169Z", "app/commerce-modules/tax/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/tax/_events/page.mdx": "2024-07-03T19:27:13+03:00", - "app/commerce-modules/tax/examples/page.mdx": "2024-07-04T17:26:03+03:00", - "app/commerce-modules/tax/module-options/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/tax/examples/page.mdx": "2024-09-30T08:43:53.169Z", + "app/commerce-modules/tax/module-options/page.mdx": "2024-09-30T08:43:53.169Z", "app/commerce-modules/tax/tax-calculation-with-provider/page.mdx": "2024-07-01T10:21:19+03:00", "app/commerce-modules/tax/tax-rates-and-rules/page.mdx": "2024-06-26T07:55:59+00:00", "app/commerce-modules/tax/tax-region/page.mdx": "2024-05-29T11:08:06+00:00", - "app/commerce-modules/tax/page.mdx": "2024-09-05T15:03:18.495Z", + "app/commerce-modules/tax/page.mdx": "2024-09-30T08:43:53.170Z", "app/commerce-modules/user/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/user/_events/page.mdx": "2024-07-03T19:27:13+03:00", - "app/commerce-modules/user/examples/page.mdx": "2024-07-04T17:26:03+03:00", - "app/commerce-modules/user/module-options/page.mdx": "2024-07-04T17:26:03+03:00", + "app/commerce-modules/user/examples/page.mdx": "2024-09-30T08:43:53.171Z", + "app/commerce-modules/user/module-options/page.mdx": "2024-09-30T08:43:53.171Z", "app/commerce-modules/user/user-creation-flows/page.mdx": "2024-06-26T07:55:59+00:00", - "app/commerce-modules/user/page.mdx": "2024-09-05T15:03:30.835Z", + "app/commerce-modules/user/page.mdx": "2024-09-30T08:43:53.172Z", "app/commerce-modules/page.mdx": "2024-05-03T17:36:38+03:00", "app/contribution-guidelines/_admin-translations/page.mdx": "2024-05-13T18:55:11+03:00", "app/contribution-guidelines/docs/page.mdx": "2024-05-13T18:55:11+03:00", "app/create-medusa-app/page.mdx": "2024-08-05T11:10:55+03:00", "app/deployment/admin/vercel/page.mdx": "2024-07-31T17:01:33+03:00", - "app/deployment/medusa-application/railway/page.mdx": "2024-08-19T07:19:54.945Z", + "app/deployment/medusa-application/railway/page.mdx": "2024-09-30T08:43:53.172Z", "app/deployment/storefront/vercel/page.mdx": "2024-07-26T07:21:31+00:00", "app/deployment/page.mdx": "2024-07-25T09:55:22+03:00", "app/integrations/page.mdx": "2024-07-19T08:49:08+00:00", "app/medusa-cli/page.mdx": "2024-08-28T11:25:32.382Z", - "app/medusa-container-resources/page.mdx": "2024-08-05T07:24:27+00:00", - "app/medusa-workflows-reference/page.mdx": "2024-08-15T12:13:13+03:00", + "app/medusa-container-resources/page.mdx": "2024-09-30T08:43:53.173Z", + "app/medusa-workflows-reference/page.mdx": "2024-09-30T08:43:53.174Z", "app/nextjs-starter/page.mdx": "2024-07-01T10:21:19+03:00", - "app/recipes/b2b/page.mdx": "2024-08-29T09:23:12.736Z", - "app/recipes/commerce-automation/page.mdx": "2024-08-05T07:24:27+00:00", - "app/recipes/digital-products/examples/standard/page.mdx": "2024-09-26T09:00:12.671Z", + "app/recipes/b2b/page.mdx": "2024-09-30T08:43:53.175Z", + "app/recipes/commerce-automation/page.mdx": "2024-09-30T08:43:53.175Z", + "app/recipes/digital-products/examples/standard/page.mdx": "2024-09-30T08:43:53.176Z", "app/recipes/digital-products/page.mdx": "2024-08-02T13:02:06+00:00", "app/recipes/ecommerce/page.mdx": "2024-06-09T15:18:43+02:00", - "app/recipes/integrate-ecommerce-stack/page.mdx": "2024-08-05T07:24:27+00:00", - "app/recipes/marketplace/examples/vendors/page.mdx": "2024-09-26T09:06:11.833Z", + "app/recipes/integrate-ecommerce-stack/page.mdx": "2024-09-30T08:43:53.177Z", + "app/recipes/marketplace/examples/vendors/page.mdx": "2024-09-30T08:43:53.179Z", "app/recipes/marketplace/page.mdx": "2024-07-11T15:56:41+00:00", "app/recipes/multi-region-store/page.mdx": "2024-07-01T10:21:19+03:00", "app/recipes/omnichannel/page.mdx": "2024-06-09T15:18:43+02:00", "app/recipes/oms/page.mdx": "2024-07-01T10:21:19+03:00", "app/recipes/personalized-products/page.mdx": "2024-09-11T10:53:03.936Z", - "app/recipes/pos/page.mdx": "2024-07-04T17:26:03+03:00", - "app/recipes/subscriptions/examples/standard/page.mdx": "2024-09-26T10:19:57.044Z", + "app/recipes/pos/page.mdx": "2024-09-30T08:43:53.180Z", + "app/recipes/subscriptions/examples/standard/page.mdx": "2024-09-30T08:43:53.180Z", "app/recipes/subscriptions/page.mdx": "2024-08-02T12:40:26+03:00", "app/recipes/page.mdx": "2024-07-11T15:56:41+00:00", "app/service-factory-reference/methods/create/page.mdx": "2024-07-31T17:01:33+03:00", @@ -226,34 +226,34 @@ export const generatedEditDates = { "app/commerce-modules/auth/auth-flows/page.mdx": "2024-09-05T08:50:11.671Z", "app/commerce-modules/auth/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/auth/auth-identity-and-actor-types/page.mdx": "2024-09-05T08:11:28.936Z", - "app/commerce-modules/api-key/page.mdx": "2024-08-05T07:24:27+00:00", - "app/commerce-modules/auth/create-actor-type/page.mdx": "2024-09-11T13:15:34.040Z", + "app/commerce-modules/api-key/page.mdx": "2024-09-30T08:43:53.152Z", + "app/commerce-modules/auth/create-actor-type/page.mdx": "2024-09-30T08:43:53.154Z", "app/architectural-modules/page.mdx": "2024-05-28T13:25:03+03:00", "app/commerce-modules/api-key/relations-to-other-modules/page.mdx": "2024-05-29T11:08:06+00:00", - "app/architectural-modules/workflow-engine/redis/page.mdx": "2024-07-18T13:04:29+02:00", - "app/commerce-modules/api-key/examples/page.mdx": "2024-07-04T17:26:03+03:00", - "app/architectural-modules/notification/sendgrid/page.mdx": "2024-08-05T07:21:11+00:00", + "app/architectural-modules/workflow-engine/redis/page.mdx": "2024-09-30T08:43:53.152Z", + "app/commerce-modules/api-key/examples/page.mdx": "2024-09-30T08:43:53.152Z", + "app/architectural-modules/notification/sendgrid/page.mdx": "2024-09-30T08:43:53.151Z", "app/commerce-modules/api-key/concepts/page.mdx": "2024-06-26T07:55:59+00:00", "app/architectural-modules/workflow-engine/page.mdx": "2024-05-28T13:25:03+03:00", "app/_events-reference/page.mdx": "2024-07-03T19:27:13+03:00", "app/architectural-modules/cache/page.mdx": "2024-05-28T13:25:03+03:00", - "app/architectural-modules/file/s3/page.mdx": "2024-08-06T09:59:46+03:00", + "app/architectural-modules/file/s3/page.mdx": "2024-09-30T08:43:53.150Z", "app/commerce-modules/api-key/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/api-key/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", - "app/architectural-modules/cache/redis/page.mdx": "2024-07-18T13:04:29+02:00", - "app/architectural-modules/event/redis/page.mdx": "2024-07-24T17:07:41+03:00", - "app/architectural-modules/event/local/page.mdx": "2024-07-24T17:07:41+03:00", - "app/architectural-modules/workflow-engine/in-memory/page.mdx": "2024-07-18T13:04:29+02:00", - "app/architectural-modules/cache/in-memory/page.mdx": "2024-07-18T13:04:29+02:00", - "app/architectural-modules/notification/local/page.mdx": "2024-07-18T13:04:29+02:00", - "app/architectural-modules/file/local/page.mdx": "2024-07-18T13:04:29+02:00", - "app/architectural-modules/notification/send-notification/page.mdx": "2024-08-06T09:59:46+03:00", + "app/architectural-modules/cache/redis/page.mdx": "2024-09-30T08:43:53.149Z", + "app/architectural-modules/event/redis/page.mdx": "2024-09-30T08:43:53.149Z", + "app/architectural-modules/event/local/page.mdx": "2024-09-30T08:43:53.149Z", + "app/architectural-modules/workflow-engine/in-memory/page.mdx": "2024-09-30T08:43:53.151Z", + "app/architectural-modules/cache/in-memory/page.mdx": "2024-09-30T08:43:53.148Z", + "app/architectural-modules/notification/local/page.mdx": "2024-09-30T08:43:53.150Z", + "app/architectural-modules/file/local/page.mdx": "2024-09-30T08:43:53.150Z", + "app/architectural-modules/notification/send-notification/page.mdx": "2024-09-30T08:43:53.151Z", "app/architectural-modules/file/page.mdx": "2024-07-01T10:21:19+03:00", "app/architectural-modules/event/page.mdx": "2024-05-28T13:25:03+03:00", - "app/architectural-modules/cache/create/page.mdx": "2024-07-04T17:26:03+03:00", - "app/admin-widget-injection-zones/page.mdx": "2024-05-29T13:50:19+03:00", - "app/architectural-modules/notification/page.mdx": "2024-07-04T17:26:03+03:00", - "app/architectural-modules/event/create/page.mdx": "2024-07-04T17:26:03+03:00", + "app/architectural-modules/cache/create/page.mdx": "2024-09-30T08:43:53.148Z", + "app/admin-widget-injection-zones/page.mdx": "2024-09-30T08:43:53.147Z", + "app/architectural-modules/notification/page.mdx": "2024-09-30T08:43:53.151Z", + "app/architectural-modules/event/create/page.mdx": "2024-09-30T08:43:53.149Z", "app/troubleshooting/deployment/page.mdx": "2024-08-19T07:19:40.924Z", "references/core_flows/Order/functions/core_flows.Order.orderEditUpdateItemQuantityValidationStep/page.mdx": "2024-08-20T00:10:58.913Z", "references/core_flows/Order/functions/core_flows.Order.orderEditUpdateItemQuantityWorkflow/page.mdx": "2024-08-20T00:10:58.949Z", @@ -265,7 +265,7 @@ export const generatedEditDates = { "references/core_flows/Order/functions/core_flows.Order.updateOrderEditAddItemValidationStep/page.mdx": "2024-08-20T00:10:59.065Z", "references/core_flows/Order/functions/core_flows.Order.updateOrderEditAddItemWorkflow/page.mdx": "2024-08-20T00:10:59.105Z", "references/core_flows/core_flows.Order/page.mdx": "2024-08-20T00:10:56.437Z", - "references/modules/core_flows/page.mdx": "2024-09-18T00:11:14.035Z", + "references/modules/core_flows/page.mdx": "2024-09-30T08:43:53.312Z", "references/types/types.HttpTypes/page.mdx": "2024-09-05T00:11:17.026Z", "app/troubleshooting/medusa-admin/no-widget-route/page.mdx": "2024-08-23T11:31:26.346Z", "references/auth/IAuthModuleService/methods/auth.IAuthModuleService.createProviderIdentities/page.mdx": "2024-09-17T00:10:59.695Z", @@ -287,14 +287,14 @@ export const generatedEditDates = { "references/auth/interfaces/auth.IAuthModuleService/page.mdx": "2024-09-06T11:11:37.678Z", "references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.completeCartWorkflow/page.mdx": "2024-09-17T00:11:05.639Z", "references/core_flows/Cart/core_flows.Cart.Workflows_Cart/page.mdx": "2024-09-17T00:11:05.591Z", - "references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.createRemoteLinkStep/page.mdx": "2024-08-28T00:11:12.742Z", - "references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.dismissRemoteLinkStep/page.mdx": "2024-08-28T00:11:12.746Z", + "references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.createRemoteLinkStep/page.mdx": "2024-09-30T08:43:53.187Z", + "references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.dismissRemoteLinkStep/page.mdx": "2024-09-30T08:43:53.187Z", "references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.updateRemoteLinksStep/page.mdx": "2024-08-28T00:11:12.754Z", "references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.batchLinksWorkflow/page.mdx": "2024-08-28T00:11:12.766Z", "references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.createLinksWorkflow/page.mdx": "2024-08-28T00:11:12.770Z", "references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.dismissLinksWorkflow/page.mdx": "2024-08-28T00:11:12.774Z", "references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.updateLinksWorkflow/page.mdx": "2024-08-28T00:11:12.778Z", - "references/core_flows/Common/core_flows.Common.Steps_Common/page.mdx": "2024-08-30T00:11:09.490Z", + "references/core_flows/Common/core_flows.Common.Steps_Common/page.mdx": "2024-09-30T08:43:53.188Z", "references/core_flows/Common/core_flows.Common.Workflows_Common/page.mdx": "2024-08-28T00:11:12.762Z", "references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createFulfillmentStep/page.mdx": "2024-09-17T00:11:06.663Z", "references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createReturnFulfillmentStep/page.mdx": "2024-09-17T00:11:06.691Z", @@ -422,7 +422,7 @@ export const generatedEditDates = { "references/core_flows/Order/core_flows.Order.Workflows_Order/page.mdx": "2024-09-17T00:11:11.223Z", "references/core_flows/Shipping_Options/Steps_Shipping_Options/functions/core_flows.Shipping_Options.Steps_Shipping_Options.listShippingOptionsForContextStep/page.mdx": "2024-08-28T00:11:28.966Z", "references/core_flows/Shipping_Options/core_flows.Shipping_Options.Steps_Shipping_Options/page.mdx": "2024-08-28T00:11:28.958Z", - "references/core_flows/core_flows.Steps_Common/page.mdx": "2024-08-30T00:11:09.542Z", + "references/core_flows/core_flows.Steps_Common/page.mdx": "2024-09-30T08:43:53.189Z", "references/core_flows/core_flows.Steps_Fulfillment/page.mdx": "2024-09-17T00:11:07.059Z", "references/core_flows/core_flows.Steps_Order/page.mdx": "2024-09-17T00:11:15.091Z", "references/core_flows/core_flows.Steps_Shipping_Options/page.mdx": "2024-08-28T00:11:28.974Z", @@ -465,13 +465,13 @@ export const generatedEditDates = { "references/fulfillment_models/classes/fulfillment_models.ShippingOptionRule/page.mdx": "2024-08-29T00:11:41.425Z", "references/fulfillment_models/classes/fulfillment_models.ShippingOptionType/page.mdx": "2024-08-29T00:11:41.433Z", "references/fulfillment_models/classes/fulfillment_models.ShippingProfile/page.mdx": "2024-08-29T00:11:41.457Z", - "references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx": "2024-08-28T00:11:31.038Z", - "references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx": "2024-08-28T00:11:31.042Z", - "references/helper_steps/functions/helper_steps.emitEventStep/page.mdx": "2024-08-28T00:11:31.046Z", + "references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx": "2024-09-30T08:43:53.197Z", + "references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx": "2024-09-30T08:43:53.197Z", + "references/helper_steps/functions/helper_steps.emitEventStep/page.mdx": "2024-09-30T08:43:53.197Z", "references/helper_steps/functions/helper_steps.updateRemoteLinksStep/page.mdx": "2024-08-28T00:11:31.050Z", "references/helper_steps/types/helper_steps.DismissRemoteLinksStepInput/page.mdx": "2024-08-28T00:11:31.042Z", "references/medusa_config/interfaces/medusa_config.AdminOptions/page.mdx": "2024-09-03T00:11:20.871Z", - "references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx": "2024-09-03T00:11:20.891Z", + "references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx": "2024-09-30T08:43:53.199Z", "references/medusa_config/interfaces/medusa_config.ProjectConfigOptions/page.mdx": "2024-08-28T00:11:31.266Z", "references/modules/auth/page.mdx": "2024-08-28T00:11:06.310Z", "references/modules/modules_sdk/page.mdx": "2024-09-24T00:12:08.445Z", @@ -535,7 +535,7 @@ export const generatedEditDates = { "references/stock_location_next/interfaces/stock_location_next.ShippingOptionTypeDTO/page.mdx": "2024-08-28T00:11:34.911Z", "references/stock_location_next/interfaces/stock_location_next.ShippingProfileDTO/page.mdx": "2024-08-28T00:11:34.931Z", "references/types/CommonTypes/interfaces/types.CommonTypes.AdminOptions/page.mdx": "2024-08-28T00:11:04.822Z", - "references/types/CommonTypes/interfaces/types.CommonTypes.ConfigModule/page.mdx": "2024-09-06T00:11:07.142Z", + "references/types/CommonTypes/interfaces/types.CommonTypes.ConfigModule/page.mdx": "2024-09-30T08:43:53.320Z", "references/types/CommonTypes/interfaces/types.CommonTypes.ProjectConfigOptions/page.mdx": "2024-09-06T00:11:07.142Z", "references/types/DmlTypes/interfaces/types.DmlTypes.IDmlEntity/page.mdx": "2024-08-28T00:11:04.918Z", "references/types/DmlTypes/types/types.DmlTypes.InferTypeOf/page.mdx": "2024-08-28T00:11:04.942Z", @@ -620,7 +620,7 @@ export const generatedEditDates = { "references/types/NotificationTypes/interfaces/types.NotificationTypes.Attachment/page.mdx": "2024-08-29T00:11:17.880Z", "references/modules/fulfillment_models/page.mdx": "2024-08-29T00:11:41.369Z", "references/modules/order_models/page.mdx": "2024-08-29T00:11:42.665Z", - "references/notification/classes/notification.AbstractNotificationProviderService/page.mdx": "2024-09-17T00:11:24.847Z", + "references/notification/classes/notification.AbstractNotificationProviderService/page.mdx": "2024-09-30T08:43:53.316Z", "references/order/interfaces/order.IOrderModuleService/page.mdx": "2024-09-17T00:11:25.807Z", "references/order_models/classes/order_models.OrderItem/page.mdx": "2024-09-17T00:11:25.047Z", "references/order_models/classes/order_models.OrderSummary/page.mdx": "2024-09-17T00:11:25.087Z", @@ -643,7 +643,7 @@ export const generatedEditDates = { "app/medusa-cli/commands/start/page.mdx": "2024-08-28T10:44:19.952Z", "app/medusa-cli/commands/telemtry/page.mdx": "2024-08-28T11:25:08.553Z", "app/medusa-cli/commands/user/page.mdx": "2024-08-28T10:44:52.489Z", - "app/recipes/marketplace/examples/restaurant-delivery/page.mdx": "2024-09-26T10:12:17.661Z", + "app/recipes/marketplace/examples/restaurant-delivery/page.mdx": "2024-09-30T08:43:53.178Z", "references/types/HttpTypes/interfaces/types.HttpTypes.AdminCreateCustomerGroup/page.mdx": "2024-08-30T00:11:02.074Z", "references/types/HttpTypes/interfaces/types.HttpTypes.AdminCreateReservation/page.mdx": "2024-08-30T00:11:02.342Z", "references/types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx": "2024-08-30T00:11:02.070Z", @@ -714,7 +714,7 @@ export const generatedEditDates = { "references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateLineItemInCartWorkflow/page.mdx": "2024-09-03T00:11:02.259Z", "references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateTaxLinesWorkflow/page.mdx": "2024-09-03T00:11:02.275Z", "references/core_flows/Cart/core_flows.Cart.Steps_Cart/page.mdx": "2024-09-17T00:11:05.267Z", - "references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.useRemoteQueryStep/page.mdx": "2024-08-30T00:11:09.514Z", + "references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.useRemoteQueryStep/page.mdx": "2024-09-30T08:43:53.188Z", "references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingOptionRulesStep/page.mdx": "2024-08-30T00:11:10.030Z", "references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.deleteShippingOptionRulesStep/page.mdx": "2024-09-05T00:11:25.714Z", "references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.cancelOrderClaimStep/page.mdx": "2024-08-30T00:11:11.010Z", @@ -761,7 +761,7 @@ export const generatedEditDates = { "references/core_flows/types/core_flows.OrderEditRequestWorkflowInput/page.mdx": "2024-08-30T00:11:25.750Z", "references/core_flows/types/core_flows.UpdateOrderTaxLinesWorkflowInput/page.mdx": "2024-08-30T00:11:25.754Z", "references/core_flows/types/core_flows.UpdateTaxLinesWorkflowInput/page.mdx": "2024-09-03T00:11:19.047Z", - "references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx": "2024-08-30T00:11:27.218Z", + "references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx": "2024-09-30T08:43:53.198Z", "references/modules/types/page.mdx": "2024-09-23T00:11:33.472Z", "references/order/IOrderModuleService/methods/order.IOrderModuleService.cancelReturn/page.mdx": "2024-09-17T00:11:26.515Z", "references/order/interfaces/order.CancelOrderClaimDTO/page.mdx": "2024-08-30T00:11:28.474Z", @@ -913,8 +913,8 @@ export const generatedEditDates = { "references/types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx": "2024-09-20T00:12:02.470Z", "references/types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx": "2024-09-17T00:10:58.543Z", "references/types/interfaces/types.BaseClaim/page.mdx": "2024-09-20T00:12:02.329Z", - "app/commerce-modules/auth/auth-providers/github/page.mdx": "2024-09-05T12:13:04.991Z", - "app/commerce-modules/auth/auth-providers/google/page.mdx": "2024-09-05T12:12:59.196Z", + "app/commerce-modules/auth/auth-providers/github/page.mdx": "2024-09-30T08:43:53.153Z", + "app/commerce-modules/auth/auth-providers/google/page.mdx": "2024-09-30T08:43:53.153Z", "app/storefront-development/customers/third-party-login/page.mdx": "2024-09-11T09:58:51.801Z", "references/types/HttpTypes/types/types.HttpTypes.AdminWorkflowRunResponse/page.mdx": "2024-09-17T00:10:58.803Z", "references/types/HttpTypes/types/types.HttpTypes.BatchResponse/page.mdx": "2024-09-05T00:11:17.182Z", @@ -922,7 +922,7 @@ export const generatedEditDates = { "references/auth/IAuthModuleService/methods/auth.IAuthModuleService.authenticate/page.mdx": "2024-09-05T00:11:18.402Z", "references/auth/IAuthModuleService/methods/auth.IAuthModuleService.validateCallback/page.mdx": "2024-09-05T00:11:18.406Z", "references/auth/interfaces/auth.AuthenticationResponse/page.mdx": "2024-09-06T11:11:37.674Z", - "references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx": "2024-09-17T00:10:59.623Z", + "references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx": "2024-09-30T08:43:53.186Z", "references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.refreshInviteTokensWorkflow/page.mdx": "2024-09-05T00:11:26.266Z", "references/types/CommonTypes/types/types.CommonTypes.BatchMethodResponse/page.mdx": "2024-09-05T00:11:16.710Z", "references/types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnShipping/page.mdx": "2024-09-05T00:11:17.518Z", @@ -940,7 +940,7 @@ export const generatedEditDates = { "references/types/interfaces/types.AdminClaimUpdateShippingMethod/page.mdx": "2024-09-05T00:11:16.958Z", "references/types/interfaces/types.AdminExchangeAddShippingMethod/page.mdx": "2024-09-05T00:11:16.994Z", "references/types/interfaces/types.AdminExchangeUpdateShippingMethod/page.mdx": "2024-09-05T00:11:16.998Z", - "references/types/interfaces/types.DetailWidgetProps/page.mdx": "2024-09-05T00:11:16.614Z", + "references/types/interfaces/types.DetailWidgetProps/page.mdx": "2024-09-30T08:43:53.320Z", "references/types/types.WorkflowsSdkTypes/page.mdx": "2024-09-05T00:11:18.138Z", "references/product/IProductModuleService/methods/product.IProductModuleService.createProductOptionValues/page.mdx": "2024-09-17T00:11:27.679Z", "references/product/IProductModuleService/methods/product.IProductModuleService.deleteProductOptionValues/page.mdx": "2024-09-17T00:11:27.683Z", @@ -1242,17 +1242,17 @@ export const generatedEditDates = { "references/customer_models/classes/customer_models.Customer/page.mdx": "2024-09-17T00:11:23.259Z", "references/customer_models/classes/customer_models.CustomerGroup/page.mdx": "2024-09-17T00:11:23.251Z", "references/customer_models/classes/customer_models.CustomerGroupCustomer/page.mdx": "2024-09-17T00:11:23.247Z", - "references/dml/Model_Methods/methods/dml.Model_Methods.cascades/page.mdx": "2024-09-17T00:11:23.535Z", - "references/dml/Property_Types/methods/dml.Property_Types.enum/page.mdx": "2024-09-17T00:11:23.523Z", - "references/dml/Property_Types/methods/dml.Property_Types.id/page.mdx": "2024-09-17T00:11:23.515Z", + "references/dml/Model_Methods/methods/dml.Model_Methods.cascades/page.mdx": "2024-09-30T08:43:53.190Z", + "references/dml/Property_Types/methods/dml.Property_Types.enum/page.mdx": "2024-09-30T08:43:53.192Z", + "references/dml/Property_Types/methods/dml.Property_Types.id/page.mdx": "2024-09-30T08:43:53.192Z", "references/dml/Relationship_Methods/methods/dml.Relationship_Methods.belongsTo/page.mdx": "2024-09-17T00:11:23.527Z", - "references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasMany/page.mdx": "2024-09-17T00:11:23.531Z", - "references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasOne/page.mdx": "2024-09-17T00:11:23.527Z", - "references/dml/Relationship_Methods/methods/dml.Relationship_Methods.manyToMany/page.mdx": "2024-09-17T00:11:23.531Z", + "references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasMany/page.mdx": "2024-09-30T08:43:53.193Z", + "references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasOne/page.mdx": "2024-09-30T08:43:53.194Z", + "references/dml/Relationship_Methods/methods/dml.Relationship_Methods.manyToMany/page.mdx": "2024-09-30T08:43:53.194Z", "references/dml/entity/classes/dml.entity.DmlEntity/page.mdx": "2024-09-17T00:11:23.507Z", - "references/dml/entity_builder/EntityBuilder/methods/dml.entity_builder.EntityBuilder.define/page.mdx": "2024-09-17T00:11:23.503Z", + "references/dml/entity_builder/EntityBuilder/methods/dml.entity_builder.EntityBuilder.define/page.mdx": "2024-09-30T08:43:53.194Z", "references/dml/entity_builder/types/dml.entity_builder.ManyToManyOptions/page.mdx": "2024-09-17T00:11:23.499Z", - "references/file/classes/file.AbstractFileProviderService/page.mdx": "2024-09-17T00:11:23.551Z", + "references/file/classes/file.AbstractFileProviderService/page.mdx": "2024-09-30T08:43:53.195Z", "references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.createFulfillmentSets/page.mdx": "2024-09-17T00:11:23.903Z", "references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.createGeoZones/page.mdx": "2024-09-17T00:11:23.975Z", "references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.createServiceZones/page.mdx": "2024-09-17T00:11:23.935Z", @@ -1314,7 +1314,7 @@ export const generatedEditDates = { "references/fulfillment/interfaces/fulfillment.OrderLineItemDTO/page.mdx": "2024-09-17T00:11:24.259Z", "references/fulfillment/interfaces/fulfillment.OrderLineItemTaxLineDTO/page.mdx": "2024-09-17T00:11:24.231Z", "references/fulfillment/types/fulfillment.JoinerRelationship/page.mdx": "2024-09-17T00:11:24.183Z", - "references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx": "2024-09-17T00:11:23.639Z", + "references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx": "2024-09-30T08:43:53.195Z", "references/inventory_next/IInventoryService/methods/inventory_next.IInventoryService.adjustInventory/page.mdx": "2024-09-17T00:11:24.695Z", "references/inventory_next/IInventoryService/methods/inventory_next.IInventoryService.confirmInventory/page.mdx": "2024-09-17T00:11:24.699Z", "references/inventory_next/IInventoryService/methods/inventory_next.IInventoryService.createInventoryItems/page.mdx": "2024-09-17T00:11:24.639Z", @@ -1454,7 +1454,7 @@ export const generatedEditDates = { "references/payment/interfaces/payment.JoinerServiceConfig/page.mdx": "2024-09-17T00:11:26.727Z", "references/payment/interfaces/payment.JoinerServiceConfigAlias/page.mdx": "2024-09-17T00:11:26.723Z", "references/payment/types/payment.JoinerRelationship/page.mdx": "2024-09-17T00:11:26.723Z", - "references/payment_provider/classes/payment_provider.AbstractPaymentProvider/page.mdx": "2024-09-24T00:12:10.405Z", + "references/payment_provider/classes/payment_provider.AbstractPaymentProvider/page.mdx": "2024-09-30T08:43:53.316Z", "references/pricing/IPricingModuleService/methods/pricing.IPricingModuleService.addPriceListPrices/page.mdx": "2024-09-17T00:11:27.255Z", "references/pricing/IPricingModuleService/methods/pricing.IPricingModuleService.addPrices/page.mdx": "2024-09-17T00:11:27.199Z", "references/pricing/IPricingModuleService/methods/pricing.IPricingModuleService.calculatePrices/page.mdx": "2024-09-17T00:11:27.171Z", @@ -1688,7 +1688,7 @@ export const generatedEditDates = { "references/tax/interfaces/tax.TaxRateRuleDTO/page.mdx": "2024-09-17T00:11:28.607Z", "references/tax/interfaces/tax.UpdateTaxRateDTO/page.mdx": "2024-09-17T00:11:28.631Z", "references/tax/types/tax.JoinerRelationship/page.mdx": "2024-09-17T00:11:28.567Z", - "references/tax_provider/interfaces/tax_provider.ITaxProvider/page.mdx": "2024-09-17T00:11:28.543Z", + "references/tax_provider/interfaces/tax_provider.ITaxProvider/page.mdx": "2024-09-30T08:43:53.318Z", "references/tax_provider/types/tax_provider.ItemTaxCalculationLine/page.mdx": "2024-09-17T00:11:28.539Z", "references/tax_provider/types/tax_provider.ShippingTaxCalculationLine/page.mdx": "2024-09-17T00:11:28.535Z", "references/types/DAL/interfaces/types.DAL.RepositoryService/page.mdx": "2024-09-17T00:10:57.963Z", @@ -1791,5 +1791,29 @@ export const generatedEditDates = { "references/medusa/types/medusa.MedusaRequestHandler-1/page.mdx": "2024-09-24T00:11:41.190Z", "references/medusa/types/medusa.MedusaRequestHandler/page.mdx": "2024-09-24T00:11:41.155Z", "references/medusa/types/medusa.SubscriberArgs/page.mdx": "2024-09-24T00:11:41.195Z", - "references/workflows/types/workflows.ReturnWorkflow/page.mdx": "2024-09-24T00:12:12.649Z" + "references/workflows/types/workflows.ReturnWorkflow/page.mdx": "2024-09-24T00:12:12.649Z", + "references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.emitEventStep/page.mdx": "2024-09-30T08:43:53.188Z", + "references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.removeRemoteLinkStep/page.mdx": "2024-09-30T08:43:53.188Z", + "references/dml/Model_Methods/methods/dml.Model_Methods.indexes/page.mdx": "2024-09-30T08:43:53.190Z", + "references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.default/page.mdx": "2024-09-30T08:43:53.190Z", + "references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.index/page.mdx": "2024-09-30T08:43:53.190Z", + "references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.nullable/page.mdx": "2024-09-30T08:43:53.191Z", + "references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.unique/page.mdx": "2024-09-30T08:43:53.191Z", + "references/dml/Property_Types/methods/dml.Property_Types.array/page.mdx": "2024-09-30T08:43:53.191Z", + "references/dml/Property_Types/methods/dml.Property_Types.bigNumber/page.mdx": "2024-09-30T08:43:53.192Z", + "references/dml/Property_Types/methods/dml.Property_Types.boolean/page.mdx": "2024-09-30T08:43:53.192Z", + "references/dml/Property_Types/methods/dml.Property_Types.dateTime/page.mdx": "2024-09-30T08:43:53.192Z", + "references/dml/Property_Types/methods/dml.Property_Types.json/page.mdx": "2024-09-30T08:43:53.193Z", + "references/dml/Property_Types/methods/dml.Property_Types.number/page.mdx": "2024-09-30T08:43:53.193Z", + "references/dml/Property_Types/methods/dml.Property_Types.text/page.mdx": "2024-09-30T08:43:53.193Z", + "references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx": "2024-09-30T08:43:53.198Z", + "references/modules/workflows/page.mdx": "2024-09-30T08:43:53.315Z", + "references/search/classes/search.AbstractSearchService/page.mdx": "2024-09-30T08:43:53.317Z", + "references/workflows/StepResponse/methods/workflows.StepResponse.permanentFailure/page.mdx": "2024-09-30T08:43:53.321Z", + "references/workflows/functions/workflows.createHook/page.mdx": "2024-09-30T08:43:53.321Z", + "references/workflows/functions/workflows.createStep/page.mdx": "2024-09-30T08:43:53.321Z", + "references/workflows/functions/workflows.createWorkflow/page.mdx": "2024-09-30T08:43:53.321Z", + "references/workflows/functions/workflows.parallelize/page.mdx": "2024-09-30T08:43:53.322Z", + "references/workflows/functions/workflows.transform/page.mdx": "2024-09-30T08:43:53.322Z", + "references/workflows/functions/workflows.when/page.mdx": "2024-09-30T08:43:53.324Z" } \ No newline at end of file diff --git a/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx b/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx index 74a9dc1630..37122f7020 100644 --- a/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx +++ b/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx @@ -18,10 +18,10 @@ Start by creating a new directory for your module. For example, `src/modules/my- ## 2. Create the Auth Provider Service -Create the file `src/modules/my-auth/service.ts` that holds the module's main service. It must extend the `AbstractAuthModuleProvider` class imported from `@medusajs/utils`: +Create the file `src/modules/my-auth/service.ts` that holds the module's main service. It must extend the `AbstractAuthModuleProvider` class imported from `@medusajs/framework/utils`: ```ts title="src/modules/my-auth/service.ts" -import { AbstractAuthModuleProvider } from "@medusajs/utils" +import { AbstractAuthModuleProvider } from "@medusajs/framework/utils" class MyAuthProviderService extends AbstractAuthModuleProvider { // TODO implement methods @@ -47,8 +47,8 @@ In the constructor, you must pass to the parent constructor two parameters: #### Example ```ts -import { AbstractAuthModuleProvider } from "@medusajs/utils" -import { Logger } from "@medusajs/types" +import { AbstractAuthModuleProvider } from "@medusajs/framework/utils" +import { Logger } from "@medusajs/framework/types" type InjectedDependencies = { logger: Logger @@ -119,7 +119,7 @@ import { AuthIdentityProviderService, AuthenticationInput, AuthenticationResponse -} from "@medusajs/types" +} from "@medusajs/framework/types" // ... class MyAuthProviderService extends AbstractAuthModuleProvider { @@ -162,7 +162,7 @@ import { AuthIdentityProviderService, AuthenticationInput, AuthenticationResponse -} from "@medusajs/types" +} from "@medusajs/framework/types" // ... class MyAuthProviderService extends AbstractAuthModuleProvider { @@ -220,8 +220,8 @@ import { AuthIdentityProviderService, AuthenticationInput, AuthenticationResponse -} from "@medusajs/types" -import { MedusaError } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { MedusaError } from "@medusajs/framework/utils" // ... class MyAuthProviderService extends AbstractAuthModuleProvider { @@ -282,8 +282,8 @@ import { AuthIdentityProviderService, AuthenticationInput, AuthenticationResponse -} from "@medusajs/types" -import { MedusaError } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { MedusaError } from "@medusajs/framework/utils" // ... class MyAuthProviderService extends AbstractAuthModuleProvider { @@ -344,7 +344,7 @@ import { AuthIdentityProviderService, AuthenticationInput, AuthenticationResponse -} from "@medusajs/types" +} from "@medusajs/framework/types" // ... class MyAuthProviderService extends AbstractAuthModuleProvider { @@ -428,7 +428,7 @@ This exports the module's definition, indicating that the `MyAuthProviderService To use your Auth Module Provider, add it to the `providers` array of the Auth Module: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.createRemoteLinkStep/page.mdx b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.createRemoteLinkStep/page.mdx index df9c2dccc1..369beeee57 100644 --- a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.createRemoteLinkStep/page.mdx +++ b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.createRemoteLinkStep/page.mdx @@ -16,9 +16,9 @@ Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/adva ## Example ```ts -import { createWorkflow } from "@medusajs/workflows-sdk" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" import { createRemoteLinkStep } from "@medusajs/core-flows" -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow("hello-world", () => { createRemoteLinkStep([ diff --git a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.dismissRemoteLinkStep/page.mdx b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.dismissRemoteLinkStep/page.mdx index fa8b9ef382..f9b63be58b 100644 --- a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.dismissRemoteLinkStep/page.mdx +++ b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.dismissRemoteLinkStep/page.mdx @@ -18,13 +18,13 @@ Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/adva ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { dismissRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", diff --git a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.emitEventStep/page.mdx b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.emitEventStep/page.mdx index 174a95b0a2..77b78848c3 100644 --- a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.emitEventStep/page.mdx +++ b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.emitEventStep/page.mdx @@ -16,7 +16,7 @@ Emit an event. ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { emitEventStep } from "@medusajs/core-flows" diff --git a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.removeRemoteLinkStep/page.mdx b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.removeRemoteLinkStep/page.mdx index 11e41d2cfa..57af8b291e 100644 --- a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.removeRemoteLinkStep/page.mdx +++ b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.removeRemoteLinkStep/page.mdx @@ -18,13 +18,13 @@ Learn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advan ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { removeRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", diff --git a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.useRemoteQueryStep/page.mdx b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.useRemoteQueryStep/page.mdx index bbdee79772..ae14bb2fd5 100644 --- a/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.useRemoteQueryStep/page.mdx +++ b/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.useRemoteQueryStep/page.mdx @@ -20,7 +20,7 @@ To retrieve a list of records of a data model: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -44,7 +44,7 @@ To retrieve a single item instead of a an array: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -74,7 +74,7 @@ To throw an error if a record isn't found matching the specified ID: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" diff --git a/www/apps/resources/references/core_flows/Common/core_flows.Common.Steps_Common/page.mdx b/www/apps/resources/references/core_flows/Common/core_flows.Common.Steps_Common/page.mdx index 5b57de1abc..717c20a4c6 100644 --- a/www/apps/resources/references/core_flows/Common/core_flows.Common.Steps_Common/page.mdx +++ b/www/apps/resources/references/core_flows/Common/core_flows.Common.Steps_Common/page.mdx @@ -11,9 +11,9 @@ Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/adva ### Example ```ts -import { createWorkflow } from "@medusajs/workflows-sdk" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" import { createRemoteLinkStep } from "@medusajs/core-flows" -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow("hello-world", () => { createRemoteLinkStep([ @@ -50,13 +50,13 @@ Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/adva ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { dismissRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", @@ -92,7 +92,7 @@ Emit an event. ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { emitEventStep } from "@medusajs/core-flows" @@ -127,13 +127,13 @@ Learn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advan ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { removeRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", @@ -182,7 +182,7 @@ To retrieve a list of records of a data model: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -206,7 +206,7 @@ To retrieve a single item instead of a an array: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -236,7 +236,7 @@ To throw an error if a record isn't found matching the specified ID: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" diff --git a/www/apps/resources/references/core_flows/core_flows.Steps_Common/page.mdx b/www/apps/resources/references/core_flows/core_flows.Steps_Common/page.mdx index 8ba24b707e..c1c439cfe1 100644 --- a/www/apps/resources/references/core_flows/core_flows.Steps_Common/page.mdx +++ b/www/apps/resources/references/core_flows/core_flows.Steps_Common/page.mdx @@ -51,9 +51,9 @@ Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/adva ### Example ```ts -import { createWorkflow } from "@medusajs/workflows-sdk" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" import { createRemoteLinkStep } from "@medusajs/core-flows" -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow("hello-world", () => { createRemoteLinkStep([ @@ -90,13 +90,13 @@ Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/adva ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { dismissRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", @@ -132,7 +132,7 @@ Emit an event. ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { emitEventStep } from "@medusajs/core-flows" @@ -167,13 +167,13 @@ Learn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advan ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { removeRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", @@ -222,7 +222,7 @@ To retrieve a list of records of a data model: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -246,7 +246,7 @@ To retrieve a single item instead of a an array: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -276,7 +276,7 @@ To throw an error if a record isn't found matching the specified ID: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" diff --git a/www/apps/resources/references/dml/Model_Methods/methods/dml.Model_Methods.cascades/page.mdx b/www/apps/resources/references/dml/Model_Methods/methods/dml.Model_Methods.cascades/page.mdx index af2c799d21..eeaf6a37f1 100644 --- a/www/apps/resources/references/dml/Model_Methods/methods/dml.Model_Methods.cascades/page.mdx +++ b/www/apps/resources/references/dml/Model_Methods/methods/dml.Model_Methods.cascades/page.mdx @@ -15,7 +15,7 @@ For example, if a store is deleted, its product should also be deleted. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const Store = model.define("store", { id: model.id(), diff --git a/www/apps/resources/references/dml/Model_Methods/methods/dml.Model_Methods.indexes/page.mdx b/www/apps/resources/references/dml/Model_Methods/methods/dml.Model_Methods.indexes/page.mdx index 78c359bd4a..c56ad724fd 100644 --- a/www/apps/resources/references/dml/Model_Methods/methods/dml.Model_Methods.indexes/page.mdx +++ b/www/apps/resources/references/dml/Model_Methods/methods/dml.Model_Methods.indexes/page.mdx @@ -15,7 +15,7 @@ and have conditions. An example of a simple index: ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id(), @@ -33,7 +33,7 @@ export default MyCustom To add a condition on the index, use the `where` option: ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id(), @@ -54,7 +54,7 @@ export default MyCustom The condition can also be a negation. For example: ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id(), diff --git a/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.default/page.mdx b/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.default/page.mdx index 23e23e86b6..ff293e9003 100644 --- a/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.default/page.mdx +++ b/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.default/page.mdx @@ -12,7 +12,7 @@ This method defines the default value of a property. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { color: model diff --git a/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.index/page.mdx b/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.index/page.mdx index 3b9ae73dec..133e13a727 100644 --- a/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.index/page.mdx +++ b/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.index/page.mdx @@ -12,7 +12,7 @@ This method defines an index on a property. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id(), diff --git a/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.nullable/page.mdx b/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.nullable/page.mdx index 879892ec99..e1adb8d95c 100644 --- a/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.nullable/page.mdx +++ b/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.nullable/page.mdx @@ -12,7 +12,7 @@ This method indicates that a property's value can be `null`. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { price: model.bigNumber().nullable(), diff --git a/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.unique/page.mdx b/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.unique/page.mdx index 94af388fe7..997a68ecc1 100644 --- a/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.unique/page.mdx +++ b/www/apps/resources/references/dml/Property_Configuration_Methods/methods/dml.Property_Configuration_Methods.unique/page.mdx @@ -13,7 +13,7 @@ A unique index is created on the property. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const User = model.define("user", { email: model.text().unique(), diff --git a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.array/page.mdx b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.array/page.mdx index 7ceceb0beb..e8420eacde 100644 --- a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.array/page.mdx +++ b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.array/page.mdx @@ -12,7 +12,7 @@ This method defines an array of strings property. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { names: model.array(), diff --git a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.bigNumber/page.mdx b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.bigNumber/page.mdx index 0fa4857af7..55b5c80e70 100644 --- a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.bigNumber/page.mdx +++ b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.bigNumber/page.mdx @@ -12,7 +12,7 @@ This method defines a number property that expects large numbers, such as prices ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { price: model.bigNumber(), diff --git a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.boolean/page.mdx b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.boolean/page.mdx index 712234f9db..33ea916013 100644 --- a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.boolean/page.mdx +++ b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.boolean/page.mdx @@ -12,7 +12,7 @@ This method defines a boolean property. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { hasAccount: model.boolean(), diff --git a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.dateTime/page.mdx b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.dateTime/page.mdx index 62277379c5..6c785f0da1 100644 --- a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.dateTime/page.mdx +++ b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.dateTime/page.mdx @@ -12,7 +12,7 @@ This method defines a timestamp property. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { date_of_birth: model.dateTime(), diff --git a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.enum/page.mdx b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.enum/page.mdx index 7bbd4ca169..8082fe1d34 100644 --- a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.enum/page.mdx +++ b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.enum/page.mdx @@ -12,7 +12,7 @@ This method defines a property whose value can only be one of the specified valu ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { color: model.enum(["black", "white"]), diff --git a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.id/page.mdx b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.id/page.mdx index b81e215022..0fb3f8f8ed 100644 --- a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.id/page.mdx +++ b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.id/page.mdx @@ -15,7 +15,7 @@ primary key. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const User = model.define("User", { id: model.id().primaryKey(), diff --git a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.json/page.mdx b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.json/page.mdx index da1ab36271..ef34f7a5e8 100644 --- a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.json/page.mdx +++ b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.json/page.mdx @@ -12,7 +12,7 @@ This method defines a property whose value is a stringified JSON object. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { metadata: model.json(), diff --git a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.number/page.mdx b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.number/page.mdx index 875b21a685..2b6009c196 100644 --- a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.number/page.mdx +++ b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.number/page.mdx @@ -12,7 +12,7 @@ This method defines a number property. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { age: model.number(), diff --git a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.text/page.mdx b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.text/page.mdx index 3ba35a8f57..758b0621a0 100644 --- a/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.text/page.mdx +++ b/www/apps/resources/references/dml/Property_Types/methods/dml.Property_Types.text/page.mdx @@ -12,7 +12,7 @@ This method defines a string property. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { name: model.text(), diff --git a/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasMany/page.mdx b/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasMany/page.mdx index 3210e02155..c7384459d6 100644 --- a/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasMany/page.mdx +++ b/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasMany/page.mdx @@ -16,7 +16,7 @@ For example, a store "hasMany" products. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const Store = model.define("store", { id: model.id(), diff --git a/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasOne/page.mdx b/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasOne/page.mdx index 53a6bb649b..c6c2e54703 100644 --- a/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasOne/page.mdx +++ b/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.hasOne/page.mdx @@ -19,7 +19,7 @@ the other data model. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const User = model.define("user", { id: model.id(), diff --git a/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.manyToMany/page.mdx b/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.manyToMany/page.mdx index 0751f3226d..85c20ece74 100644 --- a/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.manyToMany/page.mdx +++ b/www/apps/resources/references/dml/Relationship_Methods/methods/dml.Relationship_Methods.manyToMany/page.mdx @@ -16,7 +16,7 @@ is associated with many orders. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const Order = model.define("order", { id: model.id(), diff --git a/www/apps/resources/references/dml/entity_builder/EntityBuilder/methods/dml.entity_builder.EntityBuilder.define/page.mdx b/www/apps/resources/references/dml/entity_builder/EntityBuilder/methods/dml.entity_builder.EntityBuilder.define/page.mdx index 653f430018..b09c094bc6 100644 --- a/www/apps/resources/references/dml/entity_builder/EntityBuilder/methods/dml.entity_builder.EntityBuilder.define/page.mdx +++ b/www/apps/resources/references/dml/entity_builder/EntityBuilder/methods/dml.entity_builder.EntityBuilder.define/page.mdx @@ -11,7 +11,7 @@ This method defines a data model. ## Example ```ts -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" const MyCustom = model.define("my_custom", { id: model.id(), diff --git a/www/apps/resources/references/file/classes/file.AbstractFileProviderService/page.mdx b/www/apps/resources/references/file/classes/file.AbstractFileProviderService/page.mdx index 9c0af9690b..9eadc44824 100644 --- a/www/apps/resources/references/file/classes/file.AbstractFileProviderService/page.mdx +++ b/www/apps/resources/references/file/classes/file.AbstractFileProviderService/page.mdx @@ -18,10 +18,10 @@ Start by creating a new directory for your module. For example, `src/modules/my- ## 2. Create the File Provider Service -Create the file `src/modules/my-file/service.ts` that holds the implementation of the module's main service. It must extend the `AbstractFileProviderService` class imported from `@medusajs/utils`: +Create the file `src/modules/my-file/service.ts` that holds the implementation of the module's main service. It must extend the `AbstractFileProviderService` class imported from `@medusajs/framework/utils`: ```ts title="src/modules/my-file/service.ts" -import { AbstractFileProviderService } from "@medusajs/utils" +import { AbstractFileProviderService } from "@medusajs/framework/utils" class MyFileProviderService extends AbstractFileProviderService { // TODO implement methods @@ -40,8 +40,8 @@ If you're creating a client or establishing a connection with a third-party serv #### Example ```ts -import { Logger } from "@medusajs/types" -import { AbstractFileProviderService } from "@medusajs/utils" +import { Logger } from "@medusajs/framework/types" +import { AbstractFileProviderService } from "@medusajs/framework/utils" type InjectedDependencies = { logger: Logger @@ -206,7 +206,7 @@ The File Module accepts one provider only. ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx b/www/apps/resources/references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx index e6e91c8039..a72b2779b2 100644 --- a/www/apps/resources/references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx +++ b/www/apps/resources/references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx @@ -18,10 +18,10 @@ Start by creating a new directory for your module. For example, `src/modules/my- ## 2. Create the Fulfillment Provider Service -Create the file `src/modules/my-fulfillment/service.ts` that holds the module's main service. It must extend the `AbstractFulfillmentProviderService` class imported from `@medusajs/utils`: +Create the file `src/modules/my-fulfillment/service.ts` that holds the module's main service. It must extend the `AbstractFulfillmentProviderService` class imported from `@medusajs/framework/utils`: ```ts title="src/modules/my-fulfillment/service.ts" -import { AbstractFulfillmentProviderService } from "@medusajs/utils" +import { AbstractFulfillmentProviderService } from "@medusajs/framework/utils" class MyFulfillmentProviderService extends AbstractFulfillmentProviderService { // TODO implement methods @@ -77,7 +77,7 @@ This exports the module's definition, indicating that the `MyFulfillmentProvider To use your Fulfillment Module Provider, add it to the `providers` array of the Fulfillment Module: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx index d88c7785fd..84f3be4d83 100644 --- a/www/apps/resources/references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx +++ b/www/apps/resources/references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx @@ -12,9 +12,9 @@ This documentation provides a reference to the `createRemoteLinkStep` step. It b ## Example ```ts -import { createWorkflow } from "@medusajs/workflows-sdk" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" import { createRemoteLinkStep } from "@medusajs/core-flows" -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow("hello-world", () => { createRemoteLinkStep([ diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx index 530d36524d..8f68ee57b3 100644 --- a/www/apps/resources/references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx +++ b/www/apps/resources/references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx @@ -14,13 +14,13 @@ This documentation provides a reference to the `dismissRemoteLinkStep` step. It ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { dismissRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.emitEventStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.emitEventStep/page.mdx index 19104a7700..33994bcfbf 100644 --- a/www/apps/resources/references/helper_steps/functions/helper_steps.emitEventStep/page.mdx +++ b/www/apps/resources/references/helper_steps/functions/helper_steps.emitEventStep/page.mdx @@ -14,7 +14,7 @@ This documentation provides a reference to the `emitEventStep` step. It belongs ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { emitEventStep } from "@medusajs/core-flows" diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx index 50c56a534f..6fda5aaa2b 100644 --- a/www/apps/resources/references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx +++ b/www/apps/resources/references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx @@ -14,13 +14,13 @@ This documentation provides a reference to the `removeRemoteLinkStep` step. It b ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { removeRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx index 19c09d6a21..1ff3085426 100644 --- a/www/apps/resources/references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx +++ b/www/apps/resources/references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx @@ -16,7 +16,7 @@ To retrieve a list of records of a data model: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -40,7 +40,7 @@ To retrieve a single item instead of a an array: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -70,7 +70,7 @@ To throw an error if a record isn't found matching the specified ID: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" diff --git a/www/apps/resources/references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx b/www/apps/resources/references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx index 21c4db9196..eee29c0461 100644 --- a/www/apps/resources/references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx +++ b/www/apps/resources/references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx @@ -10,7 +10,7 @@ In this document, you’ll learn how to create a file service in the Medusa back The configurations for your Medusa application are in `medusa-config.js` located in the root of your Medusa project. The configurations include configurations for database, modules, and more. -`medusa-config.js` exports the value returned by the `defineConfig` utility function imported from `@medusajs/utils`. +`medusa-config.js` exports the value returned by the `defineConfig` utility function imported from `@medusajs/framework/utils`. `defineConfig` accepts as a parameter an object with the following properties: diff --git a/www/apps/resources/references/modules/core_flows/page.mdx b/www/apps/resources/references/modules/core_flows/page.mdx index 47517ee169..50e5939a97 100644 --- a/www/apps/resources/references/modules/core_flows/page.mdx +++ b/www/apps/resources/references/modules/core_flows/page.mdx @@ -3938,9 +3938,9 @@ Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/adva #### Example ```ts -import { createWorkflow } from "@medusajs/workflows-sdk" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" import { createRemoteLinkStep } from "@medusajs/core-flows" -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow("hello-world", () => { createRemoteLinkStep([ @@ -3975,13 +3975,13 @@ Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/adva ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { dismissRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", @@ -4015,7 +4015,7 @@ Emit an event. ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { emitEventStep } from "@medusajs/core-flows" @@ -4048,13 +4048,13 @@ Learn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advan ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { removeRemoteLinkStep } from "@medusajs/core-flows" import { Modules -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const helloWorldWorkflow = createWorkflow( "hello-world", @@ -4099,7 +4099,7 @@ To retrieve a list of records of a data model: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -4123,7 +4123,7 @@ To retrieve a single item instead of a an array: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" @@ -4153,7 +4153,7 @@ To throw an error if a record isn't found matching the specified ID: ```ts import { createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { useRemoteQueryStep } from "@medusajs/core-flows" diff --git a/www/apps/resources/references/modules/workflows/page.mdx b/www/apps/resources/references/modules/workflows/page.mdx index d68e156869..f4f723f33c 100644 --- a/www/apps/resources/references/modules/workflows/page.mdx +++ b/www/apps/resources/references/modules/workflows/page.mdx @@ -6,7 +6,7 @@ import { TypeList } from "docs-ui" # Workflows API Reference -This section of the documentation provides a reference to the utility functions of the `@medusajs/workflows-sdk` package. +This section of the documentation provides a reference to the utility functions of the `@medusajs/framework/workflows-sdk` package. ## Functions diff --git a/www/apps/resources/references/notification/classes/notification.AbstractNotificationProviderService/page.mdx b/www/apps/resources/references/notification/classes/notification.AbstractNotificationProviderService/page.mdx index bfd8cf11dc..27896cb644 100644 --- a/www/apps/resources/references/notification/classes/notification.AbstractNotificationProviderService/page.mdx +++ b/www/apps/resources/references/notification/classes/notification.AbstractNotificationProviderService/page.mdx @@ -20,12 +20,12 @@ Start by creating a new directory for your module. For example, `src/modules/my- Create the file `src/modules/my-notification/service.ts` that holds the implementation of the notification service. -The Notification Provider Module's main service must extend the `AbstractNotificationProviderService` class imported from `@medusajs/utils`: +The Notification Provider Module's main service must extend the `AbstractNotificationProviderService` class imported from `@medusajs/framework/utils`: ```ts title="src/modules/my-notification/service.ts" import { AbstractNotificationProviderService -} from "@medusajs/utils" +} from "@medusajs/framework/utils" class MyNotificationProviderService extends AbstractNotificationProviderService { // TODO add methods @@ -44,8 +44,8 @@ If you're creating a client or establishing a connection with a third-party serv #### Example ```ts -import { AbstractNotificationProviderService } from "@medusajs/utils" -import { Logger } from "@medusajs/types" +import { AbstractNotificationProviderService } from "@medusajs/framework/utils" +import { Logger } from "@medusajs/framework/types" type InjectedDependencies = { logger: Logger @@ -103,7 +103,7 @@ This method is used to send a notification using the third-party provider or you import { ProviderSendNotificationDTO, ProviderSendNotificationResultsDTO -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyNotificationProviderService extends AbstractNotificationProviderService { // ... @@ -159,7 +159,7 @@ The Notification Module accepts one provider per channel. ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/references/payment_provider/classes/payment_provider.AbstractPaymentProvider/page.mdx b/www/apps/resources/references/payment_provider/classes/payment_provider.AbstractPaymentProvider/page.mdx index 7b726ed99d..73254f1606 100644 --- a/www/apps/resources/references/payment_provider/classes/payment_provider.AbstractPaymentProvider/page.mdx +++ b/www/apps/resources/references/payment_provider/classes/payment_provider.AbstractPaymentProvider/page.mdx @@ -18,10 +18,10 @@ Start by creating a new directory for your module. For example, `src/modules/my- ## 2. Create the Payment Provider Service -Create the file `src/modules/my-payment/service.ts` that holds the module's main service. It must extend the `AbstractPaymentProvider` class imported from `@medusajs/utils`: +Create the file `src/modules/my-payment/service.ts` that holds the module's main service. It must extend the `AbstractPaymentProvider` class imported from `@medusajs/framework/utils`: ```ts title="src/modules/my-payment/service.ts" -import { AbstractPaymentProvider } from "@medusajs/utils" +import { AbstractPaymentProvider } from "@medusajs/framework/utils" type Options = { apiKey: string @@ -54,8 +54,8 @@ The provider can also access the module's options as a second parameter. ```ts import { AbstractPaymentProvider -} from "@medusajs/utils" -import { Logger } from "@medusajs/types" +} from "@medusajs/framework/utils" +import { Logger } from "@medusajs/framework/types" type InjectedDependencies = { logger: Logger @@ -127,7 +127,7 @@ In this method, use the third-party provider to capture the payment. import { PaymentProviderError, PaymentProviderSessionResponse, -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -183,7 +183,7 @@ import { PaymentProviderError, PaymentProviderSessionResponse, PaymentSessionStatus -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -241,7 +241,7 @@ This method cancels a payment. import { PaymentProviderError, PaymentProviderSessionResponse, -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -286,7 +286,7 @@ in the third-party session, before authorizing or capturing the payment later. import { PaymentProviderError, PaymentProviderSessionResponse, -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -345,7 +345,7 @@ Use this to delete or cancel the payment in the third-party service. import { PaymentProviderError, PaymentProviderSessionResponse, -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -390,7 +390,7 @@ This method gets the status of a payment session based on the status in the thir // other imports... import { PaymentSessionStatus -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -441,7 +441,7 @@ This method refunds an amount of a payment previously captured. import { PaymentProviderError, PaymentProviderSessionResponse, -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -496,7 +496,7 @@ Retrieves the payment's data from the third-party service. import { PaymentProviderError, PaymentProviderSessionResponse, -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -543,7 +543,7 @@ import { UpdatePaymentProviderSession, PaymentProviderError, PaymentProviderSessionResponse, -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -609,11 +609,11 @@ Learn more in [this documentation](https://docs.medusajs.com/v2/resources/commer // other imports... import { BigNumber -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { ProviderWebhookPayload, WebhookActionResult -} from "@medusajs/types" +} from "@medusajs/framework/types" class MyPaymentProviderService extends AbstractPaymentProvider< Options @@ -696,7 +696,7 @@ This exports the module's definition, indicating that the `MyPaymentProviderServ To use your Payment Module Provider, add it to the `providers` array of the Payment Module: ```js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... diff --git a/www/apps/resources/references/search/classes/search.AbstractSearchService/page.mdx b/www/apps/resources/references/search/classes/search.AbstractSearchService/page.mdx index e74f7cb5f8..04c269652a 100644 --- a/www/apps/resources/references/search/classes/search.AbstractSearchService/page.mdx +++ b/www/apps/resources/references/search/classes/search.AbstractSearchService/page.mdx @@ -10,11 +10,11 @@ In this document, you’ll learn how to create a search service in the Medusa ba ## Prerequisites -A search service must extend the `AbstractSearchService` class imported from the `@medusajs/utils` package. If you don’t already have the package +A search service must extend the `AbstractSearchService` class imported from the `@medusajs/framework/utils` package. If you don’t already have the package installed, run the following command to install it within your project: ```bash npm2yarn -npm install @medusajs/utils +npm install @medusajs/framework/utils ``` --- @@ -22,7 +22,7 @@ npm install @medusajs/utils ## Overview A search service class is in a TypeScript or JavaScript file created in the `src/services` directory. The class must extend the `AbstractSearchService` class imported - from the `@medusajs/utils` package. + from the `@medusajs/framework/utils` package. Based on services’ naming conventions, the file’s name should be the slug version of the search service’s name without `service`, and the class’s name should be the pascal case of the search service’s name following by `Service`. @@ -30,7 +30,7 @@ pascal case of the search service’s name following by `Service`. For example, create the `MySearchService` class in the file `src/services/my-search.ts`: ```ts title="src/services/my-search.ts" -import { AbstractSearchService } from "@medusajs/utils" +import { AbstractSearchService } from "@medusajs/framework/utils" class MySearchService extends AbstractSearchService { isDefault = false diff --git a/www/apps/resources/references/tax_provider/interfaces/tax_provider.ITaxProvider/page.mdx b/www/apps/resources/references/tax_provider/interfaces/tax_provider.ITaxProvider/page.mdx index e81ae5e099..6e777613fb 100644 --- a/www/apps/resources/references/tax_provider/interfaces/tax_provider.ITaxProvider/page.mdx +++ b/www/apps/resources/references/tax_provider/interfaces/tax_provider.ITaxProvider/page.mdx @@ -18,7 +18,7 @@ either in a plugin, in a provider module, or directly in your Medusa application ## How to Create a Tax Provider A tax provider class is defined in a TypeScript or JavaScript file. The class must implement the -`ITaxProvider` interface imported from `@medusajs/types`. +`ITaxProvider` interface imported from `@medusajs/framework/types`. The file can be defined in a plugin, a provider module, or under the `src/services` directory of your Medusa application. You can later pass the package's name or the path to the file in the `providers` option of the Tax Module. @@ -26,7 +26,7 @@ path to the file in the `providers` option of the Tax Module. For example: ```ts title="src/services/my-tax.ts" -import { ITaxProvider } from "@medusajs/types" +import { ITaxProvider } from "@medusajs/framework/types" export default class MyTaxProvider implements ITaxProvider { // ... diff --git a/www/apps/resources/references/types/CommonTypes/interfaces/types.CommonTypes.ConfigModule/page.mdx b/www/apps/resources/references/types/CommonTypes/interfaces/types.CommonTypes.ConfigModule/page.mdx index 195d6d08ff..c4e4bd3df6 100644 --- a/www/apps/resources/references/types/CommonTypes/interfaces/types.CommonTypes.ConfigModule/page.mdx +++ b/www/apps/resources/references/types/CommonTypes/interfaces/types.CommonTypes.ConfigModule/page.mdx @@ -4,7 +4,7 @@ import { TypeList } from "docs-ui" The configurations for your Medusa application are in `medusa-config.js` located in the root of your Medusa project. The configurations include configurations for database, modules, and more. -`medusa-config.js` exports the value returned by the `defineConfig` utility function imported from `@medusajs/utils`. +`medusa-config.js` exports the value returned by the `defineConfig` utility function imported from `@medusajs/framework/utils`. `defineConfig` accepts as a parameter an object with the following properties: diff --git a/www/apps/resources/references/types/interfaces/types.DetailWidgetProps/page.mdx b/www/apps/resources/references/types/interfaces/types.DetailWidgetProps/page.mdx index 70c3a255bd..b03c3df25b 100644 --- a/www/apps/resources/references/types/interfaces/types.DetailWidgetProps/page.mdx +++ b/www/apps/resources/references/types/interfaces/types.DetailWidgetProps/page.mdx @@ -12,7 +12,7 @@ type AdminProduct. ## Example ```tsx -import type { DetailWidgetProps, AdminProduct } from "@medusajs/types" +import type { DetailWidgetProps, AdminProduct } from "@medusajs/framework/types" import { defineWidgetConfig } from "@medusajs/admin-sdk" const ProductWidget = ({ data }: DetailWidgetProps) => { diff --git a/www/apps/resources/references/workflows/StepResponse/methods/workflows.StepResponse.permanentFailure/page.mdx b/www/apps/resources/references/workflows/StepResponse/methods/workflows.StepResponse.permanentFailure/page.mdx index b5b3e457ac..41832e44c2 100644 --- a/www/apps/resources/references/workflows/StepResponse/methods/workflows.StepResponse.permanentFailure/page.mdx +++ b/www/apps/resources/references/workflows/StepResponse/methods/workflows.StepResponse.permanentFailure/page.mdx @@ -12,7 +12,7 @@ import { createStep, StepResponse, createWorkflow -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" interface CreateProductInput { title: string diff --git a/www/apps/resources/references/workflows/functions/workflows.createHook/page.mdx b/www/apps/resources/references/workflows/functions/workflows.createHook/page.mdx index 58adb75375..632bf35d5c 100644 --- a/www/apps/resources/references/workflows/functions/workflows.createHook/page.mdx +++ b/www/apps/resources/references/workflows/functions/workflows.createHook/page.mdx @@ -7,7 +7,7 @@ import { TypeList } from "docs-ui" # createHook - Workflows API Reference -This documentation provides a reference to the `createHook` . It belongs to the `@medusajs/workflows-sdk` package. +This documentation provides a reference to the `createHook` . It belongs to the `@medusajs/framework/workflows-sdk` package. Expose a hook in your workflow where you can inject custom functionality as a step function. @@ -23,7 +23,7 @@ import { createHook, createWorkflow, WorkflowResponse, -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { createProductStep } from "./steps/create-product" export const myWorkflow = createWorkflow( diff --git a/www/apps/resources/references/workflows/functions/workflows.createStep/page.mdx b/www/apps/resources/references/workflows/functions/workflows.createStep/page.mdx index 4e417bf149..50ae51bd5c 100644 --- a/www/apps/resources/references/workflows/functions/workflows.createStep/page.mdx +++ b/www/apps/resources/references/workflows/functions/workflows.createStep/page.mdx @@ -7,7 +7,7 @@ import { TypeList } from "docs-ui" # createStep - Workflows API Reference -This documentation provides a reference to the `createStep` . It belongs to the `@medusajs/workflows-sdk` package. +This documentation provides a reference to the `createStep` . It belongs to the `@medusajs/framework/workflows-sdk` package. This function creates a [StepFunction](../../types/workflows.StepFunction/page.mdx) that can be used as a step in a workflow constructed by the [createWorkflow](../workflows.createWorkflow/page.mdx) function. @@ -19,7 +19,7 @@ import { StepResponse, StepExecutionContext, WorkflowData -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" interface CreateProductInput { title: string diff --git a/www/apps/resources/references/workflows/functions/workflows.createWorkflow/page.mdx b/www/apps/resources/references/workflows/functions/workflows.createWorkflow/page.mdx index 4bb189ad6d..22fea72920 100644 --- a/www/apps/resources/references/workflows/functions/workflows.createWorkflow/page.mdx +++ b/www/apps/resources/references/workflows/functions/workflows.createWorkflow/page.mdx @@ -7,7 +7,7 @@ import { TypeList } from "docs-ui" # createWorkflow - Workflows API Reference -This documentation provides a reference to the `createWorkflow` . It belongs to the `@medusajs/workflows-sdk` package. +This documentation provides a reference to the `createWorkflow` . It belongs to the `@medusajs/framework/workflows-sdk` package. This function creates a workflow with the provided name and a constructor function. The constructor function builds the workflow from steps created by the [createStep](../workflows.createStep/page.mdx) function. @@ -17,7 +17,7 @@ invoke the exported workflow, then run its `run` method. ## Example ```ts -import { createWorkflow } from "@medusajs/workflows-sdk" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" import { MedusaRequest, MedusaResponse, Product } from "@medusajs/medusa" import { createProductStep, diff --git a/www/apps/resources/references/workflows/functions/workflows.parallelize/page.mdx b/www/apps/resources/references/workflows/functions/workflows.parallelize/page.mdx index e94b1ef0c7..732ba38e3d 100644 --- a/www/apps/resources/references/workflows/functions/workflows.parallelize/page.mdx +++ b/www/apps/resources/references/workflows/functions/workflows.parallelize/page.mdx @@ -7,7 +7,7 @@ import { TypeList } from "docs-ui" # parallelize - Workflows API Reference -This documentation provides a reference to the `parallelize` . It belongs to the `@medusajs/workflows-sdk` package. +This documentation provides a reference to the `parallelize` . It belongs to the `@medusajs/framework/workflows-sdk` package. This function is used to run multiple steps in parallel. The result of each step will be returned as part of the result array. @@ -17,7 +17,7 @@ This function is used to run multiple steps in parallel. The result of each step import { createWorkflow, parallelize -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { createProductStep, getProductStep, diff --git a/www/apps/resources/references/workflows/functions/workflows.transform/page.mdx b/www/apps/resources/references/workflows/functions/workflows.transform/page.mdx index 1bab91e758..c7410fd071 100644 --- a/www/apps/resources/references/workflows/functions/workflows.transform/page.mdx +++ b/www/apps/resources/references/workflows/functions/workflows.transform/page.mdx @@ -7,7 +7,7 @@ import { TypeList } from "docs-ui" # transform - Workflows API Reference -This documentation provides a reference to the `transform` . It belongs to the `@medusajs/workflows-sdk` package. +This documentation provides a reference to the `transform` . It belongs to the `@medusajs/framework/workflows-sdk` package. This function transforms the output of other utility functions. @@ -24,7 +24,7 @@ If you're also retrieving the output of a hook and want to check if its value is import { createWorkflow, transform -} from "@medusajs/workflows-sdk" +} from "@medusajs/framework/workflows-sdk" import { step1, step2 } from "./steps" type WorkflowInput = { diff --git a/www/apps/resources/references/workflows/functions/workflows.when/page.mdx b/www/apps/resources/references/workflows/functions/workflows.when/page.mdx index d60e1b76e1..7b5f3a22c3 100644 --- a/www/apps/resources/references/workflows/functions/workflows.when/page.mdx +++ b/www/apps/resources/references/workflows/functions/workflows.when/page.mdx @@ -7,7 +7,7 @@ import { TypeList } from "docs-ui" # when - Workflows API Reference -This documentation provides a reference to the `when` . It belongs to the `@medusajs/workflows-sdk` package. +This documentation provides a reference to the `when` . It belongs to the `@medusajs/framework/workflows-sdk` package. ## Type Parameters diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/auth-provider.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/auth-provider.ts index 324e566374..9ae2b597a1 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/auth-provider.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/auth-provider.ts @@ -20,10 +20,10 @@ const authProviderOptions: FormattingOptionsType = { Start by creating a new directory for your module. For example, \`src/modules/my-auth\`.`, `## 2. Create the Auth Provider Service -Create the file \`src/modules/my-auth/service.ts\` that holds the module's main service. It must extend the \`AbstractAuthModuleProvider\` class imported from \`@medusajs/utils\`: +Create the file \`src/modules/my-auth/service.ts\` that holds the module's main service. It must extend the \`AbstractAuthModuleProvider\` class imported from \`@medusajs/framework/utils\`: \`\`\`ts title="src/modules/my-auth/service.ts" -import { AbstractAuthModuleProvider } from "@medusajs/utils" +import { AbstractAuthModuleProvider } from "@medusajs/framework/utils" class MyAuthProviderService extends AbstractAuthModuleProvider { // TODO implement methods @@ -51,7 +51,7 @@ This exports the module's definition, indicating that the \`MyAuthProviderServic To use your Auth Module Provider, add it to the \`providers\` array of the Auth Module: \`\`\`js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -59,7 +59,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.AUTH]: { - resolve: "@medusajs/auth", + resolve: "@medusajs/framework/auth", options: { providers: [ { diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/core-flows.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/core-flows.ts index da7b47f7e7..f4fa6298c3 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/core-flows.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/core-flows.ts @@ -43,7 +43,7 @@ const coreFlowsOptions: FormattingOptionsType = { }, "^core_flows/.*/Workflows_.*/functions/.*/page\\.mdx": { reflectionDescription: - "This documentation provides a reference to the `{{alias}}`. It belongs to the `@medusajs/core-flows` package.", + "This documentation provides a reference to the `{{alias}}`. It belongs to the `@medusajs/medusa/core-flows` package.", frontmatterData: { slug: "/references/medusa-workflows/{{alias}}", sidebar_label: "{{alias}}", @@ -56,7 +56,7 @@ const coreFlowsOptions: FormattingOptionsType = { }, "^core_flows/.*/Steps_.*/functions/.*/page\\.mdx": { reflectionDescription: - "This documentation provides a reference to the `{{alias}}`. It belongs to the `@medusajs/core-flows` package.", + "This documentation provides a reference to the `{{alias}}`. It belongs to the `@medusajs/medusa/core-flows` package.", frontmatterData: { slug: "/references/medusa-workflows/steps/{{alias}}", sidebar_label: "{{alias}}", diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/file.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/file.ts index 9c32596e54..47d4608e7e 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/file.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/file.ts @@ -20,10 +20,10 @@ const fileOptions: FormattingOptionsType = { Start by creating a new directory for your module. For example, \`src/modules/my-file\`.`, `## 2. Create the File Provider Service -Create the file \`src/modules/my-file/service.ts\` that holds the implementation of the module's main service. It must extend the \`AbstractFileProviderService\` class imported from \`@medusajs/utils\`: +Create the file \`src/modules/my-file/service.ts\` that holds the implementation of the module's main service. It must extend the \`AbstractFileProviderService\` class imported from \`@medusajs/framework/utils\`: \`\`\`ts title="src/modules/my-file/service.ts" -import { AbstractFileProviderService } from "@medusajs/utils" +import { AbstractFileProviderService } from "@medusajs/framework/utils" class MyFileProviderService extends AbstractFileProviderService { // TODO implement methods @@ -57,7 +57,7 @@ The File Module accepts one provider only. \`\`\`js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -65,7 +65,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.FILE]: { - resolve: "@medusajs/file", + resolve: "@medusajs/framework/file", options: { providers: [ { diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/fulfillment-provider.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/fulfillment-provider.ts index 25f42c7196..ee346852fa 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/fulfillment-provider.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/fulfillment-provider.ts @@ -20,10 +20,10 @@ const fulfillmentProviderOptions: FormattingOptionsType = { Start by creating a new directory for your module. For example, \`src/modules/my-fulfillment\`.`, `## 2. Create the Fulfillment Provider Service -Create the file \`src/modules/my-fulfillment/service.ts\` that holds the module's main service. It must extend the \`AbstractFulfillmentProviderService\` class imported from \`@medusajs/utils\`: +Create the file \`src/modules/my-fulfillment/service.ts\` that holds the module's main service. It must extend the \`AbstractFulfillmentProviderService\` class imported from \`@medusajs/framework/utils\`: \`\`\`ts title="src/modules/my-fulfillment/service.ts" -import { AbstractFulfillmentProviderService } from "@medusajs/utils" +import { AbstractFulfillmentProviderService } from "@medusajs/framework/utils" class MyFulfillmentProviderService extends AbstractFulfillmentProviderService { // TODO implement methods @@ -51,7 +51,7 @@ This exports the module's definition, indicating that the \`MyFulfillmentProvide To use your Fulfillment Module Provider, add it to the \`providers\` array of the Fulfillment Module: \`\`\`js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -59,7 +59,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.FULFILLMENT]: { - resolve: "@medusajs/fulfillment", + resolve: "@medusajs/framework/fulfillment", options: { providers: [ { diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/helper-steps.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/helper-steps.ts index 218cdc4745..96ca99efe9 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/helper-steps.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/helper-steps.ts @@ -12,7 +12,7 @@ const helperStepsOptions: FormattingOptionsType = { }, "^modules/helper_steps/page\\.mdx": { reflectionDescription: - "This section of the documentation provides a reference to utility steps that you can use in your workflows. These steps are imported from the `@medusajs/core-flows` package.", + "This section of the documentation provides a reference to utility steps that you can use in your workflows. These steps are imported from the `@medusajs/medusa/core-flows` package.", reflectionGroups: { Namespaces: false, Enumerations: false, @@ -35,7 +35,7 @@ const helperStepsOptions: FormattingOptionsType = { }, "^helper_steps/functions": { reflectionDescription: - "This documentation provides a reference to the `{{alias}}` step. It belongs to the `@medusajs/core-flows` package.", + "This documentation provides a reference to the `{{alias}}` step. It belongs to the `@medusajs/medusa/core-flows` package.", frontmatterData: { slug: "/references/helper-steps/{{alias}}", sidebar_label: "{{alias}}", diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts index 02607b05e5..32e307db99 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts @@ -22,12 +22,12 @@ Start by creating a new directory for your module. For example, \`src/modules/my Create the file \`src/modules/my-notification/service.ts\` that holds the implementation of the notification service. -The Notification Provider Module's main service must extend the \`AbstractNotificationProviderService\` class imported from \`@medusajs/utils\`: +The Notification Provider Module's main service must extend the \`AbstractNotificationProviderService\` class imported from \`@medusajs/framework/utils\`: \`\`\`ts title="src/modules/my-notification/service.ts" import { AbstractNotificationProviderService -} from "@medusajs/utils" +} from "@medusajs/framework/utils" class MyNotificationProviderService extends AbstractNotificationProviderService { // TODO add methods @@ -61,7 +61,7 @@ The Notification Module accepts one provider per channel. \`\`\`js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -69,7 +69,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.NOTIFICATION]: { - resolve: "@medusajs/notification", + resolve: "@medusajs/framework/notification", options: { providers: [ { diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/payment-provider.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/payment-provider.ts index 926202d9c8..8575f12581 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/payment-provider.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/payment-provider.ts @@ -23,10 +23,10 @@ const paymentProviderOptions: FormattingOptionsType = { Start by creating a new directory for your module. For example, \`src/modules/my-payment\`.`, `## 2. Create the Payment Provider Service -Create the file \`src/modules/my-payment/service.ts\` that holds the module's main service. It must extend the \`AbstractPaymentProvider\` class imported from \`@medusajs/utils\`: +Create the file \`src/modules/my-payment/service.ts\` that holds the module's main service. It must extend the \`AbstractPaymentProvider\` class imported from \`@medusajs/framework/utils\`: \`\`\`ts title="src/modules/my-payment/service.ts" -import { AbstractPaymentProvider } from "@medusajs/utils" +import { AbstractPaymentProvider } from "@medusajs/framework/utils" type Options = { apiKey: string @@ -60,7 +60,7 @@ This exports the module's definition, indicating that the \`MyPaymentProviderSer To use your Payment Module Provider, add it to the \`providers\` array of the Payment Module: \`\`\`js title="medusa-config.js" -const { Modules } = require("@medusajs/utils") +const { Modules } = require("@medusajs/framework/utils") // ... @@ -68,7 +68,7 @@ module.exports = defineConfig({ // ... modules: { [Modules.PAYMENT]: { - resolve: "@medusajs/payment", + resolve: "@medusajs/framework/payment", options: { providers: [ { diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/search.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/search.ts index fe083f8e3f..bd51f513c9 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/search.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/search.ts @@ -6,7 +6,7 @@ const searchOptions: FormattingOptionsType = { ## Prerequisites -A search service must extend the \`AbstractSearchService\` class imported from the \`@medusajs/utils\` package. If you don’t already have the package +A search service must extend the \`AbstractSearchService\` class imported from the \`@medusajs/framework/utils\` package. If you don’t already have the package installed, run the following command to install it within your project: \`\`\`bash npm2yarn diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/workflows.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/workflows.ts index 466f893cfe..0e7496989b 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/workflows.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/workflows.ts @@ -12,7 +12,7 @@ const workflowsOptions: FormattingOptionsType = { }, "^modules/workflows/page\\.mdx": { reflectionDescription: - "This section of the documentation provides a reference to the utility functions of the `@medusajs/workflows-sdk` package.", + "This section of the documentation provides a reference to the utility functions of the `@medusajs/framework/workflows-sdk` package.", reflectionGroups: { Namespaces: false, Enumerations: false, @@ -32,7 +32,7 @@ const workflowsOptions: FormattingOptionsType = { "^workflows/functions": { maxLevel: 1, reflectionDescription: - "This documentation provides a reference to the `{{alias}}` {{kind}}. It belongs to the `@medusajs/workflows-sdk` package.", + "This documentation provides a reference to the `{{alias}}` {{kind}}. It belongs to the `@medusajs/framework/workflows-sdk` package.", frontmatterData: { slug: "/references/workflows/{{alias}}", sidebar_label: "{{alias}}",