UNPKG

alapa

Version:

A cutting-edge web development framework designed to revolutionize the way developers build modern web applications.

256 lines (255 loc) 12.3 kB
import { z } from "zod"; export declare const Validation: { schema: <T extends z.ZodRawShape>(shape: T, params?: z.RawCreateParams) => z.ZodObject<T, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<T>]: z.baseObjectInputType<T>[k_1]; }>; setErrorMap(map: z.ZodErrorMap): void; getErrorMap(): z.ZodErrorMap; defaultErrorMap: z.ZodErrorMap; addIssueToContext(ctx: z.ParseContext, issueData: z.IssueData): void; makeIssue: (params: { data: any; path: (string | number)[]; errorMaps: z.ZodErrorMap[]; issueData: z.IssueData; }) => z.ZodIssue; EMPTY_PATH: z.ParsePath; ParseStatus: typeof z.ParseStatus; INVALID: z.INVALID; DIRTY: <T>(value: T) => z.DIRTY<T>; OK: <T>(value: T) => z.OK<T>; isAborted: (x: z.ParseReturnType<any>) => x is z.INVALID; isDirty: <T>(x: z.ParseReturnType<T>) => x is z.OK<T> | z.DIRTY<T>; isValid: <T>(x: z.ParseReturnType<T>) => x is z.OK<T>; isAsync: <T>(x: z.ParseReturnType<T>) => x is z.AsyncParseReturnType<T>; util: typeof z.util; objectUtil: typeof z.objectUtil; ZodParsedType: { function: "function"; number: "number"; string: "string"; nan: "nan"; integer: "integer"; float: "float"; boolean: "boolean"; date: "date"; bigint: "bigint"; symbol: "symbol"; undefined: "undefined"; null: "null"; array: "array"; object: "object"; unknown: "unknown"; promise: "promise"; void: "void"; never: "never"; map: "map"; set: "set"; }; getParsedType: (data: any) => z.ZodParsedType; datetimeRegex(args: { precision?: number | null; offset?: boolean; local?: boolean; }): RegExp; custom<T>(check?: (data: any) => any, params?: string | (Partial<z.util.Omit<z.ZodCustomIssue, "code">> & { fatal?: boolean; }) | ((input: any) => Partial<z.util.Omit<z.ZodCustomIssue, "code">> & { fatal?: boolean; }), fatal?: boolean): z.ZodType<T, z.ZodTypeDef, T>; ZodType: typeof z.ZodType; ZodString: typeof z.ZodString; ZodNumber: typeof z.ZodNumber; ZodBigInt: typeof z.ZodBigInt; ZodBoolean: typeof z.ZodBoolean; ZodDate: typeof z.ZodDate; ZodSymbol: typeof z.ZodSymbol; ZodUndefined: typeof z.ZodUndefined; ZodNull: typeof z.ZodNull; ZodAny: typeof z.ZodAny; ZodUnknown: typeof z.ZodUnknown; ZodNever: typeof z.ZodNever; ZodVoid: typeof z.ZodVoid; ZodArray: typeof z.ZodArray; ZodObject: typeof z.ZodObject; ZodUnion: typeof z.ZodUnion; ZodDiscriminatedUnion: typeof z.ZodDiscriminatedUnion; ZodIntersection: typeof z.ZodIntersection; ZodTuple: typeof z.ZodTuple; ZodRecord: typeof z.ZodRecord; ZodMap: typeof z.ZodMap; ZodSet: typeof z.ZodSet; ZodFunction: typeof z.ZodFunction; ZodLazy: typeof z.ZodLazy; ZodLiteral: typeof z.ZodLiteral; ZodEnum: typeof z.ZodEnum; ZodNativeEnum: typeof z.ZodNativeEnum; ZodPromise: typeof z.ZodPromise; ZodEffects: typeof z.ZodEffects; ZodTransformer: typeof z.ZodEffects; ZodOptional: typeof z.ZodOptional; ZodNullable: typeof z.ZodNullable; ZodDefault: typeof z.ZodDefault; ZodCatch: typeof z.ZodCatch; ZodNaN: typeof z.ZodNaN; BRAND: typeof z.BRAND; ZodBranded: typeof z.ZodBranded; ZodPipeline: typeof z.ZodPipeline; ZodReadonly: typeof z.ZodReadonly; Schema: typeof z.ZodType; ZodSchema: typeof z.ZodType; late: { object: <T extends z.ZodRawShape>(shape: () => T, params?: z.RawCreateParams) => z.ZodObject<T, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<T>]: z.baseObjectInputType<T>[k_1]; }>; }; ZodFirstPartyTypeKind: typeof z.ZodFirstPartyTypeKind; coerce: { string: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: true | undefined; }) | undefined) => z.ZodString; number: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: boolean | undefined; }) | undefined) => z.ZodNumber; boolean: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: boolean | undefined; }) | undefined) => z.ZodBoolean; bigint: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: boolean | undefined; }) | undefined) => z.ZodBigInt; date: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: boolean | undefined; }) | undefined) => z.ZodDate; }; any: (params?: z.RawCreateParams) => z.ZodAny; array: <T extends z.ZodTypeAny>(schema: T, params?: z.RawCreateParams) => z.ZodArray<T, "many">; bigint: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: boolean | undefined; }) | undefined) => z.ZodBigInt; boolean: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: boolean | undefined; }) | undefined) => z.ZodBoolean; date: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: boolean | undefined; }) | undefined) => z.ZodDate; discriminatedUnion: typeof z.ZodDiscriminatedUnion.create; effect: <I extends z.ZodTypeAny>(schema: I, effect: z.Effect<I["_output"]>, params?: z.RawCreateParams) => z.ZodEffects<I, I["_output"], z.input<I>>; enum: { <U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: z.RawCreateParams): z.ZodEnum<z.Writeable<T>>; <U extends string, T extends [U, ...U[]]>(values: T, params?: z.RawCreateParams): z.ZodEnum<T>; }; function: typeof z.ZodFunction.create; instanceof: <T extends abstract new (..._: any[]) => {}>(cls: T, params?: Partial<z.util.Omit<z.ZodCustomIssue, "code">> & { fatal?: boolean; }) => z.ZodType<InstanceType<T>, z.ZodTypeDef, InstanceType<T>>; intersection: <T extends z.ZodTypeAny, U extends z.ZodTypeAny>(left: T, right: U, params?: z.RawCreateParams) => z.ZodIntersection<T, U>; lazy: <T extends z.ZodTypeAny>(getter: () => T, params?: z.RawCreateParams) => z.ZodLazy<T>; literal: <T extends z.Primitive>(value: T, params?: z.RawCreateParams) => z.ZodLiteral<T>; map: <Key extends z.ZodTypeAny = z.ZodTypeAny, Value extends z.ZodTypeAny = z.ZodTypeAny>(keyType: Key, valueType: Value, params?: z.RawCreateParams) => z.ZodMap<Key, Value>; nan: (params?: z.RawCreateParams) => z.ZodNaN; nativeEnum: <T extends z.EnumLike>(values: T, params?: z.RawCreateParams) => z.ZodNativeEnum<T>; never: (params?: z.RawCreateParams) => z.ZodNever; null: (params?: z.RawCreateParams) => z.ZodNull; nullable: <T extends z.ZodTypeAny>(type: T, params?: z.RawCreateParams) => z.ZodNullable<T>; number: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: boolean | undefined; }) | undefined) => z.ZodNumber; object: <T extends z.ZodRawShape>(shape: T, params?: z.RawCreateParams) => z.ZodObject<T, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<T>]: z.baseObjectInputType<T>[k_1]; }>; oboolean: () => z.ZodOptional<z.ZodBoolean>; onumber: () => z.ZodOptional<z.ZodNumber>; optional: <T extends z.ZodTypeAny>(type: T, params?: z.RawCreateParams) => z.ZodOptional<T>; ostring: () => z.ZodOptional<z.ZodString>; pipeline: typeof z.ZodPipeline.create; preprocess: <I extends z.ZodTypeAny>(preprocess: (arg: unknown, ctx: z.RefinementCtx) => unknown, schema: I, params?: z.RawCreateParams) => z.ZodEffects<I, I["_output"], unknown>; promise: <T extends z.ZodTypeAny>(schema: T, params?: z.RawCreateParams) => z.ZodPromise<T>; record: typeof z.ZodRecord.create; set: <Value extends z.ZodTypeAny = z.ZodTypeAny>(valueType: Value, params?: z.RawCreateParams) => z.ZodSet<Value>; strictObject: <T extends z.ZodRawShape>(shape: T, params?: z.RawCreateParams) => z.ZodObject<T, "strict", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<T>]: z.baseObjectInputType<T>[k_1]; }>; string: (params?: ({ errorMap?: z.ZodErrorMap | undefined; invalid_type_error?: string | undefined; required_error?: string | undefined; message?: string | undefined; description?: string | undefined; } & { coerce?: true | undefined; }) | undefined) => z.ZodString; symbol: (params?: z.RawCreateParams) => z.ZodSymbol; transformer: <I extends z.ZodTypeAny>(schema: I, effect: z.Effect<I["_output"]>, params?: z.RawCreateParams) => z.ZodEffects<I, I["_output"], z.input<I>>; tuple: <T extends [] | [z.ZodTypeAny, ...z.ZodTypeAny[]]>(schemas: T, params?: z.RawCreateParams) => z.ZodTuple<T, null>; undefined: (params?: z.RawCreateParams) => z.ZodUndefined; union: <T extends readonly [z.ZodTypeAny, z.ZodTypeAny, ...z.ZodTypeAny[]]>(types: T, params?: z.RawCreateParams) => z.ZodUnion<T>; unknown: (params?: z.RawCreateParams) => z.ZodUnknown; void: (params?: z.RawCreateParams) => z.ZodVoid; NEVER: never; 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"; }; quotelessJson: (obj: any) => string; ZodError: typeof z.ZodError; };