/opt/canhelp/node_modules/zod/v4/core
NameSizeModeActions
api.cjs264650644editdlrm
api.d.cts294450644editdlrm
api.d.ts294400644editdlrm
api.js229830644editdlrm
checks.cjs210980644editdlrm
checks.d.cts127820644editdlrm
checks.d.ts127780644editdlrm
checks.js195440644editdlrm
core.cjs23090644editdlrm
core.d.cts18110644editdlrm
core.d.ts18080644editdlrm
core.js20850644editdlrm
doc.cjs11990644editdlrm
doc.d.cts3530644editdlrm
doc.d.ts3530644editdlrm
doc.js10880644editdlrm
errors.cjs76500644editdlrm
errors.d.cts78930644editdlrm
errors.d.ts78890644editdlrm
errors.js63160644editdlrm
function.cjs40120644editdlrm
function.d.cts35970644editdlrm
function.d.ts35930644editdlrm
function.js27170644editdlrm
index.cjs21630644editdlrm
index.d.cts5140644editdlrm
index.d.ts4990644editdlrm
index.js4990644editdlrm
json-schema.cjs770644editdlrm
json-schema.d.cts26760644editdlrm
json-schema.d.ts26760644editdlrm
json-schema.js110644editdlrm
parse.cjs39570644editdlrm
parse.d.cts15050644editdlrm
parse.d.ts15010644editdlrm
parse.js25520644editdlrm
regexes.cjs70620644editdlrm
regexes.d.cts27620644editdlrm
regexes.d.ts27620644editdlrm
regexes.js64110644editdlrm
registries.cjs16760644editdlrm
registries.d.cts16460644editdlrm
registries.d.ts16440644editdlrm
registries.js14850644editdlrm
schemas.cjs648430644editdlrm
schemas.d.cts446980644editdlrm
schemas.d.ts446910644editdlrm
schemas.js626520644editdlrm
standard-schema.cjs770644editdlrm
standard-schema.d.cts24030644editdlrm
standard-schema.d.ts24030644editdlrm
standard-schema.js110644editdlrm
to-json-schema.cjs359100644editdlrm
to-json-schema.d.cts37290644editdlrm
to-json-schema.d.ts37260644editdlrm
to-json-schema.js356870644editdlrm
util.cjs164380644editdlrm
util.d.cts107500644editdlrm
util.d.ts107460644editdlrm
util.js150040644editdlrm
versions.cjs1680644editdlrm
versions.d.cts1090644editdlrm
versions.d.ts1090644editdlrm
versions.js700644editdlrm
Edit: /opt/canhelp/node_modules/zod/v4/core/to-json-schema.d.ts (3726B)
import type * as JSONSchema from "./json-schema.js"; import { $ZodRegistry } from "./registries.js"; import type * as schemas from "./schemas.js"; interface JSONSchemaGeneratorParams { /** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def. * @default globalRegistry */ metadata?: $ZodRegistry>; /** The JSON Schema version to target. * - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12 * - `"draft-7"` — JSON Schema Draft 7 */ target?: "draft-7" | "draft-2020-12"; /** How to handle unrepresentable types. * - `"throw"` — Default. Unrepresentable types throw an error * - `"any"` — Unrepresentable types become `{}` */ unrepresentable?: "throw" | "any"; /** Arbitrary custom logic that can be used to modify the generated JSON Schema. */ override?: (ctx: { zodSchema: schemas.$ZodTypes; jsonSchema: JSONSchema.BaseSchema; path: (string | number)[]; }) => void; /** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, Error converting schema to JSONz, defaults, coerced primitives, etc. * - `"output"` — Default. Convert the output schema. * - `"input"` — Convert the input schema. */ io?: "input" | "output"; } interface ProcessParams { schemaPath: schemas.$ZodType[]; path: (string | number)[]; } interface EmitParams { /** How to handle cycles. * - `"ref"` — Default. Cycles will be broken using $defs * - `"throw"` — Cycles will throw an error if encountered */ cycles?: "ref" | "throw"; reused?: "ref" | "inline"; external?: { /** */ registry: $ZodRegistry<{ id?: string | undefined; }>; uri?: ((id: string) => string) | undefined; defs: Record; } | undefined; } interface Seen { /** JSON Schema result for this Zod schema */ schema: JSONSchema.BaseSchema; /** A cached version of the schema that doesn't get overwritten during ref resolution */ def?: JSONSchema.BaseSchema; defId?: string | undefined; /** Number of times this schema was encountered during traversal */ count: number; /** Cycle path */ cycle?: (string | number)[] | undefined; isParent?: boolean | undefined; ref?: schemas.$ZodType | undefined | null; /** JSON Schema property path for this schema */ path?: (string | number)[] | undefined; } export declare class JSONSchemaGenerator { metadataRegistry: $ZodRegistry>; target: "draft-7" | "draft-2020-12"; unrepresentable: "throw" | "any"; override: (ctx: { zodSchema: schemas.$ZodTypes; jsonSchema: JSONSchema.BaseSchema; path: (string | number)[]; }) => void; io: "input" | "output"; counter: number; seen: Map; constructor(params?: JSONSchemaGeneratorParams); process(schema: schemas.$ZodType, _params?: ProcessParams): JSONSchema.BaseSchema; emit(schema: schemas.$ZodType, _params?: EmitParams): JSONSchema.BaseSchema; } interface ToJSONSchemaParams extends Omit { } interface RegistryToJSONSchemaParams extends Omit { uri?: (id: string) => string; } export declare function toJSONSchema(schema: schemas.$ZodType, _params?: ToJSONSchemaParams): JSONSchema.BaseSchema; export declare function toJSONSchema(registry: $ZodRegistry<{ id?: string | undefined; }>, _params?: RegistryToJSONSchemaParams): { schemas: Record; }; export {};