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 f193c26b41481..02e359dce3d37 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 @@ -52,7 +52,7 @@ For example: import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export const GET = ( req: MedusaRequest, @@ -86,7 +86,7 @@ import type { MedusaNextFunction, MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ConfigModule } from "@medusajs/framework/types" import { parseCorsOrigins } from "@medusajs/framework/utils" import cors from "cors" 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 7151b12850ad0..6d19555b470fb 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 @@ -17,7 +17,7 @@ The Medusa application's API route error handler then wraps your thrown error in For example: ```ts -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" export const GET = async ( @@ -257,7 +257,7 @@ import { MedusaNextFunction, MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" export default defineMiddlewares({ diff --git a/www/apps/book/app/advanced-development/api-routes/http-methods/page.mdx b/www/apps/book/app/advanced-development/api-routes/http-methods/page.mdx index 8bff71f9bfb95..d0f5a9d7f14bb 100644 --- a/www/apps/book/app/advanced-development/api-routes/http-methods/page.mdx +++ b/www/apps/book/app/advanced-development/api-routes/http-methods/page.mdx @@ -18,7 +18,7 @@ For example, create the file `src/api/hello-world/route.ts` with the following c import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export const GET = async ( req: MedusaRequest, diff --git a/www/apps/book/app/advanced-development/api-routes/middlewares/page.mdx b/www/apps/book/app/advanced-development/api-routes/middlewares/page.mdx index 27e74374dcedd..ebdf7be3827fe 100644 --- a/www/apps/book/app/advanced-development/api-routes/middlewares/page.mdx +++ b/www/apps/book/app/advanced-development/api-routes/middlewares/page.mdx @@ -32,7 +32,7 @@ import type { MedusaNextFunction, MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export default defineMiddlewares({ routes: [ @@ -123,7 +123,7 @@ import type { MedusaNextFunction, MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export default defineMiddlewares({ routes: [ @@ -155,7 +155,7 @@ import type { MedusaNextFunction, MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export default defineMiddlewares({ routes: [ @@ -188,7 +188,7 @@ import type { MedusaNextFunction, MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export default defineMiddlewares({ routes: [ diff --git a/www/apps/book/app/advanced-development/api-routes/parameters/page.mdx b/www/apps/book/app/advanced-development/api-routes/parameters/page.mdx index 3be788958fa92..4523156ab60b2 100644 --- a/www/apps/book/app/advanced-development/api-routes/parameters/page.mdx +++ b/www/apps/book/app/advanced-development/api-routes/parameters/page.mdx @@ -20,7 +20,7 @@ export const singlePathHighlights = [ import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export const GET = async ( req: MedusaRequest, @@ -49,7 +49,7 @@ export const multiplePathHighlights = [ import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export const GET = async ( req: MedusaRequest, @@ -81,7 +81,7 @@ export const queryHighlights = [ import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export const GET = async ( req: MedusaRequest, @@ -112,7 +112,7 @@ export const bodyHighlights = [ import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" type HelloWorldReq = { name: string 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 46706bb2b2ff1..180ba9a372767 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 @@ -84,7 +84,7 @@ For example: import type { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export const GET = async ( req: AuthenticatedMedusaRequest, @@ -124,7 +124,7 @@ For example: import type { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { Modules } from "@medusajs/framework/utils" import { ICustomerModuleService } from "@medusajs/framework/types" @@ -159,7 +159,7 @@ For example: import type { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { Modules } from "@medusajs/framework/utils" import { IUserModuleService } from "@medusajs/framework/types" diff --git a/www/apps/book/app/advanced-development/api-routes/responses/page.mdx b/www/apps/book/app/advanced-development/api-routes/responses/page.mdx index a24f0b8761497..bdbbe7a12756e 100644 --- a/www/apps/book/app/advanced-development/api-routes/responses/page.mdx +++ b/www/apps/book/app/advanced-development/api-routes/responses/page.mdx @@ -17,7 +17,7 @@ export const jsonHighlights = [ ] ```ts title="src/api/custom/route.ts" highlights={jsonHighlights} -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" export const GET = async ( req: MedusaRequest, @@ -52,7 +52,7 @@ export const statusHighlight = [ ] ```ts title="src/api/custom/route.ts" highlights={statusHighlight} -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" export const GET = async ( req: MedusaRequest, @@ -84,7 +84,7 @@ export const streamHighlights = [ ] ```ts highlights={streamHighlights} -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" export const GET = async ( req: MedusaRequest, diff --git a/www/apps/book/app/advanced-development/api-routes/validation/page.mdx b/www/apps/book/app/advanced-development/api-routes/validation/page.mdx index 7dd7dab903ca6..6c0106f55c519 100644 --- a/www/apps/book/app/advanced-development/api-routes/validation/page.mdx +++ b/www/apps/book/app/advanced-development/api-routes/validation/page.mdx @@ -41,7 +41,7 @@ The `PostStoreCustomSchema` variable is a Zod schema that indicates the request ## Step 2: Add Validation Middleware -To use this schema for validating the body parameters of requests to `/custom`, use the `validateAndTransformBody` middleware provided by `@medusajs/medusa`. It accepts the Zod schema as a parameter. +To use this schema for validating the body parameters of requests to `/custom`, use the `validateAndTransformBody` middleware provided by `@medusajs/framework/utils`. It accepts the Zod schema as a parameter. For example, create the file `src/api/middlewares.ts` with the following content: @@ -49,7 +49,7 @@ For example, create the file `src/api/middlewares.ts` with the following content import { defineMiddlewares } from "@medusajs/medusa" import { validateAndTransformBody, -} from "@medusajs/medusa/api/utils/validate-body" +} from "@medusajs/framework/utils" import { PostStoreCustomSchema } from "./custom/validators" export default defineMiddlewares({ @@ -87,7 +87,7 @@ export const routeHighlights = [ ] ```ts title="src/api/custom/route.ts" highlights={routeHighlights} -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { z } from "zod" import { PostStoreCustomSchema } from "./validators" diff --git a/www/apps/book/app/advanced-development/events-and-subscribers/data-payload/page.mdx b/www/apps/book/app/advanced-development/events-and-subscribers/data-payload/page.mdx index 2a906c9a37017..835ca4a273984 100644 --- a/www/apps/book/app/advanced-development/events-and-subscribers/data-payload/page.mdx +++ b/www/apps/book/app/advanced-development/events-and-subscribers/data-payload/page.mdx @@ -25,7 +25,7 @@ export const highlights = [ import type { SubscriberArgs, SubscriberConfig, -} from "@medusajs/medusa" +} from "@medusajs/framework" export default async function productCreateHandler({ event, diff --git a/www/apps/book/app/advanced-development/module-links/query/page.mdx b/www/apps/book/app/advanced-development/module-links/query/page.mdx index 6cbc612ec6ddf..cb3a50b3198e4 100644 --- a/www/apps/book/app/advanced-development/module-links/query/page.mdx +++ b/www/apps/book/app/advanced-development/module-links/query/page.mdx @@ -37,7 +37,7 @@ export const exampleHighlights = [ import { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys, } from "@medusajs/framework/utils" diff --git a/www/apps/book/app/advanced-development/module-links/remote-link/page.mdx b/www/apps/book/app/advanced-development/module-links/remote-link/page.mdx index ef054f4ac453c..0812304637ee9 100644 --- a/www/apps/book/app/advanced-development/module-links/remote-link/page.mdx +++ b/www/apps/book/app/advanced-development/module-links/remote-link/page.mdx @@ -18,7 +18,7 @@ For example: import { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys, } from "@medusajs/framework/utils" diff --git a/www/apps/book/app/advanced-development/workflows/access-workflow-errors/page.mdx b/www/apps/book/app/advanced-development/workflows/access-workflow-errors/page.mdx index 31a9343215591..d2a663e23f9a2 100644 --- a/www/apps/book/app/advanced-development/workflows/access-workflow-errors/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/access-workflow-errors/page.mdx @@ -23,7 +23,7 @@ export const highlights = [ import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import myWorkflow from "../../../workflows/hello-world" export async function GET( 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 6d1ff1d434cc4..c0bb5cab4c187 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 @@ -91,7 +91,7 @@ Finally, execute the workflow from an API route: import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import myWorkflow from "../../../workflows/hello-world" export async function GET( 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 b9f4f7b3a2955..93fe67dce19ab 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 @@ -284,7 +284,7 @@ export const highlights = [ ] ```ts title="src/api/workflows/route.ts" highlights={highlights} collapsibleLines="1-11" expandButtonLabel="Show Imports" -import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import myWorkflow from "../../../workflows/hello-world" import { IWorkflowEngineService, 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 be8a3d6d2bbb7..76f346ac4bca4 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 @@ -130,7 +130,7 @@ Learn how to pass `additional_data` in requests to API routes in [this chapter]( You can also pass that additional data when executing the workflow. Pass it as a parameter to the `.run` method of the workflow: ```ts title="src/workflows/hooks/product-created.ts" highlights={[["10", "additional_data"]]} -import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { createProductsWorkflow } from "@medusajs/medusa/core-flows" export async function POST(req: MedusaRequest, res: MedusaResponse) { diff --git a/www/apps/book/app/basics/api-routes/page.mdx b/www/apps/book/app/basics/api-routes/page.mdx index 80e881288aa17..76a5d0847c1f7 100644 --- a/www/apps/book/app/basics/api-routes/page.mdx +++ b/www/apps/book/app/basics/api-routes/page.mdx @@ -26,7 +26,7 @@ For example, to create a `GET` API Route at `/hello-world`, create the file `src import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export const GET = ( req: MedusaRequest, diff --git a/www/apps/book/app/basics/commerce-modules/page.mdx b/www/apps/book/app/basics/commerce-modules/page.mdx index d2a5a2c5750d9..33a6ce1a85f81 100644 --- a/www/apps/book/app/basics/commerce-modules/page.mdx +++ b/www/apps/book/app/basics/commerce-modules/page.mdx @@ -25,7 +25,7 @@ Similarly to your custom module, a commerce module's main service is registered For example, you saw this code snippet in the [Medusa container chapter](../medusa-container/page.mdx): ```ts highlights={[["10"]]} -import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/book/app/basics/events-and-subscribers/page.mdx b/www/apps/book/app/basics/events-and-subscribers/page.mdx index f8aae6bafd71e..0e36d7cfc718a 100644 --- a/www/apps/book/app/basics/events-and-subscribers/page.mdx +++ b/www/apps/book/app/basics/events-and-subscribers/page.mdx @@ -25,7 +25,7 @@ A subscriber is created in a TypeScript or JavaScript file under the `src/subscr For example, create the file `src/subscribers/product-created.ts` with the following content: ```ts title="src/subscribers/product-created.ts" -import { type SubscriberConfig } from "@medusajs/medusa" +import { type SubscriberConfig } from "@medusajs/framework" // subscriber function export default async function productCreateHandler() { @@ -89,7 +89,7 @@ export const highlights = [ ] ```ts title="src/subscribers/product-created.ts" highlights={highlights} -import { SubscriberArgs, type SubscriberConfig } from "@medusajs/medusa" +import { SubscriberArgs, type SubscriberConfig } from "@medusajs/framework" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/book/app/basics/medusa-container/page.mdx b/www/apps/book/app/basics/medusa-container/page.mdx index 745a8cddf459a..17530aabf3f7d 100644 --- a/www/apps/book/app/basics/medusa-container/page.mdx +++ b/www/apps/book/app/basics/medusa-container/page.mdx @@ -24,7 +24,7 @@ export const highlights = [ ] ```ts highlights={highlights} -import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 68cc092b2f033..5a4d88bea4410 100644 --- a/www/apps/book/app/basics/modules-and-services/page.mdx +++ b/www/apps/book/app/basics/modules-and-services/page.mdx @@ -102,7 +102,7 @@ Resolving a module's service is essential to use its methods that perform action For example, create the API route `src/api/custom/route.ts` with the following content: ```ts title="src/api/custom/route.ts" -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import HelloModuleService from "../../modules/hello/service" import { HELLO_MODULE } from "../../modules/hello" diff --git a/www/apps/book/app/basics/workflows/page.mdx b/www/apps/book/app/basics/workflows/page.mdx index 6c6643f74b936..fe07aedc80e41 100644 --- a/www/apps/book/app/basics/workflows/page.mdx +++ b/www/apps/book/app/basics/workflows/page.mdx @@ -100,7 +100,7 @@ To execute the workflow, invoke it passing the Medusa container as a parameter. import type { MedusaRequest, MedusaResponse, - } from "@medusajs/medusa" + } from "@medusajs/framework/http" import myWorkflow from "../../../workflows/hello-world" export async function GET( @@ -125,7 +125,7 @@ To execute the workflow, invoke it passing the Medusa container as a parameter. import { type SubscriberConfig, type SubscriberArgs, - } from "@medusajs/medusa" + } from "@medusajs/framework" import myWorkflow from "../workflows/hello-world" import { Modules } from "@medusajs/framework/utils" import { IUserModuleService } from "@medusajs/framework/types" diff --git a/www/apps/book/app/customization/custom-features/api-route/page.mdx b/www/apps/book/app/customization/custom-features/api-route/page.mdx index 1cdd3c29bf412..34c1d5869ec7d 100644 --- a/www/apps/book/app/customization/custom-features/api-route/page.mdx +++ b/www/apps/book/app/customization/custom-features/api-route/page.mdx @@ -27,7 +27,7 @@ Create the file `src/api/admin/brands/route.ts` with the following content: import { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { CreateBrandInput, createBrandWorkflow, diff --git a/www/apps/book/app/customization/customize-admin/route/page.mdx b/www/apps/book/app/customization/customize-admin/route/page.mdx index af6521f458c98..74d8397122c14 100644 --- a/www/apps/book/app/customization/customize-admin/route/page.mdx +++ b/www/apps/book/app/customization/customize-admin/route/page.mdx @@ -39,7 +39,7 @@ Create the file `src/api/admin/brands/route.ts` with the following content: import { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" 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 4e96f96fe47e5..6a56da474f318 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 @@ -49,7 +49,7 @@ export const highlights = [ import { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys, } from "@medusajs/framework/utils" 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 c75850fec67e3..46bd7ff39170b 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 @@ -170,7 +170,7 @@ To handle the `brand.created` event, create a subscriber at `src/subscribers/bra import type { SubscriberConfig, SubscriberArgs, -} from "@medusajs/medusa" +} from "@medusajs/framework" import { syncBrandToSystemWorkflow } from "../workflows/sync-brand-to-system" export default async function brandCreatedHandler({ 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 e83982d9fe4a7..8459c5b5b9730 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 @@ -22,7 +22,7 @@ In this chapter, you'll learn how to write integration tests for API routes usin Consider the following API route created at `src/api/custom/route.ts`: ```ts title="src/api/custom/route.ts" -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" export async function GET( req: MedusaRequest, @@ -223,7 +223,7 @@ The `afterAll` hook resolves the `HelloModuleService` and use its `deleteMyCusto Consider a `/custom/:id` API route created at `src/api/custom/[id]/route.ts`: ```ts title="src/api/custom/[id]/route.ts" -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import HelloModuleService from "../../../modules/hello/service" export async function DELETE( diff --git a/www/apps/book/app/first-customizations/page.mdx b/www/apps/book/app/first-customizations/page.mdx index 8cdbe18d8a420..b1e418f8dc778 100644 --- a/www/apps/book/app/first-customizations/page.mdx +++ b/www/apps/book/app/first-customizations/page.mdx @@ -16,7 +16,7 @@ To create an API route, create the file `src/api/hello-world/route.ts` with the import type { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" export const GET = ( req: MedusaRequest, 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 16e7cc286b29d..84157b846193b 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 @@ -36,7 +36,7 @@ export const highlights = [ import type { SubscriberArgs, SubscriberConfig, -} from "@medusajs/medusa" +} from "@medusajs/framework" import { Modules } from "@medusajs/framework/utils" import { INotificationModuleService } from "@medusajs/framework/types" 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 6be6db58fbf1e..47b80bb94683b 100644 --- a/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx +++ b/www/apps/resources/app/architectural-modules/notification/sendgrid/page.mdx @@ -131,7 +131,7 @@ export const highlights = [ import type { SubscriberArgs, SubscriberConfig, -} from "@medusajs/medusa" +} from "@medusajs/framework" import { Modules } from "@medusajs/framework/utils" import { INotificationModuleService } from "@medusajs/framework/types" 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 392201c1af798..c0dabf6e45b8b 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 @@ -14,7 +14,7 @@ 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 { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IApiKeyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -69,7 +69,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IApiKeyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -112,7 +112,7 @@ export async function GET(request: Request) { ```ts collapsibleLines="1-9" expandButtonLabel="Show Imports" -import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IApiKeyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -173,7 +173,7 @@ export async function POST(request: Request, { params }: ContextType) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IApiKeyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -233,7 +233,7 @@ export async function POST(request: Request, { params }: ContextType) { import { AuthenticatedMedusaRequest, MedusaResponse, - } from "@medusajs/medusa" + } from "@medusajs/framework/http" import { IApiKeyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/api-key/page.mdx b/www/apps/resources/app/commerce-modules/api-key/page.mdx index d69b7af4bca73..0d6c4b8d628be 100644 --- a/www/apps/resources/app/commerce-modules/api-key/page.mdx +++ b/www/apps/resources/app/commerce-modules/api-key/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IApiKeyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IApiKeyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 88c6a6c8e6cf8..44a80d908844f 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 @@ -126,7 +126,7 @@ export const createRouteHighlights = [ import type { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import createManagerWorkflow from "../../workflows/create-manager" @@ -222,7 +222,7 @@ For example, create the file `src/api/manager/me/route.ts` with the following co import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import ManagerModuleService from "../../../modules/manager/service" export async function GET( 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 4cd080b0d9aa8..a909d7bed2fdf 100644 --- a/www/apps/resources/app/commerce-modules/auth/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/examples/page.mdx @@ -20,7 +20,7 @@ This example uses the [jsonwebtoken NPM package](https://www.npmjs.com/package/j ```ts collapsibleLines="1-10" expandButtonLabel="Show Imports" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IAuthModuleService, AuthenticationInput, @@ -123,7 +123,7 @@ This example uses the [jsonwebtoken NPM package](https://www.npmjs.com/package/j ```ts collapsibleLines="1-10" expandButtonLabel="Show Imports" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IAuthModuleService, AuthenticationInput, @@ -225,7 +225,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IAuthModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -281,7 +281,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IAuthModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -327,7 +327,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IAuthModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -393,7 +393,7 @@ export async function POST(request: Request, { params }: ContextType) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IAuthModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/auth/page.mdx b/www/apps/resources/app/commerce-modules/auth/page.mdx index dbc46547aeae5..cbdbc2ca5c280 100644 --- a/www/apps/resources/app/commerce-modules/auth/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IAuthModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" -import { SubscriberArgs } from "@medusajs/medusa" +import { SubscriberArgs } from "@medusajs/framework" import { IAuthModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 49fe34410e413..ad49fc3e8e859 100644 --- a/www/apps/resources/app/commerce-modules/cart/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/examples/page.mdx @@ -14,7 +14,7 @@ In this guide, you’ll find common examples of how you can use the Cart Module ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -88,7 +88,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -136,7 +136,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -196,7 +196,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -254,7 +254,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -312,7 +312,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -372,7 +372,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -416,7 +416,7 @@ export async function DELETE(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -438,7 +438,7 @@ export async function DELETE( ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/cart/page.mdx b/www/apps/resources/app/commerce-modules/cart/page.mdx index 6192ee98ef0c6..50fa1cb744c67 100644 --- a/www/apps/resources/app/commerce-modules/cart/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { ICartModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 468b0d0e63ff3..18b1b32c7ea92 100644 --- a/www/apps/resources/app/commerce-modules/currency/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/currency/examples/page.mdx @@ -14,7 +14,7 @@ In this guide, you’ll find common examples of how you can use the Currency Mod ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICurrencyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -60,7 +60,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICurrencyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/currency/page.mdx b/www/apps/resources/app/commerce-modules/currency/page.mdx index 159ee2ff7c865..189747ac19a36 100644 --- a/www/apps/resources/app/commerce-modules/currency/page.mdx +++ b/www/apps/resources/app/commerce-modules/currency/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICurrencyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { ICurrencyModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 102350af9c938..d9561ab441ffb 100644 --- a/www/apps/resources/app/commerce-modules/customer/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/customer/examples/page.mdx @@ -14,7 +14,7 @@ In this guide, you’ll find common examples of how you can use the Customer Mod ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICustomerModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -69,7 +69,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICustomerModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -120,7 +120,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICustomerModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -169,7 +169,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICustomerModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/customer/page.mdx b/www/apps/resources/app/commerce-modules/customer/page.mdx index 422389bab504f..b05ff8eca5f5e 100644 --- a/www/apps/resources/app/commerce-modules/customer/page.mdx +++ b/www/apps/resources/app/commerce-modules/customer/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ICustomerModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -37,7 +37,7 @@ export async function GET(request: MedusaRequest, res: MedusaResponse) { ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { ICustomerModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/fulfillment/page.mdx b/www/apps/resources/app/commerce-modules/fulfillment/page.mdx index 798ae19a8dd37..b1d30724ffe0c 100644 --- a/www/apps/resources/app/commerce-modules/fulfillment/page.mdx +++ b/www/apps/resources/app/commerce-modules/fulfillment/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IFulfillmentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IFulfillmentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 92dcd78544238..d01a02cae1c8d 100644 --- a/www/apps/resources/app/commerce-modules/inventory/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/inventory/examples/page.mdx @@ -14,7 +14,7 @@ In this document, you’ll find common examples of how you can use the Inventory ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -69,7 +69,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -115,7 +115,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -171,7 +171,7 @@ export async function GET(request: Request, { params }: ContextType) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -226,7 +226,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -281,7 +281,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -336,7 +336,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -393,7 +393,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -480,7 +480,7 @@ export async function POST(request: Request, { params }: ContextType) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/inventory/page.mdx b/www/apps/resources/app/commerce-modules/inventory/page.mdx index 5e261b07b9ea0..88d1389916aa5 100644 --- a/www/apps/resources/app/commerce-modules/inventory/page.mdx +++ b/www/apps/resources/app/commerce-modules/inventory/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IInventoryService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/order/page.mdx b/www/apps/resources/app/commerce-modules/order/page.mdx index 350d07220ebf6..0254eac250b2f 100644 --- a/www/apps/resources/app/commerce-modules/order/page.mdx +++ b/www/apps/resources/app/commerce-modules/order/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IOrderModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IOrderModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 ef04b477aee58..03149822c3744 100644 --- a/www/apps/resources/app/commerce-modules/payment/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/examples/page.mdx @@ -14,7 +14,7 @@ In this guide, you’ll find common examples of how you can use the Payment Modu ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPaymentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -76,7 +76,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPaymentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -142,7 +142,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPaymentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -196,7 +196,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPaymentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -252,7 +252,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPaymentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -306,7 +306,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPaymentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/payment/page.mdx b/www/apps/resources/app/commerce-modules/payment/page.mdx index 5a21929f144e9..cd0a4ed3b58f8 100644 --- a/www/apps/resources/app/commerce-modules/payment/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/page.mdx @@ -19,7 +19,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPaymentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -41,7 +41,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IPaymentModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 c83cdde18b691..0e0094122cbbf 100644 --- a/www/apps/resources/app/commerce-modules/pricing/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/pricing/examples/page.mdx @@ -14,7 +14,7 @@ In this document, you’ll find common examples of how you can use the Pricing M ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPricingModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -85,7 +85,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPricingModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -131,7 +131,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPricingModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -177,7 +177,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPricingModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -246,7 +246,7 @@ export async function POST(request: Request) { ```ts collapsibleLines="1-8" expandButtonLabel="Show Imports" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPricingModuleService } from "@medusajs/framework/types" import { PriceListType } from "@medusajs/framework/utils" import { Modules } from "@medusajs/framework/utils" @@ -331,7 +331,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPricingModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/pricing/page.mdx b/www/apps/resources/app/commerce-modules/pricing/page.mdx index a704257822228..6819e56e4b7ca 100644 --- a/www/apps/resources/app/commerce-modules/pricing/page.mdx +++ b/www/apps/resources/app/commerce-modules/pricing/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPricingModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IPricingModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 c446b308e2dc0..e9d63f0dcec62 100644 --- a/www/apps/resources/app/commerce-modules/product/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/examples/page.mdx @@ -14,7 +14,7 @@ In this guide, you’ll find common examples of how you can use the Product Modu ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -95,7 +95,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -138,7 +138,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -185,7 +185,7 @@ export async function GET( ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -232,7 +232,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -275,7 +275,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } 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 4d1146660f083..5b73a2fcc6da0 100644 --- a/www/apps/resources/app/commerce-modules/product/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -37,7 +37,7 @@ export async function GET(request: MedusaRequest, res: MedusaResponse) { ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IProductModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 503beb8cc250a..3c408044bcca3 100644 --- a/www/apps/resources/app/commerce-modules/promotion/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/promotion/examples/page.mdx @@ -14,7 +14,7 @@ In this document, you’ll find common examples of how you can use the Promotion ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPromotionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -79,7 +79,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPromotionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -136,7 +136,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPromotionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -214,7 +214,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPromotionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/promotion/page.mdx b/www/apps/resources/app/commerce-modules/promotion/page.mdx index e154b7d5c6eba..607c4478975cd 100644 --- a/www/apps/resources/app/commerce-modules/promotion/page.mdx +++ b/www/apps/resources/app/commerce-modules/promotion/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IPromotionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IPromotionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 6ae287bb90bbe..e4b636fb35407 100644 --- a/www/apps/resources/app/commerce-modules/region/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/region/examples/page.mdx @@ -14,7 +14,7 @@ In this guide, you’ll find common examples of how you can use the Region Modul ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IRegionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -70,7 +70,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IRegionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -116,7 +116,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IRegionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -162,7 +162,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IRegionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -212,7 +212,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IRegionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/region/page.mdx b/www/apps/resources/app/commerce-modules/region/page.mdx index 08145bde63f7c..18764e1af0b63 100644 --- a/www/apps/resources/app/commerce-modules/region/page.mdx +++ b/www/apps/resources/app/commerce-modules/region/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IRegionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IRegionModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 df2e4c248b3ef..7fac435626bbe 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 @@ -14,7 +14,7 @@ In this guide, you’ll find common examples of how you can use the Sales Channe ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ISalesChannelModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -65,7 +65,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ISalesChannelModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -110,7 +110,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ISalesChannelModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -161,7 +161,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ISalesChannelModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -214,7 +214,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ISalesChannelModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 9ebb0d2fb60c0..7ab1df07a9794 100644 --- a/www/apps/resources/app/commerce-modules/sales-channel/page.mdx +++ b/www/apps/resources/app/commerce-modules/sales-channel/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ISalesChannelModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -39,7 +39,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { ISalesChannelModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 e6539e98908b8..331014496a179 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 @@ -14,7 +14,7 @@ In this document, you’ll find common examples of how you can use the Stock Loc ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStockLocationService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -65,7 +65,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStockLocationService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -110,7 +110,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStockLocationService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -175,7 +175,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStockLocationService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 982a7afbc8de8..56662c5034b65 100644 --- a/www/apps/resources/app/commerce-modules/stock-location/page.mdx +++ b/www/apps/resources/app/commerce-modules/stock-location/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStockLocationService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -39,7 +39,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IStockLocationService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 8a706681c356e..f761cd2631150 100644 --- a/www/apps/resources/app/commerce-modules/store/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/store/examples/page.mdx @@ -14,7 +14,7 @@ In this guide, you’ll find common examples of how you can use the Store Module ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStoreModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -80,7 +80,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStoreModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -128,7 +128,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStoreModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -176,7 +176,7 @@ export async function GET(request: Request, { params }: ContextType) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStoreModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -228,7 +228,7 @@ export async function POST(request: Request, { params }: ContextType) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStoreModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/store/page.mdx b/www/apps/resources/app/commerce-modules/store/page.mdx index 607b263742f3a..ba40229a35389 100644 --- a/www/apps/resources/app/commerce-modules/store/page.mdx +++ b/www/apps/resources/app/commerce-modules/store/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IStoreModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IStoreModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 5b8e4e9b7dcec..e55eb8ffdc466 100644 --- a/www/apps/resources/app/commerce-modules/tax/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/tax/examples/page.mdx @@ -14,7 +14,7 @@ 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 { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ITaxModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -76,7 +76,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ITaxModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -122,7 +122,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ITaxModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -200,7 +200,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ITaxModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -246,7 +246,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ITaxModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/tax/page.mdx b/www/apps/resources/app/commerce-modules/tax/page.mdx index a592c6193fee4..7ba358010c347 100644 --- a/www/apps/resources/app/commerce-modules/tax/page.mdx +++ b/www/apps/resources/app/commerce-modules/tax/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ITaxModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { ITaxModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" 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 75ebe6b083155..697eaa4e5bcb5 100644 --- a/www/apps/resources/app/commerce-modules/user/examples/page.mdx +++ b/www/apps/resources/app/commerce-modules/user/examples/page.mdx @@ -14,7 +14,7 @@ In this guide, you’ll find common examples of how you can use the User Module ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IUserModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -70,7 +70,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IUserModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -116,7 +116,7 @@ export async function GET(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IUserModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -170,7 +170,7 @@ export async function POST(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IUserModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -212,7 +212,7 @@ export async function DELETE(request: Request) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IUserModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -266,7 +266,7 @@ export async function POST(request: Request, { params }: ContextType) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IUserModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -336,7 +336,7 @@ export async function POST(request: Request, { params }: ContextType) { ```ts - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IUserModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/commerce-modules/user/page.mdx b/www/apps/resources/app/commerce-modules/user/page.mdx index df6c8f5acf5fb..365df5a4e51c0 100644 --- a/www/apps/resources/app/commerce-modules/user/page.mdx +++ b/www/apps/resources/app/commerce-modules/user/page.mdx @@ -18,7 +18,7 @@ For example: ```ts title="src/api/store/custom/route.ts" - import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" + import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { IUserModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" @@ -40,7 +40,7 @@ export async function GET( ```ts title="src/subscribers/custom-handler.ts" - import { SubscriberArgs } from "@medusajs/medusa" + import { SubscriberArgs } from "@medusajs/framework" import { IUserModuleService } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" diff --git a/www/apps/resources/app/recipes/commerce-automation/page.mdx b/www/apps/resources/app/recipes/commerce-automation/page.mdx index 2d08da1052f26..2d7544b43049e 100644 --- a/www/apps/resources/app/recipes/commerce-automation/page.mdx +++ b/www/apps/resources/app/recipes/commerce-automation/page.mdx @@ -180,7 +180,7 @@ export const restockModelHighlights = [ import type { MedusaRequest, MedusaResponse, - } from "@medusajs/medusa" + } from "@medusajs/framework/http" import RestockNotificationModuleService from "../../../modules/restock-notification/service" @@ -242,7 +242,7 @@ export const subscriberHighlights = [ import type { SubscriberArgs, SubscriberConfig, - } from "@medusajs/medusa" + } from "@medusajs/framework" import { IInventoryService, INotificationModuleService, @@ -762,7 +762,7 @@ The `order.placed` event is currently not emitted. import type { SubscriberArgs, SubscriberConfig, - } from "@medusajs/medusa" + } from "@medusajs/framework" import { Modules, } from "@medusajs/framework/utils" @@ -876,7 +876,7 @@ export const newsletterHighlights = [ import type { SubscriberArgs, SubscriberConfig, - } from "@medusajs/medusa" + } from "@medusajs/framework" import { Modules, } from "@medusajs/framework/utils" 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 9bea15afd882e..9accea01c767b 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 @@ -287,7 +287,7 @@ Create the file `src/api/admin/digital-products/route.ts` with the following con import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys } from "@medusajs/framework/utils" export const GET = async ( @@ -690,7 +690,7 @@ Finally, create the file `src/api/middlewares.ts` with the following content: import { defineMiddlewares } from "@medusajs/medusa" import { validateAndTransformBody, -} from "@medusajs/medusa/api/utils/validate-body" +} from "@medusajs/framework/utils" import { createDigitalProductsSchema } from "./validation-schemas" export default defineMiddlewares({ @@ -743,7 +743,7 @@ export const uploadHighlights = [ import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { uploadFilesWorkflow } from "@medusajs/medusa/core-flows" import { MedusaError } from "@medusajs/framework/utils" @@ -1780,7 +1780,7 @@ The workflow returns the Medusa order and the digital product order, if created. Next, create the file `src/api/store/carts/[id]/complete/route.ts` with the following content: ```ts title="src/api/store/carts/[id]/complete/route.ts" -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import createDigitalProductOrderWorkflow from "../../../../../workflows/create-digital-product-order" export const POST = async ( @@ -2039,7 +2039,7 @@ Create the file `src/subscribers/handle-digital-order.ts` with the following con import type { SubscriberArgs, SubscriberConfig, -} from "@medusajs/medusa" +} from "@medusajs/framework" import { fulfillDigitalOrderWorkflow, } from "../workflows/fulfill-digital-order" @@ -2091,7 +2091,7 @@ export const previewRouteHighlights = [ import { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { Modules, } from "@medusajs/framework/utils" @@ -2157,7 +2157,7 @@ export const purchasedDpHighlights = [ import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys, } from "@medusajs/framework/utils" @@ -2213,7 +2213,7 @@ export const downloadUrlHighlights = [ import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { Modules, ContainerRegistrationKeys, 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 7c170cf9c1f2c..4fc12f3a7162b 100644 --- a/www/apps/resources/app/recipes/integrate-ecommerce-stack/page.mdx +++ b/www/apps/resources/app/recipes/integrate-ecommerce-stack/page.mdx @@ -259,7 +259,7 @@ export const workflowHighlights = [ import type { SubscriberConfig, SubscriberArgs, - } from "@medusajs/medusa" + } from "@medusajs/framework" import createProductWorkflow from "../workflows/create-product" export default async function handleProductUpdate({ @@ -309,7 +309,7 @@ For example, suppose an administrator changes the product data in the ERP system import { MedusaRequest, MedusaResponse, - } from "@medusajs/medusa" + } from "@medusajs/framework/http" import { IProductModuleService, UpdateProductDTO 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 d67187f8c8ca0..52f66df2ea797 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 @@ -553,7 +553,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 { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import { CreateRestaurantDTO, @@ -629,7 +629,7 @@ In the file `src/api/restaurants/route.ts` add the following API route: ```ts title="src/api/restaurants/route.ts" // other imports... -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ContainerRegistrationKeys, QueryContext, @@ -908,7 +908,7 @@ Then, create the file `src/api/users/route.ts` with the following content: import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { createUserWorkflow, CreateUserWorkflowInput, @@ -1175,7 +1175,7 @@ Finally, add the API route that uses the workflow at `src/api/restaurants/[id]/a import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { deleteRestaurantAdminWorkflow, } from "../../../../../workflows/restaurant/workflows/delete-restaurant-admin" @@ -1311,7 +1311,7 @@ In the workflow, you: Create the file `src/api/restaurants/[id]/products/route.ts` with the following content: ```ts title="src/api/restaurants/[id]/products/route.ts" collapsibleLines="1-9" expandButtonLabel="Show Imports" -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { AdminCreateProduct, } from "@medusajs/medusa/api/admin/products/validators" @@ -2080,7 +2080,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 { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import zod from "zod" import { DELIVERY_MODULE } from "../../../modules/delivery" @@ -2509,7 +2509,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 { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { notifyRestaurantStepId } from "../../../../workflows/delivery/steps/notify-restaurant" @@ -2574,7 +2574,7 @@ import { AuthenticatedMedusaRequest, MedusaNextFunction, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys, } from "@medusajs/framework/utils" @@ -2755,7 +2755,7 @@ import { AuthenticatedMedusaRequest, MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { claimDeliveryWorkflow, } from "../../../../workflows/delivery/workflows/claim-delivery" @@ -2843,7 +2843,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 { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { @@ -2933,7 +2933,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 { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { @@ -3025,7 +3025,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 { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { @@ -3076,7 +3076,7 @@ import { AuthenticatedMedusaRequest, MedusaNextFunction, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { DELIVERY_MODULE } from "../../modules/delivery" export const isDeliveryDriver = async ( @@ -3165,7 +3165,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 { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import { DeliveryStatus } from "../../../../modules/delivery/types" import { @@ -3258,7 +3258,7 @@ So, create the file `src/api/deliveries/subscribe/route.ts` with the following c import { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { Modules, } from "@medusajs/framework/utils" @@ -3337,7 +3337,7 @@ The storefront UI will also need to retrieve the delivery. So, you’ll create a Create the file `src/api/deliveries/[id]/route.ts` with the following content: ```ts title="src/api/deliveries/[id]/route.ts" -import { MedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { DELIVERY_MODULE } from "../../../../modules/delivery" export async function GET(req: MedusaRequest, res: MedusaResponse) { 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 5692520f39848..49d64f76e2c0d 100644 --- a/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx +++ b/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx @@ -359,7 +359,7 @@ export const vendorRouteSchemaHighlights = [ import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import { z } from "zod" import MarketplaceModuleService from "../../modules/marketplace/service" @@ -567,7 +567,7 @@ export const retrieveProductHighlights = [ ] ```ts title="src/api/vendors/products/route.ts" highlights={retrieveProductHighlights} -import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/medusa" +import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ContainerRegistrationKeys, } from "@medusajs/framework/utils" @@ -712,7 +712,7 @@ import { } from "@medusajs/medusa" import { validateAndTransformBody, -} from "@medusajs/medusa/api/utils/validate-body" +} from "@medusajs/framework/utils" import { AdminCreateProduct, } from "@medusajs/medusa/api/admin/products/validators" @@ -1205,7 +1205,7 @@ Create the file `src/api/store/carts/[id]/complete/route.ts` with the following import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import createVendorOrdersWorkflow from "../../../../../workflows/marketplace/create-vendor-orders" export const POST = async ( @@ -1249,7 +1249,7 @@ 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 { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http" import { ContainerRegistrationKeys } from "@medusajs/framework/utils" import { getOrdersListWorkflow } from "@medusajs/medusa/core-flows" import MarketplaceModuleService from "../../../modules/marketplace/service" diff --git a/www/apps/resources/app/recipes/pos/page.mdx b/www/apps/resources/app/recipes/pos/page.mdx index 691d3790ea02f..e9b50cbf7670f 100644 --- a/www/apps/resources/app/recipes/pos/page.mdx +++ b/www/apps/resources/app/recipes/pos/page.mdx @@ -76,7 +76,7 @@ Here’s an example of creating a custom API Route at `/store/pos/search-barcode import type { MedusaRequest, MedusaResponse, - } from "@medusajs/medusa" + } from "@medusajs/framework/http" import { MedusaError } from "@medusajs/framework/utils" import { Modules } from "@medusajs/framework/utils" import { IProductModuleService } from "@medusajs/framework/types" 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 4ca7b19785cce..2608dc31f6942 100644 --- a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx @@ -662,7 +662,7 @@ export const completeCartHighlights = [ import { MedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys, MedusaError, @@ -977,7 +977,7 @@ export const listSubscriptionsAdminHighlight = [ import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys } from "@medusajs/framework/utils" export const GET = async ( @@ -1038,7 +1038,7 @@ export const getSubscriptionsAdminHighlight = [ import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys } from "@medusajs/framework/utils" export const GET = async ( @@ -2119,7 +2119,7 @@ Create the file `src/api/store/customers/me/subscriptions/route.ts` with the fol import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import { ContainerRegistrationKeys } from "@medusajs/framework/utils" export const GET = async ( @@ -2183,7 +2183,7 @@ Then, create the file `src/api/store/customers/me/subscriptions/[id]/route.ts` w import { AuthenticatedMedusaRequest, MedusaResponse, -} from "@medusajs/medusa" +} from "@medusajs/framework/http" import SubscriptionModuleService from "../../../../../../modules/subscription/service" import { SUBSCRIPTION_MODULE,