import { Component } from 'vue'; import { ComponentOptionsMixin } from 'vue'; import { ComponentProvideOptions } from 'vue'; import { DefineComponent } from 'vue'; import { PublicProps } from 'vue'; import { VNode } from 'vue'; declare const __VLS_component: DefineComponent & Readonly<{}>, { isJsonComplete: boolean; }, {}, {}, {}, string, ComponentProvideOptions, false, { rendererInstance: any; }, HTMLDivElement>; declare function __VLS_template(): { attrs: Partial<{}>; slots: { header?(_: { schema: any; isError: boolean; isFinished: boolean; }): any; footer?(_: { schema: any; isError: boolean; isFinished: boolean; }): any; }; refs: { rendererInstance: any; }; rootEl: HTMLDivElement; }; declare type __VLS_TemplateResult = ReturnType; declare type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; }; declare function addIssueToContext(ctx: ParseContext, issueData: IssueData): void; declare type allKeys = T extends any ? keyof T : never; declare const anyType: (params?: RawCreateParams) => ZodAny; declare type AnyZodObject = ZodObject; declare type AnyZodTuple = ZodTuple<[ZodTypeAny, ...ZodTypeAny[]] | [], ZodTypeAny | null>; declare type ArrayCardinality = "many" | "atleastone"; declare type ArrayKeys = keyof any[]; declare type arrayOutputType = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][]; declare const arrayType: (schema: El, params?: RawCreateParams) => ZodArray; declare type AssertArray = T extends any[] ? T : never; declare type AsyncParseReturnType = Promise>; declare type baseObjectInputType = objectUtil.addQuestionMarks<{ [k in keyof Shape]: Shape[k]["_input"]; }>; declare type baseObjectOutputType = { [k in keyof Shape]: Shape[k]["_output"]; }; declare const bigIntType: (params?: RawCreateParams & { coerce?: boolean; }) => ZodBigInt; declare const booleanType: (params?: RawCreateParams & { coerce?: boolean; }) => ZodBoolean; declare const BRAND: unique symbol; declare type BRAND = { [BRAND]: { [k in T]: true; }; }; declare type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | { readonly [Symbol.toStringTag]: string; } | Date | Error | Generator | Promise | RegExp; declare type CardSchema = z.infer; declare const cardSchema: z.ZodType; declare type CatchallInput = ZodType extends T ? unknown : { [k: string]: T["_input"]; }; declare type CatchallOutput = ZodType extends T ? unknown : { [k: string]: T["_output"]; }; declare abstract class Class { constructor(..._: any[]); } declare const coerce: { string: (typeof ZodString)["create"]; number: (typeof ZodNumber)["create"]; boolean: (typeof ZodBoolean)["create"]; bigint: (typeof ZodBigInt)["create"]; date: (typeof ZodDate)["create"]; }; declare function createZodEnum>(values: T, params?: RawCreateParams): ZodEnum>; declare function createZodEnum(values: T, params?: RawCreateParams): ZodEnum; declare function custom(check?: (data: any) => any, _params?: string | CustomParams | ((input: any) => CustomParams), /** * @deprecated * * Pass `fatal` into the params object instead: * * ```ts * z.string().custom((val) => val.length > 5, { fatal: false }) * ``` * */ fatal?: boolean): ZodType; declare type CustomErrorParams = Partial>; declare type CustomParams = CustomErrorParams & { fatal?: boolean; }; declare function datetimeRegex(args: { precision?: number | null; offset?: boolean; local?: boolean; }): RegExp; declare const dateType: (params?: RawCreateParams & { coerce?: boolean; }) => ZodDate; declare type DenormalizedError = { [k: string]: DenormalizedError | string[]; }; declare type deoptional = T extends ZodOptional ? deoptional : T extends ZodNullable ? ZodNullable> : T; declare type DIRTY = { status: "dirty"; value: T; }; declare const DIRTY: (value: T) => DIRTY; declare const discriminatedUnionType: typeof ZodDiscriminatedUnion.create; declare type Effect = RefinementEffect | TransformEffect | PreprocessEffect; declare const effectsType: (schema: I, effect: Effect, params?: RawCreateParams) => ZodEffects; declare const EMPTY_PATH: ParsePath; declare type EnumLike = { [k: string]: string | number; [nu: number]: string; }; declare const enumType: typeof createZodEnum; declare namespace enumUtil { type UnionToIntersectionFn = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never; type GetUnionLast = UnionToIntersectionFn extends () => infer Last ? Last : never; type UnionToTuple = [T] extends [never] ? Tuple : UnionToTuple>, [GetUnionLast, ...Tuple]>; type CastToStringTuple = T extends [string, ...string[]] ? T : never; type UnionToTupleString = CastToStringTuple>; {}; } declare type EnumValues = readonly [T, ...T[]]; declare const errorMap: ZodErrorMap; declare type ErrorMapCtx = { defaultError: string; data: any; }; declare namespace errorUtil { type ErrMessage = string | { message?: string | undefined; }; const errToObj: (message?: ErrMessage) => { message?: string | undefined; }; const toString: (message?: ErrMessage) => string | undefined; } declare type FilterEnum = Values extends [] ? [] : Values extends [infer Head, ...infer Rest] ? Head extends ToExclude ? FilterEnum : [Head, ...FilterEnum] : never; declare const functionType: typeof ZodFunction.create; export declare const GenuiRenderer: __VLS_WithTemplateSlots; declare function getErrorMap(): ZodErrorMap; declare const getParsedType: (data: any) => ZodParsedType; declare type Indices = Exclude; declare type inferFlattenedErrors, U = string> = typeToFlattenedError, U>; declare type inferFormattedError, U = string> = ZodFormattedError, U>; declare type InnerTypeOfFunction, Returns extends ZodTypeAny> = Args["_output"] extends Array ? (...args: Args["_output"]) => Returns["_input"] : never; declare type input> = T["_input"]; declare type InputTypeOfTuple = AssertArray<{ [k in keyof T]: T[k] extends ZodType ? T[k]["_input"] : never; }>; declare type InputTypeOfTupleWithRest = Rest extends ZodTypeAny ? [...InputTypeOfTuple, ...Rest["_input"][]] : InputTypeOfTuple; declare const instanceOfType: (cls: T, params?: CustomParams) => ZodType, ZodTypeDef, InstanceType>; declare const intersectionType: (left: TSchema, right: USchema, params?: RawCreateParams) => ZodIntersection; declare type INVALID = { status: "aborted"; }; declare const INVALID: INVALID; declare type IpVersion = "v4" | "v6"; export declare interface IRendererProps { content: string | { [prop: string]: any; }; generating?: boolean; isJsonComplete?: boolean; customComponents?: Record; customActions?: any; requiredCompleteFieldSelectors?: string[]; id?: string; state?: Record; } export declare interface IRendererSlots { header?: Component | ((props: IRendererSlotsProps) => VNode | VNode[]); footer?: Component | ((props: IRendererSlotsProps) => VNode | VNode[]); } export declare interface IRendererSlotsProps { schema: CardSchema; isError: boolean; isFinished: boolean; } declare const isAborted: (x: ParseReturnType) => x is INVALID; declare const isAsync: (x: ParseReturnType) => x is AsyncParseReturnType; declare const isDirty: (x: ParseReturnType) => x is OK | DIRTY; declare type IssueData = stripPath & { path?: (string | number)[]; fatal?: boolean | undefined; }; declare const isValid: (x: ParseReturnType) => x is OK; declare type JSFunction = { type: 'JSFunction'; value: string; params?: string[]; }; declare type KeySchema = ZodType; declare const late: { object: (shape: () => Shape, params?: RawCreateParams) => ZodObject; }; declare const lazyType: (getter: () => Inner, params?: RawCreateParams) => ZodLazy; declare const literalType: (value: Value, params?: RawCreateParams) => ZodLiteral; declare const makeIssue: (params: { data: any; path: (string | number)[]; errorMaps: ZodErrorMap[]; issueData: IssueData; }) => ZodIssue; declare 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; declare const mapType: (keyType: KeySchema, valueType: ValueSchema, params?: RawCreateParams) => ZodMap; declare type mergeTypes = { [k in keyof A | keyof B]: k extends keyof B ? B[k] : k extends keyof A ? A[k] : never; }; declare type Methods = Record; declare const nanType: (params?: RawCreateParams) => ZodNaN; declare const nativeEnumType: (values: Elements, params?: RawCreateParams) => ZodNativeEnum; declare const NEVER: never; declare const neverType: (params?: RawCreateParams) => ZodNever; declare interface Node_2 { id?: string; componentName: string; props?: Record & { columns?: { slots?: Record; }[]; }; children?: Node_2[]; componentType?: 'Block' | 'PageStart' | 'PageSection'; slot?: string | Record; params?: string[]; loop?: Record; loopArgs?: string[]; condition?: boolean | Record; } declare type noUnrecognized = { [k in keyof Obj]: k extends keyof Shape ? Obj[k] : never; }; declare const nullableType: (type: Inner, params?: RawCreateParams) => ZodNullable; declare const nullType: (params?: RawCreateParams) => ZodNull; declare const numberType: (params?: RawCreateParams & { coerce?: boolean; }) => ZodNumber; declare type objectInputType = objectUtil.flatten> & CatchallInput & PassthroughType; declare type objectOutputType = objectUtil.flatten>> & CatchallOutput & PassthroughType; declare type ObjectPair = { key: SyncParseReturnType; value: SyncParseReturnType; }; declare const objectType: (shape: Shape, params?: RawCreateParams) => ZodObject, objectInputType>; declare namespace objectUtil { type MergeShapes = keyof U & keyof V extends never ? U & V : { [k in Exclude]: U[k]; } & V; type optionalKeys = { [k in keyof T]: undefined extends T[k] ? k : never; }[keyof T]; type requiredKeys = { [k in keyof T]: undefined extends T[k] ? never : k; }[keyof T]; type addQuestionMarks = { [K in requiredKeys]: T[K]; } & { [K in optionalKeys]?: T[K]; } & { [k in keyof T]?: unknown; }; type identity = T; type flatten = identity<{ [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; }>; const mergeShapes: (first: U, second: T) => T & U; type extendShape = keyof A & keyof B extends never ? A & B : { [K in keyof A as K extends keyof B ? never : K]: A[K]; } & { [K in keyof B]: B[K]; }; {}; } declare const oboolean: () => ZodOptional; declare type OK = { status: "valid"; value: T; }; declare const OK: (value: T) => OK; declare const onumber: () => ZodOptional; declare const optionalType: (type: Inner, params?: RawCreateParams) => ZodOptional; declare const ostring: () => ZodOptional; declare type OuterTypeOfFunction, Returns extends ZodTypeAny> = Args["_input"] extends Array ? (...args: Args["_input"]) => Returns["_output"] : never; declare type output> = T["_output"]; declare type OutputTypeOfTuple = AssertArray<{ [k in keyof T]: T[k] extends ZodType ? T[k]["_output"] : never; }>; declare type OutputTypeOfTupleWithRest = Rest extends ZodTypeAny ? [...OutputTypeOfTuple, ...Rest["_output"][]] : OutputTypeOfTuple; declare interface ParseContext { readonly common: { readonly issues: ZodIssue[]; readonly contextualErrorMap?: ZodErrorMap | undefined; readonly async: boolean; }; readonly path: ParsePath; readonly schemaErrorMap?: ZodErrorMap | undefined; readonly parent: ParseContext | null; readonly data: any; readonly parsedType: ZodParsedType; } declare type ParseInput = { data: any; path: (string | number)[]; parent: ParseContext; }; declare type ParseParams = { path: (string | number)[]; errorMap: ZodErrorMap; async: boolean; }; declare type ParsePath = ParsePathComponent[]; declare type ParsePathComponent = string | number; declare interface ParseResult { status: "aborted" | "dirty" | "valid"; data: any; } declare type ParseReturnType = SyncParseReturnType | AsyncParseReturnType; declare class ParseStatus { value: "aborted" | "dirty" | "valid"; dirty(): void; abort(): void; static mergeArray(status: ParseStatus, results: SyncParseReturnType[]): SyncParseReturnType; static mergeObjectAsync(status: ParseStatus, pairs: { key: ParseReturnType; value: ParseReturnType; }[]): Promise>; static mergeObjectSync(status: ParseStatus, pairs: { key: SyncParseReturnType; value: SyncParseReturnType; alwaysSet?: boolean; }[]): SyncParseReturnType; } declare namespace partialUtil { type DeepPartial = T extends ZodObject ? ZodObject<{ [k in keyof T["shape"]]: ZodOptional>; }, T["_def"]["unknownKeys"], T["_def"]["catchall"]> : T extends ZodArray ? ZodArray, Card> : T extends ZodOptional ? ZodOptional> : T extends ZodNullable ? ZodNullable> : T extends ZodTuple ? { [k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial : never; } extends infer PI ? PI extends ZodTupleItems ? ZodTuple : never : never : T; } declare type PassthroughType = T extends "passthrough" ? { [k: string]: unknown; } : unknown; declare const pipelineType: typeof ZodPipeline.create; declare type PreprocessEffect = { type: "preprocess"; transform: (arg: T, ctx: RefinementCtx) => any; }; declare const preprocessType: (preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, schema: I, params?: RawCreateParams) => ZodEffects; declare type Primitive = string | number | symbol | bigint | boolean | null | undefined; declare type ProcessedCreateParams = { errorMap?: ZodErrorMap | undefined; description?: string | undefined; }; declare const promiseType: (schema: Inner, params?: RawCreateParams) => ZodPromise; declare const quotelessJson: (obj: any) => string; declare type RawCreateParams = { errorMap?: ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } | undefined; declare type RecordType = [string] extends [K] ? Record : [number] extends [K] ? Record : [symbol] extends [K] ? Record : [BRAND] extends [K] ? Record : Partial>; declare const recordType: typeof ZodRecord.create; declare type recursiveZodFormattedError = T extends [any, ...any[]] ? { [K in keyof T]?: ZodFormattedError; } : T extends any[] ? { [k: number]: ZodFormattedError; } : T extends object ? { [K in keyof T]?: ZodFormattedError; } : unknown; declare type Refinement = (arg: T, ctx: RefinementCtx) => any; declare interface RefinementCtx { addIssue: (arg: IssueData) => void; path: (string | number)[]; } declare type RefinementEffect = { type: "refinement"; refinement: (arg: T, ctx: RefinementCtx) => any; }; export declare const requiredCompleteFieldSelectors: string[]; declare type RootNode = Omit & { id?: string; css?: string; fileName?: string; methods?: Methods; state?: Record; lifeCycles?: Record; children?: Node_2[]; dataSource?: any; bridge?: any; inputs?: any[]; outputs?: any[]; schema?: any; }; declare type SafeParseError = { success: false; error: ZodError; data?: never; }; declare type SafeParseReturnType = SafeParseSuccess | SafeParseError; declare type SafeParseSuccess = { success: true; data: Output; error?: never; }; declare type Scalars = Primitive | Primitive[]; declare function setErrorMap(map: ZodErrorMap): void; declare const setType: (valueType: ValueSchema, params?: RawCreateParams) => ZodSet; declare type SomeZodObject = ZodObject; /** * The Standard Schema interface. */ declare type StandardSchemaV1 = { /** * The Standard Schema properties. */ readonly "~standard": StandardSchemaV1.Props; }; declare namespace StandardSchemaV1 { /** * The Standard Schema properties interface. */ interface Props { /** * The version number of the standard. */ readonly version: 1; /** * The vendor name of the schema library. */ readonly vendor: string; /** * Validates unknown input values. */ readonly validate: (value: unknown) => Result | Promise>; /** * Inferred types associated with the schema. */ readonly types?: Types | undefined; } /** * 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 non-existent issues. */ readonly issues?: 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 Schema 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 Schema. */ type InferInput = NonNullable["input"]; /** * Infers the output type of a Standard Schema. */ type InferOutput = NonNullable["output"]; {}; } declare const strictObjectType: (shape: Shape, params?: RawCreateParams) => ZodObject; declare const stringType: (params?: RawCreateParams & { coerce?: true; }) => ZodString; declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "cidr" | "base64" | "jwt" | "base64url" | { includes: string; position?: number | undefined; } | { startsWith: string; } | { endsWith: string; }; declare type stripPath = T extends any ? util.OmitKeys : never; declare type SuperRefinement = (arg: T, ctx: RefinementCtx) => void | Promise; declare const symbolType: (params?: RawCreateParams) => ZodSymbol; declare type SyncParseReturnType = OK | DIRTY | INVALID; declare type TransformEffect = { type: "transform"; transform: (arg: T, ctx: RefinementCtx) => any; }; declare const tupleType: (schemas: Items, params?: RawCreateParams) => ZodTuple; declare type typecast = A extends T ? A : never; declare type TypeOf> = T["_output"]; declare type typeToFlattenedError = { formErrors: U[]; fieldErrors: { [P in allKeys]?: U[]; }; }; declare const undefinedType: (params?: RawCreateParams) => ZodUndefined; declare const unionType: >(types: Options, params?: RawCreateParams) => ZodUnion; declare type UnknownKeysParam = "passthrough" | "strict" | "strip"; declare const unknownType: (params?: RawCreateParams) => ZodUnknown; declare namespace util { type AssertEqual = (() => V extends T ? 1 : 2) extends () => V extends U ? 1 : 2 ? true : false; type isAny = 0 extends 1 & T ? true : false; const assertEqual: (_: AssertEqual) => void; function assertIs(_arg: T): void; function assertNever(_x: never): never; type Omit = Pick>; type OmitKeys = Pick>; type MakePartial = Omit & Partial>; type Exactly = T & Record, never>; type InexactPartial = { [k in keyof T]?: T[k] | undefined; }; const arrayToEnum: (items: U) => { [k in U[number]]: k; }; const getValidEnumValues: (obj: any) => any[]; const objectValues: (obj: any) => any[]; const objectKeys: ObjectConstructor["keys"]; const find: (arr: T[], checker: (arg: T) => any) => T | undefined; type identity = objectUtil.identity; type flatten = objectUtil.flatten; type noUndefined = T extends undefined ? never : T; const isInteger: NumberConstructor["isInteger"]; function joinValues(array: T, separator?: string): string; const jsonStringifyReplacer: (_: string, value: any) => any; {}; } declare type Values = { [k in T[number]]: k; }; declare const voidType: (params?: RawCreateParams) => ZodVoid; declare type Writeable = { -readonly [P in keyof T]: T[P]; }; declare namespace z { export { setErrorMap, getErrorMap, errorMap as defaultErrorMap, addIssueToContext, makeIssue, ParseParams, ParsePathComponent, ParsePath, EMPTY_PATH, ParseContext, ParseInput, ObjectPair, ParseStatus, ParseResult, INVALID, DIRTY, OK, SyncParseReturnType, AsyncParseReturnType, ParseReturnType, isAborted, isDirty, isValid, isAsync, Primitive, Scalars, util, objectUtil, ZodParsedType, getParsedType, datetimeRegex, custom, RefinementCtx, ZodRawShape, ZodTypeAny, TypeOf, input, output, TypeOf as infer, CustomErrorParams, ZodTypeDef, RawCreateParams, ProcessedCreateParams, SafeParseSuccess, SafeParseError, SafeParseReturnType, ZodType, IpVersion, ZodStringCheck, ZodStringDef, ZodString, ZodNumberCheck, ZodNumberDef, ZodNumber, ZodBigIntCheck, ZodBigIntDef, ZodBigInt, ZodBooleanDef, ZodBoolean, ZodDateCheck, ZodDateDef, ZodDate, ZodSymbolDef, ZodSymbol, ZodUndefinedDef, ZodUndefined, ZodNullDef, ZodNull, ZodAnyDef, ZodAny, ZodUnknownDef, ZodUnknown, ZodNeverDef, ZodNever, ZodVoidDef, ZodVoid, ZodArrayDef, ArrayCardinality, arrayOutputType, ZodArray, ZodNonEmptyArray, UnknownKeysParam, ZodObjectDef, mergeTypes, objectOutputType, baseObjectOutputType, objectInputType, baseObjectInputType, CatchallOutput, CatchallInput, PassthroughType, deoptional, SomeZodObject, noUnrecognized, ZodObject, AnyZodObject, ZodUnionOptions, ZodUnionDef, ZodUnion, ZodDiscriminatedUnionOption, ZodDiscriminatedUnionDef, ZodDiscriminatedUnion, ZodIntersectionDef, ZodIntersection, ZodTupleItems, AssertArray, OutputTypeOfTuple, OutputTypeOfTupleWithRest, InputTypeOfTuple, InputTypeOfTupleWithRest, ZodTupleDef, AnyZodTuple, ZodTuple, ZodRecordDef, KeySchema, RecordType, ZodRecord, ZodMapDef, ZodMap, ZodSetDef, ZodSet, ZodFunctionDef, OuterTypeOfFunction, InnerTypeOfFunction, ZodFunction, ZodLazyDef, ZodLazy, ZodLiteralDef, ZodLiteral, ArrayKeys, Indices, EnumValues, Values, ZodEnumDef, Writeable, FilterEnum, typecast, ZodEnum, ZodNativeEnumDef, EnumLike, ZodNativeEnum, ZodPromiseDef, ZodPromise, Refinement, SuperRefinement, RefinementEffect, TransformEffect, PreprocessEffect, Effect, ZodEffectsDef, ZodEffects, ZodEffects as ZodTransformer, ZodOptionalDef, ZodOptionalType, ZodOptional, ZodNullableDef, ZodNullableType, ZodNullable, ZodDefaultDef, ZodDefault, ZodCatchDef, ZodCatch, ZodNaNDef, ZodNaN, ZodBrandedDef, BRAND, ZodBranded, ZodPipelineDef, ZodPipeline, ZodReadonlyDef, ZodReadonly, ZodType as Schema, ZodType as ZodSchema, late, ZodFirstPartyTypeKind, ZodFirstPartySchemaTypes, coerce, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, dateType as date, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, instanceOfType as instanceof, intersectionType as intersection, lazyType as lazy, literalType as literal, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, recordType as record, setType as set, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, voidType as void, NEVER, inferFlattenedErrors, typeToFlattenedError, ZodIssueCode, ZodIssueBase, ZodInvalidTypeIssue, ZodInvalidLiteralIssue, ZodUnrecognizedKeysIssue, ZodInvalidUnionIssue, ZodInvalidUnionDiscriminatorIssue, ZodInvalidEnumValueIssue, ZodInvalidArgumentsIssue, ZodInvalidReturnTypeIssue, ZodInvalidDateIssue, StringValidation, ZodInvalidStringIssue, ZodTooSmallIssue, ZodTooBigIssue, ZodInvalidIntersectionTypesIssue, ZodNotMultipleOfIssue, ZodNotFiniteIssue, ZodCustomIssue, DenormalizedError, ZodIssueOptionalMessage, ZodIssue, quotelessJson, ZodFormattedError, inferFormattedError, ZodError, IssueData, ErrorMapCtx, ZodErrorMap } } declare class ZodAny extends ZodType { _any: true; _parse(input: ParseInput): ParseReturnType; static create: (params?: RawCreateParams) => ZodAny; } declare interface ZodAnyDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodAny; } declare class ZodArray extends ZodType, ZodArrayDef, Cardinality extends "atleastone" ? [T["_input"], ...T["_input"][]] : T["_input"][]> { _parse(input: ParseInput): ParseReturnType; get element(): T; min(minLength: number, message?: errorUtil.ErrMessage): this; max(maxLength: number, message?: errorUtil.ErrMessage): this; length(len: number, message?: errorUtil.ErrMessage): this; nonempty(message?: errorUtil.ErrMessage): ZodArray; static create: (schema: El, params?: RawCreateParams) => ZodArray; } declare interface ZodArrayDef extends ZodTypeDef { type: T; typeName: ZodFirstPartyTypeKind.ZodArray; exactLength: { value: number; message?: string | undefined; } | null; minLength: { value: number; message?: string | undefined; } | null; maxLength: { value: number; message?: string | undefined; } | null; } declare class ZodBigInt extends ZodType { _parse(input: ParseInput): ParseReturnType; _getInvalidInput(input: ParseInput): INVALID; static create: (params?: RawCreateParams & { coerce?: boolean; }) => ZodBigInt; gte(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt; min: (value: bigint, message?: errorUtil.ErrMessage) => ZodBigInt; gt(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt; lte(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt; max: (value: bigint, message?: errorUtil.ErrMessage) => ZodBigInt; lt(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt; protected setLimit(kind: "min" | "max", value: bigint, inclusive: boolean, message?: string): ZodBigInt; _addCheck(check: ZodBigIntCheck): ZodBigInt; positive(message?: errorUtil.ErrMessage): ZodBigInt; negative(message?: errorUtil.ErrMessage): ZodBigInt; nonpositive(message?: errorUtil.ErrMessage): ZodBigInt; nonnegative(message?: errorUtil.ErrMessage): ZodBigInt; multipleOf(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt; get minValue(): bigint | null; get maxValue(): bigint | null; } declare type ZodBigIntCheck = { kind: "min"; value: bigint; inclusive: boolean; message?: string | undefined; } | { kind: "max"; value: bigint; inclusive: boolean; message?: string | undefined; } | { kind: "multipleOf"; value: bigint; message?: string | undefined; }; declare interface ZodBigIntDef extends ZodTypeDef { checks: ZodBigIntCheck[]; typeName: ZodFirstPartyTypeKind.ZodBigInt; coerce: boolean; } declare class ZodBoolean extends ZodType { _parse(input: ParseInput): ParseReturnType; static create: (params?: RawCreateParams & { coerce?: boolean; }) => ZodBoolean; } declare interface ZodBooleanDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodBoolean; coerce: boolean; } declare class ZodBranded extends ZodType, ZodBrandedDef, T["_input"]> { _parse(input: ParseInput): ParseReturnType; unwrap(): T; } declare interface ZodBrandedDef extends ZodTypeDef { type: T; typeName: ZodFirstPartyTypeKind.ZodBranded; } declare class ZodCatch extends ZodType, unknown> { _parse(input: ParseInput): ParseReturnType; removeCatch(): T; static create: (type: Inner, params: RawCreateParams & { catch: Inner["_output"] | (() => Inner["_output"]); }) => ZodCatch; } declare interface ZodCatchDef extends ZodTypeDef { innerType: T; catchValue: (ctx: { error: ZodError; input: unknown; }) => T["_input"]; typeName: ZodFirstPartyTypeKind.ZodCatch; } declare interface ZodCustomIssue extends ZodIssueBase { code: typeof ZodIssueCode.custom; params?: { [k: string]: any; }; } declare class ZodDate extends ZodType { _parse(input: ParseInput): ParseReturnType; _addCheck(check: ZodDateCheck): ZodDate; min(minDate: Date, message?: errorUtil.ErrMessage): ZodDate; max(maxDate: Date, message?: errorUtil.ErrMessage): ZodDate; get minDate(): Date | null; get maxDate(): Date | null; static create: (params?: RawCreateParams & { coerce?: boolean; }) => ZodDate; } declare type ZodDateCheck = { kind: "min"; value: number; message?: string | undefined; } | { kind: "max"; value: number; message?: string | undefined; }; declare interface ZodDateDef extends ZodTypeDef { checks: ZodDateCheck[]; coerce: boolean; typeName: ZodFirstPartyTypeKind.ZodDate; } declare class ZodDefault extends ZodType, ZodDefaultDef, T["_input"] | undefined> { _parse(input: ParseInput): ParseReturnType; removeDefault(): T; static create: (type: Inner, params: RawCreateParams & { default: Inner["_input"] | (() => util.noUndefined); }) => ZodDefault; } declare interface ZodDefaultDef extends ZodTypeDef { innerType: T; defaultValue: () => util.noUndefined; typeName: ZodFirstPartyTypeKind.ZodDefault; } declare class ZodDiscriminatedUnion[]> extends ZodType, ZodDiscriminatedUnionDef, input> { _parse(input: ParseInput): ParseReturnType; get discriminator(): Discriminator; get options(): Options; get optionsMap(): Map>; /** * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. * However, it only allows a union of objects, all of which need to share a discriminator property. This property must * have a different value for each object in the union. * @param discriminator the name of the discriminator property * @param types an array of object schemas * @param params */ static create, ...ZodDiscriminatedUnionOption[] ]>(discriminator: Discriminator, options: Types, params?: RawCreateParams): ZodDiscriminatedUnion; } declare interface ZodDiscriminatedUnionDef[] = ZodDiscriminatedUnionOption[]> extends ZodTypeDef { discriminator: Discriminator; options: Options; optionsMap: Map>; typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion; } declare type ZodDiscriminatedUnionOption = ZodObject<{ [key in Discriminator]: ZodTypeAny; } & ZodRawShape, UnknownKeysParam, ZodTypeAny>; declare class ZodEffects, Input = input> extends ZodType, Input> { innerType(): T; sourceType(): T; _parse(input: ParseInput): ParseReturnType; static create: (schema: I, effect: Effect, params?: RawCreateParams) => ZodEffects; static createWithPreprocess: (preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, schema: I, params?: RawCreateParams) => ZodEffects; } declare interface ZodEffectsDef extends ZodTypeDef { schema: T; typeName: ZodFirstPartyTypeKind.ZodEffects; effect: Effect; } declare class ZodEnum extends ZodType, T[number]> { _cache: Set | undefined; _parse(input: ParseInput): ParseReturnType; get options(): T; get enum(): Values; get Values(): Values; get Enum(): Values; extract(values: ToExtract, newDef?: RawCreateParams): ZodEnum>; exclude(values: ToExclude, newDef?: RawCreateParams): ZodEnum>, [string, ...string[]]>>; static create: typeof createZodEnum; } declare interface ZodEnumDef extends ZodTypeDef { values: T; typeName: ZodFirstPartyTypeKind.ZodEnum; } declare class ZodError extends Error { issues: ZodIssue[]; get errors(): ZodIssue[]; constructor(issues: ZodIssue[]); format(): ZodFormattedError; format(mapper: (issue: ZodIssue) => U): ZodFormattedError; static create: (issues: ZodIssue[]) => ZodError; static assert(value: unknown): asserts value is ZodError; toString(): string; get message(): string; get isEmpty(): boolean; addIssue: (sub: ZodIssue) => void; addIssues: (subs?: ZodIssue[]) => void; flatten(): typeToFlattenedError; flatten(mapper?: (issue: ZodIssue) => U): typeToFlattenedError; get formErrors(): typeToFlattenedError; } declare type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => { message: string; }; declare type ZodFirstPartySchemaTypes = ZodString | ZodNumber | ZodNaN | ZodBigInt | ZodBoolean | ZodDate | ZodUndefined | ZodNull | ZodAny | ZodUnknown | ZodNever | ZodVoid | ZodArray | ZodObject | ZodUnion | ZodDiscriminatedUnion | ZodIntersection | ZodTuple | ZodRecord | ZodMap | ZodSet | ZodFunction | ZodLazy | ZodLiteral | ZodEnum | ZodEffects | ZodNativeEnum | ZodOptional | ZodNullable | ZodDefault | ZodCatch | ZodPromise | ZodBranded | ZodPipeline | ZodReadonly | ZodSymbol; declare enum ZodFirstPartyTypeKind { ZodString = "ZodString", ZodNumber = "ZodNumber", ZodNaN = "ZodNaN", ZodBigInt = "ZodBigInt", ZodBoolean = "ZodBoolean", ZodDate = "ZodDate", ZodSymbol = "ZodSymbol", ZodUndefined = "ZodUndefined", ZodNull = "ZodNull", ZodAny = "ZodAny", ZodUnknown = "ZodUnknown", ZodNever = "ZodNever", ZodVoid = "ZodVoid", ZodArray = "ZodArray", ZodObject = "ZodObject", ZodUnion = "ZodUnion", ZodDiscriminatedUnion = "ZodDiscriminatedUnion", ZodIntersection = "ZodIntersection", ZodTuple = "ZodTuple", ZodRecord = "ZodRecord", ZodMap = "ZodMap", ZodSet = "ZodSet", ZodFunction = "ZodFunction", ZodLazy = "ZodLazy", ZodLiteral = "ZodLiteral", ZodEnum = "ZodEnum", ZodEffects = "ZodEffects", ZodNativeEnum = "ZodNativeEnum", ZodOptional = "ZodOptional", ZodNullable = "ZodNullable", ZodDefault = "ZodDefault", ZodCatch = "ZodCatch", ZodPromise = "ZodPromise", ZodBranded = "ZodBranded", ZodPipeline = "ZodPipeline", ZodReadonly = "ZodReadonly" } declare type ZodFormattedError = { _errors: U[]; } & recursiveZodFormattedError>; declare class ZodFunction, Returns extends ZodTypeAny> extends ZodType, ZodFunctionDef, InnerTypeOfFunction> { _parse(input: ParseInput): ParseReturnType; parameters(): Args; returnType(): Returns; args[0]>(...items: Items): ZodFunction, Returns>; returns>(returnType: NewReturnType): ZodFunction; implement>(func: F): ReturnType extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType : OuterTypeOfFunction; strictImplement(func: InnerTypeOfFunction): InnerTypeOfFunction; validate: >(func: F) => ReturnType extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType : OuterTypeOfFunction; static create(): ZodFunction, ZodUnknown>; static create>(args: T): ZodFunction; static create(args: T, returns: U): ZodFunction; static create, U extends ZodTypeAny = ZodUnknown>(args: T, returns: U, params?: RawCreateParams): ZodFunction; } declare interface ZodFunctionDef = ZodTuple, Returns extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef { args: Args; returns: Returns; typeName: ZodFirstPartyTypeKind.ZodFunction; } declare class ZodIntersection extends ZodType, T["_input"] & U["_input"]> { _parse(input: ParseInput): ParseReturnType; static create: (left: TSchema, right: USchema, params?: RawCreateParams) => ZodIntersection; } declare interface ZodIntersectionDef extends ZodTypeDef { left: T; right: U; typeName: ZodFirstPartyTypeKind.ZodIntersection; } declare interface ZodInvalidArgumentsIssue extends ZodIssueBase { code: typeof ZodIssueCode.invalid_arguments; argumentsError: ZodError; } declare interface ZodInvalidDateIssue extends ZodIssueBase { code: typeof ZodIssueCode.invalid_date; } declare interface ZodInvalidEnumValueIssue extends ZodIssueBase { received: string | number; code: typeof ZodIssueCode.invalid_enum_value; options: (string | number)[]; } declare interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase { code: typeof ZodIssueCode.invalid_intersection_types; } declare interface ZodInvalidLiteralIssue extends ZodIssueBase { code: typeof ZodIssueCode.invalid_literal; expected: unknown; received: unknown; } declare interface ZodInvalidReturnTypeIssue extends ZodIssueBase { code: typeof ZodIssueCode.invalid_return_type; returnTypeError: ZodError; } declare interface ZodInvalidStringIssue extends ZodIssueBase { code: typeof ZodIssueCode.invalid_string; validation: StringValidation; } declare interface ZodInvalidTypeIssue extends ZodIssueBase { code: typeof ZodIssueCode.invalid_type; expected: ZodParsedType; received: ZodParsedType; } declare interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase { code: typeof ZodIssueCode.invalid_union_discriminator; options: Primitive[]; } declare interface ZodInvalidUnionIssue extends ZodIssueBase { code: typeof ZodIssueCode.invalid_union; unionErrors: ZodError[]; } declare type ZodIssue = ZodIssueOptionalMessage & { fatal?: boolean | undefined; message: string; }; declare type ZodIssueBase = { path: (string | number)[]; message?: string | undefined; }; declare const ZodIssueCode: { invalid_type: "invalid_type"; invalid_literal: "invalid_literal"; custom: "custom"; invalid_union: "invalid_union"; invalid_union_discriminator: "invalid_union_discriminator"; invalid_enum_value: "invalid_enum_value"; unrecognized_keys: "unrecognized_keys"; invalid_arguments: "invalid_arguments"; invalid_return_type: "invalid_return_type"; invalid_date: "invalid_date"; invalid_string: "invalid_string"; too_small: "too_small"; too_big: "too_big"; invalid_intersection_types: "invalid_intersection_types"; not_multiple_of: "not_multiple_of"; not_finite: "not_finite"; }; declare type ZodIssueCode = keyof typeof ZodIssueCode; declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue; declare class ZodLazy extends ZodType, ZodLazyDef, input> { get schema(): T; _parse(input: ParseInput): ParseReturnType; static create: (getter: () => Inner, params?: RawCreateParams) => ZodLazy; } declare interface ZodLazyDef extends ZodTypeDef { getter: () => T; typeName: ZodFirstPartyTypeKind.ZodLazy; } declare class ZodLiteral extends ZodType, T> { _parse(input: ParseInput): ParseReturnType; get value(): T; static create: (value: Value, params?: RawCreateParams) => ZodLiteral; } declare interface ZodLiteralDef extends ZodTypeDef { value: T; typeName: ZodFirstPartyTypeKind.ZodLiteral; } declare class ZodMap extends ZodType, ZodMapDef, Map> { get keySchema(): Key; get valueSchema(): Value; _parse(input: ParseInput): ParseReturnType; static create: (keyType: KeySchema, valueType: ValueSchema, params?: RawCreateParams) => ZodMap; } declare interface ZodMapDef extends ZodTypeDef { valueType: Value; keyType: Key; typeName: ZodFirstPartyTypeKind.ZodMap; } declare class ZodNaN extends ZodType { _parse(input: ParseInput): ParseReturnType; static create: (params?: RawCreateParams) => ZodNaN; } declare interface ZodNaNDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodNaN; } declare class ZodNativeEnum extends ZodType, T[keyof T]> { _cache: Set | undefined; _parse(input: ParseInput): ParseReturnType; get enum(): T; static create: (values: Elements, params?: RawCreateParams) => ZodNativeEnum; } declare interface ZodNativeEnumDef extends ZodTypeDef { values: T; typeName: ZodFirstPartyTypeKind.ZodNativeEnum; } declare class ZodNever extends ZodType { _parse(input: ParseInput): ParseReturnType; static create: (params?: RawCreateParams) => ZodNever; } declare interface ZodNeverDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodNever; } declare type ZodNonEmptyArray = ZodArray; declare interface ZodNotFiniteIssue extends ZodIssueBase { code: typeof ZodIssueCode.not_finite; } declare interface ZodNotMultipleOfIssue extends ZodIssueBase { code: typeof ZodIssueCode.not_multiple_of; multipleOf: number | bigint; } declare class ZodNull extends ZodType { _parse(input: ParseInput): ParseReturnType; static create: (params?: RawCreateParams) => ZodNull; } declare class ZodNullable extends ZodType, T["_input"] | null> { _parse(input: ParseInput): ParseReturnType; unwrap(): T; static create: (type: Inner, params?: RawCreateParams) => ZodNullable; } declare interface ZodNullableDef extends ZodTypeDef { innerType: T; typeName: ZodFirstPartyTypeKind.ZodNullable; } declare type ZodNullableType = ZodNullable; declare interface ZodNullDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodNull; } declare class ZodNumber extends ZodType { _parse(input: ParseInput): ParseReturnType; static create: (params?: RawCreateParams & { coerce?: boolean; }) => ZodNumber; gte(value: number, message?: errorUtil.ErrMessage): ZodNumber; min: (value: number, message?: errorUtil.ErrMessage) => ZodNumber; gt(value: number, message?: errorUtil.ErrMessage): ZodNumber; lte(value: number, message?: errorUtil.ErrMessage): ZodNumber; max: (value: number, message?: errorUtil.ErrMessage) => ZodNumber; lt(value: number, message?: errorUtil.ErrMessage): ZodNumber; protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string): ZodNumber; _addCheck(check: ZodNumberCheck): ZodNumber; int(message?: errorUtil.ErrMessage): ZodNumber; positive(message?: errorUtil.ErrMessage): ZodNumber; negative(message?: errorUtil.ErrMessage): ZodNumber; nonpositive(message?: errorUtil.ErrMessage): ZodNumber; nonnegative(message?: errorUtil.ErrMessage): ZodNumber; multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber; step: (value: number, message?: errorUtil.ErrMessage) => ZodNumber; finite(message?: errorUtil.ErrMessage): ZodNumber; safe(message?: errorUtil.ErrMessage): ZodNumber; get minValue(): number | null; get maxValue(): number | null; get isInt(): boolean; get isFinite(): boolean; } declare type ZodNumberCheck = { kind: "min"; value: number; inclusive: boolean; message?: string | undefined; } | { kind: "max"; value: number; inclusive: boolean; message?: string | undefined; } | { kind: "int"; message?: string | undefined; } | { kind: "multipleOf"; value: number; message?: string | undefined; } | { kind: "finite"; message?: string | undefined; }; declare interface ZodNumberDef extends ZodTypeDef { checks: ZodNumberCheck[]; typeName: ZodFirstPartyTypeKind.ZodNumber; coerce: boolean; } declare class ZodObject, Input = objectInputType> extends ZodType, Input> { private _cached; _getCached(): { shape: T; keys: string[]; }; _parse(input: ParseInput): ParseReturnType; get shape(): T; strict(message?: errorUtil.ErrMessage): ZodObject; strip(): ZodObject; passthrough(): ZodObject; /** * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped. * If you want to pass through unknown properties, use `.passthrough()` instead. */ nonstrict: () => ZodObject; extend(augmentation: Augmentation): ZodObject, UnknownKeys, Catchall>; /** * @deprecated Use `.extend` instead * */ augment: (augmentation: Augmentation) => ZodObject, UnknownKeys, Catchall>; /** * Prior to zod@1.0.12 there was a bug in the * inferred type of merged objects. Please * upgrade if you are experiencing issues. */ merge(merging: Incoming): ZodObject, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>; setKey(key: Key, schema: Schema): ZodObject; catchall(index: Index): ZodObject; pick>(mask: Mask): ZodObject>, UnknownKeys, Catchall>; omit>(mask: Mask): ZodObject, UnknownKeys, Catchall>; /** * @deprecated */ deepPartial(): partialUtil.DeepPartial; partial(): ZodObject<{ [k in keyof T]: ZodOptional; }, UnknownKeys, Catchall>; partial>(mask: Mask): ZodObject : T[k]; }>, UnknownKeys, Catchall>; required(): ZodObject<{ [k in keyof T]: deoptional; }, UnknownKeys, Catchall>; required>(mask: Mask): ZodObject : T[k]; }>, UnknownKeys, Catchall>; keyof(): ZodEnum>; static create: (shape: Shape, params?: RawCreateParams) => ZodObject, objectInputType>; static strictCreate: (shape: Shape, params?: RawCreateParams) => ZodObject; static lazycreate: (shape: () => Shape, params?: RawCreateParams) => ZodObject; } declare interface ZodObjectDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodObject; shape: () => T; catchall: Catchall; unknownKeys: UnknownKeys; } declare class ZodOptional extends ZodType, T["_input"] | undefined> { _parse(input: ParseInput): ParseReturnType; unwrap(): T; static create: (type: Inner, params?: RawCreateParams) => ZodOptional; } declare interface ZodOptionalDef extends ZodTypeDef { innerType: T; typeName: ZodFirstPartyTypeKind.ZodOptional; } declare type ZodOptionalType = ZodOptional; declare const ZodParsedType: { string: "string"; nan: "nan"; number: "number"; integer: "integer"; float: "float"; boolean: "boolean"; date: "date"; bigint: "bigint"; symbol: "symbol"; function: "function"; undefined: "undefined"; null: "null"; array: "array"; object: "object"; unknown: "unknown"; promise: "promise"; void: "void"; never: "never"; map: "map"; set: "set"; }; declare type ZodParsedType = keyof typeof ZodParsedType; declare class ZodPipeline extends ZodType, A["_input"]> { _parse(input: ParseInput): ParseReturnType; static create(a: ASchema, b: BSchema): ZodPipeline; } declare interface ZodPipelineDef extends ZodTypeDef { in: A; out: B; typeName: ZodFirstPartyTypeKind.ZodPipeline; } declare class ZodPromise extends ZodType, ZodPromiseDef, Promise> { unwrap(): T; _parse(input: ParseInput): ParseReturnType; static create: (schema: Inner, params?: RawCreateParams) => ZodPromise; } declare interface ZodPromiseDef extends ZodTypeDef { type: T; typeName: ZodFirstPartyTypeKind.ZodPromise; } declare type ZodRawShape = { [k: string]: ZodTypeAny; }; declare class ZodReadonly extends ZodType, ZodReadonlyDef, MakeReadonly> { _parse(input: ParseInput): ParseReturnType; static create: (type: Inner, params?: RawCreateParams) => ZodReadonly; unwrap(): T; } declare interface ZodReadonlyDef extends ZodTypeDef { innerType: T; typeName: ZodFirstPartyTypeKind.ZodReadonly; } declare class ZodRecord extends ZodType, ZodRecordDef, RecordType> { get keySchema(): Key; get valueSchema(): Value; _parse(input: ParseInput): ParseReturnType; get element(): Value; static create(valueType: Value, params?: RawCreateParams): ZodRecord; static create(keySchema: Keys, valueType: Value, params?: RawCreateParams): ZodRecord; } declare interface ZodRecordDef extends ZodTypeDef { valueType: Value; keyType: Key; typeName: ZodFirstPartyTypeKind.ZodRecord; } declare class ZodSet extends ZodType, ZodSetDef, Set> { _parse(input: ParseInput): ParseReturnType; min(minSize: number, message?: errorUtil.ErrMessage): this; max(maxSize: number, message?: errorUtil.ErrMessage): this; size(size: number, message?: errorUtil.ErrMessage): this; nonempty(message?: errorUtil.ErrMessage): ZodSet; static create: (valueType: ValueSchema, params?: RawCreateParams) => ZodSet; } declare interface ZodSetDef extends ZodTypeDef { valueType: Value; typeName: ZodFirstPartyTypeKind.ZodSet; minSize: { value: number; message?: string | undefined; } | null; maxSize: { value: number; message?: string | undefined; } | null; } declare class ZodString extends ZodType { _parse(input: ParseInput): ParseReturnType; protected _regex(regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage): ZodEffects; _addCheck(check: ZodStringCheck): ZodString; email(message?: errorUtil.ErrMessage): ZodString; url(message?: errorUtil.ErrMessage): ZodString; emoji(message?: errorUtil.ErrMessage): ZodString; uuid(message?: errorUtil.ErrMessage): ZodString; nanoid(message?: errorUtil.ErrMessage): ZodString; cuid(message?: errorUtil.ErrMessage): ZodString; cuid2(message?: errorUtil.ErrMessage): ZodString; ulid(message?: errorUtil.ErrMessage): ZodString; base64(message?: errorUtil.ErrMessage): ZodString; base64url(message?: errorUtil.ErrMessage): ZodString; jwt(options?: { alg?: string; message?: string | undefined; }): ZodString; ip(options?: string | { version?: IpVersion; message?: string | undefined; }): ZodString; cidr(options?: string | { version?: IpVersion; message?: string | undefined; }): ZodString; datetime(options?: string | { message?: string | undefined; precision?: number | null; offset?: boolean; local?: boolean; }): ZodString; date(message?: string): ZodString; time(options?: string | { message?: string | undefined; precision?: number | null; }): ZodString; duration(message?: errorUtil.ErrMessage): ZodString; regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString; includes(value: string, options?: { message?: string; position?: number; }): ZodString; startsWith(value: string, message?: errorUtil.ErrMessage): ZodString; endsWith(value: string, message?: errorUtil.ErrMessage): ZodString; min(minLength: number, message?: errorUtil.ErrMessage): ZodString; max(maxLength: number, message?: errorUtil.ErrMessage): ZodString; length(len: number, message?: errorUtil.ErrMessage): ZodString; /** * Equivalent to `.min(1)` */ nonempty(message?: errorUtil.ErrMessage): ZodString; trim(): ZodString; toLowerCase(): ZodString; toUpperCase(): ZodString; get isDatetime(): boolean; get isDate(): boolean; get isTime(): boolean; get isDuration(): boolean; get isEmail(): boolean; get isURL(): boolean; get isEmoji(): boolean; get isUUID(): boolean; get isNANOID(): boolean; get isCUID(): boolean; get isCUID2(): boolean; get isULID(): boolean; get isIP(): boolean; get isCIDR(): boolean; get isBase64(): boolean; get isBase64url(): boolean; get minLength(): number | null; get maxLength(): number | null; static create: (params?: RawCreateParams & { coerce?: true; }) => ZodString; } declare type ZodStringCheck = { kind: "min"; value: number; message?: string | undefined; } | { kind: "max"; value: number; message?: string | undefined; } | { kind: "length"; value: number; message?: string | undefined; } | { kind: "email"; message?: string | undefined; } | { kind: "url"; message?: string | undefined; } | { kind: "emoji"; message?: string | undefined; } | { kind: "uuid"; message?: string | undefined; } | { kind: "nanoid"; message?: string | undefined; } | { kind: "cuid"; message?: string | undefined; } | { kind: "includes"; value: string; position?: number | undefined; message?: string | undefined; } | { kind: "cuid2"; message?: string | undefined; } | { kind: "ulid"; message?: string | undefined; } | { kind: "startsWith"; value: string; message?: string | undefined; } | { kind: "endsWith"; value: string; message?: string | undefined; } | { kind: "regex"; regex: RegExp; message?: string | undefined; } | { kind: "trim"; message?: string | undefined; } | { kind: "toLowerCase"; message?: string | undefined; } | { kind: "toUpperCase"; message?: string | undefined; } | { kind: "jwt"; alg?: string; message?: string | undefined; } | { kind: "datetime"; offset: boolean; local: boolean; precision: number | null; message?: string | undefined; } | { kind: "date"; message?: string | undefined; } | { kind: "time"; precision: number | null; message?: string | undefined; } | { kind: "duration"; message?: string | undefined; } | { kind: "ip"; version?: IpVersion | undefined; message?: string | undefined; } | { kind: "cidr"; version?: IpVersion | undefined; message?: string | undefined; } | { kind: "base64"; message?: string | undefined; } | { kind: "base64url"; message?: string | undefined; }; declare interface ZodStringDef extends ZodTypeDef { checks: ZodStringCheck[]; typeName: ZodFirstPartyTypeKind.ZodString; coerce: boolean; } declare class ZodSymbol extends ZodType { _parse(input: ParseInput): ParseReturnType; static create: (params?: RawCreateParams) => ZodSymbol; } declare interface ZodSymbolDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodSymbol; } declare interface ZodTooBigIssue extends ZodIssueBase { code: typeof ZodIssueCode.too_big; maximum: number | bigint; inclusive: boolean; exact?: boolean; type: "array" | "string" | "number" | "set" | "date" | "bigint"; } declare interface ZodTooSmallIssue extends ZodIssueBase { code: typeof ZodIssueCode.too_small; minimum: number | bigint; inclusive: boolean; exact?: boolean; type: "array" | "string" | "number" | "set" | "date" | "bigint"; } declare class ZodTuple extends ZodType, ZodTupleDef, InputTypeOfTupleWithRest> { _parse(input: ParseInput): ParseReturnType; get items(): T; rest(rest: RestSchema): ZodTuple; static create: (schemas: Items, params?: RawCreateParams) => ZodTuple; } declare interface ZodTupleDef extends ZodTypeDef { items: T; rest: Rest; typeName: ZodFirstPartyTypeKind.ZodTuple; } declare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]]; declare abstract class ZodType { readonly _type: Output; readonly _output: Output; readonly _input: Input; readonly _def: Def; get description(): string | undefined; "~standard": StandardSchemaV1.Props; abstract _parse(input: ParseInput): ParseReturnType; _getType(input: ParseInput): string; _getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext; _processInputParams(input: ParseInput): { status: ParseStatus; ctx: ParseContext; }; _parseSync(input: ParseInput): SyncParseReturnType; _parseAsync(input: ParseInput): AsyncParseReturnType; parse(data: unknown, params?: util.InexactPartial): Output; safeParse(data: unknown, params?: util.InexactPartial): SafeParseReturnType; "~validate"(data: unknown): StandardSchemaV1.Result | Promise>; parseAsync(data: unknown, params?: util.InexactPartial): Promise; safeParseAsync(data: unknown, params?: util.InexactPartial): Promise>; /** Alias of safeParseAsync */ spa: (data: unknown, params?: util.InexactPartial) => Promise>; refine(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects; refine(check: (arg: Output) => unknown | Promise, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects; refinement(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects; refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects; _refinement(refinement: RefinementEffect["refinement"]): ZodEffects; superRefine(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects; superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects; superRefine(refinement: (arg: Output, ctx: RefinementCtx) => Promise): ZodEffects; constructor(def: Def); optional(): ZodOptional; nullable(): ZodNullable; nullish(): ZodOptional>; array(): ZodArray; promise(): ZodPromise; or(option: T): ZodUnion<[this, T]>; and(incoming: T): ZodIntersection; transform(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise): ZodEffects; default(def: util.noUndefined): ZodDefault; default(def: () => util.noUndefined): ZodDefault; brand(brand?: B): ZodBranded; catch(def: Output): ZodCatch; catch(def: (ctx: { error: ZodError; input: Input; }) => Output): ZodCatch; describe(description: string): this; pipe(target: T): ZodPipeline; readonly(): ZodReadonly; isOptional(): boolean; isNullable(): boolean; } declare type ZodTypeAny = ZodType; declare interface ZodTypeDef { errorMap?: ZodErrorMap | undefined; description?: string | undefined; } declare class ZodUndefined extends ZodType { _parse(input: ParseInput): ParseReturnType; params?: RawCreateParams; static create: (params?: RawCreateParams) => ZodUndefined; } declare interface ZodUndefinedDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodUndefined; } declare class ZodUnion extends ZodType, T[number]["_input"]> { _parse(input: ParseInput): ParseReturnType; get options(): T; static create: >(types: Options, params?: RawCreateParams) => ZodUnion; } declare interface ZodUnionDef> extends ZodTypeDef { options: T; typeName: ZodFirstPartyTypeKind.ZodUnion; } declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>; declare class ZodUnknown extends ZodType { _unknown: true; _parse(input: ParseInput): ParseReturnType; static create: (params?: RawCreateParams) => ZodUnknown; } declare interface ZodUnknownDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodUnknown; } declare interface ZodUnrecognizedKeysIssue extends ZodIssueBase { code: typeof ZodIssueCode.unrecognized_keys; keys: string[]; } declare class ZodVoid extends ZodType { _parse(input: ParseInput): ParseReturnType; static create: (params?: RawCreateParams) => ZodVoid; } declare interface ZodVoidDef extends ZodTypeDef { typeName: ZodFirstPartyTypeKind.ZodVoid; } export { }