type _JSONSchema = boolean | JSONSchema; type SchemaType = "object" | "array" | "string" | "number" | "boolean" | "null" | "integer"; type JSONSchema = { [k: string]: unknown; $schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#"; $id?: string; $anchor?: string; $ref?: string; $dynamicRef?: string; $dynamicAnchor?: string; $vocabulary?: Record; $comment?: string; $defs?: Record; type?: SchemaType | SchemaType[]; additionalItems?: _JSONSchema; unevaluatedItems?: _JSONSchema; prefixItems?: _JSONSchema[]; items?: _JSONSchema | _JSONSchema[]; contains?: _JSONSchema; additionalProperties?: _JSONSchema; unevaluatedProperties?: _JSONSchema; properties?: Record; patternProperties?: Record; dependentSchemas?: Record; propertyNames?: _JSONSchema; if?: _JSONSchema; then?: _JSONSchema; else?: _JSONSchema; allOf?: JSONSchema[]; anyOf?: JSONSchema[]; oneOf?: JSONSchema[]; not?: _JSONSchema; multipleOf?: number; maximum?: number; exclusiveMaximum?: number | boolean; minimum?: number; exclusiveMinimum?: number | boolean; maxLength?: number; minLength?: number; pattern?: string; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxContains?: number; minContains?: number; maxProperties?: number; minProperties?: number; required?: string[]; dependentRequired?: Record; enum?: Array; const?: string | number | boolean | null; id?: string; title?: string; description?: string; default?: unknown; deprecated?: boolean; readOnly?: boolean; writeOnly?: boolean; nullable?: boolean; examples?: unknown[]; format?: string; contentMediaType?: string; contentEncoding?: string; contentSchema?: JSONSchema; _prefault?: unknown; }; type BaseSchema = JSONSchema; /** The Standard interface. */ interface StandardTypedV1 { /** The Standard properties. */ readonly "~standard": StandardTypedV1.Props; } declare namespace StandardTypedV1 { /** The Standard properties interface. */ interface Props { /** The version number of the standard. */ readonly version: 1; /** The vendor name of the schema library. */ readonly vendor: string; /** Inferred types associated with the schema. */ readonly types?: Types | undefined; } /** The Standard types interface. */ interface Types { /** The input type of the schema. */ readonly input: Input; /** The output type of the schema. */ readonly output: Output; } /** Infers the input type of a Standard. */ type InferInput = NonNullable["input"]; /** Infers the output type of a Standard. */ type InferOutput = NonNullable["output"]; } /** The Standard Schema interface. */ interface StandardSchemaV1 { /** The Standard Schema properties. */ readonly "~standard": StandardSchemaV1.Props; } declare namespace StandardSchemaV1 { /** The Standard Schema properties interface. */ interface Props extends StandardTypedV1.Props { /** Validates unknown input values. */ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result | Promise>; } /** The result interface of the validate function. */ type Result = SuccessResult | FailureResult; /** The result interface if validation succeeds. */ interface SuccessResult { /** The typed output value. */ readonly value: Output; /** The absence of issues indicates success. */ readonly issues?: undefined; } interface Options { /** Implicit support for additional vendor-specific parameters, if needed. */ readonly libraryOptions?: Record | undefined; } /** The result interface if validation fails. */ interface FailureResult { /** The issues of failed validation. */ readonly issues: ReadonlyArray; } /** The issue interface of the failure output. */ interface Issue { /** The error message of the issue. */ readonly message: string; /** The path of the issue, if any. */ readonly path?: ReadonlyArray | undefined; } /** The path segment interface of the issue. */ interface PathSegment { /** The key representing a path segment. */ readonly key: PropertyKey; } /** The Standard types interface. */ interface Types extends StandardTypedV1.Types {} /** Infers the input type of a Standard. */ type InferInput = StandardTypedV1.InferInput; /** Infers the output type of a Standard. */ type InferOutput = StandardTypedV1.InferOutput; } declare const $output: unique symbol; type $output = typeof $output; declare const $input: unique symbol; type $input = typeof $input; type $replace = Meta extends $output ? output : Meta extends $input ? input$1 : Meta extends (infer M)[] ? $replace[] : Meta extends ((...args: infer P) => infer R) ? (...args: { [K in keyof P]: $replace; }) => $replace : Meta extends object ? { [K in keyof Meta]: $replace; } : Meta; type MetadataType = object | undefined; declare class $ZodRegistry { _meta: Meta; _schema: Schema; _map: WeakMap>; _idmap: Map; add(schema: S, ..._meta: undefined extends Meta ? [$replace?] : [$replace]): this; clear(): this; remove(schema: Schema): this; get(schema: S): $replace | undefined; has(schema: Schema): boolean; } interface JSONSchemaMeta { id?: string | undefined; title?: string | undefined; description?: string | undefined; deprecated?: boolean | undefined; [k: string]: unknown; } interface GlobalMeta extends JSONSchemaMeta {} declare function registry(): $ZodRegistry; declare const globalRegistry: $ZodRegistry; type Processor = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void; /** * Called for each schema that has no JSON Schema equivalent. Return a JSON Schema to use in its * place, `"any"` to fall back to the `unrepresentable: "any"` behavior, or `"throw"`/`undefined` to * throw the default error. Throwing from the handler propagates, so custom errors work too. */ type UnrepresentableHandler = (ctx: { zodSchema: T; path: (string | number)[]; /** The error Zod would throw. Distinguishes sites that share a `zodSchema`, e.g. an `undefined` * vs a `bigint` member of the same literal. */ message: string; }) => BaseSchema | "throw" | "any" | undefined; interface ProcessParams { schemaPath: $ZodType[]; path: (string | number)[]; } interface Seen { /** JSON Schema result for this Zod schema */ schema: BaseSchema; /** A cached version of the schema that doesn't get overwritten during ref resolution */ def?: BaseSchema; defId?: string | undefined; /** Number of times this schema was encountered during traversal */ count: number; /** Cycle path */ cycle?: (string | number)[] | undefined; isParent?: boolean | undefined; /** Schema to inherit JSON Schema properties from (set by processor for wrappers) */ ref?: $ZodType | null; /** JSON Schema property path for this schema */ path?: (string | number)[] | undefined; } interface ToJSONSchemaContext { processors: Record; metadataRegistry: $ZodRegistry>; target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string); unrepresentable: "throw" | "any" | UnrepresentableHandler; override: (ctx: { zodSchema: $ZodType; jsonSchema: BaseSchema; path: (string | number)[]; }) => void; io: "input" | "output"; counter: number; seen: Map<$ZodType, Seen>; /** Registry conversions share one `seen` map across every emitted schema. These hold the * `external` the whole-map passes below last ran for, so the passes are not repeated once per * schema — and still re-run if the map grows or `external` is swapped. `sharedEmitDoneFor` * covers both passes in `finalize`: the ref flattening and the `$defs` build. * * The passes are valid only while nothing they read has changed, so both are cleared in * `process()` when the map grows, and in `JSONSchemaGenerator.emit()`, which can also change * the `cycles` and `reused` they branch on. * * One case is deliberately not covered: an `override` callback that writes to * `metadataRegistry` mid-conversion. It runs inside `finalize`, so a registry conversion has * nowhere left to clear the guards, and later schemas keep the ids the first pass saw. That * output was never coherent — before this, whether a shared subschema was inlined or extracted * depended on which registry entry happened to be emitted when the callback fired. */ sharedDefsExtractedFor?: ToJSONSchemaContext["external"]; sharedEmitDoneFor?: ToJSONSchemaContext["external"]; cycles: "ref" | "throw"; reused: "ref" | "inline"; /** The `allOf` array of each intersection encountered during traversal, innermost first. `finalize` folds every emitted object holding one; see `foldIntersection`. */ intersections: BaseSchema[][]; /** Rewrites a processor deferred to `finalize`, where the flatten has resolved every ref and the union branches are in place. */ deferred: (() => void)[]; external?: { registry: $ZodRegistry<{ id?: string | undefined; }>; uri?: ((id: string) => string) | undefined; defs: Record; } | undefined; } declare namespace util_d_exports { export { AnyFunc, AssertEqual, AssertExtends, AssertNotEqual, BIGINT_FORMAT_RANGES, BuiltIn, CONSTANT_CATCH, Class$1 as Class, CleanKey, Constructor, EmptyObject, EmptyToNever, EnumLike, EnumValue, Exactly, Extend, ExtractIndexSignature, Flatten, FromCleanMap, HasLength, HasSize, HashAlgorithm, HashEncoding, HashFormat, IPVersion, Identity, InexactPartial, IsAny, IsProp, JSONType, JWTAlgorithm, KeyOf, Keys, KeysArray, KeysEnum, Literal, LiteralArray, LoosePartial, MakePartial, MakeReadonly, MakeRequired, Mapped, Mask, MaybeAsync, MimeTypes, NUMBER_FORMAT_RANGES, NoNever, NoNeverKeys, NoUndefined, Normalize, Numeric, Omit$1 as Omit, OmitIndexSignature, OmitKeys, ParsedTypes, Prettify, Primitive, PrimitiveArray, PrimitiveSet, PropValues, ProtoOf, SafeParseError, SafeParseResult, SafeParseSuccess, SchemaClass, SomeObject, ToCleanMap, ToEnum, TupleItems, Whatever, Writeable, aborted, allowsEval, assert, assertEqual, assertIs, assertNever, assertNotEqual, assignProp, attachSchema, base64ToUint8Array, base64urlToUint8Array, cached, captureStackTrace, cleanEnum, cleanRegex, clone, cloneDef, codePointLength, constantCatch, createTransparentProxy, defineLazy, defineLazyInternal, esc, escapeRegex, explicitlyAborted, extend$1 as extend, finalizeIssue, floatSafeRemainder, getElementAtPath, getEnumValues, getLengthableOrigin, getParsedType, getSizableOrigin, hexToUint8Array, hide, installLazyProp, isObject, isPlainObject, issue, joinValues, jsonStringifyReplacer, members, merge$1 as merge, mergeDefs, normalizeParams, nullish$1 as nullish, numKeys, objectClone, omit$1 as omit, optionalKeys, own, parsedType, partial$1 as partial, pick$1 as pick, prefixIssues, primitiveTypes, promiseAllObject, propertyKeyTypes, randomString, required$1 as required, safeExtend$1 as safeExtend, shallowClone, slugify, stringifyPrimitive, toZod, uint8ArrayToBase64, uint8ArrayToBase64url, uint8ArrayToHex, unwrapMessage }; } type JSONType = string | number | boolean | null | JSONType[] | { [key: string]: JSONType; }; type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {}); type HashAlgorithm = "md5" | "sha1" | "sha256" | "sha384" | "sha512"; type HashEncoding = "hex" | "base64" | "base64url"; type HashFormat = `${HashAlgorithm}_${HashEncoding}`; type IPVersion = "v4" | "v6"; type MimeTypes = "application/json" | "application/xml" | "application/x-www-form-urlencoded" | "application/javascript" | "application/pdf" | "application/zip" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/octet-stream" | "application/graphql" | "text/html" | "text/plain" | "text/css" | "text/javascript" | "text/csv" | "image/png" | "image/jpeg" | "image/gif" | "image/svg+xml" | "image/webp" | "audio/mpeg" | "audio/ogg" | "audio/wav" | "audio/webm" | "video/mp4" | "video/webm" | "video/ogg" | "font/woff" | "font/woff2" | "font/ttf" | "font/otf" | "multipart/form-data" | (string & {}); type ParsedTypes = "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "file" | "date" | "array" | "map" | "set" | "nan" | "null" | "promise"; type AssertEqual = (() => V extends T ? 1 : 2) extends (() => V extends U ? 1 : 2) ? true : false; type AssertNotEqual = (() => V extends T ? 1 : 2) extends (() => V extends U ? 1 : 2) ? false : true; type AssertExtends = T extends U ? T : never; type ToZodMismatch = { "types do not match": { expected: T; received: S["_zod"]["output"]; }; }; type ToZodKeyMismatch = $ZodType & { "types do not match": { expected: Expected; received: Received; }; }; type ToZodShape = { [K in keyof Shape]: Shape[K] extends $ZodType ? K extends keyof T ? AssertEqual extends true ? Shape[K] : ToZodKeyMismatch : ToZodKeyMismatch : Shape[K]; } & { [K in Exclude]: ToZodKeyMismatch; }; type ToZodExpand = { [K in keyof X]: X[K]; } & {}; type ToZodTarget = S extends $ZodObject ? T extends object ? AssertEqual>, ToZodExpand> extends true ? S & ToZodMismatch : $ZodObject>, Config> : S & ToZodMismatch : S & ToZodMismatch; type IsAny = 0 extends 1 & T ? true : false; type Omit$1 = Pick>; type OmitKeys = Pick>; type MakePartial = Omit$1 & InexactPartial>; type MakeRequired = Omit$1 & Required>; type Exactly = T & Record, never>; type NoUndefined = T extends undefined ? never : T; type Whatever = {} | undefined | null; type LoosePartial = InexactPartial & { [k: string]: unknown; }; type Mask = { [K in Keys]?: true; }; type Writeable = { -readonly [P in keyof T]: T[P]; } & {}; type InexactPartial = { [P in keyof T]?: T[P] | undefined; }; type EmptyObject = Record; type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | { readonly [Symbol.toStringTag]: string; } | Date | Error | Generator | Promise | RegExp; type MakeReadonly = T extends Map ? ReadonlyMap : T extends Set ? ReadonlySet : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array ? ReadonlyArray : T extends BuiltIn ? T : Readonly; type SomeObject = Record; type Identity = T; type Flatten = Identity<{ [k in keyof T]: T[k]; }>; type Mapped = { [k in keyof T]: T[k]; }; type Prettify = { [K in keyof T]: T[K]; } & {}; type NoNeverKeys = { [k in keyof T]: [T[k]] extends [never] ? never : k; }[keyof T]; type NoNever = Identity<{ [k in NoNeverKeys]: k extends keyof T ? T[k] : never; }>; type Extend = Flatten; type TupleItems = ReadonlyArray; type AnyFunc = (...args: any[]) => any; type IsProp = T[K] extends AnyFunc ? never : K; type MaybeAsync = T | Promise; type KeyOf = keyof OmitIndexSignature; type OmitIndexSignature = { [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K]; }; type ExtractIndexSignature = { [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K]; }; type Keys = keyof OmitIndexSignature; type SchemaClass = { new (def: T["_zod"]["def"]): T; }; type EnumValue = string | number; type EnumLike = Readonly>; type ToEnum = Flatten<{ [k in T]: k; }>; type KeysEnum = ToEnum>; type KeysArray = Flatten<(keyof T & string)[]>; type Literal = string | number | bigint | boolean | null | undefined; type LiteralArray = Array; type Primitive = string | number | symbol | bigint | boolean | null | undefined; type PrimitiveArray = Array; type HasSize = { size: number; }; type HasLength = { length: number; }; type Numeric = number | bigint | Date; type SafeParseResult = SafeParseSuccess | SafeParseError; type SafeParseSuccess = { success: true; data: T; error?: never; }; type SafeParseError = { success: false; data?: never; error: $ZodError; }; type PropValues = Record>; type PrimitiveSet = Set; declare function assertEqual(val: AssertEqual): AssertEqual; declare function assertNotEqual(val: AssertNotEqual): AssertNotEqual; declare function toZod(): (schema: AssertEqual extends true ? S : ToZodTarget) => S; declare function assertIs(_arg: T): void; declare function assertNever(_x: never): never; declare function assert(_: any): asserts _ is T; declare function getEnumValues(entries: EnumLike): EnumValue[]; declare function joinValues(array: T, separator?: string): string; declare function jsonStringifyReplacer(_: string, value: any): any; declare function cached(getter: () => T): { value: T; }; declare function nullish$1(input: any): boolean; declare function cleanRegex(source: string): string; declare function floatSafeRemainder(val: number, step: number): number; declare function defineLazy(object: T, key: K, getter: () => T[K]): void; declare function objectClone(obj: object): any; declare function assignProp(target: T, prop: K, value: K extends keyof T ? T[K] : any): void; declare function mergeDefs(...defs: Record[]): any; declare function cloneDef(schema: $ZodType): any; declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any; declare function promiseAllObject(promisesObj: T): Promise<{ [k in keyof T]: Awaited; }>; declare function randomString(length?: number): string; declare function esc(str: string): string; declare function slugify(input: string): string; declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void; declare function isObject(data: any): data is Record; declare const allowsEval: { value: boolean; }; declare function isPlainObject(o: any): o is Record; declare function shallowClone(o: any): any; declare function numKeys(data: any): number; declare const getParsedType: (data: any) => ParsedTypes; declare const propertyKeyTypes: Set; declare const primitiveTypes: Set; declare function escapeRegex(str: string): string; declare function clone(inst: T, def?: T["_zod"]["def"], params?: { parent: boolean; }): T; type EmptyToNever = keyof T extends never ? never : T; type Normalize = T extends undefined ? never : T extends Record ? Flatten<{ [k in keyof Omit$1]: T[k]; } & ("error" extends keyof T ? { error?: Exclude; } : unknown)> : never; declare function normalizeParams(_params: T): Normalize; declare function createTransparentProxy(getter: () => T): T; declare function stringifyPrimitive(value: any): string; declare function optionalKeys(shape: $ZodShape): string[]; type CleanKey = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T; type ToCleanMap = { [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k; }; type FromCleanMap = { [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k; }; declare const NUMBER_FORMAT_RANGES: Record<$ZodNumberFormats, [number, number]>; declare const BIGINT_FORMAT_RANGES: Record<$ZodBigIntFormats, [bigint, bigint]>; declare function pick$1(schema: $ZodObject, mask: Record): any; declare function omit$1(schema: $ZodObject, mask: object): any; declare function extend$1(schema: $ZodObject, shape: $ZodShape): any; declare function safeExtend$1(schema: $ZodObject, shape: $ZodShape): any; declare function merge$1(a: $ZodObject, b: $ZodObject): any; declare function partial$1(Class: SchemaClass<$ZodOptional> | null, schema: $ZodObject, mask: object | undefined, name?: string): any; declare function required$1(Class: SchemaClass<$ZodNonOptional>, schema: $ZodObject, mask: object | undefined): any; type Constructor = new (...args: Def) => T; declare function aborted(x: ParsePayload, startIndex?: number): boolean; declare function explicitlyAborted(x: ParsePayload, startIndex?: number): boolean; declare function prefixIssues(path: PropertyKey, issues: $ZodRawIssue[]): $ZodRawIssue[]; declare function unwrapMessage(message: string | { message: string; } | undefined | null): string | undefined; declare function attachSchema(issues: $ZodRawIssue[], start: number, inst: $ZodType): void; declare function finalizeIssue(iss: $ZodRawIssue, ctx: ParseContextInternal | undefined, config: $ZodConfig): $ZodIssue; declare function getSizableOrigin(input: any): "set" | "map" | "file" | "unknown"; declare function codePointLength(str: string): number; declare function getLengthableOrigin(input: any): "array" | "string" | "unknown"; declare function parsedType(data: unknown): $ZodInvalidTypeExpected; declare function issue(_iss: string, input: any, inst: any): $ZodRawIssue; declare function issue(_iss: $ZodRawIssue): $ZodRawIssue; declare function cleanEnum(obj: Record): EnumValue[]; declare function base64ToUint8Array(base64: string): InstanceType; declare function uint8ArrayToBase64(bytes: Uint8Array): string; declare function base64urlToUint8Array(base64url: string): InstanceType; declare function uint8ArrayToBase64url(bytes: Uint8Array): string; declare function hexToUint8Array(hex: string): InstanceType; declare function uint8ArrayToHex(bytes: Uint8Array): string; declare abstract class Class$1 { constructor(..._args: any[]); } /** * Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working. * * Call this from a `proto` initializer, which runs once per prototype — never per instance. */ declare function members(proto: object, table: object): void; /** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */ declare function own(inst: object, key: string, value: T, enumerable?: boolean): T; /** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */ declare function hide(inst: object, key: string, value: T): T; /** A trait's prototype members: a partial view of its own interface, with `this` typed as the instance. */ type ProtoOf = { [K in keyof T]?: (T[K] extends ((...args: infer A) => infer R) ? (...args: A) => R : T[K]) | undefined; } & ThisType; /** * Installs a lazily-derived internal on the `_zod` prototype of `inst`'s * constructor, computed from the internals object itself and cached there on * first read. One accessor per constructor rather than one per instance. */ declare function defineLazyInternal(inst: T, key: string, compute: (zod: T["_zod"]) => unknown): void; /** * Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own * data property. One accessor per constructor rather than one per instance, because an own accessor * puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel. */ declare function installLazyProp(inst: object, key: string, make: (self: any) => unknown, enumerable: boolean): void; /** Marks the thunk `_catch` synthesises for a constant catch value. `Function.length` cannot tell that thunk from a user callback — rest and defaulted parameters both report arity 0 — and a user callback reads `ctx.error`, whose issues only finalize correctly against the caller's per-parse error map. Provenance can say what arity cannot. A plain string key rather than `Symbol.for`, whose call at module scope no bundler can prove pure — the same shape that anchored `urlCanParse` into every build. */ declare const CONSTANT_CATCH = "~constantCatch"; /** Wraps a constant catch value in a thunk tagged with {@link CONSTANT_CATCH}. */ declare function constantCatch(value: T): () => T; declare const version: { readonly major: 4; readonly minor: 5; readonly patch: number; }; interface ParseContext { /** Customize error messages. */ readonly error?: $ZodErrorMap; /** Include the `input` field in issue objects. Default `false`. */ readonly reportInput?: boolean; /** Skip eval-based fast path. Default `false`. */ readonly jitless?: boolean; } /** @internal */ interface ParseContextInternal extends ParseContext { readonly async?: boolean | undefined; readonly direction?: "forward" | "backward"; readonly skipChecks?: boolean; } /** Gives a container cycle support: `attach` wraps its parse, and `alloc` registers the object it builds into before any child is parsed so a reference back to the same input resolves to it. */ interface $ZodMemoizer { attach(inst: $ZodType): void; guard(inst: $ZodType): void; alloc(inst: $ZodType, payload: ParsePayload, empty: T, ctx: ParseContextInternal): T; } interface ParsePayload { value: T; issues: $ZodRawIssue[]; /** A way to mark a whole payload as aborted. Used in codecs/pipes. */ aborted?: boolean; /** @internal Set when the value came from a repeat visit to a node still being * parsed. Its checks run on the node itself, against the finished value. */ memo?: boolean | undefined; } type CheckFn = (input: ParsePayload) => MaybeAsync; interface $ZodTypeDef { type: "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "null" | "undefined" | "void" | "never" | "any" | "unknown" | "date" | "object" | "record" | "file" | "array" | "tuple" | "union" | "intersection" | "map" | "set" | "enum" | "literal" | "nullable" | "optional" | "nonoptional" | "success" | "transform" | "default" | "prefault" | "catch" | "nan" | "pipe" | "readonly" | "template_literal" | "promise" | "lazy" | "function" | "custom"; error?: $ZodErrorMap | undefined; checks?: $ZodCheck[]; } interface _$ZodTypeInternals { /** The `@zod/core` version of this schema */ version: typeof version; /** Schema definition. */ def: $ZodTypeDef; /** @internal Randomly generated ID for this schema. */ /** @internal List of deferred initializers. */ deferred: AnyFunc[] | undefined; /** @internal Parses input and runs all checks (refinements). */ run(payload: ParsePayload, ctx: ParseContextInternal): MaybeAsync; /** @internal Parses input, doesn't run checks. */ parse(payload: ParsePayload, ctx: ParseContextInternal): MaybeAsync; /** @internal Stores identifiers for the set of traits implemented by this schema. */ traits: Set; /** @internal Indicates that a schema output type should be considered optional inside objects. * @default Required */ /** @internal Three rungs, each strictly stronger than the last: * undefined — required; the container may not omit this slot * "optional" — the container may omit it; nothing is supplied in its place * "defaulted" — the container may omit it AND this schema substitutes a value * Consumers asking "may the slot be absent?" test `!== undefined`. * $ZodOptional asks the stronger question and tests `=== "defaulted"`. */ optin?: "optional" | "defaulted" | undefined; /** @internal */ optout?: "optional" | undefined; /** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record(). * * Defined on: enum, const, literal, null, undefined * Passthrough: optional, nullable, branded, default, catch, pipe * Todo: unions? */ values?: PrimitiveSet | undefined; /** Default value bubbled up from */ /** @internal A set of literal discriminators used for the fast path in discriminated unions. */ propValues?: PropValues | undefined; /** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */ pattern: RegExp | undefined; /** @internal The constructor function of this schema. */ constr: new (def: any) => $ZodType; /** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */ bag: Record; /** @internal The set of issues this schema might throw during type checking. */ isst: $ZodIssueBase; /** @internal Subject to change, not a public API. */ processJSONSchema?: ((ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void) | undefined; /** An optional method used to override `toJSONSchema` logic. */ toJSONSchema?: () => unknown; /** @internal The parent of this schema. Only set during certain clone operations. */ parent?: $ZodType | undefined; } /** @internal */ interface $ZodTypeInternals extends _$ZodTypeInternals { /** @internal The inferred output type */ output: O; /** @internal The inferred input type */ input: I; } type $ZodStandardSchema = StandardSchemaV1.Props, output>; type SomeType$1 = { _zod: _$ZodTypeInternals; }; interface $ZodType = $ZodTypeInternals> { _zod: Internals; "~standard": $ZodStandardSchema; } interface _$ZodType extends $ZodType {} declare const $ZodType: $constructor<$ZodType>; interface $ZodStringDef extends $ZodTypeDef { type: "string"; coerce?: boolean; checks?: $ZodCheck[]; } interface $ZodStringInternals extends $ZodTypeInternals { def: $ZodStringDef; /** @deprecated Internal API, use with caution (not deprecated) */ pattern: RegExp; /** @deprecated Internal API, use with caution (not deprecated) */ isst: $ZodIssueInvalidType; bag: LoosePartial<{ minimum: number; maximum: number; patterns: Set; format: string; contentEncoding: string; /** the pattern admits strings its `format` keyword forbids, so `toJSONSchema` must not emit it */ laxFormat: boolean; }>; } interface $ZodString extends _$ZodType<$ZodStringInternals> {} declare const $ZodString: $constructor<$ZodString>; interface $ZodStringFormatDef extends $ZodStringDef, $ZodCheckStringFormatDef {} interface $ZodStringFormatInternals extends $ZodStringInternals, $ZodCheckStringFormatInternals { def: $ZodStringFormatDef; } interface $ZodStringFormat extends $ZodType { _zod: $ZodStringFormatInternals; } declare const $ZodStringFormat: $constructor<$ZodStringFormat>; interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {} interface $ZodGUID extends $ZodType { _zod: $ZodGUIDInternals; } declare const $ZodGUID: $constructor<$ZodGUID>; interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> { version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"; } interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> { def: $ZodUUIDDef; } interface $ZodUUID extends $ZodType { _zod: $ZodUUIDInternals; } declare const $ZodUUID: $constructor<$ZodUUID>; interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {} interface $ZodEmail extends $ZodType { _zod: $ZodEmailInternals; } declare const $ZodEmail: $constructor<$ZodEmail>; interface $ZodURLDef extends $ZodStringFormatDef<"url"> { hostname?: RegExp | undefined; protocol?: RegExp | undefined; normalize?: boolean | undefined; } interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> { def: $ZodURLDef; } interface $ZodURL extends $ZodType { _zod: $ZodURLInternals; } declare const $ZodURL: $constructor<$ZodURL>; interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {} interface $ZodEmoji extends $ZodType { _zod: $ZodEmojiInternals; } declare const $ZodEmoji: $constructor<$ZodEmoji>; interface $ZodNanoIDDef extends $ZodStringFormatDef<"nanoid"> { length?: number | undefined; } interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> { def: $ZodNanoIDDef; } interface $ZodNanoID extends $ZodType { _zod: $ZodNanoIDInternals; } declare const $ZodNanoID: $constructor<$ZodNanoID>; /** * @deprecated CUID v1 is deprecated by its authors due to information leakage * (timestamps embedded in the id). Use {@link $ZodCUID2} instead. * See https://github.com/paralleldrive/cuid. */ interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {} /** * @deprecated CUID v1 is deprecated by its authors due to information leakage * (timestamps embedded in the id). Use {@link $ZodCUID2} instead. * See https://github.com/paralleldrive/cuid. */ interface $ZodCUID extends $ZodType { _zod: $ZodCUIDInternals; } /** * @deprecated CUID v1 is deprecated by its authors due to information leakage * (timestamps embedded in the id). Use {@link $ZodCUID2} instead. * See https://github.com/paralleldrive/cuid. */ declare const $ZodCUID: $constructor<$ZodCUID>; interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {} interface $ZodCUID2 extends $ZodType { _zod: $ZodCUID2Internals; } declare const $ZodCUID2: $constructor<$ZodCUID2>; interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {} interface $ZodULID extends $ZodType { _zod: $ZodULIDInternals; } declare const $ZodULID: $constructor<$ZodULID>; interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {} interface $ZodXID extends $ZodType { _zod: $ZodXIDInternals; } declare const $ZodXID: $constructor<$ZodXID>; interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {} interface $ZodKSUID extends $ZodType { _zod: $ZodKSUIDInternals; } declare const $ZodKSUID: $constructor<$ZodKSUID>; interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> { precision: number | null; offset: boolean; local: boolean; } interface $ZodISODateTimeInternals extends $ZodStringFormatInternals { def: $ZodISODateTimeDef; } interface $ZodISODateTime extends $ZodType { _zod: $ZodISODateTimeInternals; } declare const $ZodISODateTime: $constructor<$ZodISODateTime>; interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {} interface $ZodISODate extends $ZodType { _zod: $ZodISODateInternals; } declare const $ZodISODate: $constructor<$ZodISODate>; interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> { precision?: number | null; } interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> { def: $ZodISOTimeDef; } interface $ZodISOTime extends $ZodType { _zod: $ZodISOTimeInternals; } declare const $ZodISOTime: $constructor<$ZodISOTime>; interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {} interface $ZodISODuration extends $ZodType { _zod: $ZodISODurationInternals; } declare const $ZodISODuration: $constructor<$ZodISODuration>; interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> { version?: "v4"; } interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> { def: $ZodIPv4Def; } interface $ZodIPv4 extends $ZodType { _zod: $ZodIPv4Internals; } declare const $ZodIPv4: $constructor<$ZodIPv4>; interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> { version?: "v6"; } interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> { def: $ZodIPv6Def; } interface $ZodIPv6 extends $ZodType { _zod: $ZodIPv6Internals; } declare const $ZodIPv6: $constructor<$ZodIPv6>; interface $ZodMACDef extends $ZodStringFormatDef<"mac"> { delimiter?: string; } interface $ZodMACInternals extends $ZodStringFormatInternals<"mac"> { def: $ZodMACDef; } interface $ZodMAC extends $ZodType { _zod: $ZodMACInternals; } declare const $ZodMAC: $constructor<$ZodMAC>; interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> { version?: "v4"; } interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> { def: $ZodCIDRv4Def; } interface $ZodCIDRv4 extends $ZodType { _zod: $ZodCIDRv4Internals; } declare const $ZodCIDRv4: $constructor<$ZodCIDRv4>; interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> { version?: "v6"; } interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> { def: $ZodCIDRv6Def; } interface $ZodCIDRv6 extends $ZodType { _zod: $ZodCIDRv6Internals; } declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>; interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {} interface $ZodBase64 extends $ZodType { _zod: $ZodBase64Internals; } declare const $ZodBase64: $constructor<$ZodBase64>; interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {} interface $ZodBase64URL extends $ZodType { _zod: $ZodBase64URLInternals; } declare const $ZodBase64URL: $constructor<$ZodBase64URL>; interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {} interface $ZodE164 extends $ZodType { _zod: $ZodE164Internals; } declare const $ZodE164: $constructor<$ZodE164>; interface $ZodCreditCardDef extends $ZodStringFormatDef<"credit_card"> {} interface $ZodCreditCardInternals extends $ZodStringFormatInternals<"credit_card"> { def: $ZodCreditCardDef; } interface $ZodCreditCard extends $ZodType { _zod: $ZodCreditCardInternals; } declare const $ZodCreditCard: $constructor<$ZodCreditCard>; interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> { alg?: JWTAlgorithm | undefined; } interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> { def: $ZodJWTDef; } interface $ZodJWT extends $ZodType { _zod: $ZodJWTInternals; } declare const $ZodJWT: $constructor<$ZodJWT>; interface $ZodCustomStringFormatDef extends $ZodStringFormatDef { fn: (val: string) => unknown; } interface $ZodCustomStringFormatInternals extends $ZodStringFormatInternals { def: $ZodCustomStringFormatDef; } interface $ZodCustomStringFormat extends $ZodStringFormat { _zod: $ZodCustomStringFormatInternals; } declare const $ZodCustomStringFormat: $constructor<$ZodCustomStringFormat>; interface $ZodNumberDef extends $ZodTypeDef { type: "number"; coerce?: boolean; } interface $ZodNumberInternals extends $ZodTypeInternals { def: $ZodNumberDef; /** @deprecated Internal API, use with caution (not deprecated) */ pattern: RegExp; /** @deprecated Internal API, use with caution (not deprecated) */ isst: $ZodIssueInvalidType; bag: LoosePartial<{ minimum: number; maximum: number; exclusiveMinimum: number; exclusiveMaximum: number; format: string; pattern: RegExp; }>; } interface $ZodNumber extends $ZodType { _zod: $ZodNumberInternals; } declare const $ZodNumber: $constructor<$ZodNumber>; interface $ZodNumberFormatDef extends $ZodNumberDef, $ZodCheckNumberFormatDef {} interface $ZodNumberFormatInternals extends $ZodNumberInternals, $ZodCheckNumberFormatInternals { def: $ZodNumberFormatDef; isst: $ZodIssueInvalidType; } interface $ZodNumberFormat extends $ZodType { _zod: $ZodNumberFormatInternals; } declare const $ZodNumberFormat: $constructor<$ZodNumberFormat>; interface $ZodBooleanDef extends $ZodTypeDef { type: "boolean"; coerce?: boolean; checks?: $ZodCheck[]; } interface $ZodBooleanInternals extends $ZodTypeInternals { pattern: RegExp; def: $ZodBooleanDef; isst: $ZodIssueInvalidType; } interface $ZodBoolean extends $ZodType { _zod: $ZodBooleanInternals; } declare const $ZodBoolean: $constructor<$ZodBoolean>; interface $ZodBigIntDef extends $ZodTypeDef { type: "bigint"; coerce?: boolean; } interface $ZodBigIntInternals extends $ZodTypeInternals { pattern: RegExp; /** @internal Internal API, use with caution */ def: $ZodBigIntDef; isst: $ZodIssueInvalidType; bag: LoosePartial<{ minimum: bigint; maximum: bigint; format: string; }>; } interface $ZodBigInt extends $ZodType { _zod: $ZodBigIntInternals; } declare const $ZodBigInt: $constructor<$ZodBigInt>; interface $ZodBigIntFormatDef extends $ZodBigIntDef, $ZodCheckBigIntFormatDef { check: "bigint_format"; } interface $ZodBigIntFormatInternals extends $ZodBigIntInternals, $ZodCheckBigIntFormatInternals { def: $ZodBigIntFormatDef; } interface $ZodBigIntFormat extends $ZodType { _zod: $ZodBigIntFormatInternals; } declare const $ZodBigIntFormat: $constructor<$ZodBigIntFormat>; interface $ZodSymbolDef extends $ZodTypeDef { type: "symbol"; } interface $ZodSymbolInternals extends $ZodTypeInternals { def: $ZodSymbolDef; isst: $ZodIssueInvalidType; } interface $ZodSymbol extends $ZodType { _zod: $ZodSymbolInternals; } declare const $ZodSymbol: $constructor<$ZodSymbol>; interface $ZodUndefinedDef extends $ZodTypeDef { type: "undefined"; } interface $ZodUndefinedInternals extends $ZodTypeInternals { pattern: RegExp; def: $ZodUndefinedDef; values: PrimitiveSet; isst: $ZodIssueInvalidType; } interface $ZodUndefined extends $ZodType { _zod: $ZodUndefinedInternals; } declare const $ZodUndefined: $constructor<$ZodUndefined>; interface $ZodNullDef extends $ZodTypeDef { type: "null"; } interface $ZodNullInternals extends $ZodTypeInternals { pattern: RegExp; def: $ZodNullDef; values: PrimitiveSet; isst: $ZodIssueInvalidType; } interface $ZodNull extends $ZodType { _zod: $ZodNullInternals; } declare const $ZodNull: $constructor<$ZodNull>; interface $ZodAnyDef extends $ZodTypeDef { type: "any"; } interface $ZodAnyInternals extends $ZodTypeInternals { def: $ZodAnyDef; isst: never; } interface $ZodUnknownDef extends $ZodTypeDef { type: "unknown"; } interface $ZodUnknownInternals extends $ZodTypeInternals { def: $ZodUnknownDef; isst: never; } interface $ZodNeverDef extends $ZodTypeDef { type: "never"; } interface $ZodNeverInternals extends $ZodTypeInternals { def: $ZodNeverDef; isst: $ZodIssueInvalidType; } interface $ZodNever extends $ZodType { _zod: $ZodNeverInternals; } declare const $ZodNever: $constructor<$ZodNever>; interface $ZodVoidDef extends $ZodTypeDef { type: "void"; } interface $ZodVoidInternals extends $ZodTypeInternals { def: $ZodVoidDef; isst: $ZodIssueInvalidType; } interface $ZodVoid extends $ZodType { _zod: $ZodVoidInternals; } declare const $ZodVoid: $constructor<$ZodVoid>; interface $ZodDateDef extends $ZodTypeDef { type: "date"; coerce?: boolean; } interface $ZodDateInternals extends $ZodTypeInternals { def: $ZodDateDef; isst: $ZodIssueInvalidType; bag: LoosePartial<{ minimum: Date; maximum: Date; format: string; }>; } interface $ZodDate extends $ZodType { _zod: $ZodDateInternals; } declare const $ZodDate: $constructor<$ZodDate>; interface $ZodArrayDef extends $ZodTypeDef { type: "array"; element: T; } interface $ZodArrayInternals extends _$ZodTypeInternals { def: $ZodArrayDef; isst: $ZodIssueInvalidType; output: output[]; input: input$1[]; } interface $ZodArray extends $ZodType> {} declare const $ZodArray: $constructor<$ZodArray>; type OptionalOutSchema = { _zod: { optout: "optional"; }; }; type OptionalInSchema = { _zod: { optin: "optional" | "defaulted"; }; }; type $InferObjectOutput> = string extends keyof T ? IsAny extends true ? Record : Record> : keyof (T & Extra) extends never ? Record : Prettify<{ -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"]; } & { -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"]; } & Extra>; type $InferObjectInput> = string extends keyof T ? IsAny extends true ? Record : Record> : keyof (T & Extra) extends never ? Record : Prettify<{ -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"]; } & { -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"]; } & Extra>; type $ZodObjectConfig = { out: Record; in: Record; }; type $loose = { out: Record; in: Record; }; type $strict = { out: {}; in: {}; }; type $strip = { out: {}; in: {}; }; type $catchall = { out: { [k: string]: output; }; in: { [k: string]: input$1; }; }; type $ZodShape = Readonly<{ [k: string]: $ZodType; }>; interface $ZodObjectDef extends $ZodTypeDef { type: "object"; shape: Shape; catchall?: $ZodType | undefined; } interface $ZodObjectInternals< /** @ts-ignore Cast variance */ out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals { def: $ZodObjectDef; config: Config; isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys; propValues: PropValues; output: $InferObjectOutput; input: $InferObjectInput; optin?: "optional" | undefined; optout?: "optional" | undefined; } type $ZodLooseShape = Record; interface $ZodObject< /** @ts-ignore Cast variance */ out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType> {} declare const $ZodObject: $constructor<$ZodObject>; type $InferUnionOutput = T extends any ? output : never; type $InferUnionInput = T extends any ? input$1 : never; interface $ZodUnionDef extends $ZodTypeDef { type: "union"; options: Options; inclusive?: boolean; } type IsOptionalIn = T extends OptionalInSchema ? true : false; type IsOptionalOut = T extends OptionalOutSchema ? true : false; interface $ZodUnionInternals extends _$ZodTypeInternals { def: $ZodUnionDef; isst: $ZodIssueInvalidUnion; pattern: T[number]["_zod"]["pattern"]; values: T[number]["_zod"]["values"]; output: $InferUnionOutput; input: $InferUnionInput; optin: IsOptionalIn extends false ? "optional" | "defaulted" | undefined : "optional" | "defaulted"; optout: IsOptionalOut extends false ? "optional" | undefined : "optional"; } interface $ZodUnion extends $ZodType> { _zod: $ZodUnionInternals; } declare const $ZodUnion: $constructor<$ZodUnion>; interface $ZodXorInternals extends $ZodUnionInternals {} interface $ZodXor extends $ZodType> { _zod: $ZodXorInternals; } declare const $ZodXor: $constructor<$ZodXor>; interface $ZodDiscriminatedUnionDef extends $ZodUnionDef { discriminator: Disc; unionFallback?: boolean; } interface $ZodDiscriminatedUnionInternals extends $ZodUnionInternals { def: $ZodDiscriminatedUnionDef; propValues: PropValues; bag: LoosePartial<{ optionsMap: Map; }>; } interface $ZodDiscriminatedUnion extends $ZodType { _zod: $ZodDiscriminatedUnionInternals; } declare const $ZodDiscriminatedUnion: $constructor<$ZodDiscriminatedUnion>; interface $ZodIntersectionDef extends $ZodTypeDef { type: "intersection"; left: Left; right: Right; } interface $ZodIntersectionInternals extends _$ZodTypeInternals { def: $ZodIntersectionDef; isst: never; optin: A["_zod"]["optin"] | B["_zod"]["optin"]; optout: A["_zod"]["optout"] | B["_zod"]["optout"]; output: output & output; input: input$1 & input$1; } interface $ZodTupleDef extends $ZodTypeDef { type: "tuple"; items: T; rest: Rest; } type $InferTupleInputType = [...TupleInputTypeWithOptionals, ...(Rest extends SomeType$1 ? input$1[] : [])]; type TupleInputTypeNoOptionals = { [k in keyof T]: input$1; }; type TupleInputTypeWithOptionals = T extends readonly [...infer Prefix extends SomeType$1[], infer Tail extends SomeType$1] ? Tail["_zod"]["optin"] extends "optional" | "defaulted" ? [...TupleInputTypeWithOptionals, input$1?] : TupleInputTypeNoOptionals : []; type $InferTupleOutputType = [...TupleOutputTypeWithOptionals, ...(Rest extends SomeType$1 ? output[] : [])]; type TupleOutputTypeNoOptionals = { [k in keyof T]: output; }; type TupleOutputTypeWithOptionals = T extends readonly [...infer Prefix extends SomeType$1[], infer Tail extends SomeType$1] ? Tail["_zod"]["optout"] extends "optional" ? [...TupleOutputTypeWithOptionals, output?] : TupleOutputTypeNoOptionals : []; interface $ZodTupleInternals extends _$ZodTypeInternals { def: $ZodTupleDef; isst: $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall; output: $InferTupleOutputType; input: $InferTupleInputType; } interface $ZodTuple extends $ZodType { _zod: $ZodTupleInternals; } declare const $ZodTuple: $constructor<$ZodTuple>; type $ZodRecordKey = $ZodType; interface $ZodRecordDef extends $ZodTypeDef { type: "record"; keyType: Key; valueType: Value; /** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */ mode?: "strict" | "loose"; partial?: boolean; } type $InferZodRecordOutput = Key extends $partial ? Partial, output>> : Record, output>; type $InferZodRecordInput = Key extends $partial ? Partial & PropertyKey, input$1>> : [Value] extends [OptionalInSchema] ? Partial & PropertyKey, input$1>> : Record & PropertyKey, input$1>; interface $ZodRecordInternals extends $ZodTypeInternals<$InferZodRecordOutput, $InferZodRecordInput> { def: $ZodRecordDef; isst: $ZodIssueInvalidType | $ZodIssueInvalidKey>; optin?: "optional" | undefined; optout?: "optional" | undefined; } type $partial = { "~~partial": true; }; interface $ZodRecord extends $ZodType { _zod: $ZodRecordInternals; } declare const $ZodRecord: $constructor<$ZodRecord>; interface $ZodMapDef extends $ZodTypeDef { type: "map"; keyType: Key; valueType: Value; } interface $ZodMapInternals extends $ZodTypeInternals, output>, Map, input$1>> { def: $ZodMapDef; isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement; optin?: "optional" | undefined; optout?: "optional" | undefined; } interface $ZodMap extends $ZodType { _zod: $ZodMapInternals; } declare const $ZodMap: $constructor<$ZodMap>; interface $ZodSetDef extends $ZodTypeDef { type: "set"; valueType: T; } interface $ZodSetInternals extends $ZodTypeInternals>, Set>> { def: $ZodSetDef; isst: $ZodIssueInvalidType; optin?: "optional" | undefined; optout?: "optional" | undefined; } interface $ZodSet extends $ZodType { _zod: $ZodSetInternals; } declare const $ZodSet: $constructor<$ZodSet>; type $InferEnumOutput = T[keyof T] & {}; type $InferEnumInput = T[keyof T] & {}; interface $ZodEnumDef extends $ZodTypeDef { type: "enum"; entries: T; } interface $ZodEnumInternals< /** @ts-ignore Cast variance */ out T extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput, $InferEnumInput> { def: $ZodEnumDef; /** @deprecated Internal API, use with caution (not deprecated) */ values: PrimitiveSet; /** @deprecated Internal API, use with caution (not deprecated) */ pattern: RegExp; isst: $ZodIssueInvalidValue; } interface $ZodEnum extends $ZodType { _zod: $ZodEnumInternals; } declare const $ZodEnum: $constructor<$ZodEnum>; interface $ZodLiteralDef extends $ZodTypeDef { type: "literal"; values: T[]; } interface $ZodLiteralInternals extends $ZodTypeInternals { def: $ZodLiteralDef; values: Set; pattern: RegExp; isst: $ZodIssueInvalidValue; } interface $ZodLiteral extends $ZodType { _zod: $ZodLiteralInternals; } declare const $ZodLiteral: $constructor<$ZodLiteral>; /** Do not reference this directly. */ interface File extends _File { readonly type: string; readonly size: number; } interface $ZodFileDef extends $ZodTypeDef { type: "file"; } interface $ZodFileInternals extends $ZodTypeInternals { def: $ZodFileDef; isst: $ZodIssueInvalidType; bag: LoosePartial<{ minimum: number; maximum: number; mime: MimeTypes[]; }>; } interface $ZodFile extends $ZodType { _zod: $ZodFileInternals; } declare const $ZodFile: $constructor<$ZodFile>; interface $ZodTransformDef extends $ZodTypeDef { type: "transform"; transform: (input: unknown, payload: ParsePayload) => MaybeAsync; } interface $ZodTransformInternals extends $ZodTypeInternals { def: $ZodTransformDef; isst: never; } interface $ZodOptionalDef extends $ZodTypeDef { type: "optional"; innerType: T; } interface $ZodOptionalInternals extends $ZodTypeInternals | undefined, input$1 | undefined> { def: $ZodOptionalDef; optin: "optional" | "defaulted"; optout: "optional"; isst: never; values: T["_zod"]["values"]; pattern: T["_zod"]["pattern"]; } interface $ZodOptional extends $ZodType { _zod: $ZodOptionalInternals; } declare const $ZodOptional: $constructor<$ZodOptional>; interface $ZodExactOptionalDef extends $ZodOptionalDef {} interface $ZodExactOptionalInternals extends $ZodOptionalInternals { def: $ZodExactOptionalDef; output: output; input: input$1; } interface $ZodExactOptional extends $ZodType { _zod: $ZodExactOptionalInternals; } declare const $ZodExactOptional: $constructor<$ZodExactOptional>; interface $ZodNullableDef extends $ZodTypeDef { type: "nullable"; innerType: T; } interface $ZodNullableInternals extends $ZodTypeInternals | null, input$1 | null> { def: $ZodNullableDef; optin: T["_zod"]["optin"]; optout: T["_zod"]["optout"]; isst: never; values: T["_zod"]["values"]; pattern: T["_zod"]["pattern"]; } interface $ZodDefaultDef extends $ZodTypeDef { type: "default"; innerType: T; /** The default value. May be a getter. */ defaultValue: NoUndefined>; } interface $ZodDefaultInternals extends $ZodTypeInternals>, input$1 | undefined> { def: $ZodDefaultDef; optin: "defaulted"; optout?: "optional" | undefined; isst: never; values: T["_zod"]["values"]; } interface $ZodPrefaultDef extends $ZodTypeDef { type: "prefault"; innerType: T; /** The default value. May be a getter. */ defaultValue: input$1; } interface $ZodPrefaultInternals extends $ZodTypeInternals>, input$1 | undefined> { def: $ZodPrefaultDef; optin: "defaulted"; optout?: "optional" | undefined; isst: never; values: T["_zod"]["values"]; } interface $ZodNonOptionalDef extends $ZodTypeDef { type: "nonoptional"; innerType: T; } interface $ZodNonOptionalInternals extends $ZodTypeInternals>, NoUndefined>> { def: $ZodNonOptionalDef; isst: $ZodIssueInvalidType; values: T["_zod"]["values"]; optin: "optional" | undefined; optout: "optional" | undefined; } interface $ZodNonOptional extends $ZodType { _zod: $ZodNonOptionalInternals; } declare const $ZodNonOptional: $constructor<$ZodNonOptional>; interface $ZodSuccessDef extends $ZodTypeDef { type: "success"; innerType: T; } interface $ZodSuccessInternals extends $ZodTypeInternals> { def: $ZodSuccessDef; isst: never; optin: T["_zod"]["optin"]; optout: "optional" | undefined; } interface $ZodCatchCtx extends ParsePayload { /** @deprecated Use `ctx.issues` */ error: { issues: $ZodIssue[]; }; /** @deprecated Use `ctx.value` */ input: unknown; } interface $ZodCatchDef extends $ZodTypeDef { type: "catch"; innerType: T; catchValue: (ctx: $ZodCatchCtx) => unknown; } interface $ZodCatchInternals extends $ZodTypeInternals, input$1> { def: $ZodCatchDef; optin: T["_zod"]["optin"]; optout: T["_zod"]["optout"]; isst: never; values: T["_zod"]["values"]; } interface $ZodNaNDef extends $ZodTypeDef { type: "nan"; } interface $ZodNaNInternals extends $ZodTypeInternals { def: $ZodNaNDef; isst: $ZodIssueInvalidType; } interface $ZodNaN extends $ZodType { _zod: $ZodNaNInternals; } declare const $ZodNaN: $constructor<$ZodNaN>; interface $ZodPipeDef extends $ZodTypeDef { type: "pipe"; in: A; out: B; /** Only defined inside $ZodCodec instances. */ transform?: (value: output, payload: ParsePayload>) => MaybeAsync>; /** Only defined inside $ZodCodec instances. */ reverseTransform?: (value: input$1, payload: ParsePayload>) => MaybeAsync>; } interface $ZodPipeInternals extends $ZodTypeInternals, input$1> { def: $ZodPipeDef; isst: never; values: A["_zod"]["values"]; optin: A["_zod"]["optin"]; optout: B["_zod"]["optout"]; propValues: A["_zod"]["propValues"]; } interface $ZodCodecDef extends $ZodPipeDef { transform: (value: output, payload: ParsePayload>) => MaybeAsync>; reverseTransform: (value: input$1, payload: ParsePayload>) => MaybeAsync>; } interface $ZodCodecInternals extends $ZodTypeInternals, input$1> { def: $ZodCodecDef; isst: never; values: A["_zod"]["values"]; optin: A["_zod"]["optin"]; optout: B["_zod"]["optout"]; propValues: A["_zod"]["propValues"]; } interface $ZodCodec extends $ZodType { _zod: $ZodCodecInternals; } declare const $ZodCodec: $constructor<$ZodCodec>; interface $ZodReadonlyDef extends $ZodTypeDef { type: "readonly"; innerType: T; } interface $ZodReadonlyInternals extends $ZodTypeInternals>, MakeReadonly>> { def: $ZodReadonlyDef; optin: T["_zod"]["optin"]; optout: T["_zod"]["optout"]; isst: never; propValues: T["_zod"]["propValues"]; values: T["_zod"]["values"]; } interface $ZodTemplateLiteralDef extends $ZodTypeDef { type: "template_literal"; parts: $ZodTemplateLiteralPart[]; format?: string | undefined; } interface $ZodTemplateLiteralInternals