@morlay/ui-conversation-message-actions 0.1.1 → 0.1.3
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/README.md +16 -29
- package/dist/client.cjs +12 -47
- package/dist/client.d.cts +3 -4
- package/dist/client.d.mts +3 -4
- package/dist/index.d.cts +6 -6
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +22 -13
- package/dist/invariant.d.cts +4 -5
- package/dist/invariant.d.mts +4 -5
- package/dist/{plan-BKgGPZdD.d.mts → plan-CRswvwkb.d.mts} +2 -1
- package/dist/{plan-BUTplrpz.d.cts → plan-DeCB5_cR.d.cts} +2 -1
- package/dist/plan.d.cts +2 -2
- package/dist/plan.d.mts +2 -2
- package/dist/plan.mjs +13 -1
- package/dist/rolldown-runtime-BMI-E3GI.mjs +44 -0
- package/dist/shared-DG86bLrc.mjs +11 -0
- package/dist/testing.d.cts +2041 -93
- package/dist/testing.d.mts +2040 -93
- package/dist/testing.mjs +92 -290
- package/package.json +6 -6
- package/src/client/chat-node/MessageItem.tsx +2 -4
- package/src/client/composer-stats/StatsPills.tsx +25 -50
- package/src/client/composer-stats/token-format.ts +2 -3
- package/src/client/controller.ts +15 -32
- package/src/index.ts +29 -15
- package/src/plan.ts +28 -0
- package/src/shared.ts +12 -1
- package/src/testing.ts +3 -2
- package/dist/shared-BBbOTwy4.mjs +0 -4
package/dist/testing.d.mts
CHANGED
|
@@ -117,17 +117,17 @@ declare const kSchema: unique symbol;
|
|
|
117
117
|
declare global {
|
|
118
118
|
namespace Schemastery {
|
|
119
119
|
/** Convert primitive constructors, constants, and existing schemas into a schema type. */
|
|
120
|
-
type From<X> = X extends string | number | boolean ? Schema<X> : X extends Schema<any, any, SchemaMode> ? X : X extends typeof String ? Schema<string> : X extends typeof Number ? Schema<number> : X extends typeof Boolean ? Schema<boolean> : X extends typeof Function ? Schema<Function, (...args: any[]) => any> : X extends Constructor<infer S> ? Schema<S> : never;
|
|
121
|
-
type TypeS1<X> = X extends Schema<infer S, infer _T, infer _M> ? S : never;
|
|
122
|
-
type Inverse<X> = X extends Schema<infer _S, infer T, infer M> ? (arg: SchemaOutput<T, M>) => void : never;
|
|
120
|
+
type From<X> = X extends string | number | boolean ? Schema$1<X> : X extends Schema$1<any, any, SchemaMode> ? X : X extends typeof String ? Schema$1<string> : X extends typeof Number ? Schema$1<number> : X extends typeof Boolean ? Schema$1<boolean> : X extends typeof Function ? Schema$1<Function, (...args: any[]) => any> : X extends Constructor<infer S> ? Schema$1<S> : never;
|
|
121
|
+
type TypeS1<X> = X extends Schema$1<infer S, infer _T, infer _M> ? S : never;
|
|
122
|
+
type Inverse<X> = X extends Schema$1<infer _S, infer T, infer M> ? (arg: SchemaOutput<T, M>) => void : never;
|
|
123
123
|
/** Input type accepted by a schema-like value. */
|
|
124
124
|
type TypeS<X> = TypeS1<From<X>>;
|
|
125
125
|
/** Output type returned by a schema-like value after validation. */
|
|
126
126
|
type TypeT<X> = ReturnType<From<X>>;
|
|
127
127
|
/** Resolver callback used by custom schema types registered with `Schema.extend()`. */
|
|
128
|
-
type Resolve = (data: any, schema: Schema, options: Options, strict?: boolean) => [any, any?];
|
|
128
|
+
type Resolve = (data: any, schema: Schema$1, options: Options, strict?: boolean) => [any, any?];
|
|
129
129
|
/** Input type accepted by one schema in an intersection. */
|
|
130
|
-
type IntersectS<X> = From<X> extends Schema<infer S, infer _T, infer _M> ? S : never;
|
|
130
|
+
type IntersectS<X> = From<X> extends Schema$1<infer S, infer _T, infer _M> ? S : never;
|
|
131
131
|
/** Output type returned by one schema in an intersection. */
|
|
132
132
|
type IntersectT<X> = Inverse<From<X>> extends ((arg: infer T) => void) ? T : never;
|
|
133
133
|
type TupleS<X extends readonly any[]> = X extends readonly [infer L, ...infer R] ? [TypeS<L>?, ...TupleS<R>] : any[];
|
|
@@ -137,9 +137,9 @@ declare global {
|
|
|
137
137
|
type Constructor<T = any> = new (...args: any[]) => T;
|
|
138
138
|
/** Static constructor and factory methods exposed by the default `Schema` export. */
|
|
139
139
|
interface Static {
|
|
140
|
-
<T = any>(options: Partial<Schema<T>>): Schema<T>;
|
|
141
|
-
new <T = any>(options: Partial<Schema<T>>): Schema<T>;
|
|
142
|
-
prototype: Schema;
|
|
140
|
+
<T = any>(options: Partial<Schema$1<T>>): Schema$1<T>;
|
|
141
|
+
new <T = any>(options: Partial<Schema$1<T>>): Schema$1<T>;
|
|
142
|
+
prototype: Schema$1;
|
|
143
143
|
/** Validate a value against a schema node and return `[output, adaptedInput?]`. */
|
|
144
144
|
resolve: Resolve;
|
|
145
145
|
/** Infer a schema from a primitive value, constructor, or existing schema. */
|
|
@@ -147,51 +147,51 @@ declare global {
|
|
|
147
147
|
/** Register a resolver for a custom schema `type`. */
|
|
148
148
|
extend(type: string, resolve: Resolve): void;
|
|
149
149
|
/** Accept any value without validation. */
|
|
150
|
-
any<T = any>(): Schema<T>;
|
|
150
|
+
any<T = any>(): Schema$1<T>;
|
|
151
151
|
/** Accept only nullable input. */
|
|
152
|
-
never(): Schema<never>;
|
|
152
|
+
never(): Schema$1<never>;
|
|
153
153
|
/** Accept exactly one constant value. */
|
|
154
|
-
const<const T>(value: T): Schema<T>;
|
|
154
|
+
const<const T>(value: T): Schema$1<T>;
|
|
155
155
|
/** Accept strings, with optional metadata constraints added by instance methods. */
|
|
156
|
-
string(): Schema<string>;
|
|
156
|
+
string(): Schema$1<string>;
|
|
157
157
|
/** Accept numbers, with optional range and step constraints. */
|
|
158
|
-
number(): Schema<number>;
|
|
158
|
+
number(): Schema$1<number>;
|
|
159
159
|
/** Accept non-negative integer numbers. */
|
|
160
|
-
natural(): Schema<number>;
|
|
160
|
+
natural(): Schema$1<number>;
|
|
161
161
|
/** Accept a number between 0 and 1 and mark it as a slider. */
|
|
162
|
-
percent(): Schema<number>;
|
|
162
|
+
percent(): Schema$1<number>;
|
|
163
163
|
/** Accept booleans. */
|
|
164
|
-
boolean(): Schema<boolean>;
|
|
164
|
+
boolean(): Schema$1<boolean>;
|
|
165
165
|
/** Accept `Date` instances or parse datetime strings into `Date` objects. */
|
|
166
|
-
date(): Schema<string | Date, Date>;
|
|
166
|
+
date(): Schema$1<string | Date, Date>;
|
|
167
167
|
/** Accept `RegExp` instances or parse strings into regular expressions. */
|
|
168
|
-
regExp(flag?: string): Schema<string | RegExp, RegExp>;
|
|
168
|
+
regExp(flag?: string): Schema$1<string | RegExp, RegExp>;
|
|
169
169
|
/** Accept binary sources and normalize them to `ArrayBufferLike`. */
|
|
170
|
-
arrayBuffer(): Schema<Binary.Source, ArrayBufferLike>;
|
|
171
|
-
arrayBuffer(encoding: 'hex' | 'base64'): Schema<Binary.Source | string, ArrayBufferLike>;
|
|
170
|
+
arrayBuffer(): Schema$1<Binary.Source, ArrayBufferLike>;
|
|
171
|
+
arrayBuffer(encoding: 'hex' | 'base64'): Schema$1<Binary.Source | string, ArrayBufferLike>;
|
|
172
172
|
/** Accept a numeric bitset or string keys and normalize to a number. */
|
|
173
|
-
bitset<K extends string>(bits: Partial<Record<K, number>>): Schema<number | readonly K[], number>;
|
|
173
|
+
bitset<K extends string>(bits: Partial<Record<K, number>>): Schema$1<number | readonly K[], number>;
|
|
174
174
|
/** Accept functions. */
|
|
175
|
-
function(): Schema<Function, (...args: any[]) => any>;
|
|
175
|
+
function(): Schema$1<Function, (...args: any[]) => any>;
|
|
176
176
|
/** Accept instances of a constructor or objects whose constructor name matches. */
|
|
177
|
-
is(constructor: string): Schema;
|
|
178
|
-
is<T>(constructor: Constructor<T>): Schema<T>;
|
|
177
|
+
is(constructor: string): Schema$1;
|
|
178
|
+
is<T>(constructor: Constructor<T>): Schema$1<T>;
|
|
179
179
|
/** Accept arrays whose elements match `inner`. */
|
|
180
|
-
array<X>(inner: X): Schema<TypeS<X>[], TypeT<X>[]>;
|
|
180
|
+
array<X>(inner: X): Schema$1<TypeS<X>[], TypeT<X>[]>;
|
|
181
181
|
/** Accept plain objects with values matching `inner` and optional key schema. */
|
|
182
|
-
dict<X, Y extends Schema<any, string> = Schema<string>>(inner: X, sKey?: Y): Schema<Dict<TypeS<X>, TypeS<Y>>, Dict<TypeT<X>, TypeT<Y>>>;
|
|
182
|
+
dict<X, Y extends Schema$1<any, string> = Schema$1<string>>(inner: X, sKey?: Y): Schema$1<Dict<TypeS<X>, TypeS<Y>>, Dict<TypeT<X>, TypeT<Y>>>;
|
|
183
183
|
/** Accept tuple arrays where each index matches the corresponding schema. */
|
|
184
|
-
tuple<const X extends readonly any[]>(list: X): Schema<TupleS<X>, TupleT<X>>;
|
|
184
|
+
tuple<const X extends readonly any[]>(list: X): Schema$1<TupleS<X>, TupleT<X>>;
|
|
185
185
|
/** Accept plain objects; infer fields from the dictionary, not the enclosing schema's output type. */
|
|
186
|
-
object<X extends Dict>(dict: X): Schema<ObjectS<NoInfer<X>>, ObjectT<NoInfer<X>>>;
|
|
186
|
+
object<X extends Dict>(dict: X): Schema$1<ObjectS<NoInfer<X>>, ObjectT<NoInfer<X>>>;
|
|
187
187
|
/** Accept values matching at least one schema in `list`. */
|
|
188
|
-
union<const X>(list: readonly X[]): Schema<TypeS<X>, TypeT<X>>;
|
|
188
|
+
union<const X>(list: readonly X[]): Schema$1<TypeS<X>, TypeT<X>>;
|
|
189
189
|
/** Accept values matching every schema in `list`, merging object outputs. */
|
|
190
|
-
intersect<const X>(list: readonly X[]): Schema<IntersectS<X>, IntersectT<X>>;
|
|
190
|
+
intersect<const X>(list: readonly X[]): Schema$1<IntersectS<X>, IntersectT<X>>;
|
|
191
191
|
/** Validate with `inner`, then convert the result with `callback`. */
|
|
192
|
-
transform<X, T>(inner: X, callback: (value: TypeS<X>, options: Schemastery.Options) => T, preserve?: boolean): Schema<TypeS<X>, T>;
|
|
192
|
+
transform<X, T>(inner: X, callback: (value: TypeS<X>, options: Schemastery.Options) => T, preserve?: boolean): Schema$1<TypeS<X>, T>;
|
|
193
193
|
/** Defer construction of a recursive schema until validation or serialization. */
|
|
194
|
-
lazy<X extends Schema<any, any, SchemaMode>>(callback: () => X): X;
|
|
194
|
+
lazy<X extends Schema$1<any, any, SchemaMode>>(callback: () => X): X;
|
|
195
195
|
ValidationError: typeof ValidationError;
|
|
196
196
|
}
|
|
197
197
|
/** Runtime validation options shared by all schema calls. */
|
|
@@ -199,7 +199,7 @@ declare global {
|
|
|
199
199
|
/** Remove invalid object properties instead of throwing when possible. */
|
|
200
200
|
autofix?: boolean;
|
|
201
201
|
/** Skip validation for selected values and schema nodes. */
|
|
202
|
-
ignore?(data: any, schema: Schema): boolean;
|
|
202
|
+
ignore?(data: any, schema: Schema$1): boolean;
|
|
203
203
|
/** Path used to format nested validation errors. */
|
|
204
204
|
path?: (keyof any)[];
|
|
205
205
|
}
|
|
@@ -239,69 +239,69 @@ declare global {
|
|
|
239
239
|
uid: number;
|
|
240
240
|
meta: Schemastery.Meta<T>;
|
|
241
241
|
type: string;
|
|
242
|
-
sKey?: Schema;
|
|
243
|
-
inner?: Schema;
|
|
244
|
-
list?: Schema[];
|
|
245
|
-
dict?: Dict<Schema>;
|
|
242
|
+
sKey?: Schema$1;
|
|
243
|
+
inner?: Schema$1;
|
|
244
|
+
list?: Schema$1[];
|
|
245
|
+
dict?: Dict<Schema$1>;
|
|
246
246
|
bits?: Dict<number>;
|
|
247
247
|
callback?: Function;
|
|
248
248
|
constructor?: string | Function;
|
|
249
249
|
builder?: Function;
|
|
250
250
|
value?: T;
|
|
251
|
-
refs?: Dict<Schema>;
|
|
251
|
+
refs?: Dict<Schema$1>;
|
|
252
252
|
preserve?: boolean;
|
|
253
253
|
'~standard': StandardSchemaV1$1.Props;
|
|
254
254
|
/** Format this schema as a compact TypeScript-like type string. */
|
|
255
255
|
toString(inline?: boolean): string;
|
|
256
256
|
/** Serialize this schema, preserving shared and recursive references. */
|
|
257
|
-
toJSON(): Schema<S, T, Mode>;
|
|
257
|
+
toJSON(): Schema$1<S, T, Mode>;
|
|
258
258
|
/** Mark nullable input as invalid unless a default supplies a fallback. */
|
|
259
|
-
required<R extends boolean = true>(value?: R): Schema<S, T, SetRequired<Mode, R>>;
|
|
259
|
+
required<R extends boolean = true>(value?: R): Schema$1<S, T, SetRequired<Mode, R>>;
|
|
260
260
|
/**
|
|
261
261
|
* Parse this config field as a stable reference containing immutable data.
|
|
262
262
|
* @returns a schema whose output supports get(), including when the field is absent.
|
|
263
263
|
*/
|
|
264
|
-
volatile(): Schema<NoInfer<S>, NoInfer<T>, Mode extends 'defined' | 'volatile-defined' ? 'volatile-defined' : 'volatile'>;
|
|
264
|
+
volatile(): Schema$1<NoInfer<S>, NoInfer<T>, Mode extends 'defined' | 'volatile-defined' ? 'volatile-defined' : 'volatile'>;
|
|
265
265
|
/** Hide this schema node from UI renderers. */
|
|
266
|
-
hidden(value?: boolean): Schema<S, T, Mode>;
|
|
266
|
+
hidden(value?: boolean): Schema$1<S, T, Mode>;
|
|
267
267
|
/** Return the default value instead of throwing when validation fails. */
|
|
268
|
-
loose(value?: boolean): Schema<S, T, Mode>;
|
|
268
|
+
loose(value?: boolean): Schema$1<S, T, Mode>;
|
|
269
269
|
/** Attach a renderer role and optional role-specific metadata. */
|
|
270
|
-
role(text: string, extra?: any): Schema<S, T, Mode>;
|
|
270
|
+
role(text: string, extra?: any): Schema$1<S, T, Mode>;
|
|
271
271
|
/** Attach an external documentation link. */
|
|
272
|
-
link(link: string): Schema<S, T, Mode>;
|
|
272
|
+
link(link: string): Schema$1<S, T, Mode>;
|
|
273
273
|
/** Set the fallback value used for nullable input. */
|
|
274
|
-
default(value: T | NoInfer<Partial<S>>): Schema<S, T, SetRequired<Mode, true>>;
|
|
274
|
+
default(value: T | NoInfer<Partial<S>>): Schema$1<S, T, SetRequired<Mode, true>>;
|
|
275
275
|
/** Attach an auxiliary comment for documentation or form UIs. */
|
|
276
|
-
comment(text: string): Schema<S, T, Mode>;
|
|
276
|
+
comment(text: string): Schema$1<S, T, Mode>;
|
|
277
277
|
/** Attach a localized or plain description for documentation or form UIs. */
|
|
278
|
-
description(text: string): Schema<S, T, Mode>;
|
|
278
|
+
description(text: string): Schema$1<S, T, Mode>;
|
|
279
279
|
/** Mark this schema node as disabled for form UIs. */
|
|
280
|
-
disabled(value?: boolean): Schema<S, T, Mode>;
|
|
280
|
+
disabled(value?: boolean): Schema$1<S, T, Mode>;
|
|
281
281
|
/** Request collapsed rendering for nested form UIs. */
|
|
282
|
-
collapse(value?: boolean): Schema<S, T, Mode>;
|
|
282
|
+
collapse(value?: boolean): Schema$1<S, T, Mode>;
|
|
283
283
|
/** Add a deprecated badge to this schema node. */
|
|
284
|
-
deprecated(): Schema<S, T, Mode>;
|
|
284
|
+
deprecated(): Schema$1<S, T, Mode>;
|
|
285
285
|
/** Add an experimental badge to this schema node. */
|
|
286
|
-
experimental(): Schema<S, T, Mode>;
|
|
286
|
+
experimental(): Schema$1<S, T, Mode>;
|
|
287
287
|
/** Require strings to match a regular expression. */
|
|
288
|
-
pattern(regexp: RegExp): Schema<S, T, Mode>;
|
|
288
|
+
pattern(regexp: RegExp): Schema$1<S, T, Mode>;
|
|
289
289
|
/** Set an inclusive maximum for numbers or collection lengths. */
|
|
290
|
-
max(value: number): Schema<S, T, Mode>;
|
|
290
|
+
max(value: number): Schema$1<S, T, Mode>;
|
|
291
291
|
/** Set an inclusive minimum for numbers or collection lengths. */
|
|
292
|
-
min(value: number): Schema<S, T, Mode>;
|
|
292
|
+
min(value: number): Schema$1<S, T, Mode>;
|
|
293
293
|
/** Set the numeric increment constraint. */
|
|
294
|
-
step(value: number): Schema<S, T, Mode>;
|
|
294
|
+
step(value: number): Schema$1<S, T, Mode>;
|
|
295
295
|
/** Add or replace an object property schema. */
|
|
296
|
-
set(key: string, value: Schema): Schema<S, T, Mode>;
|
|
296
|
+
set(key: string, value: Schema$1): Schema$1<S, T, Mode>;
|
|
297
297
|
/** Append a tuple, union, or intersection member schema. */
|
|
298
|
-
push(value: Schema): Schema<S, T, Mode>;
|
|
298
|
+
push(value: Schema$1): Schema$1<S, T, Mode>;
|
|
299
299
|
/** Remove values equal to schema defaults from normalized output. */
|
|
300
300
|
simplify(value?: any): any;
|
|
301
301
|
/** Return a schema clone with descriptions merged from locale messages. */
|
|
302
|
-
i18n(messages: Dict): Schema<S, T, Mode>;
|
|
302
|
+
i18n(messages: Dict): Schema$1<S, T, Mode>;
|
|
303
303
|
/** Attach arbitrary metadata consumed by form renderers and downstream tools. */
|
|
304
|
-
extra<K extends keyof Schemastery.Meta>(key: K, value: Schemastery.Meta[K]): Schema<S, T, Mode>;
|
|
304
|
+
extra<K extends keyof Schemastery.Meta>(key: K, value: Schemastery.Meta[K]): Schema$1<S, T, Mode>;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
declare class ValidationError extends TypeError {
|
|
@@ -313,10 +313,12 @@ declare class ValidationError extends TypeError {
|
|
|
313
313
|
type SchemaMode = 'plain' | 'defined' | 'volatile' | 'volatile-defined';
|
|
314
314
|
type SchemaOutput<T, M extends SchemaMode> = M extends 'volatile' ? Volatile<T | undefined> : M extends 'volatile-defined' ? Volatile<T> : T;
|
|
315
315
|
type SetRequired<M extends SchemaMode, R extends boolean> = M extends 'volatile' | 'volatile-defined' ? R extends true ? 'volatile-defined' : 'volatile' : R extends true ? 'defined' : 'plain';
|
|
316
|
-
type Schema<S = any, T = S, Mode extends SchemaMode = 'plain'> = Schemastery<S, T, Mode>;
|
|
317
|
-
declare const Schema: Schemastery.Static;
|
|
318
|
-
|
|
319
|
-
|
|
316
|
+
type Schema$1<S = any, T = S, Mode extends SchemaMode = 'plain'> = Schemastery<S, T, Mode>;
|
|
317
|
+
declare const Schema$1: Schemastery.Static;
|
|
318
|
+
declare namespace json_schema_d_exports {
|
|
319
|
+
export { ArraySchema, BaseSchema, BooleanSchema, IntegerSchema, JSONSchema, NullSchema, NumberSchema, ObjectSchema, Schema, SchemaType, StringSchema, _JSONSchema };
|
|
320
|
+
}
|
|
321
|
+
type Schema = ObjectSchema | ArraySchema | StringSchema | NumberSchema | IntegerSchema | BooleanSchema | NullSchema;
|
|
320
322
|
type _JSONSchema = boolean | JSONSchema;
|
|
321
323
|
type SchemaType = "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
|
|
322
324
|
type JSONSchema = {
|
|
@@ -384,6 +386,27 @@ type JSONSchema = {
|
|
|
384
386
|
_prefault?: unknown;
|
|
385
387
|
};
|
|
386
388
|
type BaseSchema = JSONSchema;
|
|
389
|
+
interface ObjectSchema extends JSONSchema {
|
|
390
|
+
type: "object";
|
|
391
|
+
}
|
|
392
|
+
interface ArraySchema extends JSONSchema {
|
|
393
|
+
type: "array";
|
|
394
|
+
}
|
|
395
|
+
interface StringSchema extends JSONSchema {
|
|
396
|
+
type: "string";
|
|
397
|
+
}
|
|
398
|
+
interface NumberSchema extends JSONSchema {
|
|
399
|
+
type: "number";
|
|
400
|
+
}
|
|
401
|
+
interface IntegerSchema extends JSONSchema {
|
|
402
|
+
type: "integer";
|
|
403
|
+
}
|
|
404
|
+
interface BooleanSchema extends JSONSchema {
|
|
405
|
+
type: "boolean";
|
|
406
|
+
}
|
|
407
|
+
interface NullSchema extends JSONSchema {
|
|
408
|
+
type: "null";
|
|
409
|
+
}
|
|
387
410
|
//#endregion
|
|
388
411
|
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/standard-schema.d.cts
|
|
389
412
|
/** The Standard interface. */
|
|
@@ -503,8 +526,9 @@ declare namespace StandardJSONSchemaV1 {
|
|
|
503
526
|
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
504
527
|
}
|
|
505
528
|
interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
|
|
506
|
-
|
|
507
|
-
|
|
529
|
+
declare namespace registries_d_exports {
|
|
530
|
+
export { $ZodRegistry, $input, $output, $replace, GlobalMeta, JSONSchemaMeta, globalRegistry, registry };
|
|
531
|
+
}
|
|
508
532
|
declare const $output: unique symbol;
|
|
509
533
|
type $output = typeof $output;
|
|
510
534
|
declare const $input: unique symbol;
|
|
@@ -530,6 +554,8 @@ interface JSONSchemaMeta {
|
|
|
530
554
|
[k: string]: unknown;
|
|
531
555
|
}
|
|
532
556
|
interface GlobalMeta extends JSONSchemaMeta {}
|
|
557
|
+
declare function registry<T extends MetadataType = MetadataType, S extends $ZodType = $ZodType>(): $ZodRegistry<T, S>;
|
|
558
|
+
declare const globalRegistry: $ZodRegistry<GlobalMeta>;
|
|
533
559
|
//#endregion
|
|
534
560
|
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.d.cts
|
|
535
561
|
type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
|
|
@@ -585,6 +611,12 @@ interface JSONSchemaGeneratorParams {
|
|
|
585
611
|
* Parameters for the toJSONSchema function.
|
|
586
612
|
*/
|
|
587
613
|
type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
|
|
614
|
+
/**
|
|
615
|
+
* Parameters for the toJSONSchema function when passing a registry.
|
|
616
|
+
*/
|
|
617
|
+
interface RegistryToJSONSchemaParams extends ToJSONSchemaParams {
|
|
618
|
+
uri?: (id: string) => string;
|
|
619
|
+
}
|
|
588
620
|
interface ProcessParams {
|
|
589
621
|
schemaPath: $ZodType[];
|
|
590
622
|
path: (string | number)[];
|
|
@@ -648,46 +680,261 @@ interface ToJSONSchemaContext {
|
|
|
648
680
|
defs: Record<string, BaseSchema>;
|
|
649
681
|
} | undefined;
|
|
650
682
|
}
|
|
683
|
+
declare function initializeContext(params: JSONSchemaGeneratorParams): ToJSONSchemaContext;
|
|
684
|
+
/**
|
|
685
|
+
* Applies the `unrepresentable` setting at a site that has no JSON Schema equivalent. Throws
|
|
686
|
+
* `message` unless the setting (or the handler's return value) says otherwise. Returns `true` if a
|
|
687
|
+
* custom JSON Schema was written into `json`, in which case the caller must not write its own.
|
|
688
|
+
*/
|
|
689
|
+
declare function handleUnrepresentable(schema: $ZodType, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams, message: string): boolean;
|
|
690
|
+
declare function processSchema<T extends $ZodType>(schema: T, ctx: ToJSONSchemaContext, _params?: ProcessParams): BaseSchema;
|
|
691
|
+
declare function extractDefs<T extends $ZodType>(ctx: ToJSONSchemaContext, schema: T): void;
|
|
692
|
+
declare function finalize<T extends $ZodType>(ctx: ToJSONSchemaContext, schema: T): ZodStandardJSONSchemaPayload<T>;
|
|
651
693
|
type ZodStandardSchemaWithJSON$1<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
|
|
652
694
|
interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
|
|
653
695
|
"~standard": ZodStandardSchemaWithJSON$1<T>;
|
|
654
696
|
}
|
|
655
|
-
|
|
656
|
-
|
|
697
|
+
/**
|
|
698
|
+
* Creates a toJSONSchema method for a schema instance.
|
|
699
|
+
* This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
|
|
700
|
+
*/
|
|
701
|
+
declare const createToJSONSchemaMethod: <T extends $ZodType>(schema: T, processors?: Record<string, Processor>) => (params?: ToJSONSchemaParams) => ZodStandardJSONSchemaPayload<T>;
|
|
702
|
+
/**
|
|
703
|
+
* Creates a toJSONSchema method for a schema instance.
|
|
704
|
+
* This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
|
|
705
|
+
*/
|
|
706
|
+
type StandardJSONSchemaMethodParams = Parameters<StandardJSONSchemaV1["~standard"]["jsonSchema"]["input"]>[0];
|
|
707
|
+
declare const createStandardJSONSchemaMethod: <T extends $ZodType>(schema: T, io: "input" | "output", processors?: Record<string, Processor>) => (params?: StandardJSONSchemaMethodParams) => BaseSchema;
|
|
708
|
+
declare namespace util_d_exports {
|
|
709
|
+
export { AnyFunc, AssertEqual, AssertExtends, AssertNotEqual, BIGINT_FORMAT_RANGES, BuiltIn, CONSTANT_CATCH, Class, CleanKey, Constructor$1 as Constructor, EmptyObject, EmptyToNever, EnumLike, EnumValue, Exactly, Extend, ExtractIndexSignature, Flatten, FromCleanMap, HasLength, HasSize, HashAlgorithm, HashEncoding, HashFormat, IPVersion, Identity, InexactPartial, IsAny, IsProp, JSONType, JWTAlgorithm, KeyOf, Keys, KeysArray, KeysEnum, Literal, LiteralArray, LoosePartial, MakePartial, MakeReadonly, MakeRequired, Mapped, Mask, MaybeAsync, MimeTypes, NUMBER_FORMAT_RANGES, NoNever, NoNeverKeys, NoUndefined, Normalize, Numeric, Omit$1 as Omit, OmitIndexSignature, OmitKeys, ParsedTypes, Prettify, Primitive, PrimitiveArray, PrimitiveSet, PropValues, ProtoOf, SafeParseError, SafeParseResult, SafeParseSuccess, SchemaClass, ShapeGetter, SomeObject, ToCleanMap, ToEnum, TupleItems, Whatever, Widen, Writeable, aborted, allowsEval, assert, assertEqual, assertIs, assertNever, assertNotEqual, assignProp, attachSchema, base64ToUint8Array, base64urlToUint8Array, cached, captureStackTrace, cleanEnum, cleanRegex, clone, cloneDef, codePointLength, constantCatch, createTransparentProxy, defineLazy, defineLazyInternal, derived, esc, escapeRegex, explicitlyAborted, extend, finalizeIssue, floatSafeRemainder, getElementAtPath, getEnumValues, getLengthableOrigin, getParsedType, getSizableOrigin, hexToUint8Array, hide, installLazyProp, isObject, isPlainObject, issue, joinValues, jsonStringifyReplacer, members, merge, mergeDefs, normalizeParams, nullish, numKeys, objectClone, omit, optionalKeys, own, parsedType, partial, pick, prefixIssues, primitiveTypes, promiseAllObject, propertyKeyTypes, randomString, rawShape, required, safeExtend, shallowClone, slugify, stringifyPrimitive, toZod, uint8ArrayToBase64, uint8ArrayToBase64url, uint8ArrayToHex, unwrapMessage };
|
|
710
|
+
}
|
|
711
|
+
type JSONType = string | number | boolean | null | JSONType[] | {
|
|
712
|
+
[key: string]: JSONType;
|
|
713
|
+
};
|
|
714
|
+
type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
|
|
715
|
+
type HashAlgorithm = "md5" | "sha1" | "sha256" | "sha384" | "sha512";
|
|
716
|
+
type HashEncoding = "hex" | "base64" | "base64url";
|
|
717
|
+
type HashFormat = `${HashAlgorithm}_${HashEncoding}`;
|
|
718
|
+
type IPVersion = "v4" | "v6";
|
|
657
719
|
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 & {});
|
|
720
|
+
type ParsedTypes = "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "file" | "date" | "array" | "map" | "set" | "nan" | "null" | "promise";
|
|
721
|
+
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends (<V>() => V extends U ? 1 : 2) ? true : false;
|
|
722
|
+
type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends (<V>() => V extends U ? 1 : 2) ? false : true;
|
|
723
|
+
type AssertExtends<T, U> = T extends U ? T : never;
|
|
724
|
+
type ToZodMismatch<T, S extends $ZodType> = {
|
|
725
|
+
"types do not match": {
|
|
726
|
+
expected: T;
|
|
727
|
+
received: S["_zod"]["output"];
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
type ToZodKeyMismatch<Expected, Received> = $ZodType & {
|
|
731
|
+
"types do not match": {
|
|
732
|
+
expected: Expected;
|
|
733
|
+
received: Received;
|
|
734
|
+
};
|
|
735
|
+
};
|
|
736
|
+
declare const toZodDummy: unique symbol;
|
|
737
|
+
type ToZodNormalize<T> = [T] extends [(...args: any[]) => any] ? T : [T] extends [object] ? { [K in keyof T]: ToZodNormalize<T[K]>; } : T | typeof toZodDummy;
|
|
738
|
+
type ToZodEqual<Output, T> = AssertEqual<Output, T> extends true ? true : IsAny<Output> extends true ? false : IsAny<T> extends true ? false : AssertEqual<ToZodNormalize<Output>, ToZodNormalize<T>>;
|
|
739
|
+
type ToZodShape<Shape, T> = { [K in keyof Shape]: Shape[K] extends $ZodType ? K extends keyof T ? ToZodEqual<Shape[K]["_zod"]["output"], T[K]> extends true ? Shape[K] : ToZodKeyMismatch<T[K], Shape[K]["_zod"]["output"]> : ToZodKeyMismatch<never, Shape[K]["_zod"]["output"]> : Shape[K]; } & { [K in Exclude<keyof T, keyof Shape>]: ToZodKeyMismatch<T[K], never>; };
|
|
740
|
+
type ToZodExpand<X> = { [K in keyof X]: X[K]; } & {};
|
|
741
|
+
type ToZodTarget<S extends $ZodType, T> = S extends $ZodObject<infer Shape, infer Config> ? T extends object ? AssertEqual<ToZodExpand<ToZodShape<Shape, T>>, ToZodExpand<Shape>> extends true ? S & ToZodMismatch<T, S> : $ZodObject<ToZodExpand<ToZodShape<Shape, T>>, Config> : S & ToZodMismatch<T, S> : S & ToZodMismatch<T, S>;
|
|
658
742
|
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
659
743
|
type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
744
|
+
type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
660
745
|
type MakePartial<T, K extends keyof T> = Omit$1<T, K> & InexactPartial<Pick<T, K>>;
|
|
746
|
+
type MakeRequired<T, K extends keyof T> = Omit$1<T, K> & Required<Pick<T, K>>;
|
|
747
|
+
type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
|
|
661
748
|
type NoUndefined<T> = T extends undefined ? never : T;
|
|
749
|
+
type Whatever = {} | undefined | null;
|
|
750
|
+
type Widen<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T extends bigint ? bigint : T;
|
|
662
751
|
type LoosePartial<T extends object> = InexactPartial<T> & {
|
|
663
752
|
[k: string]: unknown;
|
|
664
753
|
};
|
|
754
|
+
type Mask<Keys extends PropertyKey> = { [K in Keys]?: true; };
|
|
755
|
+
type Writeable<T> = { -readonly [P in keyof T]: T[P]; } & {};
|
|
665
756
|
type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined; };
|
|
757
|
+
type EmptyObject = Record<string, never>;
|
|
666
758
|
type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
667
759
|
readonly [Symbol.toStringTag]: string;
|
|
668
760
|
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
669
761
|
type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;
|
|
762
|
+
type SomeObject = Record<PropertyKey, any>;
|
|
670
763
|
type Identity<T> = T;
|
|
671
764
|
type Flatten<T> = Identity<{ [k in keyof T]: T[k]; }>;
|
|
765
|
+
type Mapped<T> = { [k in keyof T]: T[k]; };
|
|
672
766
|
type Prettify<T> = { [K in keyof T]: T[K]; } & {};
|
|
767
|
+
type NoNeverKeys<T> = { [k in keyof T]: [T[k]] extends [never] ? never : k; }[keyof T];
|
|
768
|
+
type NoNever<T> = Identity<{ [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never; }>;
|
|
769
|
+
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]; }>;
|
|
673
770
|
type TupleItems = ReadonlyArray<SomeType>;
|
|
674
771
|
type AnyFunc = (...args: any[]) => any;
|
|
772
|
+
type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;
|
|
675
773
|
type MaybeAsync<T> = T | Promise<T>;
|
|
774
|
+
type KeyOf<T> = keyof OmitIndexSignature<T>;
|
|
775
|
+
type OmitIndexSignature<T> = { [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K]; };
|
|
776
|
+
type ExtractIndexSignature<T> = { [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K]; };
|
|
777
|
+
type Keys<T extends object> = keyof OmitIndexSignature<T>;
|
|
778
|
+
type SchemaClass<T extends SomeType> = {
|
|
779
|
+
new (def: T["_zod"]["def"]): T;
|
|
780
|
+
};
|
|
676
781
|
type EnumValue = string | number;
|
|
677
782
|
type EnumLike = Readonly<Record<string, EnumValue>>;
|
|
783
|
+
type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k; }>;
|
|
784
|
+
type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;
|
|
785
|
+
type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;
|
|
678
786
|
type Literal = string | number | bigint | boolean | null | undefined;
|
|
787
|
+
type LiteralArray = Array<Literal>;
|
|
679
788
|
type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
789
|
+
type PrimitiveArray = Array<Primitive>;
|
|
790
|
+
type HasSize = {
|
|
791
|
+
size: number;
|
|
792
|
+
};
|
|
680
793
|
type HasLength = {
|
|
681
794
|
length: number;
|
|
682
795
|
};
|
|
796
|
+
type Numeric = number | bigint | Date;
|
|
797
|
+
type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;
|
|
798
|
+
type SafeParseSuccess<T> = {
|
|
799
|
+
success: true;
|
|
800
|
+
data: T;
|
|
801
|
+
error?: never;
|
|
802
|
+
};
|
|
803
|
+
type SafeParseError<T> = {
|
|
804
|
+
success: false;
|
|
805
|
+
data?: never;
|
|
806
|
+
error: $ZodError<T>;
|
|
807
|
+
};
|
|
683
808
|
type PropValues = Record<string, Set<Primitive>>;
|
|
684
809
|
type PrimitiveSet = Set<Primitive>;
|
|
810
|
+
declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;
|
|
811
|
+
declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;
|
|
812
|
+
declare function toZod<T>(): <S extends $ZodType>(schema: ToZodEqual<S["_zod"]["output"], T> extends true ? S : ToZodTarget<S, T>) => S;
|
|
813
|
+
declare function assertIs<T>(_arg: T): void;
|
|
814
|
+
declare function assertNever(_x: never): never;
|
|
815
|
+
declare function assert<T>(_: any): asserts _ is T;
|
|
816
|
+
declare function getEnumValues(entries: EnumLike): EnumValue[];
|
|
817
|
+
declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;
|
|
818
|
+
declare function jsonStringifyReplacer(_: string, value: any): any;
|
|
819
|
+
declare function cached<T>(getter: () => T): {
|
|
820
|
+
value: T;
|
|
821
|
+
};
|
|
822
|
+
declare function nullish(input: any): boolean;
|
|
823
|
+
declare function cleanRegex(source: string): string;
|
|
824
|
+
declare function floatSafeRemainder(val: number, step: number): number;
|
|
825
|
+
declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;
|
|
826
|
+
declare function objectClone(obj: object): any;
|
|
827
|
+
declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;
|
|
828
|
+
/** A def's `shape` accessor, carrying whichever object it currently answers from. */
|
|
829
|
+
interface ShapeGetter {
|
|
830
|
+
(): Record<PropertyKey, any>;
|
|
831
|
+
raw: Record<PropertyKey, any>;
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Whichever object a def's `shape` currently answers from: the one the caller passed until the first read, the frozen copy after it.
|
|
835
|
+
*
|
|
836
|
+
* Its keys and descriptors read without invoking anything, which is what lets a discriminated union check its discriminator, and the cycle walk read a shape, without resolving a getter that references the schema being constructed. A def that answers `shape` from an accessor of its own has none.
|
|
837
|
+
*/
|
|
838
|
+
declare function rawShape(def: any): Record<PropertyKey, any> | undefined;
|
|
839
|
+
declare function mergeDefs(...defs: Record<string, any>[]): any;
|
|
840
|
+
declare function cloneDef(schema: $ZodType): any;
|
|
841
|
+
declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;
|
|
842
|
+
declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{ [k in keyof T]: Awaited<T[k]>; }>;
|
|
843
|
+
declare function randomString(length?: number): string;
|
|
844
|
+
declare function esc(str: string): string;
|
|
845
|
+
declare function slugify(input: string): string;
|
|
846
|
+
declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;
|
|
847
|
+
declare function isObject(data: any): data is Record<PropertyKey, unknown>;
|
|
848
|
+
declare const allowsEval: {
|
|
849
|
+
value: boolean;
|
|
850
|
+
};
|
|
851
|
+
declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;
|
|
852
|
+
declare function shallowClone(o: any): any;
|
|
853
|
+
declare function numKeys(data: any): number;
|
|
854
|
+
declare const getParsedType: (data: any) => ParsedTypes;
|
|
855
|
+
declare const propertyKeyTypes: Set<string>;
|
|
856
|
+
declare const primitiveTypes: Set<string>;
|
|
857
|
+
declare function escapeRegex(str: string): string;
|
|
858
|
+
declare function clone<T extends $ZodType>(inst: T, def?: T["_zod"]["def"], params?: {
|
|
859
|
+
parent: boolean;
|
|
860
|
+
}): T;
|
|
685
861
|
type EmptyToNever<T> = keyof T extends never ? never : T;
|
|
862
|
+
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 ? {
|
|
863
|
+
error?: Exclude<T["error"], string>;
|
|
864
|
+
} : unknown)> : never;
|
|
865
|
+
declare function normalizeParams<T>(_params: T): Normalize<T>;
|
|
866
|
+
declare function createTransparentProxy<T extends object>(getter: () => T): T;
|
|
867
|
+
declare function stringifyPrimitive(value: any): string;
|
|
868
|
+
declare function optionalKeys(shape: $ZodShape): string[];
|
|
869
|
+
type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;
|
|
870
|
+
type ToCleanMap<T extends $ZodLooseShape> = { [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k; };
|
|
871
|
+
type FromCleanMap<T extends $ZodLooseShape> = { [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k; };
|
|
872
|
+
declare const NUMBER_FORMAT_RANGES: Record<$ZodNumberFormats, [number, number]>;
|
|
873
|
+
declare const BIGINT_FORMAT_RANGES: Record<$ZodBigIntFormats, [bigint, bigint]>;
|
|
874
|
+
declare function pick(schema: $ZodObject, mask: Record<string, unknown>): any;
|
|
875
|
+
declare function omit(schema: $ZodObject, mask: object): any;
|
|
876
|
+
declare function extend(schema: $ZodObject, shape: $ZodShape): any;
|
|
877
|
+
declare function safeExtend(schema: $ZodObject, shape: $ZodShape): any;
|
|
878
|
+
declare function merge(a: $ZodObject, b: $ZodObject): any;
|
|
879
|
+
declare function partial(Class: SchemaClass<$ZodOptional> | null, schema: $ZodObject, mask: object | undefined, name?: string): any;
|
|
880
|
+
declare function required(Class: SchemaClass<$ZodNonOptional>, schema: $ZodObject, mask: object | undefined): any;
|
|
881
|
+
type Constructor$1<T, Def extends any[] = any[]> = new (...args: Def) => T;
|
|
882
|
+
declare function aborted(x: ParsePayload, startIndex?: number): boolean;
|
|
883
|
+
declare function explicitlyAborted(x: ParsePayload, startIndex?: number): boolean;
|
|
884
|
+
declare function prefixIssues(path: PropertyKey, issues: $ZodRawIssue[]): $ZodRawIssue[];
|
|
885
|
+
declare function unwrapMessage(message: string | {
|
|
886
|
+
message: string;
|
|
887
|
+
} | undefined | null): string | undefined;
|
|
888
|
+
declare function attachSchema(issues: $ZodRawIssue[], start: number, inst: $ZodType): void;
|
|
889
|
+
declare function finalizeIssue(iss: $ZodRawIssue, ctx: ParseContextInternal | undefined, config: $ZodConfig): $ZodIssue;
|
|
890
|
+
declare function getSizableOrigin(input: any): "set" | "map" | "file" | "unknown";
|
|
891
|
+
declare function codePointLength(str: string): number;
|
|
892
|
+
declare function getLengthableOrigin(input: any): "array" | "string" | "unknown";
|
|
893
|
+
declare function parsedType(data: unknown): $ZodInvalidTypeExpected;
|
|
894
|
+
declare function issue(_iss: string, input: any, inst: any): $ZodRawIssue;
|
|
895
|
+
declare function issue(_iss: $ZodRawIssue): $ZodRawIssue;
|
|
896
|
+
declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];
|
|
897
|
+
declare function base64ToUint8Array(base64: string): InstanceType<typeof Uint8Array>;
|
|
898
|
+
declare function uint8ArrayToBase64(bytes: Uint8Array): string;
|
|
899
|
+
declare function base64urlToUint8Array(base64url: string): InstanceType<typeof Uint8Array>;
|
|
900
|
+
declare function uint8ArrayToBase64url(bytes: Uint8Array): string;
|
|
901
|
+
declare function hexToUint8Array(hex: string): InstanceType<typeof Uint8Array>;
|
|
902
|
+
declare function uint8ArrayToHex(bytes: Uint8Array): string;
|
|
686
903
|
declare abstract class Class {
|
|
687
904
|
constructor(..._args: any[]);
|
|
688
905
|
}
|
|
906
|
+
/**
|
|
907
|
+
* Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working.
|
|
908
|
+
*
|
|
909
|
+
* Call this from a `proto` initializer, which runs once per prototype — never per instance.
|
|
910
|
+
*/
|
|
911
|
+
declare function members(proto: object, table: object): void;
|
|
912
|
+
/** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */
|
|
913
|
+
declare function own<T>(inst: object, key: PropertyKey, value: T, enumerable?: boolean): T;
|
|
914
|
+
/** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */
|
|
915
|
+
declare function hide<T>(inst: object, key: PropertyKey, value: T): T;
|
|
916
|
+
/** Adds members a table derives from the instance: each builds on first read and shadows as own data, and assignment shadows the same way, as when these were own properties. */
|
|
917
|
+
declare function derived<T>(computes: { [K in keyof T]?: (inst: T) => T[K]; }, table: ProtoOf<T>): ProtoOf<T>;
|
|
689
918
|
/** A trait's prototype members: a partial view of its own interface, with `this` typed as the instance. */
|
|
690
919
|
type ProtoOf<T> = { [K in keyof T]?: (T[K] extends ((...args: infer A) => infer R) ? (...args: A) => R : T[K]) | undefined; } & ThisType<T>;
|
|
920
|
+
/**
|
|
921
|
+
* Installs a lazily-derived internal on the `_zod` prototype of `inst`'s
|
|
922
|
+
* constructor, computed from the internals object itself and cached there on
|
|
923
|
+
* first read. One accessor per constructor rather than one per instance.
|
|
924
|
+
*/
|
|
925
|
+
declare function defineLazyInternal<T extends {
|
|
926
|
+
_zod: any;
|
|
927
|
+
}>(inst: T, key: string, compute: (zod: T["_zod"]) => unknown): void;
|
|
928
|
+
/**
|
|
929
|
+
* Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own
|
|
930
|
+
* data property. One accessor per constructor rather than one per instance, because an own accessor
|
|
931
|
+
* puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel.
|
|
932
|
+
*/
|
|
933
|
+
declare function installLazyProp(inst: object, key: string, make: (self: any) => unknown, enumerable: boolean): void;
|
|
934
|
+
/** Marks the thunk `_catch` synthesises for a constant catch value. `Function.length` cannot tell that thunk from a user callback — rest and defaulted parameters both report arity 0 — and a user callback reads `ctx.error`, whose issues only finalize correctly against the caller's per-parse error map. Provenance can say what arity cannot. A plain string key rather than `Symbol.for`, whose call at module scope no bundler can prove pure — the same shape that anchored `urlCanParse` into every build. */
|
|
935
|
+
declare const CONSTANT_CATCH = "~constantCatch";
|
|
936
|
+
/** Wraps a constant catch value in a thunk tagged with {@link CONSTANT_CATCH}. */
|
|
937
|
+
declare function constantCatch<T>(value: T): () => T;
|
|
691
938
|
//#endregion
|
|
692
939
|
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.d.cts
|
|
693
940
|
declare const version: {
|
|
@@ -695,8 +942,9 @@ declare const version: {
|
|
|
695
942
|
readonly minor: 6;
|
|
696
943
|
readonly patch: number;
|
|
697
944
|
};
|
|
698
|
-
|
|
699
|
-
|
|
945
|
+
declare namespace schemas_d_exports {
|
|
946
|
+
export { $DiscriminatedOption, $DiscriminatorValue, $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, $ZodCreditCard, $ZodCreditCardDef, $ZodCreditCardInternals, $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, $ZodIBAN, $ZodIBANDef, $ZodIBANInternals, $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, $ZodMemoizer, $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, URL_BAD_FORMAT, URL_UNPARSEABLE, _$ZodType, _$ZodTypeInternals, base64Charset, base64urlCharset, canParseURL, clone, getDiscriminatedOption, isValidBase64, isValidBase64URL, isValidCIDRv6, isValidCreditCard, isValidIBAN, isValidIPv6, isValidJWT, mergeValues, parseURLObject, standardProps, stripTabAndNewline, urlHostnameOk, urlProtocolOk, validateURL };
|
|
947
|
+
}
|
|
700
948
|
interface ParseContext<T extends $ZodIssueBase = never> {
|
|
701
949
|
/** Customize error messages. */
|
|
702
950
|
readonly error?: $ZodErrorMap<T>;
|
|
@@ -713,6 +961,12 @@ interface ParseContextInternal<T extends $ZodIssueBase = never> extends ParseCon
|
|
|
713
961
|
/** Set only by `validate`/`validateAsync`. A container may stop before its next child, never inside one, so a map entry and a tuple's fixed items parse whole. */
|
|
714
962
|
readonly abortEarly?: boolean;
|
|
715
963
|
}
|
|
964
|
+
/** Gives a container cycle support: `attach` wraps its parse, and `alloc` registers the object it builds into before any child is parsed so a reference back to the same input resolves to it. */
|
|
965
|
+
interface $ZodMemoizer {
|
|
966
|
+
attach(inst: $ZodType): void;
|
|
967
|
+
guard(inst: $ZodType): void;
|
|
968
|
+
alloc<T extends object>(inst: $ZodType, payload: ParsePayload, empty: T, ctx: ParseContextInternal): T;
|
|
969
|
+
}
|
|
716
970
|
interface ParsePayload<T = unknown> {
|
|
717
971
|
value: T;
|
|
718
972
|
issues: $ZodRawIssue[];
|
|
@@ -796,6 +1050,7 @@ interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals
|
|
|
796
1050
|
}
|
|
797
1051
|
interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T["output"], T["input"], T> {}
|
|
798
1052
|
declare const $ZodType: $constructor<$ZodType>;
|
|
1053
|
+
declare function standardProps(inst: $ZodType): StandardSchemaV1.Props<any, any>;
|
|
799
1054
|
interface $ZodStringDef extends $ZodTypeDef {
|
|
800
1055
|
type: "string";
|
|
801
1056
|
coerce?: boolean;
|
|
@@ -819,6 +1074,273 @@ interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
|
|
|
819
1074
|
}
|
|
820
1075
|
interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {}
|
|
821
1076
|
declare const $ZodString: $constructor<$ZodString>;
|
|
1077
|
+
interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, $ZodCheckStringFormatDef<Format> {}
|
|
1078
|
+
interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, $ZodCheckStringFormatInternals {
|
|
1079
|
+
def: $ZodStringFormatDef<Format>;
|
|
1080
|
+
}
|
|
1081
|
+
interface $ZodStringFormat<Format extends string = string> extends $ZodType {
|
|
1082
|
+
_zod: $ZodStringFormatInternals<Format>;
|
|
1083
|
+
}
|
|
1084
|
+
declare const $ZodStringFormat: $constructor<$ZodStringFormat>;
|
|
1085
|
+
interface $ZodGUIDDef extends $ZodStringFormatDef<"guid"> {}
|
|
1086
|
+
interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {}
|
|
1087
|
+
interface $ZodGUID extends $ZodType {
|
|
1088
|
+
_zod: $ZodGUIDInternals;
|
|
1089
|
+
}
|
|
1090
|
+
declare const $ZodGUID: $constructor<$ZodGUID>;
|
|
1091
|
+
interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
|
|
1092
|
+
version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
|
|
1093
|
+
}
|
|
1094
|
+
interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
|
|
1095
|
+
def: $ZodUUIDDef;
|
|
1096
|
+
}
|
|
1097
|
+
interface $ZodUUID extends $ZodType {
|
|
1098
|
+
_zod: $ZodUUIDInternals;
|
|
1099
|
+
}
|
|
1100
|
+
declare const $ZodUUID: $constructor<$ZodUUID>;
|
|
1101
|
+
interface $ZodEmailDef extends $ZodStringFormatDef<"email"> {}
|
|
1102
|
+
interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {}
|
|
1103
|
+
interface $ZodEmail extends $ZodType {
|
|
1104
|
+
_zod: $ZodEmailInternals;
|
|
1105
|
+
}
|
|
1106
|
+
declare const $ZodEmail: $constructor<$ZodEmail>;
|
|
1107
|
+
interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
|
|
1108
|
+
hostname?: RegExp | undefined;
|
|
1109
|
+
protocol?: RegExp | undefined;
|
|
1110
|
+
normalize?: boolean | undefined;
|
|
1111
|
+
}
|
|
1112
|
+
interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
|
|
1113
|
+
def: $ZodURLDef;
|
|
1114
|
+
}
|
|
1115
|
+
interface $ZodURL extends $ZodType {
|
|
1116
|
+
_zod: $ZodURLInternals;
|
|
1117
|
+
}
|
|
1118
|
+
/** The `://` guard rejected the input before the URL constructor saw it. */
|
|
1119
|
+
declare const URL_BAD_FORMAT = 1;
|
|
1120
|
+
/** The URL parser rejected the input. */
|
|
1121
|
+
declare const URL_UNPARSEABLE = 2;
|
|
1122
|
+
declare function canParseURL(input: string): boolean;
|
|
1123
|
+
declare function validateURL(trimmed: string, def: Pick<$ZodURLDef, "protocol" | "hostname" | "normalize">): URL | true | typeof URL_BAD_FORMAT | typeof URL_UNPARSEABLE;
|
|
1124
|
+
/** Parses a URL while preserving the non-normalizing HTTP guard. */
|
|
1125
|
+
declare function parseURLObject(trimmed: string, def: Pick<$ZodURLDef, "protocol" | "normalize">): URL | typeof URL_BAD_FORMAT | typeof URL_UNPARSEABLE;
|
|
1126
|
+
/** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL("https://exa\nmple.com")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */
|
|
1127
|
+
declare function stripTabAndNewline(value: string): string;
|
|
1128
|
+
declare function urlHostnameOk(url: URL, hostname: RegExp): boolean;
|
|
1129
|
+
declare function urlProtocolOk(url: URL, protocol: RegExp): boolean;
|
|
1130
|
+
declare const $ZodURL: $constructor<$ZodURL>;
|
|
1131
|
+
interface $ZodEmojiDef extends $ZodStringFormatDef<"emoji"> {}
|
|
1132
|
+
interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {}
|
|
1133
|
+
interface $ZodEmoji extends $ZodType {
|
|
1134
|
+
_zod: $ZodEmojiInternals;
|
|
1135
|
+
}
|
|
1136
|
+
declare const $ZodEmoji: $constructor<$ZodEmoji>;
|
|
1137
|
+
interface $ZodNanoIDDef extends $ZodStringFormatDef<"nanoid"> {
|
|
1138
|
+
length?: number | undefined;
|
|
1139
|
+
}
|
|
1140
|
+
interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {
|
|
1141
|
+
def: $ZodNanoIDDef;
|
|
1142
|
+
}
|
|
1143
|
+
interface $ZodNanoID extends $ZodType {
|
|
1144
|
+
_zod: $ZodNanoIDInternals;
|
|
1145
|
+
}
|
|
1146
|
+
declare const $ZodNanoID: $constructor<$ZodNanoID>;
|
|
1147
|
+
/**
|
|
1148
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
1149
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1150
|
+
* See https://github.com/paralleldrive/cuid.
|
|
1151
|
+
*/
|
|
1152
|
+
interface $ZodCUIDDef extends $ZodStringFormatDef<"cuid"> {}
|
|
1153
|
+
/**
|
|
1154
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
1155
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1156
|
+
* See https://github.com/paralleldrive/cuid.
|
|
1157
|
+
*/
|
|
1158
|
+
interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
|
|
1159
|
+
/**
|
|
1160
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
1161
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1162
|
+
* See https://github.com/paralleldrive/cuid.
|
|
1163
|
+
*/
|
|
1164
|
+
interface $ZodCUID extends $ZodType {
|
|
1165
|
+
_zod: $ZodCUIDInternals;
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
1169
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1170
|
+
* See https://github.com/paralleldrive/cuid.
|
|
1171
|
+
*/
|
|
1172
|
+
declare const $ZodCUID: $constructor<$ZodCUID>;
|
|
1173
|
+
interface $ZodCUID2Def extends $ZodStringFormatDef<"cuid2"> {}
|
|
1174
|
+
interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
|
|
1175
|
+
interface $ZodCUID2 extends $ZodType {
|
|
1176
|
+
_zod: $ZodCUID2Internals;
|
|
1177
|
+
}
|
|
1178
|
+
declare const $ZodCUID2: $constructor<$ZodCUID2>;
|
|
1179
|
+
interface $ZodULIDDef extends $ZodStringFormatDef<"ulid"> {}
|
|
1180
|
+
interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {}
|
|
1181
|
+
interface $ZodULID extends $ZodType {
|
|
1182
|
+
_zod: $ZodULIDInternals;
|
|
1183
|
+
}
|
|
1184
|
+
declare const $ZodULID: $constructor<$ZodULID>;
|
|
1185
|
+
interface $ZodXIDDef extends $ZodStringFormatDef<"xid"> {}
|
|
1186
|
+
interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {}
|
|
1187
|
+
interface $ZodXID extends $ZodType {
|
|
1188
|
+
_zod: $ZodXIDInternals;
|
|
1189
|
+
}
|
|
1190
|
+
declare const $ZodXID: $constructor<$ZodXID>;
|
|
1191
|
+
interface $ZodKSUIDDef extends $ZodStringFormatDef<"ksuid"> {}
|
|
1192
|
+
interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {}
|
|
1193
|
+
interface $ZodKSUID extends $ZodType {
|
|
1194
|
+
_zod: $ZodKSUIDInternals;
|
|
1195
|
+
}
|
|
1196
|
+
declare const $ZodKSUID: $constructor<$ZodKSUID>;
|
|
1197
|
+
interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
|
|
1198
|
+
precision: number | null;
|
|
1199
|
+
offset: boolean;
|
|
1200
|
+
local: boolean;
|
|
1201
|
+
}
|
|
1202
|
+
interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
|
|
1203
|
+
def: $ZodISODateTimeDef;
|
|
1204
|
+
}
|
|
1205
|
+
interface $ZodISODateTime extends $ZodType {
|
|
1206
|
+
_zod: $ZodISODateTimeInternals;
|
|
1207
|
+
}
|
|
1208
|
+
declare const $ZodISODateTime: $constructor<$ZodISODateTime>;
|
|
1209
|
+
interface $ZodISODateDef extends $ZodStringFormatDef<"date"> {}
|
|
1210
|
+
interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {}
|
|
1211
|
+
interface $ZodISODate extends $ZodType {
|
|
1212
|
+
_zod: $ZodISODateInternals;
|
|
1213
|
+
}
|
|
1214
|
+
declare const $ZodISODate: $constructor<$ZodISODate>;
|
|
1215
|
+
interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
|
|
1216
|
+
precision?: number | null;
|
|
1217
|
+
}
|
|
1218
|
+
interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
|
|
1219
|
+
def: $ZodISOTimeDef;
|
|
1220
|
+
}
|
|
1221
|
+
interface $ZodISOTime extends $ZodType {
|
|
1222
|
+
_zod: $ZodISOTimeInternals;
|
|
1223
|
+
}
|
|
1224
|
+
declare const $ZodISOTime: $constructor<$ZodISOTime>;
|
|
1225
|
+
interface $ZodISODurationDef extends $ZodStringFormatDef<"duration"> {}
|
|
1226
|
+
interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {}
|
|
1227
|
+
interface $ZodISODuration extends $ZodType {
|
|
1228
|
+
_zod: $ZodISODurationInternals;
|
|
1229
|
+
}
|
|
1230
|
+
declare const $ZodISODuration: $constructor<$ZodISODuration>;
|
|
1231
|
+
interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
|
|
1232
|
+
version?: "v4";
|
|
1233
|
+
}
|
|
1234
|
+
interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
|
|
1235
|
+
def: $ZodIPv4Def;
|
|
1236
|
+
}
|
|
1237
|
+
interface $ZodIPv4 extends $ZodType {
|
|
1238
|
+
_zod: $ZodIPv4Internals;
|
|
1239
|
+
}
|
|
1240
|
+
declare const $ZodIPv4: $constructor<$ZodIPv4>;
|
|
1241
|
+
interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
|
|
1242
|
+
version?: "v6";
|
|
1243
|
+
}
|
|
1244
|
+
interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
|
|
1245
|
+
def: $ZodIPv6Def;
|
|
1246
|
+
}
|
|
1247
|
+
interface $ZodIPv6 extends $ZodType {
|
|
1248
|
+
_zod: $ZodIPv6Internals;
|
|
1249
|
+
}
|
|
1250
|
+
declare function isValidIPv6(value: string): boolean;
|
|
1251
|
+
declare const $ZodIPv6: $constructor<$ZodIPv6>;
|
|
1252
|
+
interface $ZodMACDef extends $ZodStringFormatDef<"mac"> {
|
|
1253
|
+
delimiter?: string;
|
|
1254
|
+
}
|
|
1255
|
+
interface $ZodMACInternals extends $ZodStringFormatInternals<"mac"> {
|
|
1256
|
+
def: $ZodMACDef;
|
|
1257
|
+
}
|
|
1258
|
+
interface $ZodMAC extends $ZodType {
|
|
1259
|
+
_zod: $ZodMACInternals;
|
|
1260
|
+
}
|
|
1261
|
+
declare const $ZodMAC: $constructor<$ZodMAC>;
|
|
1262
|
+
interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
|
|
1263
|
+
version?: "v4";
|
|
1264
|
+
}
|
|
1265
|
+
interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
|
|
1266
|
+
def: $ZodCIDRv4Def;
|
|
1267
|
+
}
|
|
1268
|
+
interface $ZodCIDRv4 extends $ZodType {
|
|
1269
|
+
_zod: $ZodCIDRv4Internals;
|
|
1270
|
+
}
|
|
1271
|
+
declare const $ZodCIDRv4: $constructor<$ZodCIDRv4>;
|
|
1272
|
+
interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
|
|
1273
|
+
version?: "v6";
|
|
1274
|
+
}
|
|
1275
|
+
interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
|
|
1276
|
+
def: $ZodCIDRv6Def;
|
|
1277
|
+
}
|
|
1278
|
+
interface $ZodCIDRv6 extends $ZodType {
|
|
1279
|
+
_zod: $ZodCIDRv6Internals;
|
|
1280
|
+
}
|
|
1281
|
+
declare function isValidCIDRv6(value: string): boolean;
|
|
1282
|
+
declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>;
|
|
1283
|
+
declare function isValidBase64(data: string): boolean;
|
|
1284
|
+
interface $ZodBase64Def extends $ZodStringFormatDef<"base64"> {}
|
|
1285
|
+
interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {}
|
|
1286
|
+
interface $ZodBase64 extends $ZodType {
|
|
1287
|
+
_zod: $ZodBase64Internals;
|
|
1288
|
+
}
|
|
1289
|
+
declare const base64Charset: RegExp;
|
|
1290
|
+
declare const $ZodBase64: $constructor<$ZodBase64>;
|
|
1291
|
+
declare const base64urlCharset: RegExp;
|
|
1292
|
+
declare function isValidBase64URL(data: string): boolean;
|
|
1293
|
+
interface $ZodBase64URLDef extends $ZodStringFormatDef<"base64url"> {}
|
|
1294
|
+
interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {}
|
|
1295
|
+
interface $ZodBase64URL extends $ZodType {
|
|
1296
|
+
_zod: $ZodBase64URLInternals;
|
|
1297
|
+
}
|
|
1298
|
+
declare const $ZodBase64URL: $constructor<$ZodBase64URL>;
|
|
1299
|
+
interface $ZodE164Def extends $ZodStringFormatDef<"e164"> {}
|
|
1300
|
+
interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {}
|
|
1301
|
+
interface $ZodE164 extends $ZodType {
|
|
1302
|
+
_zod: $ZodE164Internals;
|
|
1303
|
+
}
|
|
1304
|
+
declare const $ZodE164: $constructor<$ZodE164>;
|
|
1305
|
+
declare function isValidCreditCard(input: string): boolean;
|
|
1306
|
+
interface $ZodCreditCardDef extends $ZodStringFormatDef<"credit_card"> {}
|
|
1307
|
+
interface $ZodCreditCardInternals extends $ZodStringFormatInternals<"credit_card"> {
|
|
1308
|
+
def: $ZodCreditCardDef;
|
|
1309
|
+
}
|
|
1310
|
+
interface $ZodCreditCard extends $ZodType {
|
|
1311
|
+
_zod: $ZodCreditCardInternals;
|
|
1312
|
+
}
|
|
1313
|
+
declare const $ZodCreditCard: $constructor<$ZodCreditCard>;
|
|
1314
|
+
declare function isValidIBAN(input: string): boolean;
|
|
1315
|
+
interface $ZodIBANDef extends $ZodStringFormatDef<"iban"> {}
|
|
1316
|
+
interface $ZodIBANInternals extends $ZodStringFormatInternals<"iban"> {
|
|
1317
|
+
def: $ZodIBANDef;
|
|
1318
|
+
}
|
|
1319
|
+
interface $ZodIBAN extends $ZodType {
|
|
1320
|
+
_zod: $ZodIBANInternals;
|
|
1321
|
+
}
|
|
1322
|
+
declare const $ZodIBAN: $constructor<$ZodIBAN>;
|
|
1323
|
+
declare function isValidJWT(token: string, algorithm?: JWTAlgorithm | null): boolean;
|
|
1324
|
+
interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
|
|
1325
|
+
alg?: JWTAlgorithm | undefined;
|
|
1326
|
+
}
|
|
1327
|
+
interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
|
|
1328
|
+
def: $ZodJWTDef;
|
|
1329
|
+
}
|
|
1330
|
+
interface $ZodJWT extends $ZodType {
|
|
1331
|
+
_zod: $ZodJWTInternals;
|
|
1332
|
+
}
|
|
1333
|
+
declare const $ZodJWT: $constructor<$ZodJWT>;
|
|
1334
|
+
interface $ZodCustomStringFormatDef<Format extends string = string> extends $ZodStringFormatDef<Format> {
|
|
1335
|
+
fn: (val: string) => unknown;
|
|
1336
|
+
}
|
|
1337
|
+
interface $ZodCustomStringFormatInternals<Format extends string = string> extends $ZodStringFormatInternals<Format> {
|
|
1338
|
+
def: $ZodCustomStringFormatDef<Format>;
|
|
1339
|
+
}
|
|
1340
|
+
interface $ZodCustomStringFormat<Format extends string = string> extends $ZodStringFormat<Format> {
|
|
1341
|
+
_zod: $ZodCustomStringFormatInternals<Format>;
|
|
1342
|
+
}
|
|
1343
|
+
declare const $ZodCustomStringFormat: $constructor<$ZodCustomStringFormat>;
|
|
822
1344
|
interface $ZodNumberDef extends $ZodTypeDef {
|
|
823
1345
|
type: "number";
|
|
824
1346
|
coerce?: boolean;
|
|
@@ -842,6 +1364,15 @@ interface $ZodNumber<Input = unknown> extends $ZodType {
|
|
|
842
1364
|
_zod: $ZodNumberInternals<Input>;
|
|
843
1365
|
}
|
|
844
1366
|
declare const $ZodNumber: $constructor<$ZodNumber>;
|
|
1367
|
+
interface $ZodNumberFormatDef<Format extends $ZodNumberFormats = $ZodNumberFormats> extends $ZodNumberDef, $ZodCheckNumberFormatDef<Format> {}
|
|
1368
|
+
interface $ZodNumberFormatInternals<Format extends $ZodNumberFormats = $ZodNumberFormats> extends $ZodNumberInternals<number>, $ZodCheckNumberFormatInternals<Format> {
|
|
1369
|
+
def: $ZodNumberFormatDef<Format>;
|
|
1370
|
+
isst: $ZodIssueInvalidType;
|
|
1371
|
+
}
|
|
1372
|
+
interface $ZodNumberFormat<Format extends $ZodNumberFormats = $ZodNumberFormats> extends $ZodType {
|
|
1373
|
+
_zod: $ZodNumberFormatInternals<Format>;
|
|
1374
|
+
}
|
|
1375
|
+
declare const $ZodNumberFormat: $constructor<$ZodNumberFormat>;
|
|
845
1376
|
interface $ZodBooleanDef extends $ZodTypeDef {
|
|
846
1377
|
type: "boolean";
|
|
847
1378
|
coerce?: boolean;
|
|
@@ -875,6 +1406,16 @@ interface $ZodBigInt<T = unknown> extends $ZodType {
|
|
|
875
1406
|
_zod: $ZodBigIntInternals<T>;
|
|
876
1407
|
}
|
|
877
1408
|
declare const $ZodBigInt: $constructor<$ZodBigInt>;
|
|
1409
|
+
interface $ZodBigIntFormatDef<Format extends $ZodBigIntFormats = $ZodBigIntFormats> extends $ZodBigIntDef, $ZodCheckBigIntFormatDef<Format> {
|
|
1410
|
+
check: "bigint_format";
|
|
1411
|
+
}
|
|
1412
|
+
interface $ZodBigIntFormatInternals<Format extends $ZodBigIntFormats = $ZodBigIntFormats> extends $ZodBigIntInternals<bigint>, $ZodCheckBigIntFormatInternals<Format> {
|
|
1413
|
+
def: $ZodBigIntFormatDef<Format>;
|
|
1414
|
+
}
|
|
1415
|
+
interface $ZodBigIntFormat<Format extends $ZodBigIntFormats = $ZodBigIntFormats> extends $ZodType {
|
|
1416
|
+
_zod: $ZodBigIntFormatInternals<Format>;
|
|
1417
|
+
}
|
|
1418
|
+
declare const $ZodBigIntFormat: $constructor<$ZodBigIntFormat>;
|
|
878
1419
|
interface $ZodSymbolDef extends $ZodTypeDef {
|
|
879
1420
|
type: "symbol";
|
|
880
1421
|
}
|
|
@@ -1001,6 +1542,26 @@ type $ZodObjectConfig = {
|
|
|
1001
1542
|
out: Record<string, unknown>;
|
|
1002
1543
|
in: Record<string, unknown>;
|
|
1003
1544
|
};
|
|
1545
|
+
type $loose = {
|
|
1546
|
+
out: Record<string, unknown>;
|
|
1547
|
+
in: Record<string, unknown>;
|
|
1548
|
+
};
|
|
1549
|
+
type $strict = {
|
|
1550
|
+
out: {};
|
|
1551
|
+
in: {};
|
|
1552
|
+
};
|
|
1553
|
+
type $strip = {
|
|
1554
|
+
out: {};
|
|
1555
|
+
in: {};
|
|
1556
|
+
};
|
|
1557
|
+
type $catchall<T extends SomeType> = {
|
|
1558
|
+
out: {
|
|
1559
|
+
[k: string]: output<T>;
|
|
1560
|
+
};
|
|
1561
|
+
in: {
|
|
1562
|
+
[k: string]: input<T>;
|
|
1563
|
+
};
|
|
1564
|
+
};
|
|
1004
1565
|
type $ZodShape = Readonly<{
|
|
1005
1566
|
[k: string]: $ZodType;
|
|
1006
1567
|
}>;
|
|
@@ -1026,6 +1587,7 @@ interface $ZodObject<
|
|
|
1026
1587
|
/** @ts-ignore Cast variance */
|
|
1027
1588
|
out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {}
|
|
1028
1589
|
declare const $ZodObject: $constructor<$ZodObject>;
|
|
1590
|
+
declare const $ZodObjectJIT: $constructor<$ZodObject>;
|
|
1029
1591
|
type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
|
|
1030
1592
|
type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
|
|
1031
1593
|
interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
|
|
@@ -1049,6 +1611,40 @@ interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends
|
|
|
1049
1611
|
_zod: $ZodUnionInternals<T>;
|
|
1050
1612
|
}
|
|
1051
1613
|
declare const $ZodUnion: $constructor<$ZodUnion>;
|
|
1614
|
+
interface $ZodXorInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodUnionInternals<T> {}
|
|
1615
|
+
interface $ZodXor<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodXorInternals<T>> {
|
|
1616
|
+
_zod: $ZodXorInternals<T>;
|
|
1617
|
+
}
|
|
1618
|
+
declare const $ZodXor: $constructor<$ZodXor>;
|
|
1619
|
+
interface $ZodDiscriminatedUnionDef<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionDef<Options> {
|
|
1620
|
+
discriminator: Disc;
|
|
1621
|
+
unionFallback?: boolean;
|
|
1622
|
+
}
|
|
1623
|
+
interface $ZodDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionInternals<Options> {
|
|
1624
|
+
def: $ZodDiscriminatedUnionDef<Options, Disc>;
|
|
1625
|
+
propValues: PropValues;
|
|
1626
|
+
bag: LoosePartial<{
|
|
1627
|
+
optionsMap: Map<Primitive, $ZodType | null>;
|
|
1628
|
+
}>;
|
|
1629
|
+
}
|
|
1630
|
+
/** The discriminator values a member of `Options` can declare. An omittable discriminator contributes `undefined`, matching what `propValues` claims for it. */
|
|
1631
|
+
type $DiscriminatorValue<Options extends readonly SomeType[], Disc extends string> = { [I in keyof Options]: Options[I] extends {
|
|
1632
|
+
_zod: {
|
|
1633
|
+
output: infer Out;
|
|
1634
|
+
};
|
|
1635
|
+
} ? Disc extends keyof Out ? Out[Disc] : never : never; }[number];
|
|
1636
|
+
/** The member of `Options` that declares `V`. */
|
|
1637
|
+
type $DiscriminatedOption<Options extends readonly SomeType[], Disc extends string, V> = { [I in keyof Options]: Options[I] extends {
|
|
1638
|
+
_zod: {
|
|
1639
|
+
output: infer Out;
|
|
1640
|
+
};
|
|
1641
|
+
} ? Disc extends keyof Out ? V extends Out[Disc] ? Options[I] : never : never : never; }[number];
|
|
1642
|
+
/** Returns the option whose discriminator claims `value`, or throws if ambiguous. */
|
|
1643
|
+
declare function getDiscriminatedOption<Options extends readonly SomeType[], Disc extends string, const V extends $DiscriminatorValue<Options, Disc>>(union: $ZodDiscriminatedUnion<Options, Disc>, value: V): $DiscriminatedOption<Options, Disc, V>;
|
|
1644
|
+
interface $ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodType {
|
|
1645
|
+
_zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
|
|
1646
|
+
}
|
|
1647
|
+
declare const $ZodDiscriminatedUnion: $constructor<$ZodDiscriminatedUnion>;
|
|
1052
1648
|
interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1053
1649
|
type: "intersection";
|
|
1054
1650
|
left: Left;
|
|
@@ -1066,6 +1662,13 @@ interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $
|
|
|
1066
1662
|
_zod: $ZodIntersectionInternals<A, B>;
|
|
1067
1663
|
}
|
|
1068
1664
|
declare const $ZodIntersection: $constructor<$ZodIntersection>;
|
|
1665
|
+
declare function mergeValues(a: any, b: any): {
|
|
1666
|
+
valid: true;
|
|
1667
|
+
data: any;
|
|
1668
|
+
} | {
|
|
1669
|
+
valid: false;
|
|
1670
|
+
mergeErrorPath: (string | number)[];
|
|
1671
|
+
};
|
|
1069
1672
|
interface $ZodTupleDef<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
|
|
1070
1673
|
type: "tuple";
|
|
1071
1674
|
items: T;
|
|
@@ -1371,6 +1974,35 @@ interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType>
|
|
|
1371
1974
|
_zod: $ZodPipeInternals<A, B>;
|
|
1372
1975
|
}
|
|
1373
1976
|
declare const $ZodPipe: $constructor<$ZodPipe>;
|
|
1977
|
+
interface $ZodCodecDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodPipeDef<A, B> {
|
|
1978
|
+
transform: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
|
|
1979
|
+
reverseTransform: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
|
|
1980
|
+
}
|
|
1981
|
+
interface $ZodCodecInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
|
|
1982
|
+
def: $ZodCodecDef<A, B>;
|
|
1983
|
+
isst: never;
|
|
1984
|
+
values: A["_zod"]["values"];
|
|
1985
|
+
optin: A["_zod"]["optin"];
|
|
1986
|
+
optout: B["_zod"]["optout"];
|
|
1987
|
+
propValues: A["_zod"]["propValues"];
|
|
1988
|
+
}
|
|
1989
|
+
interface $ZodCodec<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
1990
|
+
_zod: $ZodCodecInternals<A, B>;
|
|
1991
|
+
}
|
|
1992
|
+
declare const $ZodCodec: $constructor<$ZodCodec>;
|
|
1993
|
+
interface $ZodPreprocessDef<B extends SomeType = $ZodType, I = unknown> extends $ZodPipeDef<$ZodTransform<unknown, I>, B> {
|
|
1994
|
+
in: $ZodTransform<unknown, I>;
|
|
1995
|
+
out: B;
|
|
1996
|
+
}
|
|
1997
|
+
interface $ZodPreprocessInternals<B extends SomeType = $ZodType, I = unknown> extends $ZodPipeInternals<$ZodTransform<unknown, I>, B> {
|
|
1998
|
+
def: $ZodPreprocessDef<B, I>;
|
|
1999
|
+
optin: B["_zod"]["optin"];
|
|
2000
|
+
optout: B["_zod"]["optout"];
|
|
2001
|
+
}
|
|
2002
|
+
interface $ZodPreprocess<B extends SomeType = $ZodType, I = unknown> extends $ZodPipe<$ZodTransform<unknown, I>, B> {
|
|
2003
|
+
_zod: $ZodPreprocessInternals<B, I>;
|
|
2004
|
+
}
|
|
2005
|
+
declare const $ZodPreprocess: $constructor<$ZodPreprocess>;
|
|
1374
2006
|
interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1375
2007
|
type: "readonly";
|
|
1376
2008
|
innerType: T;
|
|
@@ -1408,6 +2040,12 @@ interface SchemaPart extends $ZodType {
|
|
|
1408
2040
|
_zod: SchemaPartInternals;
|
|
1409
2041
|
}
|
|
1410
2042
|
type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
|
|
2043
|
+
type UndefinedToEmptyString<T> = T extends undefined ? "" : T;
|
|
2044
|
+
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;
|
|
2045
|
+
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 : "";
|
|
2046
|
+
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; };
|
|
2047
|
+
type ToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = ConcatenateTupleOfStrings<ConvertPartsToStringTuple<Parts>>;
|
|
2048
|
+
type $PartsToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = [] extends Parts ? `` : Parts extends [...infer Rest, infer Last extends $ZodTemplateLiteralPart] ? Rest extends $ZodTemplateLiteralPart[] ? AppendToTemplateLiteral<$PartsToTemplateLiteral<Rest>, Last> : never : never;
|
|
1411
2049
|
declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
|
|
1412
2050
|
type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
|
|
1413
2051
|
type $ZodFunctionIn = $ZodFunctionArgs;
|
|
@@ -1437,6 +2075,10 @@ interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns ext
|
|
|
1437
2075
|
input(...args: any[]): $ZodFunction<any, Returns>;
|
|
1438
2076
|
output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
|
|
1439
2077
|
}
|
|
2078
|
+
interface $ZodFunctionParams<I extends $ZodFunctionIn, O extends $ZodType> {
|
|
2079
|
+
input?: I;
|
|
2080
|
+
output?: O;
|
|
2081
|
+
}
|
|
1440
2082
|
declare const $ZodFunction: $constructor<$ZodFunction>;
|
|
1441
2083
|
interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1442
2084
|
type: "promise";
|
|
@@ -1489,8 +2131,10 @@ interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
|
|
|
1489
2131
|
}
|
|
1490
2132
|
declare const $ZodCustom: $constructor<$ZodCustom>;
|
|
1491
2133
|
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;
|
|
1492
|
-
|
|
1493
|
-
|
|
2134
|
+
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 | $ZodCreditCard | $ZodIBAN | $ZodJWT | $ZodCustomStringFormat<"hex"> | $ZodCustomStringFormat<HashFormat> | $ZodCustomStringFormat<"hostname"> | $ZodCustomStringFormat<"currency_code">;
|
|
2135
|
+
declare namespace checks_d_exports {
|
|
2136
|
+
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, $ZodCheckProperties, $ZodCheckPropertiesDef, $ZodCheckPropertiesInput, $ZodCheckPropertiesInternals, $ZodCheckProperty, $ZodCheckPropertyDef, $ZodCheckPropertyInternals, $ZodCheckRegex, $ZodCheckRegexDef, $ZodCheckRegexInternals, $ZodCheckSizeEquals, $ZodCheckSizeEqualsDef, $ZodCheckSizeEqualsInternals, $ZodCheckStartsWith, $ZodCheckStartsWithDef, $ZodCheckStartsWithInternals, $ZodCheckStringFormat, $ZodCheckStringFormatDef, $ZodCheckStringFormatInternals, $ZodCheckUpperCase, $ZodCheckUpperCaseDef, $ZodCheckUpperCaseInternals, $ZodChecks, $ZodNumberFormats, $ZodStringFormatChecks, $ZodStringFormats };
|
|
2137
|
+
}
|
|
1494
2138
|
interface $ZodCheckDef {
|
|
1495
2139
|
check: string;
|
|
1496
2140
|
error?: $ZodErrorMap<never> | undefined;
|
|
@@ -1510,6 +2154,106 @@ interface $ZodCheck<in T = never> {
|
|
|
1510
2154
|
_zod: $ZodCheckInternals<T>;
|
|
1511
2155
|
}
|
|
1512
2156
|
declare const $ZodCheck: $constructor<$ZodCheck<any>>;
|
|
2157
|
+
interface $ZodCheckLessThanDef extends $ZodCheckDef {
|
|
2158
|
+
check: "less_than";
|
|
2159
|
+
value: Numeric;
|
|
2160
|
+
inclusive: boolean;
|
|
2161
|
+
}
|
|
2162
|
+
interface $ZodCheckLessThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
|
|
2163
|
+
def: $ZodCheckLessThanDef;
|
|
2164
|
+
issc: $ZodIssueTooBig<T>;
|
|
2165
|
+
}
|
|
2166
|
+
interface $ZodCheckLessThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
|
|
2167
|
+
_zod: $ZodCheckLessThanInternals<T>;
|
|
2168
|
+
}
|
|
2169
|
+
declare const $ZodCheckLessThan: $constructor<$ZodCheckLessThan>;
|
|
2170
|
+
interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
|
|
2171
|
+
check: "greater_than";
|
|
2172
|
+
value: Numeric;
|
|
2173
|
+
inclusive: boolean;
|
|
2174
|
+
}
|
|
2175
|
+
interface $ZodCheckGreaterThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
|
|
2176
|
+
def: $ZodCheckGreaterThanDef;
|
|
2177
|
+
issc: $ZodIssueTooSmall<T>;
|
|
2178
|
+
}
|
|
2179
|
+
interface $ZodCheckGreaterThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
|
|
2180
|
+
_zod: $ZodCheckGreaterThanInternals<T>;
|
|
2181
|
+
}
|
|
2182
|
+
declare const $ZodCheckGreaterThan: $constructor<$ZodCheckGreaterThan>;
|
|
2183
|
+
interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
|
|
2184
|
+
check: "multiple_of";
|
|
2185
|
+
value: T;
|
|
2186
|
+
}
|
|
2187
|
+
interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint> extends $ZodCheckInternals<T> {
|
|
2188
|
+
def: $ZodCheckMultipleOfDef<T>;
|
|
2189
|
+
issc: $ZodIssueNotMultipleOf;
|
|
2190
|
+
}
|
|
2191
|
+
interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
|
|
2192
|
+
_zod: $ZodCheckMultipleOfInternals<T>;
|
|
2193
|
+
}
|
|
2194
|
+
declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
|
|
2195
|
+
type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
|
|
2196
|
+
interface $ZodCheckNumberFormatDef<Format extends $ZodNumberFormats = $ZodNumberFormats> extends $ZodCheckDef {
|
|
2197
|
+
check: "number_format";
|
|
2198
|
+
format: Format;
|
|
2199
|
+
}
|
|
2200
|
+
interface $ZodCheckNumberFormatInternals<Format extends $ZodNumberFormats = $ZodNumberFormats> extends $ZodCheckInternals<number> {
|
|
2201
|
+
def: $ZodCheckNumberFormatDef<Format>;
|
|
2202
|
+
issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
|
|
2203
|
+
}
|
|
2204
|
+
interface $ZodCheckNumberFormat<Format extends $ZodNumberFormats = $ZodNumberFormats> extends $ZodCheck<number> {
|
|
2205
|
+
_zod: $ZodCheckNumberFormatInternals<Format>;
|
|
2206
|
+
}
|
|
2207
|
+
declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
|
|
2208
|
+
type $ZodBigIntFormats = "int64" | "uint64";
|
|
2209
|
+
interface $ZodCheckBigIntFormatDef<Format extends $ZodBigIntFormats = $ZodBigIntFormats> extends $ZodCheckDef {
|
|
2210
|
+
check: "bigint_format";
|
|
2211
|
+
format: Format;
|
|
2212
|
+
}
|
|
2213
|
+
interface $ZodCheckBigIntFormatInternals<Format extends $ZodBigIntFormats = $ZodBigIntFormats> extends $ZodCheckInternals<bigint> {
|
|
2214
|
+
def: $ZodCheckBigIntFormatDef<Format>;
|
|
2215
|
+
issc: $ZodIssueTooBig<"bigint"> | $ZodIssueTooSmall<"bigint">;
|
|
2216
|
+
}
|
|
2217
|
+
interface $ZodCheckBigIntFormat<Format extends $ZodBigIntFormats = $ZodBigIntFormats> extends $ZodCheck<bigint> {
|
|
2218
|
+
_zod: $ZodCheckBigIntFormatInternals<Format>;
|
|
2219
|
+
}
|
|
2220
|
+
declare const $ZodCheckBigIntFormat: $constructor<$ZodCheckBigIntFormat>;
|
|
2221
|
+
interface $ZodCheckMaxSizeDef extends $ZodCheckDef {
|
|
2222
|
+
check: "max_size";
|
|
2223
|
+
maximum: number;
|
|
2224
|
+
}
|
|
2225
|
+
interface $ZodCheckMaxSizeInternals<T extends HasSize = HasSize> extends $ZodCheckInternals<T> {
|
|
2226
|
+
def: $ZodCheckMaxSizeDef;
|
|
2227
|
+
issc: $ZodIssueTooBig<T>;
|
|
2228
|
+
}
|
|
2229
|
+
interface $ZodCheckMaxSize<T extends HasSize = HasSize> extends $ZodCheck<T> {
|
|
2230
|
+
_zod: $ZodCheckMaxSizeInternals<T>;
|
|
2231
|
+
}
|
|
2232
|
+
declare const $ZodCheckMaxSize: $constructor<$ZodCheckMaxSize>;
|
|
2233
|
+
interface $ZodCheckMinSizeDef extends $ZodCheckDef {
|
|
2234
|
+
check: "min_size";
|
|
2235
|
+
minimum: number;
|
|
2236
|
+
}
|
|
2237
|
+
interface $ZodCheckMinSizeInternals<T extends HasSize = HasSize> extends $ZodCheckInternals<T> {
|
|
2238
|
+
def: $ZodCheckMinSizeDef;
|
|
2239
|
+
issc: $ZodIssueTooSmall<T>;
|
|
2240
|
+
}
|
|
2241
|
+
interface $ZodCheckMinSize<T extends HasSize = HasSize> extends $ZodCheck<T> {
|
|
2242
|
+
_zod: $ZodCheckMinSizeInternals<T>;
|
|
2243
|
+
}
|
|
2244
|
+
declare const $ZodCheckMinSize: $constructor<$ZodCheckMinSize>;
|
|
2245
|
+
interface $ZodCheckSizeEqualsDef extends $ZodCheckDef {
|
|
2246
|
+
check: "size_equals";
|
|
2247
|
+
size: number;
|
|
2248
|
+
}
|
|
2249
|
+
interface $ZodCheckSizeEqualsInternals<T extends HasSize = HasSize> extends $ZodCheckInternals<T> {
|
|
2250
|
+
def: $ZodCheckSizeEqualsDef;
|
|
2251
|
+
issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
|
|
2252
|
+
}
|
|
2253
|
+
interface $ZodCheckSizeEquals<T extends HasSize = HasSize> extends $ZodCheck<T> {
|
|
2254
|
+
_zod: $ZodCheckSizeEqualsInternals<T>;
|
|
2255
|
+
}
|
|
2256
|
+
declare const $ZodCheckSizeEquals: $constructor<$ZodCheckSizeEquals>;
|
|
1513
2257
|
interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
|
|
1514
2258
|
check: "max_length";
|
|
1515
2259
|
maximum: number;
|
|
@@ -1547,8 +2291,139 @@ interface $ZodCheckLengthEquals<T extends HasLength = HasLength> extends $ZodChe
|
|
|
1547
2291
|
}
|
|
1548
2292
|
declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
|
|
1549
2293
|
type $ZodStringFormats = "email" | "url" | "emoji" | "uuid" | "guid" | "nanoid" | "cuid" | "cuid2" | "ulid" | "xid" | "ksuid" | "datetime" | "date" | "time" | "duration" | "ipv4" | "ipv6" | "cidrv4" | "cidrv6" | "base64" | "base64url" | "json_string" | "e164" | "credit_card" | "iban" | "lowercase" | "uppercase" | "regex" | "jwt" | "starts_with" | "ends_with" | "includes";
|
|
1550
|
-
|
|
1551
|
-
|
|
2294
|
+
interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
|
|
2295
|
+
check: "string_format";
|
|
2296
|
+
format: Format;
|
|
2297
|
+
pattern?: RegExp | undefined;
|
|
2298
|
+
}
|
|
2299
|
+
interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
|
|
2300
|
+
def: $ZodCheckStringFormatDef;
|
|
2301
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2302
|
+
}
|
|
2303
|
+
interface $ZodCheckStringFormat extends $ZodCheck<string> {
|
|
2304
|
+
_zod: $ZodCheckStringFormatInternals;
|
|
2305
|
+
}
|
|
2306
|
+
declare const $ZodCheckStringFormat: $constructor<$ZodCheckStringFormat>;
|
|
2307
|
+
interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
|
|
2308
|
+
format: "regex";
|
|
2309
|
+
pattern: RegExp;
|
|
2310
|
+
}
|
|
2311
|
+
interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
|
|
2312
|
+
def: $ZodCheckRegexDef;
|
|
2313
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2314
|
+
}
|
|
2315
|
+
interface $ZodCheckRegex extends $ZodCheck<string> {
|
|
2316
|
+
_zod: $ZodCheckRegexInternals;
|
|
2317
|
+
}
|
|
2318
|
+
declare const $ZodCheckRegex: $constructor<$ZodCheckRegex>;
|
|
2319
|
+
interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {}
|
|
2320
|
+
interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
|
|
2321
|
+
def: $ZodCheckLowerCaseDef;
|
|
2322
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2323
|
+
}
|
|
2324
|
+
interface $ZodCheckLowerCase extends $ZodCheck<string> {
|
|
2325
|
+
_zod: $ZodCheckLowerCaseInternals;
|
|
2326
|
+
}
|
|
2327
|
+
declare const $ZodCheckLowerCase: $constructor<$ZodCheckLowerCase>;
|
|
2328
|
+
interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {}
|
|
2329
|
+
interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
|
|
2330
|
+
def: $ZodCheckUpperCaseDef;
|
|
2331
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2332
|
+
}
|
|
2333
|
+
interface $ZodCheckUpperCase extends $ZodCheck<string> {
|
|
2334
|
+
_zod: $ZodCheckUpperCaseInternals;
|
|
2335
|
+
}
|
|
2336
|
+
declare const $ZodCheckUpperCase: $constructor<$ZodCheckUpperCase>;
|
|
2337
|
+
interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
|
|
2338
|
+
includes: string;
|
|
2339
|
+
position?: number | undefined;
|
|
2340
|
+
}
|
|
2341
|
+
interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
|
|
2342
|
+
def: $ZodCheckIncludesDef;
|
|
2343
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2344
|
+
}
|
|
2345
|
+
interface $ZodCheckIncludes extends $ZodCheck<string> {
|
|
2346
|
+
_zod: $ZodCheckIncludesInternals;
|
|
2347
|
+
}
|
|
2348
|
+
declare const $ZodCheckIncludes: $constructor<$ZodCheckIncludes>;
|
|
2349
|
+
interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
|
|
2350
|
+
prefix: string;
|
|
2351
|
+
}
|
|
2352
|
+
interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
|
|
2353
|
+
def: $ZodCheckStartsWithDef;
|
|
2354
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2355
|
+
}
|
|
2356
|
+
interface $ZodCheckStartsWith extends $ZodCheck<string> {
|
|
2357
|
+
_zod: $ZodCheckStartsWithInternals;
|
|
2358
|
+
}
|
|
2359
|
+
declare const $ZodCheckStartsWith: $constructor<$ZodCheckStartsWith>;
|
|
2360
|
+
interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
|
|
2361
|
+
suffix: string;
|
|
2362
|
+
}
|
|
2363
|
+
interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
|
|
2364
|
+
def: $ZodCheckEndsWithDef;
|
|
2365
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2366
|
+
}
|
|
2367
|
+
interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
|
|
2368
|
+
_zod: $ZodCheckEndsWithInternals;
|
|
2369
|
+
}
|
|
2370
|
+
declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
|
|
2371
|
+
interface $ZodCheckPropertyDef extends $ZodCheckDef {
|
|
2372
|
+
check: "property";
|
|
2373
|
+
property: string;
|
|
2374
|
+
schema: $ZodType;
|
|
2375
|
+
}
|
|
2376
|
+
interface $ZodCheckPropertyInternals<T extends object = object> extends $ZodCheckInternals<T> {
|
|
2377
|
+
def: $ZodCheckPropertyDef;
|
|
2378
|
+
issc: $ZodIssue;
|
|
2379
|
+
}
|
|
2380
|
+
interface $ZodCheckProperty<T extends object = object> extends $ZodCheck<T> {
|
|
2381
|
+
_zod: $ZodCheckPropertyInternals<T>;
|
|
2382
|
+
}
|
|
2383
|
+
declare const $ZodCheckProperty: $constructor<$ZodCheckProperty>;
|
|
2384
|
+
interface $ZodCheckPropertiesDef<Shape extends $ZodShape = $ZodShape> extends $ZodCheckDef {
|
|
2385
|
+
check: "properties";
|
|
2386
|
+
shape: Shape;
|
|
2387
|
+
}
|
|
2388
|
+
type $ZodCheckPropertiesInput<Shape extends $ZodShape = $ZodShape> = { -readonly [k in keyof Shape]: Widen<input<Shape[k]>>; };
|
|
2389
|
+
interface $ZodCheckPropertiesInternals<Shape extends $ZodShape = $ZodShape> extends $ZodCheckInternals<$ZodCheckPropertiesInput<Shape>> {
|
|
2390
|
+
def: $ZodCheckPropertiesDef<Shape>;
|
|
2391
|
+
issc: $ZodIssue;
|
|
2392
|
+
}
|
|
2393
|
+
interface $ZodCheckProperties<Shape extends $ZodShape = $ZodShape> extends $ZodCheck<$ZodCheckPropertiesInput<Shape>> {
|
|
2394
|
+
_zod: $ZodCheckPropertiesInternals<Shape>;
|
|
2395
|
+
[Symbol.iterator](): Iterator<this>;
|
|
2396
|
+
}
|
|
2397
|
+
declare const $ZodCheckProperties: $constructor<$ZodCheckProperties>;
|
|
2398
|
+
interface $ZodCheckMimeTypeDef extends $ZodCheckDef {
|
|
2399
|
+
check: "mime_type";
|
|
2400
|
+
mime: MimeTypes[];
|
|
2401
|
+
}
|
|
2402
|
+
interface $ZodCheckMimeTypeInternals<T extends File = File> extends $ZodCheckInternals<T> {
|
|
2403
|
+
def: $ZodCheckMimeTypeDef;
|
|
2404
|
+
issc: $ZodIssueInvalidValue;
|
|
2405
|
+
}
|
|
2406
|
+
interface $ZodCheckMimeType<T extends File = File> extends $ZodCheck<T> {
|
|
2407
|
+
_zod: $ZodCheckMimeTypeInternals<T>;
|
|
2408
|
+
}
|
|
2409
|
+
declare const $ZodCheckMimeType: $constructor<$ZodCheckMimeType>;
|
|
2410
|
+
interface $ZodCheckOverwriteDef<T = unknown> extends $ZodCheckDef {
|
|
2411
|
+
check: "overwrite";
|
|
2412
|
+
tx(value: T): T;
|
|
2413
|
+
}
|
|
2414
|
+
interface $ZodCheckOverwriteInternals<T = unknown> extends $ZodCheckInternals<T> {
|
|
2415
|
+
def: $ZodCheckOverwriteDef<T>;
|
|
2416
|
+
issc: never;
|
|
2417
|
+
}
|
|
2418
|
+
interface $ZodCheckOverwrite<T = unknown> extends $ZodCheck<T> {
|
|
2419
|
+
_zod: $ZodCheckOverwriteInternals<T>;
|
|
2420
|
+
}
|
|
2421
|
+
declare const $ZodCheckOverwrite: $constructor<$ZodCheckOverwrite>;
|
|
2422
|
+
type $ZodChecks = $ZodCheckLessThan | $ZodCheckGreaterThan | $ZodCheckMultipleOf | $ZodCheckNumberFormat | $ZodCheckBigIntFormat | $ZodCheckMaxSize | $ZodCheckMinSize | $ZodCheckSizeEquals | $ZodCheckMaxLength | $ZodCheckMinLength | $ZodCheckLengthEquals | $ZodCheckStringFormat | $ZodCheckProperty | $ZodCheckMimeType | $ZodCheckOverwrite;
|
|
2423
|
+
type $ZodStringFormatChecks = $ZodCheckRegex | $ZodCheckLowerCase | $ZodCheckUpperCase | $ZodCheckIncludes | $ZodCheckStartsWith | $ZodCheckEndsWith | $ZodStringFormatTypes;
|
|
2424
|
+
declare namespace errors_d_exports {
|
|
2425
|
+
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 };
|
|
2426
|
+
}
|
|
1552
2427
|
interface $ZodIssueBase {
|
|
1553
2428
|
readonly code?: string;
|
|
1554
2429
|
readonly input?: unknown;
|
|
@@ -1636,7 +2511,32 @@ interface $ZodIssueCustom extends $ZodIssueBase {
|
|
|
1636
2511
|
readonly params?: Record<string, any> | undefined;
|
|
1637
2512
|
readonly input?: unknown;
|
|
1638
2513
|
}
|
|
2514
|
+
interface $ZodIssueStringCommonFormats extends $ZodIssueInvalidStringFormat {
|
|
2515
|
+
format: Exclude<$ZodStringFormats, "regex" | "jwt" | "starts_with" | "ends_with" | "includes">;
|
|
2516
|
+
}
|
|
2517
|
+
interface $ZodIssueStringInvalidRegex extends $ZodIssueInvalidStringFormat {
|
|
2518
|
+
format: "regex";
|
|
2519
|
+
pattern: string;
|
|
2520
|
+
}
|
|
2521
|
+
interface $ZodIssueStringInvalidJWT extends $ZodIssueInvalidStringFormat {
|
|
2522
|
+
format: "jwt";
|
|
2523
|
+
algorithm?: string;
|
|
2524
|
+
}
|
|
2525
|
+
interface $ZodIssueStringStartsWith extends $ZodIssueInvalidStringFormat {
|
|
2526
|
+
format: "starts_with";
|
|
2527
|
+
prefix: string;
|
|
2528
|
+
}
|
|
2529
|
+
interface $ZodIssueStringEndsWith extends $ZodIssueInvalidStringFormat {
|
|
2530
|
+
format: "ends_with";
|
|
2531
|
+
suffix: string;
|
|
2532
|
+
}
|
|
2533
|
+
interface $ZodIssueStringIncludes extends $ZodIssueInvalidStringFormat {
|
|
2534
|
+
format: "includes";
|
|
2535
|
+
includes: string;
|
|
2536
|
+
}
|
|
2537
|
+
type $ZodStringFormatIssues = $ZodIssueStringCommonFormats | $ZodIssueStringInvalidRegex | $ZodIssueStringInvalidJWT | $ZodIssueStringStartsWith | $ZodIssueStringEndsWith | $ZodIssueStringIncludes;
|
|
1639
2538
|
type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
|
|
2539
|
+
type $ZodIssueCode = $ZodIssue["code"];
|
|
1640
2540
|
type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
|
|
1641
2541
|
type RawIssue$1<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
|
|
1642
2542
|
/** The input data */
|
|
@@ -1665,19 +2565,76 @@ interface $ZodError<T = unknown> extends Error {
|
|
|
1665
2565
|
name: string;
|
|
1666
2566
|
}
|
|
1667
2567
|
declare const $ZodError: $constructor<$ZodError>;
|
|
2568
|
+
interface $ZodRealError<T = any> extends $ZodError<T> {}
|
|
2569
|
+
declare const $ZodRealError: $constructor<$ZodRealError>;
|
|
1668
2570
|
type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
|
|
1669
2571
|
type _FlattenedError<T, U = string> = {
|
|
1670
2572
|
formErrors: U[];
|
|
1671
2573
|
fieldErrors: { [P in keyof T]?: U[]; };
|
|
1672
2574
|
};
|
|
2575
|
+
declare function flattenError<T>(error: $ZodError<T>): _FlattenedError<T>;
|
|
2576
|
+
declare function flattenError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): _FlattenedError<T, U>;
|
|
1673
2577
|
type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U>; } : T extends any[] ? {
|
|
1674
2578
|
[k: number]: $ZodFormattedError<T[number], U>;
|
|
1675
2579
|
} : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U>; }> : any;
|
|
1676
2580
|
type $ZodFormattedError<T, U = string> = {
|
|
1677
2581
|
_errors: U[];
|
|
1678
2582
|
} & Flatten<_ZodFormattedError<T, U>>;
|
|
1679
|
-
|
|
1680
|
-
|
|
2583
|
+
declare function formatError<T>(error: $ZodError<T>): $ZodFormattedError<T>;
|
|
2584
|
+
declare function formatError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
|
|
2585
|
+
type $ZodErrorTree<T, U = string> = T extends Primitive ? {
|
|
2586
|
+
errors: U[];
|
|
2587
|
+
} : T extends [any, ...any[]] ? {
|
|
2588
|
+
errors: U[];
|
|
2589
|
+
items?: { [K in keyof T]?: $ZodErrorTree<T[K], U>; };
|
|
2590
|
+
} : T extends any[] ? {
|
|
2591
|
+
errors: U[];
|
|
2592
|
+
items?: Array<$ZodErrorTree<T[number], U>>;
|
|
2593
|
+
} : T extends object ? {
|
|
2594
|
+
errors: U[];
|
|
2595
|
+
properties?: { [K in keyof T]?: $ZodErrorTree<T[K], U>; };
|
|
2596
|
+
} : {
|
|
2597
|
+
errors: U[];
|
|
2598
|
+
};
|
|
2599
|
+
declare function treeifyError<T>(error: $ZodError<T>): $ZodErrorTree<T>;
|
|
2600
|
+
declare function treeifyError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodErrorTree<T, U>;
|
|
2601
|
+
/** Format a ZodError as a human-readable string in the following form.
|
|
2602
|
+
*
|
|
2603
|
+
* From
|
|
2604
|
+
*
|
|
2605
|
+
* ```ts
|
|
2606
|
+
* ZodError {
|
|
2607
|
+
* issues: [
|
|
2608
|
+
* {
|
|
2609
|
+
* expected: 'string',
|
|
2610
|
+
* code: 'invalid_type',
|
|
2611
|
+
* path: [ 'username' ],
|
|
2612
|
+
* message: 'Invalid input: expected string'
|
|
2613
|
+
* },
|
|
2614
|
+
* {
|
|
2615
|
+
* expected: 'number',
|
|
2616
|
+
* code: 'invalid_type',
|
|
2617
|
+
* path: [ 'favoriteNumbers', 1 ],
|
|
2618
|
+
* message: 'Invalid input: expected number'
|
|
2619
|
+
* }
|
|
2620
|
+
* ];
|
|
2621
|
+
* }
|
|
2622
|
+
* ```
|
|
2623
|
+
*
|
|
2624
|
+
* to
|
|
2625
|
+
*
|
|
2626
|
+
* ```
|
|
2627
|
+
* username
|
|
2628
|
+
* ✖ Expected number, received string at "username
|
|
2629
|
+
* favoriteNumbers[0]
|
|
2630
|
+
* ✖ Invalid input: expected number
|
|
2631
|
+
* ```
|
|
2632
|
+
*/
|
|
2633
|
+
declare function toDotPath(_path: readonly (string | number | symbol | StandardSchemaV1.PathSegment)[]): string;
|
|
2634
|
+
declare function prettifyError(error: StandardSchemaV1.FailureResult): string;
|
|
2635
|
+
declare namespace core_d_exports {
|
|
2636
|
+
export { $ZodAsyncError, $ZodBranded, $ZodConfig, $ZodEncodeError, $ZodNarrow, $brand, $constructor, $constructorParams, NEVER, config, globalConfig, output as infer, input, output };
|
|
2637
|
+
}
|
|
1681
2638
|
type ZodTrait = {
|
|
1682
2639
|
_zod: {
|
|
1683
2640
|
def: any;
|
|
@@ -1691,6 +2648,8 @@ interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
|
|
|
1691
2648
|
interface $constructorParams {
|
|
1692
2649
|
Parent?: typeof Class;
|
|
1693
2650
|
}
|
|
2651
|
+
/** A special constant with type `never` */
|
|
2652
|
+
declare const NEVER: never;
|
|
1694
2653
|
declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void,
|
|
1695
2654
|
/** This trait's members, installed once on every prototype that composes it. They cannot be declared in the initializer above: that runs per instance, and the prototype is shared. */
|
|
1696
2655
|
proto?: ProtoOf<T>, params?: $constructorParams): $constructor<T, D>;
|
|
@@ -1712,6 +2671,17 @@ type $ZodBranded<T extends SomeType, Brand extends string | number | symbol, Dir
|
|
|
1712
2671
|
output: output<T> & $brand<Brand>;
|
|
1713
2672
|
};
|
|
1714
2673
|
});
|
|
2674
|
+
type $ZodNarrow<T extends SomeType, Out> = T & {
|
|
2675
|
+
_zod: {
|
|
2676
|
+
output: Out;
|
|
2677
|
+
};
|
|
2678
|
+
};
|
|
2679
|
+
declare class $ZodAsyncError extends Error {
|
|
2680
|
+
constructor();
|
|
2681
|
+
}
|
|
2682
|
+
declare class $ZodEncodeError extends Error {
|
|
2683
|
+
constructor(name: string);
|
|
2684
|
+
}
|
|
1715
2685
|
type input<T> = T extends {
|
|
1716
2686
|
_zod: {
|
|
1717
2687
|
input: any;
|
|
@@ -1722,6 +2692,580 @@ type output<T> = T extends {
|
|
|
1722
2692
|
output: any;
|
|
1723
2693
|
};
|
|
1724
2694
|
} ? T["_zod"]["output"] : unknown;
|
|
2695
|
+
interface $ZodConfig {
|
|
2696
|
+
/** Custom error map. Overrides `config().localeError`. */
|
|
2697
|
+
customError?: $ZodErrorMap | undefined;
|
|
2698
|
+
/** Localized error map. Lowest priority. */
|
|
2699
|
+
localeError?: $ZodErrorMap | undefined;
|
|
2700
|
+
/** Disable JIT schema compilation. Useful in environments that disallow `eval`. */
|
|
2701
|
+
jitless?: boolean | undefined;
|
|
2702
|
+
/** Enables parsing input that contains reference cycles. Read when a schema is constructed. */
|
|
2703
|
+
memoizer?: $ZodMemoizer | undefined;
|
|
2704
|
+
/**
|
|
2705
|
+
* Internal: post-processor invoked on every freshly-constructed schema
|
|
2706
|
+
* instance, after init and deferred fns run. Set by `import "zod/compile"`
|
|
2707
|
+
* to install AOT compilation. Not part of the public API.
|
|
2708
|
+
* @internal
|
|
2709
|
+
*/
|
|
2710
|
+
postProcessor?: ((inst: any) => void) | undefined;
|
|
2711
|
+
}
|
|
2712
|
+
declare const globalConfig: $ZodConfig;
|
|
2713
|
+
declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;
|
|
2714
|
+
//#endregion
|
|
2715
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.d.cts
|
|
2716
|
+
type $ZodErrorClass = {
|
|
2717
|
+
new (issues: $ZodIssue[]): $ZodError;
|
|
2718
|
+
};
|
|
2719
|
+
type $ParseParams = {
|
|
2720
|
+
callee?: AnyFunc;
|
|
2721
|
+
Err?: $ZodErrorClass | undefined;
|
|
2722
|
+
};
|
|
2723
|
+
type $Parse = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>, _params?: $ParseParams) => output<T>;
|
|
2724
|
+
declare const _parse: (_Err: $ZodErrorClass) => $Parse;
|
|
2725
|
+
declare const parse$1: $Parse;
|
|
2726
|
+
type $ParseAsync = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>, _params?: $ParseParams) => Promise<output<T>>;
|
|
2727
|
+
declare const _parseAsync: (_Err: $ZodErrorClass) => $ParseAsync;
|
|
2728
|
+
declare const parseAsync$1: $ParseAsync;
|
|
2729
|
+
type $SafeParse = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => SafeParseResult<output<T>>;
|
|
2730
|
+
declare const _safeParse: (_Err: $ZodErrorClass) => $SafeParse;
|
|
2731
|
+
declare const safeParse$1: $SafeParse;
|
|
2732
|
+
type $SafeParseAsync = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => Promise<SafeParseResult<output<T>>>;
|
|
2733
|
+
declare const _safeParseAsync: (_Err: $ZodErrorClass) => $SafeParseAsync;
|
|
2734
|
+
declare const safeParseAsync$1: $SafeParseAsync;
|
|
2735
|
+
type $Validate = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => value is input<T>;
|
|
2736
|
+
declare const validate: $Validate;
|
|
2737
|
+
type $ValidateAsync = <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => Promise<boolean>;
|
|
2738
|
+
declare const validateAsync: $ValidateAsync;
|
|
2739
|
+
type $Encode = <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>, _params?: $ParseParams) => input<T>;
|
|
2740
|
+
declare const _encode: (_Err: $ZodErrorClass) => $Encode;
|
|
2741
|
+
declare const encode$1: $Encode;
|
|
2742
|
+
type $Decode = <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>, _params?: $ParseParams) => output<T>;
|
|
2743
|
+
declare const _decode: (_Err: $ZodErrorClass) => $Decode;
|
|
2744
|
+
declare const decode$1: $Decode;
|
|
2745
|
+
type $EncodeAsync = <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>, _params?: $ParseParams) => Promise<input<T>>;
|
|
2746
|
+
declare const _encodeAsync: (_Err: $ZodErrorClass) => $EncodeAsync;
|
|
2747
|
+
declare const encodeAsync$1: $EncodeAsync;
|
|
2748
|
+
type $DecodeAsync = <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>, _params?: $ParseParams) => Promise<output<T>>;
|
|
2749
|
+
declare const _decodeAsync: (_Err: $ZodErrorClass) => $DecodeAsync;
|
|
2750
|
+
declare const decodeAsync$1: $DecodeAsync;
|
|
2751
|
+
type $SafeEncode = <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => SafeParseResult<input<T>>;
|
|
2752
|
+
declare const _safeEncode: (_Err: $ZodErrorClass) => $SafeEncode;
|
|
2753
|
+
declare const safeEncode$1: $SafeEncode;
|
|
2754
|
+
type $SafeDecode = <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => SafeParseResult<output<T>>;
|
|
2755
|
+
declare const _safeDecode: (_Err: $ZodErrorClass) => $SafeDecode;
|
|
2756
|
+
declare const safeDecode$1: $SafeDecode;
|
|
2757
|
+
type $SafeEncodeAsync = <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<SafeParseResult<input<T>>>;
|
|
2758
|
+
declare const _safeEncodeAsync: (_Err: $ZodErrorClass) => $SafeEncodeAsync;
|
|
2759
|
+
declare const safeEncodeAsync$1: $SafeEncodeAsync;
|
|
2760
|
+
type $SafeDecodeAsync = <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<SafeParseResult<output<T>>>;
|
|
2761
|
+
declare const _safeDecodeAsync: (_Err: $ZodErrorClass) => $SafeDecodeAsync;
|
|
2762
|
+
declare const safeDecodeAsync$1: $SafeDecodeAsync;
|
|
2763
|
+
//#endregion
|
|
2764
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.d.cts
|
|
2765
|
+
declare class $ZodCyclicError extends Error {
|
|
2766
|
+
constructor();
|
|
2767
|
+
}
|
|
2768
|
+
/**
|
|
2769
|
+
* Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.
|
|
2770
|
+
* Exported for `z.compile`, which refuses to compile such a schema: cycle
|
|
2771
|
+
* breaking is driven from here off state keyed on the parse context, and a
|
|
2772
|
+
* generated fast path has no context to key on.
|
|
2773
|
+
*/
|
|
2774
|
+
declare function isRecursiveSchema(inst: $ZodType): boolean;
|
|
2775
|
+
/** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */
|
|
2776
|
+
declare function memoizer(): $ZodMemoizer;
|
|
2777
|
+
/** Whether this value is a node a back-edge resolved to before it finished. */
|
|
2778
|
+
declare function isBackEdge(ctx: object, value: unknown): boolean;
|
|
2779
|
+
declare namespace regexes_d_exports {
|
|
2780
|
+
export { anyString, base64, base64url, bigint, boolean, browserEmail, cidrv4, cidrv6, creditCard, cuid, cuid2, currencyCode, date, datetime, domain, duration, e164, email, emoji, extendedDuration, guid, hex, hostname, html5Email, httpProtocol, iban, idnEmail, integer, ipv4, ipv6, ksuid, lowercase, mac, md5_base64, md5_base64url, md5_hex, nanoid, nanoidOfLength, _null$1 as null, number, rfc5322Email, sha1_base64, sha1_base64url, sha1_hex, sha256_base64, sha256_base64url, sha256_hex, sha384_base64, sha384_base64url, sha384_hex, sha512_base64, sha512_base64url, sha512_hex, string, time, ulid, _undefined$1 as undefined, unicodeEmail, uppercase, uuid, uuid4, uuid6, uuid7, xid };
|
|
2781
|
+
}
|
|
2782
|
+
/**
|
|
2783
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
2784
|
+
* (timestamps embedded in the id). Use {@link cuid2} instead.
|
|
2785
|
+
* See https://github.com/paralleldrive/cuid.
|
|
2786
|
+
*/
|
|
2787
|
+
declare const cuid: RegExp;
|
|
2788
|
+
declare const cuid2: RegExp;
|
|
2789
|
+
declare const ulid: RegExp;
|
|
2790
|
+
declare const xid: RegExp;
|
|
2791
|
+
declare const ksuid: RegExp;
|
|
2792
|
+
declare const nanoid: RegExp;
|
|
2793
|
+
declare function nanoidOfLength(length: number): RegExp;
|
|
2794
|
+
/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
|
|
2795
|
+
declare const duration: RegExp;
|
|
2796
|
+
/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */
|
|
2797
|
+
declare const extendedDuration: RegExp;
|
|
2798
|
+
/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
|
|
2799
|
+
declare const guid: RegExp;
|
|
2800
|
+
/** Returns a regex for validating an RFC 9562/4122 UUID.
|
|
2801
|
+
*
|
|
2802
|
+
* @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
|
|
2803
|
+
declare const uuid: (version?: number | undefined) => RegExp;
|
|
2804
|
+
declare const uuid4: RegExp;
|
|
2805
|
+
declare const uuid6: RegExp;
|
|
2806
|
+
declare const uuid7: RegExp;
|
|
2807
|
+
/** Practical email validation */
|
|
2808
|
+
declare const email: RegExp;
|
|
2809
|
+
/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */
|
|
2810
|
+
declare const html5Email: RegExp;
|
|
2811
|
+
/** The classic emailregex.com regex for RFC 5322-compliant emails */
|
|
2812
|
+
declare const rfc5322Email: RegExp;
|
|
2813
|
+
/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */
|
|
2814
|
+
declare const unicodeEmail: RegExp;
|
|
2815
|
+
declare const idnEmail: RegExp;
|
|
2816
|
+
declare const browserEmail: RegExp;
|
|
2817
|
+
declare function emoji(): RegExp;
|
|
2818
|
+
declare const ipv4: RegExp;
|
|
2819
|
+
declare const ipv6: RegExp;
|
|
2820
|
+
declare const mac: (delimiter?: string) => RegExp;
|
|
2821
|
+
declare const cidrv4: RegExp;
|
|
2822
|
+
declare const cidrv6: RegExp;
|
|
2823
|
+
declare const base64: RegExp;
|
|
2824
|
+
declare const base64url: RegExp;
|
|
2825
|
+
declare const hostname: RegExp;
|
|
2826
|
+
declare const domain: RegExp;
|
|
2827
|
+
declare const httpProtocol: RegExp;
|
|
2828
|
+
declare const e164: RegExp;
|
|
2829
|
+
declare const creditCard: RegExp;
|
|
2830
|
+
declare const currencyCode: RegExp;
|
|
2831
|
+
declare const iban: RegExp;
|
|
2832
|
+
declare const date: RegExp;
|
|
2833
|
+
declare function time(args: {
|
|
2834
|
+
precision?: number | null;
|
|
2835
|
+
}): RegExp;
|
|
2836
|
+
declare function datetime(args: {
|
|
2837
|
+
precision?: number | null;
|
|
2838
|
+
offset?: boolean;
|
|
2839
|
+
local?: boolean;
|
|
2840
|
+
}): RegExp;
|
|
2841
|
+
declare const anyString: RegExp;
|
|
2842
|
+
declare const string: (params?: {
|
|
2843
|
+
minimum?: number | undefined;
|
|
2844
|
+
maximum?: number | undefined;
|
|
2845
|
+
}) => RegExp;
|
|
2846
|
+
declare const bigint: RegExp;
|
|
2847
|
+
declare const integer: RegExp;
|
|
2848
|
+
declare const number: RegExp;
|
|
2849
|
+
declare const boolean: RegExp;
|
|
2850
|
+
declare const _null$1: RegExp;
|
|
2851
|
+
declare const _undefined$1: RegExp;
|
|
2852
|
+
declare const lowercase: RegExp;
|
|
2853
|
+
declare const uppercase: RegExp;
|
|
2854
|
+
declare const hex: RegExp;
|
|
2855
|
+
declare const md5_hex: RegExp;
|
|
2856
|
+
declare const md5_base64: RegExp;
|
|
2857
|
+
declare const md5_base64url: RegExp;
|
|
2858
|
+
declare const sha1_hex: RegExp;
|
|
2859
|
+
declare const sha1_base64: RegExp;
|
|
2860
|
+
declare const sha1_base64url: RegExp;
|
|
2861
|
+
declare const sha256_hex: RegExp;
|
|
2862
|
+
declare const sha256_base64: RegExp;
|
|
2863
|
+
declare const sha256_base64url: RegExp;
|
|
2864
|
+
declare const sha384_hex: RegExp;
|
|
2865
|
+
declare const sha384_base64: RegExp;
|
|
2866
|
+
declare const sha384_base64url: RegExp;
|
|
2867
|
+
declare const sha512_hex: RegExp;
|
|
2868
|
+
declare const sha512_base64: RegExp;
|
|
2869
|
+
declare const sha512_base64url: RegExp;
|
|
2870
|
+
//#endregion
|
|
2871
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ar.d.cts
|
|
2872
|
+
declare function _default$63(): {
|
|
2873
|
+
localeError: $ZodErrorMap;
|
|
2874
|
+
};
|
|
2875
|
+
//#endregion
|
|
2876
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/az.d.cts
|
|
2877
|
+
declare function _default$62(): {
|
|
2878
|
+
localeError: $ZodErrorMap;
|
|
2879
|
+
};
|
|
2880
|
+
//#endregion
|
|
2881
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/be.d.cts
|
|
2882
|
+
declare function _default$61(): {
|
|
2883
|
+
localeError: $ZodErrorMap;
|
|
2884
|
+
};
|
|
2885
|
+
//#endregion
|
|
2886
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/bg.d.cts
|
|
2887
|
+
declare function _default$60(): {
|
|
2888
|
+
localeError: $ZodErrorMap;
|
|
2889
|
+
};
|
|
2890
|
+
//#endregion
|
|
2891
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/bn.d.cts
|
|
2892
|
+
declare function _default$59(): {
|
|
2893
|
+
localeError: $ZodErrorMap;
|
|
2894
|
+
};
|
|
2895
|
+
//#endregion
|
|
2896
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ca.d.cts
|
|
2897
|
+
declare function _default$58(): {
|
|
2898
|
+
localeError: $ZodErrorMap;
|
|
2899
|
+
};
|
|
2900
|
+
//#endregion
|
|
2901
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ckb.d.cts
|
|
2902
|
+
declare function _default$57(): {
|
|
2903
|
+
localeError: $ZodErrorMap;
|
|
2904
|
+
};
|
|
2905
|
+
//#endregion
|
|
2906
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/cs.d.cts
|
|
2907
|
+
declare function _default$56(): {
|
|
2908
|
+
localeError: $ZodErrorMap;
|
|
2909
|
+
};
|
|
2910
|
+
//#endregion
|
|
2911
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/da.d.cts
|
|
2912
|
+
declare function _default$55(): {
|
|
2913
|
+
localeError: $ZodErrorMap;
|
|
2914
|
+
};
|
|
2915
|
+
//#endregion
|
|
2916
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/de.d.cts
|
|
2917
|
+
declare function _default$54(): {
|
|
2918
|
+
localeError: $ZodErrorMap;
|
|
2919
|
+
};
|
|
2920
|
+
//#endregion
|
|
2921
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/el.d.cts
|
|
2922
|
+
declare function _default$53(): {
|
|
2923
|
+
localeError: $ZodErrorMap;
|
|
2924
|
+
};
|
|
2925
|
+
//#endregion
|
|
2926
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.d.cts
|
|
2927
|
+
declare function _default$52(): {
|
|
2928
|
+
localeError: $ZodErrorMap;
|
|
2929
|
+
};
|
|
2930
|
+
//#endregion
|
|
2931
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/eo.d.cts
|
|
2932
|
+
declare function _default$51(): {
|
|
2933
|
+
localeError: $ZodErrorMap;
|
|
2934
|
+
};
|
|
2935
|
+
//#endregion
|
|
2936
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/es.d.cts
|
|
2937
|
+
declare function _default$50(): {
|
|
2938
|
+
localeError: $ZodErrorMap;
|
|
2939
|
+
};
|
|
2940
|
+
//#endregion
|
|
2941
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fa.d.cts
|
|
2942
|
+
declare function _default$49(): {
|
|
2943
|
+
localeError: $ZodErrorMap;
|
|
2944
|
+
};
|
|
2945
|
+
//#endregion
|
|
2946
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fi.d.cts
|
|
2947
|
+
declare function _default$48(): {
|
|
2948
|
+
localeError: $ZodErrorMap;
|
|
2949
|
+
};
|
|
2950
|
+
//#endregion
|
|
2951
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fr.d.cts
|
|
2952
|
+
declare function _default$47(): {
|
|
2953
|
+
localeError: $ZodErrorMap;
|
|
2954
|
+
};
|
|
2955
|
+
//#endregion
|
|
2956
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fr-CA.d.cts
|
|
2957
|
+
declare function _default$46(): {
|
|
2958
|
+
localeError: $ZodErrorMap;
|
|
2959
|
+
};
|
|
2960
|
+
//#endregion
|
|
2961
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/gu.d.cts
|
|
2962
|
+
declare function _default$45(): {
|
|
2963
|
+
localeError: $ZodErrorMap;
|
|
2964
|
+
};
|
|
2965
|
+
//#endregion
|
|
2966
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/he.d.cts
|
|
2967
|
+
declare function _default$44(): {
|
|
2968
|
+
localeError: $ZodErrorMap;
|
|
2969
|
+
};
|
|
2970
|
+
//#endregion
|
|
2971
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hi.d.cts
|
|
2972
|
+
declare function _default$43(): {
|
|
2973
|
+
localeError: $ZodErrorMap;
|
|
2974
|
+
};
|
|
2975
|
+
//#endregion
|
|
2976
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hr.d.cts
|
|
2977
|
+
declare function _default$42(): {
|
|
2978
|
+
localeError: $ZodErrorMap;
|
|
2979
|
+
};
|
|
2980
|
+
//#endregion
|
|
2981
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hu.d.cts
|
|
2982
|
+
declare function _default$41(): {
|
|
2983
|
+
localeError: $ZodErrorMap;
|
|
2984
|
+
};
|
|
2985
|
+
//#endregion
|
|
2986
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hy.d.cts
|
|
2987
|
+
declare function _default$40(): {
|
|
2988
|
+
localeError: $ZodErrorMap;
|
|
2989
|
+
};
|
|
2990
|
+
//#endregion
|
|
2991
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/id.d.cts
|
|
2992
|
+
declare function _default$39(): {
|
|
2993
|
+
localeError: $ZodErrorMap;
|
|
2994
|
+
};
|
|
2995
|
+
//#endregion
|
|
2996
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/is.d.cts
|
|
2997
|
+
declare function _default$38(): {
|
|
2998
|
+
localeError: $ZodErrorMap;
|
|
2999
|
+
};
|
|
3000
|
+
//#endregion
|
|
3001
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/it.d.cts
|
|
3002
|
+
declare function _default$37(): {
|
|
3003
|
+
localeError: $ZodErrorMap;
|
|
3004
|
+
};
|
|
3005
|
+
//#endregion
|
|
3006
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ja.d.cts
|
|
3007
|
+
declare function _default$36(): {
|
|
3008
|
+
localeError: $ZodErrorMap;
|
|
3009
|
+
};
|
|
3010
|
+
//#endregion
|
|
3011
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ka.d.cts
|
|
3012
|
+
declare function _default$35(): {
|
|
3013
|
+
localeError: $ZodErrorMap;
|
|
3014
|
+
};
|
|
3015
|
+
//#endregion
|
|
3016
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/kh.d.cts
|
|
3017
|
+
declare function _default$34(): {
|
|
3018
|
+
localeError: $ZodErrorMap;
|
|
3019
|
+
};
|
|
3020
|
+
//#endregion
|
|
3021
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/km.d.cts
|
|
3022
|
+
declare function _default$33(): {
|
|
3023
|
+
localeError: $ZodErrorMap;
|
|
3024
|
+
};
|
|
3025
|
+
//#endregion
|
|
3026
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/kn.d.cts
|
|
3027
|
+
declare function _default$32(): {
|
|
3028
|
+
localeError: $ZodErrorMap;
|
|
3029
|
+
};
|
|
3030
|
+
//#endregion
|
|
3031
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ko.d.cts
|
|
3032
|
+
declare function _default$31(): {
|
|
3033
|
+
localeError: $ZodErrorMap;
|
|
3034
|
+
};
|
|
3035
|
+
//#endregion
|
|
3036
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/lt.d.cts
|
|
3037
|
+
declare function _default$30(): {
|
|
3038
|
+
localeError: $ZodErrorMap;
|
|
3039
|
+
};
|
|
3040
|
+
//#endregion
|
|
3041
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/mk.d.cts
|
|
3042
|
+
declare function _default$29(): {
|
|
3043
|
+
localeError: $ZodErrorMap;
|
|
3044
|
+
};
|
|
3045
|
+
//#endregion
|
|
3046
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ms.d.cts
|
|
3047
|
+
declare function _default$28(): {
|
|
3048
|
+
localeError: $ZodErrorMap;
|
|
3049
|
+
};
|
|
3050
|
+
//#endregion
|
|
3051
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ne.d.cts
|
|
3052
|
+
declare function _default$27(): {
|
|
3053
|
+
localeError: $ZodErrorMap;
|
|
3054
|
+
};
|
|
3055
|
+
//#endregion
|
|
3056
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/nl.d.cts
|
|
3057
|
+
declare function _default$26(): {
|
|
3058
|
+
localeError: $ZodErrorMap;
|
|
3059
|
+
};
|
|
3060
|
+
//#endregion
|
|
3061
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/nn.d.cts
|
|
3062
|
+
declare function _default$25(): {
|
|
3063
|
+
localeError: $ZodErrorMap;
|
|
3064
|
+
};
|
|
3065
|
+
//#endregion
|
|
3066
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/no.d.cts
|
|
3067
|
+
declare function _default$24(): {
|
|
3068
|
+
localeError: $ZodErrorMap;
|
|
3069
|
+
};
|
|
3070
|
+
//#endregion
|
|
3071
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ota.d.cts
|
|
3072
|
+
declare function _default$23(): {
|
|
3073
|
+
localeError: $ZodErrorMap;
|
|
3074
|
+
};
|
|
3075
|
+
//#endregion
|
|
3076
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ps.d.cts
|
|
3077
|
+
declare function _default$22(): {
|
|
3078
|
+
localeError: $ZodErrorMap;
|
|
3079
|
+
};
|
|
3080
|
+
//#endregion
|
|
3081
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pl.d.cts
|
|
3082
|
+
declare function _default$21(): {
|
|
3083
|
+
localeError: $ZodErrorMap;
|
|
3084
|
+
};
|
|
3085
|
+
//#endregion
|
|
3086
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pt.d.cts
|
|
3087
|
+
declare function _default$20(): {
|
|
3088
|
+
localeError: $ZodErrorMap;
|
|
3089
|
+
};
|
|
3090
|
+
//#endregion
|
|
3091
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pt-BR.d.cts
|
|
3092
|
+
declare function _default$19(): {
|
|
3093
|
+
localeError: $ZodErrorMap;
|
|
3094
|
+
};
|
|
3095
|
+
//#endregion
|
|
3096
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ro.d.cts
|
|
3097
|
+
declare function _default$18(): {
|
|
3098
|
+
localeError: $ZodErrorMap;
|
|
3099
|
+
};
|
|
3100
|
+
//#endregion
|
|
3101
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ru.d.cts
|
|
3102
|
+
declare function _default$17(): {
|
|
3103
|
+
localeError: $ZodErrorMap;
|
|
3104
|
+
};
|
|
3105
|
+
//#endregion
|
|
3106
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sk.d.cts
|
|
3107
|
+
declare function _default$16(): {
|
|
3108
|
+
localeError: $ZodErrorMap;
|
|
3109
|
+
};
|
|
3110
|
+
//#endregion
|
|
3111
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sl.d.cts
|
|
3112
|
+
declare function _default$15(): {
|
|
3113
|
+
localeError: $ZodErrorMap;
|
|
3114
|
+
};
|
|
3115
|
+
//#endregion
|
|
3116
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sv.d.cts
|
|
3117
|
+
declare function _default$14(): {
|
|
3118
|
+
localeError: $ZodErrorMap;
|
|
3119
|
+
};
|
|
3120
|
+
//#endregion
|
|
3121
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ta.d.cts
|
|
3122
|
+
declare function _default$13(): {
|
|
3123
|
+
localeError: $ZodErrorMap;
|
|
3124
|
+
};
|
|
3125
|
+
//#endregion
|
|
3126
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tg.d.cts
|
|
3127
|
+
declare function _default$12(): {
|
|
3128
|
+
localeError: $ZodErrorMap;
|
|
3129
|
+
};
|
|
3130
|
+
//#endregion
|
|
3131
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/th.d.cts
|
|
3132
|
+
declare function _default$11(): {
|
|
3133
|
+
localeError: $ZodErrorMap;
|
|
3134
|
+
};
|
|
3135
|
+
//#endregion
|
|
3136
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tk.d.cts
|
|
3137
|
+
declare function _default$10(): {
|
|
3138
|
+
localeError: $ZodErrorMap;
|
|
3139
|
+
};
|
|
3140
|
+
//#endregion
|
|
3141
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tr.d.cts
|
|
3142
|
+
declare function _default$9(): {
|
|
3143
|
+
localeError: $ZodErrorMap;
|
|
3144
|
+
};
|
|
3145
|
+
//#endregion
|
|
3146
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ua.d.cts
|
|
3147
|
+
declare function _default$8(): {
|
|
3148
|
+
localeError: $ZodErrorMap;
|
|
3149
|
+
};
|
|
3150
|
+
//#endregion
|
|
3151
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/uk.d.cts
|
|
3152
|
+
declare function _default$7(): {
|
|
3153
|
+
localeError: $ZodErrorMap;
|
|
3154
|
+
};
|
|
3155
|
+
//#endregion
|
|
3156
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ur.d.cts
|
|
3157
|
+
declare function _default$6(): {
|
|
3158
|
+
localeError: $ZodErrorMap;
|
|
3159
|
+
};
|
|
3160
|
+
//#endregion
|
|
3161
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/uz.d.cts
|
|
3162
|
+
declare function _default$5(): {
|
|
3163
|
+
localeError: $ZodErrorMap;
|
|
3164
|
+
};
|
|
3165
|
+
//#endregion
|
|
3166
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/vi.d.cts
|
|
3167
|
+
declare function _default$4(): {
|
|
3168
|
+
localeError: $ZodErrorMap;
|
|
3169
|
+
};
|
|
3170
|
+
//#endregion
|
|
3171
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/zh-CN.d.cts
|
|
3172
|
+
declare function _default$3(): {
|
|
3173
|
+
localeError: $ZodErrorMap;
|
|
3174
|
+
};
|
|
3175
|
+
//#endregion
|
|
3176
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/zh-TW.d.cts
|
|
3177
|
+
declare function _default$2(): {
|
|
3178
|
+
localeError: $ZodErrorMap;
|
|
3179
|
+
};
|
|
3180
|
+
//#endregion
|
|
3181
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/yo.d.cts
|
|
3182
|
+
declare function _default$1(): {
|
|
3183
|
+
localeError: $ZodErrorMap;
|
|
3184
|
+
};
|
|
3185
|
+
declare namespace index_d_exports$1 {
|
|
3186
|
+
export { _default$63 as ar, _default$62 as az, _default$61 as be, _default$60 as bg, _default$59 as bn, _default$58 as ca, _default$57 as ckb, _default$56 as cs, _default$55 as da, _default$54 as de, _default$53 as el, _default$52 as en, _default$51 as eo, _default$50 as es, _default$49 as fa, _default$48 as fi, _default$47 as fr, _default$46 as frCA, _default$45 as gu, _default$44 as he, _default$43 as hi, _default$42 as hr, _default$41 as hu, _default$40 as hy, _default$39 as id, _default$38 as is, _default$37 as it, _default$36 as ja, _default$35 as ka, _default$34 as kh, _default$33 as km, _default$32 as kn, _default$31 as ko, _default$30 as lt, _default$29 as mk, _default$28 as ms, _default$27 as ne, _default$26 as nl, _default$25 as nn, _default$24 as no, _default$23 as ota, _default$21 as pl, _default$22 as ps, _default$20 as pt, _default$19 as ptBR, _default$18 as ro, _default$17 as ru, _default$16 as sk, _default$15 as sl, _default$14 as sv, _default$13 as ta, _default$12 as tg, _default$11 as th, _default$10 as tk, _default$9 as tr, _default$8 as ua, _default$7 as uk, _default$6 as ur, _default$5 as uz, _default$4 as vi, _default$1 as yo, _default$3 as zhCN, _default$2 as zhTW };
|
|
3187
|
+
}
|
|
3188
|
+
//#endregion
|
|
3189
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.d.cts
|
|
3190
|
+
type ModeWriter = (doc: Doc, modes: {
|
|
3191
|
+
execution: "sync" | "async";
|
|
3192
|
+
}) => void;
|
|
3193
|
+
declare class Doc {
|
|
3194
|
+
args: string[];
|
|
3195
|
+
/** Bindings the compiled function closes over, by name. */
|
|
3196
|
+
closed: Record<string, unknown>;
|
|
3197
|
+
content: string[];
|
|
3198
|
+
indent: number;
|
|
3199
|
+
constructor(args?: string[], closed?: Record<string, unknown>);
|
|
3200
|
+
indented(fn: (doc: Doc) => void): void;
|
|
3201
|
+
write(fn: ModeWriter): void;
|
|
3202
|
+
write(line: string): void;
|
|
3203
|
+
compile(): any;
|
|
3204
|
+
}
|
|
3205
|
+
//#endregion
|
|
3206
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/compile.d.cts
|
|
3207
|
+
/** @internal Sentinel the compiled fast path returns when validation fails. */
|
|
3208
|
+
declare const INVALID: unique symbol;
|
|
3209
|
+
/** @internal */
|
|
3210
|
+
type INVALID = typeof INVALID;
|
|
3211
|
+
interface CompileFnOptions {
|
|
3212
|
+
debug?: boolean | undefined;
|
|
3213
|
+
/** Emit a validator instead of a parser: skip building the output value where nothing reads it. */
|
|
3214
|
+
assertOnly?: boolean | undefined;
|
|
3215
|
+
}
|
|
3216
|
+
type CompiledFn<T> = ((input: unknown) => T | INVALID) & {
|
|
3217
|
+
code?: string | undefined;
|
|
3218
|
+
/** False when this function's INVALID does not strictly mean "the runtime would reject". */
|
|
3219
|
+
definite?: boolean | undefined;
|
|
3220
|
+
};
|
|
3221
|
+
/** Raised when the schema contains async refinements or transforms. Surfaces only under `compile(schema, { strict: true })`. */
|
|
3222
|
+
declare class ZodCompileAsyncError extends Error {
|
|
3223
|
+
constructor(message?: string);
|
|
3224
|
+
}
|
|
3225
|
+
/**
|
|
3226
|
+
* Raised when the schema contains a feature whose semantics the fast path
|
|
3227
|
+
* can't fully model. Both the shim in `zod/compile` and the default
|
|
3228
|
+
* `compile()` fall back to the runtime parser for that schema; only
|
|
3229
|
+
* `compile(schema, { strict: true })` lets it surface.
|
|
3230
|
+
*/
|
|
3231
|
+
declare class ZodCompileUnsupportedError extends Error {
|
|
3232
|
+
/** Whether a container may absorb this refusal by running the child through the runtime (see `compileChild`). False when running only that node on the runtime is not equivalent to running the whole parse there — a runtime island gets no parse context, so a node that *consumes* issues rather than propagating them would finalize them against the wrong error map and still succeed. */
|
|
3233
|
+
readonly islandable: boolean;
|
|
3234
|
+
constructor(feature: string, islandable?: boolean);
|
|
3235
|
+
}
|
|
3236
|
+
interface CompileOptions {
|
|
3237
|
+
/** Throw the refusal instead of returning the schema uncompiled. */
|
|
3238
|
+
strict?: boolean | undefined;
|
|
3239
|
+
}
|
|
3240
|
+
/**
|
|
3241
|
+
* AOT-compile a Zod schema. Returns a clone whose `_zod.run` calls a generated
|
|
3242
|
+
* fast path first and falls back to the original runtime parser on failure.
|
|
3243
|
+
*
|
|
3244
|
+
* - Forward direction only. Backward (encode), async, and `skipChecks` paths
|
|
3245
|
+
* bypass the fast path and use the runtime directly.
|
|
3246
|
+
* - Never throws. A schema the fast path can't model is returned unchanged and
|
|
3247
|
+
* keeps using the runtime parser. Pass `{ strict: true }` to get the refusal
|
|
3248
|
+
* as a thrown `ZodCompileUnsupportedError` / `ZodCompileAsyncError` instead.
|
|
3249
|
+
* - The original schema is unchanged. The clone shares children by reference.
|
|
3250
|
+
*/
|
|
3251
|
+
declare function compile<T extends SomeType>(schema: T, options?: CompileOptions): T;
|
|
3252
|
+
/**
|
|
3253
|
+
* Install an already-generated parser as a schema's fast path. Returns a clone; the original is
|
|
3254
|
+
* unchanged.
|
|
3255
|
+
*
|
|
3256
|
+
* The parser takes the input and returns the parsed value, or `INVALID` to hand the parse to the
|
|
3257
|
+
* runtime. It must be synchronous and forward-direction, and it must build fresh output rather than
|
|
3258
|
+
* return its input — Zod cannot check either, and a wrong *success* is returned to the caller as-is.
|
|
3259
|
+
*
|
|
3260
|
+
* `compile()` is the ordinary entry point. This is for a build-time or native compiler that produces
|
|
3261
|
+
* a parser where `new Function` is unavailable.
|
|
3262
|
+
*/
|
|
3263
|
+
declare function withParser<T extends SomeType>(schema: T, parser: (input: unknown) => output<T> | INVALID): T;
|
|
3264
|
+
/**
|
|
3265
|
+
* @internal Generate the standalone compiled function: a parser by default, a validator under
|
|
3266
|
+
* `assertOnly`. Returns the parsed value, `true` where nothing reads the output, or `INVALID`. Consumers use `compile()`.
|
|
3267
|
+
*/
|
|
3268
|
+
declare function compileFn<T extends SomeType>(schema: T, options?: CompileFnOptions): CompiledFn<output<T>>;
|
|
1725
3269
|
//#endregion
|
|
1726
3270
|
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.d.cts
|
|
1727
3271
|
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] ? {} : {
|
|
@@ -1734,12 +3278,283 @@ type TypeParams<T extends $ZodType = $ZodType & {
|
|
|
1734
3278
|
}, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
|
|
1735
3279
|
type CheckParams<T extends $ZodCheck = $ZodCheck // & { _issc: never },
|
|
1736
3280
|
, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
|
|
3281
|
+
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>;
|
|
3282
|
+
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>;
|
|
1737
3283
|
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>;
|
|
3284
|
+
type $ZodStringParams = TypeParams<$ZodString<string>, "coerce"> & {
|
|
3285
|
+
checks?: readonly $ZodCheck<string>[];
|
|
3286
|
+
};
|
|
3287
|
+
declare function _string<T extends $ZodString>(Class: SchemaClass<T>, params?: string | $ZodStringParams): T;
|
|
3288
|
+
declare function _coercedString<T extends $ZodString>(Class: SchemaClass<T>, params?: string | $ZodStringParams): T;
|
|
3289
|
+
type $ZodStringFormatParams = CheckTypeParams<$ZodStringFormat, "format" | "coerce" | "when" | "pattern">;
|
|
3290
|
+
type $ZodCheckStringFormatParams = CheckParams<$ZodCheckStringFormat, "format">;
|
|
3291
|
+
type $ZodEmailParams = StringFormatParams<$ZodEmail, "when">;
|
|
3292
|
+
type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
|
|
3293
|
+
declare function _email<T extends $ZodEmail>(Class: SchemaClass<T>, params?: string | $ZodEmailParams | $ZodCheckEmailParams): T;
|
|
3294
|
+
type $ZodGUIDParams = StringFormatParams<$ZodGUID, "pattern" | "when">;
|
|
3295
|
+
type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">;
|
|
3296
|
+
declare function _guid<T extends $ZodGUID>(Class: SchemaClass<T>, params?: string | $ZodGUIDParams | $ZodCheckGUIDParams): T;
|
|
3297
|
+
type $ZodUUIDParams = StringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
3298
|
+
type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
3299
|
+
declare function _uuid<T extends $ZodUUID>(Class: SchemaClass<T>, params?: string | $ZodUUIDParams | $ZodCheckUUIDParams): T;
|
|
3300
|
+
type $ZodUUIDv4Params = StringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
3301
|
+
type $ZodCheckUUIDv4Params = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
3302
|
+
declare function _uuidv4<T extends $ZodUUID>(Class: SchemaClass<T>, params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params): T;
|
|
3303
|
+
type $ZodUUIDv6Params = StringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
3304
|
+
type $ZodCheckUUIDv6Params = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
3305
|
+
declare function _uuidv6<T extends $ZodUUID>(Class: SchemaClass<T>, params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params): T;
|
|
3306
|
+
type $ZodUUIDv7Params = StringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
3307
|
+
type $ZodCheckUUIDv7Params = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
3308
|
+
declare function _uuidv7<T extends $ZodUUID>(Class: SchemaClass<T>, params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params): T;
|
|
3309
|
+
type $ZodURLParams = StringFormatParams<$ZodURL, "when">;
|
|
3310
|
+
type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
|
|
3311
|
+
declare function _url<T extends $ZodURL>(Class: SchemaClass<T>, params?: string | $ZodURLParams | $ZodCheckURLParams): T;
|
|
3312
|
+
type $ZodEmojiParams = StringFormatParams<$ZodEmoji, "when">;
|
|
3313
|
+
type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
|
|
3314
|
+
declare function _emoji<T extends $ZodEmoji>(Class: SchemaClass<T>, params?: string | $ZodEmojiParams | $ZodCheckEmojiParams): T;
|
|
3315
|
+
type $ZodNanoIDParams = StringFormatParams<$ZodNanoID, "when" | "pattern">;
|
|
3316
|
+
type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when" | "pattern">;
|
|
3317
|
+
declare function _nanoid<T extends $ZodNanoID>(Class: SchemaClass<T>, params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams): T;
|
|
3318
|
+
/**
|
|
3319
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
3320
|
+
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
3321
|
+
* See https://github.com/paralleldrive/cuid.
|
|
3322
|
+
*/
|
|
3323
|
+
type $ZodCUIDParams = StringFormatParams<$ZodCUID, "when">;
|
|
3324
|
+
/**
|
|
3325
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
3326
|
+
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
3327
|
+
* See https://github.com/paralleldrive/cuid.
|
|
3328
|
+
*/
|
|
3329
|
+
type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
|
|
3330
|
+
/**
|
|
3331
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
3332
|
+
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
3333
|
+
* See https://github.com/paralleldrive/cuid.
|
|
3334
|
+
*/
|
|
3335
|
+
declare function _cuid<T extends $ZodCUID>(Class: SchemaClass<T>, params?: string | $ZodCUIDParams | $ZodCheckCUIDParams): T;
|
|
3336
|
+
type $ZodCUID2Params = StringFormatParams<$ZodCUID2, "when">;
|
|
3337
|
+
type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
|
|
3338
|
+
declare function _cuid2<T extends $ZodCUID2>(Class: SchemaClass<T>, params?: string | $ZodCUID2Params | $ZodCheckCUID2Params): T;
|
|
3339
|
+
type $ZodULIDParams = StringFormatParams<$ZodULID, "when">;
|
|
3340
|
+
type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
|
|
3341
|
+
declare function _ulid<T extends $ZodULID>(Class: SchemaClass<T>, params?: string | $ZodULIDParams | $ZodCheckULIDParams): T;
|
|
3342
|
+
type $ZodXIDParams = StringFormatParams<$ZodXID, "when">;
|
|
3343
|
+
type $ZodCheckXIDParams = CheckStringFormatParams<$ZodXID, "when">;
|
|
3344
|
+
declare function _xid<T extends $ZodXID>(Class: SchemaClass<T>, params?: string | $ZodXIDParams | $ZodCheckXIDParams): T;
|
|
3345
|
+
type $ZodKSUIDParams = StringFormatParams<$ZodKSUID, "when">;
|
|
3346
|
+
type $ZodCheckKSUIDParams = CheckStringFormatParams<$ZodKSUID, "when">;
|
|
3347
|
+
declare function _ksuid<T extends $ZodKSUID>(Class: SchemaClass<T>, params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams): T;
|
|
3348
|
+
type $ZodIPv4Params = StringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
|
|
3349
|
+
type $ZodCheckIPv4Params = CheckStringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
|
|
3350
|
+
declare function _ipv4<T extends $ZodIPv4>(Class: SchemaClass<T>, params?: string | $ZodIPv4Params | $ZodCheckIPv4Params): T;
|
|
3351
|
+
type $ZodIPv6Params = StringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
|
|
3352
|
+
type $ZodCheckIPv6Params = CheckStringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
|
|
3353
|
+
declare function _ipv6<T extends $ZodIPv6>(Class: SchemaClass<T>, params?: string | $ZodIPv6Params | $ZodCheckIPv6Params): T;
|
|
3354
|
+
type $ZodMACParams = StringFormatParams<$ZodMAC, "pattern" | "when">;
|
|
3355
|
+
type $ZodCheckMACParams = CheckStringFormatParams<$ZodMAC, "pattern" | "when">;
|
|
3356
|
+
declare function _mac<T extends $ZodMAC>(Class: SchemaClass<T>, params?: string | $ZodMACParams | $ZodCheckMACParams): T;
|
|
3357
|
+
type $ZodCIDRv4Params = StringFormatParams<$ZodCIDRv4, "pattern" | "when">;
|
|
3358
|
+
type $ZodCheckCIDRv4Params = CheckStringFormatParams<$ZodCIDRv4, "pattern" | "when">;
|
|
3359
|
+
declare function _cidrv4<T extends $ZodCIDRv4>(Class: SchemaClass<T>, params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params): T;
|
|
3360
|
+
type $ZodCIDRv6Params = StringFormatParams<$ZodCIDRv6, "pattern" | "when">;
|
|
3361
|
+
type $ZodCheckCIDRv6Params = CheckStringFormatParams<$ZodCIDRv6, "pattern" | "when">;
|
|
3362
|
+
declare function _cidrv6<T extends $ZodCIDRv6>(Class: SchemaClass<T>, params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params): T;
|
|
3363
|
+
type $ZodBase64Params = StringFormatParams<$ZodBase64, "pattern" | "when">;
|
|
3364
|
+
type $ZodCheckBase64Params = CheckStringFormatParams<$ZodBase64, "pattern" | "when">;
|
|
3365
|
+
declare function _base64<T extends $ZodBase64>(Class: SchemaClass<T>, params?: string | $ZodBase64Params | $ZodCheckBase64Params): T;
|
|
3366
|
+
type $ZodBase64URLParams = StringFormatParams<$ZodBase64URL, "pattern" | "when">;
|
|
3367
|
+
type $ZodCheckBase64URLParams = CheckStringFormatParams<$ZodBase64URL, "pattern" | "when">;
|
|
3368
|
+
declare function _base64url<T extends $ZodBase64URL>(Class: SchemaClass<T>, params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams): T;
|
|
3369
|
+
type $ZodE164Params = StringFormatParams<$ZodE164, "when">;
|
|
3370
|
+
type $ZodCheckE164Params = CheckStringFormatParams<$ZodE164, "when">;
|
|
3371
|
+
declare function _e164<T extends $ZodE164>(Class: SchemaClass<T>, params?: string | $ZodE164Params | $ZodCheckE164Params): T;
|
|
3372
|
+
type $ZodCreditCardParams = StringFormatParams<$ZodCreditCard, "pattern" | "when">;
|
|
3373
|
+
type $ZodCheckCreditCardParams = CheckStringFormatParams<$ZodCreditCard, "pattern" | "when">;
|
|
3374
|
+
declare function _creditCard<T extends $ZodCreditCard>(Class: SchemaClass<T>, params?: string | $ZodCreditCardParams | $ZodCheckCreditCardParams): T;
|
|
3375
|
+
type $ZodIBANParams = StringFormatParams<$ZodIBAN, "pattern" | "when">;
|
|
3376
|
+
type $ZodCheckIBANParams = CheckStringFormatParams<$ZodIBAN, "pattern" | "when">;
|
|
3377
|
+
declare function _iban<T extends $ZodIBAN>(Class: SchemaClass<T>, params?: string | $ZodIBANParams | $ZodCheckIBANParams): T;
|
|
3378
|
+
type $ZodJWTParams = StringFormatParams<$ZodJWT, "pattern" | "when">;
|
|
3379
|
+
type $ZodCheckJWTParams = CheckStringFormatParams<$ZodJWT, "pattern" | "when">;
|
|
3380
|
+
declare function _jwt<T extends $ZodJWT>(Class: SchemaClass<T>, params?: string | $ZodJWTParams | $ZodCheckJWTParams): T;
|
|
3381
|
+
declare const TimePrecision: {
|
|
3382
|
+
readonly Any: null;
|
|
3383
|
+
readonly Minute: -1;
|
|
3384
|
+
readonly Second: 0;
|
|
3385
|
+
readonly Millisecond: 3;
|
|
3386
|
+
readonly Microsecond: 6;
|
|
3387
|
+
};
|
|
3388
|
+
type $ZodISODateTimeParams = StringFormatParams<$ZodISODateTime, "pattern" | "when">;
|
|
3389
|
+
type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "pattern" | "when">;
|
|
3390
|
+
declare function _isoDateTime<T extends $ZodISODateTime>(Class: SchemaClass<T>, params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams): T;
|
|
3391
|
+
type $ZodISODateParams = StringFormatParams<$ZodISODate, "pattern" | "when">;
|
|
3392
|
+
type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
|
|
3393
|
+
declare function _isoDate<T extends $ZodISODate>(Class: SchemaClass<T>, params?: string | $ZodISODateParams | $ZodCheckISODateParams): T;
|
|
3394
|
+
type $ZodISOTimeParams = StringFormatParams<$ZodISOTime, "pattern" | "when">;
|
|
3395
|
+
type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
|
|
3396
|
+
declare function _isoTime<T extends $ZodISOTime>(Class: SchemaClass<T>, params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams): T;
|
|
3397
|
+
type $ZodISODurationParams = StringFormatParams<$ZodISODuration, "when">;
|
|
3398
|
+
type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
|
|
3399
|
+
declare function _isoDuration<T extends $ZodISODuration>(Class: SchemaClass<T>, params?: string | $ZodISODurationParams | $ZodCheckISODurationParams): T;
|
|
3400
|
+
type $ZodNumberParams = TypeParams<$ZodNumber<number>, "coerce"> & {
|
|
3401
|
+
checks?: readonly $ZodCheck<number>[];
|
|
3402
|
+
};
|
|
3403
|
+
type $ZodNumberFormatParams = CheckTypeParams<$ZodNumberFormat, "format" | "coerce">;
|
|
3404
|
+
type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
|
|
3405
|
+
declare function _number<T extends $ZodNumber>(Class: SchemaClass<T>, params?: string | $ZodNumberParams): T;
|
|
3406
|
+
declare function _coercedNumber<T extends $ZodNumber>(Class: SchemaClass<T>, params?: string | $ZodNumberParams): T;
|
|
3407
|
+
declare function _int<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
3408
|
+
declare function _float32<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
3409
|
+
declare function _float64<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
3410
|
+
declare function _int32<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
3411
|
+
declare function _uint32<T extends $ZodNumberFormat>(Class: SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
|
|
3412
|
+
type $ZodBooleanParams = TypeParams<$ZodBoolean<boolean>, "coerce">;
|
|
3413
|
+
declare function _boolean<T extends $ZodBoolean>(Class: SchemaClass<T>, params?: string | $ZodBooleanParams): T;
|
|
3414
|
+
declare function _coercedBoolean<T extends $ZodBoolean>(Class: SchemaClass<T>, params?: string | $ZodBooleanParams): T;
|
|
3415
|
+
type $ZodBigIntParams = TypeParams<$ZodBigInt<bigint>>;
|
|
3416
|
+
type $ZodBigIntFormatParams = CheckTypeParams<$ZodBigIntFormat, "format" | "coerce">;
|
|
3417
|
+
type $ZodCheckBigIntFormatParams = CheckParams<$ZodCheckBigIntFormat, "format" | "when">;
|
|
3418
|
+
declare function _bigint<T extends $ZodBigInt>(Class: SchemaClass<T>, params?: string | $ZodBigIntParams): T;
|
|
3419
|
+
declare function _coercedBigint<T extends $ZodBigInt>(Class: SchemaClass<T>, params?: string | $ZodBigIntParams): T;
|
|
3420
|
+
declare function _int64<T extends $ZodBigIntFormat>(Class: SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
|
|
3421
|
+
declare function _uint64<T extends $ZodBigIntFormat>(Class: SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
|
|
3422
|
+
type $ZodSymbolParams = TypeParams<$ZodSymbol>;
|
|
3423
|
+
declare function _symbol<T extends $ZodSymbol>(Class: SchemaClass<T>, params?: string | $ZodSymbolParams): T;
|
|
3424
|
+
type $ZodUndefinedParams = TypeParams<$ZodUndefined>;
|
|
3425
|
+
declare function _undefined<T extends $ZodUndefined>(Class: SchemaClass<T>, params?: string | $ZodUndefinedParams): T;
|
|
3426
|
+
type $ZodNullParams = TypeParams<$ZodNull>;
|
|
3427
|
+
declare function _null<T extends $ZodNull>(Class: SchemaClass<T>, params?: string | $ZodNullParams): T;
|
|
3428
|
+
type $ZodAnyParams = TypeParams<$ZodAny>;
|
|
3429
|
+
declare function _any<T extends $ZodAny>(Class: SchemaClass<T>): T;
|
|
3430
|
+
type $ZodUnknownParams = TypeParams<$ZodUnknown>;
|
|
3431
|
+
declare function _unknown<T extends $ZodUnknown>(Class: SchemaClass<T>): T;
|
|
3432
|
+
type $ZodNeverParams = TypeParams<$ZodNever>;
|
|
3433
|
+
declare function _never<T extends $ZodNever>(Class: SchemaClass<T>, params?: string | $ZodNeverParams): T;
|
|
3434
|
+
type $ZodVoidParams = TypeParams<$ZodVoid>;
|
|
3435
|
+
declare function _void<T extends $ZodVoid>(Class: SchemaClass<T>, params?: string | $ZodVoidParams): T;
|
|
3436
|
+
type $ZodDateParams = TypeParams<$ZodDate, "coerce">;
|
|
3437
|
+
declare function _date<T extends $ZodDate>(Class: SchemaClass<T>, params?: string | $ZodDateParams): T;
|
|
3438
|
+
declare function _coercedDate<T extends $ZodDate>(Class: SchemaClass<T>, params?: string | $ZodDateParams): T;
|
|
3439
|
+
type $ZodNaNParams = TypeParams<$ZodNaN>;
|
|
3440
|
+
declare function _nan<T extends $ZodNaN>(Class: SchemaClass<T>, params?: string | $ZodNaNParams): T;
|
|
3441
|
+
type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
|
|
3442
|
+
declare function _lt(value: Numeric, params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan<Numeric>;
|
|
3443
|
+
declare function _lte(value: Numeric, params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan<Numeric>;
|
|
3444
|
+
type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
|
|
3445
|
+
declare function _gt(value: Numeric, params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
|
|
3446
|
+
declare function _gte(value: Numeric, params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
|
|
3447
|
+
declare function _positive(params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
|
|
3448
|
+
declare function _negative(params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan;
|
|
3449
|
+
declare function _nonpositive(params?: string | $ZodCheckLessThanParams): $ZodCheckLessThan;
|
|
3450
|
+
declare function _nonnegative(params?: string | $ZodCheckGreaterThanParams): $ZodCheckGreaterThan;
|
|
3451
|
+
type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
|
|
3452
|
+
declare function _multipleOf(value: number | bigint, params?: string | $ZodCheckMultipleOfParams): $ZodCheckMultipleOf;
|
|
3453
|
+
type $ZodCheckMaxSizeParams = CheckParams<$ZodCheckMaxSize, "maximum" | "when">;
|
|
3454
|
+
declare function _maxSize(maximum: number, params?: string | $ZodCheckMaxSizeParams): $ZodCheckMaxSize<HasSize>;
|
|
3455
|
+
type $ZodCheckMinSizeParams = CheckParams<$ZodCheckMinSize, "minimum" | "when">;
|
|
3456
|
+
declare function _minSize(minimum: number, params?: string | $ZodCheckMinSizeParams): $ZodCheckMinSize<HasSize>;
|
|
3457
|
+
type $ZodCheckSizeEqualsParams = CheckParams<$ZodCheckSizeEquals, "size" | "when">;
|
|
3458
|
+
declare function _size(size: number, params?: string | $ZodCheckSizeEqualsParams): $ZodCheckSizeEquals<HasSize>;
|
|
1738
3459
|
type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
|
|
3460
|
+
declare function _maxLength(maximum: number, params?: string | $ZodCheckMaxLengthParams): $ZodCheckMaxLength<HasLength>;
|
|
1739
3461
|
type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
|
|
3462
|
+
declare function _minLength(minimum: number, params?: string | $ZodCheckMinLengthParams): $ZodCheckMinLength<HasLength>;
|
|
1740
3463
|
type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
|
|
3464
|
+
declare function _length(length: number, params?: string | $ZodCheckLengthEqualsParams): $ZodCheckLengthEquals<HasLength>;
|
|
3465
|
+
type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
|
|
3466
|
+
declare function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): $ZodCheckRegex;
|
|
3467
|
+
type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
|
|
3468
|
+
declare function _lowercase(params?: string | $ZodCheckLowerCaseParams): $ZodCheckLowerCase;
|
|
3469
|
+
type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
|
|
3470
|
+
declare function _uppercase(params?: string | $ZodCheckUpperCaseParams): $ZodCheckUpperCase;
|
|
3471
|
+
type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
|
|
3472
|
+
declare function _includes(includes: string, params?: string | $ZodCheckIncludesParams): $ZodCheckIncludes;
|
|
3473
|
+
type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
|
|
3474
|
+
declare function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): $ZodCheckStartsWith;
|
|
3475
|
+
type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
|
|
3476
|
+
declare function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): $ZodCheckEndsWith;
|
|
3477
|
+
type $ZodCheckPropertyParams = CheckParams<$ZodCheckProperty, "property" | "schema" | "when">;
|
|
3478
|
+
declare function _property<K extends string, T extends $ZodType>(property: K, schema: T, params?: string | $ZodCheckPropertyParams): $ZodCheckProperty<{ [k in K]: Widen<input<T>>; }>;
|
|
3479
|
+
type $ZodCheckPropertiesParams = CheckParams<$ZodCheckProperties, "shape" | "when">;
|
|
3480
|
+
declare function _properties<Shape extends $ZodShape>(shape: Shape, params?: string | $ZodCheckPropertiesParams): $ZodCheckProperties<Shape>;
|
|
3481
|
+
type $ZodCheckMimeTypeParams = CheckParams<$ZodCheckMimeType, "mime" | "when">;
|
|
3482
|
+
declare function _mime(types: MimeTypes[], params?: string | $ZodCheckMimeTypeParams): $ZodCheckMimeType;
|
|
3483
|
+
declare function _overwrite<T>(tx: (input: T) => T): $ZodCheckOverwrite<T>;
|
|
3484
|
+
declare function _normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): $ZodCheckOverwrite<string>;
|
|
3485
|
+
declare function _trim(): $ZodCheckOverwrite<string>;
|
|
3486
|
+
declare function _toLowerCase(): $ZodCheckOverwrite<string>;
|
|
3487
|
+
declare function _toUpperCase(): $ZodCheckOverwrite<string>;
|
|
3488
|
+
declare function _slugify(): $ZodCheckOverwrite<string>;
|
|
3489
|
+
type $ZodArrayParams = TypeParams<$ZodArray, "element">;
|
|
3490
|
+
declare function _array<T extends $ZodType>(Class: SchemaClass<$ZodArray>, element: T, params?: string | $ZodArrayParams): $ZodArray<T>;
|
|
3491
|
+
type $ZodObjectParams = TypeParams<$ZodObject, "shape" | "catchall">;
|
|
3492
|
+
type $ZodUnionParams = TypeParams<$ZodUnion, "options">;
|
|
3493
|
+
declare function _union<const T extends readonly $ZodObject[]>(Class: SchemaClass<$ZodUnion>, options: T, params?: string | $ZodUnionParams): $ZodUnion<T>;
|
|
3494
|
+
type $ZodXorParams = TypeParams<$ZodXor, "options">;
|
|
3495
|
+
declare function _xor<const T extends readonly $ZodObject[]>(Class: SchemaClass<$ZodXor>, options: T, params?: string | $ZodXorParams): $ZodXor<T>;
|
|
3496
|
+
interface $ZodTypeDiscriminableInternals<_Disc extends string = string> extends _$ZodTypeInternals {
|
|
3497
|
+
propValues: PropValues;
|
|
3498
|
+
}
|
|
3499
|
+
interface $ZodTypeDiscriminable<_Disc extends string = string> extends SomeType {
|
|
3500
|
+
_zod: $ZodTypeDiscriminableInternals;
|
|
3501
|
+
}
|
|
3502
|
+
type $ZodDiscriminatedUnionParams = TypeParams<$ZodDiscriminatedUnion, "options" | "discriminator">;
|
|
3503
|
+
declare function _discriminatedUnion<Types extends [$ZodTypeDiscriminable, ...$ZodTypeDiscriminable[]], Disc extends string>(Class: SchemaClass<$ZodDiscriminatedUnion>, discriminator: Disc, options: Types, params?: string | $ZodDiscriminatedUnionParams): $ZodDiscriminatedUnion<Types, Disc>;
|
|
3504
|
+
type $ZodIntersectionParams = TypeParams<$ZodIntersection, "left" | "right">;
|
|
3505
|
+
declare function _intersection<T extends $ZodObject, U extends $ZodObject>(Class: SchemaClass<$ZodIntersection>, left: T, right: U): $ZodIntersection<T, U>;
|
|
3506
|
+
type $ZodTupleParams = TypeParams<$ZodTuple, "items" | "rest">;
|
|
3507
|
+
declare function _tuple<T extends readonly [$ZodType, ...$ZodType[]]>(Class: SchemaClass<$ZodTuple>, items: T, params?: string | $ZodTupleParams): $ZodTuple<T, null>;
|
|
3508
|
+
declare function _tuple<T extends readonly [$ZodType, ...$ZodType[]], Rest extends $ZodType>(Class: SchemaClass<$ZodTuple>, items: T, rest: Rest, params?: string | $ZodTupleParams): $ZodTuple<T, Rest>;
|
|
3509
|
+
type $ZodRecordParams = TypeParams<$ZodRecord, "keyType" | "valueType" | "partial">;
|
|
3510
|
+
declare function _record<Key extends $ZodRecordKey, Value extends $ZodObject>(Class: SchemaClass<$ZodRecord>, keyType: Key, valueType: Value, params?: string | $ZodRecordParams): $ZodRecord<Key, Value>;
|
|
3511
|
+
type $ZodMapParams = TypeParams<$ZodMap, "keyType" | "valueType">;
|
|
3512
|
+
declare function _map<Key extends $ZodObject, Value extends $ZodObject>(Class: SchemaClass<$ZodMap>, keyType: Key, valueType: Value, params?: string | $ZodMapParams): $ZodMap<Key, Value>;
|
|
3513
|
+
type $ZodSetParams = TypeParams<$ZodSet, "valueType">;
|
|
3514
|
+
declare function _set<Value extends $ZodObject>(Class: SchemaClass<$ZodSet>, valueType: Value, params?: string | $ZodSetParams): $ZodSet<Value>;
|
|
3515
|
+
type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
|
|
3516
|
+
declare function _enum<const T extends string[]>(Class: SchemaClass<$ZodEnum>, values: T, params?: string | $ZodEnumParams): $ZodEnum<ToEnum<T[number]>>;
|
|
3517
|
+
declare function _enum<T extends EnumLike>(Class: SchemaClass<$ZodEnum>, entries: T, params?: string | $ZodEnumParams): $ZodEnum<T>;
|
|
3518
|
+
/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
|
|
3519
|
+
*
|
|
3520
|
+
* ```ts
|
|
3521
|
+
* enum Colors { red, green, blue }
|
|
3522
|
+
* z.enum(Colors);
|
|
3523
|
+
* ```
|
|
3524
|
+
*/
|
|
3525
|
+
declare function _nativeEnum<T extends EnumLike>(Class: SchemaClass<$ZodEnum>, entries: T, params?: string | $ZodEnumParams): $ZodEnum<T>;
|
|
3526
|
+
type $ZodLiteralParams = TypeParams<$ZodLiteral, "values">;
|
|
3527
|
+
declare function _literal<const T extends Array<Literal>>(Class: SchemaClass<$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): $ZodLiteral<T[number]>;
|
|
3528
|
+
declare function _literal<const T extends Literal>(Class: SchemaClass<$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): $ZodLiteral<T>;
|
|
3529
|
+
type $ZodFileParams = TypeParams<$ZodFile>;
|
|
3530
|
+
declare function _file(Class: SchemaClass<$ZodFile>, params?: string | $ZodFileParams): $ZodFile;
|
|
3531
|
+
type $ZodTransformParams = TypeParams<$ZodTransform, "transform">;
|
|
3532
|
+
declare function _transform<I = unknown, O = I>(Class: SchemaClass<$ZodTransform>, fn: (input: I, ctx?: ParsePayload) => O): $ZodTransform<Awaited<O>, I>;
|
|
3533
|
+
type $ZodOptionalParams = TypeParams<$ZodOptional, "innerType">;
|
|
3534
|
+
declare function _optional<T extends $ZodObject>(Class: SchemaClass<$ZodOptional>, innerType: T): $ZodOptional<T>;
|
|
3535
|
+
type $ZodNullableParams = TypeParams<$ZodNullable, "innerType">;
|
|
3536
|
+
declare function _nullable<T extends $ZodObject>(Class: SchemaClass<$ZodNullable>, innerType: T): $ZodNullable<T>;
|
|
3537
|
+
type $ZodDefaultParams = TypeParams<$ZodDefault, "innerType" | "defaultValue">;
|
|
3538
|
+
declare function _default<T extends $ZodObject>(Class: SchemaClass<$ZodDefault>, innerType: T, defaultValue: NoUndefined<output<T>> | (() => NoUndefined<output<T>>)): $ZodDefault<T>;
|
|
1741
3539
|
type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
|
|
3540
|
+
declare function _nonoptional<T extends $ZodObject>(Class: SchemaClass<$ZodNonOptional>, innerType: T, params?: string | $ZodNonOptionalParams): $ZodNonOptional<T>;
|
|
3541
|
+
type $ZodSuccessParams = TypeParams<$ZodSuccess, "innerType">;
|
|
3542
|
+
declare function _success<T extends $ZodObject>(Class: SchemaClass<$ZodSuccess>, innerType: T): $ZodSuccess<T>;
|
|
3543
|
+
type $ZodCatchParams = TypeParams<$ZodCatch, "innerType" | "catchValue">;
|
|
3544
|
+
declare function _catch<T extends $ZodObject>(Class: SchemaClass<$ZodCatch>, innerType: T, catchValue: output<T> | ((ctx: $ZodCatchCtx) => output<T>)): $ZodCatch<T>;
|
|
3545
|
+
type $ZodPipeParams = TypeParams<$ZodPipe, "in" | "out">;
|
|
3546
|
+
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>;
|
|
3547
|
+
type $ZodReadonlyParams = TypeParams<$ZodReadonly, "innerType">;
|
|
3548
|
+
declare function _readonly<T extends $ZodObject>(Class: SchemaClass<$ZodReadonly>, innerType: T): $ZodReadonly<T>;
|
|
3549
|
+
type $ZodTemplateLiteralParams = TypeParams<$ZodTemplateLiteral, "parts">;
|
|
3550
|
+
declare function _templateLiteral<const Parts extends $ZodTemplateLiteralPart[]>(Class: SchemaClass<$ZodTemplateLiteral>, parts: Parts, params?: string | $ZodTemplateLiteralParams): $ZodTemplateLiteral<$PartsToTemplateLiteral<Parts>>;
|
|
3551
|
+
type $ZodLazyParams = TypeParams<$ZodLazy, "getter">;
|
|
3552
|
+
declare function _lazy<T extends $ZodType>(Class: SchemaClass<$ZodLazy>, getter: () => T): $ZodLazy<T>;
|
|
3553
|
+
type $ZodPromiseParams = TypeParams<$ZodPromise, "innerType">;
|
|
3554
|
+
declare function _promise<T extends $ZodObject>(Class: SchemaClass<$ZodPromise>, innerType: T): $ZodPromise<T>;
|
|
1742
3555
|
type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
|
|
3556
|
+
declare function _custom<O = unknown, I = O>(Class: SchemaClass<$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): $ZodCustom<O, I>;
|
|
3557
|
+
declare function _refine<O = unknown, I = O>(Class: SchemaClass<$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): $ZodCustom<O, I>;
|
|
1743
3558
|
type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
|
|
1744
3559
|
type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
|
|
1745
3560
|
/** The schema or check that originated this issue. */
|
|
@@ -1754,6 +3569,99 @@ interface $ZodSuperRefineParams {
|
|
|
1754
3569
|
/** If provided, the refinement runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
|
|
1755
3570
|
when?: ((payload: ParsePayload) => boolean) | undefined;
|
|
1756
3571
|
}
|
|
3572
|
+
declare function _superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>, params?: $ZodSuperRefineParams): $ZodCheck<T>;
|
|
3573
|
+
declare function _check<O = unknown>(fn: CheckFn<O>, params?: string | $ZodCustomParams): $ZodCheck<O>;
|
|
3574
|
+
declare function describe<T>(description: string): $ZodCheck<T>;
|
|
3575
|
+
declare function meta$1<T>(metadata: GlobalMeta): $ZodCheck<T>;
|
|
3576
|
+
interface $ZodStringBoolParams extends TypeParams {
|
|
3577
|
+
truthy?: string[];
|
|
3578
|
+
falsy?: string[];
|
|
3579
|
+
/**
|
|
3580
|
+
* Options: `"sensitive"`, `"insensitive"`
|
|
3581
|
+
*
|
|
3582
|
+
* @default `"insensitive"`
|
|
3583
|
+
*/
|
|
3584
|
+
case?: "sensitive" | "insensitive" | undefined;
|
|
3585
|
+
}
|
|
3586
|
+
declare function _stringbool(Classes: {
|
|
3587
|
+
Codec?: typeof $ZodCodec;
|
|
3588
|
+
Boolean?: typeof $ZodBoolean;
|
|
3589
|
+
String?: typeof $ZodString;
|
|
3590
|
+
}, _params?: string | $ZodStringBoolParams): $ZodCodec<$ZodString, $ZodBoolean>;
|
|
3591
|
+
declare function _stringFormat<Format extends string>(Class: typeof $ZodCustomStringFormat, format: Format, fnOrRegex: ((arg: string) => MaybeAsync<unknown>) | RegExp, _params?: string | $ZodStringFormatParams): $ZodCustomStringFormat<Format>;
|
|
3592
|
+
//#endregion
|
|
3593
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.d.cts
|
|
3594
|
+
declare function toJSONSchema<T extends $ZodType>(schema: T, params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<T>;
|
|
3595
|
+
declare function toJSONSchema(registry: $ZodRegistry<{
|
|
3596
|
+
id?: string | undefined;
|
|
3597
|
+
}>, params?: RegistryToJSONSchemaParams): {
|
|
3598
|
+
schemas: Record<string, ZodStandardJSONSchemaPayload<$ZodType>>;
|
|
3599
|
+
};
|
|
3600
|
+
//#endregion
|
|
3601
|
+
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-generator.d.cts
|
|
3602
|
+
/**
|
|
3603
|
+
* Parameters for the emit method of JSONSchemaGenerator.
|
|
3604
|
+
* @deprecated Use toJSONSchema function instead
|
|
3605
|
+
*/
|
|
3606
|
+
type EmitParams = Pick<JSONSchemaGeneratorParams, "cycles" | "reused" | "external">;
|
|
3607
|
+
/**
|
|
3608
|
+
* Parameters for JSONSchemaGenerator constructor.
|
|
3609
|
+
* @deprecated Use toJSONSchema function instead
|
|
3610
|
+
*/
|
|
3611
|
+
type JSONSchemaGeneratorConstructorParams = Pick<JSONSchemaGeneratorParams, "metadata" | "target" | "unrepresentable" | "override" | "io">;
|
|
3612
|
+
/**
|
|
3613
|
+
* Legacy class-based interface for JSON Schema generation.
|
|
3614
|
+
* This class wraps the new functional implementation to provide backward compatibility.
|
|
3615
|
+
*
|
|
3616
|
+
* @deprecated Use the `toJSONSchema` function instead for new code.
|
|
3617
|
+
*
|
|
3618
|
+
* @example
|
|
3619
|
+
* ```typescript
|
|
3620
|
+
* // Legacy usage (still supported)
|
|
3621
|
+
* const gen = new JSONSchemaGenerator({ target: "draft-07" });
|
|
3622
|
+
* gen.process(schema);
|
|
3623
|
+
* const result = gen.emit(schema);
|
|
3624
|
+
*
|
|
3625
|
+
* // Preferred modern usage
|
|
3626
|
+
* const result = toJSONSchema(schema, { target: "draft-07" });
|
|
3627
|
+
* ```
|
|
3628
|
+
*/
|
|
3629
|
+
declare class JSONSchemaGenerator {
|
|
3630
|
+
private ctx;
|
|
3631
|
+
/** @deprecated Access via ctx instead */
|
|
3632
|
+
get metadataRegistry(): $ZodRegistry<Record<string, any>>;
|
|
3633
|
+
/** @deprecated Access via ctx instead */
|
|
3634
|
+
get target(): ({} & string) | "draft-2020-12" | "draft-07" | "openapi-3.0" | "draft-04";
|
|
3635
|
+
/** @deprecated Access via ctx instead */
|
|
3636
|
+
get unrepresentable(): ToJSONSchemaContext["unrepresentable"];
|
|
3637
|
+
/** @deprecated Access via ctx instead */
|
|
3638
|
+
get override(): (ctx: {
|
|
3639
|
+
zodSchema: $ZodType;
|
|
3640
|
+
jsonSchema: BaseSchema;
|
|
3641
|
+
path: (string | number)[];
|
|
3642
|
+
}) => void;
|
|
3643
|
+
/** @deprecated Access via ctx instead */
|
|
3644
|
+
get io(): "input" | "output";
|
|
3645
|
+
/** @deprecated Access via ctx instead */
|
|
3646
|
+
get counter(): number;
|
|
3647
|
+
set counter(value: number);
|
|
3648
|
+
/** @deprecated Access via ctx instead */
|
|
3649
|
+
get seen(): Map<$ZodType, Seen>;
|
|
3650
|
+
constructor(params?: JSONSchemaGeneratorConstructorParams);
|
|
3651
|
+
/**
|
|
3652
|
+
* Process a schema to prepare it for JSON Schema generation.
|
|
3653
|
+
* This must be called before emit().
|
|
3654
|
+
*/
|
|
3655
|
+
process(schema: $ZodType, _params?: ProcessParams): BaseSchema;
|
|
3656
|
+
/**
|
|
3657
|
+
* Emit the final JSON Schema after processing.
|
|
3658
|
+
* Must call process() first.
|
|
3659
|
+
*/
|
|
3660
|
+
emit(schema: $ZodType, _params?: EmitParams): BaseSchema;
|
|
3661
|
+
}
|
|
3662
|
+
declare namespace index_d_exports {
|
|
3663
|
+
export { $Decode, $DecodeAsync, $DiscriminatedOption, $DiscriminatorValue, $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, $Validate, $ValidateAsync, $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, $ZodCheckCreditCardParams, $ZodCheckDef, $ZodCheckE164Params, $ZodCheckEmailParams, $ZodCheckEmojiParams, $ZodCheckEndsWith, $ZodCheckEndsWithDef, $ZodCheckEndsWithInternals, $ZodCheckEndsWithParams, $ZodCheckGUIDParams, $ZodCheckGreaterThan, $ZodCheckGreaterThanDef, $ZodCheckGreaterThanInternals, $ZodCheckGreaterThanParams, $ZodCheckIBANParams, $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, $ZodCheckProperties, $ZodCheckPropertiesDef, $ZodCheckPropertiesInput, $ZodCheckPropertiesInternals, $ZodCheckPropertiesParams, $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, $ZodCreditCard, $ZodCreditCardDef, $ZodCreditCardInternals, $ZodCreditCardParams, $ZodCustom, $ZodCustomDef, $ZodCustomInternals, $ZodCustomParams, $ZodCustomStringFormat, $ZodCustomStringFormatDef, $ZodCustomStringFormatInternals, $ZodCyclicError, $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, $ZodIBAN, $ZodIBANDef, $ZodIBANInternals, $ZodIBANParams, $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, $ZodMemoizer, $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, $constructorParams, $input, $loose, $output, $partial, $replace, $strict, $strip, CheckFn, CheckParams, CheckStringFormatParams, CheckTypeParams, CompileOptions, ConcatenateTupleOfStrings, ConvertPartsToStringTuple, Doc, File, GlobalMeta, INVALID, 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, URL_BAD_FORMAT, URL_UNPARSEABLE, UnrepresentableHandler, ZodCompileAsyncError, ZodCompileUnsupportedError, ZodStandardJSONSchemaPayload, ZodStandardSchemaWithJSON$1 as ZodStandardSchemaWithJSON, _$ZodType, _$ZodTypeInternals, _any, _array, _base64, _base64url, _bigint, _boolean, _catch, _check, _cidrv4, _cidrv6, _coercedBigint, _coercedBoolean, _coercedDate, _coercedNumber, _coercedString, _creditCard, _cuid, _cuid2, _custom, _date, _decode, _decodeAsync, _default, _discriminatedUnion, _e164, _email, _emoji, _encode, _encodeAsync, _endsWith, _enum, _file, _float32, _float64, _gt, _gte, _guid, _iban, _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, _nullable, _number, _optional, _overwrite, _parse, _parseAsync, _pipe, _positive, _promise, _properties, _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, _union, _unknown, _uppercase, _url, _uuid, _uuidv4, _uuidv6, _uuidv7, _void, _xid, _xor, base64Charset, base64urlCharset, canParseURL, clone, compile, compileFn, config, createStandardJSONSchemaMethod, createToJSONSchemaMethod, decode$1 as decode, decodeAsync$1 as decodeAsync, describe, encode$1 as encode, encodeAsync$1 as encodeAsync, extractDefs, finalize, flattenError, formatError, getDiscriminatedOption, globalConfig, globalRegistry, handleUnrepresentable, output as infer, initializeContext, input, isBackEdge, isRecursiveSchema, isValidBase64, isValidBase64URL, isValidCIDRv6, isValidCreditCard, isValidIBAN, isValidIPv6, isValidJWT, index_d_exports$1 as locales, memoizer, mergeValues, meta$1 as meta, output, parse$1 as parse, parseAsync$1 as parseAsync, parseURLObject, prettifyError, processSchema as process, processSchema, 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, standardProps, stripTabAndNewline, toDotPath, toJSONSchema, toZod, treeifyError, urlHostnameOk, urlProtocolOk, util_d_exports as util, validate, validateAsync, validateURL, version, withParser };
|
|
3664
|
+
}
|
|
1757
3665
|
//#endregion
|
|
1758
3666
|
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.d.cts
|
|
1759
3667
|
/** An Error-like class used to store Zod validation issues. */
|
|
@@ -1772,8 +3680,9 @@ interface ZodError<T = unknown> extends $ZodError<T> {
|
|
|
1772
3680
|
isEmpty: boolean;
|
|
1773
3681
|
}
|
|
1774
3682
|
declare const ZodError: $constructor<ZodError>;
|
|
1775
|
-
|
|
1776
|
-
|
|
3683
|
+
declare namespace parse_d_exports {
|
|
3684
|
+
export { ZodSafeParseError, ZodSafeParseResult, ZodSafeParseSuccess, decode, decodeAsync, encode, encodeAsync, parse, parseAsync, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync, validate, validateAsync };
|
|
3685
|
+
}
|
|
1777
3686
|
type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
|
|
1778
3687
|
type ZodSafeParseSuccess<T> = {
|
|
1779
3688
|
success: true;
|
|
@@ -1785,6 +3694,36 @@ type ZodSafeParseError<T> = {
|
|
|
1785
3694
|
data?: never;
|
|
1786
3695
|
error: ZodError<T>;
|
|
1787
3696
|
};
|
|
3697
|
+
declare const parse: <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
3698
|
+
callee?: AnyFunc;
|
|
3699
|
+
Err?: $ZodErrorClass;
|
|
3700
|
+
}) => output<T>;
|
|
3701
|
+
declare const parseAsync: <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
3702
|
+
callee?: AnyFunc;
|
|
3703
|
+
Err?: $ZodErrorClass;
|
|
3704
|
+
}) => Promise<output<T>>;
|
|
3705
|
+
declare const safeParse: <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => ZodSafeParseResult<output<T>>;
|
|
3706
|
+
declare const safeParseAsync: <T extends $ZodType>(schema: T, value: unknown, _ctx?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<T>>>;
|
|
3707
|
+
declare const encode: <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
3708
|
+
callee?: AnyFunc;
|
|
3709
|
+
Err?: $ZodErrorClass;
|
|
3710
|
+
}) => input<T>;
|
|
3711
|
+
declare const decode: <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
3712
|
+
callee?: AnyFunc;
|
|
3713
|
+
Err?: $ZodErrorClass;
|
|
3714
|
+
}) => output<T>;
|
|
3715
|
+
declare const encodeAsync: <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
3716
|
+
callee?: AnyFunc;
|
|
3717
|
+
Err?: $ZodErrorClass;
|
|
3718
|
+
}) => Promise<input<T>>;
|
|
3719
|
+
declare const decodeAsync: <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>, _params?: {
|
|
3720
|
+
callee?: AnyFunc;
|
|
3721
|
+
Err?: $ZodErrorClass;
|
|
3722
|
+
}) => Promise<output<T>>;
|
|
3723
|
+
declare const safeEncode: <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => ZodSafeParseResult<input<T>>;
|
|
3724
|
+
declare const safeDecode: <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => ZodSafeParseResult<output<T>>;
|
|
3725
|
+
declare const safeEncodeAsync: <T extends $ZodType>(schema: T, value: output<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<input<T>>>;
|
|
3726
|
+
declare const safeDecodeAsync: <T extends $ZodType>(schema: T, value: input<T>, _ctx?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<T>>>;
|
|
1788
3727
|
//#endregion
|
|
1789
3728
|
//#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.d.cts
|
|
1790
3729
|
type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
|
|
@@ -2423,7 +4362,7 @@ interface Config$2 {
|
|
|
2423
4362
|
/** Per-domain overrides: domain name → backend name. */
|
|
2424
4363
|
routes?: Record<string, string>;
|
|
2425
4364
|
}
|
|
2426
|
-
declare const Config$2: Schema<Config$2>;
|
|
4365
|
+
declare const Config$2: Schema$1<Config$2>;
|
|
2427
4366
|
/**
|
|
2428
4367
|
* The mounted domain facility. Opens declared domains over routed backends;
|
|
2429
4368
|
* one facility instance owns the open-domain table and enforces single-open
|
|
@@ -2497,7 +4436,7 @@ interface Config$1 {
|
|
|
2497
4436
|
/** Longest time (milliseconds) a dirty checkpoint may stay unwritten between mandatory points. */
|
|
2498
4437
|
writeIntervalMs: number;
|
|
2499
4438
|
}
|
|
2500
|
-
declare const Config$1: Schema<Config$1>;
|
|
4439
|
+
declare const Config$1: Schema$1<Config$1>;
|
|
2501
4440
|
/**
|
|
2502
4441
|
* The persisted projection cache service. Opens the `session_projcache`
|
|
2503
4442
|
* domain at init, checkpoints live sessions on a throttled write-behind
|
|
@@ -2510,7 +4449,7 @@ declare const Config$1: Schema<Config$1>;
|
|
|
2510
4449
|
declare class SessionProjectionCache extends Service {
|
|
2511
4450
|
config: Config$1;
|
|
2512
4451
|
static inject: string[];
|
|
2513
|
-
static Config: Schema<Config$1>;
|
|
4452
|
+
static Config: Schema$1<Config$1>;
|
|
2514
4453
|
private table?;
|
|
2515
4454
|
private readonly dirty;
|
|
2516
4455
|
constructor(ctx: Context, config: Config$1);
|
|
@@ -2996,29 +4935,37 @@ declare class WorkspaceRegistry extends Service {
|
|
|
2996
4935
|
}
|
|
2997
4936
|
//#endregion
|
|
2998
4937
|
//#region ../session-rdb/src/import.d.ts
|
|
2999
|
-
declare function parseJsonlArtifact(content: string): SessionStorageMetadata & {
|
|
4938
|
+
export declare function parseJsonlArtifact(content: string): SessionStorageMetadata & {
|
|
3000
4939
|
events: SessionEvent$1[];
|
|
3001
4940
|
};
|
|
3002
4941
|
//#endregion
|
|
3003
4942
|
//#region ../session-rdb/src/testing/contract.d.ts
|
|
3004
|
-
declare function meta(id: string, cwd?: string): SessionHeader$1;
|
|
3005
|
-
declare function oneTurnLog(): SessionEvent$1[];
|
|
4943
|
+
export declare function meta(id: string, cwd?: string): SessionHeader$1;
|
|
4944
|
+
export declare function oneTurnLog(): SessionEvent$1[];
|
|
3006
4945
|
//#endregion
|
|
3007
4946
|
//#region src/shared.d.ts
|
|
3008
|
-
declare const
|
|
4947
|
+
export declare const SESSION_EDITOR_PATHS: {
|
|
4948
|
+
readonly edit: "/api/morlay/v1/session/edit";
|
|
4949
|
+
readonly reroll: "/api/morlay/v1/session/reroll";
|
|
4950
|
+
readonly retry: "/api/morlay/v1/session/retry";
|
|
4951
|
+
readonly rewind: "/api/morlay/v1/session/rewind";
|
|
4952
|
+
readonly recall: "/api/morlay/v1/session/recall";
|
|
4953
|
+
readonly fork: "/api/morlay/v1/session/fork";
|
|
4954
|
+
};
|
|
4955
|
+
type SessionEditorAction = keyof typeof SESSION_EDITOR_PATHS;
|
|
3009
4956
|
//#endregion
|
|
3010
4957
|
//#region src/testing.d.ts
|
|
3011
|
-
interface Harness {
|
|
4958
|
+
export interface Harness {
|
|
3012
4959
|
ctx: Context;
|
|
3013
4960
|
editor: SessionEditor;
|
|
3014
4961
|
dispose: () => Promise<void>;
|
|
3015
4962
|
}
|
|
3016
|
-
declare function harness(provide?: (ctx: Context) => void): Promise<Harness>;
|
|
3017
|
-
declare function twoTurnLog(): SessionEvent[];
|
|
3018
|
-
declare function createPersisted(ctx: Context, id: string, events: readonly SessionEvent[], header?: SessionHeader): Promise<void>;
|
|
3019
|
-
declare function userMessage(seq: number, id: string, text: string, time?: number): SessionEvent;
|
|
3020
|
-
declare function assistantMessage(seq: number, turn: number, step: number, id: string, text: string, time?: number): SessionEvent;
|
|
3021
|
-
declare function turnLog(base: number, turn: number, opts?: {
|
|
4963
|
+
export declare function harness(provide?: (ctx: Context) => void): Promise<Harness>;
|
|
4964
|
+
export declare function twoTurnLog(): SessionEvent[];
|
|
4965
|
+
export declare function createPersisted(ctx: Context, id: string, events: readonly SessionEvent[], header?: SessionHeader): Promise<void>;
|
|
4966
|
+
export declare function userMessage(seq: number, id: string, text: string, time?: number): SessionEvent;
|
|
4967
|
+
export declare function assistantMessage(seq: number, turn: number, step: number, id: string, text: string, time?: number): SessionEvent;
|
|
4968
|
+
export declare function turnLog(base: number, turn: number, opts?: {
|
|
3022
4969
|
users?: Array<{
|
|
3023
4970
|
id: string;
|
|
3024
4971
|
text: string;
|
|
@@ -3027,4 +4974,4 @@ declare function turnLog(base: number, turn: number, opts?: {
|
|
|
3027
4974
|
time?: number;
|
|
3028
4975
|
}): SessionEvent[];
|
|
3029
4976
|
//#endregion
|
|
3030
|
-
export {
|
|
4977
|
+
export { Session, type SessionEditorAction, type SessionEvent, type SessionHeader, SessionIdBrand, SessionSeq, SessionStore, TokenMeter };
|