diff --git a/demo/package.json b/demo/package.json index d2da4d94..518afc45 100644 --- a/demo/package.json +++ b/demo/package.json @@ -47,7 +47,7 @@ "react-virtualized-auto-sizer": "^1.0.20", "react-window": "^1.8.10", "stainless": "workspace:*", - "zod": "^3.25.76", + "zod": "^4.3.6", "zustand": "^4.4.7" }, "devDependencies": { diff --git a/packages/client/package.json b/packages/client/package.json index 6a4a33df..bef46ff0 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -31,7 +31,8 @@ "prettier": "^2.8.8", "stainless": "workspace:*", "typescript": "^5.3.2", - "zod-to-ts": "^1.2.0" + "zod": "^4.3.6", + "zod-to-ts": "^2.0.0" }, "devDependencies": { "@tanstack/react-query": "^5.28.0", diff --git a/packages/client/src/codegen/generate-types.ts b/packages/client/src/codegen/generate-types.ts index 68d49a02..c0619335 100644 --- a/packages/client/src/codegen/generate-types.ts +++ b/packages/client/src/codegen/generate-types.ts @@ -1,4 +1,4 @@ -import { printNode, zodToTs } from "zod-to-ts"; +import { printNode, zodToTs, createAuxiliaryTypeStore } from "zod-to-ts"; import { APIConfig, ClientConfig } from "../core/api-client-types"; import { AnyActionsConfig, ResourceConfig, z } from "stainless"; import { splitPathIntoParts } from "../core/endpoint"; @@ -145,8 +145,194 @@ function nestEndpoints( return api; } +// Map zod/v3 typeName (e.g. "ZodString") to zod v4 type (e.g. "string") +function mapZodV3TypeToV4(typeName: string): string { + // Remove "Zod" prefix and lowercase + if (typeName.startsWith("Zod")) { + const type = typeName.slice(3).toLowerCase(); + // Map native enums to enum since zod-to-ts v2 only handles "enum" + if (type === "nativeenum") { + return "enum"; + } + return type; + } + return typeName.toLowerCase(); +} + +// Wrap a value to recursively add _zod to any nested schemas +function wrapSchemaValue(value: any, cache: WeakMap): any { + if (!value || typeof value !== "object") return value; + + // Check if it's a zod schema (has _def) + if (value._def && !value._zod) { + return wrapSchemaForZodToTs(value, cache); + } + + // Wrap arrays (for union options, tuple items, etc.) + if (Array.isArray(value)) { + return value.map((item) => wrapSchemaValue(item, cache)); + } + + // Wrap plain objects (for object shapes) + if (value.constructor === Object) { + const result: Record = {}; + for (const key of Object.keys(value)) { + result[key] = wrapSchemaValue(value[key], cache); + } + return result; + } + + return value; +} + +// Create a v4-compatible _zod.def object from v3 _def +function createV4CompatDef(v3Def: any, cache: WeakMap): any { + const type = mapZodV3TypeToV4(v3Def.typeName); + + const result: any = { + type, + }; + + // Map v3 property names to v4 equivalents and wrap nested schemas + // Array: v3 uses _def.type, v4 uses def.element + if (v3Def.type && v3Def.type._def) { + result.element = wrapSchemaValue(v3Def.type, cache); + } + + // Object shape: v3 uses _def.shape() function, v4 uses def.shape object + if (typeof v3Def.shape === "function") { + const shapeObj = v3Def.shape(); + result.shape = wrapSchemaValue(shapeObj, cache); + } else if (v3Def.shape && typeof v3Def.shape === "object") { + result.shape = wrapSchemaValue(v3Def.shape, cache); + } + + // Optional/Nullable: innerType + if (v3Def.innerType) { + result.innerType = wrapSchemaValue(v3Def.innerType, cache); + } + + // Union: options array + if (v3Def.options) { + result.options = wrapSchemaValue(v3Def.options, cache); + } + + // Intersection: left and right + if (v3Def.left) { + result.left = wrapSchemaValue(v3Def.left, cache); + } + if (v3Def.right) { + result.right = wrapSchemaValue(v3Def.right, cache); + } + + // Tuple: items + if (v3Def.items) { + result.items = wrapSchemaValue(v3Def.items, cache); + } + + // Record/Map: keyType and valueType + if (v3Def.keyType) { + result.keyType = wrapSchemaValue(v3Def.keyType, cache); + } + if (v3Def.valueType) { + result.valueType = wrapSchemaValue(v3Def.valueType, cache); + } + + // Lazy: getter + if (v3Def.getter) { + result.getter = () => wrapSchemaValue(v3Def.getter(), cache); + } + + // Effects (transform/refine): schema/innerType + if (v3Def.schema) { + result.innerType = wrapSchemaValue(v3Def.schema, cache); + } + + // Enum: entries or values + // v3 ZodEnum has values as array, v3 ZodNativeEnum has values as object + if (v3Def.values) { + if (Array.isArray(v3Def.values)) { + result.entries = v3Def.values.reduce( + (acc: Record, v: string) => { + acc[v] = v; + return acc; + }, + {} + ); + } else if (typeof v3Def.values === "object") { + // Native enum - values is already an object + result.entries = v3Def.values; + } + } + + // Literal: values array + if (v3Def.value !== undefined) { + result.values = [v3Def.value]; + } + + // Promise: innerType + if (v3Def.type && type === "promise") { + result.innerType = wrapSchemaValue(v3Def.type, cache); + } + + // Catchall for objects - skip if it's ZodNever (strict mode default) + // because `[x: string]: never` is semantically "no extra properties" but + // generates invalid TypeScript when combined with known properties + if (v3Def.catchall && v3Def.catchall._def?.typeName !== "ZodNever") { + result.catchall = wrapSchemaValue(v3Def.catchall, cache); + } + + return result; +} + +// Recursively add _zod property to a schema for zod-to-ts v2 compatibility +function wrapSchemaForZodToTs( + schema: any, + cache: WeakMap = new WeakMap() +): any { + if (!schema || typeof schema !== "object") return schema; + + // Skip if already has _zod (native zod v4) + if (schema._zod) return schema; + + // Skip if no _def (not a zod schema) + if (!schema._def) return schema; + + // Check cache to handle circular references + if (cache.has(schema)) { + return cache.get(schema); + } + + // Create wrapped schema with _zod property + const wrapped = Object.create(Object.getPrototypeOf(schema)); + cache.set(schema, wrapped); + + // Copy all own properties from original + Object.assign(wrapped, schema); + + // Add _zod property + Object.defineProperty(wrapped, "_zod", { + get() { + return { + def: createV4CompatDef(schema._def, cache), + optin: false, + optout: schema.isOptional?.() ?? false, + }; + }, + configurable: true, + enumerable: false, + }); + + return wrapped; +} + function zodToString(schema: ZodTypeAny) { - const { node } = zodToTs(schema, undefined, { nativeEnums: "union" }); + // Wrap the schema to add _zod property for zod-to-ts v2 compatibility + const wrappedSchema = wrapSchemaForZodToTs(schema); + + // zod-to-ts v2 API: zodToTs(schema, options) + const auxiliaryTypeStore = createAuxiliaryTypeStore(); + const { node } = zodToTs(wrappedSchema as any, { auxiliaryTypeStore }); const nodeString = printNode(node); // This happens with large, lazily loaded zod types return nodeString.replace(/\bIdentifier\b/g, "unknown"); diff --git a/packages/client/vitest.config.ts b/packages/client/vitest.config.ts index d2a3c62d..11e368ba 100644 --- a/packages/client/vitest.config.ts +++ b/packages/client/vitest.config.ts @@ -4,5 +4,9 @@ export default defineConfig({ test: { typecheck: { enabled: true }, setupFiles: ["/src/test-util/setup.ts"], + deps: { + // Inline zod-to-ts to handle ESM/CJS interop with typescript package + inline: ["zod-to-ts"], + }, }, }); diff --git a/packages/prisma/package.json b/packages/prisma/package.json index 3d900088..a286091a 100644 --- a/packages/prisma/package.json +++ b/packages/prisma/package.json @@ -32,7 +32,7 @@ "dependencies": { "lodash": "^4.17.21", "stainless": "workspace:*", - "zod": "^3.25.76" + "zod": "^4.3.6" }, "peerDependencies": { "prisma": "^4.0.0" diff --git a/packages/prisma/src/prismaPlugin.ts b/packages/prisma/src/prismaPlugin.ts index 2f6925f7..c0b7951b 100644 --- a/packages/prisma/src/prismaPlugin.ts +++ b/packages/prisma/src/prismaPlugin.ts @@ -11,8 +11,9 @@ import { import { includeSubPaths } from "./includeUtils"; import { isPlainObject } from "lodash"; -declare module "zod" { - interface ZodType { +// Module augmentation for zod/v3 (stainless re-exports zod/v3 types) +declare module "zod/v3" { + interface ZodType { /** * Transforms the output value to fetch the Prisma model whose primary * key is the input value. Throws if the primary key wasn't found. @@ -79,7 +80,8 @@ z.ZodType.prototype.prismaModelLoader = function prismaModelLoader< } ); // tsc -b is generating spurious errors here... - return (result as any).openapi({ effectType: "input" }) as typeof result; + // Removed .openapi() call - zod-openapi v5 uses .meta() which isn't available in zod/v3 + return result; }; z.ZodType.prototype.prismaModel = function prismaModel< diff --git a/packages/stainless/package.json b/packages/stainless/package.json index 07ca9e5d..90fa8915 100644 --- a/packages/stainless/package.json +++ b/packages/stainless/package.json @@ -50,8 +50,8 @@ "lodash": "^4.17.21", "qs": "^6.11.2", "ts-node": "^10.9.1", - "zod": "^3.25.76", - "zod-openapi": "github:stainless-api/zod-openapi#2.8.0", + "zod": "^4.3.6", + "zod-openapi": "^5.4.6", "zod-validation-error": "^4.0.1" } } diff --git a/packages/stainless/src/openapiSpec.ts b/packages/stainless/src/openapiSpec.ts index 6854eb43..4a380adb 100644 --- a/packages/stainless/src/openapiSpec.ts +++ b/packages/stainless/src/openapiSpec.ts @@ -3,8 +3,9 @@ import { ZodOpenApiOperationObject, ZodOpenApiPathsObject, createDocument, + oas31, } from "zod-openapi"; -import type { OpenAPIObject } from "zod-openapi/lib-types/openapi3-ts/dist/oas31"; +type OpenAPIObject = oas31.OpenAPIObject; import { snakeCase } from "lodash"; function allModels( @@ -87,7 +88,9 @@ export async function openapiSpec( }, servers: [{ url: "v1" }], components: { - schemas: models, + // Cast to any because zod/v3 types are structurally compatible with zod/v4 + // at runtime, but TypeScript sees them as incompatible types + schemas: models as any, }, paths, }); diff --git a/packages/stainless/src/stl.ts b/packages/stainless/src/stl.ts index 79bdee20..dcda639f 100644 --- a/packages/stainless/src/stl.ts +++ b/packages/stainless/src/stl.ts @@ -1,6 +1,7 @@ import * as z from "./z"; import { openapiSpec } from "./openapiSpec"; -import type { OpenAPIObject } from "zod-openapi/lib-types/openapi3-ts/dist/oas31"; +import type { oas31 } from "zod-openapi"; +type OpenAPIObject = oas31.OpenAPIObject; import { fromZodError } from "zod-validation-error/v3"; import coerceParams from "./coerceParams"; export { openapiSpec }; diff --git a/packages/stainless/src/z.ts b/packages/stainless/src/z.ts index 3e1f7ca7..d52452f9 100644 --- a/packages/stainless/src/z.ts +++ b/packages/stainless/src/z.ts @@ -1,11 +1,13 @@ -import { extendZodWithOpenApi } from "zod-openapi"; +// Use zod/v3 compatibility layer for easier migration +// zod-openapi v5 uses .meta() instead of .openapi(), no setup required +import "zod-openapi"; import { z, ParseContext, SafeParseReturnType, isValid, ZodFirstPartyTypeKind, -} from "zod"; +} from "zod/v3"; import { StlContext } from "./stl"; import { SelectTree } from "./parseSelect"; import { getSelects } from "./selects"; @@ -13,7 +15,7 @@ import { getIncludes, IncludablePaths } from "./includes"; import { pickBy } from "lodash/fp"; import { mapValues } from "lodash"; -export * from "zod"; +export * from "zod/v3"; export { selects, selectsSymbol, getSelects } from "./selects"; export { includes, @@ -22,13 +24,8 @@ export { IncludablePaths, } from "./includes"; -/** - * TODO: try to come up with a better error message - * that you must import stl _before_ zod - * in any file that uses z.openapi(), - * including the file that calls stl.openapiSpec(). - */ -extendZodWithOpenApi(z); // https://github.com/asteasolutions/zod-to-openapi#the-openapi-method +// zod-openapi v5 uses Zod's native .meta() method for OpenAPI metadata +// No setup required - importing "zod-openapi" above enables TypeScript types ////////////////////////////////////////////////// ////////////////////////////////////////////////// @@ -36,7 +33,7 @@ extendZodWithOpenApi(z); // https://github.com/asteasolutions/zod-to-openapi#the ////////////////////////////////////////////////// ////////////////////////////////////////////////// -declare module "zod" { +declare module "zod/v3" { interface ZodType { withMetadata(metadata: M): ZodMetadata; } @@ -228,7 +225,7 @@ export function extractDeepMetadata< ////////////////////////////////////////////////// ////////////////////////////////////////////////// -declare module "zod" { +declare module "zod/v3" { interface ZodType { /** * Marks this schema as includable via an `include[]` query param. @@ -266,9 +263,7 @@ z.ZodType.prototype.includable = function includable(this: z.ZodTypeAny) { return include && zodPathIsIncluded(path, include) ? data : undefined; }, this.optional() - ) - .openapi({ effectType: "input" }) - .withMetadata({ stainless: { includable: true } }); + ).withMetadata({ stainless: { includable: true } }); }; export type isIncludable = extractDeepMetadata< @@ -301,7 +296,7 @@ function zodPathIsIncluded( ////////////////////////////////////////////////// ////////////////////////////////////////////////// -declare module "zod" { +declare module "zod/v3" { // I don't know why TS errors without this, sigh interface ZodTypeDef {} @@ -438,7 +433,7 @@ z.ZodType.prototype.selectable = function selectable(this: z.ZodTypeAny) { ////////////////////////////////////////////////// ////////////////////////////////////////////////// -declare module "zod" { +declare module "zod/v3" { interface ZodType { safeParseAsync( data: unknown, diff --git a/packages/ts-to-zod/package.json b/packages/ts-to-zod/package.json index 51eafa32..3a47f5bd 100644 --- a/packages/ts-to-zod/package.json +++ b/packages/ts-to-zod/package.json @@ -34,6 +34,6 @@ "lodash": "^4.17.21", "pkg-up": "~3.1.0", "ts-morph": "^19.0.0", - "zod": "^3.25.76" + "zod": "^4.3.6" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99170bbe..0331b059 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,7 +46,7 @@ importers: dependencies: '@next-auth/prisma-adapter': specifier: ^1.0.7 - version: 1.0.7(@prisma/client@4.16.2(prisma@4.16.2))(next-auth@4.24.7(next@14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + version: 1.0.7(@prisma/client@4.16.2(prisma@4.16.2))(next-auth@4.24.7(next@14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) '@prisma/client': specifier: ^4.16.2 version: 4.16.2(prisma@4.16.2) @@ -82,10 +82,10 @@ importers: version: 2.30.0 next: specifier: ^14.2.8 - version: 14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) next-auth: specifier: ^4.24.7 - version: 4.24.7(next@14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 4.24.7(next@14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) prisma: specifier: ^4.16.2 version: 4.16.2 @@ -126,8 +126,8 @@ importers: specifier: workspace:* version: link:../packages/stainless zod: - specifier: ^3.25.76 - version: 3.25.76 + specifier: ^4.3.6 + version: 4.3.6 zustand: specifier: ^4.4.7 version: 4.4.7(@types/react@18.0.28)(immer@9.0.21)(react@18.3.1) @@ -194,7 +194,7 @@ importers: version: 3.4.10(ts-node@10.9.2(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@18.14.2)(typescript@5.3.2)) ts-jest: specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.5)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.5))(jest@29.7.0(@types/node@18.14.2)(ts-node@10.9.2(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@18.14.2)(typescript@5.3.2)))(typescript@5.3.2) + version: 29.1.1(@babel/core@7.25.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@18.14.2)(ts-node@10.9.2(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@18.14.2)(typescript@5.3.2)))(typescript@5.3.2) ts-node: specifier: ^10.9.1 version: 10.9.2(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@18.14.2)(typescript@5.3.2) @@ -321,9 +321,12 @@ importers: typescript: specifier: ^5.3.2 version: 5.3.2 + zod: + specifier: ^4.3.6 + version: 4.3.6 zod-to-ts: - specifier: ^1.2.0 - version: 1.2.0(typescript@5.3.2)(zod@3.25.76) + specifier: ^2.0.0 + version: 2.0.0(typescript@5.3.2)(zod@4.3.6) devDependencies: '@tanstack/react-query': specifier: ^5.28.0 @@ -435,7 +438,7 @@ importers: version: 6.9.15 next: specifier: ^14.2.8 - version: 14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) typescript: specifier: ^5.3.2 version: 5.3.2 @@ -454,7 +457,7 @@ importers: version: 20.16.5 next: specifier: ^14.2.8 - version: 14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) next-auth: specifier: ^4.24.5 version: 4.24.5(next@14.2.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -474,8 +477,8 @@ importers: specifier: workspace:* version: link:../stainless zod: - specifier: ^3.25.76 - version: 3.25.76 + specifier: ^4.3.6 + version: 4.3.6 devDependencies: '@types/lodash': specifier: ^4.14.202 @@ -566,14 +569,14 @@ importers: specifier: ^10.9.1 version: 10.9.2(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@20.16.5)(typescript@5.3.2) zod: - specifier: ^3.25.76 - version: 3.25.76 + specifier: ^4.3.6 + version: 4.3.6 zod-openapi: - specifier: github:stainless-api/zod-openapi#2.8.0 - version: https://codeload.github.com/stainless-api/zod-openapi/tar.gz/550978836406882613e9547b2e9486fa7448a37b(zod@3.25.76) + specifier: ^5.4.6 + version: 5.4.6(zod@4.3.6) zod-validation-error: specifier: ^4.0.1 - version: 4.0.1(zod@3.25.76) + version: 4.0.1(zod@4.3.6) devDependencies: '@types/jest': specifier: ^29.5.10 @@ -618,8 +621,8 @@ importers: specifier: ^19.0.0 version: 19.0.0 zod: - specifier: ^3.25.76 - version: 3.25.76 + specifier: ^4.3.6 + version: 4.3.6 devDependencies: '@types/jest': specifier: ^29.5.10 @@ -4997,9 +5000,11 @@ packages: lodash.clone@4.3.2: resolution: {integrity: sha512-Yc/0UmZvWkFsbx7NB4feSX5bSX03SR0ft8CTkI8RCb3w/TzT71HXew2iNDm0aml93P49tIR/NJHOIoE+XEKz9A==} + deprecated: This package is deprecated. Use structuredClone instead. lodash.clone@4.5.0: resolution: {integrity: sha512-GhrVeweiTD6uTmmn5hV/lzgCQhccwReIVRLHp7LT4SopOjqEZ5BbX8b5WWEtAKasjmy8hR7ZPwsYlxRCku5odg==} + deprecated: This package is deprecated. Use structuredClone instead. lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -5444,6 +5449,7 @@ packages: next@14.2.9: resolution: {integrity: sha512-3CzBNo6BuJnRjcQvRw+irnU1WiuJNZEp+dkzkt91y4jeIDN/Emg95F+takSYiLpJ/HkxClVQRyqiTwYce5IVqw==} engines: {node: '>=18.17.0'} + deprecated: This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/security-update-2025-12-11 for more details. hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 @@ -6953,6 +6959,7 @@ packages: tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} + deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exhorbitant rates) by contacting i@izs.me terser-webpack-plugin@5.3.10: resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} @@ -7436,6 +7443,7 @@ packages: whatwg-encoding@2.0.0: resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} engines: {node: '>=12'} + deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation whatwg-mimetype@3.0.0: resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} @@ -7587,18 +7595,17 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} - zod-openapi@https://codeload.github.com/stainless-api/zod-openapi/tar.gz/550978836406882613e9547b2e9486fa7448a37b: - resolution: {tarball: https://codeload.github.com/stainless-api/zod-openapi/tar.gz/550978836406882613e9547b2e9486fa7448a37b} - version: 2.8.0 - engines: {node: '>=16.11'} + zod-openapi@5.4.6: + resolution: {integrity: sha512-P2jsOOBAq/6hCwUsMCjUATZ8szkMsV5VAwZENfyxp2Hc/XPJQpVwAgevWZc65xZauCwWB9LAn7zYeiCJFAEL+A==} + engines: {node: '>=20'} peerDependencies: - zod: ^3.21.4 + zod: ^3.25.74 || ^4.0.0 - zod-to-ts@1.2.0: - resolution: {integrity: sha512-x30XE43V+InwGpvTySRNz9kB7qFU8DlyEy7BsSTCHPH1R0QasMmHWZDCzYm6bVXtj/9NNJAZF3jW8rzFvH5OFA==} + zod-to-ts@2.0.0: + resolution: {integrity: sha512-aHsUgIl+CQutKAxtRNeZslLCLXoeuSq+j5HU7q3kvi/c2KIAo6q4YjT7/lwFfACxLB923ELHYMkHmlxiqFy4lw==} peerDependencies: - typescript: ^4.9.4 || ^5.0.2 - zod: ^3 + typescript: ^5.0.0 + zod: ^3.25.0 || ^4.0.0 zod-validation-error@4.0.1: resolution: {integrity: sha512-F3rdaCOHs5ViJ5YTz5zzRtfkQdMdIeKudJAoxy7yB/2ZMEHw73lmCAcQw11r7++20MyGl4WV59EVh7A9rNAyog==} @@ -7606,8 +7613,8 @@ packages: peerDependencies: zod: ^3.25.0 || ^4.0.0 - zod@3.25.76: - resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + zod@4.3.6: + resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} zustand@4.4.7: resolution: {integrity: sha512-QFJWJMdlETcI69paJwhSMJz7PPWjVP8Sjhclxmxmxv/RYI7ZOvR5BHX+ktH0we9gTWQMxcne8q1OY8xxz604gw==} @@ -9852,10 +9859,10 @@ snapshots: '@types/react': 18.0.28 react: 17.0.2 - '@next-auth/prisma-adapter@1.0.7(@prisma/client@4.16.2(prisma@4.16.2))(next-auth@4.24.7(next@14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))': + '@next-auth/prisma-adapter@1.0.7(@prisma/client@4.16.2(prisma@4.16.2))(next-auth@4.24.7(next@14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))': dependencies: '@prisma/client': 4.16.2(prisma@4.16.2) - next-auth: 4.24.7(next@14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next-auth: 4.24.7(next@14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@next/env@14.2.9': {} @@ -14254,7 +14261,7 @@ snapshots: '@panva/hkdf': 1.2.1 cookie: 0.5.0 jose: 4.15.9 - next: 14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) oauth: 0.9.15 openid-client: 5.7.0 preact: 10.19.2 @@ -14263,13 +14270,13 @@ snapshots: react-dom: 18.3.1(react@18.3.1) uuid: 8.3.2 - next-auth@4.24.7(next@14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-auth@4.24.7(next@14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 '@panva/hkdf': 1.2.1 cookie: 0.5.0 jose: 4.15.9 - next: 14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) oauth: 0.9.15 openid-client: 5.7.0 preact: 10.19.2 @@ -14278,7 +14285,7 @@ snapshots: react-dom: 18.3.1(react@18.3.1) uuid: 8.3.2 - next@14.2.9(@babel/core@7.23.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@14.2.9(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.9 '@swc/helpers': 0.5.5 @@ -14288,7 +14295,7 @@ snapshots: postcss: 8.4.31 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(@babel/core@7.23.5)(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.25.2)(react@18.3.1) optionalDependencies: '@next/swc-darwin-arm64': 14.2.9 '@next/swc-darwin-x64': 14.2.9 @@ -15993,12 +16000,12 @@ snapshots: dependencies: inline-style-parser: 0.2.3 - styled-jsx@5.1.1(@babel/core@7.23.5)(react@18.3.1): + styled-jsx@5.1.1(@babel/core@7.25.2)(react@18.3.1): dependencies: client-only: 0.0.1 react: 18.3.1 optionalDependencies: - '@babel/core': 7.23.5 + '@babel/core': 7.25.2 stylehacks@6.1.1(postcss@8.4.32): dependencies: @@ -16184,7 +16191,7 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.1.1(@babel/core@7.23.5)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.5))(jest@29.7.0(@types/node@18.14.2)(ts-node@10.9.2(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@18.14.2)(typescript@5.3.2)))(typescript@5.3.2): + ts-jest@29.1.1(@babel/core@7.25.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@18.14.2)(ts-node@10.9.2(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@18.14.2)(typescript@5.3.2)))(typescript@5.3.2): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 @@ -16197,9 +16204,9 @@ snapshots: typescript: 5.3.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.23.5 + '@babel/core': 7.25.2 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.23.5) + babel-jest: 29.7.0(@babel/core@7.25.2) ts-jest@29.1.1(@babel/core@7.25.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@20.16.5)(typescript@5.3.2)))(typescript@5.3.2): dependencies: @@ -16810,20 +16817,20 @@ snapshots: yocto-queue@1.0.0: {} - zod-openapi@https://codeload.github.com/stainless-api/zod-openapi/tar.gz/550978836406882613e9547b2e9486fa7448a37b(zod@3.25.76): + zod-openapi@5.4.6(zod@4.3.6): dependencies: - zod: 3.25.76 + zod: 4.3.6 - zod-to-ts@1.2.0(typescript@5.3.2)(zod@3.25.76): + zod-to-ts@2.0.0(typescript@5.3.2)(zod@4.3.6): dependencies: typescript: 5.3.2 - zod: 3.25.76 + zod: 4.3.6 - zod-validation-error@4.0.1(zod@3.25.76): + zod-validation-error@4.0.1(zod@4.3.6): dependencies: - zod: 3.25.76 + zod: 4.3.6 - zod@3.25.76: {} + zod@4.3.6: {} zustand@4.4.7(@types/react@18.0.28)(immer@9.0.21)(react@18.3.1): dependencies: