Skip to content

Commit

Permalink
docs: fix imports from dist (#9401)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser authored Oct 1, 2024
1 parent 9bd99df commit 1ad7e75
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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/dist/api/utils/validate-body"
} from "@medusajs/medusa/api/utils/validate-body"
import { PostStoreCustomSchema } from "./custom/validators"

export default defineMiddlewares({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ The route handler imports a validation schema from a `validation-schema` file. S
```ts title="src/api/validation-schemas.ts"
import {
AdminCreateProduct,
} from "@medusajs/medusa/dist/api/admin/products/validators"
} from "@medusajs/medusa/api/admin/products/validators"
import { z } from "zod"
import { MediaType } from "../modules/digital-product/types"

Expand All @@ -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/dist/api/utils/validate-body"
} from "@medusajs/medusa/api/utils/validate-body"
import { createDigitalProductsSchema } from "./validation-schemas"

export default defineMiddlewares({
Expand Down Expand Up @@ -2312,7 +2312,7 @@ In this section, you’ll customize the [Next.js Starter storefront](../../../..
In `src/types/global.ts`, add the following types that you’ll use in your customizations:

```ts title="src/types/global.ts"
import { BaseProductVariant } from "@medusajs/framework/types/dist/http/product/common"
import { BaseProductVariant } from "@medusajs/framework/types/http/product/common"

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ Create the file `src/api/restaurants/[id]/products/route.ts` with the following
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
import {
AdminCreateProduct,
} from "@medusajs/medusa/dist/api/admin/products/validators"
} from "@medusajs/medusa/api/admin/products/validators"
import { z } from "zod"
import {
createRestaurantProductsWorkflow,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,10 @@ import {
} from "@medusajs/medusa"
import {
validateAndTransformBody,
} from "@medusajs/medusa/dist/api/utils/validate-body"
} from "@medusajs/medusa/api/utils/validate-body"
import {
AdminCreateProduct,
} from "@medusajs/medusa/dist/api/admin/products/validators"
} from "@medusajs/medusa/api/admin/products/validators"

export default defineMiddlewares({
routes: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1765,10 +1765,10 @@ import {
} from "../../modules/subscription/types"
import {
authorizePaymentSessionStep,
} from "@medusajs/medusa/core-flows/dist/payment/steps/authorize-payment-session"
} from "@medusajs/medusa/core-flows"
import {
createPaymentCollectionsStep,
} from "@medusajs/medusa/core-flows/dist/cart/steps/create-payment-collection"
} from "@medusajs/medusa/core-flows"
import createSubscriptionOrderStep from "./steps/create-subscription-order"
import updateSubscriptionStep from "./steps/update-subscription"

Expand Down

0 comments on commit 1ad7e75

Please sign in to comment.