feat(deps,framework): add zod as framework dependency (#14441)

## Summary

**What** — What changes are introduced in this PR?

Export Zod as a dependency of `@medusajs/framework`.

Closes DX-2414

**Why** — Why are these changes relevant or necessary?  

Zod is an essential part of Medusa development. We use it in the core and developers use it in their customizations.

Developers using pnpm won't have access to Zod, as it's not a top-level dependency. While they can install any version, since Zod is an essential aspect of our framework, it's more convenient that we export it and make it accessible to developers.

**How** — How have these changes been implemented?

1. Add Zod as a dependency in `@medusajs/deps` and export it in `@medusajs/framework`
2. Change imports of Zod across projects to import from `@medusajs/framework` and remove the Zod dependency.

> Note: this change doesn't cover admin extensions (and our related packages), as they're not related to the Medusa framework and using Zod in them isn't part of the conventions we document.

Developers can import Zod like this now:

```ts
import { z } from "@medusajs/framework/zod"
```

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

Use the following import in a Medusa project to create an validate zod schemas:

```bash
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http";
import { z } from "@medusajs/framework/zod"

export const PostCustomSchema = z.object({
  name: z.string(),
})

type PostCustomSchema = z.infer<typeof PostCustomSchema>

export async function POST(
  req: MedusaRequest<PostCustomSchema>,
  res: MedusaResponse
) {
  res.json({
    message: `Hello, ${req.validatedBody.name}`
  })
}

// in middleware
import { defineMiddlewares, validateAndTransformBody } from "@medusajs/framework/http"
import { PostCustomSchema } from "./admin/custom/route"

export default defineMiddlewares({
  routes: [
    {
      matcher: "/custom",
      middlewares: [validateAndTransformBody(PostCustomSchema)],
    },
  ],
})
```

---

## Examples

-

---

## Checklist

Please ensure the following before requesting a review:

- [x] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [x] I have linked the related issue(s) if applicable

---

## Additional Context

-
This commit is contained in:
Shahed Nasser
2026-01-09 15:20:01 +02:00
committed by GitHub
parent 673627044b
commit 1ca3516a5c
94 changed files with 126 additions and 112 deletions

View File

@@ -0,0 +1,10 @@
---
"@medusajs/workflows-sdk": patch
"@medusajs/core-flows": patch
"@medusajs/framework": patch
"@medusajs/utils": patch
"@medusajs/medusa": patch
"@medusajs/deps": patch
---
feat(deps,framework): add zod as framework dependency

View File

@@ -2,7 +2,7 @@ import {
defineMiddlewares,
validateAndTransformBody,
} from "@medusajs/framework/http"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
const CustomPostSchema = z.object({
foo: z.string(),

View File

@@ -30,8 +30,7 @@
},
"dependencies": {
"csv-parse": "^5.6.0",
"json-2-csv": "^5.5.4",
"zod": "3.25.76"
"json-2-csv": "^5.5.4"
},
"peerDependencies": {
"@medusajs/framework": "2.12.5"

View File

@@ -1,3 +1,3 @@
import z from "zod"
import { z } from "@medusajs/framework/zod"
export const pricingContextResult = z.record(z.string(), z.any()).optional()
export const shippingOptionsContextResult = z.record(z.string(), z.any()).optional()

View File

@@ -45,7 +45,8 @@
"./opentelemetry/resources": "./dist/deps/opentelemetry-resources.js",
"./opentelemetry/api": "./dist/deps/opentelemetry-api.js",
"./awilix": "./dist/deps/awilix.js",
"./pg": "./dist/deps/pg.js"
"./pg": "./dist/deps/pg.js",
"./zod": "./dist/deps/zod.js"
},
"engines": {
"node": ">=20"
@@ -92,7 +93,6 @@
"morgan": "^1.9.1",
"path-to-regexp": "^8.2.0",
"tsconfig-paths": "^4.2.0",
"zod": "3.25.76",
"zod-validation-error": "3.5.1"
},
"peerDependencies": {

View File

@@ -0,0 +1 @@
export * from "@medusajs/deps/zod"

View File

@@ -1,5 +1,5 @@
import { raw } from "express"
import { z } from "zod"
import { z } from "../../../deps/zod"
import { MedusaNextFunction, MedusaRequest, MedusaResponse } from "../../types"
import { defineMiddlewares } from "../../utils/define-middlewares"
import {

View File

@@ -1,12 +1,12 @@
import { MedusaError } from "@medusajs/utils"
import zod, { ZodNullable, ZodObject, ZodOptional } from "zod"
import { z, ZodNullable, ZodObject, ZodOptional } from "@medusajs/deps/zod"
import { MedusaRequest, MedusaResponse } from "../types"
import { validateAndTransformBody } from "../utils/validate-body"
const createLinkBody = () => {
return zod.object({
add: zod.array(zod.string()).optional(),
remove: zod.array(zod.string()).optional(),
return z.object({
add: z.array(z.string()).optional(),
remove: z.array(z.string()).optional(),
})
}
@@ -26,9 +26,9 @@ describe("validateAndTransformBody", () => {
const mockResponse = {} as MedusaResponse
const nextFunction = jest.fn()
mockRequest.additionalDataValidator = zod
mockRequest.additionalDataValidator = z
.object({
brand_id: zod.number(),
brand_id: z.number(),
})
.nullish()
@@ -62,9 +62,9 @@ describe("validateAndTransformBody", () => {
const mockResponse = {} as MedusaResponse
const nextFunction = jest.fn()
mockRequest.additionalDataValidator = zod
mockRequest.additionalDataValidator = z
.object({
brand_id: zod.number(),
brand_id: z.number(),
})
.nullish()
@@ -95,9 +95,9 @@ describe("validateAndTransformBody", () => {
const mockResponse = {} as MedusaResponse
const nextFunction = jest.fn()
mockRequest.additionalDataValidator = zod
mockRequest.additionalDataValidator = z
.object({
brand_id: zod.number().optional(),
brand_id: z.number().optional(),
})
.nullish()

View File

@@ -1,4 +1,4 @@
import z from "zod"
import { z } from "@medusajs/deps/zod"
import { MedusaError } from "@medusajs/utils"
import { validateAndTransformQuery } from "../utils/validate-query"
import { MedusaNextFunction, MedusaRequest, MedusaResponse } from "../types"

View File

@@ -1,6 +1,6 @@
import { dynamicImport, FileSystem, isFileSkipped } from "@medusajs/utils"
import { join } from "path"
import zod from "zod"
import { z } from "@medusajs/deps/zod"
import { logger } from "../logger"
import {
@@ -120,7 +120,7 @@ export class MiddlewareFileLoader {
matcher: matcher,
methods,
schema: route.additionalDataValidator,
validator: zod.object(route.additionalDataValidator).nullish(),
validator: z.object(route.additionalDataValidator).nullish(),
})
}

View File

@@ -1,5 +1,5 @@
import type { NextFunction, Request, Response } from "express"
import type { ZodNullable, ZodObject, ZodOptional, ZodRawShape } from "zod"
import type { ZodNullable, ZodObject, ZodOptional, ZodRawShape } from "@medusajs/deps/zod"
import {
FindConfig,

View File

@@ -6,7 +6,7 @@ import {
MiddlewareVerb,
ParserConfig,
} from "../types"
import { ZodRawShape } from "zod"
import type { ZodRawShape } from "@medusajs/deps/zod"
/**
* A helper function to configure the routes by defining custom middleware,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/deps/zod"
import { NextFunction } from "express"
import { MedusaRequest, MedusaResponse } from "../types"
import { zodValidator } from "../../zod"

View File

@@ -1,7 +1,7 @@
import { BaseEntity, QueryConfig, RequestQueryFields } from "@medusajs/types"
import { MedusaError, removeUndefinedProperties } from "@medusajs/utils"
import { NextFunction } from "express"
import { z } from "zod"
import { z } from "@medusajs/deps/zod"
import { zodValidator } from "../../zod/zod-helpers"
import { MedusaRequest, MedusaResponse } from "../types"

View File

@@ -2,10 +2,10 @@ import { MedusaError } from "../utils"
import {
z,
ZodError,
ZodInvalidTypeIssue,
ZodInvalidUnionIssue,
ZodIssue,
} from "zod"
type ZodInvalidTypeIssue,
type ZodInvalidUnionIssue,
type ZodIssue,
} from "@medusajs/deps/zod"
const formatPath = (issue: ZodIssue) => {
return issue.path.join(", ")

View File

@@ -43,8 +43,7 @@
"jsonwebtoken": "^9.0.2",
"pg-connection-string": "^2.7.0",
"pluralize": "^8.0.0",
"ulid": "^2.3.0",
"zod": "3.25.76"
"ulid": "^2.3.0"
},
"peerDependencies": {
"express": "^4.21.0"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/deps/zod"
import { ProductStatus } from "./enums"
export const booleanString = () =>

View File

@@ -1,4 +1,4 @@
import z from "zod"
import { z } from "@medusajs/deps/zod"
import { expectTypeOf } from "expect-type"
import { TransactionState } from "@medusajs/utils"
import { createStep } from "../create-step"

View File

@@ -1,5 +1,5 @@
import { OrchestrationUtils } from "@medusajs/utils"
import { type ZodSchema } from "zod"
import { type ZodSchema } from "@medusajs/deps/zod"
import {
CompensateFn,
createStep,

View File

@@ -30,7 +30,8 @@
"./mikro-orm/migrations": "./dist/mikro-orm-migrations.js",
"./mikro-orm/postgresql": "./dist/mikro-orm-postgresql.js",
"./awilix": "./dist/awilix.js",
"./pg": "./dist/pg.js"
"./pg": "./dist/pg.js",
"./zod": "./dist/zod.js"
},
"author": "Medusa",
"license": "MIT",
@@ -49,7 +50,8 @@
"@opentelemetry/sdk-node": "^0.200.0",
"@opentelemetry/sdk-trace-node": "^2.0.0",
"awilix": "^8.0.1",
"pg": "^8.16.3"
"pg": "^8.16.3",
"zod": "3.25.76"
},
"gitHead": "41a5425405aea5045a26def95c0dc00cf4a5a44d"
}

1
packages/deps/src/zod.ts Normal file
View File

@@ -0,0 +1 @@
export * from "zod"

View File

@@ -117,8 +117,7 @@
"qs": "^6.12.1",
"request-ip": "^3.3.0",
"slugify": "^1.6.6",
"uuid": "^9.0.0",
"zod": "3.25.76"
"uuid": "^9.0.0"
},
"peerDependencies": {
"@medusajs/framework": "2.12.5",

View File

@@ -1,5 +1,5 @@
import { ApiKeyType } from "@medusajs/framework/utils"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,5 +1,5 @@
import { CampaignBudgetType, isPresent } from "@medusajs/framework/utils"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createSelectParams,

View File

@@ -1,5 +1,5 @@
import { ClaimReason, ClaimType } from "@medusajs/framework/utils"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { applyAndAndOrOperators } from "../../utils/common-validators"
import {
createFindParams,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
import { applyAndAndOrOperators } from "../../utils/common-validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
AddressPayload,
applyAndAndOrOperators,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { booleanString } from "../../utils/common-validators"
import { createFindParams } from "../../utils/validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createSelectParams } from "../../utils/validators"
import {
geoZoneCitySchema,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
const geoZoneBaseSchema = z.object({
country_code: z.string(),

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { AddressPayload } from "../../utils/common-validators"
import { createSelectParams } from "../../utils/validators"

View File

@@ -1,4 +1,4 @@
import z from "zod"
import { z } from "@medusajs/framework/zod"
export const AdminIndexSyncPayload = z.object({
strategy: z.enum(["full", "reset"]).optional(),

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
import { applyAndAndOrOperators } from "../../utils/common-validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
import { applyAndAndOrOperators } from "../../utils/common-validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createOperatorMap, createSelectParams } from "../../utils/validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
export const AdminPostOrderEditsReqSchema = z.object({
order_id: z.string(),

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { AddressPayload } from "../../utils/common-validators"
import {
createFindParams,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createSelectParams } from "../../utils/validators"
export type AdminGetPaymentCollectionParamsType = z.infer<

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -1,5 +1,5 @@
import { PriceListStatus, PriceListType } from "@medusajs/framework/utils"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
import { applyAndAndOrOperators } from "../../utils/common-validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -1,6 +1,6 @@
import { BatchMethodRequest, HttpTypes } from "@medusajs/framework/types"
import { ProductStatus } from "@medusajs/framework/utils"
import { z, ZodType } from "zod"
import { z, type ZodType } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -6,7 +6,7 @@ import {
PromotionStatus,
PromotionType,
} from "@medusajs/framework/utils"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { applyAndAndOrOperators } from "../../utils/common-validators"
import {
createFindParams,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createOperatorMap, createSelectParams } from "../../utils/validators"
export type AdminCreatePaymentRefundReasonType = z.infer<

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -3,7 +3,7 @@ import {
RuleOperator,
ShippingOptionPriceType as ShippingOptionPriceTypeEnum,
} from "@medusajs/framework/utils"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { booleanString } from "../../utils/common-validators"
import {
createFindParams,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
import { applyAndAndOrOperators } from "../../utils/common-validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams } from "../../utils/validators"
import { applyAndAndOrOperators } from "../../utils/common-validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -4,7 +4,7 @@ import {
createFindParams,
createSelectParams,
} from "../../utils/validators"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
export const AdminGetTranslationParams = createSelectParams()

View File

@@ -1,4 +1,4 @@
import { z, ZodType } from "zod"
import { z, type ZodType } from "@medusajs/framework/zod"
import { HttpTypes } from "@medusajs/types"
import { createSelectParams } from "../../utils/validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createSelectParams } from "../../../../utils/validators"
export type AdminGetColumnsParamsType = z.infer<typeof AdminGetColumnsParams>

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,5 +1,5 @@
import { TransactionHandlerType } from "@medusajs/framework/utils"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
export type AdminGetWorkflowExecutionDetailsParamsType = z.infer<

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
export const ResetPasswordRequest = z.object({
identifier: z.string(),

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { AddressPayload } from "../../utils/common-validators"
import { createSelectParams, WithAdditionalData } from "../../utils/validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
createFindParams,
createOperatorMap,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
import { applyAndAndOrOperators } from "../../utils/common-validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { AddressPayload } from "../../utils/common-validators"
import { createFindParams, createSelectParams } from "../../utils/validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
import { applyAndAndOrOperators } from "../../utils/common-validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createSelectParams } from "../../utils/validators"
export type StoreGetPaymentCollectionParamsType = z.infer<

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams } from "../../utils/validators"
export type StoreGetPaymentProvidersParamsType = z.infer<

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { applyAndAndOrOperators } from "../../utils/common-validators"
import {
createFindParams,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { applyAndAndOrOperators } from "../../utils/common-validators"
import {
createFindParams,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
GetProductsParams,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
import { applyAndAndOrOperators } from "../../utils/common-validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createFindParams, createSelectParams } from "../../utils/validators"
export type StoreReturnReasonParamsType = z.infer<

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { applyAndAndOrOperators } from "../../utils/common-validators"
import { createFindParams, createSelectParams } from "../../utils/validators"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import {
applyAndAndOrOperators,
booleanString,

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
export const AddressPayload = z
.object({

View File

@@ -1,6 +1,6 @@
import { FilterableProductProps, OperatorMap } from "@medusajs/framework/types"
import { isPresent, ProductStatus } from "@medusajs/framework/utils"
import { z } from "zod"
import { z } from "@medusajs/framework/zod"
import { createOperatorMap } from "../../validators"
import { booleanString } from "../common"

View File

@@ -1,4 +1,10 @@
import { z, ZodEffects, ZodNullable, ZodObject, ZodOptional } from "zod"
import {
z,
type ZodEffects,
type ZodNullable,
type ZodObject,
type ZodOptional
} from "@medusajs/framework/zod"
/**
* Wraps the original schema to a function to accept and merge

View File

@@ -3410,7 +3410,6 @@ __metadata:
"@medusajs/framework": 2.12.5
csv-parse: ^5.6.0
json-2-csv: ^5.5.4
zod: 3.25.76
peerDependencies:
"@medusajs/framework": 2.12.5
languageName: unknown
@@ -3503,6 +3502,7 @@ __metadata:
"@opentelemetry/sdk-trace-node": ^2.0.0
awilix: ^8.0.1
pg: ^8.16.3
zod: 3.25.76
languageName: unknown
linkType: soft
@@ -3644,7 +3644,6 @@ __metadata:
morgan: ^1.9.1
path-to-regexp: ^8.2.0
tsconfig-paths: ^4.2.0
zod: 3.25.76
zod-validation-error: 3.5.1
peerDependencies:
"@aws-sdk/client-dynamodb": ^3.218.0
@@ -3864,7 +3863,6 @@ __metadata:
request-ip: ^3.3.0
slugify: ^1.6.6
uuid: ^9.0.0
zod: 3.25.76
peerDependencies:
"@medusajs/framework": 2.12.5
"@swc/core": ^1.7.28
@@ -4253,7 +4251,6 @@ __metadata:
pg-connection-string: ^2.7.0
pluralize: ^8.0.0
ulid: ^2.3.0
zod: 3.25.76
peerDependencies:
express: ^4.21.0
languageName: unknown