likec4 1.59.3 → 1.59.4
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.
- package/__app__/src/chunks/AIChat.mjs +108 -108
- package/__app__/src/chunks/LikeC4Styles.mjs +752 -604
- package/__app__/src/chunks/ProjectsOverview.mjs +72 -72
- package/__app__/src/chunks/es.mjs +1 -1
- package/__app__/src/chunks/hooks.mjs +94 -91
- package/__app__/src/chunks/libs/@floating-ui.mjs +3 -3
- package/__app__/src/chunks/libs/@mantine.mjs +1609 -892
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +2 -2
- package/__app__/src/chunks/libs/@tanstack.mjs +4 -10
- package/__app__/src/chunks/libs/@xyflow/react.mjs +4 -4
- package/__app__/src/chunks/libs/d3.mjs +4 -9
- package/__app__/src/chunks/libs/fast-equals.mjs +61 -49
- package/__app__/src/chunks/libs/framer.mjs +6 -6
- package/__app__/src/chunks/styled-system.mjs +2578 -124
- package/__app__/src/main.mjs +21537 -20155
- package/__app__/src/style.css +1 -1
- package/config/schema.json +14 -0
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +99 -105
- package/dist/chunks/filenames.mjs +6 -6
- package/dist/chunks/index.d.mts +7 -1
- package/dist/chunks/index2.d.mts +38 -21
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@chevrotain/types.d.mts +108 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -4
- package/dist/chunks/libs/langium.d.mts +1777 -16
- package/dist/chunks/libs/langium.mjs +4 -4
- package/dist/chunks/libs/p-queue.mjs +1 -1
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +2 -2
- package/dist/chunks/libs/picomatch.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/zod.d.mts +1717 -17
- package/dist/chunks/node.mjs +58 -59
- package/dist/chunks/vite-plugin.mjs +15 -12
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +104 -88
- package/dist/index.d.mts +3 -3
- package/dist/model/index.d.mts +4 -4
- package/dist/vite-plugin/index.d.mts +2 -2
- package/dist/vite-plugin/internal/index.d.mts +15 -15
- package/dist/vite-plugin/internal/index.mjs +72 -27
- package/package.json +28 -28
- package/react/index.d.mts +22720 -1460
- package/react/index.mjs +30391 -25072
- package/vite-plugin-modules.d.ts +4 -2
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { i as __name } from "../rolldown-runtime.mjs";
|
|
2
|
-
|
|
1
|
+
import { i as __name, r as __exportAll } from "../rolldown-runtime.mjs";
|
|
2
|
+
declare namespace json_schema_d_exports {
|
|
3
|
+
export { ArraySchema, BaseSchema, BooleanSchema, IntegerSchema, JSONSchema, NullSchema, NumberSchema, ObjectSchema, Schema, StringSchema, _JSONSchema };
|
|
4
|
+
}
|
|
5
|
+
type Schema = ObjectSchema | ArraySchema | StringSchema | NumberSchema | IntegerSchema | BooleanSchema | NullSchema;
|
|
3
6
|
type _JSONSchema = boolean | JSONSchema;
|
|
4
7
|
type JSONSchema = {
|
|
5
8
|
[k: string]: unknown;
|
|
@@ -66,6 +69,27 @@ type JSONSchema = {
|
|
|
66
69
|
_prefault?: unknown;
|
|
67
70
|
};
|
|
68
71
|
type BaseSchema = JSONSchema;
|
|
72
|
+
interface ObjectSchema extends JSONSchema {
|
|
73
|
+
type: "object";
|
|
74
|
+
}
|
|
75
|
+
interface ArraySchema extends JSONSchema {
|
|
76
|
+
type: "array";
|
|
77
|
+
}
|
|
78
|
+
interface StringSchema extends JSONSchema {
|
|
79
|
+
type: "string";
|
|
80
|
+
}
|
|
81
|
+
interface NumberSchema extends JSONSchema {
|
|
82
|
+
type: "number";
|
|
83
|
+
}
|
|
84
|
+
interface IntegerSchema extends JSONSchema {
|
|
85
|
+
type: "integer";
|
|
86
|
+
}
|
|
87
|
+
interface BooleanSchema extends JSONSchema {
|
|
88
|
+
type: "boolean";
|
|
89
|
+
}
|
|
90
|
+
interface NullSchema extends JSONSchema {
|
|
91
|
+
type: "null";
|
|
92
|
+
}
|
|
69
93
|
//#endregion
|
|
70
94
|
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/standard-schema.d.cts
|
|
71
95
|
/** The Standard interface. */
|
|
@@ -185,8 +209,9 @@ declare namespace StandardJSONSchemaV1 {
|
|
|
185
209
|
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
186
210
|
}
|
|
187
211
|
interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
|
|
188
|
-
|
|
189
|
-
|
|
212
|
+
declare namespace registries_d_exports {
|
|
213
|
+
export { $ZodRegistry, $input, $output, $replace, GlobalMeta, JSONSchemaMeta, globalRegistry, registry };
|
|
214
|
+
}
|
|
190
215
|
declare const $output: unique symbol;
|
|
191
216
|
type $output = typeof $output;
|
|
192
217
|
declare const $input: unique symbol;
|
|
@@ -212,6 +237,8 @@ interface JSONSchemaMeta {
|
|
|
212
237
|
[k: string]: unknown;
|
|
213
238
|
}
|
|
214
239
|
interface GlobalMeta extends JSONSchemaMeta {}
|
|
240
|
+
declare function registry<T extends MetadataType = MetadataType, S extends $ZodType = $ZodType>(): $ZodRegistry<T, S>;
|
|
241
|
+
declare const globalRegistry: $ZodRegistry<GlobalMeta>;
|
|
215
242
|
//#endregion
|
|
216
243
|
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.d.cts
|
|
217
244
|
type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
|
|
@@ -254,6 +281,12 @@ interface JSONSchemaGeneratorParams {
|
|
|
254
281
|
* Parameters for the toJSONSchema function.
|
|
255
282
|
*/
|
|
256
283
|
type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
|
|
284
|
+
/**
|
|
285
|
+
* Parameters for the toJSONSchema function when passing a registry.
|
|
286
|
+
*/
|
|
287
|
+
interface RegistryToJSONSchemaParams extends ToJSONSchemaParams {
|
|
288
|
+
uri?: (id: string) => string;
|
|
289
|
+
}
|
|
257
290
|
interface ProcessParams {
|
|
258
291
|
schemaPath: $ZodType[];
|
|
259
292
|
path: (string | number)[];
|
|
@@ -297,24 +330,56 @@ interface ToJSONSchemaContext {
|
|
|
297
330
|
defs: Record<string, BaseSchema>;
|
|
298
331
|
} | undefined;
|
|
299
332
|
}
|
|
333
|
+
declare function initializeContext(params: JSONSchemaGeneratorParams): ToJSONSchemaContext;
|
|
334
|
+
declare function process<T extends $ZodType>(schema: T, ctx: ToJSONSchemaContext, _params?: ProcessParams): BaseSchema;
|
|
335
|
+
declare function extractDefs<T extends $ZodType>(ctx: ToJSONSchemaContext, schema: T): void;
|
|
336
|
+
declare function finalize<T extends $ZodType>(ctx: ToJSONSchemaContext, schema: T): ZodStandardJSONSchemaPayload<T>;
|
|
300
337
|
type ZodStandardSchemaWithJSON$1<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
|
|
301
338
|
interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
|
|
302
339
|
"~standard": ZodStandardSchemaWithJSON$1<T>;
|
|
303
340
|
}
|
|
304
|
-
|
|
305
|
-
|
|
341
|
+
/**
|
|
342
|
+
* Creates a toJSONSchema method for a schema instance.
|
|
343
|
+
* This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
|
|
344
|
+
*/
|
|
345
|
+
declare const createToJSONSchemaMethod: <T extends $ZodType>(schema: T, processors?: Record<string, Processor>) => (params?: ToJSONSchemaParams) => ZodStandardJSONSchemaPayload<T>;
|
|
346
|
+
/**
|
|
347
|
+
* Creates a toJSONSchema method for a schema instance.
|
|
348
|
+
* This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
|
|
349
|
+
*/
|
|
350
|
+
type StandardJSONSchemaMethodParams = Parameters<StandardJSONSchemaV1["~standard"]["jsonSchema"]["input"]>[0];
|
|
351
|
+
declare const createStandardJSONSchemaMethod: <T extends $ZodType>(schema: T, io: "input" | "output", processors?: Record<string, Processor>) => (params?: StandardJSONSchemaMethodParams) => BaseSchema;
|
|
352
|
+
declare namespace util_d_exports {
|
|
353
|
+
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, explicitlyAborted, extend, finalizeIssue, floatSafeRemainder, getElementAtPath, getEnumValues, getLengthableOrigin, getParsedType, getSizableOrigin, hexToUint8Array, isObject, isPlainObject, issue, joinValues, jsonStringifyReplacer, merge, mergeDefs, normalizeParams, nullish$1 as nullish, numKeys, objectClone, omit, optionalKeys, parsedType, partial, pick, prefixIssues, primitiveTypes, promiseAllObject, propertyKeyTypes, randomString, required, safeExtend, shallowClone, slugify, stringifyPrimitive, uint8ArrayToBase64, uint8ArrayToBase64url, uint8ArrayToHex, unwrapMessage };
|
|
354
|
+
}
|
|
355
|
+
type JSONType = string | number | boolean | null | JSONType[] | {
|
|
356
|
+
[key: string]: JSONType;
|
|
357
|
+
};
|
|
306
358
|
type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
|
|
359
|
+
type HashAlgorithm = "md5" | "sha1" | "sha256" | "sha384" | "sha512";
|
|
360
|
+
type HashEncoding = "hex" | "base64" | "base64url";
|
|
361
|
+
type HashFormat = `${HashAlgorithm}_${HashEncoding}`;
|
|
362
|
+
type IPVersion = "v4" | "v6";
|
|
307
363
|
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 & {});
|
|
364
|
+
type ParsedTypes = "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "file" | "date" | "array" | "map" | "set" | "nan" | "null" | "promise";
|
|
365
|
+
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends (<V>() => V extends U ? 1 : 2) ? true : false;
|
|
366
|
+
type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends (<V>() => V extends U ? 1 : 2) ? false : true;
|
|
367
|
+
type AssertExtends<T, U> = T extends U ? T : never;
|
|
308
368
|
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
309
369
|
type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
370
|
+
type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
310
371
|
type MakePartial<T, K extends keyof T> = Omit$1<T, K> & InexactPartial<Pick<T, K>>;
|
|
372
|
+
type MakeRequired<T, K extends keyof T> = Omit$1<T, K> & Required<Pick<T, K>>;
|
|
373
|
+
type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
|
|
311
374
|
type NoUndefined<T> = T extends undefined ? never : T;
|
|
375
|
+
type Whatever = {} | undefined | null;
|
|
312
376
|
type LoosePartial<T extends object> = InexactPartial<T> & {
|
|
313
377
|
[k: string]: unknown;
|
|
314
378
|
};
|
|
315
379
|
type Mask<Keys extends PropertyKey> = { [K in Keys]?: true; };
|
|
316
380
|
type Writeable<T> = { -readonly [P in keyof T]: T[P]; } & {};
|
|
317
381
|
type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined; };
|
|
382
|
+
type EmptyObject = Record<string, never>;
|
|
318
383
|
type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
319
384
|
readonly [Symbol.toStringTag]: string;
|
|
320
385
|
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
@@ -322,23 +387,130 @@ type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T e
|
|
|
322
387
|
type SomeObject = Record<PropertyKey, any>;
|
|
323
388
|
type Identity<T> = T;
|
|
324
389
|
type Flatten<T> = Identity<{ [k in keyof T]: T[k]; }>;
|
|
390
|
+
type Mapped<T> = { [k in keyof T]: T[k]; };
|
|
325
391
|
type Prettify<T> = { [K in keyof T]: T[K]; } & {};
|
|
392
|
+
type NoNeverKeys<T> = { [k in keyof T]: [T[k]] extends [never] ? never : k; }[keyof T];
|
|
393
|
+
type NoNever<T> = Identity<{ [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never; }>;
|
|
326
394
|
type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : { [K in keyof A as K extends keyof B ? never : K]: A[K]; } & { [K in keyof B]: B[K]; }>;
|
|
327
395
|
type TupleItems = ReadonlyArray<SomeType>;
|
|
328
396
|
type AnyFunc = (...args: any[]) => any;
|
|
397
|
+
type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;
|
|
329
398
|
type MaybeAsync<T> = T | Promise<T>;
|
|
399
|
+
type KeyOf<T> = keyof OmitIndexSignature<T>;
|
|
400
|
+
type OmitIndexSignature<T> = { [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K]; };
|
|
401
|
+
type ExtractIndexSignature<T> = { [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K]; };
|
|
402
|
+
type Keys<T extends object> = keyof OmitIndexSignature<T>;
|
|
403
|
+
type SchemaClass<T extends SomeType> = {
|
|
404
|
+
new (def: T["_zod"]["def"]): T;
|
|
405
|
+
};
|
|
330
406
|
type EnumValue = string | number;
|
|
331
407
|
type EnumLike = Readonly<Record<string, EnumValue>>;
|
|
332
408
|
type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k; }>;
|
|
409
|
+
type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;
|
|
410
|
+
type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;
|
|
333
411
|
type Literal = string | number | bigint | boolean | null | undefined;
|
|
412
|
+
type LiteralArray = Array<Literal>;
|
|
334
413
|
type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
414
|
+
type PrimitiveArray = Array<Primitive>;
|
|
415
|
+
type HasSize = {
|
|
416
|
+
size: number;
|
|
417
|
+
};
|
|
335
418
|
type HasLength = {
|
|
336
419
|
length: number;
|
|
337
420
|
};
|
|
338
421
|
type Numeric = number | bigint | Date;
|
|
422
|
+
type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;
|
|
423
|
+
type SafeParseSuccess<T> = {
|
|
424
|
+
success: true;
|
|
425
|
+
data: T;
|
|
426
|
+
error?: never;
|
|
427
|
+
};
|
|
428
|
+
type SafeParseError<T> = {
|
|
429
|
+
success: false;
|
|
430
|
+
data?: never;
|
|
431
|
+
error: $ZodError<T>;
|
|
432
|
+
};
|
|
339
433
|
type PropValues = Record<string, Set<Primitive>>;
|
|
340
434
|
type PrimitiveSet = Set<Primitive>;
|
|
435
|
+
declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;
|
|
436
|
+
declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;
|
|
437
|
+
declare function assertIs<T>(_arg: T): void;
|
|
438
|
+
declare function assertNever(_x: never): never;
|
|
439
|
+
declare function assert<T>(_: any): asserts _ is T;
|
|
440
|
+
declare function getEnumValues(entries: EnumLike): EnumValue[];
|
|
441
|
+
declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;
|
|
442
|
+
declare function jsonStringifyReplacer(_: string, value: any): any;
|
|
443
|
+
declare function cached<T>(getter: () => T): {
|
|
444
|
+
value: T;
|
|
445
|
+
};
|
|
446
|
+
declare function nullish$1(input: any): boolean;
|
|
447
|
+
declare function cleanRegex(source: string): string;
|
|
448
|
+
declare function floatSafeRemainder(val: number, step: number): number;
|
|
449
|
+
declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;
|
|
450
|
+
declare function objectClone(obj: object): any;
|
|
451
|
+
declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;
|
|
452
|
+
declare function mergeDefs(...defs: Record<string, any>[]): any;
|
|
453
|
+
declare function cloneDef(schema: $ZodType): any;
|
|
454
|
+
declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;
|
|
455
|
+
declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{ [k in keyof T]: Awaited<T[k]>; }>;
|
|
456
|
+
declare function randomString(length?: number): string;
|
|
457
|
+
declare function esc(str: string): string;
|
|
458
|
+
declare function slugify(input: string): string;
|
|
459
|
+
declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;
|
|
460
|
+
declare function isObject(data: any): data is Record<PropertyKey, unknown>;
|
|
461
|
+
declare const allowsEval: {
|
|
462
|
+
value: boolean;
|
|
463
|
+
};
|
|
464
|
+
declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;
|
|
465
|
+
declare function shallowClone(o: any): any;
|
|
466
|
+
declare function numKeys(data: any): number;
|
|
467
|
+
declare const getParsedType: (data: any) => ParsedTypes;
|
|
468
|
+
declare const propertyKeyTypes: Set<string>;
|
|
469
|
+
declare const primitiveTypes: Set<string>;
|
|
470
|
+
declare function escapeRegex(str: string): string;
|
|
471
|
+
declare function clone<T extends $ZodType>(inst: T, def?: T["_zod"]["def"], params?: {
|
|
472
|
+
parent: boolean;
|
|
473
|
+
}): T;
|
|
341
474
|
type EmptyToNever<T> = keyof T extends never ? never : T;
|
|
475
|
+
type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{ [k in keyof Omit$1<T, "error" | "message">]: T[k]; } & ("error" extends keyof T ? {
|
|
476
|
+
error?: Exclude<T["error"], string>;
|
|
477
|
+
} : unknown)> : never;
|
|
478
|
+
declare function normalizeParams<T>(_params: T): Normalize<T>;
|
|
479
|
+
declare function createTransparentProxy<T extends object>(getter: () => T): T;
|
|
480
|
+
declare function stringifyPrimitive(value: any): string;
|
|
481
|
+
declare function optionalKeys(shape: $ZodShape): string[];
|
|
482
|
+
type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;
|
|
483
|
+
type ToCleanMap<T extends $ZodLooseShape> = { [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k; };
|
|
484
|
+
type FromCleanMap<T extends $ZodLooseShape> = { [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k; };
|
|
485
|
+
declare const NUMBER_FORMAT_RANGES: Record<$ZodNumberFormats, [number, number]>;
|
|
486
|
+
declare const BIGINT_FORMAT_RANGES: Record<$ZodBigIntFormats, [bigint, bigint]>;
|
|
487
|
+
declare function pick(schema: $ZodObject, mask: Record<string, unknown>): any;
|
|
488
|
+
declare function omit(schema: $ZodObject, mask: object): any;
|
|
489
|
+
declare function extend(schema: $ZodObject, shape: $ZodShape): any;
|
|
490
|
+
declare function safeExtend(schema: $ZodObject, shape: $ZodShape): any;
|
|
491
|
+
declare function merge(a: $ZodObject, b: $ZodObject): any;
|
|
492
|
+
declare function partial(Class: SchemaClass<$ZodOptional> | null, schema: $ZodObject, mask: object | undefined): any;
|
|
493
|
+
declare function required(Class: SchemaClass<$ZodNonOptional>, schema: $ZodObject, mask: object | undefined): any;
|
|
494
|
+
type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;
|
|
495
|
+
declare function aborted(x: ParsePayload, startIndex?: number): boolean;
|
|
496
|
+
declare function explicitlyAborted(x: ParsePayload, startIndex?: number): boolean;
|
|
497
|
+
declare function prefixIssues(path: PropertyKey, issues: $ZodRawIssue[]): $ZodRawIssue[];
|
|
498
|
+
declare function unwrapMessage(message: string | {
|
|
499
|
+
message: string;
|
|
500
|
+
} | undefined | null): string | undefined;
|
|
501
|
+
declare function finalizeIssue(iss: $ZodRawIssue, ctx: ParseContextInternal | undefined, config: $ZodConfig): $ZodIssue;
|
|
502
|
+
declare function getSizableOrigin(input: any): "set" | "map" | "file" | "unknown";
|
|
503
|
+
declare function getLengthableOrigin(input: any): "array" | "string" | "unknown";
|
|
504
|
+
declare function parsedType(data: unknown): $ZodInvalidTypeExpected;
|
|
505
|
+
declare function issue(_iss: string, input: any, inst: any): $ZodRawIssue;
|
|
506
|
+
declare function issue(_iss: $ZodRawIssue): $ZodRawIssue;
|
|
507
|
+
declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];
|
|
508
|
+
declare function base64ToUint8Array(base64: string): InstanceType<typeof Uint8Array>;
|
|
509
|
+
declare function uint8ArrayToBase64(bytes: Uint8Array): string;
|
|
510
|
+
declare function base64urlToUint8Array(base64url: string): InstanceType<typeof Uint8Array>;
|
|
511
|
+
declare function uint8ArrayToBase64url(bytes: Uint8Array): string;
|
|
512
|
+
declare function hexToUint8Array(hex: string): InstanceType<typeof Uint8Array>;
|
|
513
|
+
declare function uint8ArrayToHex(bytes: Uint8Array): string;
|
|
342
514
|
declare abstract class Class {
|
|
343
515
|
constructor(..._args: any[]);
|
|
344
516
|
}
|
|
@@ -349,8 +521,9 @@ declare const version: {
|
|
|
349
521
|
readonly minor: 4;
|
|
350
522
|
readonly patch: number;
|
|
351
523
|
};
|
|
352
|
-
|
|
353
|
-
|
|
524
|
+
declare namespace schemas_d_exports {
|
|
525
|
+
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, $ZodPreprocess, $ZodPreprocessDef, $ZodPreprocessInternals, $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, ParseContext, ParseContextInternal, ParsePayload, SomeType, ToTemplateLiteral, _$ZodType, _$ZodTypeInternals, clone, isValidBase64, isValidBase64URL, isValidJWT };
|
|
526
|
+
}
|
|
354
527
|
interface ParseContext<T extends $ZodIssueBase = never> {
|
|
355
528
|
/** Customize error messages. */
|
|
356
529
|
readonly error?: $ZodErrorMap<T>;
|
|
@@ -474,6 +647,7 @@ interface $ZodStringFormat<Format extends string = string> extends $ZodType {
|
|
|
474
647
|
_zod: $ZodStringFormatInternals<Format>;
|
|
475
648
|
}
|
|
476
649
|
declare const $ZodStringFormat: $constructor<$ZodStringFormat>;
|
|
650
|
+
interface $ZodGUIDDef extends $ZodStringFormatDef<"guid"> {}
|
|
477
651
|
interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {}
|
|
478
652
|
interface $ZodGUID extends $ZodType {
|
|
479
653
|
_zod: $ZodGUIDInternals;
|
|
@@ -489,6 +663,7 @@ interface $ZodUUID extends $ZodType {
|
|
|
489
663
|
_zod: $ZodUUIDInternals;
|
|
490
664
|
}
|
|
491
665
|
declare const $ZodUUID: $constructor<$ZodUUID>;
|
|
666
|
+
interface $ZodEmailDef extends $ZodStringFormatDef<"email"> {}
|
|
492
667
|
interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {}
|
|
493
668
|
interface $ZodEmail extends $ZodType {
|
|
494
669
|
_zod: $ZodEmailInternals;
|
|
@@ -506,16 +681,24 @@ interface $ZodURL extends $ZodType {
|
|
|
506
681
|
_zod: $ZodURLInternals;
|
|
507
682
|
}
|
|
508
683
|
declare const $ZodURL: $constructor<$ZodURL>;
|
|
684
|
+
interface $ZodEmojiDef extends $ZodStringFormatDef<"emoji"> {}
|
|
509
685
|
interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {}
|
|
510
686
|
interface $ZodEmoji extends $ZodType {
|
|
511
687
|
_zod: $ZodEmojiInternals;
|
|
512
688
|
}
|
|
513
689
|
declare const $ZodEmoji: $constructor<$ZodEmoji>;
|
|
690
|
+
interface $ZodNanoIDDef extends $ZodStringFormatDef<"nanoid"> {}
|
|
514
691
|
interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {}
|
|
515
692
|
interface $ZodNanoID extends $ZodType {
|
|
516
693
|
_zod: $ZodNanoIDInternals;
|
|
517
694
|
}
|
|
518
695
|
declare const $ZodNanoID: $constructor<$ZodNanoID>;
|
|
696
|
+
/**
|
|
697
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
698
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
699
|
+
* See https://github.com/paralleldrive/cuid.
|
|
700
|
+
*/
|
|
701
|
+
interface $ZodCUIDDef extends $ZodStringFormatDef<"cuid"> {}
|
|
519
702
|
/**
|
|
520
703
|
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
521
704
|
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
@@ -536,21 +719,25 @@ interface $ZodCUID extends $ZodType {
|
|
|
536
719
|
* See https://github.com/paralleldrive/cuid.
|
|
537
720
|
*/
|
|
538
721
|
declare const $ZodCUID: $constructor<$ZodCUID>;
|
|
722
|
+
interface $ZodCUID2Def extends $ZodStringFormatDef<"cuid2"> {}
|
|
539
723
|
interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
|
|
540
724
|
interface $ZodCUID2 extends $ZodType {
|
|
541
725
|
_zod: $ZodCUID2Internals;
|
|
542
726
|
}
|
|
543
727
|
declare const $ZodCUID2: $constructor<$ZodCUID2>;
|
|
728
|
+
interface $ZodULIDDef extends $ZodStringFormatDef<"ulid"> {}
|
|
544
729
|
interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {}
|
|
545
730
|
interface $ZodULID extends $ZodType {
|
|
546
731
|
_zod: $ZodULIDInternals;
|
|
547
732
|
}
|
|
548
733
|
declare const $ZodULID: $constructor<$ZodULID>;
|
|
734
|
+
interface $ZodXIDDef extends $ZodStringFormatDef<"xid"> {}
|
|
549
735
|
interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {}
|
|
550
736
|
interface $ZodXID extends $ZodType {
|
|
551
737
|
_zod: $ZodXIDInternals;
|
|
552
738
|
}
|
|
553
739
|
declare const $ZodXID: $constructor<$ZodXID>;
|
|
740
|
+
interface $ZodKSUIDDef extends $ZodStringFormatDef<"ksuid"> {}
|
|
554
741
|
interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {}
|
|
555
742
|
interface $ZodKSUID extends $ZodType {
|
|
556
743
|
_zod: $ZodKSUIDInternals;
|
|
@@ -568,6 +755,7 @@ interface $ZodISODateTime extends $ZodType {
|
|
|
568
755
|
_zod: $ZodISODateTimeInternals;
|
|
569
756
|
}
|
|
570
757
|
declare const $ZodISODateTime: $constructor<$ZodISODateTime>;
|
|
758
|
+
interface $ZodISODateDef extends $ZodStringFormatDef<"date"> {}
|
|
571
759
|
interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {}
|
|
572
760
|
interface $ZodISODate extends $ZodType {
|
|
573
761
|
_zod: $ZodISODateInternals;
|
|
@@ -583,6 +771,7 @@ interface $ZodISOTime extends $ZodType {
|
|
|
583
771
|
_zod: $ZodISOTimeInternals;
|
|
584
772
|
}
|
|
585
773
|
declare const $ZodISOTime: $constructor<$ZodISOTime>;
|
|
774
|
+
interface $ZodISODurationDef extends $ZodStringFormatDef<"duration"> {}
|
|
586
775
|
interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {}
|
|
587
776
|
interface $ZodISODuration extends $ZodType {
|
|
588
777
|
_zod: $ZodISODurationInternals;
|
|
@@ -608,6 +797,16 @@ interface $ZodIPv6 extends $ZodType {
|
|
|
608
797
|
_zod: $ZodIPv6Internals;
|
|
609
798
|
}
|
|
610
799
|
declare const $ZodIPv6: $constructor<$ZodIPv6>;
|
|
800
|
+
interface $ZodMACDef extends $ZodStringFormatDef<"mac"> {
|
|
801
|
+
delimiter?: string;
|
|
802
|
+
}
|
|
803
|
+
interface $ZodMACInternals extends $ZodStringFormatInternals<"mac"> {
|
|
804
|
+
def: $ZodMACDef;
|
|
805
|
+
}
|
|
806
|
+
interface $ZodMAC extends $ZodType {
|
|
807
|
+
_zod: $ZodMACInternals;
|
|
808
|
+
}
|
|
809
|
+
declare const $ZodMAC: $constructor<$ZodMAC>;
|
|
611
810
|
interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
|
|
612
811
|
version?: "v4";
|
|
613
812
|
}
|
|
@@ -628,21 +827,27 @@ interface $ZodCIDRv6 extends $ZodType {
|
|
|
628
827
|
_zod: $ZodCIDRv6Internals;
|
|
629
828
|
}
|
|
630
829
|
declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>;
|
|
830
|
+
declare function isValidBase64(data: string): boolean;
|
|
831
|
+
interface $ZodBase64Def extends $ZodStringFormatDef<"base64"> {}
|
|
631
832
|
interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {}
|
|
632
833
|
interface $ZodBase64 extends $ZodType {
|
|
633
834
|
_zod: $ZodBase64Internals;
|
|
634
835
|
}
|
|
635
836
|
declare const $ZodBase64: $constructor<$ZodBase64>;
|
|
837
|
+
declare function isValidBase64URL(data: string): boolean;
|
|
838
|
+
interface $ZodBase64URLDef extends $ZodStringFormatDef<"base64url"> {}
|
|
636
839
|
interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {}
|
|
637
840
|
interface $ZodBase64URL extends $ZodType {
|
|
638
841
|
_zod: $ZodBase64URLInternals;
|
|
639
842
|
}
|
|
640
843
|
declare const $ZodBase64URL: $constructor<$ZodBase64URL>;
|
|
844
|
+
interface $ZodE164Def extends $ZodStringFormatDef<"e164"> {}
|
|
641
845
|
interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {}
|
|
642
846
|
interface $ZodE164 extends $ZodType {
|
|
643
847
|
_zod: $ZodE164Internals;
|
|
644
848
|
}
|
|
645
849
|
declare const $ZodE164: $constructor<$ZodE164>;
|
|
850
|
+
declare function isValidJWT(token: string, algorithm?: JWTAlgorithm | null): boolean;
|
|
646
851
|
interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
|
|
647
852
|
alg?: JWTAlgorithm | undefined;
|
|
648
853
|
}
|
|
@@ -653,6 +858,16 @@ interface $ZodJWT extends $ZodType {
|
|
|
653
858
|
_zod: $ZodJWTInternals;
|
|
654
859
|
}
|
|
655
860
|
declare const $ZodJWT: $constructor<$ZodJWT>;
|
|
861
|
+
interface $ZodCustomStringFormatDef<Format extends string = string> extends $ZodStringFormatDef<Format> {
|
|
862
|
+
fn: (val: string) => unknown;
|
|
863
|
+
}
|
|
864
|
+
interface $ZodCustomStringFormatInternals<Format extends string = string> extends $ZodStringFormatInternals<Format> {
|
|
865
|
+
def: $ZodCustomStringFormatDef<Format>;
|
|
866
|
+
}
|
|
867
|
+
interface $ZodCustomStringFormat<Format extends string = string> extends $ZodStringFormat<Format> {
|
|
868
|
+
_zod: $ZodCustomStringFormatInternals<Format>;
|
|
869
|
+
}
|
|
870
|
+
declare const $ZodCustomStringFormat: $constructor<$ZodCustomStringFormat>;
|
|
656
871
|
interface $ZodNumberDef extends $ZodTypeDef {
|
|
657
872
|
type: "number";
|
|
658
873
|
coerce?: boolean;
|
|
@@ -681,6 +896,10 @@ interface $ZodNumberFormatInternals extends $ZodNumberInternals<number>, $ZodChe
|
|
|
681
896
|
def: $ZodNumberFormatDef;
|
|
682
897
|
isst: $ZodIssueInvalidType;
|
|
683
898
|
}
|
|
899
|
+
interface $ZodNumberFormat extends $ZodType {
|
|
900
|
+
_zod: $ZodNumberFormatInternals;
|
|
901
|
+
}
|
|
902
|
+
declare const $ZodNumberFormat: $constructor<$ZodNumberFormat>;
|
|
684
903
|
interface $ZodBooleanDef extends $ZodTypeDef {
|
|
685
904
|
type: "boolean";
|
|
686
905
|
coerce?: boolean;
|
|
@@ -714,6 +933,16 @@ interface $ZodBigInt<T = unknown> extends $ZodType {
|
|
|
714
933
|
_zod: $ZodBigIntInternals<T>;
|
|
715
934
|
}
|
|
716
935
|
declare const $ZodBigInt: $constructor<$ZodBigInt>;
|
|
936
|
+
interface $ZodBigIntFormatDef extends $ZodBigIntDef, $ZodCheckBigIntFormatDef {
|
|
937
|
+
check: "bigint_format";
|
|
938
|
+
}
|
|
939
|
+
interface $ZodBigIntFormatInternals extends $ZodBigIntInternals<bigint>, $ZodCheckBigIntFormatInternals {
|
|
940
|
+
def: $ZodBigIntFormatDef;
|
|
941
|
+
}
|
|
942
|
+
interface $ZodBigIntFormat extends $ZodType {
|
|
943
|
+
_zod: $ZodBigIntFormatInternals;
|
|
944
|
+
}
|
|
945
|
+
declare const $ZodBigIntFormat: $constructor<$ZodBigIntFormat>;
|
|
717
946
|
interface $ZodSymbolDef extends $ZodTypeDef {
|
|
718
947
|
type: "symbol";
|
|
719
948
|
}
|
|
@@ -885,6 +1114,7 @@ interface $ZodObject<
|
|
|
885
1114
|
/** @ts-ignore Cast variance */
|
|
886
1115
|
out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {}
|
|
887
1116
|
declare const $ZodObject: $constructor<$ZodObject>;
|
|
1117
|
+
declare const $ZodObjectJIT: $constructor<$ZodObject>;
|
|
888
1118
|
type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
|
|
889
1119
|
type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
|
|
890
1120
|
interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
|
|
@@ -908,6 +1138,23 @@ interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends
|
|
|
908
1138
|
_zod: $ZodUnionInternals<T>;
|
|
909
1139
|
}
|
|
910
1140
|
declare const $ZodUnion: $constructor<$ZodUnion>;
|
|
1141
|
+
interface $ZodXorInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodUnionInternals<T> {}
|
|
1142
|
+
interface $ZodXor<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodXorInternals<T>> {
|
|
1143
|
+
_zod: $ZodXorInternals<T>;
|
|
1144
|
+
}
|
|
1145
|
+
declare const $ZodXor: $constructor<$ZodXor>;
|
|
1146
|
+
interface $ZodDiscriminatedUnionDef<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionDef<Options> {
|
|
1147
|
+
discriminator: Disc;
|
|
1148
|
+
unionFallback?: boolean;
|
|
1149
|
+
}
|
|
1150
|
+
interface $ZodDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionInternals<Options> {
|
|
1151
|
+
def: $ZodDiscriminatedUnionDef<Options, Disc>;
|
|
1152
|
+
propValues: PropValues;
|
|
1153
|
+
}
|
|
1154
|
+
interface $ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodType {
|
|
1155
|
+
_zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
|
|
1156
|
+
}
|
|
1157
|
+
declare const $ZodDiscriminatedUnion: $constructor<$ZodDiscriminatedUnion>;
|
|
911
1158
|
interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
912
1159
|
type: "intersection";
|
|
913
1160
|
left: Left;
|
|
@@ -1032,6 +1279,9 @@ interface $ZodLiteral<T extends Literal = Literal> extends $ZodType {
|
|
|
1032
1279
|
_zod: $ZodLiteralInternals<T>;
|
|
1033
1280
|
}
|
|
1034
1281
|
declare const $ZodLiteral: $constructor<$ZodLiteral>;
|
|
1282
|
+
type _File = typeof globalThis extends {
|
|
1283
|
+
File: infer F extends new (...args: any[]) => any;
|
|
1284
|
+
} ? InstanceType<F> : {};
|
|
1035
1285
|
/** Do not reference this directly. */
|
|
1036
1286
|
interface File extends _File {
|
|
1037
1287
|
readonly type: string;
|
|
@@ -1226,6 +1476,35 @@ interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType>
|
|
|
1226
1476
|
_zod: $ZodPipeInternals<A, B>;
|
|
1227
1477
|
}
|
|
1228
1478
|
declare const $ZodPipe: $constructor<$ZodPipe>;
|
|
1479
|
+
interface $ZodCodecDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodPipeDef<A, B> {
|
|
1480
|
+
transform: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
|
|
1481
|
+
reverseTransform: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
|
|
1482
|
+
}
|
|
1483
|
+
interface $ZodCodecInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
|
|
1484
|
+
def: $ZodCodecDef<A, B>;
|
|
1485
|
+
isst: never;
|
|
1486
|
+
values: A["_zod"]["values"];
|
|
1487
|
+
optin: A["_zod"]["optin"];
|
|
1488
|
+
optout: B["_zod"]["optout"];
|
|
1489
|
+
propValues: A["_zod"]["propValues"];
|
|
1490
|
+
}
|
|
1491
|
+
interface $ZodCodec<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
1492
|
+
_zod: $ZodCodecInternals<A, B>;
|
|
1493
|
+
}
|
|
1494
|
+
declare const $ZodCodec: $constructor<$ZodCodec>;
|
|
1495
|
+
interface $ZodPreprocessDef<B extends SomeType = $ZodType> extends $ZodPipeDef<$ZodTransform, B> {
|
|
1496
|
+
in: $ZodTransform;
|
|
1497
|
+
out: B;
|
|
1498
|
+
}
|
|
1499
|
+
interface $ZodPreprocessInternals<B extends SomeType = $ZodType> extends $ZodPipeInternals<$ZodTransform, B> {
|
|
1500
|
+
def: $ZodPreprocessDef<B>;
|
|
1501
|
+
optin: B["_zod"]["optin"];
|
|
1502
|
+
optout: B["_zod"]["optout"];
|
|
1503
|
+
}
|
|
1504
|
+
interface $ZodPreprocess<B extends SomeType = $ZodType> extends $ZodPipe<$ZodTransform, B> {
|
|
1505
|
+
_zod: $ZodPreprocessInternals<B>;
|
|
1506
|
+
}
|
|
1507
|
+
declare const $ZodPreprocess: $constructor<$ZodPreprocess>;
|
|
1229
1508
|
interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1230
1509
|
type: "readonly";
|
|
1231
1510
|
innerType: T;
|
|
@@ -1263,6 +1542,12 @@ interface SchemaPart extends $ZodType {
|
|
|
1263
1542
|
_zod: SchemaPartInternals;
|
|
1264
1543
|
}
|
|
1265
1544
|
type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
|
|
1545
|
+
type UndefinedToEmptyString<T> = T extends undefined ? "" : T;
|
|
1546
|
+
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;
|
|
1547
|
+
type ConcatenateTupleOfStrings<T extends string[]> = T extends [infer First extends string, ...infer Rest extends string[]] ? Rest extends string[] ? First extends "" ? ConcatenateTupleOfStrings<Rest> : `${First}${ConcatenateTupleOfStrings<Rest>}` : never : "";
|
|
1548
|
+
type ConvertPartsToStringTuple<Parts extends $ZodTemplateLiteralPart[]> = { [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; };
|
|
1549
|
+
type ToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = ConcatenateTupleOfStrings<ConvertPartsToStringTuple<Parts>>;
|
|
1550
|
+
type $PartsToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = [] extends Parts ? `` : Parts extends [...infer Rest, infer Last extends $ZodTemplateLiteralPart] ? Rest extends $ZodTemplateLiteralPart[] ? AppendToTemplateLiteral<$PartsToTemplateLiteral<Rest>, Last> : never : never;
|
|
1266
1551
|
declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
|
|
1267
1552
|
type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
|
|
1268
1553
|
type $ZodFunctionIn = $ZodFunctionArgs;
|
|
@@ -1292,6 +1577,10 @@ interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns ext
|
|
|
1292
1577
|
input(...args: any[]): $ZodFunction<any, Returns>;
|
|
1293
1578
|
output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
|
|
1294
1579
|
}
|
|
1580
|
+
interface $ZodFunctionParams<I extends $ZodFunctionIn, O extends $ZodType> {
|
|
1581
|
+
input?: I;
|
|
1582
|
+
output?: O;
|
|
1583
|
+
}
|
|
1295
1584
|
declare const $ZodFunction: $constructor<$ZodFunction>;
|
|
1296
1585
|
interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1297
1586
|
type: "promise";
|
|
@@ -1344,8 +1633,10 @@ interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
|
|
|
1344
1633
|
}
|
|
1345
1634
|
declare const $ZodCustom: $constructor<$ZodCustom>;
|
|
1346
1635
|
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;
|
|
1347
|
-
|
|
1348
|
-
|
|
1636
|
+
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<HashFormat> | $ZodCustomStringFormat<"hostname">;
|
|
1637
|
+
declare namespace checks_d_exports {
|
|
1638
|
+
export { $ZodBigIntFormats, $ZodCheck, $ZodCheckBigIntFormat, $ZodCheckBigIntFormatDef, $ZodCheckBigIntFormatInternals, $ZodCheckDef, $ZodCheckEndsWith, $ZodCheckEndsWithDef, $ZodCheckEndsWithInternals, $ZodCheckGreaterThan, $ZodCheckGreaterThanDef, $ZodCheckGreaterThanInternals, $ZodCheckIncludes, $ZodCheckIncludesDef, $ZodCheckIncludesInternals, $ZodCheckInternals, $ZodCheckLengthEquals, $ZodCheckLengthEqualsDef, $ZodCheckLengthEqualsInternals, $ZodCheckLessThan, $ZodCheckLessThanDef, $ZodCheckLessThanInternals, $ZodCheckLowerCase, $ZodCheckLowerCaseDef, $ZodCheckLowerCaseInternals, $ZodCheckMaxLength, $ZodCheckMaxLengthDef, $ZodCheckMaxLengthInternals, $ZodCheckMaxSize, $ZodCheckMaxSizeDef, $ZodCheckMaxSizeInternals, $ZodCheckMimeType, $ZodCheckMimeTypeDef, $ZodCheckMimeTypeInternals, $ZodCheckMinLength, $ZodCheckMinLengthDef, $ZodCheckMinLengthInternals, $ZodCheckMinSize, $ZodCheckMinSizeDef, $ZodCheckMinSizeInternals, $ZodCheckMultipleOf, $ZodCheckMultipleOfDef, $ZodCheckMultipleOfInternals, $ZodCheckNumberFormat, $ZodCheckNumberFormatDef, $ZodCheckNumberFormatInternals, $ZodCheckOverwrite, $ZodCheckOverwriteDef, $ZodCheckOverwriteInternals, $ZodCheckProperty, $ZodCheckPropertyDef, $ZodCheckPropertyInternals, $ZodCheckRegex, $ZodCheckRegexDef, $ZodCheckRegexInternals, $ZodCheckSizeEquals, $ZodCheckSizeEqualsDef, $ZodCheckSizeEqualsInternals, $ZodCheckStartsWith, $ZodCheckStartsWithDef, $ZodCheckStartsWithInternals, $ZodCheckStringFormat, $ZodCheckStringFormatDef, $ZodCheckStringFormatInternals, $ZodCheckUpperCase, $ZodCheckUpperCaseDef, $ZodCheckUpperCaseInternals, $ZodChecks, $ZodNumberFormats, $ZodStringFormatChecks, $ZodStringFormats };
|
|
1639
|
+
}
|
|
1349
1640
|
interface $ZodCheckDef {
|
|
1350
1641
|
check: string;
|
|
1351
1642
|
error?: $ZodErrorMap<never> | undefined;
|
|
@@ -1416,6 +1707,55 @@ interface $ZodCheckNumberFormat extends $ZodCheck<number> {
|
|
|
1416
1707
|
_zod: $ZodCheckNumberFormatInternals;
|
|
1417
1708
|
}
|
|
1418
1709
|
declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
|
|
1710
|
+
type $ZodBigIntFormats = "int64" | "uint64";
|
|
1711
|
+
interface $ZodCheckBigIntFormatDef extends $ZodCheckDef {
|
|
1712
|
+
check: "bigint_format";
|
|
1713
|
+
format: $ZodBigIntFormats | undefined;
|
|
1714
|
+
}
|
|
1715
|
+
interface $ZodCheckBigIntFormatInternals extends $ZodCheckInternals<bigint> {
|
|
1716
|
+
def: $ZodCheckBigIntFormatDef;
|
|
1717
|
+
issc: $ZodIssueTooBig<"bigint"> | $ZodIssueTooSmall<"bigint">;
|
|
1718
|
+
}
|
|
1719
|
+
interface $ZodCheckBigIntFormat extends $ZodCheck<bigint> {
|
|
1720
|
+
_zod: $ZodCheckBigIntFormatInternals;
|
|
1721
|
+
}
|
|
1722
|
+
declare const $ZodCheckBigIntFormat: $constructor<$ZodCheckBigIntFormat>;
|
|
1723
|
+
interface $ZodCheckMaxSizeDef extends $ZodCheckDef {
|
|
1724
|
+
check: "max_size";
|
|
1725
|
+
maximum: number;
|
|
1726
|
+
}
|
|
1727
|
+
interface $ZodCheckMaxSizeInternals<T extends HasSize = HasSize> extends $ZodCheckInternals<T> {
|
|
1728
|
+
def: $ZodCheckMaxSizeDef;
|
|
1729
|
+
issc: $ZodIssueTooBig<T>;
|
|
1730
|
+
}
|
|
1731
|
+
interface $ZodCheckMaxSize<T extends HasSize = HasSize> extends $ZodCheck<T> {
|
|
1732
|
+
_zod: $ZodCheckMaxSizeInternals<T>;
|
|
1733
|
+
}
|
|
1734
|
+
declare const $ZodCheckMaxSize: $constructor<$ZodCheckMaxSize>;
|
|
1735
|
+
interface $ZodCheckMinSizeDef extends $ZodCheckDef {
|
|
1736
|
+
check: "min_size";
|
|
1737
|
+
minimum: number;
|
|
1738
|
+
}
|
|
1739
|
+
interface $ZodCheckMinSizeInternals<T extends HasSize = HasSize> extends $ZodCheckInternals<T> {
|
|
1740
|
+
def: $ZodCheckMinSizeDef;
|
|
1741
|
+
issc: $ZodIssueTooSmall<T>;
|
|
1742
|
+
}
|
|
1743
|
+
interface $ZodCheckMinSize<T extends HasSize = HasSize> extends $ZodCheck<T> {
|
|
1744
|
+
_zod: $ZodCheckMinSizeInternals<T>;
|
|
1745
|
+
}
|
|
1746
|
+
declare const $ZodCheckMinSize: $constructor<$ZodCheckMinSize>;
|
|
1747
|
+
interface $ZodCheckSizeEqualsDef extends $ZodCheckDef {
|
|
1748
|
+
check: "size_equals";
|
|
1749
|
+
size: number;
|
|
1750
|
+
}
|
|
1751
|
+
interface $ZodCheckSizeEqualsInternals<T extends HasSize = HasSize> extends $ZodCheckInternals<T> {
|
|
1752
|
+
def: $ZodCheckSizeEqualsDef;
|
|
1753
|
+
issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
|
|
1754
|
+
}
|
|
1755
|
+
interface $ZodCheckSizeEquals<T extends HasSize = HasSize> extends $ZodCheck<T> {
|
|
1756
|
+
_zod: $ZodCheckSizeEqualsInternals<T>;
|
|
1757
|
+
}
|
|
1758
|
+
declare const $ZodCheckSizeEquals: $constructor<$ZodCheckSizeEquals>;
|
|
1419
1759
|
interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
|
|
1420
1760
|
check: "max_length";
|
|
1421
1761
|
maximum: number;
|
|
@@ -1462,6 +1802,10 @@ interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
|
|
|
1462
1802
|
def: $ZodCheckStringFormatDef;
|
|
1463
1803
|
issc: $ZodIssueInvalidStringFormat;
|
|
1464
1804
|
}
|
|
1805
|
+
interface $ZodCheckStringFormat extends $ZodCheck<string> {
|
|
1806
|
+
_zod: $ZodCheckStringFormatInternals;
|
|
1807
|
+
}
|
|
1808
|
+
declare const $ZodCheckStringFormat: $constructor<$ZodCheckStringFormat>;
|
|
1465
1809
|
interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
|
|
1466
1810
|
format: "regex";
|
|
1467
1811
|
pattern: RegExp;
|
|
@@ -1526,8 +1870,48 @@ interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
|
|
|
1526
1870
|
_zod: $ZodCheckEndsWithInternals;
|
|
1527
1871
|
}
|
|
1528
1872
|
declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
|
|
1529
|
-
|
|
1530
|
-
|
|
1873
|
+
interface $ZodCheckPropertyDef extends $ZodCheckDef {
|
|
1874
|
+
check: "property";
|
|
1875
|
+
property: string;
|
|
1876
|
+
schema: $ZodType;
|
|
1877
|
+
}
|
|
1878
|
+
interface $ZodCheckPropertyInternals<T extends object = object> extends $ZodCheckInternals<T> {
|
|
1879
|
+
def: $ZodCheckPropertyDef;
|
|
1880
|
+
issc: $ZodIssue;
|
|
1881
|
+
}
|
|
1882
|
+
interface $ZodCheckProperty<T extends object = object> extends $ZodCheck<T> {
|
|
1883
|
+
_zod: $ZodCheckPropertyInternals<T>;
|
|
1884
|
+
}
|
|
1885
|
+
declare const $ZodCheckProperty: $constructor<$ZodCheckProperty>;
|
|
1886
|
+
interface $ZodCheckMimeTypeDef extends $ZodCheckDef {
|
|
1887
|
+
check: "mime_type";
|
|
1888
|
+
mime: MimeTypes[];
|
|
1889
|
+
}
|
|
1890
|
+
interface $ZodCheckMimeTypeInternals<T extends File = File> extends $ZodCheckInternals<T> {
|
|
1891
|
+
def: $ZodCheckMimeTypeDef;
|
|
1892
|
+
issc: $ZodIssueInvalidValue;
|
|
1893
|
+
}
|
|
1894
|
+
interface $ZodCheckMimeType<T extends File = File> extends $ZodCheck<T> {
|
|
1895
|
+
_zod: $ZodCheckMimeTypeInternals<T>;
|
|
1896
|
+
}
|
|
1897
|
+
declare const $ZodCheckMimeType: $constructor<$ZodCheckMimeType>;
|
|
1898
|
+
interface $ZodCheckOverwriteDef<T = unknown> extends $ZodCheckDef {
|
|
1899
|
+
check: "overwrite";
|
|
1900
|
+
tx(value: T): T;
|
|
1901
|
+
}
|
|
1902
|
+
interface $ZodCheckOverwriteInternals<T = unknown> extends $ZodCheckInternals<T> {
|
|
1903
|
+
def: $ZodCheckOverwriteDef<T>;
|
|
1904
|
+
issc: never;
|
|
1905
|
+
}
|
|
1906
|
+
interface $ZodCheckOverwrite<T = unknown> extends $ZodCheck<T> {
|
|
1907
|
+
_zod: $ZodCheckOverwriteInternals<T>;
|
|
1908
|
+
}
|
|
1909
|
+
declare const $ZodCheckOverwrite: $constructor<$ZodCheckOverwrite>;
|
|
1910
|
+
type $ZodChecks = $ZodCheckLessThan | $ZodCheckGreaterThan | $ZodCheckMultipleOf | $ZodCheckNumberFormat | $ZodCheckBigIntFormat | $ZodCheckMaxSize | $ZodCheckMinSize | $ZodCheckSizeEquals | $ZodCheckMaxLength | $ZodCheckMinLength | $ZodCheckLengthEquals | $ZodCheckStringFormat | $ZodCheckProperty | $ZodCheckMimeType | $ZodCheckOverwrite;
|
|
1911
|
+
type $ZodStringFormatChecks = $ZodCheckRegex | $ZodCheckLowerCase | $ZodCheckUpperCase | $ZodCheckIncludes | $ZodCheckStartsWith | $ZodCheckEndsWith | $ZodStringFormatTypes;
|
|
1912
|
+
declare namespace errors_d_exports {
|
|
1913
|
+
export { $ZodError, $ZodErrorMap, $ZodErrorTree, $ZodFlattenedError, $ZodFormattedError, $ZodInternalIssue, $ZodInvalidTypeExpected, $ZodIssue, $ZodIssueBase, $ZodIssueCode, $ZodIssueCustom, $ZodIssueInvalidElement, $ZodIssueInvalidKey, $ZodIssueInvalidStringFormat, $ZodIssueInvalidType, $ZodIssueInvalidUnion, $ZodIssueInvalidValue, $ZodIssueNotMultipleOf, $ZodIssueStringCommonFormats, $ZodIssueStringEndsWith, $ZodIssueStringIncludes, $ZodIssueStringInvalidJWT, $ZodIssueStringInvalidRegex, $ZodIssueStringStartsWith, $ZodIssueTooBig, $ZodIssueTooSmall, $ZodIssueUnrecognizedKeys, $ZodRawIssue, $ZodRealError, $ZodStringFormatIssues, flattenError, formatError, prettifyError, toDotPath, treeifyError };
|
|
1914
|
+
}
|
|
1531
1915
|
interface $ZodIssueBase {
|
|
1532
1916
|
readonly code?: string;
|
|
1533
1917
|
readonly input?: unknown;
|
|
@@ -1613,7 +1997,32 @@ interface $ZodIssueCustom extends $ZodIssueBase {
|
|
|
1613
1997
|
readonly params?: Record<string, any> | undefined;
|
|
1614
1998
|
readonly input?: unknown;
|
|
1615
1999
|
}
|
|
2000
|
+
interface $ZodIssueStringCommonFormats extends $ZodIssueInvalidStringFormat {
|
|
2001
|
+
format: Exclude<$ZodStringFormats, "regex" | "jwt" | "starts_with" | "ends_with" | "includes">;
|
|
2002
|
+
}
|
|
2003
|
+
interface $ZodIssueStringInvalidRegex extends $ZodIssueInvalidStringFormat {
|
|
2004
|
+
format: "regex";
|
|
2005
|
+
pattern: string;
|
|
2006
|
+
}
|
|
2007
|
+
interface $ZodIssueStringInvalidJWT extends $ZodIssueInvalidStringFormat {
|
|
2008
|
+
format: "jwt";
|
|
2009
|
+
algorithm?: string;
|
|
2010
|
+
}
|
|
2011
|
+
interface $ZodIssueStringStartsWith extends $ZodIssueInvalidStringFormat {
|
|
2012
|
+
format: "starts_with";
|
|
2013
|
+
prefix: string;
|
|
2014
|
+
}
|
|
2015
|
+
interface $ZodIssueStringEndsWith extends $ZodIssueInvalidStringFormat {
|
|
2016
|
+
format: "ends_with";
|
|
2017
|
+
suffix: string;
|
|
2018
|
+
}
|
|
2019
|
+
interface $ZodIssueStringIncludes extends $ZodIssueInvalidStringFormat {
|
|
2020
|
+
format: "includes";
|
|
2021
|
+
includes: string;
|
|
2022
|
+
}
|
|
2023
|
+
type $ZodStringFormatIssues = $ZodIssueStringCommonFormats | $ZodIssueStringInvalidRegex | $ZodIssueStringInvalidJWT | $ZodIssueStringStartsWith | $ZodIssueStringEndsWith | $ZodIssueStringIncludes;
|
|
1616
2024
|
type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
|
|
2025
|
+
type $ZodIssueCode = $ZodIssue["code"];
|
|
1617
2026
|
type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
|
|
1618
2027
|
type RawIssue$1<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
|
|
1619
2028
|
/** The input data */
|
|
@@ -1640,19 +2049,76 @@ interface $ZodError<T = unknown> extends Error {
|
|
|
1640
2049
|
name: string;
|
|
1641
2050
|
}
|
|
1642
2051
|
declare const $ZodError: $constructor<$ZodError>;
|
|
2052
|
+
interface $ZodRealError<T = any> extends $ZodError<T> {}
|
|
2053
|
+
declare const $ZodRealError: $constructor<$ZodRealError>;
|
|
1643
2054
|
type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
|
|
1644
2055
|
type _FlattenedError<T, U = string> = {
|
|
1645
2056
|
formErrors: U[];
|
|
1646
2057
|
fieldErrors: { [P in keyof T]?: U[]; };
|
|
1647
2058
|
};
|
|
2059
|
+
declare function flattenError<T>(error: $ZodError<T>): _FlattenedError<T>;
|
|
2060
|
+
declare function flattenError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): _FlattenedError<T, U>;
|
|
1648
2061
|
type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U>; } : T extends any[] ? {
|
|
1649
2062
|
[k: number]: $ZodFormattedError<T[number], U>;
|
|
1650
2063
|
} : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U>; }> : any;
|
|
1651
2064
|
type $ZodFormattedError<T, U = string> = {
|
|
1652
2065
|
_errors: U[];
|
|
1653
2066
|
} & Flatten<_ZodFormattedError<T, U>>;
|
|
1654
|
-
|
|
1655
|
-
|
|
2067
|
+
declare function formatError<T>(error: $ZodError<T>): $ZodFormattedError<T>;
|
|
2068
|
+
declare function formatError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
|
|
2069
|
+
type $ZodErrorTree<T, U = string> = T extends Primitive ? {
|
|
2070
|
+
errors: U[];
|
|
2071
|
+
} : T extends [any, ...any[]] ? {
|
|
2072
|
+
errors: U[];
|
|
2073
|
+
items?: { [K in keyof T]?: $ZodErrorTree<T[K], U>; };
|
|
2074
|
+
} : T extends any[] ? {
|
|
2075
|
+
errors: U[];
|
|
2076
|
+
items?: Array<$ZodErrorTree<T[number], U>>;
|
|
2077
|
+
} : T extends object ? {
|
|
2078
|
+
errors: U[];
|
|
2079
|
+
properties?: { [K in keyof T]?: $ZodErrorTree<T[K], U>; };
|
|
2080
|
+
} : {
|
|
2081
|
+
errors: U[];
|
|
2082
|
+
};
|
|
2083
|
+
declare function treeifyError<T>(error: $ZodError<T>): $ZodErrorTree<T>;
|
|
2084
|
+
declare function treeifyError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodErrorTree<T, U>;
|
|
2085
|
+
/** Format a ZodError as a human-readable string in the following form.
|
|
2086
|
+
*
|
|
2087
|
+
* From
|
|
2088
|
+
*
|
|
2089
|
+
* ```ts
|
|
2090
|
+
* ZodError {
|
|
2091
|
+
* issues: [
|
|
2092
|
+
* {
|
|
2093
|
+
* expected: 'string',
|
|
2094
|
+
* code: 'invalid_type',
|
|
2095
|
+
* path: [ 'username' ],
|
|
2096
|
+
* message: 'Invalid input: expected string'
|
|
2097
|
+
* },
|
|
2098
|
+
* {
|
|
2099
|
+
* expected: 'number',
|
|
2100
|
+
* code: 'invalid_type',
|
|
2101
|
+
* path: [ 'favoriteNumbers', 1 ],
|
|
2102
|
+
* message: 'Invalid input: expected number'
|
|
2103
|
+
* }
|
|
2104
|
+
* ];
|
|
2105
|
+
* }
|
|
2106
|
+
* ```
|
|
2107
|
+
*
|
|
2108
|
+
* to
|
|
2109
|
+
*
|
|
2110
|
+
* ```
|
|
2111
|
+
* username
|
|
2112
|
+
* ✖ Expected number, received string at "username
|
|
2113
|
+
* favoriteNumbers[0]
|
|
2114
|
+
* ✖ Invalid input: expected number
|
|
2115
|
+
* ```
|
|
2116
|
+
*/
|
|
2117
|
+
declare function toDotPath(_path: readonly (string | number | symbol | StandardSchemaV1.PathSegment)[]): string;
|
|
2118
|
+
declare function prettifyError(error: StandardSchemaV1.FailureResult): string;
|
|
2119
|
+
declare namespace core_d_exports {
|
|
2120
|
+
export { $ZodAsyncError, $ZodBranded, $ZodConfig, $ZodEncodeError, $ZodNarrow, $brand, $constructor, NEVER, config, globalConfig, output as infer, input, output };
|
|
2121
|
+
}
|
|
1656
2122
|
type ZodTrait = {
|
|
1657
2123
|
_zod: {
|
|
1658
2124
|
def: any;
|
|
@@ -1663,6 +2129,8 @@ interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
|
|
|
1663
2129
|
new (def: D): T;
|
|
1664
2130
|
init(inst: T, def: D): asserts inst is T;
|
|
1665
2131
|
}
|
|
2132
|
+
/** A special constant with type `never` */
|
|
2133
|
+
declare const NEVER: never;
|
|
1666
2134
|
declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
|
|
1667
2135
|
Parent?: typeof Class;
|
|
1668
2136
|
}): $constructor<T, D>;
|
|
@@ -1684,6 +2152,17 @@ type $ZodBranded<T extends SomeType, Brand extends string | number | symbol, Dir
|
|
|
1684
2152
|
output: output<T> & $brand<Brand>;
|
|
1685
2153
|
};
|
|
1686
2154
|
});
|
|
2155
|
+
type $ZodNarrow<T extends SomeType, Out> = T & {
|
|
2156
|
+
_zod: {
|
|
2157
|
+
output: Out;
|
|
2158
|
+
};
|
|
2159
|
+
};
|
|
2160
|
+
declare class $ZodAsyncError extends Error {
|
|
2161
|
+
constructor();
|
|
2162
|
+
}
|
|
2163
|
+
declare class $ZodEncodeError extends Error {
|
|
2164
|
+
constructor(name: string);
|
|
2165
|
+
}
|
|
1687
2166
|
type input<T> = T extends {
|
|
1688
2167
|
_zod: {
|
|
1689
2168
|
input: any;
|
|
@@ -1694,6 +2173,427 @@ type output<T> = T extends {
|
|
|
1694
2173
|
output: any;
|
|
1695
2174
|
};
|
|
1696
2175
|
} ? T["_zod"]["output"] : unknown;
|
|
2176
|
+
interface $ZodConfig {
|
|
2177
|
+
/** Custom error map. Overrides `config().localeError`. */
|
|
2178
|
+
customError?: $ZodErrorMap | undefined;
|
|
2179
|
+
/** Localized error map. Lowest priority. */
|
|
2180
|
+
localeError?: $ZodErrorMap | undefined;
|
|
2181
|
+
/** Disable JIT schema compilation. Useful in environments that disallow `eval`. */
|
|
2182
|
+
jitless?: boolean | undefined;
|
|
2183
|
+
}
|
|
2184
|
+
declare const globalConfig: $ZodConfig;
|
|
2185
|
+
declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;
|
|
2186
|
+
//#endregion
|
|
2187
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.d.cts
|
|
2188
|
+
type $ZodErrorClass = {
|
|
2189
|
+
new (issues: $ZodIssue[]): $ZodError;
|
|
2190
|
+
};
|
|
2191
|
+
type $Parse = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
2192
|
+
callee?: AnyFunc;
|
|
2193
|
+
Err?: $ZodErrorClass;
|
|
2194
|
+
}) => output<T>;
|
|
2195
|
+
declare const _parse: (_Err: $ZodErrorClass) => $Parse;
|
|
2196
|
+
declare const parse$1: $Parse;
|
|
2197
|
+
type $ParseAsync = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
2198
|
+
callee?: AnyFunc;
|
|
2199
|
+
Err?: $ZodErrorClass;
|
|
2200
|
+
}) => Promise<output<T>>;
|
|
2201
|
+
declare const _parseAsync: (_Err: $ZodErrorClass) => $ParseAsync;
|
|
2202
|
+
declare const parseAsync$1: $ParseAsync;
|
|
2203
|
+
type $SafeParse = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => SafeParseResult<output<T>>;
|
|
2204
|
+
declare const _safeParse: (_Err: $ZodErrorClass) => $SafeParse;
|
|
2205
|
+
declare const safeParse$1: $SafeParse;
|
|
2206
|
+
type $SafeParseAsync = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => Promise<SafeParseResult<output<T>>>;
|
|
2207
|
+
declare const _safeParseAsync: (_Err: $ZodErrorClass) => $SafeParseAsync;
|
|
2208
|
+
declare const safeParseAsync$1: $SafeParseAsync;
|
|
2209
|
+
type $Encode = <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => input<T>;
|
|
2210
|
+
declare const _encode: (_Err: $ZodErrorClass) => $Encode;
|
|
2211
|
+
declare const encode$1: $Encode;
|
|
2212
|
+
type $Decode = <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => output<T>;
|
|
2213
|
+
declare const _decode: (_Err: $ZodErrorClass) => $Decode;
|
|
2214
|
+
declare const decode$1: $Decode;
|
|
2215
|
+
type $EncodeAsync = <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<input<T>>;
|
|
2216
|
+
declare const _encodeAsync: (_Err: $ZodErrorClass) => $EncodeAsync;
|
|
2217
|
+
declare const encodeAsync$1: $EncodeAsync;
|
|
2218
|
+
type $DecodeAsync = <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<output<T>>;
|
|
2219
|
+
declare const _decodeAsync: (_Err: $ZodErrorClass) => $DecodeAsync;
|
|
2220
|
+
declare const decodeAsync$1: $DecodeAsync;
|
|
2221
|
+
type $SafeEncode = <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => SafeParseResult<input<T>>;
|
|
2222
|
+
declare const _safeEncode: (_Err: $ZodErrorClass) => $SafeEncode;
|
|
2223
|
+
declare const safeEncode$1: $SafeEncode;
|
|
2224
|
+
type $SafeDecode = <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => SafeParseResult<output<T>>;
|
|
2225
|
+
declare const _safeDecode: (_Err: $ZodErrorClass) => $SafeDecode;
|
|
2226
|
+
declare const safeDecode$1: $SafeDecode;
|
|
2227
|
+
type $SafeEncodeAsync = <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<SafeParseResult<input<T>>>;
|
|
2228
|
+
declare const _safeEncodeAsync: (_Err: $ZodErrorClass) => $SafeEncodeAsync;
|
|
2229
|
+
declare const safeEncodeAsync$1: $SafeEncodeAsync;
|
|
2230
|
+
type $SafeDecodeAsync = <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<SafeParseResult<output<T>>>;
|
|
2231
|
+
declare const _safeDecodeAsync: (_Err: $ZodErrorClass) => $SafeDecodeAsync;
|
|
2232
|
+
declare const safeDecodeAsync$1: $SafeDecodeAsync;
|
|
2233
|
+
declare namespace regexes_d_exports {
|
|
2234
|
+
export { base64$1 as base64, base64url$1 as base64url, bigint$2 as bigint, boolean$2 as boolean, browserEmail, cidrv4$1 as cidrv4, cidrv6$1 as cidrv6, cuid$1 as cuid, cuid2$1 as cuid2, date$3 as date, datetime$1 as datetime, domain, duration$1 as duration, e164$1 as e164, email$1 as email, emoji$1 as emoji, extendedDuration, guid$1 as guid, hex$1 as hex, hostname$1 as hostname, html5Email, httpProtocol, idnEmail, integer, ipv4$1 as ipv4, ipv6$1 as ipv6, ksuid$1 as ksuid, lowercase, mac$1 as mac, md5_base64, md5_base64url, md5_hex, nanoid$1 as nanoid, _null$2 as null, number$2 as 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$2 as string, time$1 as time, ulid$1 as ulid, _undefined$2 as undefined, unicodeEmail, uppercase, uuid$1 as uuid, uuid4, uuid6, uuid7, xid$1 as xid };
|
|
2235
|
+
}
|
|
2236
|
+
/**
|
|
2237
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
2238
|
+
* (timestamps embedded in the id). Use {@link cuid2} instead.
|
|
2239
|
+
* See https://github.com/paralleldrive/cuid.
|
|
2240
|
+
*/
|
|
2241
|
+
declare const cuid$1: RegExp;
|
|
2242
|
+
declare const cuid2$1: RegExp;
|
|
2243
|
+
declare const ulid$1: RegExp;
|
|
2244
|
+
declare const xid$1: RegExp;
|
|
2245
|
+
declare const ksuid$1: RegExp;
|
|
2246
|
+
declare const nanoid$1: RegExp;
|
|
2247
|
+
/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
|
|
2248
|
+
declare const duration$1: RegExp;
|
|
2249
|
+
/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */
|
|
2250
|
+
declare const extendedDuration: RegExp;
|
|
2251
|
+
/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
|
|
2252
|
+
declare const guid$1: RegExp;
|
|
2253
|
+
/** Returns a regex for validating an RFC 9562/4122 UUID.
|
|
2254
|
+
*
|
|
2255
|
+
* @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
|
|
2256
|
+
declare const uuid$1: (version?: number | undefined) => RegExp;
|
|
2257
|
+
declare const uuid4: RegExp;
|
|
2258
|
+
declare const uuid6: RegExp;
|
|
2259
|
+
declare const uuid7: RegExp;
|
|
2260
|
+
/** Practical email validation */
|
|
2261
|
+
declare const email$1: RegExp;
|
|
2262
|
+
/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */
|
|
2263
|
+
declare const html5Email: RegExp;
|
|
2264
|
+
/** The classic emailregex.com regex for RFC 5322-compliant emails */
|
|
2265
|
+
declare const rfc5322Email: RegExp;
|
|
2266
|
+
/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */
|
|
2267
|
+
declare const unicodeEmail: RegExp;
|
|
2268
|
+
declare const idnEmail: RegExp;
|
|
2269
|
+
declare const browserEmail: RegExp;
|
|
2270
|
+
declare function emoji$1(): RegExp;
|
|
2271
|
+
declare const ipv4$1: RegExp;
|
|
2272
|
+
declare const ipv6$1: RegExp;
|
|
2273
|
+
declare const mac$1: (delimiter?: string) => RegExp;
|
|
2274
|
+
declare const cidrv4$1: RegExp;
|
|
2275
|
+
declare const cidrv6$1: RegExp;
|
|
2276
|
+
declare const base64$1: RegExp;
|
|
2277
|
+
declare const base64url$1: RegExp;
|
|
2278
|
+
declare const hostname$1: RegExp;
|
|
2279
|
+
declare const domain: RegExp;
|
|
2280
|
+
declare const httpProtocol: RegExp;
|
|
2281
|
+
declare const e164$1: RegExp;
|
|
2282
|
+
declare const date$3: RegExp;
|
|
2283
|
+
declare function time$1(args: {
|
|
2284
|
+
precision?: number | null;
|
|
2285
|
+
}): RegExp;
|
|
2286
|
+
declare function datetime$1(args: {
|
|
2287
|
+
precision?: number | null;
|
|
2288
|
+
offset?: boolean;
|
|
2289
|
+
local?: boolean;
|
|
2290
|
+
}): RegExp;
|
|
2291
|
+
declare const string$2: (params?: {
|
|
2292
|
+
minimum?: number | undefined;
|
|
2293
|
+
maximum?: number | undefined;
|
|
2294
|
+
}) => RegExp;
|
|
2295
|
+
declare const bigint$2: RegExp;
|
|
2296
|
+
declare const integer: RegExp;
|
|
2297
|
+
declare const number$2: RegExp;
|
|
2298
|
+
declare const boolean$2: RegExp;
|
|
2299
|
+
declare const _null$2: RegExp;
|
|
2300
|
+
declare const _undefined$2: RegExp;
|
|
2301
|
+
declare const lowercase: RegExp;
|
|
2302
|
+
declare const uppercase: RegExp;
|
|
2303
|
+
declare const hex$1: RegExp;
|
|
2304
|
+
declare const md5_hex: RegExp;
|
|
2305
|
+
declare const md5_base64: RegExp;
|
|
2306
|
+
declare const md5_base64url: RegExp;
|
|
2307
|
+
declare const sha1_hex: RegExp;
|
|
2308
|
+
declare const sha1_base64: RegExp;
|
|
2309
|
+
declare const sha1_base64url: RegExp;
|
|
2310
|
+
declare const sha256_hex: RegExp;
|
|
2311
|
+
declare const sha256_base64: RegExp;
|
|
2312
|
+
declare const sha256_base64url: RegExp;
|
|
2313
|
+
declare const sha384_hex: RegExp;
|
|
2314
|
+
declare const sha384_base64: RegExp;
|
|
2315
|
+
declare const sha384_base64url: RegExp;
|
|
2316
|
+
declare const sha512_hex: RegExp;
|
|
2317
|
+
declare const sha512_base64: RegExp;
|
|
2318
|
+
declare const sha512_base64url: RegExp;
|
|
2319
|
+
//#endregion
|
|
2320
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ar.d.cts
|
|
2321
|
+
declare function _default$53(): {
|
|
2322
|
+
localeError: $ZodErrorMap;
|
|
2323
|
+
};
|
|
2324
|
+
//#endregion
|
|
2325
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/az.d.cts
|
|
2326
|
+
declare function _default$52(): {
|
|
2327
|
+
localeError: $ZodErrorMap;
|
|
2328
|
+
};
|
|
2329
|
+
//#endregion
|
|
2330
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/be.d.cts
|
|
2331
|
+
declare function _default$51(): {
|
|
2332
|
+
localeError: $ZodErrorMap;
|
|
2333
|
+
};
|
|
2334
|
+
//#endregion
|
|
2335
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/bg.d.cts
|
|
2336
|
+
declare function _default$50(): {
|
|
2337
|
+
localeError: $ZodErrorMap;
|
|
2338
|
+
};
|
|
2339
|
+
//#endregion
|
|
2340
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ca.d.cts
|
|
2341
|
+
declare function _default$49(): {
|
|
2342
|
+
localeError: $ZodErrorMap;
|
|
2343
|
+
};
|
|
2344
|
+
//#endregion
|
|
2345
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/cs.d.cts
|
|
2346
|
+
declare function _default$48(): {
|
|
2347
|
+
localeError: $ZodErrorMap;
|
|
2348
|
+
};
|
|
2349
|
+
//#endregion
|
|
2350
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/da.d.cts
|
|
2351
|
+
declare function _default$47(): {
|
|
2352
|
+
localeError: $ZodErrorMap;
|
|
2353
|
+
};
|
|
2354
|
+
//#endregion
|
|
2355
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/de.d.cts
|
|
2356
|
+
declare function _default$46(): {
|
|
2357
|
+
localeError: $ZodErrorMap;
|
|
2358
|
+
};
|
|
2359
|
+
//#endregion
|
|
2360
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/el.d.cts
|
|
2361
|
+
declare function _default$45(): {
|
|
2362
|
+
localeError: $ZodErrorMap;
|
|
2363
|
+
};
|
|
2364
|
+
//#endregion
|
|
2365
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/en.d.cts
|
|
2366
|
+
declare function _default$44(): {
|
|
2367
|
+
localeError: $ZodErrorMap;
|
|
2368
|
+
};
|
|
2369
|
+
//#endregion
|
|
2370
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/eo.d.cts
|
|
2371
|
+
declare function _default$43(): {
|
|
2372
|
+
localeError: $ZodErrorMap;
|
|
2373
|
+
};
|
|
2374
|
+
//#endregion
|
|
2375
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/es.d.cts
|
|
2376
|
+
declare function _default$42(): {
|
|
2377
|
+
localeError: $ZodErrorMap;
|
|
2378
|
+
};
|
|
2379
|
+
//#endregion
|
|
2380
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fa.d.cts
|
|
2381
|
+
declare function _default$41(): {
|
|
2382
|
+
localeError: $ZodErrorMap;
|
|
2383
|
+
};
|
|
2384
|
+
//#endregion
|
|
2385
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fi.d.cts
|
|
2386
|
+
declare function _default$40(): {
|
|
2387
|
+
localeError: $ZodErrorMap;
|
|
2388
|
+
};
|
|
2389
|
+
//#endregion
|
|
2390
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr.d.cts
|
|
2391
|
+
declare function _default$39(): {
|
|
2392
|
+
localeError: $ZodErrorMap;
|
|
2393
|
+
};
|
|
2394
|
+
//#endregion
|
|
2395
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.d.cts
|
|
2396
|
+
declare function _default$38(): {
|
|
2397
|
+
localeError: $ZodErrorMap;
|
|
2398
|
+
};
|
|
2399
|
+
//#endregion
|
|
2400
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/he.d.cts
|
|
2401
|
+
declare function _default$37(): {
|
|
2402
|
+
localeError: $ZodErrorMap;
|
|
2403
|
+
};
|
|
2404
|
+
//#endregion
|
|
2405
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hr.d.cts
|
|
2406
|
+
declare function _default$36(): {
|
|
2407
|
+
localeError: $ZodErrorMap;
|
|
2408
|
+
};
|
|
2409
|
+
//#endregion
|
|
2410
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hu.d.cts
|
|
2411
|
+
declare function _default$35(): {
|
|
2412
|
+
localeError: $ZodErrorMap;
|
|
2413
|
+
};
|
|
2414
|
+
//#endregion
|
|
2415
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hy.d.cts
|
|
2416
|
+
declare function _default$34(): {
|
|
2417
|
+
localeError: $ZodErrorMap;
|
|
2418
|
+
};
|
|
2419
|
+
//#endregion
|
|
2420
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/id.d.cts
|
|
2421
|
+
declare function _default$33(): {
|
|
2422
|
+
localeError: $ZodErrorMap;
|
|
2423
|
+
};
|
|
2424
|
+
//#endregion
|
|
2425
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/is.d.cts
|
|
2426
|
+
declare function _default$32(): {
|
|
2427
|
+
localeError: $ZodErrorMap;
|
|
2428
|
+
};
|
|
2429
|
+
//#endregion
|
|
2430
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/it.d.cts
|
|
2431
|
+
declare function _default$31(): {
|
|
2432
|
+
localeError: $ZodErrorMap;
|
|
2433
|
+
};
|
|
2434
|
+
//#endregion
|
|
2435
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ja.d.cts
|
|
2436
|
+
declare function _default$30(): {
|
|
2437
|
+
localeError: $ZodErrorMap;
|
|
2438
|
+
};
|
|
2439
|
+
//#endregion
|
|
2440
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ka.d.cts
|
|
2441
|
+
declare function _default$29(): {
|
|
2442
|
+
localeError: $ZodErrorMap;
|
|
2443
|
+
};
|
|
2444
|
+
//#endregion
|
|
2445
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/kh.d.cts
|
|
2446
|
+
declare function _default$28(): {
|
|
2447
|
+
localeError: $ZodErrorMap;
|
|
2448
|
+
};
|
|
2449
|
+
//#endregion
|
|
2450
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/km.d.cts
|
|
2451
|
+
declare function _default$27(): {
|
|
2452
|
+
localeError: $ZodErrorMap;
|
|
2453
|
+
};
|
|
2454
|
+
//#endregion
|
|
2455
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ko.d.cts
|
|
2456
|
+
declare function _default$26(): {
|
|
2457
|
+
localeError: $ZodErrorMap;
|
|
2458
|
+
};
|
|
2459
|
+
//#endregion
|
|
2460
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/lt.d.cts
|
|
2461
|
+
declare function _default$25(): {
|
|
2462
|
+
localeError: $ZodErrorMap;
|
|
2463
|
+
};
|
|
2464
|
+
//#endregion
|
|
2465
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/mk.d.cts
|
|
2466
|
+
declare function _default$24(): {
|
|
2467
|
+
localeError: $ZodErrorMap;
|
|
2468
|
+
};
|
|
2469
|
+
//#endregion
|
|
2470
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ms.d.cts
|
|
2471
|
+
declare function _default$23(): {
|
|
2472
|
+
localeError: $ZodErrorMap;
|
|
2473
|
+
};
|
|
2474
|
+
//#endregion
|
|
2475
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/nl.d.cts
|
|
2476
|
+
declare function _default$22(): {
|
|
2477
|
+
localeError: $ZodErrorMap;
|
|
2478
|
+
};
|
|
2479
|
+
//#endregion
|
|
2480
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/no.d.cts
|
|
2481
|
+
declare function _default$21(): {
|
|
2482
|
+
localeError: $ZodErrorMap;
|
|
2483
|
+
};
|
|
2484
|
+
//#endregion
|
|
2485
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ota.d.cts
|
|
2486
|
+
declare function _default$20(): {
|
|
2487
|
+
localeError: $ZodErrorMap;
|
|
2488
|
+
};
|
|
2489
|
+
//#endregion
|
|
2490
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ps.d.cts
|
|
2491
|
+
declare function _default$19(): {
|
|
2492
|
+
localeError: $ZodErrorMap;
|
|
2493
|
+
};
|
|
2494
|
+
//#endregion
|
|
2495
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pl.d.cts
|
|
2496
|
+
declare function _default$18(): {
|
|
2497
|
+
localeError: $ZodErrorMap;
|
|
2498
|
+
};
|
|
2499
|
+
//#endregion
|
|
2500
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pt.d.cts
|
|
2501
|
+
declare function _default$17(): {
|
|
2502
|
+
localeError: $ZodErrorMap;
|
|
2503
|
+
};
|
|
2504
|
+
//#endregion
|
|
2505
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ro.d.cts
|
|
2506
|
+
declare function _default$16(): {
|
|
2507
|
+
localeError: $ZodErrorMap;
|
|
2508
|
+
};
|
|
2509
|
+
//#endregion
|
|
2510
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ru.d.cts
|
|
2511
|
+
declare function _default$15(): {
|
|
2512
|
+
localeError: $ZodErrorMap;
|
|
2513
|
+
};
|
|
2514
|
+
//#endregion
|
|
2515
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sl.d.cts
|
|
2516
|
+
declare function _default$14(): {
|
|
2517
|
+
localeError: $ZodErrorMap;
|
|
2518
|
+
};
|
|
2519
|
+
//#endregion
|
|
2520
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sv.d.cts
|
|
2521
|
+
declare function _default$13(): {
|
|
2522
|
+
localeError: $ZodErrorMap;
|
|
2523
|
+
};
|
|
2524
|
+
//#endregion
|
|
2525
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ta.d.cts
|
|
2526
|
+
declare function _default$12(): {
|
|
2527
|
+
localeError: $ZodErrorMap;
|
|
2528
|
+
};
|
|
2529
|
+
//#endregion
|
|
2530
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/th.d.cts
|
|
2531
|
+
declare function _default$11(): {
|
|
2532
|
+
localeError: $ZodErrorMap;
|
|
2533
|
+
};
|
|
2534
|
+
//#endregion
|
|
2535
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/tr.d.cts
|
|
2536
|
+
declare function _default$10(): {
|
|
2537
|
+
localeError: $ZodErrorMap;
|
|
2538
|
+
};
|
|
2539
|
+
//#endregion
|
|
2540
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ua.d.cts
|
|
2541
|
+
declare function _default$9(): {
|
|
2542
|
+
localeError: $ZodErrorMap;
|
|
2543
|
+
};
|
|
2544
|
+
//#endregion
|
|
2545
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uk.d.cts
|
|
2546
|
+
declare function _default$8(): {
|
|
2547
|
+
localeError: $ZodErrorMap;
|
|
2548
|
+
};
|
|
2549
|
+
//#endregion
|
|
2550
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ur.d.cts
|
|
2551
|
+
declare function _default$7(): {
|
|
2552
|
+
localeError: $ZodErrorMap;
|
|
2553
|
+
};
|
|
2554
|
+
//#endregion
|
|
2555
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uz.d.cts
|
|
2556
|
+
declare function _default$6(): {
|
|
2557
|
+
localeError: $ZodErrorMap;
|
|
2558
|
+
};
|
|
2559
|
+
//#endregion
|
|
2560
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/vi.d.cts
|
|
2561
|
+
declare function _default$5(): {
|
|
2562
|
+
localeError: $ZodErrorMap;
|
|
2563
|
+
};
|
|
2564
|
+
//#endregion
|
|
2565
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.d.cts
|
|
2566
|
+
declare function _default$4(): {
|
|
2567
|
+
localeError: $ZodErrorMap;
|
|
2568
|
+
};
|
|
2569
|
+
//#endregion
|
|
2570
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.d.cts
|
|
2571
|
+
declare function _default$3(): {
|
|
2572
|
+
localeError: $ZodErrorMap;
|
|
2573
|
+
};
|
|
2574
|
+
//#endregion
|
|
2575
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/yo.d.cts
|
|
2576
|
+
declare function _default$2(): {
|
|
2577
|
+
localeError: $ZodErrorMap;
|
|
2578
|
+
};
|
|
2579
|
+
declare namespace index_d_exports$1 {
|
|
2580
|
+
export { _default$53 as ar, _default$52 as az, _default$51 as be, _default$50 as bg, _default$49 as ca, _default$48 as cs, _default$47 as da, _default$46 as de, _default$45 as el, _default$44 as en, _default$43 as eo, _default$42 as es, _default$41 as fa, _default$40 as fi, _default$39 as fr, _default$38 as frCA, _default$37 as he, _default$36 as hr, _default$35 as hu, _default$34 as hy, _default$33 as id, _default$32 as is, _default$31 as it, _default$30 as ja, _default$29 as ka, _default$28 as kh, _default$27 as km, _default$26 as ko, _default$25 as lt, _default$24 as mk, _default$23 as ms, _default$22 as nl, _default$21 as no, _default$20 as ota, _default$18 as pl, _default$19 as ps, _default$17 as pt, _default$16 as ro, _default$15 as ru, _default$14 as sl, _default$13 as sv, _default$12 as ta, _default$11 as th, _default$10 as tr, _default$9 as ua, _default$8 as uk, _default$7 as ur, _default$6 as uz, _default$5 as vi, _default$2 as yo, _default$4 as zhCN, _default$3 as zhTW };
|
|
2581
|
+
}
|
|
2582
|
+
//#endregion
|
|
2583
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.d.cts
|
|
2584
|
+
type ModeWriter = (doc: Doc, modes: {
|
|
2585
|
+
execution: "sync" | "async";
|
|
2586
|
+
}) => void;
|
|
2587
|
+
declare class Doc {
|
|
2588
|
+
args: string[];
|
|
2589
|
+
content: string[];
|
|
2590
|
+
indent: number;
|
|
2591
|
+
constructor(args?: string[]);
|
|
2592
|
+
indented(fn: (doc: Doc) => void): void;
|
|
2593
|
+
write(fn: ModeWriter): void;
|
|
2594
|
+
write(line: string): void;
|
|
2595
|
+
compile(): any;
|
|
2596
|
+
}
|
|
1697
2597
|
//#endregion
|
|
1698
2598
|
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.d.cts
|
|
1699
2599
|
type Params<T extends $ZodType | $ZodCheck, IssueTypes extends $ZodIssueBase, OmitKeys extends keyof T["_zod"]["def"] = never> = Flatten<Partial<EmptyToNever<Omit<T["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
|
|
@@ -1706,52 +2606,271 @@ type TypeParams<T extends $ZodType = $ZodType & {
|
|
|
1706
2606
|
}, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
|
|
1707
2607
|
type CheckParams<T extends $ZodCheck = $ZodCheck // & { _issc: never },
|
|
1708
2608
|
, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
|
|
2609
|
+
type StringFormatParams<T extends $ZodStringFormat = $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>;
|
|
1709
2610
|
type CheckStringFormatParams<T extends $ZodStringFormat = $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>;
|
|
1710
2611
|
type CheckTypeParams<T extends $ZodType & $ZodCheck = $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>;
|
|
2612
|
+
type $ZodStringParams = TypeParams<$ZodString<string>, "coerce">;
|
|
2613
|
+
declare function _string<T extends $ZodString>(Class: SchemaClass<T>, params?: string | $ZodStringParams): T;
|
|
2614
|
+
declare function _coercedString<T extends $ZodString>(Class: SchemaClass<T>, params?: string | $ZodStringParams): T;
|
|
2615
|
+
type $ZodStringFormatParams = CheckTypeParams<$ZodStringFormat, "format" | "coerce" | "when" | "pattern">;
|
|
2616
|
+
type $ZodCheckStringFormatParams = CheckParams<$ZodCheckStringFormat, "format">;
|
|
2617
|
+
type $ZodEmailParams = StringFormatParams<$ZodEmail, "when">;
|
|
1711
2618
|
type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
|
|
2619
|
+
declare function _email<T extends $ZodEmail>(Class: SchemaClass<T>, params?: string | $ZodEmailParams | $ZodCheckEmailParams): T;
|
|
2620
|
+
type $ZodGUIDParams = StringFormatParams<$ZodGUID, "pattern" | "when">;
|
|
1712
2621
|
type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">;
|
|
2622
|
+
declare function _guid<T extends $ZodGUID>(Class: SchemaClass<T>, params?: string | $ZodGUIDParams | $ZodCheckGUIDParams): T;
|
|
2623
|
+
type $ZodUUIDParams = StringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
1713
2624
|
type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
2625
|
+
declare function _uuid<T extends $ZodUUID>(Class: SchemaClass<T>, params?: string | $ZodUUIDParams | $ZodCheckUUIDParams): T;
|
|
2626
|
+
type $ZodUUIDv4Params = StringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
2627
|
+
type $ZodCheckUUIDv4Params = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
2628
|
+
declare function _uuidv4<T extends $ZodUUID>(Class: SchemaClass<T>, params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params): T;
|
|
2629
|
+
type $ZodUUIDv6Params = StringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
2630
|
+
type $ZodCheckUUIDv6Params = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
2631
|
+
declare function _uuidv6<T extends $ZodUUID>(Class: SchemaClass<T>, params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params): T;
|
|
2632
|
+
type $ZodUUIDv7Params = StringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
2633
|
+
type $ZodCheckUUIDv7Params = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
2634
|
+
declare function _uuidv7<T extends $ZodUUID>(Class: SchemaClass<T>, params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params): T;
|
|
2635
|
+
type $ZodURLParams = StringFormatParams<$ZodURL, "when">;
|
|
1714
2636
|
type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
|
|
2637
|
+
declare function _url<T extends $ZodURL>(Class: SchemaClass<T>, params?: string | $ZodURLParams | $ZodCheckURLParams): T;
|
|
2638
|
+
type $ZodEmojiParams = StringFormatParams<$ZodEmoji, "when">;
|
|
1715
2639
|
type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
|
|
2640
|
+
declare function _emoji<T extends $ZodEmoji>(Class: SchemaClass<T>, params?: string | $ZodEmojiParams | $ZodCheckEmojiParams): T;
|
|
2641
|
+
type $ZodNanoIDParams = StringFormatParams<$ZodNanoID, "when">;
|
|
1716
2642
|
type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
|
|
2643
|
+
declare function _nanoid<T extends $ZodNanoID>(Class: SchemaClass<T>, params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams): T;
|
|
2644
|
+
/**
|
|
2645
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
2646
|
+
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
2647
|
+
* See https://github.com/paralleldrive/cuid.
|
|
2648
|
+
*/
|
|
2649
|
+
type $ZodCUIDParams = StringFormatParams<$ZodCUID, "when">;
|
|
1717
2650
|
/**
|
|
1718
2651
|
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
1719
2652
|
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
1720
2653
|
* See https://github.com/paralleldrive/cuid.
|
|
1721
2654
|
*/
|
|
1722
2655
|
type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
|
|
2656
|
+
/**
|
|
2657
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
2658
|
+
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
2659
|
+
* See https://github.com/paralleldrive/cuid.
|
|
2660
|
+
*/
|
|
2661
|
+
declare function _cuid<T extends $ZodCUID>(Class: SchemaClass<T>, params?: string | $ZodCUIDParams | $ZodCheckCUIDParams): T;
|
|
2662
|
+
type $ZodCUID2Params = StringFormatParams<$ZodCUID2, "when">;
|
|
1723
2663
|
type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
|
|
2664
|
+
declare function _cuid2<T extends $ZodCUID2>(Class: SchemaClass<T>, params?: string | $ZodCUID2Params | $ZodCheckCUID2Params): T;
|
|
2665
|
+
type $ZodULIDParams = StringFormatParams<$ZodULID, "when">;
|
|
1724
2666
|
type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
|
|
2667
|
+
declare function _ulid<T extends $ZodULID>(Class: SchemaClass<T>, params?: string | $ZodULIDParams | $ZodCheckULIDParams): T;
|
|
2668
|
+
type $ZodXIDParams = StringFormatParams<$ZodXID, "when">;
|
|
1725
2669
|
type $ZodCheckXIDParams = CheckStringFormatParams<$ZodXID, "when">;
|
|
2670
|
+
declare function _xid<T extends $ZodXID>(Class: SchemaClass<T>, params?: string | $ZodXIDParams | $ZodCheckXIDParams): T;
|
|
2671
|
+
type $ZodKSUIDParams = StringFormatParams<$ZodKSUID, "when">;
|
|
1726
2672
|
type $ZodCheckKSUIDParams = CheckStringFormatParams<$ZodKSUID, "when">;
|
|
2673
|
+
declare function _ksuid<T extends $ZodKSUID>(Class: SchemaClass<T>, params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams): T;
|
|
2674
|
+
type $ZodIPv4Params = StringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
|
|
1727
2675
|
type $ZodCheckIPv4Params = CheckStringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
|
|
2676
|
+
declare function _ipv4<T extends $ZodIPv4>(Class: SchemaClass<T>, params?: string | $ZodIPv4Params | $ZodCheckIPv4Params): T;
|
|
2677
|
+
type $ZodIPv6Params = StringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
|
|
1728
2678
|
type $ZodCheckIPv6Params = CheckStringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
|
|
2679
|
+
declare function _ipv6<T extends $ZodIPv6>(Class: SchemaClass<T>, params?: string | $ZodIPv6Params | $ZodCheckIPv6Params): T;
|
|
2680
|
+
type $ZodMACParams = StringFormatParams<$ZodMAC, "pattern" | "when">;
|
|
2681
|
+
type $ZodCheckMACParams = CheckStringFormatParams<$ZodMAC, "pattern" | "when">;
|
|
2682
|
+
declare function _mac<T extends $ZodMAC>(Class: SchemaClass<T>, params?: string | $ZodMACParams | $ZodCheckMACParams): T;
|
|
2683
|
+
type $ZodCIDRv4Params = StringFormatParams<$ZodCIDRv4, "pattern" | "when">;
|
|
1729
2684
|
type $ZodCheckCIDRv4Params = CheckStringFormatParams<$ZodCIDRv4, "pattern" | "when">;
|
|
2685
|
+
declare function _cidrv4<T extends $ZodCIDRv4>(Class: SchemaClass<T>, params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params): T;
|
|
2686
|
+
type $ZodCIDRv6Params = StringFormatParams<$ZodCIDRv6, "pattern" | "when">;
|
|
1730
2687
|
type $ZodCheckCIDRv6Params = CheckStringFormatParams<$ZodCIDRv6, "pattern" | "when">;
|
|
2688
|
+
declare function _cidrv6<T extends $ZodCIDRv6>(Class: SchemaClass<T>, params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params): T;
|
|
2689
|
+
type $ZodBase64Params = StringFormatParams<$ZodBase64, "pattern" | "when">;
|
|
1731
2690
|
type $ZodCheckBase64Params = CheckStringFormatParams<$ZodBase64, "pattern" | "when">;
|
|
2691
|
+
declare function _base64<T extends $ZodBase64>(Class: SchemaClass<T>, params?: string | $ZodBase64Params | $ZodCheckBase64Params): T;
|
|
2692
|
+
type $ZodBase64URLParams = StringFormatParams<$ZodBase64URL, "pattern" | "when">;
|
|
1732
2693
|
type $ZodCheckBase64URLParams = CheckStringFormatParams<$ZodBase64URL, "pattern" | "when">;
|
|
2694
|
+
declare function _base64url<T extends $ZodBase64URL>(Class: SchemaClass<T>, params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams): T;
|
|
2695
|
+
type $ZodE164Params = StringFormatParams<$ZodE164, "when">;
|
|
1733
2696
|
type $ZodCheckE164Params = CheckStringFormatParams<$ZodE164, "when">;
|
|
2697
|
+
declare function _e164<T extends $ZodE164>(Class: SchemaClass<T>, params?: string | $ZodE164Params | $ZodCheckE164Params): T;
|
|
2698
|
+
type $ZodJWTParams = StringFormatParams<$ZodJWT, "pattern" | "when">;
|
|
1734
2699
|
type $ZodCheckJWTParams = CheckStringFormatParams<$ZodJWT, "pattern" | "when">;
|
|
2700
|
+
declare function _jwt<T extends $ZodJWT>(Class: SchemaClass<T>, params?: string | $ZodJWTParams | $ZodCheckJWTParams): T;
|
|
2701
|
+
declare const TimePrecision: {
|
|
2702
|
+
readonly Any: null;
|
|
2703
|
+
readonly Minute: -1;
|
|
2704
|
+
readonly Second: 0;
|
|
2705
|
+
readonly Millisecond: 3;
|
|
2706
|
+
readonly Microsecond: 6;
|
|
2707
|
+
};
|
|
2708
|
+
type $ZodISODateTimeParams = StringFormatParams<$ZodISODateTime, "pattern" | "when">;
|
|
1735
2709
|
type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "pattern" | "when">;
|
|
2710
|
+
declare function _isoDateTime<T extends $ZodISODateTime>(Class: SchemaClass<T>, params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams): T;
|
|
2711
|
+
type $ZodISODateParams = StringFormatParams<$ZodISODate, "pattern" | "when">;
|
|
1736
2712
|
type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
|
|
2713
|
+
declare function _isoDate<T extends $ZodISODate>(Class: SchemaClass<T>, params?: string | $ZodISODateParams | $ZodCheckISODateParams): T;
|
|
2714
|
+
type $ZodISOTimeParams = StringFormatParams<$ZodISOTime, "pattern" | "when">;
|
|
1737
2715
|
type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
|
|
2716
|
+
declare function _isoTime<T extends $ZodISOTime>(Class: SchemaClass<T>, params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams): T;
|
|
2717
|
+
type $ZodISODurationParams = StringFormatParams<$ZodISODuration, "when">;
|
|
1738
2718
|
type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
|
|
2719
|
+
declare function _isoDuration<T extends $ZodISODuration>(Class: SchemaClass<T>, params?: string | $ZodISODurationParams | $ZodCheckISODurationParams): T;
|
|
2720
|
+
type $ZodNumberParams = TypeParams<$ZodNumber<number>, "coerce">;
|
|
2721
|
+
type $ZodNumberFormatParams = CheckTypeParams<$ZodNumberFormat, "format" | "coerce">;
|
|
1739
2722
|
type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
|
|
2723
|
+
declare function _number<T extends $ZodNumber>(Class: SchemaClass<T>, params?: string | $ZodNumberParams): T;
|
|
2724
|
+
declare function _coercedNumber<T extends $ZodNumber>(Class: SchemaClass<T>, params?: string | $ZodNumberParams): T;
|
|
2725
|
+
declare function _int<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
2726
|
+
declare function _float32<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
2727
|
+
declare function _float64<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
2728
|
+
declare function _int32<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
2729
|
+
declare function _uint32<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
2730
|
+
type $ZodBooleanParams = TypeParams<$ZodBoolean<boolean>, "coerce">;
|
|
2731
|
+
declare function _boolean<T extends $ZodBoolean>(Class: SchemaClass<T>, params?: string | $ZodBooleanParams): T;
|
|
2732
|
+
declare function _coercedBoolean<T extends $ZodBoolean>(Class: SchemaClass<T>, params?: string | $ZodBooleanParams): T;
|
|
2733
|
+
type $ZodBigIntParams = TypeParams<$ZodBigInt<bigint>>;
|
|
2734
|
+
type $ZodBigIntFormatParams = CheckTypeParams<$ZodBigIntFormat, "format" | "coerce">;
|
|
2735
|
+
type $ZodCheckBigIntFormatParams = CheckParams<$ZodCheckBigIntFormat, "format" | "when">;
|
|
2736
|
+
declare function _bigint<T extends $ZodBigInt>(Class: SchemaClass<T>, params?: string | $ZodBigIntParams): T;
|
|
2737
|
+
declare function _coercedBigint<T extends $ZodBigInt>(Class: SchemaClass<T>, params?: string | $ZodBigIntParams): T;
|
|
2738
|
+
declare function _int64<T extends $ZodBigIntFormat>(Class: SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
|
|
2739
|
+
declare function _uint64<T extends $ZodBigIntFormat>(Class: SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
|
|
2740
|
+
type $ZodSymbolParams = TypeParams<$ZodSymbol>;
|
|
2741
|
+
declare function _symbol<T extends $ZodSymbol>(Class: SchemaClass<T>, params?: string | $ZodSymbolParams): T;
|
|
2742
|
+
type $ZodUndefinedParams = TypeParams<$ZodUndefined>;
|
|
2743
|
+
declare function _undefined$1<T extends $ZodUndefined>(Class: SchemaClass<T>, params?: string | $ZodUndefinedParams): T;
|
|
2744
|
+
type $ZodNullParams = TypeParams<$ZodNull>;
|
|
2745
|
+
declare function _null$1<T extends $ZodNull>(Class: SchemaClass<T>, params?: string | $ZodNullParams): T;
|
|
2746
|
+
type $ZodAnyParams = TypeParams<$ZodAny>;
|
|
2747
|
+
declare function _any<T extends $ZodAny>(Class: SchemaClass<T>): T;
|
|
2748
|
+
type $ZodUnknownParams = TypeParams<$ZodUnknown>;
|
|
2749
|
+
declare function _unknown<T extends $ZodUnknown>(Class: SchemaClass<T>): T;
|
|
2750
|
+
type $ZodNeverParams = TypeParams<$ZodNever>;
|
|
2751
|
+
declare function _never<T extends $ZodNever>(Class: SchemaClass<T>, params?: string | $ZodNeverParams): T;
|
|
2752
|
+
type $ZodVoidParams = TypeParams<$ZodVoid>;
|
|
2753
|
+
declare function _void$1<T extends $ZodVoid>(Class: SchemaClass<T>, params?: string | $ZodVoidParams): T;
|
|
2754
|
+
type $ZodDateParams = TypeParams<$ZodDate, "coerce">;
|
|
2755
|
+
declare function _date<T extends $ZodDate>(Class: SchemaClass<T>, params?: string | $ZodDateParams): T;
|
|
2756
|
+
declare function _coercedDate<T extends $ZodDate>(Class: SchemaClass<T>, params?: string | $ZodDateParams): T;
|
|
2757
|
+
type $ZodNaNParams = TypeParams<$ZodNaN>;
|
|
2758
|
+
declare function _nan<T extends $ZodNaN>(Class: SchemaClass<T>, params?: string | $ZodNaNParams): T;
|
|
1740
2759
|
type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
|
|
2760
|
+
declare function _lt(value: Numeric, params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan<Numeric>;
|
|
2761
|
+
declare function _lte(value: Numeric, params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan<Numeric>;
|
|
1741
2762
|
type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
|
|
2763
|
+
declare function _gt(value: Numeric, params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
|
|
2764
|
+
declare function _gte(value: Numeric, params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
|
|
2765
|
+
declare function _positive(params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
|
|
2766
|
+
declare function _negative(params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan;
|
|
2767
|
+
declare function _nonpositive(params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan;
|
|
2768
|
+
declare function _nonnegative(params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
|
|
1742
2769
|
type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
|
|
2770
|
+
declare function _multipleOf(value: number | bigint, params?: string | $ZodCheckMultipleOfParams): $ZodCheckMultipleOf;
|
|
2771
|
+
type $ZodCheckMaxSizeParams = CheckParams<$ZodCheckMaxSize, "maximum" | "when">;
|
|
2772
|
+
declare function _maxSize(maximum: number, params?: string | $ZodCheckMaxSizeParams): $ZodCheckMaxSize<HasSize>;
|
|
2773
|
+
type $ZodCheckMinSizeParams = CheckParams<$ZodCheckMinSize, "minimum" | "when">;
|
|
2774
|
+
declare function _minSize(minimum: number, params?: string | $ZodCheckMinSizeParams): $ZodCheckMinSize<HasSize>;
|
|
2775
|
+
type $ZodCheckSizeEqualsParams = CheckParams<$ZodCheckSizeEquals, "size" | "when">;
|
|
2776
|
+
declare function _size(size: number, params?: string | $ZodCheckSizeEqualsParams): $ZodCheckSizeEquals<HasSize>;
|
|
1743
2777
|
type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
|
|
2778
|
+
declare function _maxLength(maximum: number, params?: string | $ZodCheckMaxLengthParams): $ZodCheckMaxLength<HasLength>;
|
|
1744
2779
|
type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
|
|
2780
|
+
declare function _minLength(minimum: number, params?: string | $ZodCheckMinLengthParams): $ZodCheckMinLength<HasLength>;
|
|
1745
2781
|
type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
|
|
2782
|
+
declare function _length(length: number, params?: string | $ZodCheckLengthEqualsParams): $ZodCheckLengthEquals<HasLength>;
|
|
1746
2783
|
type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
|
|
2784
|
+
declare function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): $ZodCheckRegex;
|
|
1747
2785
|
type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
|
|
2786
|
+
declare function _lowercase(params?: string | $ZodCheckLowerCaseParams): $ZodCheckLowerCase;
|
|
1748
2787
|
type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
|
|
2788
|
+
declare function _uppercase(params?: string | $ZodCheckUpperCaseParams): $ZodCheckUpperCase;
|
|
1749
2789
|
type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
|
|
2790
|
+
declare function _includes(includes: string, params?: string | $ZodCheckIncludesParams): $ZodCheckIncludes;
|
|
1750
2791
|
type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
|
|
2792
|
+
declare function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): $ZodCheckStartsWith;
|
|
1751
2793
|
type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
|
|
2794
|
+
declare function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): $ZodCheckEndsWith;
|
|
2795
|
+
type $ZodCheckPropertyParams = CheckParams<$ZodCheckProperty, "property" | "schema" | "when">;
|
|
2796
|
+
declare function _property<K extends string, T extends $ZodType>(property: K, schema: T, params?: string | $ZodCheckPropertyParams): $ZodCheckProperty<{ [k in K]: output<T>; }>;
|
|
2797
|
+
type $ZodCheckMimeTypeParams = CheckParams<$ZodCheckMimeType, "mime" | "when">;
|
|
2798
|
+
declare function _mime(types: MimeTypes[], params?: string | $ZodCheckMimeTypeParams): $ZodCheckMimeType;
|
|
2799
|
+
declare function _overwrite<T>(tx: (input: T) => T): $ZodCheckOverwrite<T>;
|
|
2800
|
+
declare function _normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): $ZodCheckOverwrite<string>;
|
|
2801
|
+
declare function _trim(): $ZodCheckOverwrite<string>;
|
|
2802
|
+
declare function _toLowerCase(): $ZodCheckOverwrite<string>;
|
|
2803
|
+
declare function _toUpperCase(): $ZodCheckOverwrite<string>;
|
|
2804
|
+
declare function _slugify(): $ZodCheckOverwrite<string>;
|
|
2805
|
+
type $ZodArrayParams = TypeParams<$ZodArray, "element">;
|
|
2806
|
+
declare function _array<T extends $ZodType>(Class: SchemaClass<$ZodArray>, element: T, params?: string | $ZodArrayParams): $ZodArray<T>;
|
|
2807
|
+
type $ZodObjectParams = TypeParams<$ZodObject, "shape" | "catchall">;
|
|
2808
|
+
type $ZodUnionParams = TypeParams<$ZodUnion, "options">;
|
|
2809
|
+
declare function _union<const T extends readonly $ZodObject[]>(Class: SchemaClass<$ZodUnion>, options: T, params?: string | $ZodUnionParams): $ZodUnion<T>;
|
|
2810
|
+
type $ZodXorParams = TypeParams<$ZodXor, "options">;
|
|
2811
|
+
declare function _xor<const T extends readonly $ZodObject[]>(Class: SchemaClass<$ZodXor>, options: T, params?: string | $ZodXorParams): $ZodXor<T>;
|
|
2812
|
+
interface $ZodTypeDiscriminableInternals<Disc extends string = string> extends $ZodTypeInternals<unknown, { [K in Disc]?: unknown; }> {
|
|
2813
|
+
propValues: PropValues;
|
|
2814
|
+
}
|
|
2815
|
+
interface $ZodTypeDiscriminable<Disc extends string = string> extends $ZodType {
|
|
2816
|
+
_zod: $ZodTypeDiscriminableInternals<Disc>;
|
|
2817
|
+
}
|
|
2818
|
+
type $ZodDiscriminatedUnionParams = TypeParams<$ZodDiscriminatedUnion, "options" | "discriminator">;
|
|
2819
|
+
declare function _discriminatedUnion<Types extends [$ZodTypeDiscriminable<Disc>, ...$ZodTypeDiscriminable<Disc>[]], Disc extends string>(Class: SchemaClass<$ZodDiscriminatedUnion>, discriminator: Disc, options: Types, params?: string | $ZodDiscriminatedUnionParams): $ZodDiscriminatedUnion<Types, Disc>;
|
|
2820
|
+
type $ZodIntersectionParams = TypeParams<$ZodIntersection, "left" | "right">;
|
|
2821
|
+
declare function _intersection<T extends $ZodObject, U extends $ZodObject>(Class: SchemaClass<$ZodIntersection>, left: T, right: U): $ZodIntersection<T, U>;
|
|
2822
|
+
type $ZodTupleParams = TypeParams<$ZodTuple, "items" | "rest">;
|
|
2823
|
+
declare function _tuple<T extends readonly [$ZodType, ...$ZodType[]]>(Class: SchemaClass<$ZodTuple>, items: T, params?: string | $ZodTupleParams): $ZodTuple<T, null>;
|
|
2824
|
+
declare function _tuple<T extends readonly [$ZodType, ...$ZodType[]], Rest extends $ZodType>(Class: SchemaClass<$ZodTuple>, items: T, rest: Rest, params?: string | $ZodTupleParams): $ZodTuple<T, Rest>;
|
|
2825
|
+
type $ZodRecordParams = TypeParams<$ZodRecord, "keyType" | "valueType">;
|
|
2826
|
+
declare function _record<Key extends $ZodRecordKey, Value extends $ZodObject>(Class: SchemaClass<$ZodRecord>, keyType: Key, valueType: Value, params?: string | $ZodRecordParams): $ZodRecord<Key, Value>;
|
|
2827
|
+
type $ZodMapParams = TypeParams<$ZodMap, "keyType" | "valueType">;
|
|
2828
|
+
declare function _map<Key extends $ZodObject, Value extends $ZodObject>(Class: SchemaClass<$ZodMap>, keyType: Key, valueType: Value, params?: string | $ZodMapParams): $ZodMap<Key, Value>;
|
|
2829
|
+
type $ZodSetParams = TypeParams<$ZodSet, "valueType">;
|
|
2830
|
+
declare function _set<Value extends $ZodObject>(Class: SchemaClass<$ZodSet>, valueType: Value, params?: string | $ZodSetParams): $ZodSet<Value>;
|
|
1752
2831
|
type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
|
|
2832
|
+
declare function _enum$1<const T extends string[]>(Class: SchemaClass<$ZodEnum>, values: T, params?: string | $ZodEnumParams): $ZodEnum<ToEnum<T[number]>>;
|
|
2833
|
+
declare function _enum$1<T extends EnumLike>(Class: SchemaClass<$ZodEnum>, entries: T, params?: string | $ZodEnumParams): $ZodEnum<T>;
|
|
2834
|
+
/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
|
|
2835
|
+
*
|
|
2836
|
+
* ```ts
|
|
2837
|
+
* enum Colors { red, green, blue }
|
|
2838
|
+
* z.enum(Colors);
|
|
2839
|
+
* ```
|
|
2840
|
+
*/
|
|
2841
|
+
declare function _nativeEnum<T extends EnumLike>(Class: SchemaClass<$ZodEnum>, entries: T, params?: string | $ZodEnumParams): $ZodEnum<T>;
|
|
2842
|
+
type $ZodLiteralParams = TypeParams<$ZodLiteral, "values">;
|
|
2843
|
+
declare function _literal<const T extends Array<Literal>>(Class: SchemaClass<$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): $ZodLiteral<T[number]>;
|
|
2844
|
+
declare function _literal<const T extends Literal>(Class: SchemaClass<$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): $ZodLiteral<T>;
|
|
2845
|
+
type $ZodFileParams = TypeParams<$ZodFile>;
|
|
2846
|
+
declare function _file(Class: SchemaClass<$ZodFile>, params?: string | $ZodFileParams): $ZodFile;
|
|
2847
|
+
type $ZodTransformParams = TypeParams<$ZodTransform, "transform">;
|
|
2848
|
+
declare function _transform<I = unknown, O = I>(Class: SchemaClass<$ZodTransform>, fn: (input: I, ctx?: ParsePayload) => O): $ZodTransform<Awaited<O>, I>;
|
|
2849
|
+
type $ZodOptionalParams = TypeParams<$ZodOptional, "innerType">;
|
|
2850
|
+
declare function _optional<T extends $ZodObject>(Class: SchemaClass<$ZodOptional>, innerType: T): $ZodOptional<T>;
|
|
2851
|
+
type $ZodNullableParams = TypeParams<$ZodNullable, "innerType">;
|
|
2852
|
+
declare function _nullable<T extends $ZodObject>(Class: SchemaClass<$ZodNullable>, innerType: T): $ZodNullable<T>;
|
|
2853
|
+
type $ZodDefaultParams = TypeParams<$ZodDefault, "innerType" | "defaultValue">;
|
|
2854
|
+
declare function _default$1<T extends $ZodObject>(Class: SchemaClass<$ZodDefault>, innerType: T, defaultValue: NoUndefined<output<T>> | (() => NoUndefined<output<T>>)): $ZodDefault<T>;
|
|
1753
2855
|
type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
|
|
2856
|
+
declare function _nonoptional<T extends $ZodObject>(Class: SchemaClass<$ZodNonOptional>, innerType: T, params?: string | $ZodNonOptionalParams): $ZodNonOptional<T>;
|
|
2857
|
+
type $ZodSuccessParams = TypeParams<$ZodSuccess, "innerType">;
|
|
2858
|
+
declare function _success<T extends $ZodObject>(Class: SchemaClass<$ZodSuccess>, innerType: T): $ZodSuccess<T>;
|
|
2859
|
+
type $ZodCatchParams = TypeParams<$ZodCatch, "innerType" | "catchValue">;
|
|
2860
|
+
declare function _catch$1<T extends $ZodObject>(Class: SchemaClass<$ZodCatch>, innerType: T, catchValue: output<T> | ((ctx: $ZodCatchCtx) => output<T>)): $ZodCatch<T>;
|
|
2861
|
+
type $ZodPipeParams = TypeParams<$ZodPipe, "in" | "out">;
|
|
2862
|
+
declare function _pipe<const A extends $ZodType, B extends $ZodType<unknown, output<A>> = $ZodType<unknown, output<A>>>(Class: SchemaClass<$ZodPipe>, in_: A, out: B | $ZodType<unknown, output<A>>): $ZodPipe<A, B>;
|
|
2863
|
+
type $ZodReadonlyParams = TypeParams<$ZodReadonly, "innerType">;
|
|
2864
|
+
declare function _readonly<T extends $ZodObject>(Class: SchemaClass<$ZodReadonly>, innerType: T): $ZodReadonly<T>;
|
|
2865
|
+
type $ZodTemplateLiteralParams = TypeParams<$ZodTemplateLiteral, "parts">;
|
|
2866
|
+
declare function _templateLiteral<const Parts extends $ZodTemplateLiteralPart[]>(Class: SchemaClass<$ZodTemplateLiteral>, parts: Parts, params?: string | $ZodTemplateLiteralParams): $ZodTemplateLiteral<$PartsToTemplateLiteral<Parts>>;
|
|
2867
|
+
type $ZodLazyParams = TypeParams<$ZodLazy, "getter">;
|
|
2868
|
+
declare function _lazy<T extends $ZodType>(Class: SchemaClass<$ZodLazy>, getter: () => T): $ZodLazy<T>;
|
|
2869
|
+
type $ZodPromiseParams = TypeParams<$ZodPromise, "innerType">;
|
|
2870
|
+
declare function _promise<T extends $ZodObject>(Class: SchemaClass<$ZodPromise>, innerType: T): $ZodPromise<T>;
|
|
1754
2871
|
type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
|
|
2872
|
+
declare function _custom<O = unknown, I = O>(Class: SchemaClass<$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): $ZodCustom<O, I>;
|
|
2873
|
+
declare function _refine<O = unknown, I = O>(Class: SchemaClass<$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): $ZodCustom<O, I>;
|
|
1755
2874
|
type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
|
|
1756
2875
|
type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
|
|
1757
2876
|
/** The schema or check that originated this issue. */
|
|
@@ -1766,8 +2885,103 @@ interface $ZodSuperRefineParams {
|
|
|
1766
2885
|
/** If provided, the refinement runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
|
|
1767
2886
|
when?: ((payload: ParsePayload) => boolean) | undefined;
|
|
1768
2887
|
}
|
|
2888
|
+
declare function _superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>, params?: $ZodSuperRefineParams): $ZodCheck<T>;
|
|
2889
|
+
declare function _check<O = unknown>(fn: CheckFn<O>, params?: string | $ZodCustomParams): $ZodCheck<O>;
|
|
2890
|
+
declare function describe$1<T>(description: string): $ZodCheck<T>;
|
|
2891
|
+
declare function meta$1<T>(metadata: GlobalMeta): $ZodCheck<T>;
|
|
2892
|
+
interface $ZodStringBoolParams extends TypeParams {
|
|
2893
|
+
truthy?: string[];
|
|
2894
|
+
falsy?: string[];
|
|
2895
|
+
/**
|
|
2896
|
+
* Options: `"sensitive"`, `"insensitive"`
|
|
2897
|
+
*
|
|
2898
|
+
* @default `"insensitive"`
|
|
2899
|
+
*/
|
|
2900
|
+
case?: "sensitive" | "insensitive" | undefined;
|
|
2901
|
+
}
|
|
2902
|
+
declare function _stringbool(Classes: {
|
|
2903
|
+
Codec?: typeof $ZodCodec;
|
|
2904
|
+
Boolean?: typeof $ZodBoolean;
|
|
2905
|
+
String?: typeof $ZodString;
|
|
2906
|
+
}, _params?: string | $ZodStringBoolParams): $ZodCodec<$ZodString, $ZodBoolean>;
|
|
2907
|
+
declare function _stringFormat<Format extends string>(Class: typeof $ZodCustomStringFormat, format: Format, fnOrRegex: ((arg: string) => MaybeAsync<unknown>) | RegExp, _params?: string | $ZodStringFormatParams): $ZodCustomStringFormat<Format>;
|
|
2908
|
+
//#endregion
|
|
2909
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.d.cts
|
|
2910
|
+
declare function toJSONSchema<T extends $ZodType>(schema: T, params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<T>;
|
|
2911
|
+
declare function toJSONSchema(registry: $ZodRegistry<{
|
|
2912
|
+
id?: string | undefined;
|
|
2913
|
+
}>, params?: RegistryToJSONSchemaParams): {
|
|
2914
|
+
schemas: Record<string, ZodStandardJSONSchemaPayload<$ZodType>>;
|
|
2915
|
+
};
|
|
2916
|
+
//#endregion
|
|
2917
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.d.cts
|
|
2918
|
+
/**
|
|
2919
|
+
* Parameters for the emit method of JSONSchemaGenerator.
|
|
2920
|
+
* @deprecated Use toJSONSchema function instead
|
|
2921
|
+
*/
|
|
2922
|
+
type EmitParams = Pick<JSONSchemaGeneratorParams, "cycles" | "reused" | "external">;
|
|
2923
|
+
/**
|
|
2924
|
+
* Parameters for JSONSchemaGenerator constructor.
|
|
2925
|
+
* @deprecated Use toJSONSchema function instead
|
|
2926
|
+
*/
|
|
2927
|
+
type JSONSchemaGeneratorConstructorParams = Pick<JSONSchemaGeneratorParams, "metadata" | "target" | "unrepresentable" | "override" | "io">;
|
|
2928
|
+
/**
|
|
2929
|
+
* Legacy class-based interface for JSON Schema generation.
|
|
2930
|
+
* This class wraps the new functional implementation to provide backward compatibility.
|
|
2931
|
+
*
|
|
2932
|
+
* @deprecated Use the `toJSONSchema` function instead for new code.
|
|
2933
|
+
*
|
|
2934
|
+
* @example
|
|
2935
|
+
* ```typescript
|
|
2936
|
+
* // Legacy usage (still supported)
|
|
2937
|
+
* const gen = new JSONSchemaGenerator({ target: "draft-07" });
|
|
2938
|
+
* gen.process(schema);
|
|
2939
|
+
* const result = gen.emit(schema);
|
|
2940
|
+
*
|
|
2941
|
+
* // Preferred modern usage
|
|
2942
|
+
* const result = toJSONSchema(schema, { target: "draft-07" });
|
|
2943
|
+
* ```
|
|
2944
|
+
*/
|
|
2945
|
+
declare class JSONSchemaGenerator {
|
|
2946
|
+
private ctx;
|
|
2947
|
+
/** @deprecated Access via ctx instead */
|
|
2948
|
+
get metadataRegistry(): $ZodRegistry<Record<string, any>>;
|
|
2949
|
+
/** @deprecated Access via ctx instead */
|
|
2950
|
+
get target(): ({} & string) | "draft-2020-12" | "draft-07" | "openapi-3.0" | "draft-04";
|
|
2951
|
+
/** @deprecated Access via ctx instead */
|
|
2952
|
+
get unrepresentable(): "any" | "throw";
|
|
2953
|
+
/** @deprecated Access via ctx instead */
|
|
2954
|
+
get override(): (ctx: {
|
|
2955
|
+
zodSchema: $ZodType;
|
|
2956
|
+
jsonSchema: BaseSchema;
|
|
2957
|
+
path: (string | number)[];
|
|
2958
|
+
}) => void;
|
|
2959
|
+
/** @deprecated Access via ctx instead */
|
|
2960
|
+
get io(): "input" | "output";
|
|
2961
|
+
/** @deprecated Access via ctx instead */
|
|
2962
|
+
get counter(): number;
|
|
2963
|
+
set counter(value: number);
|
|
2964
|
+
/** @deprecated Access via ctx instead */
|
|
2965
|
+
get seen(): Map<$ZodType, Seen>;
|
|
2966
|
+
constructor(params?: JSONSchemaGeneratorConstructorParams);
|
|
2967
|
+
/**
|
|
2968
|
+
* Process a schema to prepare it for JSON Schema generation.
|
|
2969
|
+
* This must be called before emit().
|
|
2970
|
+
*/
|
|
2971
|
+
process(schema: $ZodType, _params?: ProcessParams): BaseSchema;
|
|
2972
|
+
/**
|
|
2973
|
+
* Emit the final JSON Schema after processing.
|
|
2974
|
+
* Must call process() first.
|
|
2975
|
+
*/
|
|
2976
|
+
emit(schema: $ZodType, _params?: EmitParams): BaseSchema;
|
|
2977
|
+
}
|
|
2978
|
+
declare namespace index_d_exports {
|
|
2979
|
+
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, $ZodPreprocess, $ZodPreprocessDef, $ZodPreprocessInternals, $ZodPromise, $ZodPromiseDef, $ZodPromiseInternals, $ZodPromiseParams, $ZodRawIssue, $ZodReadonly, $ZodReadonlyDef, $ZodReadonlyInternals, $ZodReadonlyParams, $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, $ZodSuperRefineParams, $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, GlobalMeta, json_schema_d_exports as JSONSchema, JSONSchemaGenerator, JSONSchemaGeneratorParams, JSONSchemaMeta, NEVER, Params, ParseContext, ParseContextInternal, ParsePayload, ProcessParams, Processor, RegistryToJSONSchemaParams, Seen, SomeType, StringFormatParams, TimePrecision, ToJSONSchemaContext, ToJSONSchemaParams, ToTemplateLiteral, TypeParams, ZodStandardJSONSchemaPayload, ZodStandardSchemaWithJSON$1 as ZodStandardSchemaWithJSON, _$ZodType, _$ZodTypeInternals, _any, _array, _base64, _base64url, _bigint, _boolean, _catch$1 as _catch, _check, _cidrv4, _cidrv6, _coercedBigint, _coercedBoolean, _coercedDate, _coercedNumber, _coercedString, _cuid, _cuid2, _custom, _date, _decode, _decodeAsync, _default$1 as _default, _discriminatedUnion, _e164, _email, _emoji, _encode, _encodeAsync, _endsWith, _enum$1 as _enum, _file, _float32, _float64, _gt, _gte, _guid, _includes, _int, _int32, _int64, _intersection, _ipv4, _ipv6, _isoDate, _isoDateTime, _isoDuration, _isoTime, _jwt, _ksuid, _lazy, _length, _literal, _lowercase, _lt, _lte, _mac, _map, _lte as _max, _maxLength, _maxSize, _mime, _gte as _min, _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$1 as _void, _xid, _xor, clone, config, createStandardJSONSchemaMethod, createToJSONSchemaMethod, decode$1 as decode, decodeAsync$1 as decodeAsync, describe$1 as describe, encode$1 as encode, encodeAsync$1 as encodeAsync, extractDefs, finalize, flattenError, formatError, globalConfig, globalRegistry, output as infer, initializeContext, input, isValidBase64, isValidBase64URL, isValidJWT, index_d_exports$1 as locales, meta$1 as meta, output, parse$1 as parse, parseAsync$1 as parseAsync, prettifyError, process, regexes_d_exports as 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, toDotPath, toJSONSchema, treeifyError, util_d_exports as util, version };
|
|
2980
|
+
}
|
|
1769
2981
|
//#endregion
|
|
1770
2982
|
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.d.cts
|
|
2983
|
+
/** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
|
|
2984
|
+
type ZodIssue = $ZodIssue;
|
|
1771
2985
|
/** An Error-like class used to store Zod validation issues. */
|
|
1772
2986
|
interface ZodError<T = unknown> extends $ZodError<T> {
|
|
1773
2987
|
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
@@ -1784,8 +2998,12 @@ interface ZodError<T = unknown> extends $ZodError<T> {
|
|
|
1784
2998
|
isEmpty: boolean;
|
|
1785
2999
|
}
|
|
1786
3000
|
declare const ZodError: $constructor<ZodError>;
|
|
1787
|
-
|
|
1788
|
-
|
|
3001
|
+
declare const ZodRealError: $constructor<ZodError>;
|
|
3002
|
+
/** @deprecated Use `z.core.$ZodRawIssue` instead. */
|
|
3003
|
+
type IssueData = $ZodRawIssue;
|
|
3004
|
+
declare namespace parse_d_exports {
|
|
3005
|
+
export { ZodSafeParseError, ZodSafeParseResult, ZodSafeParseSuccess, decode, decodeAsync, encode, encodeAsync, parse, parseAsync, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync };
|
|
3006
|
+
}
|
|
1789
3007
|
type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
|
|
1790
3008
|
type ZodSafeParseSuccess<T> = {
|
|
1791
3009
|
success: true;
|
|
@@ -1797,6 +3015,24 @@ type ZodSafeParseError<T> = {
|
|
|
1797
3015
|
data?: never;
|
|
1798
3016
|
error: ZodError<T>;
|
|
1799
3017
|
};
|
|
3018
|
+
declare const parse: <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
3019
|
+
callee?: AnyFunc;
|
|
3020
|
+
Err?: $ZodErrorClass;
|
|
3021
|
+
}) => output<T>;
|
|
3022
|
+
declare const parseAsync: <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
3023
|
+
callee?: AnyFunc;
|
|
3024
|
+
Err?: $ZodErrorClass;
|
|
3025
|
+
}) => Promise<output<T>>;
|
|
3026
|
+
declare const safeParse: <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => ZodSafeParseResult<output<T>>;
|
|
3027
|
+
declare const safeParseAsync: <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<T>>>;
|
|
3028
|
+
declare const encode: <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => input<T>;
|
|
3029
|
+
declare const decode: <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => output<T>;
|
|
3030
|
+
declare const encodeAsync: <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<input<T>>;
|
|
3031
|
+
declare const decodeAsync: <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<output<T>>;
|
|
3032
|
+
declare const safeEncode: <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => ZodSafeParseResult<input<T>>;
|
|
3033
|
+
declare const safeDecode: <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => ZodSafeParseResult<output<T>>;
|
|
3034
|
+
declare const safeEncodeAsync: <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<input<T>>>;
|
|
3035
|
+
declare const safeDecodeAsync: <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<T>>>;
|
|
1800
3036
|
//#endregion
|
|
1801
3037
|
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.d.cts
|
|
1802
3038
|
type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
|
|
@@ -1963,6 +3199,142 @@ interface ZodString extends _ZodString<$ZodStringInternals<string>> {
|
|
|
1963
3199
|
duration(params?: string | $ZodCheckISODurationParams): this;
|
|
1964
3200
|
}
|
|
1965
3201
|
declare const ZodString: $constructor<ZodString>;
|
|
3202
|
+
declare function string$1(params?: string | $ZodStringParams): ZodString;
|
|
3203
|
+
declare function string$1<T extends string>(params?: string | $ZodStringParams): $ZodType<T, T>;
|
|
3204
|
+
interface ZodStringFormat<Format extends string = string> extends _ZodString<$ZodStringFormatInternals<Format>> {}
|
|
3205
|
+
declare const ZodStringFormat: $constructor<ZodStringFormat>;
|
|
3206
|
+
interface ZodEmail extends ZodStringFormat<"email"> {
|
|
3207
|
+
_zod: $ZodEmailInternals;
|
|
3208
|
+
}
|
|
3209
|
+
declare const ZodEmail: $constructor<ZodEmail>;
|
|
3210
|
+
declare function email(params?: string | $ZodEmailParams): ZodEmail;
|
|
3211
|
+
interface ZodGUID extends ZodStringFormat<"guid"> {
|
|
3212
|
+
_zod: $ZodGUIDInternals;
|
|
3213
|
+
}
|
|
3214
|
+
declare const ZodGUID: $constructor<ZodGUID>;
|
|
3215
|
+
declare function guid(params?: string | $ZodGUIDParams): ZodGUID;
|
|
3216
|
+
interface ZodUUID extends ZodStringFormat<"uuid"> {
|
|
3217
|
+
_zod: $ZodUUIDInternals;
|
|
3218
|
+
}
|
|
3219
|
+
declare const ZodUUID: $constructor<ZodUUID>;
|
|
3220
|
+
declare function uuid(params?: string | $ZodUUIDParams): ZodUUID;
|
|
3221
|
+
declare function uuidv4(params?: string | $ZodUUIDv4Params): ZodUUID;
|
|
3222
|
+
declare function uuidv6(params?: string | $ZodUUIDv6Params): ZodUUID;
|
|
3223
|
+
declare function uuidv7(params?: string | $ZodUUIDv7Params): ZodUUID;
|
|
3224
|
+
interface ZodURL extends ZodStringFormat<"url"> {
|
|
3225
|
+
_zod: $ZodURLInternals;
|
|
3226
|
+
}
|
|
3227
|
+
declare const ZodURL: $constructor<ZodURL>;
|
|
3228
|
+
declare function url(params?: string | $ZodURLParams): ZodURL;
|
|
3229
|
+
declare function httpUrl(params?: string | Omit<$ZodURLParams, "protocol" | "hostname">): ZodURL;
|
|
3230
|
+
interface ZodEmoji extends ZodStringFormat<"emoji"> {
|
|
3231
|
+
_zod: $ZodEmojiInternals;
|
|
3232
|
+
}
|
|
3233
|
+
declare const ZodEmoji: $constructor<ZodEmoji>;
|
|
3234
|
+
declare function emoji(params?: string | $ZodEmojiParams): ZodEmoji;
|
|
3235
|
+
interface ZodNanoID extends ZodStringFormat<"nanoid"> {
|
|
3236
|
+
_zod: $ZodNanoIDInternals;
|
|
3237
|
+
}
|
|
3238
|
+
declare const ZodNanoID: $constructor<ZodNanoID>;
|
|
3239
|
+
declare function nanoid(params?: string | $ZodNanoIDParams): ZodNanoID;
|
|
3240
|
+
/**
|
|
3241
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
3242
|
+
* (timestamps embedded in the id). Use {@link ZodCUID2} instead.
|
|
3243
|
+
* See https://github.com/paralleldrive/cuid.
|
|
3244
|
+
*/
|
|
3245
|
+
interface ZodCUID extends ZodStringFormat<"cuid"> {
|
|
3246
|
+
_zod: $ZodCUIDInternals;
|
|
3247
|
+
}
|
|
3248
|
+
/**
|
|
3249
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
3250
|
+
* (timestamps embedded in the id). Use {@link ZodCUID2} instead.
|
|
3251
|
+
* See https://github.com/paralleldrive/cuid.
|
|
3252
|
+
*/
|
|
3253
|
+
declare const ZodCUID: $constructor<ZodCUID>;
|
|
3254
|
+
/**
|
|
3255
|
+
* Validates a CUID v1 string.
|
|
3256
|
+
*
|
|
3257
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
3258
|
+
* (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.
|
|
3259
|
+
* See https://github.com/paralleldrive/cuid.
|
|
3260
|
+
*/
|
|
3261
|
+
declare function cuid(params?: string | $ZodCUIDParams): ZodCUID;
|
|
3262
|
+
interface ZodCUID2 extends ZodStringFormat<"cuid2"> {
|
|
3263
|
+
_zod: $ZodCUID2Internals;
|
|
3264
|
+
}
|
|
3265
|
+
declare const ZodCUID2: $constructor<ZodCUID2>;
|
|
3266
|
+
declare function cuid2(params?: string | $ZodCUID2Params): ZodCUID2;
|
|
3267
|
+
interface ZodULID extends ZodStringFormat<"ulid"> {
|
|
3268
|
+
_zod: $ZodULIDInternals;
|
|
3269
|
+
}
|
|
3270
|
+
declare const ZodULID: $constructor<ZodULID>;
|
|
3271
|
+
declare function ulid(params?: string | $ZodULIDParams): ZodULID;
|
|
3272
|
+
interface ZodXID extends ZodStringFormat<"xid"> {
|
|
3273
|
+
_zod: $ZodXIDInternals;
|
|
3274
|
+
}
|
|
3275
|
+
declare const ZodXID: $constructor<ZodXID>;
|
|
3276
|
+
declare function xid(params?: string | $ZodXIDParams): ZodXID;
|
|
3277
|
+
interface ZodKSUID extends ZodStringFormat<"ksuid"> {
|
|
3278
|
+
_zod: $ZodKSUIDInternals;
|
|
3279
|
+
}
|
|
3280
|
+
declare const ZodKSUID: $constructor<ZodKSUID>;
|
|
3281
|
+
declare function ksuid(params?: string | $ZodKSUIDParams): ZodKSUID;
|
|
3282
|
+
interface ZodIPv4 extends ZodStringFormat<"ipv4"> {
|
|
3283
|
+
_zod: $ZodIPv4Internals;
|
|
3284
|
+
}
|
|
3285
|
+
declare const ZodIPv4: $constructor<ZodIPv4>;
|
|
3286
|
+
declare function ipv4(params?: string | $ZodIPv4Params): ZodIPv4;
|
|
3287
|
+
interface ZodMAC extends ZodStringFormat<"mac"> {
|
|
3288
|
+
_zod: $ZodMACInternals;
|
|
3289
|
+
}
|
|
3290
|
+
declare const ZodMAC: $constructor<ZodMAC>;
|
|
3291
|
+
declare function mac(params?: string | $ZodMACParams): ZodMAC;
|
|
3292
|
+
interface ZodIPv6 extends ZodStringFormat<"ipv6"> {
|
|
3293
|
+
_zod: $ZodIPv6Internals;
|
|
3294
|
+
}
|
|
3295
|
+
declare const ZodIPv6: $constructor<ZodIPv6>;
|
|
3296
|
+
declare function ipv6(params?: string | $ZodIPv6Params): ZodIPv6;
|
|
3297
|
+
interface ZodCIDRv4 extends ZodStringFormat<"cidrv4"> {
|
|
3298
|
+
_zod: $ZodCIDRv4Internals;
|
|
3299
|
+
}
|
|
3300
|
+
declare const ZodCIDRv4: $constructor<ZodCIDRv4>;
|
|
3301
|
+
declare function cidrv4(params?: string | $ZodCIDRv4Params): ZodCIDRv4;
|
|
3302
|
+
interface ZodCIDRv6 extends ZodStringFormat<"cidrv6"> {
|
|
3303
|
+
_zod: $ZodCIDRv6Internals;
|
|
3304
|
+
}
|
|
3305
|
+
declare const ZodCIDRv6: $constructor<ZodCIDRv6>;
|
|
3306
|
+
declare function cidrv6(params?: string | $ZodCIDRv6Params): ZodCIDRv6;
|
|
3307
|
+
interface ZodBase64 extends ZodStringFormat<"base64"> {
|
|
3308
|
+
_zod: $ZodBase64Internals;
|
|
3309
|
+
}
|
|
3310
|
+
declare const ZodBase64: $constructor<ZodBase64>;
|
|
3311
|
+
declare function base64(params?: string | $ZodBase64Params): ZodBase64;
|
|
3312
|
+
interface ZodBase64URL extends ZodStringFormat<"base64url"> {
|
|
3313
|
+
_zod: $ZodBase64URLInternals;
|
|
3314
|
+
}
|
|
3315
|
+
declare const ZodBase64URL: $constructor<ZodBase64URL>;
|
|
3316
|
+
declare function base64url(params?: string | $ZodBase64URLParams): ZodBase64URL;
|
|
3317
|
+
interface ZodE164 extends ZodStringFormat<"e164"> {
|
|
3318
|
+
_zod: $ZodE164Internals;
|
|
3319
|
+
}
|
|
3320
|
+
declare const ZodE164: $constructor<ZodE164>;
|
|
3321
|
+
declare function e164(params?: string | $ZodE164Params): ZodE164;
|
|
3322
|
+
interface ZodJWT extends ZodStringFormat<"jwt"> {
|
|
3323
|
+
_zod: $ZodJWTInternals;
|
|
3324
|
+
}
|
|
3325
|
+
declare const ZodJWT: $constructor<ZodJWT>;
|
|
3326
|
+
declare function jwt(params?: string | $ZodJWTParams): ZodJWT;
|
|
3327
|
+
interface ZodCustomStringFormat<Format extends string = string> extends ZodStringFormat<Format>, $ZodCustomStringFormat<Format> {
|
|
3328
|
+
_zod: $ZodCustomStringFormatInternals<Format>;
|
|
3329
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3330
|
+
}
|
|
3331
|
+
declare const ZodCustomStringFormat: $constructor<ZodCustomStringFormat>;
|
|
3332
|
+
declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => MaybeAsync<unknown>) | RegExp, _params?: string | $ZodStringFormatParams): ZodCustomStringFormat<Format>;
|
|
3333
|
+
declare function hostname(_params?: string | $ZodStringFormatParams): ZodCustomStringFormat<"hostname">;
|
|
3334
|
+
declare function hex(_params?: string | $ZodStringFormatParams): ZodCustomStringFormat<"hex">;
|
|
3335
|
+
declare function hash<Alg extends HashAlgorithm, Enc extends HashEncoding = "hex">(alg: Alg, params?: {
|
|
3336
|
+
enc?: Enc;
|
|
3337
|
+
} & $ZodStringFormatParams): ZodCustomStringFormat<`${Alg}_${Enc}`>;
|
|
1966
3338
|
interface _ZodNumber<Internals extends $ZodNumberInternals = $ZodNumberInternals> extends _ZodType<Internals> {
|
|
1967
3339
|
gt(value: number, params?: string | $ZodCheckGreaterThanParams): this;
|
|
1968
3340
|
/** Identical to .min() */
|
|
@@ -1995,16 +3367,84 @@ interface _ZodNumber<Internals extends $ZodNumberInternals = $ZodNumberInternals
|
|
|
1995
3367
|
}
|
|
1996
3368
|
interface ZodNumber extends _ZodNumber<$ZodNumberInternals<number>> {}
|
|
1997
3369
|
declare const ZodNumber: $constructor<ZodNumber>;
|
|
3370
|
+
declare function number$1(params?: string | $ZodNumberParams): ZodNumber;
|
|
1998
3371
|
interface ZodNumberFormat extends ZodNumber {
|
|
1999
3372
|
_zod: $ZodNumberFormatInternals;
|
|
2000
3373
|
}
|
|
2001
3374
|
declare const ZodNumberFormat: $constructor<ZodNumberFormat>;
|
|
2002
3375
|
interface ZodInt extends ZodNumberFormat {}
|
|
3376
|
+
declare function int(params?: string | $ZodCheckNumberFormatParams): ZodInt;
|
|
3377
|
+
interface ZodFloat32 extends ZodNumberFormat {}
|
|
3378
|
+
declare function float32(params?: string | $ZodCheckNumberFormatParams): ZodFloat32;
|
|
3379
|
+
interface ZodFloat64 extends ZodNumberFormat {}
|
|
3380
|
+
declare function float64(params?: string | $ZodCheckNumberFormatParams): ZodFloat64;
|
|
3381
|
+
interface ZodInt32 extends ZodNumberFormat {}
|
|
3382
|
+
declare function int32(params?: string | $ZodCheckNumberFormatParams): ZodInt32;
|
|
3383
|
+
interface ZodUInt32 extends ZodNumberFormat {}
|
|
3384
|
+
declare function uint32(params?: string | $ZodCheckNumberFormatParams): ZodUInt32;
|
|
2003
3385
|
interface _ZodBoolean<T extends $ZodBooleanInternals = $ZodBooleanInternals> extends _ZodType<T> {}
|
|
2004
3386
|
interface ZodBoolean extends _ZodBoolean<$ZodBooleanInternals<boolean>> {}
|
|
2005
3387
|
declare const ZodBoolean: $constructor<ZodBoolean>;
|
|
3388
|
+
declare function boolean$1(params?: string | $ZodBooleanParams): ZodBoolean;
|
|
3389
|
+
interface _ZodBigInt<T extends $ZodBigIntInternals = $ZodBigIntInternals> extends _ZodType<T> {
|
|
3390
|
+
gte(value: bigint, params?: string | $ZodCheckGreaterThanParams): this;
|
|
3391
|
+
/** Alias of `.gte()` */
|
|
3392
|
+
min(value: bigint, params?: string | $ZodCheckGreaterThanParams): this;
|
|
3393
|
+
gt(value: bigint, params?: string | $ZodCheckGreaterThanParams): this;
|
|
3394
|
+
/** Alias of `.lte()` */
|
|
3395
|
+
lte(value: bigint, params?: string | $ZodCheckLessThanParams): this;
|
|
3396
|
+
max(value: bigint, params?: string | $ZodCheckLessThanParams): this;
|
|
3397
|
+
lt(value: bigint, params?: string | $ZodCheckLessThanParams): this;
|
|
3398
|
+
positive(params?: string | $ZodCheckGreaterThanParams): this;
|
|
3399
|
+
negative(params?: string | $ZodCheckLessThanParams): this;
|
|
3400
|
+
nonpositive(params?: string | $ZodCheckLessThanParams): this;
|
|
3401
|
+
nonnegative(params?: string | $ZodCheckGreaterThanParams): this;
|
|
3402
|
+
multipleOf(value: bigint, params?: string | $ZodCheckMultipleOfParams): this;
|
|
3403
|
+
minValue: bigint | null;
|
|
3404
|
+
maxValue: bigint | null;
|
|
3405
|
+
format: string | null;
|
|
3406
|
+
}
|
|
3407
|
+
interface ZodBigInt extends _ZodBigInt<$ZodBigIntInternals<bigint>> {}
|
|
3408
|
+
declare const ZodBigInt: $constructor<ZodBigInt>;
|
|
3409
|
+
declare function bigint$1(params?: string | $ZodBigIntParams): ZodBigInt;
|
|
3410
|
+
interface ZodBigIntFormat extends ZodBigInt {
|
|
3411
|
+
_zod: $ZodBigIntFormatInternals;
|
|
3412
|
+
}
|
|
3413
|
+
declare const ZodBigIntFormat: $constructor<ZodBigIntFormat>;
|
|
3414
|
+
declare function int64(params?: string | $ZodBigIntFormatParams): ZodBigIntFormat;
|
|
3415
|
+
declare function uint64(params?: string | $ZodBigIntFormatParams): ZodBigIntFormat;
|
|
3416
|
+
interface ZodSymbol extends _ZodType<$ZodSymbolInternals> {}
|
|
3417
|
+
declare const ZodSymbol: $constructor<ZodSymbol>;
|
|
3418
|
+
declare function symbol(params?: string | $ZodSymbolParams): ZodSymbol;
|
|
3419
|
+
interface ZodUndefined extends _ZodType<$ZodUndefinedInternals> {}
|
|
3420
|
+
declare const ZodUndefined: $constructor<ZodUndefined>;
|
|
3421
|
+
declare function _undefined(params?: string | $ZodUndefinedParams): ZodUndefined;
|
|
3422
|
+
interface ZodNull extends _ZodType<$ZodNullInternals> {}
|
|
3423
|
+
declare const ZodNull: $constructor<ZodNull>;
|
|
3424
|
+
declare function _null(params?: string | $ZodNullParams): ZodNull;
|
|
2006
3425
|
interface ZodAny extends _ZodType<$ZodAnyInternals> {}
|
|
2007
3426
|
declare const ZodAny: $constructor<ZodAny>;
|
|
3427
|
+
declare function any(): ZodAny;
|
|
3428
|
+
interface ZodUnknown extends _ZodType<$ZodUnknownInternals> {}
|
|
3429
|
+
declare const ZodUnknown: $constructor<ZodUnknown>;
|
|
3430
|
+
declare function unknown(): ZodUnknown;
|
|
3431
|
+
interface ZodNever extends _ZodType<$ZodNeverInternals> {}
|
|
3432
|
+
declare const ZodNever: $constructor<ZodNever>;
|
|
3433
|
+
declare function never(params?: string | $ZodNeverParams): ZodNever;
|
|
3434
|
+
interface ZodVoid extends _ZodType<$ZodVoidInternals> {}
|
|
3435
|
+
declare const ZodVoid: $constructor<ZodVoid>;
|
|
3436
|
+
declare function _void(params?: string | $ZodVoidParams): ZodVoid;
|
|
3437
|
+
interface _ZodDate<T extends $ZodDateInternals = $ZodDateInternals> extends _ZodType<T> {
|
|
3438
|
+
min(value: number | Date, params?: string | $ZodCheckGreaterThanParams): this;
|
|
3439
|
+
max(value: number | Date, params?: string | $ZodCheckLessThanParams): this;
|
|
3440
|
+
/** @deprecated Not recommended. */
|
|
3441
|
+
minDate: Date | null;
|
|
3442
|
+
/** @deprecated Not recommended. */
|
|
3443
|
+
maxDate: Date | null;
|
|
3444
|
+
}
|
|
3445
|
+
interface ZodDate extends _ZodDate<$ZodDateInternals<Date>> {}
|
|
3446
|
+
declare const ZodDate: $constructor<ZodDate>;
|
|
3447
|
+
declare function date$2(params?: string | $ZodDateParams): ZodDate;
|
|
2008
3448
|
interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T>>, $ZodArray<T> {
|
|
2009
3449
|
element: T;
|
|
2010
3450
|
min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
|
|
@@ -2015,6 +3455,8 @@ interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInte
|
|
|
2015
3455
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2016
3456
|
}
|
|
2017
3457
|
declare const ZodArray: $constructor<ZodArray>;
|
|
3458
|
+
declare function array<T extends SomeType>(element: T, params?: string | $ZodArrayParams): ZodArray<T>;
|
|
3459
|
+
declare function keyof<T extends ZodObject>(schema: T): ZodEnum<KeysEnum<T["_zod"]["output"]>>;
|
|
2018
3460
|
type SafeExtendShape<Base extends $ZodShape, Ext extends $ZodLooseShape> = { [K in keyof Ext]: K extends keyof Base ? output<Ext[K]> extends output<Base[K]> ? input<Ext[K]> extends input<Base[K]> ? Ext[K] : never : never : Ext[K]; };
|
|
2019
3461
|
interface ZodObject<
|
|
2020
3462
|
/** @ts-ignore Cast variance */
|
|
@@ -2046,21 +3488,73 @@ out Shape extends $ZodShape = $ZodLooseShape, out Config extends $ZodObjectConfi
|
|
|
2046
3488
|
required<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ -readonly [k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k]; }, Config>;
|
|
2047
3489
|
}
|
|
2048
3490
|
declare const ZodObject: $constructor<ZodObject>;
|
|
3491
|
+
declare function object<T extends $ZodLooseShape = Partial<Record<never, SomeType>>>(shape?: T, params?: string | $ZodObjectParams): ZodObject<Writeable<T>, $strip>;
|
|
3492
|
+
declare function strictObject<T extends $ZodLooseShape>(shape: T, params?: string | $ZodObjectParams): ZodObject<Writeable<T>, $strict>;
|
|
3493
|
+
declare function looseObject<T extends $ZodLooseShape>(shape: T, params?: string | $ZodObjectParams): ZodObject<Writeable<T>, $loose>;
|
|
2049
3494
|
interface ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T>>, $ZodUnion<T> {
|
|
2050
3495
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2051
3496
|
options: T;
|
|
2052
3497
|
}
|
|
2053
3498
|
declare const ZodUnion: $constructor<ZodUnion>;
|
|
3499
|
+
declare function union<const T extends readonly SomeType[]>(options: T, params?: string | $ZodUnionParams): ZodUnion<T>;
|
|
3500
|
+
interface ZodXor<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodXorInternals<T>>, $ZodXor<T> {
|
|
3501
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3502
|
+
options: T;
|
|
3503
|
+
}
|
|
3504
|
+
declare const ZodXor: $constructor<ZodXor>;
|
|
3505
|
+
/** Creates an exclusive union (XOR) where exactly one option must match.
|
|
3506
|
+
* Unlike regular unions that succeed when any option matches, xor fails if
|
|
3507
|
+
* zero or more than one option matches the input. */
|
|
3508
|
+
declare function xor<const T extends readonly SomeType[]>(options: T, params?: string | $ZodXorParams): ZodXor<T>;
|
|
3509
|
+
interface ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends ZodUnion<Options>, $ZodDiscriminatedUnion<Options, Disc> {
|
|
3510
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3511
|
+
_zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
|
|
3512
|
+
def: $ZodDiscriminatedUnionDef<Options, Disc>;
|
|
3513
|
+
}
|
|
3514
|
+
declare const ZodDiscriminatedUnion: $constructor<ZodDiscriminatedUnion>;
|
|
3515
|
+
declare function discriminatedUnion<Types extends readonly [$ZodTypeDiscriminable<Disc>, ...$ZodTypeDiscriminable<Disc>[]], Disc extends string>(discriminator: Disc, options: Types, params?: string | $ZodDiscriminatedUnionParams): ZodDiscriminatedUnion<Types, Disc>;
|
|
2054
3516
|
interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A, B>>, $ZodIntersection<A, B> {
|
|
2055
3517
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2056
3518
|
}
|
|
2057
3519
|
declare const ZodIntersection: $constructor<ZodIntersection>;
|
|
3520
|
+
declare function intersection<T extends SomeType, U extends SomeType>(left: T, right: U): ZodIntersection<T, U>;
|
|
3521
|
+
interface ZodTuple<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends _ZodType<$ZodTupleInternals<T, Rest>>, $ZodTuple<T, Rest> {
|
|
3522
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3523
|
+
rest<Rest extends SomeType = $ZodType>(rest: Rest): ZodTuple<T, Rest>;
|
|
3524
|
+
}
|
|
3525
|
+
declare const ZodTuple: $constructor<ZodTuple>;
|
|
3526
|
+
declare function tuple<T extends readonly [SomeType, ...SomeType[]]>(items: T, params?: string | $ZodTupleParams): ZodTuple<T, null>;
|
|
3527
|
+
declare function tuple<T extends readonly [SomeType, ...SomeType[]], Rest extends SomeType>(items: T, rest: Rest, params?: string | $ZodTupleParams): ZodTuple<T, Rest>;
|
|
3528
|
+
declare function tuple(items: [], params?: string | $ZodTupleParams): ZodTuple<[], null>;
|
|
2058
3529
|
interface ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends _ZodType<$ZodRecordInternals<Key, Value>>, $ZodRecord<Key, Value> {
|
|
2059
3530
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2060
3531
|
keyType: Key;
|
|
2061
3532
|
valueType: Value;
|
|
2062
3533
|
}
|
|
2063
3534
|
declare const ZodRecord: $constructor<ZodRecord>;
|
|
3535
|
+
declare function record<Key extends $ZodRecordKey, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | $ZodRecordParams): ZodRecord<Key, Value>;
|
|
3536
|
+
declare function partialRecord<Key extends $ZodRecordKey, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | $ZodRecordParams): ZodRecord<Key & $partial, Value>;
|
|
3537
|
+
declare function looseRecord<Key extends $ZodRecordKey, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | $ZodRecordParams): ZodRecord<Key, Value>;
|
|
3538
|
+
interface ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends _ZodType<$ZodMapInternals<Key, Value>>, $ZodMap<Key, Value> {
|
|
3539
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3540
|
+
keyType: Key;
|
|
3541
|
+
valueType: Value;
|
|
3542
|
+
min(minSize: number, params?: string | $ZodCheckMinSizeParams): this;
|
|
3543
|
+
nonempty(params?: string | $ZodCheckMinSizeParams): this;
|
|
3544
|
+
max(maxSize: number, params?: string | $ZodCheckMaxSizeParams): this;
|
|
3545
|
+
size(size: number, params?: string | $ZodCheckSizeEqualsParams): this;
|
|
3546
|
+
}
|
|
3547
|
+
declare const ZodMap: $constructor<ZodMap>;
|
|
3548
|
+
declare function map<Key extends SomeType, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | $ZodMapParams): ZodMap<Key, Value>;
|
|
3549
|
+
interface ZodSet<T extends SomeType = $ZodType> extends _ZodType<$ZodSetInternals<T>>, $ZodSet<T> {
|
|
3550
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3551
|
+
min(minSize: number, params?: string | $ZodCheckMinSizeParams): this;
|
|
3552
|
+
nonempty(params?: string | $ZodCheckMinSizeParams): this;
|
|
3553
|
+
max(maxSize: number, params?: string | $ZodCheckMaxSizeParams): this;
|
|
3554
|
+
size(size: number, params?: string | $ZodCheckSizeEqualsParams): this;
|
|
3555
|
+
}
|
|
3556
|
+
declare const ZodSet: $constructor<ZodSet>;
|
|
3557
|
+
declare function set<Value extends SomeType>(valueType: Value, params?: string | $ZodSetParams): ZodSet<Value>;
|
|
2064
3558
|
interface ZodEnum<
|
|
2065
3559
|
/** @ts-ignore Cast variance */
|
|
2066
3560
|
out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
|
|
@@ -2071,6 +3565,16 @@ out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodE
|
|
|
2071
3565
|
exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Omit<T, U[number]>>>;
|
|
2072
3566
|
}
|
|
2073
3567
|
declare const ZodEnum: $constructor<ZodEnum>;
|
|
3568
|
+
declare function _enum<const T extends readonly string[]>(values: T, params?: string | $ZodEnumParams): ZodEnum<ToEnum<T[number]>>;
|
|
3569
|
+
declare function _enum<const T extends EnumLike>(entries: T, params?: string | $ZodEnumParams): ZodEnum<T>;
|
|
3570
|
+
/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
|
|
3571
|
+
*
|
|
3572
|
+
* ```ts
|
|
3573
|
+
* enum Colors { red, green, blue }
|
|
3574
|
+
* z.enum(Colors);
|
|
3575
|
+
* ```
|
|
3576
|
+
*/
|
|
3577
|
+
declare function nativeEnum<T extends EnumLike>(entries: T, params?: string | $ZodEnumParams): ZodEnum<T>;
|
|
2074
3578
|
interface ZodLiteral<T extends Literal = Literal> extends _ZodType<$ZodLiteralInternals<T>>, $ZodLiteral<T> {
|
|
2075
3579
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2076
3580
|
values: Set<T>;
|
|
@@ -2078,25 +3582,40 @@ interface ZodLiteral<T extends Literal = Literal> extends _ZodType<$ZodLiteralIn
|
|
|
2078
3582
|
value: T;
|
|
2079
3583
|
}
|
|
2080
3584
|
declare const ZodLiteral: $constructor<ZodLiteral>;
|
|
3585
|
+
declare function literal<const T extends ReadonlyArray<Literal>>(value: T, params?: string | $ZodLiteralParams): ZodLiteral<T[number]>;
|
|
3586
|
+
declare function literal<const T extends Literal>(value: T, params?: string | $ZodLiteralParams): ZodLiteral<T>;
|
|
3587
|
+
interface ZodFile extends _ZodType<$ZodFileInternals>, $ZodFile {
|
|
3588
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3589
|
+
min(size: number, params?: string | $ZodCheckMinSizeParams): this;
|
|
3590
|
+
max(size: number, params?: string | $ZodCheckMaxSizeParams): this;
|
|
3591
|
+
mime(types: MimeTypes | Array<MimeTypes>, params?: string | $ZodCheckMimeTypeParams): this;
|
|
3592
|
+
}
|
|
3593
|
+
declare const ZodFile: $constructor<ZodFile>;
|
|
3594
|
+
declare function file(params?: string | $ZodFileParams): ZodFile;
|
|
2081
3595
|
interface ZodTransform<O = unknown, I = unknown> extends _ZodType<$ZodTransformInternals<O, I>>, $ZodTransform<O, I> {
|
|
2082
3596
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2083
3597
|
}
|
|
2084
3598
|
declare const ZodTransform: $constructor<ZodTransform>;
|
|
3599
|
+
declare function transform<I = unknown, O = I>(fn: (input: I, ctx: $RefinementCtx) => O): ZodTransform<Awaited<O>, I>;
|
|
2085
3600
|
interface ZodOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodOptionalInternals<T>>, $ZodOptional<T> {
|
|
2086
3601
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2087
3602
|
unwrap(): T;
|
|
2088
3603
|
}
|
|
2089
3604
|
declare const ZodOptional: $constructor<ZodOptional>;
|
|
3605
|
+
declare function optional<T extends SomeType>(innerType: T): ZodOptional<T>;
|
|
2090
3606
|
interface ZodExactOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodExactOptionalInternals<T>>, $ZodExactOptional<T> {
|
|
2091
3607
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2092
3608
|
unwrap(): T;
|
|
2093
3609
|
}
|
|
2094
3610
|
declare const ZodExactOptional: $constructor<ZodExactOptional>;
|
|
3611
|
+
declare function exactOptional<T extends SomeType>(innerType: T): ZodExactOptional<T>;
|
|
2095
3612
|
interface ZodNullable<T extends SomeType = $ZodType> extends _ZodType<$ZodNullableInternals<T>>, $ZodNullable<T> {
|
|
2096
3613
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2097
3614
|
unwrap(): T;
|
|
2098
3615
|
}
|
|
2099
3616
|
declare const ZodNullable: $constructor<ZodNullable>;
|
|
3617
|
+
declare function nullable<T extends SomeType>(innerType: T): ZodNullable<T>;
|
|
3618
|
+
declare function nullish<T extends SomeType>(innerType: T): ZodOptional<ZodNullable<T>>;
|
|
2100
3619
|
interface ZodDefault<T extends SomeType = $ZodType> extends _ZodType<$ZodDefaultInternals<T>>, $ZodDefault<T> {
|
|
2101
3620
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2102
3621
|
unwrap(): T;
|
|
@@ -2104,16 +3623,25 @@ interface ZodDefault<T extends SomeType = $ZodType> extends _ZodType<$ZodDefault
|
|
|
2104
3623
|
removeDefault(): T;
|
|
2105
3624
|
}
|
|
2106
3625
|
declare const ZodDefault: $constructor<ZodDefault>;
|
|
3626
|
+
declare function _default<T extends SomeType>(innerType: T, defaultValue: NoUndefined<output<T>> | (() => NoUndefined<output<T>>)): ZodDefault<T>;
|
|
2107
3627
|
interface ZodPrefault<T extends SomeType = $ZodType> extends _ZodType<$ZodPrefaultInternals<T>>, $ZodPrefault<T> {
|
|
2108
3628
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2109
3629
|
unwrap(): T;
|
|
2110
3630
|
}
|
|
2111
3631
|
declare const ZodPrefault: $constructor<ZodPrefault>;
|
|
3632
|
+
declare function prefault<T extends SomeType>(innerType: T, defaultValue: input<T> | (() => input<T>)): ZodPrefault<T>;
|
|
2112
3633
|
interface ZodNonOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodNonOptionalInternals<T>>, $ZodNonOptional<T> {
|
|
2113
3634
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2114
3635
|
unwrap(): T;
|
|
2115
3636
|
}
|
|
2116
3637
|
declare const ZodNonOptional: $constructor<ZodNonOptional>;
|
|
3638
|
+
declare function nonoptional<T extends SomeType>(innerType: T, params?: string | $ZodNonOptionalParams): ZodNonOptional<T>;
|
|
3639
|
+
interface ZodSuccess<T extends SomeType = $ZodType> extends _ZodType<$ZodSuccessInternals<T>>, $ZodSuccess<T> {
|
|
3640
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3641
|
+
unwrap(): T;
|
|
3642
|
+
}
|
|
3643
|
+
declare const ZodSuccess: $constructor<ZodSuccess>;
|
|
3644
|
+
declare function success<T extends SomeType>(innerType: T): ZodSuccess<T>;
|
|
2117
3645
|
interface ZodCatch<T extends SomeType = $ZodType> extends _ZodType<$ZodCatchInternals<T>>, $ZodCatch<T> {
|
|
2118
3646
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2119
3647
|
unwrap(): T;
|
|
@@ -2121,20 +3649,192 @@ interface ZodCatch<T extends SomeType = $ZodType> extends _ZodType<$ZodCatchInte
|
|
|
2121
3649
|
removeCatch(): T;
|
|
2122
3650
|
}
|
|
2123
3651
|
declare const ZodCatch: $constructor<ZodCatch>;
|
|
3652
|
+
declare function _catch<T extends SomeType>(innerType: T, catchValue: output<T> | ((ctx: $ZodCatchCtx) => output<T>)): ZodCatch<T>;
|
|
3653
|
+
interface ZodNaN extends _ZodType<$ZodNaNInternals>, $ZodNaN {
|
|
3654
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3655
|
+
}
|
|
3656
|
+
declare const ZodNaN: $constructor<ZodNaN>;
|
|
3657
|
+
declare function nan(params?: string | $ZodNaNParams): ZodNaN;
|
|
2124
3658
|
interface ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A, B>>, $ZodPipe<A, B> {
|
|
2125
3659
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2126
3660
|
in: A;
|
|
2127
3661
|
out: B;
|
|
2128
3662
|
}
|
|
2129
3663
|
declare const ZodPipe: $constructor<ZodPipe>;
|
|
3664
|
+
declare function pipe<const A extends SomeType, B extends $ZodType<unknown, output<A>> = $ZodType<unknown, output<A>>>(in_: A, out: B | $ZodType<unknown, output<A>>): ZodPipe<A, B>;
|
|
3665
|
+
interface ZodCodec<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends ZodPipe<A, B>, $ZodCodec<A, B> {
|
|
3666
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3667
|
+
_zod: $ZodCodecInternals<A, B>;
|
|
3668
|
+
def: $ZodCodecDef<A, B>;
|
|
3669
|
+
}
|
|
3670
|
+
declare const ZodCodec: $constructor<ZodCodec>;
|
|
3671
|
+
declare function codec<const A extends SomeType, B extends SomeType = $ZodType>(in_: A, out: B, params: {
|
|
3672
|
+
decode: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
|
|
3673
|
+
encode: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
|
|
3674
|
+
}): ZodCodec<A, B>;
|
|
3675
|
+
declare function invertCodec<A extends SomeType, B extends SomeType>(codec: ZodCodec<A, B>): ZodCodec<B, A>;
|
|
3676
|
+
interface ZodPreprocess<B extends SomeType = $ZodType> extends ZodPipe<$ZodTransform, B>, $ZodPreprocess<B> {
|
|
3677
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3678
|
+
_zod: $ZodPreprocessInternals<B>;
|
|
3679
|
+
def: $ZodPreprocessDef<B>;
|
|
3680
|
+
}
|
|
3681
|
+
declare const ZodPreprocess: $constructor<ZodPreprocess>;
|
|
2130
3682
|
interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadonlyInternals<T>>, $ZodReadonly<T> {
|
|
2131
3683
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2132
3684
|
unwrap(): T;
|
|
2133
3685
|
}
|
|
2134
3686
|
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
3687
|
+
declare function readonly<T extends SomeType>(innerType: T): ZodReadonly<T>;
|
|
3688
|
+
interface ZodTemplateLiteral<Template extends string = string> extends _ZodType<$ZodTemplateLiteralInternals<Template>>, $ZodTemplateLiteral<Template> {
|
|
3689
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3690
|
+
}
|
|
3691
|
+
declare const ZodTemplateLiteral: $constructor<ZodTemplateLiteral>;
|
|
3692
|
+
declare function templateLiteral<const Parts extends $ZodTemplateLiteralPart[]>(parts: Parts, params?: string | $ZodTemplateLiteralParams): ZodTemplateLiteral<$PartsToTemplateLiteral<Parts>>;
|
|
3693
|
+
interface ZodLazy<T extends SomeType = $ZodType> extends _ZodType<$ZodLazyInternals<T>>, $ZodLazy<T> {
|
|
3694
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3695
|
+
unwrap(): T;
|
|
3696
|
+
}
|
|
3697
|
+
declare const ZodLazy: $constructor<ZodLazy>;
|
|
3698
|
+
declare function lazy<T extends SomeType>(getter: () => T): ZodLazy<T>;
|
|
3699
|
+
interface ZodPromise<T extends SomeType = $ZodType> extends _ZodType<$ZodPromiseInternals<T>>, $ZodPromise<T> {
|
|
3700
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3701
|
+
unwrap(): T;
|
|
3702
|
+
}
|
|
3703
|
+
declare const ZodPromise: $constructor<ZodPromise>;
|
|
3704
|
+
declare function promise<T extends SomeType>(innerType: T): ZodPromise<T>;
|
|
3705
|
+
interface ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> extends _ZodType<$ZodFunctionInternals<Args, Returns>>, $ZodFunction<Args, Returns> {
|
|
3706
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3707
|
+
_def: $ZodFunctionDef<Args, Returns>;
|
|
3708
|
+
_input: $InferInnerFunctionType<Args, Returns>;
|
|
3709
|
+
_output: $InferOuterFunctionType<Args, Returns>;
|
|
3710
|
+
input<const Items extends TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest): ZodFunction<$ZodTuple<Items, Rest>, Returns>;
|
|
3711
|
+
input<NewArgs extends $ZodFunctionIn>(args: NewArgs): ZodFunction<NewArgs, Returns>;
|
|
3712
|
+
input(...args: any[]): ZodFunction<any, Returns>;
|
|
3713
|
+
output<NewReturns extends $ZodType>(output: NewReturns): ZodFunction<Args, NewReturns>;
|
|
3714
|
+
}
|
|
3715
|
+
declare const ZodFunction: $constructor<ZodFunction>;
|
|
3716
|
+
declare function _function(): ZodFunction;
|
|
3717
|
+
declare function _function<const In extends ReadonlyArray<$ZodType>>(params: {
|
|
3718
|
+
input: In;
|
|
3719
|
+
}): ZodFunction<ZodTuple<In, null>, $ZodFunctionOut>;
|
|
3720
|
+
declare function _function<const In extends ReadonlyArray<$ZodType>, const Out extends $ZodFunctionOut = $ZodFunctionOut>(params: {
|
|
3721
|
+
input: In;
|
|
3722
|
+
output: Out;
|
|
3723
|
+
}): ZodFunction<ZodTuple<In, null>, Out>;
|
|
3724
|
+
declare function _function<const In extends $ZodFunctionIn = $ZodFunctionIn>(params: {
|
|
3725
|
+
input: In;
|
|
3726
|
+
}): ZodFunction<In, $ZodFunctionOut>;
|
|
3727
|
+
declare function _function<const Out extends $ZodFunctionOut = $ZodFunctionOut>(params: {
|
|
3728
|
+
output: Out;
|
|
3729
|
+
}): ZodFunction<$ZodFunctionIn, Out>;
|
|
3730
|
+
declare function _function<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodType = $ZodType>(params?: {
|
|
3731
|
+
input: In;
|
|
3732
|
+
output: Out;
|
|
3733
|
+
}): ZodFunction<In, Out>;
|
|
2135
3734
|
interface ZodCustom<O = unknown, I = unknown> extends _ZodType<$ZodCustomInternals<O, I>>, $ZodCustom<O, I> {
|
|
2136
3735
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2137
3736
|
}
|
|
2138
3737
|
declare const ZodCustom: $constructor<ZodCustom>;
|
|
3738
|
+
declare function check<O = unknown>(fn: CheckFn<O>): $ZodCheck<O>;
|
|
3739
|
+
declare function custom<O>(fn?: (data: unknown) => unknown, _params?: string | $ZodCustomParams | undefined): ZodCustom<O, O>;
|
|
3740
|
+
declare function refine<T>(fn: (arg: NoInfer<T>) => MaybeAsync<unknown>, _params?: string | $ZodCustomParams): $ZodCheck<T>;
|
|
3741
|
+
declare function superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>, params?: $ZodSuperRefineParams): $ZodCheck<T>;
|
|
3742
|
+
declare const describe: typeof describe$1;
|
|
3743
|
+
declare const meta: typeof meta$1;
|
|
3744
|
+
type ZodInstanceOfParams = Params<ZodCustom, $ZodIssueCustom, "type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path">;
|
|
3745
|
+
declare function _instanceof<T extends typeof Class>(cls: T, params?: ZodInstanceOfParams): ZodCustom<InstanceType<T>, InstanceType<T>>;
|
|
3746
|
+
declare const stringbool: (_params?: string | $ZodStringBoolParams) => ZodCodec<ZodString, ZodBoolean>;
|
|
3747
|
+
type _ZodJSONSchema = ZodUnion<[ZodString, ZodNumber, ZodBoolean, ZodNull, ZodArray<ZodJSONSchema>, ZodRecord<ZodString, ZodJSONSchema>]>;
|
|
3748
|
+
type _ZodJSONSchemaInternals = _ZodJSONSchema["_zod"];
|
|
3749
|
+
interface ZodJSONSchemaInternals extends _ZodJSONSchemaInternals {
|
|
3750
|
+
output: JSONType;
|
|
3751
|
+
input: JSONType;
|
|
3752
|
+
}
|
|
3753
|
+
interface ZodJSONSchema extends _ZodJSONSchema {
|
|
3754
|
+
_zod: ZodJSONSchemaInternals;
|
|
3755
|
+
}
|
|
3756
|
+
declare function json(params?: string | $ZodCustomParams): ZodJSONSchema;
|
|
3757
|
+
declare function preprocess<A, U extends SomeType, B = unknown>(fn: (arg: B, ctx: $RefinementCtx) => A, schema: U): ZodPreprocess<U>;
|
|
3758
|
+
//#endregion
|
|
3759
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.d.cts
|
|
3760
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
3761
|
+
declare const ZodIssueCode: {
|
|
3762
|
+
readonly invalid_type: "invalid_type";
|
|
3763
|
+
readonly too_big: "too_big";
|
|
3764
|
+
readonly too_small: "too_small";
|
|
3765
|
+
readonly invalid_format: "invalid_format";
|
|
3766
|
+
readonly not_multiple_of: "not_multiple_of";
|
|
3767
|
+
readonly unrecognized_keys: "unrecognized_keys";
|
|
3768
|
+
readonly invalid_union: "invalid_union";
|
|
3769
|
+
readonly invalid_key: "invalid_key";
|
|
3770
|
+
readonly invalid_element: "invalid_element";
|
|
3771
|
+
readonly invalid_value: "invalid_value";
|
|
3772
|
+
readonly custom: "custom";
|
|
3773
|
+
};
|
|
3774
|
+
/** @deprecated Use `z.$ZodFlattenedError` */
|
|
3775
|
+
type inferFlattenedErrors<T extends $ZodType, U = string> = $ZodFlattenedError<output<T>, U>;
|
|
3776
|
+
/** @deprecated Use `z.$ZodFormattedError` */
|
|
3777
|
+
type inferFormattedError<T extends $ZodType<any, any>, U = string> = $ZodFormattedError<output<T>, U>;
|
|
3778
|
+
/** Use `z.$brand` instead */
|
|
3779
|
+
type BRAND<T extends string | number | symbol = string | number | symbol> = {
|
|
3780
|
+
[$brand]: { [k in T]: true; };
|
|
3781
|
+
};
|
|
3782
|
+
/** @deprecated Use `z.config(params)` instead. */
|
|
3783
|
+
declare function setErrorMap(map: $ZodErrorMap): void;
|
|
3784
|
+
/** @deprecated Use `z.config()` instead. */
|
|
3785
|
+
declare function getErrorMap(): $ZodErrorMap<$ZodIssue> | undefined;
|
|
3786
|
+
/** Included for Zod 3 compatibility */
|
|
3787
|
+
type ZodRawShape = $ZodShape;
|
|
3788
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
3789
|
+
declare enum ZodFirstPartyTypeKind {}
|
|
3790
|
+
//#endregion
|
|
3791
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.d.cts
|
|
3792
|
+
type JSONSchemaVersion = "draft-2020-12" | "draft-7" | "draft-4" | "openapi-3.0";
|
|
3793
|
+
interface FromJSONSchemaParams {
|
|
3794
|
+
defaultTarget?: JSONSchemaVersion;
|
|
3795
|
+
registry?: $ZodRegistry<any>;
|
|
3796
|
+
}
|
|
3797
|
+
/**
|
|
3798
|
+
* Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */
|
|
3799
|
+
declare function fromJSONSchema(schema: JSONSchema | boolean, params?: FromJSONSchemaParams): ZodType;
|
|
3800
|
+
declare namespace iso_d_exports {
|
|
3801
|
+
export { ZodISODate, ZodISODateTime, ZodISODuration, ZodISOTime, date$1 as date, datetime, duration, time };
|
|
3802
|
+
}
|
|
3803
|
+
interface ZodISODateTime extends ZodStringFormat {
|
|
3804
|
+
_zod: $ZodISODateTimeInternals;
|
|
3805
|
+
}
|
|
3806
|
+
declare const ZodISODateTime: $constructor<ZodISODateTime>;
|
|
3807
|
+
declare function datetime(params?: string | $ZodISODateTimeParams): ZodISODateTime;
|
|
3808
|
+
interface ZodISODate extends ZodStringFormat {
|
|
3809
|
+
_zod: $ZodISODateInternals;
|
|
3810
|
+
}
|
|
3811
|
+
declare const ZodISODate: $constructor<ZodISODate>;
|
|
3812
|
+
declare function date$1(params?: string | $ZodISODateParams): ZodISODate;
|
|
3813
|
+
interface ZodISOTime extends ZodStringFormat {
|
|
3814
|
+
_zod: $ZodISOTimeInternals;
|
|
3815
|
+
}
|
|
3816
|
+
declare const ZodISOTime: $constructor<ZodISOTime>;
|
|
3817
|
+
declare function time(params?: string | $ZodISOTimeParams): ZodISOTime;
|
|
3818
|
+
interface ZodISODuration extends ZodStringFormat {
|
|
3819
|
+
_zod: $ZodISODurationInternals;
|
|
3820
|
+
}
|
|
3821
|
+
declare const ZodISODuration: $constructor<ZodISODuration>;
|
|
3822
|
+
declare function duration(params?: string | $ZodISODurationParams): ZodISODuration;
|
|
3823
|
+
declare namespace coerce_d_exports {
|
|
3824
|
+
export { ZodCoercedBigInt, ZodCoercedBoolean, ZodCoercedDate, ZodCoercedNumber, ZodCoercedString, bigint, boolean, date, number, string };
|
|
3825
|
+
}
|
|
3826
|
+
interface ZodCoercedString<T = unknown> extends _ZodString<$ZodStringInternals<T>> {}
|
|
3827
|
+
declare function string<T = unknown>(params?: string | $ZodStringParams): ZodCoercedString<T>;
|
|
3828
|
+
interface ZodCoercedNumber<T = unknown> extends _ZodNumber<$ZodNumberInternals<T>> {}
|
|
3829
|
+
declare function number<T = unknown>(params?: string | $ZodNumberParams): ZodCoercedNumber<T>;
|
|
3830
|
+
interface ZodCoercedBoolean<T = unknown> extends _ZodBoolean<$ZodBooleanInternals<T>> {}
|
|
3831
|
+
declare function boolean<T = unknown>(params?: string | $ZodBooleanParams): ZodCoercedBoolean<T>;
|
|
3832
|
+
interface ZodCoercedBigInt<T = unknown> extends _ZodBigInt<$ZodBigIntInternals<T>> {}
|
|
3833
|
+
declare function bigint<T = unknown>(params?: string | $ZodBigIntParams): ZodCoercedBigInt<T>;
|
|
3834
|
+
interface ZodCoercedDate<T = unknown> extends _ZodDate<$ZodDateInternals<T>> {}
|
|
3835
|
+
declare function date<T = unknown>(params?: string | $ZodDateParams): ZodCoercedDate<T>;
|
|
3836
|
+
declare namespace external_d_exports {
|
|
3837
|
+
export { $brand, $input, $output, BRAND, GlobalMeta, output as Infer, IssueData, JSONType, NEVER, $RefinementCtx as RefinementCtx, SafeExtendShape, ZodType as Schema, TimePrecision, output as TypeOf, 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, $ZodErrorMap as ZodErrorMap, ZodExactOptional, ZodFile, $ZodTypes as ZodFirstPartySchemaTypes, ZodFirstPartyTypeKind, $ZodFlattenedError as ZodFlattenedError, ZodFloat32, ZodFloat64, $ZodFormattedError as ZodFormattedError, 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, ZodPreprocess, ZodPromise, ZodRawShape, ZodReadonly, ZodRealError, ZodRecord, ZodSafeParseError, ZodSafeParseResult, ZodSafeParseSuccess, ZodType as ZodSchema, ZodSet, ZodStandardSchemaWithJSON, ZodString, ZodStringFormat, ZodSuccess, ZodSymbol, ZodTemplateLiteral, ZodTransform, ZodTuple, ZodType, ZodType as ZodTypeAny, ZodUInt32, ZodULID, ZodURL, ZodUUID, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, ZodXID, ZodXor, _ZodBigInt, _ZodBoolean, _ZodDate, _ZodNumber, _ZodString, _ZodType, _default, _function, any, array, base64, base64url, bigint$1 as bigint, boolean$1 as boolean, _catch as catch, check, cidrv4, cidrv6, clone, codec, coerce_d_exports as coerce, config, index_d_exports as core, cuid, cuid2, custom, date$2 as date, decode, decodeAsync, describe, discriminatedUnion, e164, email, emoji, encode, encodeAsync, _endsWith as endsWith, _enum as enum, exactOptional, file, flattenError, float32, float64, formatError, fromJSONSchema, _function as function, getErrorMap, globalRegistry, _gt as gt, _gte as gte, guid, hash, hex, hostname, httpUrl, _includes as includes, output as infer, inferFlattenedErrors, inferFormattedError, input, _instanceof as instanceof, int, int32, int64, intersection, invertCodec, ipv4, ipv6, iso_d_exports as iso, json, jwt, keyof, ksuid, lazy, _length as length, literal, index_d_exports$1 as locales, looseObject, looseRecord, _lowercase as lowercase, _lt as lt, _lte as lte, mac, map, _maxLength as maxLength, _maxSize as maxSize, meta, _mime as mime, _minLength as minLength, _minSize as minSize, _multipleOf as multipleOf, nan, nanoid, nativeEnum, _negative as negative, never, _nonnegative as nonnegative, nonoptional, _nonpositive as nonpositive, _normalize as normalize, _null as null, nullable, nullish, number$1 as number, object, optional, output, _overwrite as overwrite, parse, parseAsync, partialRecord, pipe, _positive as positive, prefault, preprocess, prettifyError, promise, _property as property, readonly, record, refine, _regex as regex, regexes_d_exports as regexes, registry, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync, set, setErrorMap, _size as size, _slugify as slugify, _startsWith as startsWith, strictObject, string$1 as string, stringFormat, stringbool, success, superRefine, symbol, templateLiteral, toJSONSchema, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, transform, treeifyError, _trim as trim, tuple, uint32, uint64, ulid, _undefined as undefined, union, unknown, _uppercase as uppercase, url, util_d_exports as util, uuid, uuidv4, uuidv6, uuidv7, _void as void, xid, xor };
|
|
3838
|
+
}
|
|
2139
3839
|
//#endregion
|
|
2140
|
-
export {
|
|
3840
|
+
export { $strip as S, ZodUnion as _, ZodCustom as a, $partial as b, ZodInt as c, ZodObject as d, ZodOptional as f, ZodTransform as g, ZodString as h, ZodBoolean as i, ZodLiteral as l, ZodRecord as m, ZodAny as n, ZodDefault as o, ZodPipe as p, ZodArray as r, ZodEnum as s, external_d_exports as t, ZodNumber as u, input as v, $strict as x, output as y };
|