@liip/liipgpt 3.9.2 → 3.10.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +41 -0
  2. package/button/liipgpt-button.js +380 -0
  3. package/chat/liipgpt-chat.js +597 -0
  4. package/config/index.cjs +486 -14005
  5. package/config/index.d.ts +131 -3755
  6. package/config/index.js +486 -14020
  7. package/configurator/_app/env.js +1 -1
  8. package/configurator/_app/immutable/chunks/{ZVK8Dk3M.js → B13xruI8.js} +1 -1
  9. package/configurator/_app/immutable/chunks/B329vHGc.js +75 -0
  10. package/configurator/_app/immutable/chunks/CLWqXHLZ.js +1 -0
  11. package/configurator/_app/immutable/chunks/{C4jvtK34.js → DapuhxtW.js} +1 -1
  12. package/configurator/_app/immutable/chunks/{Qr3QoTpa.js → wIiY1y4I.js} +1 -1
  13. package/configurator/_app/immutable/entry/{app.CNOaE4a-.js → app.Cpi1JfF5.js} +2 -2
  14. package/configurator/_app/immutable/entry/start.DQ_rxjSp.js +1 -0
  15. package/configurator/_app/immutable/nodes/{0.5_GG2VVz.js → 0.CJQl0Am9.js} +2 -2
  16. package/configurator/_app/immutable/nodes/{1.CC4YG4vs.js → 1.CxDbmg05.js} +1 -1
  17. package/configurator/_app/immutable/nodes/{2.Bsn6JT-r.js → 2.Dg_bJbpG.js} +2 -2
  18. package/configurator/_app/immutable/nodes/{3.BGFB6L4G.js → 3.BEsfonzZ.js} +1 -1
  19. package/configurator/_app/version.json +1 -1
  20. package/configurator/index.html +6 -6
  21. package/configurator/sidebar.html +6 -6
  22. package/index.cjs +534 -14050
  23. package/index.d.ts +11 -3754
  24. package/index.js +656 -14187
  25. package/package.json +8 -5
  26. package/search-summary/liipgpt-search-summary.js +63 -0
  27. package/search-summary/load-chat-config-BmoqiHmO.js +326 -0
  28. package/search-summary/translations-utils-o3sWDFbY.js +39 -0
  29. package/configurator/_app/immutable/chunks/CIPNu9Fk.js +0 -1
  30. package/configurator/_app/immutable/chunks/D1JxtiVt.js +0 -75
  31. package/configurator/_app/immutable/entry/start.Dt2jlaUG.js +0 -1
package/config/index.d.ts CHANGED
@@ -1,3723 +1,7 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- export type Schema = ObjectSchema | ArraySchema | StringSchema | NumberSchema | IntegerSchema | BooleanSchema | NullSchema;
4
- export type _JSONSchema = boolean | JSONSchema;
5
- export type JSONSchema = {
6
- [k: string]: unknown;
7
- $schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
8
- $id?: string;
9
- $anchor?: string;
10
- $ref?: string;
11
- $dynamicRef?: string;
12
- $dynamicAnchor?: string;
13
- $vocabulary?: Record<string, boolean>;
14
- $comment?: string;
15
- $defs?: Record<string, JSONSchema>;
16
- type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
17
- additionalItems?: _JSONSchema;
18
- unevaluatedItems?: _JSONSchema;
19
- prefixItems?: _JSONSchema[];
20
- items?: _JSONSchema | _JSONSchema[];
21
- contains?: _JSONSchema;
22
- additionalProperties?: _JSONSchema;
23
- unevaluatedProperties?: _JSONSchema;
24
- properties?: Record<string, _JSONSchema>;
25
- patternProperties?: Record<string, _JSONSchema>;
26
- dependentSchemas?: Record<string, _JSONSchema>;
27
- propertyNames?: _JSONSchema;
28
- if?: _JSONSchema;
29
- then?: _JSONSchema;
30
- else?: _JSONSchema;
31
- allOf?: JSONSchema[];
32
- anyOf?: JSONSchema[];
33
- oneOf?: JSONSchema[];
34
- not?: _JSONSchema;
35
- multipleOf?: number;
36
- maximum?: number;
37
- exclusiveMaximum?: number | boolean;
38
- minimum?: number;
39
- exclusiveMinimum?: number | boolean;
40
- maxLength?: number;
41
- minLength?: number;
42
- pattern?: string;
43
- maxItems?: number;
44
- minItems?: number;
45
- uniqueItems?: boolean;
46
- maxContains?: number;
47
- minContains?: number;
48
- maxProperties?: number;
49
- minProperties?: number;
50
- required?: string[];
51
- dependentRequired?: Record<string, string[]>;
52
- enum?: Array<string | number | boolean | null>;
53
- const?: string | number | boolean | null;
54
- id?: string;
55
- title?: string;
56
- description?: string;
57
- default?: unknown;
58
- deprecated?: boolean;
59
- readOnly?: boolean;
60
- writeOnly?: boolean;
61
- nullable?: boolean;
62
- examples?: unknown[];
63
- format?: string;
64
- contentMediaType?: string;
65
- contentEncoding?: string;
66
- contentSchema?: JSONSchema;
67
- _prefault?: unknown;
68
- };
69
- export type BaseSchema = JSONSchema;
70
- export interface ObjectSchema extends JSONSchema {
71
- type: "object";
72
- }
73
- export interface ArraySchema extends JSONSchema {
74
- type: "array";
75
- }
76
- export interface StringSchema extends JSONSchema {
77
- type: "string";
78
- }
79
- export interface NumberSchema extends JSONSchema {
80
- type: "number";
81
- }
82
- export interface IntegerSchema extends JSONSchema {
83
- type: "integer";
84
- }
85
- export interface BooleanSchema extends JSONSchema {
86
- type: "boolean";
87
- }
88
- export interface NullSchema extends JSONSchema {
89
- type: "null";
90
- }
91
- /** The Standard interface. */
92
- export interface StandardTypedV1<Input = unknown, Output = Input> {
93
- /** The Standard properties. */
94
- readonly "~standard": StandardTypedV1.Props<Input, Output>;
95
- }
96
- declare namespace StandardTypedV1 {
97
- /** The Standard properties interface. */
98
- interface Props<Input = unknown, Output = Input> {
99
- /** The version number of the standard. */
100
- readonly version: 1;
101
- /** The vendor name of the schema library. */
102
- readonly vendor: string;
103
- /** Inferred types associated with the schema. */
104
- readonly types?: Types<Input, Output> | undefined;
105
- }
106
- /** The Standard types interface. */
107
- interface Types<Input = unknown, Output = Input> {
108
- /** The input type of the schema. */
109
- readonly input: Input;
110
- /** The output type of the schema. */
111
- readonly output: Output;
112
- }
113
- /** Infers the input type of a Standard. */
114
- type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
115
- /** Infers the output type of a Standard. */
116
- type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
117
- }
118
- /** The Standard Schema interface. */
119
- export interface StandardSchemaV1<Input = unknown, Output = Input> {
120
- /** The Standard Schema properties. */
121
- readonly "~standard": StandardSchemaV1.Props<Input, Output>;
122
- }
123
- declare namespace StandardSchemaV1 {
124
- /** The Standard Schema properties interface. */
125
- interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
126
- /** Validates unknown input values. */
127
- readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
128
- }
129
- /** The result interface of the validate function. */
130
- type Result<Output> = SuccessResult<Output> | FailureResult;
131
- /** The result interface if validation succeeds. */
132
- interface SuccessResult<Output> {
133
- /** The typed output value. */
134
- readonly value: Output;
135
- /** The absence of issues indicates success. */
136
- readonly issues?: undefined;
137
- }
138
- interface Options {
139
- /** Implicit support for additional vendor-specific parameters, if needed. */
140
- readonly libraryOptions?: Record<string, unknown> | undefined;
141
- }
142
- /** The result interface if validation fails. */
143
- interface FailureResult {
144
- /** The issues of failed validation. */
145
- readonly issues: ReadonlyArray<Issue>;
146
- }
147
- /** The issue interface of the failure output. */
148
- interface Issue {
149
- /** The error message of the issue. */
150
- readonly message: string;
151
- /** The path of the issue, if any. */
152
- readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
153
- }
154
- /** The path segment interface of the issue. */
155
- interface PathSegment {
156
- /** The key representing a path segment. */
157
- readonly key: PropertyKey;
158
- }
159
- /** The Standard types interface. */
160
- interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {
161
- }
162
- /** Infers the input type of a Standard. */
163
- type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
164
- /** Infers the output type of a Standard. */
165
- type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
166
- }
167
- /** The Standard JSON Schema interface. */
168
- export interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
169
- /** The Standard JSON Schema properties. */
170
- readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
171
- }
172
- declare namespace StandardJSONSchemaV1 {
173
- /** The Standard JSON Schema properties interface. */
174
- interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
175
- /** Methods for generating the input/output JSON Schema. */
176
- readonly jsonSchema: Converter;
177
- }
178
- /** The Standard JSON Schema converter interface. */
179
- interface Converter {
180
- /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
181
- readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
182
- /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
183
- readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
184
- }
185
- /** The target version of the generated JSON Schema.
186
- *
187
- * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use.
188
- *
189
- * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
190
- *
191
- * All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
192
- */
193
- type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
194
- /** The options for the input/output methods. */
195
- interface Options {
196
- /** Specifies the target version of the generated JSON Schema. Support for all versions is on a best-effort basis. If a given version is not supported, the library should throw. */
197
- readonly target: Target;
198
- /** Implicit support for additional vendor-specific parameters, if needed. */
199
- readonly libraryOptions?: Record<string, unknown> | undefined;
200
- }
201
- /** The Standard types interface. */
202
- interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {
203
- }
204
- /** Infers the input type of a Standard. */
205
- type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
206
- /** Infers the output type of a Standard. */
207
- type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
208
- }
209
- export interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {
210
- }
211
- declare const $output: unique symbol;
212
- export type $output = typeof $output;
213
- declare const $input: unique symbol;
214
- export type $input = typeof $input;
215
- export type $replace<Meta, S extends $ZodType> = Meta extends $output ? output<S> : Meta extends $input ? input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends (...args: infer P) => infer R ? (...args: {
216
- [K in keyof P]: $replace<P[K], S>;
217
- }) => $replace<R, S> : Meta extends object ? {
218
- [K in keyof Meta]: $replace<Meta[K], S>;
219
- } : Meta;
220
- export type MetadataType = object | undefined;
221
- declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
222
- _meta: Meta;
223
- _schema: Schema;
224
- _map: WeakMap<Schema, $replace<Meta, Schema>>;
225
- _idmap: Map<string, Schema>;
226
- add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [
227
- $replace<Meta, S>?
228
- ] : [
229
- $replace<Meta, S>
230
- ]): this;
231
- clear(): this;
232
- remove(schema: Schema): this;
233
- get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
234
- has(schema: Schema): boolean;
235
- }
236
- export interface JSONSchemaMeta {
237
- id?: string | undefined;
238
- title?: string | undefined;
239
- description?: string | undefined;
240
- deprecated?: boolean | undefined;
241
- [k: string]: unknown;
242
- }
243
- export interface GlobalMeta extends JSONSchemaMeta {
244
- }
245
- declare function registry<T extends MetadataType = MetadataType, S extends $ZodType = $ZodType>(): $ZodRegistry<T, S>;
246
- declare const globalRegistry: $ZodRegistry<GlobalMeta>;
247
- export type Processor<T extends schemas.$ZodType = schemas.$ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: JSONSchema$1.BaseSchema, params: ProcessParams) => void;
248
- export interface JSONSchemaGeneratorParams {
249
- processors: Record<string, Processor>;
250
- /** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
251
- * @default globalRegistry */
252
- metadata?: $ZodRegistry<Record<string, any>>;
253
- /** The JSON Schema version to target.
254
- * - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
255
- * - `"draft-07"` — JSON Schema Draft 7
256
- * - `"draft-04"` — JSON Schema Draft 4
257
- * - `"openapi-3.0"` — OpenAPI 3.0 Schema Object */
258
- target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
259
- /** How to handle unrepresentable types.
260
- * - `"throw"` — Default. Unrepresentable types throw an error
261
- * - `"any"` — Unrepresentable types become `{}` */
262
- unrepresentable?: "throw" | "any";
263
- /** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
264
- override?: (ctx: {
265
- zodSchema: schemas.$ZodTypes;
266
- jsonSchema: JSONSchema$1.BaseSchema;
267
- path: (string | number)[];
268
- }) => void;
269
- /** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, defaults, coerced primitives, etc.
270
- * - `"output"` — Default. Convert the output schema.
271
- * - `"input"` — Convert the input schema. */
272
- io?: "input" | "output";
273
- cycles?: "ref" | "throw";
274
- reused?: "ref" | "inline";
275
- external?: {
276
- registry: $ZodRegistry<{
277
- id?: string | undefined;
278
- }>;
279
- uri?: ((id: string) => string) | undefined;
280
- defs: Record<string, JSONSchema$1.BaseSchema>;
281
- } | undefined;
282
- }
283
- /**
284
- * Parameters for the toJSONSchema function.
285
- */
286
- export type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
287
- /**
288
- * Parameters for the toJSONSchema function when passing a registry.
289
- */
290
- export interface RegistryToJSONSchemaParams extends ToJSONSchemaParams {
291
- uri?: (id: string) => string;
292
- }
293
- export interface ProcessParams {
294
- schemaPath: schemas.$ZodType[];
295
- path: (string | number)[];
296
- }
297
- export interface Seen {
298
- /** JSON Schema result for this Zod schema */
299
- schema: JSONSchema$1.BaseSchema;
300
- /** A cached version of the schema that doesn't get overwritten during ref resolution */
301
- def?: JSONSchema$1.BaseSchema;
302
- defId?: string | undefined;
303
- /** Number of times this schema was encountered during traversal */
304
- count: number;
305
- /** Cycle path */
306
- cycle?: (string | number)[] | undefined;
307
- isParent?: boolean | undefined;
308
- /** Schema to inherit JSON Schema properties from (set by processor for wrappers) */
309
- ref?: schemas.$ZodType | null;
310
- /** JSON Schema property path for this schema */
311
- path?: (string | number)[] | undefined;
312
- }
313
- export interface ToJSONSchemaContext {
314
- processors: Record<string, Processor>;
315
- metadataRegistry: $ZodRegistry<Record<string, any>>;
316
- target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
317
- unrepresentable: "throw" | "any";
318
- override: (ctx: {
319
- zodSchema: schemas.$ZodType;
320
- jsonSchema: JSONSchema$1.BaseSchema;
321
- path: (string | number)[];
322
- }) => void;
323
- io: "input" | "output";
324
- counter: number;
325
- seen: Map<schemas.$ZodType, Seen>;
326
- cycles: "ref" | "throw";
327
- reused: "ref" | "inline";
328
- external?: {
329
- registry: $ZodRegistry<{
330
- id?: string | undefined;
331
- }>;
332
- uri?: ((id: string) => string) | undefined;
333
- defs: Record<string, JSONSchema$1.BaseSchema>;
334
- } | undefined;
335
- }
336
- declare function initializeContext(params: JSONSchemaGeneratorParams): ToJSONSchemaContext;
337
- declare function process$1<T extends schemas.$ZodType>(schema: T, ctx: ToJSONSchemaContext, _params?: ProcessParams): JSONSchema$1.BaseSchema;
338
- declare function extractDefs<T extends schemas.$ZodType>(ctx: ToJSONSchemaContext, schema: T): void;
339
- declare function finalize<T extends schemas.$ZodType>(ctx: ToJSONSchemaContext, schema: T): ZodStandardJSONSchemaPayload<T>;
340
- export type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<core.input<T>, core.output<T>>;
341
- export interface ZodStandardJSONSchemaPayload<T> extends JSONSchema$1.BaseSchema {
342
- "~standard": ZodStandardSchemaWithJSON<T>;
343
- }
344
- declare const createToJSONSchemaMethod: <T extends schemas.$ZodType>(schema: T, processors?: Record<string, Processor>) => (params?: ToJSONSchemaParams) => ZodStandardJSONSchemaPayload<T>;
345
- /**
346
- * Creates a toJSONSchema method for a schema instance.
347
- * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
348
- */
349
- export type StandardJSONSchemaMethodParams = Parameters<StandardJSONSchemaV1["~standard"]["jsonSchema"]["input"]>[0];
350
- declare const createStandardJSONSchemaMethod: <T extends schemas.$ZodType>(schema: T, io: "input" | "output", processors?: Record<string, Processor>) => (params?: StandardJSONSchemaMethodParams) => JSONSchema$1.BaseSchema;
351
- export type JSONType = string | number | boolean | null | JSONType[] | {
352
- [key: string]: JSONType;
353
- };
354
- export type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
355
- export type HashAlgorithm = "md5" | "sha1" | "sha256" | "sha384" | "sha512";
356
- export type HashEncoding = "hex" | "base64" | "base64url";
357
- export type HashFormat = `${HashAlgorithm}_${HashEncoding}`;
358
- export type IPVersion = "v4" | "v6";
359
- export 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 & {});
360
- export type ParsedTypes = "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "file" | "date" | "array" | "map" | "set" | "nan" | "null" | "promise";
361
- export type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
362
- export type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;
363
- export type AssertExtends<T, U> = T extends U ? T : never;
364
- export type IsAny<T> = 0 extends 1 & T ? true : false;
365
- type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
366
- export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
367
- export type MakePartial<T, K extends keyof T> = Omit$1<T, K> & InexactPartial<Pick<T, K>>;
368
- export type MakeRequired<T, K extends keyof T> = Omit$1<T, K> & Required<Pick<T, K>>;
369
- export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
370
- export type NoUndefined<T> = T extends undefined ? never : T;
371
- export type Whatever = {} | undefined | null;
372
- export type LoosePartial<T extends object> = InexactPartial<T> & {
373
- [k: string]: unknown;
374
- };
375
- export type Mask<Keys extends PropertyKey> = {
376
- [K in Keys]?: true;
377
- };
378
- export type Writeable<T> = {
379
- -readonly [P in keyof T]: T[P];
380
- } & {};
381
- export type InexactPartial<T> = {
382
- [P in keyof T]?: T[P] | undefined;
383
- };
384
- export type EmptyObject = Record<string, never>;
385
- export type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
386
- readonly [Symbol.toStringTag]: string;
387
- } | Date | Error | Generator | Promise<unknown> | RegExp;
388
- export type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [
389
- infer Head,
390
- ...infer Tail
391
- ] ? readonly [
392
- Head,
393
- ...Tail
394
- ] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;
395
- export type SomeObject = Record<PropertyKey, any>;
396
- export type Identity<T> = T;
397
- export type Flatten<T> = Identity<{
398
- [k in keyof T]: T[k];
399
- }>;
400
- export type Mapped<T> = {
401
- [k in keyof T]: T[k];
402
- };
403
- export type Prettify<T> = {
404
- [K in keyof T]: T[K];
405
- } & {};
406
- export type NoNeverKeys<T> = {
407
- [k in keyof T]: [
408
- T[k]
409
- ] extends [
410
- never
411
- ] ? never : k;
412
- }[keyof T];
413
- export type NoNever<T> = Identity<{
414
- [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;
415
- }>;
416
- export type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : {
417
- [K in keyof A as K extends keyof B ? never : K]: A[K];
418
- } & {
419
- [K in keyof B]: B[K];
420
- }>;
421
- export type TupleItems = ReadonlyArray<schemas.SomeType>;
422
- export type AnyFunc = (...args: any[]) => any;
423
- export type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;
424
- export type MaybeAsync<T> = T | Promise<T>;
425
- export type KeyOf<T> = keyof OmitIndexSignature<T>;
426
- export type OmitIndexSignature<T> = {
427
- [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];
428
- };
429
- export type ExtractIndexSignature<T> = {
430
- [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];
431
- };
432
- export type Keys<T extends object> = keyof OmitIndexSignature<T>;
433
- export type SchemaClass<T extends schemas.SomeType> = {
434
- new (def: T["_zod"]["def"]): T;
435
- };
436
- export type EnumValue = string | number;
437
- export type EnumLike = Readonly<Record<string, EnumValue>>;
438
- export type ToEnum<T extends EnumValue> = Flatten<{
439
- [k in T]: k;
440
- }>;
441
- export type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;
442
- export type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;
443
- export type Literal = string | number | bigint | boolean | null | undefined;
444
- export type LiteralArray = Array<Literal>;
445
- export type Primitive = string | number | symbol | bigint | boolean | null | undefined;
446
- export type PrimitiveArray = Array<Primitive>;
447
- export type HasSize = {
448
- size: number;
449
- };
450
- export type HasLength = {
451
- length: number;
452
- };
453
- export type Numeric = number | bigint | Date;
454
- export type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;
455
- export type SafeParseSuccess<T> = {
456
- success: true;
457
- data: T;
458
- error?: never;
459
- };
460
- export type SafeParseError<T> = {
461
- success: false;
462
- data?: never;
463
- error: $ZodError<T>;
464
- };
465
- export type PropValues = Record<string, Set<Primitive>>;
466
- export type PrimitiveSet = Set<Primitive>;
467
- declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;
468
- declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;
469
- declare function assertIs<T>(_arg: T): void;
470
- declare function assertNever(_x: never): never;
471
- declare function assert<T>(_: any): asserts _ is T;
472
- declare function getEnumValues(entries: EnumLike): EnumValue[];
473
- declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;
474
- declare function jsonStringifyReplacer(_: string, value: any): any;
475
- declare function cached<T>(getter: () => T): {
476
- value: T;
477
- };
478
- declare function nullish(input: any): boolean;
479
- declare function cleanRegex(source: string): string;
480
- declare function floatSafeRemainder(val: number, step: number): number;
481
- declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;
482
- declare function objectClone(obj: object): any;
483
- declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;
484
- declare function mergeDefs(...defs: Record<string, any>[]): any;
485
- declare function cloneDef(schema: schemas.$ZodType): any;
486
- declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;
487
- declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{
488
- [k in keyof T]: Awaited<T[k]>;
489
- }>;
490
- declare function randomString(length?: number): string;
491
- declare function esc(str: string): string;
492
- declare function slugify(input: string): string;
493
- declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;
494
- declare function isObject(data: any): data is Record<PropertyKey, unknown>;
495
- declare const allowsEval: {
496
- value: boolean;
497
- };
498
- declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;
499
- declare function shallowClone(o: any): any;
500
- declare function numKeys(data: any): number;
501
- declare const getParsedType: (data: any) => ParsedTypes;
502
- declare const propertyKeyTypes: Set<string>;
503
- declare const primitiveTypes: Set<string>;
504
- declare function escapeRegex(str: string): string;
505
- declare function clone<T extends schemas.$ZodType>(inst: T, def?: T["_zod"]["def"], params?: {
506
- parent: boolean;
507
- }): T;
508
- export type EmptyToNever<T> = keyof T extends never ? never : T;
509
- export type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{
510
- [k in keyof Omit$1<T, "error" | "message">]: T[k];
511
- } & ("error" extends keyof T ? {
512
- error?: Exclude<T["error"], string>;
513
- } : unknown)> : never;
514
- declare function normalizeParams<T>(_params: T): Normalize<T>;
515
- declare function createTransparentProxy<T extends object>(getter: () => T): T;
516
- declare function stringifyPrimitive(value: any): string;
517
- declare function optionalKeys(shape: schemas.$ZodShape): string[];
518
- export type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;
519
- export type ToCleanMap<T extends schemas.$ZodLooseShape> = {
520
- [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;
521
- };
522
- export type FromCleanMap<T extends schemas.$ZodLooseShape> = {
523
- [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;
524
- };
525
- declare const NUMBER_FORMAT_RANGES: Record<$ZodNumberFormats, [
526
- number,
527
- number
528
- ]>;
529
- declare const BIGINT_FORMAT_RANGES: Record<$ZodBigIntFormats, [
530
- bigint,
531
- bigint
532
- ]>;
533
- declare function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any;
534
- declare function omit(schema: schemas.$ZodObject, mask: object): any;
535
- declare function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;
536
- declare function safeExtend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;
537
- declare function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any;
538
- declare function partial(Class: SchemaClass<schemas.$ZodOptional> | null, schema: schemas.$ZodObject, mask: object | undefined): any;
539
- declare function required(Class: SchemaClass<schemas.$ZodNonOptional>, schema: schemas.$ZodObject, mask: object | undefined): any;
540
- export type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;
541
- declare function aborted(x: schemas.ParsePayload, startIndex?: number): boolean;
542
- declare function prefixIssues(path: PropertyKey, issues: $ZodRawIssue[]): $ZodRawIssue[];
543
- declare function unwrapMessage(message: string | {
544
- message: string;
545
- } | undefined | null): string | undefined;
546
- declare function finalizeIssue(iss: $ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): $ZodIssue;
547
- declare function getSizableOrigin(input: any): "set" | "map" | "file" | "unknown";
548
- declare function getLengthableOrigin(input: any): "array" | "string" | "unknown";
549
- declare function parsedType(data: unknown): $ZodInvalidTypeExpected;
550
- declare function issue(_iss: string, input: any, inst: any): $ZodRawIssue;
551
- declare function issue(_iss: $ZodRawIssue): $ZodRawIssue;
552
- declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];
553
- declare function base64ToUint8Array(base64: string): InstanceType<typeof Uint8Array>;
554
- declare function uint8ArrayToBase64(bytes: Uint8Array): string;
555
- declare function base64urlToUint8Array(base64url: string): InstanceType<typeof Uint8Array>;
556
- declare function uint8ArrayToBase64url(bytes: Uint8Array): string;
557
- declare function hexToUint8Array(hex: string): InstanceType<typeof Uint8Array>;
558
- declare function uint8ArrayToHex(bytes: Uint8Array): string;
559
- declare abstract class Class {
560
- constructor(..._args: any[]);
561
- }
562
- declare const version: {
563
- readonly major: 4;
564
- readonly minor: 3;
565
- readonly patch: number;
566
- };
567
- export interface ParseContext<T extends $ZodIssueBase = never> {
568
- /** Customize error messages. */
569
- readonly error?: $ZodErrorMap<T>;
570
- /** Include the `input` field in issue objects. Default `false`. */
571
- readonly reportInput?: boolean;
572
- /** Skip eval-based fast path. Default `false`. */
573
- readonly jitless?: boolean;
574
- }
575
- /** @internal */
576
- export interface ParseContextInternal<T extends $ZodIssueBase = never> extends ParseContext<T> {
577
- readonly async?: boolean | undefined;
578
- readonly direction?: "forward" | "backward";
579
- readonly skipChecks?: boolean;
580
- }
581
- export interface ParsePayload<T = unknown> {
582
- value: T;
583
- issues: $ZodRawIssue[];
584
- /** A may to mark a whole payload as aborted. Used in codecs/pipes. */
585
- aborted?: boolean;
586
- }
587
- export type CheckFn<T> = (input: ParsePayload<T>) => util.MaybeAsync<void>;
588
- export interface $ZodTypeDef {
589
- 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";
590
- error?: $ZodErrorMap<never> | undefined;
591
- checks?: $ZodCheck<never>[];
592
- }
593
- export interface _$ZodTypeInternals {
594
- /** The `@zod/core` version of this schema */
595
- version: typeof version;
596
- /** Schema definition. */
597
- def: $ZodTypeDef;
598
- /** @internal Randomly generated ID for this schema. */
599
- /** @internal List of deferred initializers. */
600
- deferred: util.AnyFunc[] | undefined;
601
- /** @internal Parses input and runs all checks (refinements). */
602
- run(payload: ParsePayload<any>, ctx: ParseContextInternal): util.MaybeAsync<ParsePayload>;
603
- /** @internal Parses input, doesn't run checks. */
604
- parse(payload: ParsePayload<any>, ctx: ParseContextInternal): util.MaybeAsync<ParsePayload>;
605
- /** @internal Stores identifiers for the set of traits implemented by this schema. */
606
- traits: Set<string>;
607
- /** @internal Indicates that a schema output type should be considered optional inside objects.
608
- * @default Required
609
- */
610
- /** @internal */
611
- optin?: "optional" | undefined;
612
- /** @internal */
613
- optout?: "optional" | undefined;
614
- /** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
615
- *
616
- * Defined on: enum, const, literal, null, undefined
617
- * Passthrough: optional, nullable, branded, default, catch, pipe
618
- * Todo: unions?
619
- */
620
- values?: util.PrimitiveSet | undefined;
621
- /** Default value bubbled up from */
622
- /** @internal A set of literal discriminators used for the fast path in discriminated unions. */
623
- propValues?: util.PropValues | undefined;
624
- /** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
625
- pattern: RegExp | undefined;
626
- /** @internal The constructor function of this schema. */
627
- constr: new (def: any) => $ZodType;
628
- /** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
629
- bag: Record<string, unknown>;
630
- /** @internal The set of issues this schema might throw during type checking. */
631
- isst: $ZodIssueBase;
632
- /** @internal Subject to change, not a public API. */
633
- processJSONSchema?: ((ctx: ToJSONSchemaContext, json: JSONSchema$1.BaseSchema, params: ProcessParams) => void) | undefined;
634
- /** An optional method used to override `toJSONSchema` logic. */
635
- toJSONSchema?: () => unknown;
636
- /** @internal The parent of this schema. Only set during certain clone operations. */
637
- parent?: $ZodType | undefined;
638
- }
639
- /** @internal */
640
- export interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
641
- /** @internal The inferred output type */
642
- output: O;
643
- /** @internal The inferred input type */
644
- input: I;
645
- }
646
- export type $ZodStandardSchema<T> = StandardSchemaV1.Props<input<T>, output<T>>;
647
- export type SomeType = {
648
- _zod: _$ZodTypeInternals;
649
- };
650
- export interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
651
- _zod: Internals;
652
- "~standard": $ZodStandardSchema<this>;
653
- }
654
- export interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T["output"], T["input"], T> {
655
- }
656
- declare const $ZodType: $constructor<$ZodType>;
657
- export interface $ZodStringDef extends $ZodTypeDef {
658
- type: "string";
659
- coerce?: boolean;
660
- checks?: $ZodCheck<string>[];
661
- }
662
- export interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
663
- def: $ZodStringDef;
664
- /** @deprecated Internal API, use with caution (not deprecated) */
665
- pattern: RegExp;
666
- /** @deprecated Internal API, use with caution (not deprecated) */
667
- isst: $ZodIssueInvalidType;
668
- bag: util.LoosePartial<{
669
- minimum: number;
670
- maximum: number;
671
- patterns: Set<RegExp>;
672
- format: string;
673
- contentEncoding: string;
674
- }>;
675
- }
676
- export interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {
677
- }
678
- declare const $ZodString: $constructor<$ZodString>;
679
- export interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, $ZodCheckStringFormatDef<Format> {
680
- }
681
- export interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, $ZodCheckStringFormatInternals {
682
- def: $ZodStringFormatDef<Format>;
683
- }
684
- export interface $ZodStringFormat<Format extends string = string> extends $ZodType {
685
- _zod: $ZodStringFormatInternals<Format>;
686
- }
687
- declare const $ZodStringFormat: $constructor<$ZodStringFormat>;
688
- export interface $ZodGUIDDef extends $ZodStringFormatDef<"guid"> {
689
- }
690
- export interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {
691
- }
692
- export interface $ZodGUID extends $ZodType {
693
- _zod: $ZodGUIDInternals;
694
- }
695
- declare const $ZodGUID: $constructor<$ZodGUID>;
696
- export interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
697
- version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
698
- }
699
- export interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
700
- def: $ZodUUIDDef;
701
- }
702
- export interface $ZodUUID extends $ZodType {
703
- _zod: $ZodUUIDInternals;
704
- }
705
- declare const $ZodUUID: $constructor<$ZodUUID>;
706
- export interface $ZodEmailDef extends $ZodStringFormatDef<"email"> {
707
- }
708
- export interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {
709
- }
710
- export interface $ZodEmail extends $ZodType {
711
- _zod: $ZodEmailInternals;
712
- }
713
- declare const $ZodEmail: $constructor<$ZodEmail>;
714
- export interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
715
- hostname?: RegExp | undefined;
716
- protocol?: RegExp | undefined;
717
- normalize?: boolean | undefined;
718
- }
719
- export interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
720
- def: $ZodURLDef;
721
- }
722
- export interface $ZodURL extends $ZodType {
723
- _zod: $ZodURLInternals;
724
- }
725
- declare const $ZodURL: $constructor<$ZodURL>;
726
- export interface $ZodEmojiDef extends $ZodStringFormatDef<"emoji"> {
727
- }
728
- export interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {
729
- }
730
- export interface $ZodEmoji extends $ZodType {
731
- _zod: $ZodEmojiInternals;
732
- }
733
- declare const $ZodEmoji: $constructor<$ZodEmoji>;
734
- export interface $ZodNanoIDDef extends $ZodStringFormatDef<"nanoid"> {
735
- }
736
- export interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {
737
- }
738
- export interface $ZodNanoID extends $ZodType {
739
- _zod: $ZodNanoIDInternals;
740
- }
741
- declare const $ZodNanoID: $constructor<$ZodNanoID>;
742
- export interface $ZodCUIDDef extends $ZodStringFormatDef<"cuid"> {
743
- }
744
- export interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {
745
- }
746
- export interface $ZodCUID extends $ZodType {
747
- _zod: $ZodCUIDInternals;
748
- }
749
- declare const $ZodCUID: $constructor<$ZodCUID>;
750
- export interface $ZodCUID2Def extends $ZodStringFormatDef<"cuid2"> {
751
- }
752
- export interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {
753
- }
754
- export interface $ZodCUID2 extends $ZodType {
755
- _zod: $ZodCUID2Internals;
756
- }
757
- declare const $ZodCUID2: $constructor<$ZodCUID2>;
758
- export interface $ZodULIDDef extends $ZodStringFormatDef<"ulid"> {
759
- }
760
- export interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {
761
- }
762
- export interface $ZodULID extends $ZodType {
763
- _zod: $ZodULIDInternals;
764
- }
765
- declare const $ZodULID: $constructor<$ZodULID>;
766
- export interface $ZodXIDDef extends $ZodStringFormatDef<"xid"> {
767
- }
768
- export interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {
769
- }
770
- export interface $ZodXID extends $ZodType {
771
- _zod: $ZodXIDInternals;
772
- }
773
- declare const $ZodXID: $constructor<$ZodXID>;
774
- export interface $ZodKSUIDDef extends $ZodStringFormatDef<"ksuid"> {
775
- }
776
- export interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {
777
- }
778
- export interface $ZodKSUID extends $ZodType {
779
- _zod: $ZodKSUIDInternals;
780
- }
781
- declare const $ZodKSUID: $constructor<$ZodKSUID>;
782
- export interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
783
- precision: number | null;
784
- offset: boolean;
785
- local: boolean;
786
- }
787
- export interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
788
- def: $ZodISODateTimeDef;
789
- }
790
- export interface $ZodISODateTime extends $ZodType {
791
- _zod: $ZodISODateTimeInternals;
792
- }
793
- declare const $ZodISODateTime: $constructor<$ZodISODateTime>;
794
- export interface $ZodISODateDef extends $ZodStringFormatDef<"date"> {
795
- }
796
- export interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {
797
- }
798
- export interface $ZodISODate extends $ZodType {
799
- _zod: $ZodISODateInternals;
800
- }
801
- declare const $ZodISODate: $constructor<$ZodISODate>;
802
- export interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
803
- precision?: number | null;
804
- }
805
- export interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
806
- def: $ZodISOTimeDef;
807
- }
808
- export interface $ZodISOTime extends $ZodType {
809
- _zod: $ZodISOTimeInternals;
810
- }
811
- declare const $ZodISOTime: $constructor<$ZodISOTime>;
812
- export interface $ZodISODurationDef extends $ZodStringFormatDef<"duration"> {
813
- }
814
- export interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {
815
- }
816
- export interface $ZodISODuration extends $ZodType {
817
- _zod: $ZodISODurationInternals;
818
- }
819
- declare const $ZodISODuration: $constructor<$ZodISODuration>;
820
- export interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
821
- version?: "v4";
822
- }
823
- export interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
824
- def: $ZodIPv4Def;
825
- }
826
- export interface $ZodIPv4 extends $ZodType {
827
- _zod: $ZodIPv4Internals;
828
- }
829
- declare const $ZodIPv4: $constructor<$ZodIPv4>;
830
- export interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
831
- version?: "v6";
832
- }
833
- export interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
834
- def: $ZodIPv6Def;
835
- }
836
- export interface $ZodIPv6 extends $ZodType {
837
- _zod: $ZodIPv6Internals;
838
- }
839
- declare const $ZodIPv6: $constructor<$ZodIPv6>;
840
- export interface $ZodMACDef extends $ZodStringFormatDef<"mac"> {
841
- delimiter?: string;
842
- }
843
- export interface $ZodMACInternals extends $ZodStringFormatInternals<"mac"> {
844
- def: $ZodMACDef;
845
- }
846
- export interface $ZodMAC extends $ZodType {
847
- _zod: $ZodMACInternals;
848
- }
849
- declare const $ZodMAC: $constructor<$ZodMAC>;
850
- export interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
851
- version?: "v4";
852
- }
853
- export interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
854
- def: $ZodCIDRv4Def;
855
- }
856
- export interface $ZodCIDRv4 extends $ZodType {
857
- _zod: $ZodCIDRv4Internals;
858
- }
859
- declare const $ZodCIDRv4: $constructor<$ZodCIDRv4>;
860
- export interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
861
- version?: "v6";
862
- }
863
- export interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
864
- def: $ZodCIDRv6Def;
865
- }
866
- export interface $ZodCIDRv6 extends $ZodType {
867
- _zod: $ZodCIDRv6Internals;
868
- }
869
- declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>;
870
- declare function isValidBase64(data: string): boolean;
871
- export interface $ZodBase64Def extends $ZodStringFormatDef<"base64"> {
872
- }
873
- export interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {
874
- }
875
- export interface $ZodBase64 extends $ZodType {
876
- _zod: $ZodBase64Internals;
877
- }
878
- declare const $ZodBase64: $constructor<$ZodBase64>;
879
- declare function isValidBase64URL(data: string): boolean;
880
- export interface $ZodBase64URLDef extends $ZodStringFormatDef<"base64url"> {
881
- }
882
- export interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {
883
- }
884
- export interface $ZodBase64URL extends $ZodType {
885
- _zod: $ZodBase64URLInternals;
886
- }
887
- declare const $ZodBase64URL: $constructor<$ZodBase64URL>;
888
- export interface $ZodE164Def extends $ZodStringFormatDef<"e164"> {
889
- }
890
- export interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {
891
- }
892
- export interface $ZodE164 extends $ZodType {
893
- _zod: $ZodE164Internals;
894
- }
895
- declare const $ZodE164: $constructor<$ZodE164>;
896
- declare function isValidJWT(token: string, algorithm?: util.JWTAlgorithm | null): boolean;
897
- export interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
898
- alg?: util.JWTAlgorithm | undefined;
899
- }
900
- export interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
901
- def: $ZodJWTDef;
902
- }
903
- export interface $ZodJWT extends $ZodType {
904
- _zod: $ZodJWTInternals;
905
- }
906
- declare const $ZodJWT: $constructor<$ZodJWT>;
907
- export interface $ZodCustomStringFormatDef<Format extends string = string> extends $ZodStringFormatDef<Format> {
908
- fn: (val: string) => unknown;
909
- }
910
- export interface $ZodCustomStringFormatInternals<Format extends string = string> extends $ZodStringFormatInternals<Format> {
911
- def: $ZodCustomStringFormatDef<Format>;
912
- }
913
- export interface $ZodCustomStringFormat<Format extends string = string> extends $ZodStringFormat<Format> {
914
- _zod: $ZodCustomStringFormatInternals<Format>;
915
- }
916
- declare const $ZodCustomStringFormat: $constructor<$ZodCustomStringFormat>;
917
- export interface $ZodNumberDef extends $ZodTypeDef {
918
- type: "number";
919
- coerce?: boolean;
920
- }
921
- export interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
922
- def: $ZodNumberDef;
923
- /** @deprecated Internal API, use with caution (not deprecated) */
924
- pattern: RegExp;
925
- /** @deprecated Internal API, use with caution (not deprecated) */
926
- isst: $ZodIssueInvalidType;
927
- bag: util.LoosePartial<{
928
- minimum: number;
929
- maximum: number;
930
- exclusiveMinimum: number;
931
- exclusiveMaximum: number;
932
- format: string;
933
- pattern: RegExp;
934
- }>;
935
- }
936
- export interface $ZodNumber<Input = unknown> extends $ZodType {
937
- _zod: $ZodNumberInternals<Input>;
938
- }
939
- declare const $ZodNumber: $constructor<$ZodNumber>;
940
- export interface $ZodNumberFormatDef extends $ZodNumberDef, $ZodCheckNumberFormatDef {
941
- }
942
- export interface $ZodNumberFormatInternals extends $ZodNumberInternals<number>, $ZodCheckNumberFormatInternals {
943
- def: $ZodNumberFormatDef;
944
- isst: $ZodIssueInvalidType;
945
- }
946
- export interface $ZodNumberFormat extends $ZodType {
947
- _zod: $ZodNumberFormatInternals;
948
- }
949
- declare const $ZodNumberFormat: $constructor<$ZodNumberFormat>;
950
- export interface $ZodBooleanDef extends $ZodTypeDef {
951
- type: "boolean";
952
- coerce?: boolean;
953
- checks?: $ZodCheck<boolean>[];
954
- }
955
- export interface $ZodBooleanInternals<T = unknown> extends $ZodTypeInternals<boolean, T> {
956
- pattern: RegExp;
957
- def: $ZodBooleanDef;
958
- isst: $ZodIssueInvalidType;
959
- }
960
- export interface $ZodBoolean<T = unknown> extends $ZodType {
961
- _zod: $ZodBooleanInternals<T>;
962
- }
963
- declare const $ZodBoolean: $constructor<$ZodBoolean>;
964
- export interface $ZodBigIntDef extends $ZodTypeDef {
965
- type: "bigint";
966
- coerce?: boolean;
967
- }
968
- export interface $ZodBigIntInternals<T = unknown> extends $ZodTypeInternals<bigint, T> {
969
- pattern: RegExp;
970
- /** @internal Internal API, use with caution */
971
- def: $ZodBigIntDef;
972
- isst: $ZodIssueInvalidType;
973
- bag: util.LoosePartial<{
974
- minimum: bigint;
975
- maximum: bigint;
976
- format: string;
977
- }>;
978
- }
979
- export interface $ZodBigInt<T = unknown> extends $ZodType {
980
- _zod: $ZodBigIntInternals<T>;
981
- }
982
- declare const $ZodBigInt: $constructor<$ZodBigInt>;
983
- export interface $ZodBigIntFormatDef extends $ZodBigIntDef, $ZodCheckBigIntFormatDef {
984
- check: "bigint_format";
985
- }
986
- export interface $ZodBigIntFormatInternals extends $ZodBigIntInternals<bigint>, $ZodCheckBigIntFormatInternals {
987
- def: $ZodBigIntFormatDef;
988
- }
989
- export interface $ZodBigIntFormat extends $ZodType {
990
- _zod: $ZodBigIntFormatInternals;
991
- }
992
- declare const $ZodBigIntFormat: $constructor<$ZodBigIntFormat>;
993
- export interface $ZodSymbolDef extends $ZodTypeDef {
994
- type: "symbol";
995
- }
996
- export interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
997
- def: $ZodSymbolDef;
998
- isst: $ZodIssueInvalidType;
999
- }
1000
- export interface $ZodSymbol extends $ZodType {
1001
- _zod: $ZodSymbolInternals;
1002
- }
1003
- declare const $ZodSymbol: $constructor<$ZodSymbol>;
1004
- export interface $ZodUndefinedDef extends $ZodTypeDef {
1005
- type: "undefined";
1006
- }
1007
- export interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
1008
- pattern: RegExp;
1009
- def: $ZodUndefinedDef;
1010
- values: util.PrimitiveSet;
1011
- isst: $ZodIssueInvalidType;
1012
- }
1013
- export interface $ZodUndefined extends $ZodType {
1014
- _zod: $ZodUndefinedInternals;
1015
- }
1016
- declare const $ZodUndefined: $constructor<$ZodUndefined>;
1017
- export interface $ZodNullDef extends $ZodTypeDef {
1018
- type: "null";
1019
- }
1020
- export interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
1021
- pattern: RegExp;
1022
- def: $ZodNullDef;
1023
- values: util.PrimitiveSet;
1024
- isst: $ZodIssueInvalidType;
1025
- }
1026
- export interface $ZodNull extends $ZodType {
1027
- _zod: $ZodNullInternals;
1028
- }
1029
- declare const $ZodNull: $constructor<$ZodNull>;
1030
- export interface $ZodAnyDef extends $ZodTypeDef {
1031
- type: "any";
1032
- }
1033
- export interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
1034
- def: $ZodAnyDef;
1035
- isst: never;
1036
- }
1037
- export interface $ZodAny extends $ZodType {
1038
- _zod: $ZodAnyInternals;
1039
- }
1040
- declare const $ZodAny: $constructor<$ZodAny>;
1041
- export interface $ZodUnknownDef extends $ZodTypeDef {
1042
- type: "unknown";
1043
- }
1044
- export interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
1045
- def: $ZodUnknownDef;
1046
- isst: never;
1047
- }
1048
- export interface $ZodUnknown extends $ZodType {
1049
- _zod: $ZodUnknownInternals;
1050
- }
1051
- declare const $ZodUnknown: $constructor<$ZodUnknown>;
1052
- export interface $ZodNeverDef extends $ZodTypeDef {
1053
- type: "never";
1054
- }
1055
- export interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
1056
- def: $ZodNeverDef;
1057
- isst: $ZodIssueInvalidType;
1058
- }
1059
- export interface $ZodNever extends $ZodType {
1060
- _zod: $ZodNeverInternals;
1061
- }
1062
- declare const $ZodNever: $constructor<$ZodNever>;
1063
- export interface $ZodVoidDef extends $ZodTypeDef {
1064
- type: "void";
1065
- }
1066
- export interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
1067
- def: $ZodVoidDef;
1068
- isst: $ZodIssueInvalidType;
1069
- }
1070
- export interface $ZodVoid extends $ZodType {
1071
- _zod: $ZodVoidInternals;
1072
- }
1073
- declare const $ZodVoid: $constructor<$ZodVoid>;
1074
- export interface $ZodDateDef extends $ZodTypeDef {
1075
- type: "date";
1076
- coerce?: boolean;
1077
- }
1078
- export interface $ZodDateInternals<T = unknown> extends $ZodTypeInternals<Date, T> {
1079
- def: $ZodDateDef;
1080
- isst: $ZodIssueInvalidType;
1081
- bag: util.LoosePartial<{
1082
- minimum: Date;
1083
- maximum: Date;
1084
- format: string;
1085
- }>;
1086
- }
1087
- export interface $ZodDate<T = unknown> extends $ZodType {
1088
- _zod: $ZodDateInternals<T>;
1089
- }
1090
- declare const $ZodDate: $constructor<$ZodDate>;
1091
- export interface $ZodArrayDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1092
- type: "array";
1093
- element: T;
1094
- }
1095
- export interface $ZodArrayInternals<T extends SomeType = $ZodType> extends _$ZodTypeInternals {
1096
- def: $ZodArrayDef<T>;
1097
- isst: $ZodIssueInvalidType;
1098
- output: output<T>[];
1099
- input: input<T>[];
1100
- }
1101
- export interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {
1102
- }
1103
- declare const $ZodArray: $constructor<$ZodArray>;
1104
- export type OptionalOutSchema = {
1105
- _zod: {
1106
- optout: "optional";
1107
- };
1108
- };
1109
- export type OptionalInSchema = {
1110
- _zod: {
1111
- optin: "optional";
1112
- };
1113
- };
1114
- export type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? util.IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, output<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : util.Prettify<{
1115
- -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"];
1116
- } & {
1117
- -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"];
1118
- } & Extra>;
1119
- export type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? util.IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, input<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : util.Prettify<{
1120
- -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"];
1121
- } & {
1122
- -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"];
1123
- } & Extra>;
1124
- export type $ZodObjectConfig = {
1125
- out: Record<string, unknown>;
1126
- in: Record<string, unknown>;
1127
- };
1128
- export type $loose = {
1129
- out: Record<string, unknown>;
1130
- in: Record<string, unknown>;
1131
- };
1132
- export type $strict = {
1133
- out: {};
1134
- in: {};
1135
- };
1136
- export type $strip = {
1137
- out: {};
1138
- in: {};
1139
- };
1140
- export type $catchall<T extends SomeType> = {
1141
- out: {
1142
- [k: string]: output<T>;
1143
- };
1144
- in: {
1145
- [k: string]: input<T>;
1146
- };
1147
- };
1148
- export type $ZodShape = Readonly<{
1149
- [k: string]: $ZodType;
1150
- }>;
1151
- export interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
1152
- type: "object";
1153
- shape: Shape;
1154
- catchall?: $ZodType | undefined;
1155
- }
1156
- export interface $ZodObjectInternals<
1157
- /** @ts-ignore Cast variance */
1158
- out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
1159
- def: $ZodObjectDef<Shape>;
1160
- config: Config;
1161
- isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
1162
- propValues: util.PropValues;
1163
- output: $InferObjectOutput<Shape, Config["out"]>;
1164
- input: $InferObjectInput<Shape, Config["in"]>;
1165
- optin?: "optional" | undefined;
1166
- optout?: "optional" | undefined;
1167
- }
1168
- export type $ZodLooseShape = Record<string, any>;
1169
- export interface $ZodObject<
1170
- /** @ts-ignore Cast variance */
1171
- out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {
1172
- }
1173
- declare const $ZodObject: $constructor<$ZodObject>;
1174
- declare const $ZodObjectJIT: $constructor<$ZodObject>;
1175
- export type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
1176
- export type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
1177
- export interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
1178
- type: "union";
1179
- options: Options;
1180
- inclusive?: boolean;
1181
- }
1182
- export type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
1183
- export type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
1184
- export interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends _$ZodTypeInternals {
1185
- def: $ZodUnionDef<T>;
1186
- isst: $ZodIssueInvalidUnion;
1187
- pattern: T[number]["_zod"]["pattern"];
1188
- values: T[number]["_zod"]["values"];
1189
- output: $InferUnionOutput<T[number]>;
1190
- input: $InferUnionInput<T[number]>;
1191
- optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
1192
- optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
1193
- }
1194
- export interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodUnionInternals<T>> {
1195
- _zod: $ZodUnionInternals<T>;
1196
- }
1197
- declare const $ZodUnion: $constructor<$ZodUnion>;
1198
- export interface $ZodXorInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodUnionInternals<T> {
1199
- }
1200
- export interface $ZodXor<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodXorInternals<T>> {
1201
- _zod: $ZodXorInternals<T>;
1202
- }
1203
- declare const $ZodXor: $constructor<$ZodXor>;
1204
- export interface $ZodDiscriminatedUnionDef<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionDef<Options> {
1205
- discriminator: Disc;
1206
- unionFallback?: boolean;
1207
- }
1208
- export interface $ZodDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionInternals<Options> {
1209
- def: $ZodDiscriminatedUnionDef<Options, Disc>;
1210
- propValues: util.PropValues;
1211
- }
1212
- export interface $ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodType {
1213
- _zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
1214
- }
1215
- declare const $ZodDiscriminatedUnion: $constructor<$ZodDiscriminatedUnion>;
1216
- export interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
1217
- type: "intersection";
1218
- left: Left;
1219
- right: Right;
1220
- }
1221
- export interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
1222
- def: $ZodIntersectionDef<A, B>;
1223
- isst: never;
1224
- optin: A["_zod"]["optin"] | B["_zod"]["optin"];
1225
- optout: A["_zod"]["optout"] | B["_zod"]["optout"];
1226
- output: output<A> & output<B>;
1227
- input: input<A> & input<B>;
1228
- }
1229
- export interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
1230
- _zod: $ZodIntersectionInternals<A, B>;
1231
- }
1232
- declare const $ZodIntersection: $constructor<$ZodIntersection>;
1233
- export interface $ZodTupleDef<T extends util.TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
1234
- type: "tuple";
1235
- items: T;
1236
- rest: Rest;
1237
- }
1238
- export type $InferTupleInputType<T extends util.TupleItems, Rest extends SomeType | null> = [
1239
- ...TupleInputTypeWithOptionals<T>,
1240
- ...(Rest extends SomeType ? input<Rest>[] : [
1241
- ])
1242
- ];
1243
- export type TupleInputTypeNoOptionals<T extends util.TupleItems> = {
1244
- [k in keyof T]: input<T[k]>;
1245
- };
1246
- export type TupleInputTypeWithOptionals<T extends util.TupleItems> = T extends readonly [
1247
- ...infer Prefix extends SomeType[],
1248
- infer Tail extends SomeType
1249
- ] ? Tail["_zod"]["optin"] extends "optional" ? [
1250
- ...TupleInputTypeWithOptionals<Prefix>,
1251
- input<Tail>?
1252
- ] : TupleInputTypeNoOptionals<T> : [
1253
- ];
1254
- export type $InferTupleOutputType<T extends util.TupleItems, Rest extends SomeType | null> = [
1255
- ...TupleOutputTypeWithOptionals<T>,
1256
- ...(Rest extends SomeType ? output<Rest>[] : [
1257
- ])
1258
- ];
1259
- export type TupleOutputTypeNoOptionals<T extends util.TupleItems> = {
1260
- [k in keyof T]: output<T[k]>;
1261
- };
1262
- export type TupleOutputTypeWithOptionals<T extends util.TupleItems> = T extends readonly [
1263
- ...infer Prefix extends SomeType[],
1264
- infer Tail extends SomeType
1265
- ] ? Tail["_zod"]["optout"] extends "optional" ? [
1266
- ...TupleOutputTypeWithOptionals<Prefix>,
1267
- output<Tail>?
1268
- ] : TupleOutputTypeNoOptionals<T> : [
1269
- ];
1270
- export interface $ZodTupleInternals<T extends util.TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends _$ZodTypeInternals {
1271
- def: $ZodTupleDef<T, Rest>;
1272
- isst: $ZodIssueInvalidType | $ZodIssueTooBig<unknown[]> | $ZodIssueTooSmall<unknown[]>;
1273
- output: $InferTupleOutputType<T, Rest>;
1274
- input: $InferTupleInputType<T, Rest>;
1275
- }
1276
- export interface $ZodTuple<T extends util.TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodType {
1277
- _zod: $ZodTupleInternals<T, Rest>;
1278
- }
1279
- declare const $ZodTuple: $constructor<$ZodTuple>;
1280
- export type $ZodRecordKey = $ZodType<string | number | symbol, unknown>;
1281
- export interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
1282
- type: "record";
1283
- keyType: Key;
1284
- valueType: Value;
1285
- /** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
1286
- mode?: "strict" | "loose";
1287
- }
1288
- export type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<output<Key>, output<Value>>> : Record<output<Key>, output<Value>>;
1289
- export type $InferZodRecordInput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<input<Key> & PropertyKey, input<Value>>> : Record<input<Key> & PropertyKey, input<Value>>;
1290
- export interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
1291
- def: $ZodRecordDef<Key, Value>;
1292
- isst: $ZodIssueInvalidType | $ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
1293
- optin?: "optional" | undefined;
1294
- optout?: "optional" | undefined;
1295
- }
1296
- export type $partial = {
1297
- "~~partial": true;
1298
- };
1299
- export interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodType {
1300
- _zod: $ZodRecordInternals<Key, Value>;
1301
- }
1302
- declare const $ZodRecord: $constructor<$ZodRecord>;
1303
- export interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
1304
- type: "map";
1305
- keyType: Key;
1306
- valueType: Value;
1307
- }
1308
- export interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key>, output<Value>>, Map<input<Key>, input<Value>>> {
1309
- def: $ZodMapDef<Key, Value>;
1310
- isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement<unknown>;
1311
- optin?: "optional" | undefined;
1312
- optout?: "optional" | undefined;
1313
- }
1314
- export interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
1315
- _zod: $ZodMapInternals<Key, Value>;
1316
- }
1317
- declare const $ZodMap: $constructor<$ZodMap>;
1318
- export interface $ZodSetDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1319
- type: "set";
1320
- valueType: T;
1321
- }
1322
- export interface $ZodSetInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T>>, Set<input<T>>> {
1323
- def: $ZodSetDef<T>;
1324
- isst: $ZodIssueInvalidType;
1325
- optin?: "optional" | undefined;
1326
- optout?: "optional" | undefined;
1327
- }
1328
- export interface $ZodSet<T extends SomeType = $ZodType> extends $ZodType {
1329
- _zod: $ZodSetInternals<T>;
1330
- }
1331
- declare const $ZodSet: $constructor<$ZodSet>;
1332
- export type $InferEnumOutput<T extends util.EnumLike> = T[keyof T] & {};
1333
- export type $InferEnumInput<T extends util.EnumLike> = T[keyof T] & {};
1334
- export interface $ZodEnumDef<T extends util.EnumLike = util.EnumLike> extends $ZodTypeDef {
1335
- type: "enum";
1336
- entries: T;
1337
- }
1338
- export interface $ZodEnumInternals<
1339
- /** @ts-ignore Cast variance */
1340
- out T extends util.EnumLike = util.EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
1341
- def: $ZodEnumDef<T>;
1342
- /** @deprecated Internal API, use with caution (not deprecated) */
1343
- values: util.PrimitiveSet;
1344
- /** @deprecated Internal API, use with caution (not deprecated) */
1345
- pattern: RegExp;
1346
- isst: $ZodIssueInvalidValue;
1347
- }
1348
- export interface $ZodEnum<T extends util.EnumLike = util.EnumLike> extends $ZodType {
1349
- _zod: $ZodEnumInternals<T>;
1350
- }
1351
- declare const $ZodEnum: $constructor<$ZodEnum>;
1352
- export interface $ZodLiteralDef<T extends util.Literal> extends $ZodTypeDef {
1353
- type: "literal";
1354
- values: T[];
1355
- }
1356
- export interface $ZodLiteralInternals<T extends util.Literal = util.Literal> extends $ZodTypeInternals<T, T> {
1357
- def: $ZodLiteralDef<T>;
1358
- values: Set<T>;
1359
- pattern: RegExp;
1360
- isst: $ZodIssueInvalidValue;
1361
- }
1362
- export interface $ZodLiteral<T extends util.Literal = util.Literal> extends $ZodType {
1363
- _zod: $ZodLiteralInternals<T>;
1364
- }
1365
- declare const $ZodLiteral: $constructor<$ZodLiteral>;
1366
- type _File$1 = typeof globalThis extends {
1367
- File: infer F extends new (...args: any[]) => any;
1368
- } ? InstanceType<F> : {};
1369
- interface File$1 extends _File$1 {
1370
- readonly type: string;
1371
- readonly size: number;
1372
- }
1373
- export interface $ZodFileDef extends $ZodTypeDef {
1374
- type: "file";
1375
- }
1376
- export interface $ZodFileInternals extends $ZodTypeInternals<File$1, File$1> {
1377
- def: $ZodFileDef;
1378
- isst: $ZodIssueInvalidType;
1379
- bag: util.LoosePartial<{
1380
- minimum: number;
1381
- maximum: number;
1382
- mime: util.MimeTypes[];
1383
- }>;
1384
- }
1385
- export interface $ZodFile extends $ZodType {
1386
- _zod: $ZodFileInternals;
1387
- }
1388
- declare const $ZodFile: $constructor<$ZodFile>;
1389
- export interface $ZodTransformDef extends $ZodTypeDef {
1390
- type: "transform";
1391
- transform: (input: unknown, payload: ParsePayload<unknown>) => util.MaybeAsync<unknown>;
1392
- }
1393
- export interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
1394
- def: $ZodTransformDef;
1395
- isst: never;
1396
- }
1397
- export interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
1398
- _zod: $ZodTransformInternals<O, I>;
1399
- }
1400
- declare const $ZodTransform: $constructor<$ZodTransform>;
1401
- export interface $ZodOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1402
- type: "optional";
1403
- innerType: T;
1404
- }
1405
- export interface $ZodOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | undefined, input<T> | undefined> {
1406
- def: $ZodOptionalDef<T>;
1407
- optin: "optional";
1408
- optout: "optional";
1409
- isst: never;
1410
- values: T["_zod"]["values"];
1411
- pattern: T["_zod"]["pattern"];
1412
- }
1413
- export interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
1414
- _zod: $ZodOptionalInternals<T>;
1415
- }
1416
- declare const $ZodOptional: $constructor<$ZodOptional>;
1417
- export interface $ZodExactOptionalDef<T extends SomeType = $ZodType> extends $ZodOptionalDef<T> {
1418
- }
1419
- export interface $ZodExactOptionalInternals<T extends SomeType = $ZodType> extends $ZodOptionalInternals<T> {
1420
- def: $ZodExactOptionalDef<T>;
1421
- output: output<T>;
1422
- input: input<T>;
1423
- }
1424
- export interface $ZodExactOptional<T extends SomeType = $ZodType> extends $ZodType {
1425
- _zod: $ZodExactOptionalInternals<T>;
1426
- }
1427
- declare const $ZodExactOptional: $constructor<$ZodExactOptional>;
1428
- export interface $ZodNullableDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1429
- type: "nullable";
1430
- innerType: T;
1431
- }
1432
- export interface $ZodNullableInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | null, input<T> | null> {
1433
- def: $ZodNullableDef<T>;
1434
- optin: T["_zod"]["optin"];
1435
- optout: T["_zod"]["optout"];
1436
- isst: never;
1437
- values: T["_zod"]["values"];
1438
- pattern: T["_zod"]["pattern"];
1439
- }
1440
- export interface $ZodNullable<T extends SomeType = $ZodType> extends $ZodType {
1441
- _zod: $ZodNullableInternals<T>;
1442
- }
1443
- declare const $ZodNullable: $constructor<$ZodNullable>;
1444
- export interface $ZodDefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1445
- type: "default";
1446
- innerType: T;
1447
- /** The default value. May be a getter. */
1448
- defaultValue: util.NoUndefined<output<T>>;
1449
- }
1450
- export interface $ZodDefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<util.NoUndefined<output<T>>, input<T> | undefined> {
1451
- def: $ZodDefaultDef<T>;
1452
- optin: "optional";
1453
- optout?: "optional" | undefined;
1454
- isst: never;
1455
- values: T["_zod"]["values"];
1456
- }
1457
- export interface $ZodDefault<T extends SomeType = $ZodType> extends $ZodType {
1458
- _zod: $ZodDefaultInternals<T>;
1459
- }
1460
- declare const $ZodDefault: $constructor<$ZodDefault>;
1461
- export interface $ZodPrefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1462
- type: "prefault";
1463
- innerType: T;
1464
- /** The default value. May be a getter. */
1465
- defaultValue: input<T>;
1466
- }
1467
- export interface $ZodPrefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<util.NoUndefined<output<T>>, input<T> | undefined> {
1468
- def: $ZodPrefaultDef<T>;
1469
- optin: "optional";
1470
- optout?: "optional" | undefined;
1471
- isst: never;
1472
- values: T["_zod"]["values"];
1473
- }
1474
- export interface $ZodPrefault<T extends SomeType = $ZodType> extends $ZodType {
1475
- _zod: $ZodPrefaultInternals<T>;
1476
- }
1477
- declare const $ZodPrefault: $constructor<$ZodPrefault>;
1478
- export interface $ZodNonOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1479
- type: "nonoptional";
1480
- innerType: T;
1481
- }
1482
- export interface $ZodNonOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<util.NoUndefined<output<T>>, util.NoUndefined<input<T>>> {
1483
- def: $ZodNonOptionalDef<T>;
1484
- isst: $ZodIssueInvalidType;
1485
- values: T["_zod"]["values"];
1486
- optin: "optional" | undefined;
1487
- optout: "optional" | undefined;
1488
- }
1489
- export interface $ZodNonOptional<T extends SomeType = $ZodType> extends $ZodType {
1490
- _zod: $ZodNonOptionalInternals<T>;
1491
- }
1492
- declare const $ZodNonOptional: $constructor<$ZodNonOptional>;
1493
- export interface $ZodSuccessDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1494
- type: "success";
1495
- innerType: T;
1496
- }
1497
- export interface $ZodSuccessInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input<T>> {
1498
- def: $ZodSuccessDef<T>;
1499
- isst: never;
1500
- optin: T["_zod"]["optin"];
1501
- optout: "optional" | undefined;
1502
- }
1503
- export interface $ZodSuccess<T extends SomeType = $ZodType> extends $ZodType {
1504
- _zod: $ZodSuccessInternals<T>;
1505
- }
1506
- declare const $ZodSuccess: $constructor<$ZodSuccess>;
1507
- export interface $ZodCatchCtx extends ParsePayload {
1508
- /** @deprecated Use `ctx.issues` */
1509
- error: {
1510
- issues: $ZodIssue[];
1511
- };
1512
- /** @deprecated Use `ctx.value` */
1513
- input: unknown;
1514
- }
1515
- export interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1516
- type: "catch";
1517
- innerType: T;
1518
- catchValue: (ctx: $ZodCatchCtx) => unknown;
1519
- }
1520
- export interface $ZodCatchInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1521
- def: $ZodCatchDef<T>;
1522
- optin: T["_zod"]["optin"];
1523
- optout: T["_zod"]["optout"];
1524
- isst: never;
1525
- values: T["_zod"]["values"];
1526
- }
1527
- export interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
1528
- _zod: $ZodCatchInternals<T>;
1529
- }
1530
- declare const $ZodCatch: $constructor<$ZodCatch>;
1531
- export interface $ZodNaNDef extends $ZodTypeDef {
1532
- type: "nan";
1533
- }
1534
- export interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
1535
- def: $ZodNaNDef;
1536
- isst: $ZodIssueInvalidType;
1537
- }
1538
- export interface $ZodNaN extends $ZodType {
1539
- _zod: $ZodNaNInternals;
1540
- }
1541
- declare const $ZodNaN: $constructor<$ZodNaN>;
1542
- export interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
1543
- type: "pipe";
1544
- in: A;
1545
- out: B;
1546
- /** Only defined inside $ZodCodec instances. */
1547
- transform?: (value: output<A>, payload: ParsePayload<output<A>>) => util.MaybeAsync<input<B>>;
1548
- /** Only defined inside $ZodCodec instances. */
1549
- reverseTransform?: (value: input<B>, payload: ParsePayload<input<B>>) => util.MaybeAsync<output<A>>;
1550
- }
1551
- export interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
1552
- def: $ZodPipeDef<A, B>;
1553
- isst: never;
1554
- values: A["_zod"]["values"];
1555
- optin: A["_zod"]["optin"];
1556
- optout: B["_zod"]["optout"];
1557
- propValues: A["_zod"]["propValues"];
1558
- }
1559
- export interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
1560
- _zod: $ZodPipeInternals<A, B>;
1561
- }
1562
- declare const $ZodPipe: $constructor<$ZodPipe>;
1563
- export interface $ZodCodecDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodPipeDef<A, B> {
1564
- transform: (value: output<A>, payload: ParsePayload<output<A>>) => util.MaybeAsync<input<B>>;
1565
- reverseTransform: (value: input<B>, payload: ParsePayload<input<B>>) => util.MaybeAsync<output<A>>;
1566
- }
1567
- export interface $ZodCodecInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
1568
- def: $ZodCodecDef<A, B>;
1569
- isst: never;
1570
- values: A["_zod"]["values"];
1571
- optin: A["_zod"]["optin"];
1572
- optout: B["_zod"]["optout"];
1573
- propValues: A["_zod"]["propValues"];
1574
- }
1575
- export interface $ZodCodec<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
1576
- _zod: $ZodCodecInternals<A, B>;
1577
- }
1578
- declare const $ZodCodec: $constructor<$ZodCodec>;
1579
- export interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1580
- type: "readonly";
1581
- innerType: T;
1582
- }
1583
- export interface $ZodReadonlyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<util.MakeReadonly<output<T>>, util.MakeReadonly<input<T>>> {
1584
- def: $ZodReadonlyDef<T>;
1585
- optin: T["_zod"]["optin"];
1586
- optout: T["_zod"]["optout"];
1587
- isst: never;
1588
- propValues: T["_zod"]["propValues"];
1589
- values: T["_zod"]["values"];
1590
- }
1591
- export interface $ZodReadonly<T extends SomeType = $ZodType> extends $ZodType {
1592
- _zod: $ZodReadonlyInternals<T>;
1593
- }
1594
- declare const $ZodReadonly: $constructor<$ZodReadonly>;
1595
- export interface $ZodTemplateLiteralDef extends $ZodTypeDef {
1596
- type: "template_literal";
1597
- parts: $ZodTemplateLiteralPart[];
1598
- format?: string | undefined;
1599
- }
1600
- export interface $ZodTemplateLiteralInternals<Template extends string = string> extends $ZodTypeInternals<Template, Template> {
1601
- pattern: RegExp;
1602
- def: $ZodTemplateLiteralDef;
1603
- isst: $ZodIssueInvalidType;
1604
- }
1605
- export interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
1606
- _zod: $ZodTemplateLiteralInternals<Template>;
1607
- }
1608
- export type LiteralPart = Exclude<util.Literal, symbol>;
1609
- export interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
1610
- pattern: RegExp;
1611
- }
1612
- export interface SchemaPart extends $ZodType {
1613
- _zod: SchemaPartInternals;
1614
- }
1615
- export type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
1616
- export type UndefinedToEmptyString<T> = T extends undefined ? "" : T;
1617
- export type AppendToTemplateLiteral<Template extends string, Suffix extends LiteralPart | $ZodType> = Suffix extends LiteralPart ? `${Template}${UndefinedToEmptyString<Suffix>}` : Suffix extends $ZodType ? `${Template}${output<Suffix> extends infer T extends LiteralPart ? UndefinedToEmptyString<T> : never}` : never;
1618
- export type ConcatenateTupleOfStrings<T extends string[]> = T extends [
1619
- infer First extends string,
1620
- ...infer Rest extends string[]
1621
- ] ? Rest extends string[] ? First extends "" ? ConcatenateTupleOfStrings<Rest> : `${First}${ConcatenateTupleOfStrings<Rest>}` : never : "";
1622
- export type ConvertPartsToStringTuple<Parts extends $ZodTemplateLiteralPart[]> = {
1623
- [K in keyof Parts]: Parts[K] extends LiteralPart ? `${UndefinedToEmptyString<Parts[K]>}` : Parts[K] extends $ZodType ? `${output<Parts[K]> extends infer T extends LiteralPart ? UndefinedToEmptyString<T> : never}` : never;
1624
- };
1625
- export type ToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = ConcatenateTupleOfStrings<ConvertPartsToStringTuple<Parts>>;
1626
- export type $PartsToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = [
1627
- ] extends Parts ? `` : Parts extends [
1628
- ...infer Rest,
1629
- infer Last extends $ZodTemplateLiteralPart
1630
- ] ? Rest extends $ZodTemplateLiteralPart[] ? AppendToTemplateLiteral<$PartsToTemplateLiteral<Rest>, Last> : never : never;
1631
- declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
1632
- export type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
1633
- export type $ZodFunctionIn = $ZodFunctionArgs;
1634
- export type $ZodFunctionOut = $ZodType;
1635
- export type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input<Returns>;
1636
- export type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => util.MaybeAsync<input<Returns>>;
1637
- export type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => output<Returns>;
1638
- export type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => Promise<output<Returns>>;
1639
- export interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
1640
- type: "function";
1641
- input: In;
1642
- output: Out;
1643
- }
1644
- export interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
1645
- def: $ZodFunctionDef<Args, Returns>;
1646
- isst: $ZodIssueInvalidType;
1647
- }
1648
- export interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodType<any, any, $ZodFunctionInternals<Args, Returns>> {
1649
- /** @deprecated */
1650
- _def: $ZodFunctionDef<Args, Returns>;
1651
- _input: $InferInnerFunctionType<Args, Returns>;
1652
- _output: $InferOuterFunctionType<Args, Returns>;
1653
- implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
1654
- implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
1655
- input<const Items extends util.TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest): $ZodFunction<$ZodTuple<Items, Rest>, Returns>;
1656
- input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
1657
- input(...args: any[]): $ZodFunction<any, Returns>;
1658
- output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
1659
- }
1660
- export interface $ZodFunctionParams<I extends $ZodFunctionIn, O extends $ZodType> {
1661
- input?: I;
1662
- output?: O;
1663
- }
1664
- declare const $ZodFunction: $constructor<$ZodFunction>;
1665
- export interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1666
- type: "promise";
1667
- innerType: T;
1668
- }
1669
- export interface $ZodPromiseInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T>>, util.MaybeAsync<input<T>>> {
1670
- def: $ZodPromiseDef<T>;
1671
- isst: never;
1672
- }
1673
- export interface $ZodPromise<T extends SomeType = $ZodType> extends $ZodType {
1674
- _zod: $ZodPromiseInternals<T>;
1675
- }
1676
- declare const $ZodPromise: $constructor<$ZodPromise>;
1677
- export interface $ZodLazyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1678
- type: "lazy";
1679
- getter: () => T;
1680
- }
1681
- export interface $ZodLazyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1682
- def: $ZodLazyDef<T>;
1683
- isst: never;
1684
- /** Auto-cached way to retrieve the inner schema */
1685
- innerType: T;
1686
- pattern: T["_zod"]["pattern"];
1687
- propValues: T["_zod"]["propValues"];
1688
- optin: T["_zod"]["optin"];
1689
- optout: T["_zod"]["optout"];
1690
- }
1691
- export interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
1692
- _zod: $ZodLazyInternals<T>;
1693
- }
1694
- declare const $ZodLazy: $constructor<$ZodLazy>;
1695
- export interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
1696
- type: "custom";
1697
- check: "custom";
1698
- path?: PropertyKey[] | undefined;
1699
- error?: $ZodErrorMap | undefined;
1700
- params?: Record<string, any> | undefined;
1701
- fn: (arg: O) => unknown;
1702
- }
1703
- export interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, $ZodCheckInternals<O> {
1704
- def: $ZodCustomDef;
1705
- issc: $ZodIssue;
1706
- isst: never;
1707
- bag: util.LoosePartial<{
1708
- Class: typeof util.Class;
1709
- }>;
1710
- }
1711
- export interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
1712
- _zod: $ZodCustomInternals<O, I>;
1713
- }
1714
- declare const $ZodCustom: $constructor<$ZodCustom>;
1715
- export type $ZodTypes = $ZodString | $ZodNumber | $ZodBigInt | $ZodBoolean | $ZodDate | $ZodSymbol | $ZodUndefined | $ZodNullable | $ZodNull | $ZodAny | $ZodUnknown | $ZodNever | $ZodVoid | $ZodArray | $ZodObject | $ZodUnion | $ZodIntersection | $ZodTuple | $ZodRecord | $ZodMap | $ZodSet | $ZodLiteral | $ZodEnum | $ZodFunction | $ZodPromise | $ZodLazy | $ZodOptional | $ZodDefault | $ZodPrefault | $ZodTemplateLiteral | $ZodCustom | $ZodTransform | $ZodNonOptional | $ZodReadonly | $ZodNaN | $ZodPipe | $ZodSuccess | $ZodCatch | $ZodFile;
1716
- export type $ZodStringFormatTypes = $ZodGUID | $ZodUUID | $ZodEmail | $ZodURL | $ZodEmoji | $ZodNanoID | $ZodCUID | $ZodCUID2 | $ZodULID | $ZodXID | $ZodKSUID | $ZodISODateTime | $ZodISODate | $ZodISOTime | $ZodISODuration | $ZodIPv4 | $ZodIPv6 | $ZodMAC | $ZodCIDRv4 | $ZodCIDRv6 | $ZodBase64 | $ZodBase64URL | $ZodE164 | $ZodJWT | $ZodCustomStringFormat<"hex"> | $ZodCustomStringFormat<util.HashFormat> | $ZodCustomStringFormat<"hostname">;
1717
- export interface $ZodCheckDef {
1718
- check: string;
1719
- error?: $ZodErrorMap<never> | undefined;
1720
- /** If true, no later checks will be executed if this check fails. Default `false`. */
1721
- abort?: boolean | undefined;
1722
- /** If provided, this check will only be executed if the function returns `true`. Defaults to `payload => z.util.isAborted(payload)`. */
1723
- when?: ((payload: schemas.ParsePayload) => boolean) | undefined;
1724
- }
1725
- export interface $ZodCheckInternals<T> {
1726
- def: $ZodCheckDef;
1727
- /** The set of issues this check might throw. */
1728
- issc?: $ZodIssueBase;
1729
- check(payload: schemas.ParsePayload<T>): util.MaybeAsync<void>;
1730
- onattach: ((schema: schemas.$ZodType) => void)[];
1731
- }
1732
- export interface $ZodCheck<in T = never> {
1733
- _zod: $ZodCheckInternals<T>;
1734
- }
1735
- declare const $ZodCheck: $constructor<$ZodCheck<any>>;
1736
- export interface $ZodCheckLessThanDef extends $ZodCheckDef {
1737
- check: "less_than";
1738
- value: util.Numeric;
1739
- inclusive: boolean;
1740
- }
1741
- export interface $ZodCheckLessThanInternals<T extends util.Numeric = util.Numeric> extends $ZodCheckInternals<T> {
1742
- def: $ZodCheckLessThanDef;
1743
- issc: $ZodIssueTooBig<T>;
1744
- }
1745
- export interface $ZodCheckLessThan<T extends util.Numeric = util.Numeric> extends $ZodCheck<T> {
1746
- _zod: $ZodCheckLessThanInternals<T>;
1747
- }
1748
- declare const $ZodCheckLessThan: $constructor<$ZodCheckLessThan>;
1749
- export interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
1750
- check: "greater_than";
1751
- value: util.Numeric;
1752
- inclusive: boolean;
1753
- }
1754
- export interface $ZodCheckGreaterThanInternals<T extends util.Numeric = util.Numeric> extends $ZodCheckInternals<T> {
1755
- def: $ZodCheckGreaterThanDef;
1756
- issc: $ZodIssueTooSmall<T>;
1757
- }
1758
- export interface $ZodCheckGreaterThan<T extends util.Numeric = util.Numeric> extends $ZodCheck<T> {
1759
- _zod: $ZodCheckGreaterThanInternals<T>;
1760
- }
1761
- declare const $ZodCheckGreaterThan: $constructor<$ZodCheckGreaterThan>;
1762
- export interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
1763
- check: "multiple_of";
1764
- value: T;
1765
- }
1766
- export interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint> extends $ZodCheckInternals<T> {
1767
- def: $ZodCheckMultipleOfDef<T>;
1768
- issc: $ZodIssueNotMultipleOf;
1769
- }
1770
- export interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
1771
- _zod: $ZodCheckMultipleOfInternals<T>;
1772
- }
1773
- declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
1774
- export type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
1775
- export interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
1776
- check: "number_format";
1777
- format: $ZodNumberFormats;
1778
- }
1779
- export interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
1780
- def: $ZodCheckNumberFormatDef;
1781
- issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
1782
- }
1783
- export interface $ZodCheckNumberFormat extends $ZodCheck<number> {
1784
- _zod: $ZodCheckNumberFormatInternals;
1785
- }
1786
- declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
1787
- export type $ZodBigIntFormats = "int64" | "uint64";
1788
- export interface $ZodCheckBigIntFormatDef extends $ZodCheckDef {
1789
- check: "bigint_format";
1790
- format: $ZodBigIntFormats | undefined;
1791
- }
1792
- export interface $ZodCheckBigIntFormatInternals extends $ZodCheckInternals<bigint> {
1793
- def: $ZodCheckBigIntFormatDef;
1794
- issc: $ZodIssueTooBig<"bigint"> | $ZodIssueTooSmall<"bigint">;
1795
- }
1796
- export interface $ZodCheckBigIntFormat extends $ZodCheck<bigint> {
1797
- _zod: $ZodCheckBigIntFormatInternals;
1798
- }
1799
- declare const $ZodCheckBigIntFormat: $constructor<$ZodCheckBigIntFormat>;
1800
- export interface $ZodCheckMaxSizeDef extends $ZodCheckDef {
1801
- check: "max_size";
1802
- maximum: number;
1803
- }
1804
- export interface $ZodCheckMaxSizeInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
1805
- def: $ZodCheckMaxSizeDef;
1806
- issc: $ZodIssueTooBig<T>;
1807
- }
1808
- export interface $ZodCheckMaxSize<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
1809
- _zod: $ZodCheckMaxSizeInternals<T>;
1810
- }
1811
- declare const $ZodCheckMaxSize: $constructor<$ZodCheckMaxSize>;
1812
- export interface $ZodCheckMinSizeDef extends $ZodCheckDef {
1813
- check: "min_size";
1814
- minimum: number;
1815
- }
1816
- export interface $ZodCheckMinSizeInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
1817
- def: $ZodCheckMinSizeDef;
1818
- issc: $ZodIssueTooSmall<T>;
1819
- }
1820
- export interface $ZodCheckMinSize<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
1821
- _zod: $ZodCheckMinSizeInternals<T>;
1822
- }
1823
- declare const $ZodCheckMinSize: $constructor<$ZodCheckMinSize>;
1824
- export interface $ZodCheckSizeEqualsDef extends $ZodCheckDef {
1825
- check: "size_equals";
1826
- size: number;
1827
- }
1828
- export interface $ZodCheckSizeEqualsInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
1829
- def: $ZodCheckSizeEqualsDef;
1830
- issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
1831
- }
1832
- export interface $ZodCheckSizeEquals<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
1833
- _zod: $ZodCheckSizeEqualsInternals<T>;
1834
- }
1835
- declare const $ZodCheckSizeEquals: $constructor<$ZodCheckSizeEquals>;
1836
- export interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
1837
- check: "max_length";
1838
- maximum: number;
1839
- }
1840
- export interface $ZodCheckMaxLengthInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
1841
- def: $ZodCheckMaxLengthDef;
1842
- issc: $ZodIssueTooBig<T>;
1843
- }
1844
- export interface $ZodCheckMaxLength<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
1845
- _zod: $ZodCheckMaxLengthInternals<T>;
1846
- }
1847
- declare const $ZodCheckMaxLength: $constructor<$ZodCheckMaxLength>;
1848
- export interface $ZodCheckMinLengthDef extends $ZodCheckDef {
1849
- check: "min_length";
1850
- minimum: number;
1851
- }
1852
- export interface $ZodCheckMinLengthInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
1853
- def: $ZodCheckMinLengthDef;
1854
- issc: $ZodIssueTooSmall<T>;
1855
- }
1856
- export interface $ZodCheckMinLength<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
1857
- _zod: $ZodCheckMinLengthInternals<T>;
1858
- }
1859
- declare const $ZodCheckMinLength: $constructor<$ZodCheckMinLength>;
1860
- export interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
1861
- check: "length_equals";
1862
- length: number;
1863
- }
1864
- export interface $ZodCheckLengthEqualsInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
1865
- def: $ZodCheckLengthEqualsDef;
1866
- issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
1867
- }
1868
- export interface $ZodCheckLengthEquals<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
1869
- _zod: $ZodCheckLengthEqualsInternals<T>;
1870
- }
1871
- declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
1872
- export type $ZodStringFormats = "email" | "url" | "emoji" | "uuid" | "guid" | "nanoid" | "cuid" | "cuid2" | "ulid" | "xid" | "ksuid" | "datetime" | "date" | "time" | "duration" | "ipv4" | "ipv6" | "cidrv4" | "cidrv6" | "base64" | "base64url" | "json_string" | "e164" | "lowercase" | "uppercase" | "regex" | "jwt" | "starts_with" | "ends_with" | "includes";
1873
- export interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
1874
- check: "string_format";
1875
- format: Format;
1876
- pattern?: RegExp | undefined;
1877
- }
1878
- export interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
1879
- def: $ZodCheckStringFormatDef;
1880
- issc: $ZodIssueInvalidStringFormat;
1881
- }
1882
- export interface $ZodCheckStringFormat extends $ZodCheck<string> {
1883
- _zod: $ZodCheckStringFormatInternals;
1884
- }
1885
- declare const $ZodCheckStringFormat: $constructor<$ZodCheckStringFormat>;
1886
- export interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
1887
- format: "regex";
1888
- pattern: RegExp;
1889
- }
1890
- export interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
1891
- def: $ZodCheckRegexDef;
1892
- issc: $ZodIssueInvalidStringFormat;
1893
- }
1894
- export interface $ZodCheckRegex extends $ZodCheck<string> {
1895
- _zod: $ZodCheckRegexInternals;
1896
- }
1897
- declare const $ZodCheckRegex: $constructor<$ZodCheckRegex>;
1898
- export interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {
1899
- }
1900
- export interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
1901
- def: $ZodCheckLowerCaseDef;
1902
- issc: $ZodIssueInvalidStringFormat;
1903
- }
1904
- export interface $ZodCheckLowerCase extends $ZodCheck<string> {
1905
- _zod: $ZodCheckLowerCaseInternals;
1906
- }
1907
- declare const $ZodCheckLowerCase: $constructor<$ZodCheckLowerCase>;
1908
- export interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {
1909
- }
1910
- export interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
1911
- def: $ZodCheckUpperCaseDef;
1912
- issc: $ZodIssueInvalidStringFormat;
1913
- }
1914
- export interface $ZodCheckUpperCase extends $ZodCheck<string> {
1915
- _zod: $ZodCheckUpperCaseInternals;
1916
- }
1917
- declare const $ZodCheckUpperCase: $constructor<$ZodCheckUpperCase>;
1918
- export interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
1919
- includes: string;
1920
- position?: number | undefined;
1921
- }
1922
- export interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
1923
- def: $ZodCheckIncludesDef;
1924
- issc: $ZodIssueInvalidStringFormat;
1925
- }
1926
- export interface $ZodCheckIncludes extends $ZodCheck<string> {
1927
- _zod: $ZodCheckIncludesInternals;
1928
- }
1929
- declare const $ZodCheckIncludes: $constructor<$ZodCheckIncludes>;
1930
- export interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
1931
- prefix: string;
1932
- }
1933
- export interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
1934
- def: $ZodCheckStartsWithDef;
1935
- issc: $ZodIssueInvalidStringFormat;
1936
- }
1937
- export interface $ZodCheckStartsWith extends $ZodCheck<string> {
1938
- _zod: $ZodCheckStartsWithInternals;
1939
- }
1940
- declare const $ZodCheckStartsWith: $constructor<$ZodCheckStartsWith>;
1941
- export interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
1942
- suffix: string;
1943
- }
1944
- export interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
1945
- def: $ZodCheckEndsWithDef;
1946
- issc: $ZodIssueInvalidStringFormat;
1947
- }
1948
- export interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
1949
- _zod: $ZodCheckEndsWithInternals;
1950
- }
1951
- declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
1952
- export interface $ZodCheckPropertyDef extends $ZodCheckDef {
1953
- check: "property";
1954
- property: string;
1955
- schema: schemas.$ZodType;
1956
- }
1957
- export interface $ZodCheckPropertyInternals<T extends object = object> extends $ZodCheckInternals<T> {
1958
- def: $ZodCheckPropertyDef;
1959
- issc: $ZodIssue;
1960
- }
1961
- export interface $ZodCheckProperty<T extends object = object> extends $ZodCheck<T> {
1962
- _zod: $ZodCheckPropertyInternals<T>;
1963
- }
1964
- declare const $ZodCheckProperty: $constructor<$ZodCheckProperty>;
1965
- export interface $ZodCheckMimeTypeDef extends $ZodCheckDef {
1966
- check: "mime_type";
1967
- mime: util.MimeTypes[];
1968
- }
1969
- export interface $ZodCheckMimeTypeInternals<T extends schemas.File = schemas.File> extends $ZodCheckInternals<T> {
1970
- def: $ZodCheckMimeTypeDef;
1971
- issc: $ZodIssueInvalidValue;
1972
- }
1973
- export interface $ZodCheckMimeType<T extends schemas.File = schemas.File> extends $ZodCheck<T> {
1974
- _zod: $ZodCheckMimeTypeInternals<T>;
1975
- }
1976
- declare const $ZodCheckMimeType: $constructor<$ZodCheckMimeType>;
1977
- export interface $ZodCheckOverwriteDef<T = unknown> extends $ZodCheckDef {
1978
- check: "overwrite";
1979
- tx(value: T): T;
1980
- }
1981
- export interface $ZodCheckOverwriteInternals<T = unknown> extends $ZodCheckInternals<T> {
1982
- def: $ZodCheckOverwriteDef<T>;
1983
- issc: never;
1984
- }
1985
- export interface $ZodCheckOverwrite<T = unknown> extends $ZodCheck<T> {
1986
- _zod: $ZodCheckOverwriteInternals<T>;
1987
- }
1988
- declare const $ZodCheckOverwrite: $constructor<$ZodCheckOverwrite>;
1989
- export type $ZodChecks = $ZodCheckLessThan | $ZodCheckGreaterThan | $ZodCheckMultipleOf | $ZodCheckNumberFormat | $ZodCheckBigIntFormat | $ZodCheckMaxSize | $ZodCheckMinSize | $ZodCheckSizeEquals | $ZodCheckMaxLength | $ZodCheckMinLength | $ZodCheckLengthEquals | $ZodCheckStringFormat | $ZodCheckProperty | $ZodCheckMimeType | $ZodCheckOverwrite;
1990
- export type $ZodStringFormatChecks = $ZodCheckRegex | $ZodCheckLowerCase | $ZodCheckUpperCase | $ZodCheckIncludes | $ZodCheckStartsWith | $ZodCheckEndsWith | schemas.$ZodStringFormatTypes;
1991
- export interface $ZodIssueBase {
1992
- readonly code?: string;
1993
- readonly input?: unknown;
1994
- readonly path: PropertyKey[];
1995
- readonly message: string;
1996
- }
1997
- export type $ZodInvalidTypeExpected = "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "undefined" | "null" | "never" | "void" | "date" | "array" | "object" | "tuple" | "record" | "map" | "set" | "file" | "nonoptional" | "nan" | "function" | (string & {});
1998
- export interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
1999
- readonly code: "invalid_type";
2000
- readonly expected: $ZodInvalidTypeExpected;
2001
- readonly input?: Input;
2002
- }
2003
- export interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
2004
- readonly code: "too_big";
2005
- readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
2006
- readonly maximum: number | bigint;
2007
- readonly inclusive?: boolean;
2008
- readonly exact?: boolean;
2009
- readonly input?: Input;
2010
- }
2011
- export interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
2012
- readonly code: "too_small";
2013
- readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
2014
- readonly minimum: number | bigint;
2015
- /** True if the allowable range includes the minimum */
2016
- readonly inclusive?: boolean;
2017
- /** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
2018
- readonly exact?: boolean;
2019
- readonly input?: Input;
2020
- }
2021
- export interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
2022
- readonly code: "invalid_format";
2023
- readonly format: $ZodStringFormats | (string & {});
2024
- readonly pattern?: string;
2025
- readonly input?: string;
2026
- }
2027
- export interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
2028
- readonly code: "not_multiple_of";
2029
- readonly divisor: number;
2030
- readonly input?: Input;
2031
- }
2032
- export interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
2033
- readonly code: "unrecognized_keys";
2034
- readonly keys: string[];
2035
- readonly input?: Record<string, unknown>;
2036
- }
2037
- export interface $ZodIssueInvalidUnionNoMatch extends $ZodIssueBase {
2038
- readonly code: "invalid_union";
2039
- readonly errors: $ZodIssue[][];
2040
- readonly input?: unknown;
2041
- readonly discriminator?: string | undefined;
2042
- readonly inclusive?: true;
2043
- }
2044
- export interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
2045
- readonly code: "invalid_union";
2046
- readonly errors: [
2047
- ];
2048
- readonly input?: unknown;
2049
- readonly discriminator?: string | undefined;
2050
- readonly inclusive: false;
2051
- }
2052
- export type $ZodIssueInvalidUnion = $ZodIssueInvalidUnionNoMatch | $ZodIssueInvalidUnionMultipleMatch;
2053
- export interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
2054
- readonly code: "invalid_key";
2055
- readonly origin: "map" | "record";
2056
- readonly issues: $ZodIssue[];
2057
- readonly input?: Input;
2058
- }
2059
- export interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
2060
- readonly code: "invalid_element";
2061
- readonly origin: "map" | "set";
2062
- readonly key: unknown;
2063
- readonly issues: $ZodIssue[];
2064
- readonly input?: Input;
2065
- }
2066
- export interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
2067
- readonly code: "invalid_value";
2068
- readonly values: util.Primitive[];
2069
- readonly input?: Input;
2070
- }
2071
- export interface $ZodIssueCustom extends $ZodIssueBase {
2072
- readonly code: "custom";
2073
- readonly params?: Record<string, any> | undefined;
2074
- readonly input?: unknown;
2075
- }
2076
- export interface $ZodIssueStringCommonFormats extends $ZodIssueInvalidStringFormat {
2077
- format: Exclude<$ZodStringFormats, "regex" | "jwt" | "starts_with" | "ends_with" | "includes">;
2078
- }
2079
- export interface $ZodIssueStringInvalidRegex extends $ZodIssueInvalidStringFormat {
2080
- format: "regex";
2081
- pattern: string;
2082
- }
2083
- export interface $ZodIssueStringInvalidJWT extends $ZodIssueInvalidStringFormat {
2084
- format: "jwt";
2085
- algorithm?: string;
2086
- }
2087
- export interface $ZodIssueStringStartsWith extends $ZodIssueInvalidStringFormat {
2088
- format: "starts_with";
2089
- prefix: string;
2090
- }
2091
- export interface $ZodIssueStringEndsWith extends $ZodIssueInvalidStringFormat {
2092
- format: "ends_with";
2093
- suffix: string;
2094
- }
2095
- export interface $ZodIssueStringIncludes extends $ZodIssueInvalidStringFormat {
2096
- format: "includes";
2097
- includes: string;
2098
- }
2099
- export type $ZodStringFormatIssues = $ZodIssueStringCommonFormats | $ZodIssueStringInvalidRegex | $ZodIssueStringInvalidJWT | $ZodIssueStringStartsWith | $ZodIssueStringEndsWith | $ZodIssueStringIncludes;
2100
- export type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
2101
- export type $ZodIssueCode = $ZodIssue["code"];
2102
- export type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
2103
- export type RawIssue<T extends $ZodIssueBase> = T extends any ? util.Flatten<util.MakePartial<T, "message" | "path"> & {
2104
- /** The input data */
2105
- readonly input: unknown;
2106
- /** The schema or check that originated this issue. */
2107
- readonly inst?: $ZodType | $ZodCheck;
2108
- /** If `true`, Zod will continue executing checks/refinements after this issue. */
2109
- readonly continue?: boolean | undefined;
2110
- } & Record<string, unknown>> : never;
2111
- export type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;
2112
- export interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {
2113
- (issue: $ZodRawIssue<T>): {
2114
- message: string;
2115
- } | string | undefined | null;
2116
- }
2117
- export interface $ZodError<T = unknown> extends Error {
2118
- type: T;
2119
- issues: $ZodIssue[];
2120
- _zod: {
2121
- output: T;
2122
- def: $ZodIssue[];
2123
- };
2124
- stack?: string;
2125
- name: string;
2126
- }
2127
- declare const $ZodError: $constructor<$ZodError>;
2128
- export interface $ZodRealError<T = any> extends $ZodError<T> {
2129
- }
2130
- declare const $ZodRealError$1: $constructor<$ZodRealError>;
2131
- export type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
2132
- export type _FlattenedError<T, U = string> = {
2133
- formErrors: U[];
2134
- fieldErrors: {
2135
- [P in keyof T]?: U[];
2136
- };
2137
- };
2138
- declare function flattenError<T>(error: $ZodError<T>): _FlattenedError<T>;
2139
- declare function flattenError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): _FlattenedError<T, U>;
2140
- export type _ZodFormattedError<T, U = string> = T extends [
2141
- any,
2142
- ...any[]
2143
- ] ? {
2144
- [K in keyof T]?: $ZodFormattedError<T[K], U>;
2145
- } : T extends any[] ? {
2146
- [k: number]: $ZodFormattedError<T[number], U>;
2147
- } : T extends object ? util.Flatten<{
2148
- [K in keyof T]?: $ZodFormattedError<T[K], U>;
2149
- }> : any;
2150
- export type $ZodFormattedError<T, U = string> = {
2151
- _errors: U[];
2152
- } & util.Flatten<_ZodFormattedError<T, U>>;
2153
- declare function formatError<T>(error: $ZodError<T>): $ZodFormattedError<T>;
2154
- declare function formatError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
2155
- export type $ZodErrorTree<T, U = string> = T extends util.Primitive ? {
2156
- errors: U[];
2157
- } : T extends [
2158
- any,
2159
- ...any[]
2160
- ] ? {
2161
- errors: U[];
2162
- items?: {
2163
- [K in keyof T]?: $ZodErrorTree<T[K], U>;
2164
- };
2165
- } : T extends any[] ? {
2166
- errors: U[];
2167
- items?: Array<$ZodErrorTree<T[number], U>>;
2168
- } : T extends object ? {
2169
- errors: U[];
2170
- properties?: {
2171
- [K in keyof T]?: $ZodErrorTree<T[K], U>;
2172
- };
2173
- } : {
2174
- errors: U[];
2175
- };
2176
- declare function treeifyError<T>(error: $ZodError<T>): $ZodErrorTree<T>;
2177
- declare function treeifyError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodErrorTree<T, U>;
2178
- declare function toDotPath(_path: readonly (string | number | symbol | StandardSchemaV1.PathSegment)[]): string;
2179
- declare function prettifyError(error: StandardSchemaV1.FailureResult): string;
2180
- export type ZodTrait = {
2181
- _zod: {
2182
- def: any;
2183
- [k: string]: any;
2184
- };
2185
- };
2186
- export interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
2187
- new (def: D): T;
2188
- init(inst: T, def: D): asserts inst is T;
2189
- }
2190
- declare const NEVER: never;
2191
- declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
2192
- Parent?: typeof Class;
2193
- }): $constructor<T, D>;
2194
- declare const $brand: unique symbol;
2195
- export type $brand<T extends string | number | symbol = string | number | symbol> = {
2196
- [$brand]: {
2197
- [k in T]: true;
2198
- };
2199
- };
2200
- export type $ZodBranded<T extends schemas.SomeType, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T & (Dir extends "inout" ? {
2201
- _zod: {
2202
- input: input<T> & $brand<Brand>;
2203
- output: output<T> & $brand<Brand>;
2204
- };
2205
- } : Dir extends "in" ? {
2206
- _zod: {
2207
- input: input<T> & $brand<Brand>;
2208
- };
2209
- } : {
2210
- _zod: {
2211
- output: output<T> & $brand<Brand>;
2212
- };
2213
- });
2214
- export type $ZodNarrow<T extends schemas.SomeType, Out> = T & {
2215
- _zod: {
2216
- output: Out;
2217
- };
2218
- };
2219
- declare class $ZodAsyncError extends Error {
2220
- constructor();
2221
- }
2222
- declare class $ZodEncodeError extends Error {
2223
- constructor(name: string);
2224
- }
2225
- export type input<T> = T extends {
2226
- _zod: {
2227
- input: any;
2228
- };
2229
- } ? T["_zod"]["input"] : unknown;
2230
- export type output<T> = T extends {
2231
- _zod: {
2232
- output: any;
2233
- };
2234
- } ? T["_zod"]["output"] : unknown;
2235
- export interface $ZodConfig {
2236
- /** Custom error map. Overrides `config().localeError`. */
2237
- customError?: $ZodErrorMap | undefined;
2238
- /** Localized error map. Lowest priority. */
2239
- localeError?: $ZodErrorMap | undefined;
2240
- /** Disable JIT schema compilation. Useful in environments that disallow `eval`. */
2241
- jitless?: boolean | undefined;
2242
- }
2243
- declare const globalConfig: $ZodConfig;
2244
- declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;
2245
- export type $ZodErrorClass = {
2246
- new (issues: $ZodIssue[]): $ZodError;
2247
- };
2248
- export type $Parse = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<$ZodIssue>, _params?: {
2249
- callee?: util.AnyFunc;
2250
- Err?: $ZodErrorClass;
2251
- }) => output<T>;
2252
- declare const _parse: (_Err: $ZodErrorClass) => $Parse;
2253
- declare const parse: $Parse;
2254
- export type $ParseAsync = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<$ZodIssue>, _params?: {
2255
- callee?: util.AnyFunc;
2256
- Err?: $ZodErrorClass;
2257
- }) => Promise<output<T>>;
2258
- declare const _parseAsync: (_Err: $ZodErrorClass) => $ParseAsync;
2259
- declare const parseAsync: $ParseAsync;
2260
- export type $SafeParse = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<$ZodIssue>) => util.SafeParseResult<output<T>>;
2261
- declare const _safeParse: (_Err: $ZodErrorClass) => $SafeParse;
2262
- declare const safeParse: $SafeParse;
2263
- export type $SafeParseAsync = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<$ZodIssue>) => Promise<util.SafeParseResult<output<T>>>;
2264
- declare const _safeParseAsync: (_Err: $ZodErrorClass) => $SafeParseAsync;
2265
- declare const safeParseAsync: $SafeParseAsync;
2266
- export type $Encode = <T extends schemas.$ZodType>(schema: T, value: output<T>, _ctx?: schemas.ParseContext<$ZodIssue>) => input<T>;
2267
- declare const _encode: (_Err: $ZodErrorClass) => $Encode;
2268
- declare const encode: $Encode;
2269
- export type $Decode = <T extends schemas.$ZodType>(schema: T, value: input<T>, _ctx?: schemas.ParseContext<$ZodIssue>) => output<T>;
2270
- declare const _decode: (_Err: $ZodErrorClass) => $Decode;
2271
- declare const decode: $Decode;
2272
- export type $EncodeAsync = <T extends schemas.$ZodType>(schema: T, value: output<T>, _ctx?: schemas.ParseContext<$ZodIssue>) => Promise<input<T>>;
2273
- declare const _encodeAsync: (_Err: $ZodErrorClass) => $EncodeAsync;
2274
- declare const encodeAsync: $EncodeAsync;
2275
- export type $DecodeAsync = <T extends schemas.$ZodType>(schema: T, value: input<T>, _ctx?: schemas.ParseContext<$ZodIssue>) => Promise<output<T>>;
2276
- declare const _decodeAsync: (_Err: $ZodErrorClass) => $DecodeAsync;
2277
- declare const decodeAsync: $DecodeAsync;
2278
- export type $SafeEncode = <T extends schemas.$ZodType>(schema: T, value: output<T>, _ctx?: schemas.ParseContext<$ZodIssue>) => util.SafeParseResult<input<T>>;
2279
- declare const _safeEncode: (_Err: $ZodErrorClass) => $SafeEncode;
2280
- declare const safeEncode: $SafeEncode;
2281
- export type $SafeDecode = <T extends schemas.$ZodType>(schema: T, value: input<T>, _ctx?: schemas.ParseContext<$ZodIssue>) => util.SafeParseResult<output<T>>;
2282
- declare const _safeDecode: (_Err: $ZodErrorClass) => $SafeDecode;
2283
- declare const safeDecode: $SafeDecode;
2284
- export type $SafeEncodeAsync = <T extends schemas.$ZodType>(schema: T, value: output<T>, _ctx?: schemas.ParseContext<$ZodIssue>) => Promise<util.SafeParseResult<input<T>>>;
2285
- declare const _safeEncodeAsync: (_Err: $ZodErrorClass) => $SafeEncodeAsync;
2286
- declare const safeEncodeAsync: $SafeEncodeAsync;
2287
- export type $SafeDecodeAsync = <T extends schemas.$ZodType>(schema: T, value: input<T>, _ctx?: schemas.ParseContext<$ZodIssue>) => Promise<util.SafeParseResult<output<T>>>;
2288
- declare const _safeDecodeAsync: (_Err: $ZodErrorClass) => $SafeDecodeAsync;
2289
- declare const safeDecodeAsync: $SafeDecodeAsync;
2290
- declare const cuid: RegExp;
2291
- declare const cuid2: RegExp;
2292
- declare const ulid: RegExp;
2293
- declare const xid: RegExp;
2294
- declare const ksuid: RegExp;
2295
- declare const nanoid: RegExp;
2296
- declare const duration: RegExp;
2297
- declare const extendedDuration: RegExp;
2298
- declare const guid: RegExp;
2299
- declare const uuid: (version?: number | undefined) => RegExp;
2300
- declare const uuid4: RegExp;
2301
- declare const uuid6: RegExp;
2302
- declare const uuid7: RegExp;
2303
- declare const email: RegExp;
2304
- declare const html5Email: RegExp;
2305
- declare const rfc5322Email: RegExp;
2306
- declare const unicodeEmail: RegExp;
2307
- declare const idnEmail: RegExp;
2308
- declare const browserEmail: RegExp;
2309
- declare function emoji(): RegExp;
2310
- declare const ipv4: RegExp;
2311
- declare const ipv6: RegExp;
2312
- declare const mac: (delimiter?: string) => RegExp;
2313
- declare const cidrv4: RegExp;
2314
- declare const cidrv6: RegExp;
2315
- declare const base64: RegExp;
2316
- declare const base64url: RegExp;
2317
- declare const hostname: RegExp;
2318
- declare const domain: RegExp;
2319
- declare const e164: RegExp;
2320
- declare const date: RegExp;
2321
- declare function time(args: {
2322
- precision?: number | null;
2323
- }): RegExp;
2324
- declare function datetime(args: {
2325
- precision?: number | null;
2326
- offset?: boolean;
2327
- local?: boolean;
2328
- }): RegExp;
2329
- declare const string: (params?: {
2330
- minimum?: number | undefined;
2331
- maximum?: number | undefined;
2332
- }) => RegExp;
2333
- declare const bigint: RegExp;
2334
- declare const integer: RegExp;
2335
- declare const number: RegExp;
2336
- declare const boolean: RegExp;
2337
- declare const _null: RegExp;
2338
- declare const _undefined: RegExp;
2339
- declare const lowercase: RegExp;
2340
- declare const uppercase: RegExp;
2341
- declare const hex: RegExp;
2342
- declare const md5_hex: RegExp;
2343
- declare const md5_base64: RegExp;
2344
- declare const md5_base64url: RegExp;
2345
- declare const sha1_hex: RegExp;
2346
- declare const sha1_base64: RegExp;
2347
- declare const sha1_base64url: RegExp;
2348
- declare const sha256_hex: RegExp;
2349
- declare const sha256_base64: RegExp;
2350
- declare const sha256_base64url: RegExp;
2351
- declare const sha384_hex: RegExp;
2352
- declare const sha384_base64: RegExp;
2353
- declare const sha384_base64url: RegExp;
2354
- declare const sha512_hex: RegExp;
2355
- declare const sha512_base64: RegExp;
2356
- declare const sha512_base64url: RegExp;
2357
- declare function _default(): {
2358
- localeError: $ZodErrorMap;
2359
- };
2360
- declare function _default$1(): {
2361
- localeError: $ZodErrorMap;
2362
- };
2363
- declare function _default$2(): {
2364
- localeError: $ZodErrorMap;
2365
- };
2366
- declare function _default$3(): {
2367
- localeError: $ZodErrorMap;
2368
- };
2369
- declare function _default$4(): {
2370
- localeError: $ZodErrorMap;
2371
- };
2372
- declare function _default$5(): {
2373
- localeError: $ZodErrorMap;
2374
- };
2375
- declare function _default$6(): {
2376
- localeError: $ZodErrorMap;
2377
- };
2378
- declare function _default$7(): {
2379
- localeError: $ZodErrorMap;
2380
- };
2381
- declare function _default$8(): {
2382
- localeError: $ZodErrorMap;
2383
- };
2384
- declare function _default$9(): {
2385
- localeError: $ZodErrorMap;
2386
- };
2387
- declare function _default$10(): {
2388
- localeError: $ZodErrorMap;
2389
- };
2390
- declare function _default$11(): {
2391
- localeError: $ZodErrorMap;
2392
- };
2393
- declare function _default$12(): {
2394
- localeError: $ZodErrorMap;
2395
- };
2396
- declare function _default$13(): {
2397
- localeError: $ZodErrorMap;
2398
- };
2399
- declare function _default$14(): {
2400
- localeError: $ZodErrorMap;
2401
- };
2402
- declare function _default$15(): {
2403
- localeError: $ZodErrorMap;
2404
- };
2405
- declare function _default$16(): {
2406
- localeError: $ZodErrorMap;
2407
- };
2408
- declare function _default$17(): {
2409
- localeError: $ZodErrorMap;
2410
- };
2411
- declare function _default$18(): {
2412
- localeError: $ZodErrorMap;
2413
- };
2414
- declare function _default$19(): {
2415
- localeError: $ZodErrorMap;
2416
- };
2417
- declare function _default$20(): {
2418
- localeError: $ZodErrorMap;
2419
- };
2420
- declare function _default$21(): {
2421
- localeError: $ZodErrorMap;
2422
- };
2423
- declare function _default$22(): {
2424
- localeError: $ZodErrorMap;
2425
- };
2426
- declare function _default$23(): {
2427
- localeError: $ZodErrorMap;
2428
- };
2429
- declare function _default$24(): {
2430
- localeError: $ZodErrorMap;
2431
- };
2432
- declare function _default$25(): {
2433
- localeError: $ZodErrorMap;
2434
- };
2435
- declare function _default$26(): {
2436
- localeError: $ZodErrorMap;
2437
- };
2438
- declare function _default$27(): {
2439
- localeError: $ZodErrorMap;
2440
- };
2441
- declare function _default$28(): {
2442
- localeError: $ZodErrorMap;
2443
- };
2444
- declare function _default$29(): {
2445
- localeError: $ZodErrorMap;
2446
- };
2447
- declare function _default$30(): {
2448
- localeError: $ZodErrorMap;
2449
- };
2450
- declare function _default$31(): {
2451
- localeError: $ZodErrorMap;
2452
- };
2453
- declare function _default$32(): {
2454
- localeError: $ZodErrorMap;
2455
- };
2456
- declare function _default$33(): {
2457
- localeError: $ZodErrorMap;
2458
- };
2459
- declare function _default$34(): {
2460
- localeError: $ZodErrorMap;
2461
- };
2462
- declare function _default$35(): {
2463
- localeError: $ZodErrorMap;
2464
- };
2465
- declare function _default$36(): {
2466
- localeError: $ZodErrorMap;
2467
- };
2468
- declare function _default$37(): {
2469
- localeError: $ZodErrorMap;
2470
- };
2471
- declare function _default$38(): {
2472
- localeError: $ZodErrorMap;
2473
- };
2474
- declare function _default$39(): {
2475
- localeError: $ZodErrorMap;
2476
- };
2477
- declare function _default$40(): {
2478
- localeError: $ZodErrorMap;
2479
- };
2480
- declare function _default$41(): {
2481
- localeError: $ZodErrorMap;
2482
- };
2483
- declare function _default$42(): {
2484
- localeError: $ZodErrorMap;
2485
- };
2486
- declare function _default$43(): {
2487
- localeError: $ZodErrorMap;
2488
- };
2489
- declare function _default$44(): {
2490
- localeError: $ZodErrorMap;
2491
- };
2492
- declare function _default$45(): {
2493
- localeError: $ZodErrorMap;
2494
- };
2495
- declare function _default$46(): {
2496
- localeError: $ZodErrorMap;
2497
- };
2498
- declare function _default$47(): {
2499
- localeError: $ZodErrorMap;
2500
- };
2501
- declare function _default$48(): {
2502
- localeError: $ZodErrorMap;
2503
- };
2504
- export type ModeWriter = (doc: Doc, modes: {
2505
- execution: "sync" | "async";
2506
- }) => void;
2507
- declare class Doc {
2508
- args: string[];
2509
- content: string[];
2510
- indent: number;
2511
- constructor(args?: string[]);
2512
- indented(fn: (doc: Doc) => void): void;
2513
- write(fn: ModeWriter): void;
2514
- write(line: string): void;
2515
- compile(): any;
2516
- }
2517
- export type Params<T extends schemas.$ZodType | $ZodCheck, IssueTypes extends $ZodIssueBase, OmitKeys extends keyof T["_zod"]["def"] = never> = util.Flatten<Partial<util.EmptyToNever<Omit<T["_zod"]["def"], OmitKeys> & ([
2518
- IssueTypes
2519
- ] extends [
2520
- never
2521
- ] ? {} : {
2522
- error?: string | $ZodErrorMap<IssueTypes> | undefined;
2523
- /** @deprecated This parameter is deprecated. Use `error` instead. */
2524
- message?: string | undefined;
2525
- })>>>;
2526
- export type TypeParams<T extends schemas.$ZodType = schemas.$ZodType & {
2527
- _isst: never;
2528
- }, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
2529
- export type CheckParams<T extends $ZodCheck = $ZodCheck, // & { _issc: never },
2530
- AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
2531
- export type StringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
2532
- export type CheckStringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
2533
- export type CheckTypeParams<T extends schemas.$ZodType & $ZodCheck = schemas.$ZodType & $ZodCheck, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error" | "check"> = never> = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "checks" | "error" | "check" | AlsoOmit>;
2534
- export type $ZodStringParams = TypeParams<schemas.$ZodString<string>, "coerce">;
2535
- declare function _string<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
2536
- declare function _coercedString<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
2537
- export type $ZodStringFormatParams = CheckTypeParams<schemas.$ZodStringFormat, "format" | "coerce" | "when" | "pattern">;
2538
- export type $ZodCheckStringFormatParams = CheckParams<$ZodCheckStringFormat, "format">;
2539
- export type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail, "when">;
2540
- export type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail, "when">;
2541
- declare function _email<T extends schemas.$ZodEmail>(Class: util.SchemaClass<T>, params?: string | $ZodEmailParams | $ZodCheckEmailParams): T;
2542
- export type $ZodGUIDParams = StringFormatParams<schemas.$ZodGUID, "pattern" | "when">;
2543
- export type $ZodCheckGUIDParams = CheckStringFormatParams<schemas.$ZodGUID, "pattern" | "when">;
2544
- declare function _guid<T extends schemas.$ZodGUID>(Class: util.SchemaClass<T>, params?: string | $ZodGUIDParams | $ZodCheckGUIDParams): T;
2545
- export type $ZodUUIDParams = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
2546
- export type $ZodCheckUUIDParams = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
2547
- declare function _uuid<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDParams | $ZodCheckUUIDParams): T;
2548
- export type $ZodUUIDv4Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
2549
- export type $ZodCheckUUIDv4Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
2550
- declare function _uuidv4<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params): T;
2551
- export type $ZodUUIDv6Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
2552
- export type $ZodCheckUUIDv6Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
2553
- declare function _uuidv6<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params): T;
2554
- export type $ZodUUIDv7Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
2555
- export type $ZodCheckUUIDv7Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
2556
- declare function _uuidv7<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params): T;
2557
- export type $ZodURLParams = StringFormatParams<schemas.$ZodURL, "when">;
2558
- export type $ZodCheckURLParams = CheckStringFormatParams<schemas.$ZodURL, "when">;
2559
- declare function _url<T extends schemas.$ZodURL>(Class: util.SchemaClass<T>, params?: string | $ZodURLParams | $ZodCheckURLParams): T;
2560
- export type $ZodEmojiParams = StringFormatParams<schemas.$ZodEmoji, "when">;
2561
- export type $ZodCheckEmojiParams = CheckStringFormatParams<schemas.$ZodEmoji, "when">;
2562
- declare function _emoji<T extends schemas.$ZodEmoji>(Class: util.SchemaClass<T>, params?: string | $ZodEmojiParams | $ZodCheckEmojiParams): T;
2563
- export type $ZodNanoIDParams = StringFormatParams<schemas.$ZodNanoID, "when">;
2564
- export type $ZodCheckNanoIDParams = CheckStringFormatParams<schemas.$ZodNanoID, "when">;
2565
- declare function _nanoid<T extends schemas.$ZodNanoID>(Class: util.SchemaClass<T>, params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams): T;
2566
- export type $ZodCUIDParams = StringFormatParams<schemas.$ZodCUID, "when">;
2567
- export type $ZodCheckCUIDParams = CheckStringFormatParams<schemas.$ZodCUID, "when">;
2568
- declare function _cuid<T extends schemas.$ZodCUID>(Class: util.SchemaClass<T>, params?: string | $ZodCUIDParams | $ZodCheckCUIDParams): T;
2569
- export type $ZodCUID2Params = StringFormatParams<schemas.$ZodCUID2, "when">;
2570
- export type $ZodCheckCUID2Params = CheckStringFormatParams<schemas.$ZodCUID2, "when">;
2571
- declare function _cuid2<T extends schemas.$ZodCUID2>(Class: util.SchemaClass<T>, params?: string | $ZodCUID2Params | $ZodCheckCUID2Params): T;
2572
- export type $ZodULIDParams = StringFormatParams<schemas.$ZodULID, "when">;
2573
- export type $ZodCheckULIDParams = CheckStringFormatParams<schemas.$ZodULID, "when">;
2574
- declare function _ulid<T extends schemas.$ZodULID>(Class: util.SchemaClass<T>, params?: string | $ZodULIDParams | $ZodCheckULIDParams): T;
2575
- export type $ZodXIDParams = StringFormatParams<schemas.$ZodXID, "when">;
2576
- export type $ZodCheckXIDParams = CheckStringFormatParams<schemas.$ZodXID, "when">;
2577
- declare function _xid<T extends schemas.$ZodXID>(Class: util.SchemaClass<T>, params?: string | $ZodXIDParams | $ZodCheckXIDParams): T;
2578
- export type $ZodKSUIDParams = StringFormatParams<schemas.$ZodKSUID, "when">;
2579
- export type $ZodCheckKSUIDParams = CheckStringFormatParams<schemas.$ZodKSUID, "when">;
2580
- declare function _ksuid<T extends schemas.$ZodKSUID>(Class: util.SchemaClass<T>, params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams): T;
2581
- export type $ZodIPv4Params = StringFormatParams<schemas.$ZodIPv4, "pattern" | "when" | "version">;
2582
- export type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, "pattern" | "when" | "version">;
2583
- declare function _ipv4<T extends schemas.$ZodIPv4>(Class: util.SchemaClass<T>, params?: string | $ZodIPv4Params | $ZodCheckIPv4Params): T;
2584
- export type $ZodIPv6Params = StringFormatParams<schemas.$ZodIPv6, "pattern" | "when" | "version">;
2585
- export type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, "pattern" | "when" | "version">;
2586
- declare function _ipv6<T extends schemas.$ZodIPv6>(Class: util.SchemaClass<T>, params?: string | $ZodIPv6Params | $ZodCheckIPv6Params): T;
2587
- export type $ZodMACParams = StringFormatParams<schemas.$ZodMAC, "pattern" | "when">;
2588
- export type $ZodCheckMACParams = CheckStringFormatParams<schemas.$ZodMAC, "pattern" | "when">;
2589
- declare function _mac<T extends schemas.$ZodMAC>(Class: util.SchemaClass<T>, params?: string | $ZodMACParams | $ZodCheckMACParams): T;
2590
- export type $ZodCIDRv4Params = StringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;
2591
- export type $ZodCheckCIDRv4Params = CheckStringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;
2592
- declare function _cidrv4<T extends schemas.$ZodCIDRv4>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params): T;
2593
- export type $ZodCIDRv6Params = StringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;
2594
- export type $ZodCheckCIDRv6Params = CheckStringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;
2595
- declare function _cidrv6<T extends schemas.$ZodCIDRv6>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params): T;
2596
- export type $ZodBase64Params = StringFormatParams<schemas.$ZodBase64, "pattern" | "when">;
2597
- export type $ZodCheckBase64Params = CheckStringFormatParams<schemas.$ZodBase64, "pattern" | "when">;
2598
- declare function _base64<T extends schemas.$ZodBase64>(Class: util.SchemaClass<T>, params?: string | $ZodBase64Params | $ZodCheckBase64Params): T;
2599
- export type $ZodBase64URLParams = StringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;
2600
- export type $ZodCheckBase64URLParams = CheckStringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;
2601
- declare function _base64url<T extends schemas.$ZodBase64URL>(Class: util.SchemaClass<T>, params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams): T;
2602
- export type $ZodE164Params = StringFormatParams<schemas.$ZodE164, "when">;
2603
- export type $ZodCheckE164Params = CheckStringFormatParams<schemas.$ZodE164, "when">;
2604
- declare function _e164<T extends schemas.$ZodE164>(Class: util.SchemaClass<T>, params?: string | $ZodE164Params | $ZodCheckE164Params): T;
2605
- export type $ZodJWTParams = StringFormatParams<schemas.$ZodJWT, "pattern" | "when">;
2606
- export type $ZodCheckJWTParams = CheckStringFormatParams<schemas.$ZodJWT, "pattern" | "when">;
2607
- declare function _jwt<T extends schemas.$ZodJWT>(Class: util.SchemaClass<T>, params?: string | $ZodJWTParams | $ZodCheckJWTParams): T;
2608
- declare const TimePrecision: {
2609
- readonly Any: null;
2610
- readonly Minute: -1;
2611
- readonly Second: 0;
2612
- readonly Millisecond: 3;
2613
- readonly Microsecond: 6;
2614
- };
2615
- export type $ZodISODateTimeParams = StringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;
2616
- export type $ZodCheckISODateTimeParams = CheckStringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;
2617
- declare function _isoDateTime<T extends schemas.$ZodISODateTime>(Class: util.SchemaClass<T>, params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams): T;
2618
- export type $ZodISODateParams = StringFormatParams<schemas.$ZodISODate, "pattern" | "when">;
2619
- export type $ZodCheckISODateParams = CheckStringFormatParams<schemas.$ZodISODate, "pattern" | "when">;
2620
- declare function _isoDate<T extends schemas.$ZodISODate>(Class: util.SchemaClass<T>, params?: string | $ZodISODateParams | $ZodCheckISODateParams): T;
2621
- export type $ZodISOTimeParams = StringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;
2622
- export type $ZodCheckISOTimeParams = CheckStringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;
2623
- declare function _isoTime<T extends schemas.$ZodISOTime>(Class: util.SchemaClass<T>, params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams): T;
2624
- export type $ZodISODurationParams = StringFormatParams<schemas.$ZodISODuration, "when">;
2625
- export type $ZodCheckISODurationParams = CheckStringFormatParams<schemas.$ZodISODuration, "when">;
2626
- declare function _isoDuration<T extends schemas.$ZodISODuration>(Class: util.SchemaClass<T>, params?: string | $ZodISODurationParams | $ZodCheckISODurationParams): T;
2627
- export type $ZodNumberParams = TypeParams<schemas.$ZodNumber<number>, "coerce">;
2628
- export type $ZodNumberFormatParams = CheckTypeParams<schemas.$ZodNumberFormat, "format" | "coerce">;
2629
- export type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
2630
- declare function _number<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;
2631
- declare function _coercedNumber<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;
2632
- declare function _int<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
2633
- declare function _float32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
2634
- declare function _float64<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
2635
- declare function _int32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
2636
- declare function _uint32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
2637
- export type $ZodBooleanParams = TypeParams<schemas.$ZodBoolean<boolean>, "coerce">;
2638
- declare function _boolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;
2639
- declare function _coercedBoolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;
2640
- export type $ZodBigIntParams = TypeParams<schemas.$ZodBigInt<bigint>>;
2641
- export type $ZodBigIntFormatParams = CheckTypeParams<schemas.$ZodBigIntFormat, "format" | "coerce">;
2642
- export type $ZodCheckBigIntFormatParams = CheckParams<$ZodCheckBigIntFormat, "format" | "when">;
2643
- declare function _bigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;
2644
- declare function _coercedBigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;
2645
- declare function _int64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
2646
- declare function _uint64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
2647
- export type $ZodSymbolParams = TypeParams<schemas.$ZodSymbol>;
2648
- declare function _symbol<T extends schemas.$ZodSymbol>(Class: util.SchemaClass<T>, params?: string | $ZodSymbolParams): T;
2649
- export type $ZodUndefinedParams = TypeParams<schemas.$ZodUndefined>;
2650
- declare function _undefined$1<T extends schemas.$ZodUndefined>(Class: util.SchemaClass<T>, params?: string | $ZodUndefinedParams): T;
2651
- export type $ZodNullParams = TypeParams<schemas.$ZodNull>;
2652
- declare function _null$1<T extends schemas.$ZodNull>(Class: util.SchemaClass<T>, params?: string | $ZodNullParams): T;
2653
- export type $ZodAnyParams = TypeParams<schemas.$ZodAny>;
2654
- declare function _any<T extends schemas.$ZodAny>(Class: util.SchemaClass<T>): T;
2655
- export type $ZodUnknownParams = TypeParams<schemas.$ZodUnknown>;
2656
- declare function _unknown<T extends schemas.$ZodUnknown>(Class: util.SchemaClass<T>): T;
2657
- export type $ZodNeverParams = TypeParams<schemas.$ZodNever>;
2658
- declare function _never<T extends schemas.$ZodNever>(Class: util.SchemaClass<T>, params?: string | $ZodNeverParams): T;
2659
- export type $ZodVoidParams = TypeParams<schemas.$ZodVoid>;
2660
- declare function _void<T extends schemas.$ZodVoid>(Class: util.SchemaClass<T>, params?: string | $ZodVoidParams): T;
2661
- export type $ZodDateParams = TypeParams<schemas.$ZodDate, "coerce">;
2662
- declare function _date<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;
2663
- declare function _coercedDate<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;
2664
- export type $ZodNaNParams = TypeParams<schemas.$ZodNaN>;
2665
- declare function _nan<T extends schemas.$ZodNaN>(Class: util.SchemaClass<T>, params?: string | $ZodNaNParams): T;
2666
- export type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
2667
- declare function _lt(value: util.Numeric, params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan<util.Numeric>;
2668
- declare function _lte(value: util.Numeric, params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan<util.Numeric>;
2669
- export type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
2670
- declare function _gt(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
2671
- declare function _gte(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
2672
- declare function _positive(params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
2673
- declare function _negative(params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan;
2674
- declare function _nonpositive(params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan;
2675
- declare function _nonnegative(params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
2676
- export type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
2677
- declare function _multipleOf(value: number | bigint, params?: string | $ZodCheckMultipleOfParams): $ZodCheckMultipleOf;
2678
- export type $ZodCheckMaxSizeParams = CheckParams<$ZodCheckMaxSize, "maximum" | "when">;
2679
- declare function _maxSize(maximum: number, params?: string | $ZodCheckMaxSizeParams): $ZodCheckMaxSize<util.HasSize>;
2680
- export type $ZodCheckMinSizeParams = CheckParams<$ZodCheckMinSize, "minimum" | "when">;
2681
- declare function _minSize(minimum: number, params?: string | $ZodCheckMinSizeParams): $ZodCheckMinSize<util.HasSize>;
2682
- export type $ZodCheckSizeEqualsParams = CheckParams<$ZodCheckSizeEquals, "size" | "when">;
2683
- declare function _size(size: number, params?: string | $ZodCheckSizeEqualsParams): $ZodCheckSizeEquals<util.HasSize>;
2684
- export type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
2685
- declare function _maxLength(maximum: number, params?: string | $ZodCheckMaxLengthParams): $ZodCheckMaxLength<util.HasLength>;
2686
- export type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
2687
- declare function _minLength(minimum: number, params?: string | $ZodCheckMinLengthParams): $ZodCheckMinLength<util.HasLength>;
2688
- export type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
2689
- declare function _length(length: number, params?: string | $ZodCheckLengthEqualsParams): $ZodCheckLengthEquals<util.HasLength>;
2690
- export type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
2691
- declare function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): $ZodCheckRegex;
2692
- export type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
2693
- declare function _lowercase(params?: string | $ZodCheckLowerCaseParams): $ZodCheckLowerCase;
2694
- export type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
2695
- declare function _uppercase(params?: string | $ZodCheckUpperCaseParams): $ZodCheckUpperCase;
2696
- export type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
2697
- declare function _includes(includes: string, params?: string | $ZodCheckIncludesParams): $ZodCheckIncludes;
2698
- export type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
2699
- declare function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): $ZodCheckStartsWith;
2700
- export type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
2701
- declare function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): $ZodCheckEndsWith;
2702
- export type $ZodCheckPropertyParams = CheckParams<$ZodCheckProperty, "property" | "schema" | "when">;
2703
- declare function _property<K extends string, T extends schemas.$ZodType>(property: K, schema: T, params?: string | $ZodCheckPropertyParams): $ZodCheckProperty<{
2704
- [k in K]: output<T>;
2705
- }>;
2706
- export type $ZodCheckMimeTypeParams = CheckParams<$ZodCheckMimeType, "mime" | "when">;
2707
- declare function _mime(types: util.MimeTypes[], params?: string | $ZodCheckMimeTypeParams): $ZodCheckMimeType;
2708
- declare function _overwrite<T>(tx: (input: T) => T): $ZodCheckOverwrite<T>;
2709
- declare function _normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): $ZodCheckOverwrite<string>;
2710
- declare function _trim(): $ZodCheckOverwrite<string>;
2711
- declare function _toLowerCase(): $ZodCheckOverwrite<string>;
2712
- declare function _toUpperCase(): $ZodCheckOverwrite<string>;
2713
- declare function _slugify(): $ZodCheckOverwrite<string>;
2714
- export type $ZodArrayParams = TypeParams<schemas.$ZodArray, "element">;
2715
- declare function _array<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodArray>, element: T, params?: string | $ZodArrayParams): schemas.$ZodArray<T>;
2716
- export type $ZodObjectParams = TypeParams<schemas.$ZodObject, "shape" | "catchall">;
2717
- export type $ZodUnionParams = TypeParams<schemas.$ZodUnion, "options">;
2718
- declare function _union<const T extends readonly schemas.$ZodObject[]>(Class: util.SchemaClass<schemas.$ZodUnion>, options: T, params?: string | $ZodUnionParams): schemas.$ZodUnion<T>;
2719
- export type $ZodXorParams = TypeParams<schemas.$ZodXor, "options">;
2720
- declare function _xor<const T extends readonly schemas.$ZodObject[]>(Class: util.SchemaClass<schemas.$ZodXor>, options: T, params?: string | $ZodXorParams): schemas.$ZodXor<T>;
2721
- export interface $ZodTypeDiscriminableInternals extends schemas.$ZodTypeInternals {
2722
- propValues: util.PropValues;
2723
- }
2724
- export interface $ZodTypeDiscriminable extends schemas.$ZodType {
2725
- _zod: $ZodTypeDiscriminableInternals;
2726
- }
2727
- export type $ZodDiscriminatedUnionParams = TypeParams<schemas.$ZodDiscriminatedUnion, "options" | "discriminator">;
2728
- declare function _discriminatedUnion<Types extends [
2729
- $ZodTypeDiscriminable,
2730
- ...$ZodTypeDiscriminable[]
2731
- ], Disc extends string>(Class: util.SchemaClass<schemas.$ZodDiscriminatedUnion>, discriminator: Disc, options: Types, params?: string | $ZodDiscriminatedUnionParams): schemas.$ZodDiscriminatedUnion<Types, Disc>;
2732
- export type $ZodIntersectionParams = TypeParams<schemas.$ZodIntersection, "left" | "right">;
2733
- declare function _intersection<T extends schemas.$ZodObject, U extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodIntersection>, left: T, right: U): schemas.$ZodIntersection<T, U>;
2734
- export type $ZodTupleParams = TypeParams<schemas.$ZodTuple, "items" | "rest">;
2735
- declare function _tuple<T extends readonly [
2736
- schemas.$ZodType,
2737
- ...schemas.$ZodType[]
2738
- ]>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, null>;
2739
- declare function _tuple<T extends readonly [
2740
- schemas.$ZodType,
2741
- ...schemas.$ZodType[]
2742
- ], Rest extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, rest: Rest, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, Rest>;
2743
- export type $ZodRecordParams = TypeParams<schemas.$ZodRecord, "keyType" | "valueType">;
2744
- declare function _record<Key extends schemas.$ZodRecordKey, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodRecord>, keyType: Key, valueType: Value, params?: string | $ZodRecordParams): schemas.$ZodRecord<Key, Value>;
2745
- export type $ZodMapParams = TypeParams<schemas.$ZodMap, "keyType" | "valueType">;
2746
- declare function _map<Key extends schemas.$ZodObject, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodMap>, keyType: Key, valueType: Value, params?: string | $ZodMapParams): schemas.$ZodMap<Key, Value>;
2747
- export type $ZodSetParams = TypeParams<schemas.$ZodSet, "valueType">;
2748
- declare function _set<Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSet>, valueType: Value, params?: string | $ZodSetParams): schemas.$ZodSet<Value>;
2749
- export type $ZodEnumParams = TypeParams<schemas.$ZodEnum, "entries">;
2750
- declare function _enum<const T extends string[]>(Class: util.SchemaClass<schemas.$ZodEnum>, values: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<util.ToEnum<T[number]>>;
2751
- declare function _enum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;
2752
- declare function _nativeEnum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;
2753
- export type $ZodLiteralParams = TypeParams<schemas.$ZodLiteral, "values">;
2754
- declare function _literal<const T extends Array<util.Literal>>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T[number]>;
2755
- declare function _literal<const T extends util.Literal>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T>;
2756
- export type $ZodFileParams = TypeParams<schemas.$ZodFile>;
2757
- declare function _file(Class: util.SchemaClass<schemas.$ZodFile>, params?: string | $ZodFileParams): schemas.$ZodFile;
2758
- export type $ZodTransformParams = TypeParams<schemas.$ZodTransform, "transform">;
2759
- declare function _transform<I = unknown, O = I>(Class: util.SchemaClass<schemas.$ZodTransform>, fn: (input: I, ctx?: schemas.ParsePayload) => O): schemas.$ZodTransform<Awaited<O>, I>;
2760
- export type $ZodOptionalParams = TypeParams<schemas.$ZodOptional, "innerType">;
2761
- declare function _optional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodOptional>, innerType: T): schemas.$ZodOptional<T>;
2762
- export type $ZodNullableParams = TypeParams<schemas.$ZodNullable, "innerType">;
2763
- declare function _nullable<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNullable>, innerType: T): schemas.$ZodNullable<T>;
2764
- export type $ZodDefaultParams = TypeParams<schemas.$ZodDefault, "innerType" | "defaultValue">;
2765
- declare function _default$49<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodDefault>, innerType: T, defaultValue: util.NoUndefined<output<T>> | (() => util.NoUndefined<output<T>>)): schemas.$ZodDefault<T>;
2766
- export type $ZodNonOptionalParams = TypeParams<schemas.$ZodNonOptional, "innerType">;
2767
- declare function _nonoptional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNonOptional>, innerType: T, params?: string | $ZodNonOptionalParams): schemas.$ZodNonOptional<T>;
2768
- export type $ZodSuccessParams = TypeParams<schemas.$ZodSuccess, "innerType">;
2769
- declare function _success<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSuccess>, innerType: T): schemas.$ZodSuccess<T>;
2770
- export type $ZodCatchParams = TypeParams<schemas.$ZodCatch, "innerType" | "catchValue">;
2771
- declare function _catch<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodCatch>, innerType: T, catchValue: output<T> | ((ctx: schemas.$ZodCatchCtx) => output<T>)): schemas.$ZodCatch<T>;
2772
- export type $ZodPipeParams = TypeParams<schemas.$ZodPipe, "in" | "out">;
2773
- declare function _pipe<const A extends schemas.$ZodType, B extends schemas.$ZodType<unknown, output<A>> = schemas.$ZodType<unknown, output<A>>>(Class: util.SchemaClass<schemas.$ZodPipe>, in_: A, out: B | schemas.$ZodType<unknown, output<A>>): schemas.$ZodPipe<A, B>;
2774
- export type $ZodReadonlyParams = TypeParams<schemas.$ZodReadonly, "innerType">;
2775
- declare function _readonly<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodReadonly>, innerType: T): schemas.$ZodReadonly<T>;
2776
- export type $ZodTemplateLiteralParams = TypeParams<schemas.$ZodTemplateLiteral, "parts">;
2777
- declare function _templateLiteral<const Parts extends schemas.$ZodTemplateLiteralPart[]>(Class: util.SchemaClass<schemas.$ZodTemplateLiteral>, parts: Parts, params?: string | $ZodTemplateLiteralParams): schemas.$ZodTemplateLiteral<schemas.$PartsToTemplateLiteral<Parts>>;
2778
- export type $ZodLazyParams = TypeParams<schemas.$ZodLazy, "getter">;
2779
- declare function _lazy<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodLazy>, getter: () => T): schemas.$ZodLazy<T>;
2780
- export type $ZodPromiseParams = TypeParams<schemas.$ZodPromise, "innerType">;
2781
- declare function _promise<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodPromise>, innerType: T): schemas.$ZodPromise<T>;
2782
- export type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, "fn">;
2783
- declare function _custom<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;
2784
- declare function _refine<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;
2785
- export type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
2786
- type RawIssue$1<T extends $ZodIssueBase> = T extends any ? util.Flatten<util.MakePartial<T, "message" | "path"> & {
2787
- /** The schema or check that originated this issue. */
2788
- readonly inst?: schemas.$ZodType | $ZodCheck;
2789
- /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
2790
- readonly continue?: boolean | undefined;
2791
- } & Record<string, unknown>> : never;
2792
- export interface $RefinementCtx<T = unknown> extends schemas.ParsePayload<T> {
2793
- addIssue(arg: string | $ZodSuperRefineIssue): void;
2794
- }
2795
- declare function _superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>): $ZodCheck<T>;
2796
- declare function _check<O = unknown>(fn: schemas.CheckFn<O>, params?: string | $ZodCustomParams): $ZodCheck<O>;
2797
- declare function describe<T>(description: string): $ZodCheck<T>;
2798
- declare function meta<T>(metadata: GlobalMeta): $ZodCheck<T>;
2799
- export interface $ZodStringBoolParams extends TypeParams {
2800
- truthy?: string[];
2801
- falsy?: string[];
2802
- /**
2803
- * Options: `"sensitive"`, `"insensitive"`
2804
- *
2805
- * @default `"insensitive"`
2806
- */
2807
- case?: "sensitive" | "insensitive" | undefined;
2808
- }
2809
- declare function _stringbool(Classes: {
2810
- Codec?: typeof schemas.$ZodCodec;
2811
- Boolean?: typeof schemas.$ZodBoolean;
2812
- String?: typeof schemas.$ZodString;
2813
- }, _params?: string | $ZodStringBoolParams): schemas.$ZodCodec<schemas.$ZodString, schemas.$ZodBoolean>;
2814
- declare function _stringFormat<Format extends string>(Class: typeof schemas.$ZodCustomStringFormat, format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | $ZodStringFormatParams): schemas.$ZodCustomStringFormat<Format>;
2815
- declare function toJSONSchema<T extends schemas.$ZodType>(schema: T, params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<T>;
2816
- declare function toJSONSchema(registry: $ZodRegistry<{
2817
- id?: string | undefined;
2818
- }>, params?: RegistryToJSONSchemaParams): {
2819
- schemas: Record<string, ZodStandardJSONSchemaPayload<schemas.$ZodType>>;
2820
- };
2821
- /**
2822
- * Parameters for the emit method of JSONSchemaGenerator.
2823
- * @deprecated Use toJSONSchema function instead
2824
- */
2825
- export type EmitParams = Pick<JSONSchemaGeneratorParams, "cycles" | "reused" | "external">;
2826
- /**
2827
- * Parameters for JSONSchemaGenerator constructor.
2828
- * @deprecated Use toJSONSchema function instead
2829
- */
2830
- export type JSONSchemaGeneratorConstructorParams = Pick<JSONSchemaGeneratorParams, "metadata" | "target" | "unrepresentable" | "override" | "io">;
2831
- declare class JSONSchemaGenerator {
2832
- private ctx;
2833
- /** @deprecated Access via ctx instead */
2834
- get metadataRegistry(): $ZodRegistry<Record<string, any>>;
2835
- /** @deprecated Access via ctx instead */
2836
- get target(): ({} & string) | "draft-2020-12" | "draft-07" | "openapi-3.0" | "draft-04";
2837
- /** @deprecated Access via ctx instead */
2838
- get unrepresentable(): "any" | "throw";
2839
- /** @deprecated Access via ctx instead */
2840
- get override(): (ctx: {
2841
- zodSchema: schemas.$ZodType;
2842
- jsonSchema: JSONSchema$1.BaseSchema;
2843
- path: (string | number)[];
2844
- }) => void;
2845
- /** @deprecated Access via ctx instead */
2846
- get io(): "input" | "output";
2847
- /** @deprecated Access via ctx instead */
2848
- get counter(): number;
2849
- set counter(value: number);
2850
- /** @deprecated Access via ctx instead */
2851
- get seen(): Map<schemas.$ZodType, Seen>;
2852
- constructor(params?: JSONSchemaGeneratorConstructorParams);
2853
- /**
2854
- * Process a schema to prepare it for JSON Schema generation.
2855
- * This must be called before emit().
2856
- */
2857
- process(schema: schemas.$ZodType, _params?: ProcessParams): JSONSchema$1.BaseSchema;
2858
- /**
2859
- * Emit the final JSON Schema after processing.
2860
- * Must call process() first.
2861
- */
2862
- emit(schema: schemas.$ZodType, _params?: EmitParams): JSONSchema$1.BaseSchema;
2863
- }
2864
- /** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
2865
- export type ZodIssue = core.$ZodIssue;
2866
- /** An Error-like class used to store Zod validation issues. */
2867
- export interface ZodError<T = unknown> extends $ZodError<T> {
2868
- /** @deprecated Use the `z.treeifyError(err)` function instead. */
2869
- format(): core.$ZodFormattedError<T>;
2870
- format<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFormattedError<T, U>;
2871
- /** @deprecated Use the `z.treeifyError(err)` function instead. */
2872
- flatten(): core.$ZodFlattenedError<T>;
2873
- flatten<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFlattenedError<T, U>;
2874
- /** @deprecated Push directly to `.issues` instead. */
2875
- addIssue(issue: core.$ZodIssue): void;
2876
- /** @deprecated Push directly to `.issues` instead. */
2877
- addIssues(issues: core.$ZodIssue[]): void;
2878
- /** @deprecated Check `err.issues.length === 0` instead. */
2879
- isEmpty: boolean;
2880
- }
2881
- declare const ZodError: core.$constructor<ZodError>;
2882
- declare const ZodRealError: core.$constructor<ZodError>;
2883
- /** @deprecated Use `z.core.$ZodRawIssue` instead. */
2884
- export type IssueData = core.$ZodRawIssue;
2885
- export type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
2886
- export type ZodSafeParseSuccess<T> = {
2887
- success: true;
2888
- data: T;
2889
- error?: never;
2890
- };
2891
- export type ZodSafeParseError<T> = {
2892
- success: false;
2893
- data?: never;
2894
- error: ZodError<T>;
2895
- };
2896
- declare const parse$1: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
2897
- callee?: core.util.AnyFunc;
2898
- Err?: core.$ZodErrorClass;
2899
- }) => core.output<T>;
2900
- declare const parseAsync$1: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
2901
- callee?: core.util.AnyFunc;
2902
- Err?: core.$ZodErrorClass;
2903
- }) => Promise<core.output<T>>;
2904
- declare const safeParse$1: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => ZodSafeParseResult<core.output<T>>;
2905
- declare const safeParseAsync$1: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => Promise<ZodSafeParseResult<core.output<T>>>;
2906
- declare const encode$1: <T extends core.$ZodType>(schema: T, value: core.output<T>, _ctx?: core.ParseContext<core.$ZodIssue>) => core.input<T>;
2907
- declare const decode$1: <T extends core.$ZodType>(schema: T, value: core.input<T>, _ctx?: core.ParseContext<core.$ZodIssue>) => core.output<T>;
2908
- declare const encodeAsync$1: <T extends core.$ZodType>(schema: T, value: core.output<T>, _ctx?: core.ParseContext<core.$ZodIssue>) => Promise<core.input<T>>;
2909
- declare const decodeAsync$1: <T extends core.$ZodType>(schema: T, value: core.input<T>, _ctx?: core.ParseContext<core.$ZodIssue>) => Promise<core.output<T>>;
2910
- declare const safeEncode$1: <T extends core.$ZodType>(schema: T, value: core.output<T>, _ctx?: core.ParseContext<core.$ZodIssue>) => ZodSafeParseResult<core.input<T>>;
2911
- declare const safeDecode$1: <T extends core.$ZodType>(schema: T, value: core.input<T>, _ctx?: core.ParseContext<core.$ZodIssue>) => ZodSafeParseResult<core.output<T>>;
2912
- declare const safeEncodeAsync$1: <T extends core.$ZodType>(schema: T, value: core.output<T>, _ctx?: core.ParseContext<core.$ZodIssue>) => Promise<ZodSafeParseResult<core.input<T>>>;
2913
- declare const safeDecodeAsync$1: <T extends core.$ZodType>(schema: T, value: core.input<T>, _ctx?: core.ParseContext<core.$ZodIssue>) => Promise<ZodSafeParseResult<core.output<T>>>;
2914
- type ZodStandardSchemaWithJSON$1<T> = StandardSchemaWithJSONProps<core.input<T>, core.output<T>>;
2915
- export interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
2916
- def: Internals["def"];
2917
- type: Internals["def"]["type"];
2918
- /** @deprecated Use `.def` instead. */
2919
- _def: Internals["def"];
2920
- /** @deprecated Use `z.output<typeof schema>` instead. */
2921
- _output: Internals["output"];
2922
- /** @deprecated Use `z.input<typeof schema>` instead. */
2923
- _input: Internals["input"];
2924
- "~standard": ZodStandardSchemaWithJSON$1<this>;
2925
- /** Converts this schema to a JSON Schema representation. */
2926
- toJSONSchema(params?: core.ToJSONSchemaParams): core.ZodStandardJSONSchemaPayload<this>;
2927
- check(...checks: (core.CheckFn<core.output<this>> | core.$ZodCheck<core.output<this>>)[]): this;
2928
- with(...checks: (core.CheckFn<core.output<this>> | core.$ZodCheck<core.output<this>>)[]): this;
2929
- clone(def?: Internals["def"], params?: {
2930
- parent: boolean;
2931
- }): this;
2932
- register<R extends core.$ZodRegistry>(registry: R, ...meta: this extends R["_schema"] ? undefined extends R["_meta"] ? [
2933
- core.$replace<R["_meta"], this>?
2934
- ] : [
2935
- core.$replace<R["_meta"], this>
2936
- ] : [
2937
- "Incompatible schema"
2938
- ]): this;
2939
- brand<T extends PropertyKey = PropertyKey, Dir extends "in" | "out" | "inout" = "out">(value?: T): PropertyKey extends T ? this : core.$ZodBranded<this, T, Dir>;
2940
- parse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
2941
- safeParse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): ZodSafeParseResult<core.output<this>>;
2942
- parseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
2943
- safeParseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<ZodSafeParseResult<core.output<this>>>;
2944
- spa: (data: unknown, params?: core.ParseContext<core.$ZodIssue>) => Promise<ZodSafeParseResult<core.output<this>>>;
2945
- encode(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): core.input<this>;
2946
- decode(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
2947
- encodeAsync(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<core.input<this>>;
2948
- decodeAsync(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
2949
- safeEncode(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): ZodSafeParseResult<core.input<this>>;
2950
- safeDecode(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): ZodSafeParseResult<core.output<this>>;
2951
- safeEncodeAsync(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<ZodSafeParseResult<core.input<this>>>;
2952
- safeDecodeAsync(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<ZodSafeParseResult<core.output<this>>>;
2953
- refine<Ch extends (arg: core.output<this>) => unknown | Promise<unknown>>(check: Ch, params?: string | core.$ZodCustomParams): Ch extends (arg: any) => arg is infer R ? this & ZodType<R, core.input<this>> : this;
2954
- superRefine(refinement: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => void | Promise<void>): this;
2955
- overwrite(fn: (x: core.output<this>) => core.output<this>): this;
2956
- optional(): ZodOptional<this>;
2957
- exactOptional(): ZodExactOptional<this>;
2958
- nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
2959
- nullable(): ZodNullable<this>;
2960
- nullish(): ZodOptional<ZodNullable<this>>;
2961
- default(def: util.NoUndefined<core.output<this>>): ZodDefault<this>;
2962
- default(def: () => util.NoUndefined<core.output<this>>): ZodDefault<this>;
2963
- prefault(def: () => core.input<this>): ZodPrefault<this>;
2964
- prefault(def: core.input<this>): ZodPrefault<this>;
2965
- array(): ZodArray<this>;
2966
- or<T extends core.SomeType>(option: T): ZodUnion<[
2967
- this,
2968
- T
2969
- ]>;
2970
- and<T extends core.SomeType>(incoming: T): ZodIntersection<this, T>;
2971
- transform<NewOut>(transform: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
2972
- catch(def: core.output<this>): ZodCatch<this>;
2973
- catch(def: (ctx: core.$ZodCatchCtx) => core.output<this>): ZodCatch<this>;
2974
- pipe<T extends core.$ZodType<any, core.output<this>>>(target: T | core.$ZodType<any, core.output<this>>): ZodPipe<this, T>;
2975
- readonly(): ZodReadonly<this>;
2976
- /** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
2977
- describe(description: string): this;
2978
- description?: string;
2979
- /** Returns the metadata associated with this instance in `z.globalRegistry` */
2980
- meta(): core.$replace<core.GlobalMeta, this> | undefined;
2981
- /** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
2982
- meta(data: core.$replace<core.GlobalMeta, this>): this;
2983
- /** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
2984
- *
2985
- * ```ts
2986
- * const schema = z.string().optional();
2987
- * const isOptional = schema.safeParse(undefined).success; // true
2988
- * ```
2989
- */
2990
- isOptional(): boolean;
2991
- /**
2992
- * @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
2993
- *
2994
- * ```ts
2995
- * const schema = z.string().nullable();
2996
- * const isNullable = schema.safeParse(null).success; // true
2997
- * ```
2998
- */
2999
- isNullable(): boolean;
3000
- apply<T>(fn: (schema: this) => T): T;
3001
- }
3002
- export interface _ZodType<out Internals extends core.$ZodTypeInternals = core.$ZodTypeInternals> extends ZodType<any, any, Internals> {
3003
- }
3004
- declare const ZodType: core.$constructor<ZodType>;
3005
- export interface _ZodString<T extends core.$ZodStringInternals<unknown> = core.$ZodStringInternals<unknown>> extends _ZodType<T> {
3006
- format: string | null;
3007
- minLength: number | null;
3008
- maxLength: number | null;
3009
- regex(regex: RegExp, params?: string | core.$ZodCheckRegexParams): this;
3010
- includes(value: string, params?: string | core.$ZodCheckIncludesParams): this;
3011
- startsWith(value: string, params?: string | core.$ZodCheckStartsWithParams): this;
3012
- endsWith(value: string, params?: string | core.$ZodCheckEndsWithParams): this;
3013
- min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;
3014
- max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;
3015
- length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;
3016
- nonempty(params?: string | core.$ZodCheckMinLengthParams): this;
3017
- lowercase(params?: string | core.$ZodCheckLowerCaseParams): this;
3018
- uppercase(params?: string | core.$ZodCheckUpperCaseParams): this;
3019
- trim(): this;
3020
- normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
3021
- toLowerCase(): this;
3022
- toUpperCase(): this;
3023
- slugify(): this;
3024
- }
3025
- declare const _ZodString: core.$constructor<_ZodString>;
3026
- export interface ZodString extends _ZodString<core.$ZodStringInternals<string>> {
3027
- /** @deprecated Use `z.email()` instead. */
3028
- email(params?: string | core.$ZodCheckEmailParams): this;
3029
- /** @deprecated Use `z.url()` instead. */
3030
- url(params?: string | core.$ZodCheckURLParams): this;
3031
- /** @deprecated Use `z.jwt()` instead. */
3032
- jwt(params?: string | core.$ZodCheckJWTParams): this;
3033
- /** @deprecated Use `z.emoji()` instead. */
3034
- emoji(params?: string | core.$ZodCheckEmojiParams): this;
3035
- /** @deprecated Use `z.guid()` instead. */
3036
- guid(params?: string | core.$ZodCheckGUIDParams): this;
3037
- /** @deprecated Use `z.uuid()` instead. */
3038
- uuid(params?: string | core.$ZodCheckUUIDParams): this;
3039
- /** @deprecated Use `z.uuid()` instead. */
3040
- uuidv4(params?: string | core.$ZodCheckUUIDParams): this;
3041
- /** @deprecated Use `z.uuid()` instead. */
3042
- uuidv6(params?: string | core.$ZodCheckUUIDParams): this;
3043
- /** @deprecated Use `z.uuid()` instead. */
3044
- uuidv7(params?: string | core.$ZodCheckUUIDParams): this;
3045
- /** @deprecated Use `z.nanoid()` instead. */
3046
- nanoid(params?: string | core.$ZodCheckNanoIDParams): this;
3047
- /** @deprecated Use `z.guid()` instead. */
3048
- guid(params?: string | core.$ZodCheckGUIDParams): this;
3049
- /** @deprecated Use `z.cuid()` instead. */
3050
- cuid(params?: string | core.$ZodCheckCUIDParams): this;
3051
- /** @deprecated Use `z.cuid2()` instead. */
3052
- cuid2(params?: string | core.$ZodCheckCUID2Params): this;
3053
- /** @deprecated Use `z.ulid()` instead. */
3054
- ulid(params?: string | core.$ZodCheckULIDParams): this;
3055
- /** @deprecated Use `z.base64()` instead. */
3056
- base64(params?: string | core.$ZodCheckBase64Params): this;
3057
- /** @deprecated Use `z.base64url()` instead. */
3058
- base64url(params?: string | core.$ZodCheckBase64URLParams): this;
3059
- /** @deprecated Use `z.xid()` instead. */
3060
- xid(params?: string | core.$ZodCheckXIDParams): this;
3061
- /** @deprecated Use `z.ksuid()` instead. */
3062
- ksuid(params?: string | core.$ZodCheckKSUIDParams): this;
3063
- /** @deprecated Use `z.ipv4()` instead. */
3064
- ipv4(params?: string | core.$ZodCheckIPv4Params): this;
3065
- /** @deprecated Use `z.ipv6()` instead. */
3066
- ipv6(params?: string | core.$ZodCheckIPv6Params): this;
3067
- /** @deprecated Use `z.cidrv4()` instead. */
3068
- cidrv4(params?: string | core.$ZodCheckCIDRv4Params): this;
3069
- /** @deprecated Use `z.cidrv6()` instead. */
3070
- cidrv6(params?: string | core.$ZodCheckCIDRv6Params): this;
3071
- /** @deprecated Use `z.e164()` instead. */
3072
- e164(params?: string | core.$ZodCheckE164Params): this;
3073
- /** @deprecated Use `z.iso.datetime()` instead. */
3074
- datetime(params?: string | core.$ZodCheckISODateTimeParams): this;
3075
- /** @deprecated Use `z.iso.date()` instead. */
3076
- date(params?: string | core.$ZodCheckISODateParams): this;
3077
- /** @deprecated Use `z.iso.time()` instead. */
3078
- time(params?: string | core.$ZodCheckISOTimeParams): this;
3079
- /** @deprecated Use `z.iso.duration()` instead. */
3080
- duration(params?: string | core.$ZodCheckISODurationParams): this;
3081
- }
3082
- declare const ZodString: core.$constructor<ZodString>;
3083
- declare function string$1(params?: string | core.$ZodStringParams): ZodString;
3084
- declare function string$1<T extends string>(params?: string | core.$ZodStringParams): core.$ZodType<T, T>;
3085
- export interface ZodStringFormat<Format extends string = string> extends _ZodString<core.$ZodStringFormatInternals<Format>> {
3086
- }
3087
- declare const ZodStringFormat: core.$constructor<ZodStringFormat>;
3088
- export interface ZodEmail extends ZodStringFormat<"email"> {
3089
- _zod: core.$ZodEmailInternals;
3090
- }
3091
- declare const ZodEmail: core.$constructor<ZodEmail>;
3092
- declare function email$1(params?: string | core.$ZodEmailParams): ZodEmail;
3093
- export interface ZodGUID extends ZodStringFormat<"guid"> {
3094
- _zod: core.$ZodGUIDInternals;
3095
- }
3096
- declare const ZodGUID: core.$constructor<ZodGUID>;
3097
- declare function guid$1(params?: string | core.$ZodGUIDParams): ZodGUID;
3098
- export interface ZodUUID extends ZodStringFormat<"uuid"> {
3099
- _zod: core.$ZodUUIDInternals;
3100
- }
3101
- declare const ZodUUID: core.$constructor<ZodUUID>;
3102
- declare function uuid$1(params?: string | core.$ZodUUIDParams): ZodUUID;
3103
- declare function uuidv4(params?: string | core.$ZodUUIDv4Params): ZodUUID;
3104
- declare function uuidv6(params?: string | core.$ZodUUIDv6Params): ZodUUID;
3105
- declare function uuidv7(params?: string | core.$ZodUUIDv7Params): ZodUUID;
3106
- export interface ZodURL extends ZodStringFormat<"url"> {
3107
- _zod: core.$ZodURLInternals;
3108
- }
3109
- declare const ZodURL: core.$constructor<ZodURL>;
3110
- declare function url(params?: string | core.$ZodURLParams): ZodURL;
3111
- declare function httpUrl(params?: string | Omit<core.$ZodURLParams, "protocol" | "hostname">): ZodURL;
3112
- export interface ZodEmoji extends ZodStringFormat<"emoji"> {
3113
- _zod: core.$ZodEmojiInternals;
3114
- }
3115
- declare const ZodEmoji: core.$constructor<ZodEmoji>;
3116
- declare function emoji$1(params?: string | core.$ZodEmojiParams): ZodEmoji;
3117
- export interface ZodNanoID extends ZodStringFormat<"nanoid"> {
3118
- _zod: core.$ZodNanoIDInternals;
3119
- }
3120
- declare const ZodNanoID: core.$constructor<ZodNanoID>;
3121
- declare function nanoid$1(params?: string | core.$ZodNanoIDParams): ZodNanoID;
3122
- export interface ZodCUID extends ZodStringFormat<"cuid"> {
3123
- _zod: core.$ZodCUIDInternals;
3124
- }
3125
- declare const ZodCUID: core.$constructor<ZodCUID>;
3126
- declare function cuid$1(params?: string | core.$ZodCUIDParams): ZodCUID;
3127
- export interface ZodCUID2 extends ZodStringFormat<"cuid2"> {
3128
- _zod: core.$ZodCUID2Internals;
3129
- }
3130
- declare const ZodCUID2: core.$constructor<ZodCUID2>;
3131
- declare function cuid2$1(params?: string | core.$ZodCUID2Params): ZodCUID2;
3132
- export interface ZodULID extends ZodStringFormat<"ulid"> {
3133
- _zod: core.$ZodULIDInternals;
3134
- }
3135
- declare const ZodULID: core.$constructor<ZodULID>;
3136
- declare function ulid$1(params?: string | core.$ZodULIDParams): ZodULID;
3137
- export interface ZodXID extends ZodStringFormat<"xid"> {
3138
- _zod: core.$ZodXIDInternals;
3139
- }
3140
- declare const ZodXID: core.$constructor<ZodXID>;
3141
- declare function xid$1(params?: string | core.$ZodXIDParams): ZodXID;
3142
- export interface ZodKSUID extends ZodStringFormat<"ksuid"> {
3143
- _zod: core.$ZodKSUIDInternals;
3144
- }
3145
- declare const ZodKSUID: core.$constructor<ZodKSUID>;
3146
- declare function ksuid$1(params?: string | core.$ZodKSUIDParams): ZodKSUID;
3147
- export interface ZodIPv4 extends ZodStringFormat<"ipv4"> {
3148
- _zod: core.$ZodIPv4Internals;
3149
- }
3150
- declare const ZodIPv4: core.$constructor<ZodIPv4>;
3151
- declare function ipv4$1(params?: string | core.$ZodIPv4Params): ZodIPv4;
3152
- export interface ZodMAC extends ZodStringFormat<"mac"> {
3153
- _zod: core.$ZodMACInternals;
3154
- }
3155
- declare const ZodMAC: core.$constructor<ZodMAC>;
3156
- declare function mac$1(params?: string | core.$ZodMACParams): ZodMAC;
3157
- export interface ZodIPv6 extends ZodStringFormat<"ipv6"> {
3158
- _zod: core.$ZodIPv6Internals;
3159
- }
3160
- declare const ZodIPv6: core.$constructor<ZodIPv6>;
3161
- declare function ipv6$1(params?: string | core.$ZodIPv6Params): ZodIPv6;
3162
- export interface ZodCIDRv4 extends ZodStringFormat<"cidrv4"> {
3163
- _zod: core.$ZodCIDRv4Internals;
3164
- }
3165
- declare const ZodCIDRv4: core.$constructor<ZodCIDRv4>;
3166
- declare function cidrv4$1(params?: string | core.$ZodCIDRv4Params): ZodCIDRv4;
3167
- export interface ZodCIDRv6 extends ZodStringFormat<"cidrv6"> {
3168
- _zod: core.$ZodCIDRv6Internals;
3169
- }
3170
- declare const ZodCIDRv6: core.$constructor<ZodCIDRv6>;
3171
- declare function cidrv6$1(params?: string | core.$ZodCIDRv6Params): ZodCIDRv6;
3172
- export interface ZodBase64 extends ZodStringFormat<"base64"> {
3173
- _zod: core.$ZodBase64Internals;
3174
- }
3175
- declare const ZodBase64: core.$constructor<ZodBase64>;
3176
- declare function base64$1(params?: string | core.$ZodBase64Params): ZodBase64;
3177
- export interface ZodBase64URL extends ZodStringFormat<"base64url"> {
3178
- _zod: core.$ZodBase64URLInternals;
3179
- }
3180
- declare const ZodBase64URL: core.$constructor<ZodBase64URL>;
3181
- declare function base64url$1(params?: string | core.$ZodBase64URLParams): ZodBase64URL;
3182
- export interface ZodE164 extends ZodStringFormat<"e164"> {
3183
- _zod: core.$ZodE164Internals;
3184
- }
3185
- declare const ZodE164: core.$constructor<ZodE164>;
3186
- declare function e164$1(params?: string | core.$ZodE164Params): ZodE164;
3187
- export interface ZodJWT extends ZodStringFormat<"jwt"> {
3188
- _zod: core.$ZodJWTInternals;
3189
- }
3190
- declare const ZodJWT: core.$constructor<ZodJWT>;
3191
- declare function jwt(params?: string | core.$ZodJWTParams): ZodJWT;
3192
- export interface ZodCustomStringFormat<Format extends string = string> extends ZodStringFormat<Format>, core.$ZodCustomStringFormat<Format> {
3193
- _zod: core.$ZodCustomStringFormatInternals<Format>;
3194
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3195
- }
3196
- declare const ZodCustomStringFormat: core.$constructor<ZodCustomStringFormat>;
3197
- declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<Format>;
3198
- declare function hostname$1(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hostname">;
3199
- declare function hex$1(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hex">;
3200
- declare function hash<Alg extends util.HashAlgorithm, Enc extends util.HashEncoding = "hex">(alg: Alg, params?: {
3201
- enc?: Enc;
3202
- } & core.$ZodStringFormatParams): ZodCustomStringFormat<`${Alg}_${Enc}`>;
3203
- export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$ZodNumberInternals> extends _ZodType<Internals> {
3204
- gt(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
3205
- /** Identical to .min() */
3206
- gte(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
3207
- min(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
3208
- lt(value: number, params?: string | core.$ZodCheckLessThanParams): this;
3209
- /** Identical to .max() */
3210
- lte(value: number, params?: string | core.$ZodCheckLessThanParams): this;
3211
- max(value: number, params?: string | core.$ZodCheckLessThanParams): this;
3212
- /** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
3213
- int(params?: string | core.$ZodCheckNumberFormatParams): this;
3214
- /** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
3215
- safe(params?: string | core.$ZodCheckNumberFormatParams): this;
3216
- positive(params?: string | core.$ZodCheckGreaterThanParams): this;
3217
- nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;
3218
- negative(params?: string | core.$ZodCheckLessThanParams): this;
3219
- nonpositive(params?: string | core.$ZodCheckLessThanParams): this;
3220
- multipleOf(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;
3221
- /** @deprecated Use `.multipleOf()` instead. */
3222
- step(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;
3223
- /** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
3224
- finite(params?: unknown): this;
3225
- minValue: number | null;
3226
- maxValue: number | null;
3227
- /** @deprecated Check the `format` property instead. */
3228
- isInt: boolean;
3229
- /** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
3230
- isFinite: boolean;
3231
- format: string | null;
3232
- }
3233
- export interface ZodNumber extends _ZodNumber<core.$ZodNumberInternals<number>> {
3234
- }
3235
- declare const ZodNumber: core.$constructor<ZodNumber>;
3236
- declare function number$1(params?: string | core.$ZodNumberParams): ZodNumber;
3237
- export interface ZodNumberFormat extends ZodNumber {
3238
- _zod: core.$ZodNumberFormatInternals;
3239
- }
3240
- declare const ZodNumberFormat: core.$constructor<ZodNumberFormat>;
3241
- export interface ZodInt extends ZodNumberFormat {
3242
- }
3243
- declare function int(params?: string | core.$ZodCheckNumberFormatParams): ZodInt;
3244
- export interface ZodFloat32 extends ZodNumberFormat {
3245
- }
3246
- declare function float32(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat32;
3247
- export interface ZodFloat64 extends ZodNumberFormat {
3248
- }
3249
- declare function float64(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat64;
3250
- export interface ZodInt32 extends ZodNumberFormat {
3251
- }
3252
- declare function int32(params?: string | core.$ZodCheckNumberFormatParams): ZodInt32;
3253
- export interface ZodUInt32 extends ZodNumberFormat {
3254
- }
3255
- declare function uint32(params?: string | core.$ZodCheckNumberFormatParams): ZodUInt32;
3256
- export interface _ZodBoolean<T extends core.$ZodBooleanInternals = core.$ZodBooleanInternals> extends _ZodType<T> {
3257
- }
3258
- export interface ZodBoolean extends _ZodBoolean<core.$ZodBooleanInternals<boolean>> {
3259
- }
3260
- declare const ZodBoolean: core.$constructor<ZodBoolean>;
3261
- declare function boolean$1(params?: string | core.$ZodBooleanParams): ZodBoolean;
3262
- export interface _ZodBigInt<T extends core.$ZodBigIntInternals = core.$ZodBigIntInternals> extends _ZodType<T> {
3263
- gte(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
3264
- /** Alias of `.gte()` */
3265
- min(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
3266
- gt(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
3267
- /** Alias of `.lte()` */
3268
- lte(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
3269
- max(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
3270
- lt(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
3271
- positive(params?: string | core.$ZodCheckGreaterThanParams): this;
3272
- negative(params?: string | core.$ZodCheckLessThanParams): this;
3273
- nonpositive(params?: string | core.$ZodCheckLessThanParams): this;
3274
- nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;
3275
- multipleOf(value: bigint, params?: string | core.$ZodCheckMultipleOfParams): this;
3276
- minValue: bigint | null;
3277
- maxValue: bigint | null;
3278
- format: string | null;
3279
- }
3280
- export interface ZodBigInt extends _ZodBigInt<core.$ZodBigIntInternals<bigint>> {
3281
- }
3282
- declare const ZodBigInt: core.$constructor<ZodBigInt>;
3283
- declare function bigint$1(params?: string | core.$ZodBigIntParams): ZodBigInt;
3284
- export interface ZodBigIntFormat extends ZodBigInt {
3285
- _zod: core.$ZodBigIntFormatInternals;
3286
- }
3287
- declare const ZodBigIntFormat: core.$constructor<ZodBigIntFormat>;
3288
- declare function int64(params?: string | core.$ZodBigIntFormatParams): ZodBigIntFormat;
3289
- declare function uint64(params?: string | core.$ZodBigIntFormatParams): ZodBigIntFormat;
3290
- export interface ZodSymbol extends _ZodType<core.$ZodSymbolInternals> {
3291
- }
3292
- declare const ZodSymbol: core.$constructor<ZodSymbol>;
3293
- declare function symbol(params?: string | core.$ZodSymbolParams): ZodSymbol;
3294
- export interface ZodUndefined extends _ZodType<core.$ZodUndefinedInternals> {
3295
- }
3296
- declare const ZodUndefined: core.$constructor<ZodUndefined>;
3297
- declare function _undefined$2(params?: string | core.$ZodUndefinedParams): ZodUndefined;
3298
- export interface ZodNull extends _ZodType<core.$ZodNullInternals> {
3299
- }
3300
- declare const ZodNull: core.$constructor<ZodNull>;
3301
- declare function _null$2(params?: string | core.$ZodNullParams): ZodNull;
3302
- export interface ZodAny extends _ZodType<core.$ZodAnyInternals> {
3303
- }
3304
- declare const ZodAny: core.$constructor<ZodAny>;
3305
- declare function any(): ZodAny;
3306
- export interface ZodUnknown extends _ZodType<core.$ZodUnknownInternals> {
3307
- }
3308
- declare const ZodUnknown: core.$constructor<ZodUnknown>;
3309
- declare function unknown(): ZodUnknown;
3310
- export interface ZodNever extends _ZodType<core.$ZodNeverInternals> {
3311
- }
3312
- declare const ZodNever: core.$constructor<ZodNever>;
3313
- declare function never(params?: string | core.$ZodNeverParams): ZodNever;
3314
- export interface ZodVoid extends _ZodType<core.$ZodVoidInternals> {
3315
- }
3316
- declare const ZodVoid: core.$constructor<ZodVoid>;
3317
- declare function _void$1(params?: string | core.$ZodVoidParams): ZodVoid;
3318
- export interface _ZodDate<T extends core.$ZodDateInternals = core.$ZodDateInternals> extends _ZodType<T> {
3319
- min(value: number | Date, params?: string | core.$ZodCheckGreaterThanParams): this;
3320
- max(value: number | Date, params?: string | core.$ZodCheckLessThanParams): this;
3321
- /** @deprecated Not recommended. */
3322
- minDate: Date | null;
3323
- /** @deprecated Not recommended. */
3324
- maxDate: Date | null;
3325
- }
3326
- export interface ZodDate extends _ZodDate<core.$ZodDateInternals<Date>> {
3327
- }
3328
- declare const ZodDate: core.$constructor<ZodDate>;
3329
- declare function date$1(params?: string | core.$ZodDateParams): ZodDate;
3330
- export interface ZodArray<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodArrayInternals<T>>, core.$ZodArray<T> {
3331
- element: T;
3332
- min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;
3333
- nonempty(params?: string | core.$ZodCheckMinLengthParams): this;
3334
- max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;
3335
- length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;
3336
- unwrap(): T;
3337
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3338
- }
3339
- declare const ZodArray: core.$constructor<ZodArray>;
3340
- declare function array<T extends core.SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodArray<T>;
3341
- declare function keyof<T extends ZodObject>(schema: T): ZodEnum<util.KeysEnum<T["_zod"]["output"]>>;
3342
- export type SafeExtendShape<Base extends core.$ZodShape, Ext extends core.$ZodLooseShape> = {
3343
- [K in keyof Ext]: K extends keyof Base ? core.output<Ext[K]> extends core.output<Base[K]> ? core.input<Ext[K]> extends core.input<Base[K]> ? Ext[K] : never : never : Ext[K];
3344
- };
3345
- export interface ZodObject<
3346
- /** @ts-ignore Cast variance */
3347
- out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.$ZodObjectConfig = core.$strip> extends _ZodType<core.$ZodObjectInternals<Shape, Config>>, core.$ZodObject<Shape, Config> {
3348
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3349
- shape: Shape;
3350
- keyof(): ZodEnum<util.ToEnum<keyof Shape & string>>;
3351
- /** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
3352
- catchall<T extends core.SomeType>(schema: T): ZodObject<Shape, core.$catchall<T>>;
3353
- /** @deprecated Use `z.looseObject()` or `.loose()` instead. */
3354
- passthrough(): ZodObject<Shape, core.$loose>;
3355
- /** Consider `z.looseObject(A.shape)` instead */
3356
- loose(): ZodObject<Shape, core.$loose>;
3357
- /** Consider `z.strictObject(A.shape)` instead */
3358
- strict(): ZodObject<Shape, core.$strict>;
3359
- /** This is the default behavior. This method call is likely unnecessary. */
3360
- strip(): ZodObject<Shape, core.$strip>;
3361
- extend<U extends core.$ZodLooseShape>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
3362
- safeExtend<U extends core.$ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, core.SomeType>>): ZodObject<util.Extend<Shape, U>, Config>;
3363
- /**
3364
- * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
3365
- */
3366
- merge<U extends ZodObject>(other: U): ZodObject<util.Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
3367
- pick<M extends util.Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<util.Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
3368
- omit<M extends util.Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<util.Flatten<Omit<Shape, Extract<keyof Shape, keyof M>>>, Config>;
3369
- partial(): ZodObject<{
3370
- [k in keyof Shape]: ZodOptional<Shape[k]>;
3371
- }, Config>;
3372
- partial<M extends util.Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{
3373
- [k in keyof Shape]: k extends keyof M ? ZodOptional<Shape[k]> : Shape[k];
3374
- }, Config>;
3375
- required(): ZodObject<{
3376
- [k in keyof Shape]: ZodNonOptional<Shape[k]>;
3377
- }, Config>;
3378
- required<M extends util.Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{
3379
- [k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k];
3380
- }, Config>;
3381
- }
3382
- declare const ZodObject: core.$constructor<ZodObject>;
3383
- declare function object<T extends core.$ZodLooseShape = Partial<Record<never, core.SomeType>>>(shape?: T, params?: string | core.$ZodObjectParams): ZodObject<util.Writeable<T>, core.$strip>;
3384
- declare function strictObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodObject<T, core.$strict>;
3385
- declare function looseObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodObject<T, core.$loose>;
3386
- export interface ZodUnion<T extends readonly core.SomeType[] = readonly core.$ZodType[]> extends _ZodType<core.$ZodUnionInternals<T>>, core.$ZodUnion<T> {
3387
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3388
- options: T;
3389
- }
3390
- declare const ZodUnion: core.$constructor<ZodUnion>;
3391
- declare function union<const T extends readonly core.SomeType[]>(options: T, params?: string | core.$ZodUnionParams): ZodUnion<T>;
3392
- export interface ZodXor<T extends readonly core.SomeType[] = readonly core.$ZodType[]> extends _ZodType<core.$ZodXorInternals<T>>, core.$ZodXor<T> {
3393
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3394
- options: T;
3395
- }
3396
- declare const ZodXor: core.$constructor<ZodXor>;
3397
- declare function xor<const T extends readonly core.SomeType[]>(options: T, params?: string | core.$ZodXorParams): ZodXor<T>;
3398
- export interface ZodDiscriminatedUnion<Options extends readonly core.SomeType[] = readonly core.$ZodType[], Disc extends string = string> extends ZodUnion<Options>, core.$ZodDiscriminatedUnion<Options, Disc> {
3399
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3400
- _zod: core.$ZodDiscriminatedUnionInternals<Options, Disc>;
3401
- def: core.$ZodDiscriminatedUnionDef<Options, Disc>;
3402
- }
3403
- declare const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion>;
3404
- declare function discriminatedUnion<Types extends readonly [
3405
- core.$ZodTypeDiscriminable,
3406
- ...core.$ZodTypeDiscriminable[]
3407
- ], Disc extends string>(discriminator: Disc, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodDiscriminatedUnion<Types, Disc>;
3408
- export interface ZodIntersection<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodIntersectionInternals<A, B>>, core.$ZodIntersection<A, B> {
3409
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3410
- }
3411
- declare const ZodIntersection: core.$constructor<ZodIntersection>;
3412
- declare function intersection<T extends core.SomeType, U extends core.SomeType>(left: T, right: U): ZodIntersection<T, U>;
3413
- export interface ZodTuple<T extends util.TupleItems = readonly core.$ZodType[], Rest extends core.SomeType | null = core.$ZodType | null> extends _ZodType<core.$ZodTupleInternals<T, Rest>>, core.$ZodTuple<T, Rest> {
3414
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3415
- rest<Rest extends core.SomeType = core.$ZodType>(rest: Rest): ZodTuple<T, Rest>;
3416
- }
3417
- declare const ZodTuple: core.$constructor<ZodTuple>;
3418
- declare function tuple<T extends readonly [
3419
- core.SomeType,
3420
- ...core.SomeType[]
3421
- ]>(items: T, params?: string | core.$ZodTupleParams): ZodTuple<T, null>;
3422
- declare function tuple<T extends readonly [
3423
- core.SomeType,
3424
- ...core.SomeType[]
3425
- ], Rest extends core.SomeType>(items: T, rest: Rest, params?: string | core.$ZodTupleParams): ZodTuple<T, Rest>;
3426
- declare function tuple(items: [
3427
- ], params?: string | core.$ZodTupleParams): ZodTuple<[
3428
- ], null>;
3429
- export interface ZodRecord<Key extends core.$ZodRecordKey = core.$ZodRecordKey, Value extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodRecordInternals<Key, Value>>, core.$ZodRecord<Key, Value> {
3430
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3431
- keyType: Key;
3432
- valueType: Value;
3433
- }
3434
- declare const ZodRecord: core.$constructor<ZodRecord>;
3435
- declare function record<Key extends core.$ZodRecordKey, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodRecord<Key, Value>;
3436
- declare function partialRecord<Key extends core.$ZodRecordKey, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodRecord<Key & core.$partial, Value>;
3437
- declare function looseRecord<Key extends core.$ZodRecordKey, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodRecord<Key, Value>;
3438
- export interface ZodMap<Key extends core.SomeType = core.$ZodType, Value extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodMapInternals<Key, Value>>, core.$ZodMap<Key, Value> {
3439
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3440
- keyType: Key;
3441
- valueType: Value;
3442
- min(minSize: number, params?: string | core.$ZodCheckMinSizeParams): this;
3443
- nonempty(params?: string | core.$ZodCheckMinSizeParams): this;
3444
- max(maxSize: number, params?: string | core.$ZodCheckMaxSizeParams): this;
3445
- size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;
3446
- }
3447
- declare const ZodMap: core.$constructor<ZodMap>;
3448
- declare function map<Key extends core.SomeType, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodMapParams): ZodMap<Key, Value>;
3449
- export interface ZodSet<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodSetInternals<T>>, core.$ZodSet<T> {
3450
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3451
- min(minSize: number, params?: string | core.$ZodCheckMinSizeParams): this;
3452
- nonempty(params?: string | core.$ZodCheckMinSizeParams): this;
3453
- max(maxSize: number, params?: string | core.$ZodCheckMaxSizeParams): this;
3454
- size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;
3455
- }
3456
- declare const ZodSet: core.$constructor<ZodSet>;
3457
- declare function set<Value extends core.SomeType>(valueType: Value, params?: string | core.$ZodSetParams): ZodSet<Value>;
3458
- export interface ZodEnum<
3459
- /** @ts-ignore Cast variance */
3460
- out T extends util.EnumLike = util.EnumLike> extends _ZodType<core.$ZodEnumInternals<T>>, core.$ZodEnum<T> {
3461
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3462
- enum: T;
3463
- options: Array<T[keyof T]>;
3464
- extract<const U extends readonly (keyof T)[]>(values: U, params?: string | core.$ZodEnumParams): ZodEnum<util.Flatten<Pick<T, U[number]>>>;
3465
- exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | core.$ZodEnumParams): ZodEnum<util.Flatten<Omit<T, U[number]>>>;
3466
- }
3467
- declare const ZodEnum: core.$constructor<ZodEnum>;
3468
- declare function _enum$1<const T extends readonly string[]>(values: T, params?: string | core.$ZodEnumParams): ZodEnum<util.ToEnum<T[number]>>;
3469
- declare function _enum$1<const T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodEnum<T>;
3470
- declare function nativeEnum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodEnum<T>;
3471
- export interface ZodLiteral<T extends util.Literal = util.Literal> extends _ZodType<core.$ZodLiteralInternals<T>>, core.$ZodLiteral<T> {
3472
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3473
- values: Set<T>;
3474
- /** @legacy Use `.values` instead. Accessing this property will throw an error if the literal accepts multiple values. */
3475
- value: T;
3476
- }
3477
- declare const ZodLiteral: core.$constructor<ZodLiteral>;
3478
- declare function literal<const T extends ReadonlyArray<util.Literal>>(value: T, params?: string | core.$ZodLiteralParams): ZodLiteral<T[number]>;
3479
- declare function literal<const T extends util.Literal>(value: T, params?: string | core.$ZodLiteralParams): ZodLiteral<T>;
3480
- export interface ZodFile extends _ZodType<core.$ZodFileInternals>, core.$ZodFile {
3481
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3482
- min(size: number, params?: string | core.$ZodCheckMinSizeParams): this;
3483
- max(size: number, params?: string | core.$ZodCheckMaxSizeParams): this;
3484
- mime(types: util.MimeTypes | Array<util.MimeTypes>, params?: string | core.$ZodCheckMimeTypeParams): this;
3485
- }
3486
- declare const ZodFile: core.$constructor<ZodFile>;
3487
- declare function file(params?: string | core.$ZodFileParams): ZodFile;
3488
- export interface ZodTransform<O = unknown, I = unknown> extends _ZodType<core.$ZodTransformInternals<O, I>>, core.$ZodTransform<O, I> {
3489
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3490
- }
3491
- declare const ZodTransform: core.$constructor<ZodTransform>;
3492
- declare function transform<I = unknown, O = I>(fn: (input: I, ctx: core.ParsePayload) => O): ZodTransform<Awaited<O>, I>;
3493
- export interface ZodOptional<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodOptionalInternals<T>>, core.$ZodOptional<T> {
3494
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3495
- unwrap(): T;
3496
- }
3497
- declare const ZodOptional: core.$constructor<ZodOptional>;
3498
- declare function optional<T extends core.SomeType>(innerType: T): ZodOptional<T>;
3499
- export interface ZodExactOptional<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodExactOptionalInternals<T>>, core.$ZodExactOptional<T> {
3500
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3501
- unwrap(): T;
3502
- }
3503
- declare const ZodExactOptional: core.$constructor<ZodExactOptional>;
3504
- declare function exactOptional<T extends core.SomeType>(innerType: T): ZodExactOptional<T>;
3505
- export interface ZodNullable<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodNullableInternals<T>>, core.$ZodNullable<T> {
3506
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3507
- unwrap(): T;
3508
- }
3509
- declare const ZodNullable: core.$constructor<ZodNullable>;
3510
- declare function nullable<T extends core.SomeType>(innerType: T): ZodNullable<T>;
3511
- declare function nullish$1<T extends core.SomeType>(innerType: T): ZodOptional<ZodNullable<T>>;
3512
- export interface ZodDefault<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodDefaultInternals<T>>, core.$ZodDefault<T> {
3513
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3514
- unwrap(): T;
3515
- /** @deprecated Use `.unwrap()` instead. */
3516
- removeDefault(): T;
3517
- }
3518
- declare const ZodDefault: core.$constructor<ZodDefault>;
3519
- declare function _default$50<T extends core.SomeType>(innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): ZodDefault<T>;
3520
- export interface ZodPrefault<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodPrefaultInternals<T>>, core.$ZodPrefault<T> {
3521
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3522
- unwrap(): T;
3523
- }
3524
- declare const ZodPrefault: core.$constructor<ZodPrefault>;
3525
- declare function prefault<T extends core.SomeType>(innerType: T, defaultValue: core.input<T> | (() => core.input<T>)): ZodPrefault<T>;
3526
- export interface ZodNonOptional<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodNonOptionalInternals<T>>, core.$ZodNonOptional<T> {
3527
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3528
- unwrap(): T;
3529
- }
3530
- declare const ZodNonOptional: core.$constructor<ZodNonOptional>;
3531
- declare function nonoptional<T extends core.SomeType>(innerType: T, params?: string | core.$ZodNonOptionalParams): ZodNonOptional<T>;
3532
- export interface ZodSuccess<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodSuccessInternals<T>>, core.$ZodSuccess<T> {
3533
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3534
- unwrap(): T;
3535
- }
3536
- declare const ZodSuccess: core.$constructor<ZodSuccess>;
3537
- declare function success<T extends core.SomeType>(innerType: T): ZodSuccess<T>;
3538
- export interface ZodCatch<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodCatchInternals<T>>, core.$ZodCatch<T> {
3539
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3540
- unwrap(): T;
3541
- /** @deprecated Use `.unwrap()` instead. */
3542
- removeCatch(): T;
3543
- }
3544
- declare const ZodCatch: core.$constructor<ZodCatch>;
3545
- declare function _catch$1<T extends core.SomeType>(innerType: T, catchValue: core.output<T> | ((ctx: core.$ZodCatchCtx) => core.output<T>)): ZodCatch<T>;
3546
- export interface ZodNaN extends _ZodType<core.$ZodNaNInternals>, core.$ZodNaN {
3547
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3548
- }
3549
- declare const ZodNaN: core.$constructor<ZodNaN>;
3550
- declare function nan(params?: string | core.$ZodNaNParams): ZodNaN;
3551
- export interface ZodPipe<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodPipeInternals<A, B>>, core.$ZodPipe<A, B> {
3552
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3553
- in: A;
3554
- out: B;
3555
- }
3556
- declare const ZodPipe: core.$constructor<ZodPipe>;
3557
- declare function pipe<const A extends core.SomeType, B extends core.$ZodType<unknown, core.output<A>> = core.$ZodType<unknown, core.output<A>>>(in_: A, out: B | core.$ZodType<unknown, core.output<A>>): ZodPipe<A, B>;
3558
- export interface ZodCodec<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType> extends ZodPipe<A, B>, core.$ZodCodec<A, B> {
3559
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3560
- _zod: core.$ZodCodecInternals<A, B>;
3561
- def: core.$ZodCodecDef<A, B>;
3562
- }
3563
- declare const ZodCodec: core.$constructor<ZodCodec>;
3564
- declare function codec<const A extends core.SomeType, B extends core.SomeType = core.$ZodType>(in_: A, out: B, params: {
3565
- decode: (value: core.output<A>, payload: core.ParsePayload<core.output<A>>) => core.util.MaybeAsync<core.input<B>>;
3566
- encode: (value: core.input<B>, payload: core.ParsePayload<core.input<B>>) => core.util.MaybeAsync<core.output<A>>;
3567
- }): ZodCodec<A, B>;
3568
- export interface ZodReadonly<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodReadonlyInternals<T>>, core.$ZodReadonly<T> {
3569
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3570
- unwrap(): T;
3571
- }
3572
- declare const ZodReadonly: core.$constructor<ZodReadonly>;
3573
- declare function readonly<T extends core.SomeType>(innerType: T): ZodReadonly<T>;
3574
- export interface ZodTemplateLiteral<Template extends string = string> extends _ZodType<core.$ZodTemplateLiteralInternals<Template>>, core.$ZodTemplateLiteral<Template> {
3575
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3576
- }
3577
- declare const ZodTemplateLiteral: core.$constructor<ZodTemplateLiteral>;
3578
- declare function templateLiteral<const Parts extends core.$ZodTemplateLiteralPart[]>(parts: Parts, params?: string | core.$ZodTemplateLiteralParams): ZodTemplateLiteral<core.$PartsToTemplateLiteral<Parts>>;
3579
- export interface ZodLazy<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodLazyInternals<T>>, core.$ZodLazy<T> {
3580
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3581
- unwrap(): T;
3582
- }
3583
- declare const ZodLazy: core.$constructor<ZodLazy>;
3584
- declare function lazy<T extends core.SomeType>(getter: () => T): ZodLazy<T>;
3585
- export interface ZodPromise<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodPromiseInternals<T>>, core.$ZodPromise<T> {
3586
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3587
- unwrap(): T;
3588
- }
3589
- declare const ZodPromise: core.$constructor<ZodPromise>;
3590
- declare function promise<T extends core.SomeType>(innerType: T): ZodPromise<T>;
3591
- export interface ZodFunction<Args extends core.$ZodFunctionIn = core.$ZodFunctionIn, Returns extends core.$ZodFunctionOut = core.$ZodFunctionOut> extends _ZodType<core.$ZodFunctionInternals<Args, Returns>>, core.$ZodFunction<Args, Returns> {
3592
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3593
- _def: core.$ZodFunctionDef<Args, Returns>;
3594
- _input: core.$InferInnerFunctionType<Args, Returns>;
3595
- _output: core.$InferOuterFunctionType<Args, Returns>;
3596
- input<const Items extends util.TupleItems, const Rest extends core.$ZodFunctionOut = core.$ZodFunctionOut>(args: Items, rest?: Rest): ZodFunction<core.$ZodTuple<Items, Rest>, Returns>;
3597
- input<NewArgs extends core.$ZodFunctionIn>(args: NewArgs): ZodFunction<NewArgs, Returns>;
3598
- input(...args: any[]): ZodFunction<any, Returns>;
3599
- output<NewReturns extends core.$ZodType>(output: NewReturns): ZodFunction<Args, NewReturns>;
3600
- }
3601
- declare const ZodFunction: core.$constructor<ZodFunction>;
3602
- declare function _function(): ZodFunction;
3603
- declare function _function<const In extends ReadonlyArray<core.$ZodType>>(params: {
3604
- input: In;
3605
- }): ZodFunction<ZodTuple<In, null>, core.$ZodFunctionOut>;
3606
- declare function _function<const In extends ReadonlyArray<core.$ZodType>, const Out extends core.$ZodFunctionOut = core.$ZodFunctionOut>(params: {
3607
- input: In;
3608
- output: Out;
3609
- }): ZodFunction<ZodTuple<In, null>, Out>;
3610
- declare function _function<const In extends core.$ZodFunctionIn = core.$ZodFunctionIn>(params: {
3611
- input: In;
3612
- }): ZodFunction<In, core.$ZodFunctionOut>;
3613
- declare function _function<const Out extends core.$ZodFunctionOut = core.$ZodFunctionOut>(params: {
3614
- output: Out;
3615
- }): ZodFunction<core.$ZodFunctionIn, Out>;
3616
- declare function _function<In extends core.$ZodFunctionIn = core.$ZodFunctionIn, Out extends core.$ZodType = core.$ZodType>(params?: {
3617
- input: In;
3618
- output: Out;
3619
- }): ZodFunction<In, Out>;
3620
- export interface ZodCustom<O = unknown, I = unknown> extends _ZodType<core.$ZodCustomInternals<O, I>>, core.$ZodCustom<O, I> {
3621
- "~standard": ZodStandardSchemaWithJSON$1<this>;
3622
- }
3623
- declare const ZodCustom: core.$constructor<ZodCustom>;
3624
- declare function check<O = unknown>(fn: core.CheckFn<O>): core.$ZodCheck<O>;
3625
- declare function custom<O>(fn?: (data: unknown) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodCustom<O, O>;
3626
- declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
3627
- declare function superRefine<T>(fn: (arg: T, payload: core.$RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T>;
3628
- declare const describe$1: typeof core.describe;
3629
- declare const meta$1: typeof core.meta;
3630
- export type ZodInstanceOfParams = core.Params<ZodCustom, core.$ZodIssueCustom, "type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path">;
3631
- declare function _instanceof<T extends typeof util.Class>(cls: T, params?: ZodInstanceOfParams): ZodCustom<InstanceType<T>, InstanceType<T>>;
3632
- declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodCodec<ZodString, ZodBoolean>;
3633
- export type _ZodJSONSchema = ZodUnion<[
3634
- ZodString,
3635
- ZodNumber,
3636
- ZodBoolean,
3637
- ZodNull,
3638
- ZodArray<ZodJSONSchema>,
3639
- ZodRecord<ZodString, ZodJSONSchema>
3640
- ]>;
3641
- export type _ZodJSONSchemaInternals = _ZodJSONSchema["_zod"];
3642
- export interface ZodJSONSchemaInternals extends _ZodJSONSchemaInternals {
3643
- output: util.JSONType;
3644
- input: util.JSONType;
3645
- }
3646
- export interface ZodJSONSchema extends _ZodJSONSchema {
3647
- _zod: ZodJSONSchemaInternals;
3648
- }
3649
- declare function json(params?: string | core.$ZodCustomParams): ZodJSONSchema;
3650
- declare function preprocess<A, U extends core.SomeType, B = unknown>(fn: (arg: B, ctx: core.$RefinementCtx) => A, schema: U): ZodPipe<ZodTransform<A, B>, U>;
3651
- declare const ZodIssueCode: {
3652
- readonly invalid_type: "invalid_type";
3653
- readonly too_big: "too_big";
3654
- readonly too_small: "too_small";
3655
- readonly invalid_format: "invalid_format";
3656
- readonly not_multiple_of: "not_multiple_of";
3657
- readonly unrecognized_keys: "unrecognized_keys";
3658
- readonly invalid_union: "invalid_union";
3659
- readonly invalid_key: "invalid_key";
3660
- readonly invalid_element: "invalid_element";
3661
- readonly invalid_value: "invalid_value";
3662
- readonly custom: "custom";
3663
- };
3664
- /** @deprecated Use `z.$ZodFlattenedError` */
3665
- export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
3666
- /** @deprecated Use `z.$ZodFormattedError` */
3667
- export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
3668
- /** Use `z.$brand` instead */
3669
- export type BRAND<T extends string | number | symbol = string | number | symbol> = {
3670
- [core.$brand]: {
3671
- [k in T]: true;
3672
- };
3673
- };
3674
- declare function setErrorMap(map: core.$ZodErrorMap): void;
3675
- declare function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined;
3676
- /** Included for Zod 3 compatibility */
3677
- export type ZodRawShape = core.$ZodShape;
3678
- declare enum ZodFirstPartyTypeKind {
3679
- }
3680
- export type JSONSchemaVersion = "draft-2020-12" | "draft-7" | "draft-4" | "openapi-3.0";
3681
- export interface FromJSONSchemaParams {
3682
- defaultTarget?: JSONSchemaVersion;
3683
- registry?: $ZodRegistry<any>;
3684
- }
3685
- declare function fromJSONSchema(schema: JSONSchema$1.JSONSchema | boolean, params?: FromJSONSchemaParams): ZodType;
3686
- export interface ZodISODateTime extends schemas$1.ZodStringFormat {
3687
- _zod: core.$ZodISODateTimeInternals;
3688
- }
3689
- declare const ZodISODateTime: core.$constructor<ZodISODateTime>;
3690
- declare function datetime$1(params?: string | core.$ZodISODateTimeParams): ZodISODateTime;
3691
- export interface ZodISODate extends schemas$1.ZodStringFormat {
3692
- _zod: core.$ZodISODateInternals;
3693
- }
3694
- declare const ZodISODate: core.$constructor<ZodISODate>;
3695
- declare function date$2(params?: string | core.$ZodISODateParams): ZodISODate;
3696
- export interface ZodISOTime extends schemas$1.ZodStringFormat {
3697
- _zod: core.$ZodISOTimeInternals;
3698
- }
3699
- declare const ZodISOTime: core.$constructor<ZodISOTime>;
3700
- declare function time$1(params?: string | core.$ZodISOTimeParams): ZodISOTime;
3701
- export interface ZodISODuration extends schemas$1.ZodStringFormat {
3702
- _zod: core.$ZodISODurationInternals;
3703
- }
3704
- declare const ZodISODuration: core.$constructor<ZodISODuration>;
3705
- declare function duration$1(params?: string | core.$ZodISODurationParams): ZodISODuration;
3706
- export interface ZodCoercedString<T = unknown> extends schemas$1._ZodString<core.$ZodStringInternals<T>> {
3707
- }
3708
- declare function string$2<T = unknown>(params?: string | core.$ZodStringParams): ZodCoercedString<T>;
3709
- export interface ZodCoercedNumber<T = unknown> extends schemas$1._ZodNumber<core.$ZodNumberInternals<T>> {
3710
- }
3711
- declare function number$2<T = unknown>(params?: string | core.$ZodNumberParams): ZodCoercedNumber<T>;
3712
- export interface ZodCoercedBoolean<T = unknown> extends schemas$1._ZodBoolean<core.$ZodBooleanInternals<T>> {
3713
- }
3714
- declare function boolean$2<T = unknown>(params?: string | core.$ZodBooleanParams): ZodCoercedBoolean<T>;
3715
- export interface ZodCoercedBigInt<T = unknown> extends schemas$1._ZodBigInt<core.$ZodBigIntInternals<T>> {
3716
- }
3717
- declare function bigint$2<T = unknown>(params?: string | core.$ZodBigIntParams): ZodCoercedBigInt<T>;
3718
- export interface ZodCoercedDate<T = unknown> extends schemas$1._ZodDate<core.$ZodDateInternals<T>> {
3719
- }
3720
- declare function date$3<T = unknown>(params?: string | core.$ZodDateParams): ZodCoercedDate<T>;
3
+ import { z } from 'zod';
4
+
3721
5
  declare const routeSchema: z.ZodDiscriminatedUnion<[
3722
6
  z.ZodObject<{
3723
7
  name: z.ZodLiteral<"start-page">;
@@ -5659,7 +1943,12 @@ export interface SvelteHTMLElements {
5659
1943
  };
5660
1944
  }
5661
1945
  export type ClassValue = string | import("clsx").ClassArray | import("clsx").ClassDictionary;
5662
- type Primitive$1 = null | undefined | string | number | boolean | symbol | bigint;
1946
+ /**
1947
+ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
1948
+
1949
+ @category Type
1950
+ */
1951
+ export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
5663
1952
  /**
5664
1953
  Extract all optional keys from the given type.
5665
1954
 
@@ -5791,7 +2080,35 @@ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
5791
2080
  */
5792
2081
  export type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (IsNever<T> extends true ? TypeIfNever : TypeIfNotNever);
5793
2082
  type NoInfer$1<T> = T extends infer U ? U : never;
5794
- type IsAny$1<T> = 0 extends 1 & NoInfer$1<T> ? true : false;
2083
+ /**
2084
+ Returns a boolean for whether the given type is `any`.
2085
+
2086
+ @link https://stackoverflow.com/a/49928360/1490091
2087
+
2088
+ Useful in type utilities, such as disallowing `any`s to be passed to a function.
2089
+
2090
+ @example
2091
+ ```
2092
+ import type {IsAny} from 'type-fest';
2093
+
2094
+ const typedObject = {a: 1, b: 2} as const;
2095
+ const anyObject: any = {a: 1, b: 2};
2096
+
2097
+ function get<O extends (IsAny<O> extends true ? {} : Record<string, number>), K extends keyof O = keyof O>(obj: O, key: K) {
2098
+ return obj[key];
2099
+ }
2100
+
2101
+ const typedA = get(typedObject, 'a');
2102
+ //=> 1
2103
+
2104
+ const anyA = get(anyObject, 'a');
2105
+ //=> any
2106
+ ```
2107
+
2108
+ @category Type Guard
2109
+ @category Utilities
2110
+ */
2111
+ export type IsAny<T> = 0 extends 1 & NoInfer$1<T> ? true : false;
5795
2112
  /**
5796
2113
  Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
5797
2114
 
@@ -5852,7 +2169,97 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
5852
2169
  export type Simplify<T> = {
5853
2170
  [KeyType in keyof T]: T[KeyType];
5854
2171
  } & {};
5855
- type OmitIndexSignature$1<ObjectType> = {
2172
+ /**
2173
+ Omit any index signatures from the given object type, leaving only explicitly defined properties.
2174
+
2175
+ This is the counterpart of `PickIndexSignature`.
2176
+
2177
+ Use-cases:
2178
+ - Remove overly permissive signatures from third-party types.
2179
+
2180
+ This type was taken from this [StackOverflow answer](https://stackoverflow.com/a/68261113/420747).
2181
+
2182
+ It relies on the fact that an empty object (`{}`) is assignable to an object with just an index signature, like `Record<string, unknown>`, but not to an object with explicitly defined keys, like `Record<'foo' | 'bar', unknown>`.
2183
+
2184
+ (The actual value type, `unknown`, is irrelevant and could be any type. Only the key type matters.)
2185
+
2186
+ ```
2187
+ const indexed: Record<string, unknown> = {}; // Allowed
2188
+
2189
+ const keyed: Record<'foo', unknown> = {}; // Error
2190
+ // => TS2739: Type '{}' is missing the following properties from type 'Record<"foo" | "bar", unknown>': foo, bar
2191
+ ```
2192
+
2193
+ Instead of causing a type error like the above, you can also use a [conditional type](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html) to test whether a type is assignable to another:
2194
+
2195
+ ```
2196
+ type Indexed = {} extends Record<string, unknown>
2197
+ ? '✅ `{}` is assignable to `Record<string, unknown>`'
2198
+ : '❌ `{}` is NOT assignable to `Record<string, unknown>`';
2199
+ // => '✅ `{}` is assignable to `Record<string, unknown>`'
2200
+
2201
+ type Keyed = {} extends Record<'foo' | 'bar', unknown>
2202
+ ? "✅ `{}` is assignable to `Record<'foo' | 'bar', unknown>`"
2203
+ : "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`";
2204
+ // => "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`"
2205
+ ```
2206
+
2207
+ Using a [mapped type](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#further-exploration), you can then check for each `KeyType` of `ObjectType`...
2208
+
2209
+ ```
2210
+ import type {OmitIndexSignature} from 'type-fest';
2211
+
2212
+ type OmitIndexSignature<ObjectType> = {
2213
+ [KeyType in keyof ObjectType // Map each key of `ObjectType`...
2214
+ ]: ObjectType[KeyType]; // ...to its original value, i.e. `OmitIndexSignature<Foo> == Foo`.
2215
+ };
2216
+ ```
2217
+
2218
+ ...whether an empty object (`{}`) would be assignable to an object with that `KeyType` (`Record<KeyType, unknown>`)...
2219
+
2220
+ ```
2221
+ import type {OmitIndexSignature} from 'type-fest';
2222
+
2223
+ type OmitIndexSignature<ObjectType> = {
2224
+ [KeyType in keyof ObjectType
2225
+ // Is `{}` assignable to `Record<KeyType, unknown>`?
2226
+ as {} extends Record<KeyType, unknown>
2227
+ ? ... // ✅ `{}` is assignable to `Record<KeyType, unknown>`
2228
+ : ... // ❌ `{}` is NOT assignable to `Record<KeyType, unknown>`
2229
+ ]: ObjectType[KeyType];
2230
+ };
2231
+ ```
2232
+
2233
+ If `{}` is assignable, it means that `KeyType` is an index signature and we want to remove it. If it is not assignable, `KeyType` is a "real" key and we want to keep it.
2234
+
2235
+ @example
2236
+ ```
2237
+ import type {OmitIndexSignature} from 'type-fest';
2238
+
2239
+ interface Example {
2240
+ // These index signatures will be removed.
2241
+ [x: string]: any
2242
+ [x: number]: any
2243
+ [x: symbol]: any
2244
+ [x: `head-${string}`]: string
2245
+ [x: `${string}-tail`]: string
2246
+ [x: `head-${string}-tail`]: string
2247
+ [x: `${bigint}`]: string
2248
+ [x: `embedded-${number}`]: string
2249
+
2250
+ // These explicitly defined keys will remain.
2251
+ foo: 'bar';
2252
+ qux?: 'baz';
2253
+ }
2254
+
2255
+ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
2256
+ // => { foo: 'bar'; qux?: 'baz' | undefined; }
2257
+ ```
2258
+
2259
+ @see PickIndexSignature
2260
+ @category Object
2261
+ */
2262
+ export type OmitIndexSignature<ObjectType> = {
5856
2263
  [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType];
5857
2264
  };
5858
2265
  /**
@@ -5941,7 +2348,7 @@ export type FooBar = Merge<Foo, Bar>;
5941
2348
 
5942
2349
  @category Object
5943
2350
  */
5944
- export type Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature$1<Destination>, OmitIndexSignature$1<Source>>>;
2351
+ export type Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
5945
2352
  /**
5946
2353
  An if-else-like type that resolves depending on whether the given type is `any`.
5947
2354
 
@@ -5961,11 +2368,11 @@ type ShouldBeBar = IfAny<'not any', 'foo', 'bar'>;
5961
2368
  @category Type Guard
5962
2369
  @category Utilities
5963
2370
  */
5964
- export type IfAny<T, TypeIfAny = true, TypeIfNotAny = false> = (IsAny$1<T> extends true ? TypeIfAny : TypeIfNotAny);
2371
+ export type IfAny<T, TypeIfAny = true, TypeIfNotAny = false> = (IsAny<T> extends true ? TypeIfAny : TypeIfNotAny);
5965
2372
  /**
5966
2373
  Matches any primitive, `void`, `Date`, or `RegExp` value.
5967
2374
  */
5968
- export type BuiltIns = Primitive$1 | void | Date | RegExp;
2375
+ export type BuiltIns = Primitive | void | Date | RegExp;
5969
2376
  /**
5970
2377
  Matches non-recursive types.
5971
2378
  */
@@ -9638,37 +6045,6 @@ type Translations$1 = SimplifyDeep<Translations>;
9638
6045
  type TranslationsPartial$1 = SimplifyDeep<TranslationsPartial>;
9639
6046
  type LiipgptListeners$1 = SimplifyDeep<LiipgptListeners>;
9640
6047
 
9641
- declare namespace JSONSchema$1 {
9642
- export { ArraySchema, BaseSchema, BooleanSchema, IntegerSchema, JSONSchema, NullSchema, NumberSchema, ObjectSchema, Schema, StringSchema, _JSONSchema };
9643
- }
9644
- declare namespace util {
9645
- export { AnyFunc, AssertEqual, AssertExtends, AssertNotEqual, BIGINT_FORMAT_RANGES, BuiltIn, 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, SafeParseError, SafeParseResult, SafeParseSuccess, SchemaClass, SomeObject, ToCleanMap, ToEnum, TupleItems, Whatever, Writeable, aborted, allowsEval, assert, assertEqual, assertIs, assertNever, assertNotEqual, assignProp, base64ToUint8Array, base64urlToUint8Array, cached, captureStackTrace, cleanEnum, cleanRegex, clone, cloneDef, createTransparentProxy, defineLazy, esc, escapeRegex, extend, finalizeIssue, floatSafeRemainder, getElementAtPath, getEnumValues, getLengthableOrigin, getParsedType, getSizableOrigin, hexToUint8Array, isObject, isPlainObject, issue, joinValues, jsonStringifyReplacer, merge, mergeDefs, normalizeParams, nullish, numKeys, objectClone, omit, optionalKeys, parsedType, partial, pick, prefixIssues, primitiveTypes, promiseAllObject, propertyKeyTypes, randomString, required, safeExtend, shallowClone, slugify, stringifyPrimitive, uint8ArrayToBase64, uint8ArrayToBase64url, uint8ArrayToHex, unwrapMessage };
9646
- }
9647
- declare namespace coerce {
9648
- export { ZodCoercedBigInt, ZodCoercedBoolean, ZodCoercedDate, ZodCoercedNumber, ZodCoercedString, bigint$2 as bigint, boolean$2 as boolean, date$3 as date, number$2 as number, string$2 as string };
9649
- }
9650
- declare namespace schemas {
9651
- export { $InferEnumInput, $InferEnumOutput, $InferInnerFunctionType, $InferInnerFunctionTypeAsync, $InferObjectInput, $InferObjectOutput, $InferOuterFunctionType, $InferOuterFunctionTypeAsync, $InferTupleInputType, $InferTupleOutputType, $InferUnionInput, $InferUnionOutput, $InferZodRecordInput, $InferZodRecordOutput, $PartsToTemplateLiteral, $ZodAny, $ZodAnyDef, $ZodAnyInternals, $ZodArray, $ZodArrayDef, $ZodArrayInternals, $ZodBase64, $ZodBase64Def, $ZodBase64Internals, $ZodBase64URL, $ZodBase64URLDef, $ZodBase64URLInternals, $ZodBigInt, $ZodBigIntDef, $ZodBigIntFormat, $ZodBigIntFormatDef, $ZodBigIntFormatInternals, $ZodBigIntInternals, $ZodBoolean, $ZodBooleanDef, $ZodBooleanInternals, $ZodCIDRv4, $ZodCIDRv4Def, $ZodCIDRv4Internals, $ZodCIDRv6, $ZodCIDRv6Def, $ZodCIDRv6Internals, $ZodCUID, $ZodCUID2, $ZodCUID2Def, $ZodCUID2Internals, $ZodCUIDDef, $ZodCUIDInternals, $ZodCatch, $ZodCatchCtx, $ZodCatchDef, $ZodCatchInternals, $ZodCodec, $ZodCodecDef, $ZodCodecInternals, $ZodCustom, $ZodCustomDef, $ZodCustomInternals, $ZodCustomStringFormat, $ZodCustomStringFormatDef, $ZodCustomStringFormatInternals, $ZodDate, $ZodDateDef, $ZodDateInternals, $ZodDefault, $ZodDefaultDef, $ZodDefaultInternals, $ZodDiscriminatedUnion, $ZodDiscriminatedUnionDef, $ZodDiscriminatedUnionInternals, $ZodE164, $ZodE164Def, $ZodE164Internals, $ZodEmail, $ZodEmailDef, $ZodEmailInternals, $ZodEmoji, $ZodEmojiDef, $ZodEmojiInternals, $ZodEnum, $ZodEnumDef, $ZodEnumInternals, $ZodExactOptional, $ZodExactOptionalDef, $ZodExactOptionalInternals, $ZodFile, $ZodFileDef, $ZodFileInternals, $ZodFunction, $ZodFunctionArgs, $ZodFunctionDef, $ZodFunctionIn, $ZodFunctionInternals, $ZodFunctionOut, $ZodFunctionParams, $ZodGUID, $ZodGUIDDef, $ZodGUIDInternals, $ZodIPv4, $ZodIPv4Def, $ZodIPv4Internals, $ZodIPv6, $ZodIPv6Def, $ZodIPv6Internals, $ZodISODate, $ZodISODateDef, $ZodISODateInternals, $ZodISODateTime, $ZodISODateTimeDef, $ZodISODateTimeInternals, $ZodISODuration, $ZodISODurationDef, $ZodISODurationInternals, $ZodISOTime, $ZodISOTimeDef, $ZodISOTimeInternals, $ZodIntersection, $ZodIntersectionDef, $ZodIntersectionInternals, $ZodJWT, $ZodJWTDef, $ZodJWTInternals, $ZodKSUID, $ZodKSUIDDef, $ZodKSUIDInternals, $ZodLazy, $ZodLazyDef, $ZodLazyInternals, $ZodLiteral, $ZodLiteralDef, $ZodLiteralInternals, $ZodLooseShape, $ZodMAC, $ZodMACDef, $ZodMACInternals, $ZodMap, $ZodMapDef, $ZodMapInternals, $ZodNaN, $ZodNaNDef, $ZodNaNInternals, $ZodNanoID, $ZodNanoIDDef, $ZodNanoIDInternals, $ZodNever, $ZodNeverDef, $ZodNeverInternals, $ZodNonOptional, $ZodNonOptionalDef, $ZodNonOptionalInternals, $ZodNull, $ZodNullDef, $ZodNullInternals, $ZodNullable, $ZodNullableDef, $ZodNullableInternals, $ZodNumber, $ZodNumberDef, $ZodNumberFormat, $ZodNumberFormatDef, $ZodNumberFormatInternals, $ZodNumberInternals, $ZodObject, $ZodObjectConfig, $ZodObjectDef, $ZodObjectInternals, $ZodObjectJIT, $ZodOptional, $ZodOptionalDef, $ZodOptionalInternals, $ZodPipe, $ZodPipeDef, $ZodPipeInternals, $ZodPrefault, $ZodPrefaultDef, $ZodPrefaultInternals, $ZodPromise, $ZodPromiseDef, $ZodPromiseInternals, $ZodReadonly, $ZodReadonlyDef, $ZodReadonlyInternals, $ZodRecord, $ZodRecordDef, $ZodRecordInternals, $ZodRecordKey, $ZodSet, $ZodSetDef, $ZodSetInternals, $ZodShape, $ZodStandardSchema, $ZodString, $ZodStringDef, $ZodStringFormat, $ZodStringFormatDef, $ZodStringFormatInternals, $ZodStringFormatTypes, $ZodStringInternals, $ZodSuccess, $ZodSuccessDef, $ZodSuccessInternals, $ZodSymbol, $ZodSymbolDef, $ZodSymbolInternals, $ZodTemplateLiteral, $ZodTemplateLiteralDef, $ZodTemplateLiteralInternals, $ZodTemplateLiteralPart, $ZodTransform, $ZodTransformDef, $ZodTransformInternals, $ZodTuple, $ZodTupleDef, $ZodTupleInternals, $ZodType, $ZodTypeDef, $ZodTypeInternals, $ZodTypes, $ZodULID, $ZodULIDDef, $ZodULIDInternals, $ZodURL, $ZodURLDef, $ZodURLInternals, $ZodUUID, $ZodUUIDDef, $ZodUUIDInternals, $ZodUndefined, $ZodUndefinedDef, $ZodUndefinedInternals, $ZodUnion, $ZodUnionDef, $ZodUnionInternals, $ZodUnknown, $ZodUnknownDef, $ZodUnknownInternals, $ZodVoid, $ZodVoidDef, $ZodVoidInternals, $ZodXID, $ZodXIDDef, $ZodXIDInternals, $ZodXor, $ZodXorInternals, $catchall, $loose, $partial, $strict, $strip, CheckFn, ConcatenateTupleOfStrings, ConvertPartsToStringTuple, File$1 as File, ParseContext, ParseContextInternal, ParsePayload, SomeType, ToTemplateLiteral, _$ZodType, _$ZodTypeInternals, clone, isValidBase64, isValidBase64URL, isValidJWT };
9652
- }
9653
- declare namespace regexes {
9654
- export { _null as null, _undefined as undefined, base64, base64url, bigint, boolean, browserEmail, cidrv4, cidrv6, cuid, cuid2, date, datetime, domain, duration, e164, email, emoji, extendedDuration, guid, hex, hostname, html5Email, idnEmail, integer, ipv4, ipv6, ksuid, lowercase, mac, md5_base64, md5_base64url, md5_hex, nanoid, number, rfc5322Email, sha1_base64, sha1_base64url, sha1_hex, sha256_base64, sha256_base64url, sha256_hex, sha384_base64, sha384_base64url, sha384_hex, sha512_base64, sha512_base64url, sha512_hex, string, time, ulid, unicodeEmail, uppercase, uuid, uuid4, uuid6, uuid7, xid };
9655
- }
9656
- declare namespace locales {
9657
- export { _default as ar, _default$1 as az, _default$10 as es, _default$11 as fa, _default$12 as fi, _default$13 as fr, _default$14 as frCA, _default$15 as he, _default$16 as hu, _default$17 as hy, _default$18 as id, _default$19 as is, _default$2 as be, _default$20 as it, _default$21 as ja, _default$22 as ka, _default$23 as kh, _default$24 as km, _default$25 as ko, _default$26 as lt, _default$27 as mk, _default$28 as ms, _default$29 as nl, _default$3 as bg, _default$30 as no, _default$31 as ota, _default$32 as ps, _default$33 as pl, _default$34 as pt, _default$35 as ru, _default$36 as sl, _default$37 as sv, _default$38 as ta, _default$39 as th, _default$4 as ca, _default$40 as tr, _default$41 as ua, _default$42 as uk, _default$43 as ur, _default$44 as uz, _default$45 as vi, _default$46 as zhCN, _default$47 as zhTW, _default$48 as yo, _default$5 as cs, _default$6 as da, _default$7 as de, _default$8 as en, _default$9 as eo };
9658
- }
9659
- declare namespace schemas$1 {
9660
- export { SafeExtendShape, ZodAny, ZodArray, ZodBase64, ZodBase64URL, ZodBigInt, ZodBigIntFormat, ZodBoolean, ZodCIDRv4, ZodCIDRv6, ZodCUID, ZodCUID2, ZodCatch, ZodCodec, ZodCustom, ZodCustomStringFormat, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodE164, ZodEmail, ZodEmoji, ZodEnum, ZodExactOptional, ZodFile, ZodFloat32, ZodFloat64, ZodFunction, ZodGUID, ZodIPv4, ZodIPv6, ZodInt, ZodInt32, ZodIntersection, ZodJSONSchema, ZodJSONSchemaInternals, ZodJWT, ZodKSUID, ZodLazy, ZodLiteral, ZodMAC, ZodMap, ZodNaN, ZodNanoID, ZodNever, ZodNonOptional, ZodNull, ZodNullable, ZodNumber, ZodNumberFormat, ZodObject, ZodOptional, ZodPipe, ZodPrefault, ZodPromise, ZodReadonly, ZodRecord, ZodSet, ZodStandardSchemaWithJSON$1 as ZodStandardSchemaWithJSON, ZodString, ZodStringFormat, ZodSuccess, ZodSymbol, ZodTemplateLiteral, ZodTransform, ZodTuple, ZodType, ZodUInt32, ZodULID, ZodURL, ZodUUID, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, ZodXID, ZodXor, _ZodBigInt, _ZodBoolean, _ZodDate, _ZodNumber, _ZodString, _ZodType, _catch$1 as catch, _default$50 as _default, _enum$1 as enum, _function, _function as function, _instanceof as instanceof, _null$2 as null, _undefined$2 as undefined, _void$1 as void, any, array, base64$1 as base64, base64url$1 as base64url, bigint$1 as bigint, boolean$1 as boolean, check, cidrv4$1 as cidrv4, cidrv6$1 as cidrv6, codec, cuid$1 as cuid, cuid2$1 as cuid2, custom, date$1 as date, describe$1 as describe, discriminatedUnion, e164$1 as e164, email$1 as email, emoji$1 as emoji, exactOptional, file, float32, float64, guid$1 as guid, hash, hex$1 as hex, hostname$1 as hostname, httpUrl, int, int32, int64, intersection, ipv4$1 as ipv4, ipv6$1 as ipv6, json, jwt, keyof, ksuid$1 as ksuid, lazy, literal, looseObject, looseRecord, mac$1 as mac, map, meta$1 as meta, nan, nanoid$1 as nanoid, nativeEnum, never, nonoptional, nullable, nullish$1 as nullish, number$1 as number, object, optional, partialRecord, pipe, prefault, preprocess, promise, readonly, record, refine, set, strictObject, string$1 as string, stringFormat, stringbool, success, superRefine, symbol, templateLiteral, transform, tuple, uint32, uint64, ulid$1 as ulid, union, unknown, url, uuid$1 as uuid, uuidv4, uuidv6, uuidv7, xid$1 as xid, xor };
9661
- }
9662
- declare namespace core {
9663
- export { $Decode, $DecodeAsync, $Encode, $EncodeAsync, $InferEnumInput, $InferEnumOutput, $InferInnerFunctionType, $InferInnerFunctionTypeAsync, $InferObjectInput, $InferObjectOutput, $InferOuterFunctionType, $InferOuterFunctionTypeAsync, $InferTupleInputType, $InferTupleOutputType, $InferUnionInput, $InferUnionOutput, $InferZodRecordInput, $InferZodRecordOutput, $Parse, $ParseAsync, $PartsToTemplateLiteral, $RefinementCtx, $SafeDecode, $SafeDecodeAsync, $SafeEncode, $SafeEncodeAsync, $SafeParse, $SafeParseAsync, $ZodAny, $ZodAnyDef, $ZodAnyInternals, $ZodAnyParams, $ZodArray, $ZodArrayDef, $ZodArrayInternals, $ZodArrayParams, $ZodAsyncError, $ZodBase64, $ZodBase64Def, $ZodBase64Internals, $ZodBase64Params, $ZodBase64URL, $ZodBase64URLDef, $ZodBase64URLInternals, $ZodBase64URLParams, $ZodBigInt, $ZodBigIntDef, $ZodBigIntFormat, $ZodBigIntFormatDef, $ZodBigIntFormatInternals, $ZodBigIntFormatParams, $ZodBigIntFormats, $ZodBigIntInternals, $ZodBigIntParams, $ZodBoolean, $ZodBooleanDef, $ZodBooleanInternals, $ZodBooleanParams, $ZodBranded, $ZodCIDRv4, $ZodCIDRv4Def, $ZodCIDRv4Internals, $ZodCIDRv4Params, $ZodCIDRv6, $ZodCIDRv6Def, $ZodCIDRv6Internals, $ZodCIDRv6Params, $ZodCUID, $ZodCUID2, $ZodCUID2Def, $ZodCUID2Internals, $ZodCUID2Params, $ZodCUIDDef, $ZodCUIDInternals, $ZodCUIDParams, $ZodCatch, $ZodCatchCtx, $ZodCatchDef, $ZodCatchInternals, $ZodCatchParams, $ZodCheck, $ZodCheckBase64Params, $ZodCheckBase64URLParams, $ZodCheckBigIntFormat, $ZodCheckBigIntFormatDef, $ZodCheckBigIntFormatInternals, $ZodCheckBigIntFormatParams, $ZodCheckCIDRv4Params, $ZodCheckCIDRv6Params, $ZodCheckCUID2Params, $ZodCheckCUIDParams, $ZodCheckDef, $ZodCheckE164Params, $ZodCheckEmailParams, $ZodCheckEmojiParams, $ZodCheckEndsWith, $ZodCheckEndsWithDef, $ZodCheckEndsWithInternals, $ZodCheckEndsWithParams, $ZodCheckGUIDParams, $ZodCheckGreaterThan, $ZodCheckGreaterThanDef, $ZodCheckGreaterThanInternals, $ZodCheckGreaterThanParams, $ZodCheckIPv4Params, $ZodCheckIPv6Params, $ZodCheckISODateParams, $ZodCheckISODateTimeParams, $ZodCheckISODurationParams, $ZodCheckISOTimeParams, $ZodCheckIncludes, $ZodCheckIncludesDef, $ZodCheckIncludesInternals, $ZodCheckIncludesParams, $ZodCheckInternals, $ZodCheckJWTParams, $ZodCheckKSUIDParams, $ZodCheckLengthEquals, $ZodCheckLengthEqualsDef, $ZodCheckLengthEqualsInternals, $ZodCheckLengthEqualsParams, $ZodCheckLessThan, $ZodCheckLessThanDef, $ZodCheckLessThanInternals, $ZodCheckLessThanParams, $ZodCheckLowerCase, $ZodCheckLowerCaseDef, $ZodCheckLowerCaseInternals, $ZodCheckLowerCaseParams, $ZodCheckMACParams, $ZodCheckMaxLength, $ZodCheckMaxLengthDef, $ZodCheckMaxLengthInternals, $ZodCheckMaxLengthParams, $ZodCheckMaxSize, $ZodCheckMaxSizeDef, $ZodCheckMaxSizeInternals, $ZodCheckMaxSizeParams, $ZodCheckMimeType, $ZodCheckMimeTypeDef, $ZodCheckMimeTypeInternals, $ZodCheckMimeTypeParams, $ZodCheckMinLength, $ZodCheckMinLengthDef, $ZodCheckMinLengthInternals, $ZodCheckMinLengthParams, $ZodCheckMinSize, $ZodCheckMinSizeDef, $ZodCheckMinSizeInternals, $ZodCheckMinSizeParams, $ZodCheckMultipleOf, $ZodCheckMultipleOfDef, $ZodCheckMultipleOfInternals, $ZodCheckMultipleOfParams, $ZodCheckNanoIDParams, $ZodCheckNumberFormat, $ZodCheckNumberFormatDef, $ZodCheckNumberFormatInternals, $ZodCheckNumberFormatParams, $ZodCheckOverwrite, $ZodCheckOverwriteDef, $ZodCheckOverwriteInternals, $ZodCheckProperty, $ZodCheckPropertyDef, $ZodCheckPropertyInternals, $ZodCheckPropertyParams, $ZodCheckRegex, $ZodCheckRegexDef, $ZodCheckRegexInternals, $ZodCheckRegexParams, $ZodCheckSizeEquals, $ZodCheckSizeEqualsDef, $ZodCheckSizeEqualsInternals, $ZodCheckSizeEqualsParams, $ZodCheckStartsWith, $ZodCheckStartsWithDef, $ZodCheckStartsWithInternals, $ZodCheckStartsWithParams, $ZodCheckStringFormat, $ZodCheckStringFormatDef, $ZodCheckStringFormatInternals, $ZodCheckStringFormatParams, $ZodCheckULIDParams, $ZodCheckURLParams, $ZodCheckUUIDParams, $ZodCheckUUIDv4Params, $ZodCheckUUIDv6Params, $ZodCheckUUIDv7Params, $ZodCheckUpperCase, $ZodCheckUpperCaseDef, $ZodCheckUpperCaseInternals, $ZodCheckUpperCaseParams, $ZodCheckXIDParams, $ZodChecks, $ZodCodec, $ZodCodecDef, $ZodCodecInternals, $ZodConfig, $ZodCustom, $ZodCustomDef, $ZodCustomInternals, $ZodCustomParams, $ZodCustomStringFormat, $ZodCustomStringFormatDef, $ZodCustomStringFormatInternals, $ZodDate, $ZodDateDef, $ZodDateInternals, $ZodDateParams, $ZodDefault, $ZodDefaultDef, $ZodDefaultInternals, $ZodDefaultParams, $ZodDiscriminatedUnion, $ZodDiscriminatedUnionDef, $ZodDiscriminatedUnionInternals, $ZodDiscriminatedUnionParams, $ZodE164, $ZodE164Def, $ZodE164Internals, $ZodE164Params, $ZodEmail, $ZodEmailDef, $ZodEmailInternals, $ZodEmailParams, $ZodEmoji, $ZodEmojiDef, $ZodEmojiInternals, $ZodEmojiParams, $ZodEncodeError, $ZodEnum, $ZodEnumDef, $ZodEnumInternals, $ZodEnumParams, $ZodError, $ZodErrorClass, $ZodErrorMap, $ZodErrorTree, $ZodExactOptional, $ZodExactOptionalDef, $ZodExactOptionalInternals, $ZodFile, $ZodFileDef, $ZodFileInternals, $ZodFileParams, $ZodFlattenedError, $ZodFormattedError, $ZodFunction, $ZodFunctionArgs, $ZodFunctionDef, $ZodFunctionIn, $ZodFunctionInternals, $ZodFunctionOut, $ZodFunctionParams, $ZodGUID, $ZodGUIDDef, $ZodGUIDInternals, $ZodGUIDParams, $ZodIPv4, $ZodIPv4Def, $ZodIPv4Internals, $ZodIPv4Params, $ZodIPv6, $ZodIPv6Def, $ZodIPv6Internals, $ZodIPv6Params, $ZodISODate, $ZodISODateDef, $ZodISODateInternals, $ZodISODateParams, $ZodISODateTime, $ZodISODateTimeDef, $ZodISODateTimeInternals, $ZodISODateTimeParams, $ZodISODuration, $ZodISODurationDef, $ZodISODurationInternals, $ZodISODurationParams, $ZodISOTime, $ZodISOTimeDef, $ZodISOTimeInternals, $ZodISOTimeParams, $ZodInternalIssue, $ZodIntersection, $ZodIntersectionDef, $ZodIntersectionInternals, $ZodIntersectionParams, $ZodInvalidTypeExpected, $ZodIssue, $ZodIssueBase, $ZodIssueCode, $ZodIssueCustom, $ZodIssueInvalidElement, $ZodIssueInvalidKey, $ZodIssueInvalidStringFormat, $ZodIssueInvalidType, $ZodIssueInvalidUnion, $ZodIssueInvalidValue, $ZodIssueNotMultipleOf, $ZodIssueStringCommonFormats, $ZodIssueStringEndsWith, $ZodIssueStringIncludes, $ZodIssueStringInvalidJWT, $ZodIssueStringInvalidRegex, $ZodIssueStringStartsWith, $ZodIssueTooBig, $ZodIssueTooSmall, $ZodIssueUnrecognizedKeys, $ZodJWT, $ZodJWTDef, $ZodJWTInternals, $ZodJWTParams, $ZodKSUID, $ZodKSUIDDef, $ZodKSUIDInternals, $ZodKSUIDParams, $ZodLazy, $ZodLazyDef, $ZodLazyInternals, $ZodLazyParams, $ZodLiteral, $ZodLiteralDef, $ZodLiteralInternals, $ZodLiteralParams, $ZodLooseShape, $ZodMAC, $ZodMACDef, $ZodMACInternals, $ZodMACParams, $ZodMap, $ZodMapDef, $ZodMapInternals, $ZodMapParams, $ZodNaN, $ZodNaNDef, $ZodNaNInternals, $ZodNaNParams, $ZodNanoID, $ZodNanoIDDef, $ZodNanoIDInternals, $ZodNanoIDParams, $ZodNarrow, $ZodNever, $ZodNeverDef, $ZodNeverInternals, $ZodNeverParams, $ZodNonOptional, $ZodNonOptionalDef, $ZodNonOptionalInternals, $ZodNonOptionalParams, $ZodNull, $ZodNullDef, $ZodNullInternals, $ZodNullParams, $ZodNullable, $ZodNullableDef, $ZodNullableInternals, $ZodNullableParams, $ZodNumber, $ZodNumberDef, $ZodNumberFormat, $ZodNumberFormatDef, $ZodNumberFormatInternals, $ZodNumberFormatParams, $ZodNumberFormats, $ZodNumberInternals, $ZodNumberParams, $ZodObject, $ZodObjectConfig, $ZodObjectDef, $ZodObjectInternals, $ZodObjectJIT, $ZodObjectParams, $ZodOptional, $ZodOptionalDef, $ZodOptionalInternals, $ZodOptionalParams, $ZodPipe, $ZodPipeDef, $ZodPipeInternals, $ZodPipeParams, $ZodPrefault, $ZodPrefaultDef, $ZodPrefaultInternals, $ZodPromise, $ZodPromiseDef, $ZodPromiseInternals, $ZodPromiseParams, $ZodRawIssue, $ZodReadonly, $ZodReadonlyDef, $ZodReadonlyInternals, $ZodReadonlyParams, $ZodRealError$1 as $ZodRealError, $ZodRecord, $ZodRecordDef, $ZodRecordInternals, $ZodRecordKey, $ZodRecordParams, $ZodRegistry, $ZodSet, $ZodSetDef, $ZodSetInternals, $ZodSetParams, $ZodShape, $ZodStandardSchema, $ZodString, $ZodStringBoolParams, $ZodStringDef, $ZodStringFormat, $ZodStringFormatChecks, $ZodStringFormatDef, $ZodStringFormatInternals, $ZodStringFormatIssues, $ZodStringFormatParams, $ZodStringFormatTypes, $ZodStringFormats, $ZodStringInternals, $ZodStringParams, $ZodSuccess, $ZodSuccessDef, $ZodSuccessInternals, $ZodSuccessParams, $ZodSuperRefineIssue, $ZodSymbol, $ZodSymbolDef, $ZodSymbolInternals, $ZodSymbolParams, $ZodTemplateLiteral, $ZodTemplateLiteralDef, $ZodTemplateLiteralInternals, $ZodTemplateLiteralParams, $ZodTemplateLiteralPart, $ZodTransform, $ZodTransformDef, $ZodTransformInternals, $ZodTransformParams, $ZodTuple, $ZodTupleDef, $ZodTupleInternals, $ZodTupleParams, $ZodType, $ZodTypeDef, $ZodTypeDiscriminable, $ZodTypeDiscriminableInternals, $ZodTypeInternals, $ZodTypes, $ZodULID, $ZodULIDDef, $ZodULIDInternals, $ZodULIDParams, $ZodURL, $ZodURLDef, $ZodURLInternals, $ZodURLParams, $ZodUUID, $ZodUUIDDef, $ZodUUIDInternals, $ZodUUIDParams, $ZodUUIDv4Params, $ZodUUIDv6Params, $ZodUUIDv7Params, $ZodUndefined, $ZodUndefinedDef, $ZodUndefinedInternals, $ZodUndefinedParams, $ZodUnion, $ZodUnionDef, $ZodUnionInternals, $ZodUnionParams, $ZodUnknown, $ZodUnknownDef, $ZodUnknownInternals, $ZodUnknownParams, $ZodVoid, $ZodVoidDef, $ZodVoidInternals, $ZodVoidParams, $ZodXID, $ZodXIDDef, $ZodXIDInternals, $ZodXIDParams, $ZodXor, $ZodXorInternals, $ZodXorParams, $brand, $catchall, $constructor, $input, $loose, $output, $partial, $replace, $strict, $strip, CheckFn, CheckParams, CheckStringFormatParams, CheckTypeParams, ConcatenateTupleOfStrings, ConvertPartsToStringTuple, Doc, File$1 as File, GlobalMeta, JSONSchema$1 as JSONSchema, JSONSchemaGenerator, JSONSchemaGeneratorParams, JSONSchemaMeta, NEVER, Params, ParseContext, ParseContextInternal, ParsePayload, ProcessParams, Processor, RegistryToJSONSchemaParams, Seen, SomeType, StringFormatParams, TimePrecision, ToJSONSchemaContext, ToJSONSchemaParams, ToTemplateLiteral, TypeParams, ZodStandardJSONSchemaPayload, ZodStandardSchemaWithJSON, _$ZodType, _$ZodTypeInternals, _any, _array, _base64, _base64url, _bigint, _boolean, _catch, _check, _cidrv4, _cidrv6, _coercedBigint, _coercedBoolean, _coercedDate, _coercedNumber, _coercedString, _cuid, _cuid2, _custom, _date, _decode, _decodeAsync, _default$49 as _default, _discriminatedUnion, _e164, _email, _emoji, _encode, _encodeAsync, _endsWith, _enum, _file, _float32, _float64, _gt, _gte, _gte as _min, _guid, _includes, _int, _int32, _int64, _intersection, _ipv4, _ipv6, _isoDate, _isoDateTime, _isoDuration, _isoTime, _jwt, _ksuid, _lazy, _length, _literal, _lowercase, _lt, _lte, _lte as _max, _mac, _map, _maxLength, _maxSize, _mime, _minLength, _minSize, _multipleOf, _nan, _nanoid, _nativeEnum, _negative, _never, _nonnegative, _nonoptional, _nonpositive, _normalize, _null$1 as _null, _nullable, _number, _optional, _overwrite, _parse, _parseAsync, _pipe, _positive, _promise, _property, _readonly, _record, _refine, _regex, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync, _set, _size, _slugify, _startsWith, _string, _stringFormat, _stringbool, _success, _superRefine, _symbol, _templateLiteral, _toLowerCase, _toUpperCase, _transform, _trim, _tuple, _uint32, _uint64, _ulid, _undefined$1 as _undefined, _union, _unknown, _uppercase, _url, _uuid, _uuidv4, _uuidv6, _uuidv7, _void, _xid, _xor, clone, config, createStandardJSONSchemaMethod, createToJSONSchemaMethod, decode, decodeAsync, describe, encode, encodeAsync, extractDefs, finalize, flattenError, formatError, globalConfig, globalRegistry, initializeContext, input, isValidBase64, isValidBase64URL, isValidJWT, locales, meta, output, output as infer, parse, parseAsync, prettifyError, process$1 as process, regexes, registry, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync, toDotPath, toJSONSchema, treeifyError, util, version };
9664
- }
9665
- declare namespace iso {
9666
- export { ZodISODate, ZodISODateTime, ZodISODuration, ZodISOTime, date$2 as date, datetime$1 as datetime, duration$1 as duration, time$1 as time };
9667
- }
9668
- declare namespace z {
9669
- export { $RefinementCtx as RefinementCtx, $ZodErrorMap as ZodErrorMap, $ZodFlattenedError as ZodFlattenedError, $ZodFormattedError as ZodFormattedError, $ZodTypes as ZodFirstPartySchemaTypes, $brand, $input, $output, BRAND, GlobalMeta, IssueData, NEVER, SafeExtendShape, TimePrecision, ZodAny, ZodArray, ZodBase64, ZodBase64URL, ZodBigInt, ZodBigIntFormat, ZodBoolean, ZodCIDRv4, ZodCIDRv6, ZodCUID, ZodCUID2, ZodCatch, ZodCodec, ZodCoercedBigInt, ZodCoercedBoolean, ZodCoercedDate, ZodCoercedNumber, ZodCoercedString, ZodCustom, ZodCustomStringFormat, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodE164, ZodEmail, ZodEmoji, ZodEnum, ZodError, ZodExactOptional, ZodFile, ZodFirstPartyTypeKind, ZodFloat32, ZodFloat64, ZodFunction, ZodGUID, ZodIPv4, ZodIPv6, ZodISODate, ZodISODateTime, ZodISODuration, ZodISOTime, ZodInt, ZodInt32, ZodIntersection, ZodIssue, ZodIssueCode, ZodJSONSchema, ZodJSONSchemaInternals, ZodJWT, ZodKSUID, ZodLazy, ZodLiteral, ZodMAC, ZodMap, ZodNaN, ZodNanoID, ZodNever, ZodNonOptional, ZodNull, ZodNullable, ZodNumber, ZodNumberFormat, ZodObject, ZodOptional, ZodPipe, ZodPrefault, ZodPromise, ZodRawShape, ZodReadonly, ZodRealError, ZodRecord, ZodSafeParseError, ZodSafeParseResult, ZodSafeParseSuccess, ZodSet, ZodStandardSchemaWithJSON$1 as ZodStandardSchemaWithJSON, ZodString, ZodStringFormat, ZodSuccess, ZodSymbol, ZodTemplateLiteral, ZodTransform, ZodTuple, ZodType, ZodType as Schema, ZodType as ZodSchema, ZodType as ZodTypeAny, ZodUInt32, ZodULID, ZodURL, ZodUUID, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, ZodXID, ZodXor, _ZodBigInt, _ZodBoolean, _ZodDate, _ZodNumber, _ZodString, _ZodType, _catch$1 as catch, _default$50 as _default, _endsWith as endsWith, _enum$1 as enum, _function, _function as function, _gt as gt, _gte as gte, _includes as includes, _instanceof as instanceof, _length as length, _lowercase as lowercase, _lt as lt, _lte as lte, _maxLength as maxLength, _maxSize as maxSize, _mime as mime, _minLength as minLength, _minSize as minSize, _multipleOf as multipleOf, _negative as negative, _nonnegative as nonnegative, _nonpositive as nonpositive, _normalize as normalize, _null$2 as null, _overwrite as overwrite, _positive as positive, _property as property, _regex as regex, _size as size, _slugify as slugify, _startsWith as startsWith, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, _trim as trim, _undefined$2 as undefined, _uppercase as uppercase, _void$1 as void, any, array, base64$1 as base64, base64url$1 as base64url, bigint$1 as bigint, boolean$1 as boolean, check, cidrv4$1 as cidrv4, cidrv6$1 as cidrv6, clone, codec, coerce, config, core, cuid$1 as cuid, cuid2$1 as cuid2, custom, date$1 as date, decode$1 as decode, decodeAsync$1 as decodeAsync, describe$1 as describe, discriminatedUnion, e164$1 as e164, email$1 as email, emoji$1 as emoji, encode$1 as encode, encodeAsync$1 as encodeAsync, exactOptional, file, flattenError, float32, float64, formatError, fromJSONSchema, getErrorMap, globalRegistry, guid$1 as guid, hash, hex$1 as hex, hostname$1 as hostname, httpUrl, inferFlattenedErrors, inferFormattedError, input, int, int32, int64, intersection, ipv4$1 as ipv4, ipv6$1 as ipv6, iso, json, jwt, keyof, ksuid$1 as ksuid, lazy, literal, locales, looseObject, looseRecord, mac$1 as mac, map, meta$1 as meta, nan, nanoid$1 as nanoid, nativeEnum, never, nonoptional, nullable, nullish$1 as nullish, number$1 as number, object, optional, output, output as Infer, output as TypeOf, output as infer, parse$1 as parse, parseAsync$1 as parseAsync, partialRecord, pipe, prefault, preprocess, prettifyError, promise, readonly, record, refine, regexes, registry, safeDecode$1 as safeDecode, safeDecodeAsync$1 as safeDecodeAsync, safeEncode$1 as safeEncode, safeEncodeAsync$1 as safeEncodeAsync, safeParse$1 as safeParse, safeParseAsync$1 as safeParseAsync, set, setErrorMap, strictObject, string$1 as string, stringFormat, stringbool, success, superRefine, symbol, templateLiteral, toJSONSchema, transform, treeifyError, tuple, uint32, uint64, ulid$1 as ulid, union, unknown, url, util, uuid$1 as uuid, uuidv4, uuidv6, uuidv7, xid$1 as xid, xor };
9670
- }
9671
-
9672
6048
  export {
9673
6049
  ChatConfig$1 as ChatConfig,
9674
6050
  LiipgptListeners$1 as LiipgptListeners,