@kunk/server 3.0.5 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.mts +2091 -22
  2. package/package.json +4 -4
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ContextData, ContextData as ContextData$1, Generator, Generator as Generator$1, I, I as I$1, ICommand, ICommand as ICommand$1, IError, IThrowable, Logger, Logger as Logger$1, StandardSchemaV1, StandardSchemaV1 as StandardSchemaV1$1, Validator } from "@kunk/api";
1
+ import { ContextData, ContextData as ContextData$1, Generator as Generator$1, Generator as Generator$2, I, I as I$1, ICommand, ICommand as ICommand$1, IError, IThrowable, Logger, Logger as Logger$1, StandardSchemaV1, StandardSchemaV1 as StandardSchemaV1$1, Throwable, Validator } from "@kunk/api";
2
2
  import { InferInsertModel, InferSelectModel, SQL, Table } from "drizzle-orm";
3
3
  import pino from "pino";
4
4
  import * as DrizzleQuery from "drizzle-orm/sql/expressions";
@@ -11,6 +11,2064 @@ import * as elysia_types0 from "elysia/types";
11
11
  import * as elysia_universal_server0 from "elysia/universal/server";
12
12
  import * as elysia_cookies0 from "elysia/cookies";
13
13
 
14
+ //#region ../../node_modules/zod/v4/core/json-schema.d.cts
15
+ type _JSONSchema = boolean | JSONSchema;
16
+ type JSONSchema = {
17
+ [k: string]: unknown;
18
+ $schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
19
+ $id?: string;
20
+ $anchor?: string;
21
+ $ref?: string;
22
+ $dynamicRef?: string;
23
+ $dynamicAnchor?: string;
24
+ $vocabulary?: Record<string, boolean>;
25
+ $comment?: string;
26
+ $defs?: Record<string, JSONSchema>;
27
+ type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
28
+ additionalItems?: _JSONSchema;
29
+ unevaluatedItems?: _JSONSchema;
30
+ prefixItems?: _JSONSchema[];
31
+ items?: _JSONSchema | _JSONSchema[];
32
+ contains?: _JSONSchema;
33
+ additionalProperties?: _JSONSchema;
34
+ unevaluatedProperties?: _JSONSchema;
35
+ properties?: Record<string, _JSONSchema>;
36
+ patternProperties?: Record<string, _JSONSchema>;
37
+ dependentSchemas?: Record<string, _JSONSchema>;
38
+ propertyNames?: _JSONSchema;
39
+ if?: _JSONSchema;
40
+ then?: _JSONSchema;
41
+ else?: _JSONSchema;
42
+ allOf?: JSONSchema[];
43
+ anyOf?: JSONSchema[];
44
+ oneOf?: JSONSchema[];
45
+ not?: _JSONSchema;
46
+ multipleOf?: number;
47
+ maximum?: number;
48
+ exclusiveMaximum?: number | boolean;
49
+ minimum?: number;
50
+ exclusiveMinimum?: number | boolean;
51
+ maxLength?: number;
52
+ minLength?: number;
53
+ pattern?: string;
54
+ maxItems?: number;
55
+ minItems?: number;
56
+ uniqueItems?: boolean;
57
+ maxContains?: number;
58
+ minContains?: number;
59
+ maxProperties?: number;
60
+ minProperties?: number;
61
+ required?: string[];
62
+ dependentRequired?: Record<string, string[]>;
63
+ enum?: Array<string | number | boolean | null>;
64
+ const?: string | number | boolean | null;
65
+ id?: string;
66
+ title?: string;
67
+ description?: string;
68
+ default?: unknown;
69
+ deprecated?: boolean;
70
+ readOnly?: boolean;
71
+ writeOnly?: boolean;
72
+ nullable?: boolean;
73
+ examples?: unknown[];
74
+ format?: string;
75
+ contentMediaType?: string;
76
+ contentEncoding?: string;
77
+ contentSchema?: JSONSchema;
78
+ _prefault?: unknown;
79
+ };
80
+ type BaseSchema = JSONSchema;
81
+ //#endregion
82
+ //#region ../../node_modules/zod/v4/core/standard-schema.d.cts
83
+ /** The Standard interface. */
84
+ interface StandardTypedV1<Input = unknown, Output = Input> {
85
+ /** The Standard properties. */
86
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
87
+ }
88
+ declare namespace StandardTypedV1 {
89
+ /** The Standard properties interface. */
90
+ interface Props<Input = unknown, Output = Input> {
91
+ /** The version number of the standard. */
92
+ readonly version: 1;
93
+ /** The vendor name of the schema library. */
94
+ readonly vendor: string;
95
+ /** Inferred types associated with the schema. */
96
+ readonly types?: Types<Input, Output> | undefined;
97
+ }
98
+ /** The Standard types interface. */
99
+ interface Types<Input = unknown, Output = Input> {
100
+ /** The input type of the schema. */
101
+ readonly input: Input;
102
+ /** The output type of the schema. */
103
+ readonly output: Output;
104
+ }
105
+ /** Infers the input type of a Standard. */
106
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
107
+ /** Infers the output type of a Standard. */
108
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
109
+ }
110
+ /** The Standard Schema interface. */
111
+ interface StandardSchemaV1$3<Input = unknown, Output = Input> {
112
+ /** The Standard Schema properties. */
113
+ readonly "~standard": StandardSchemaV1$3.Props<Input, Output>;
114
+ }
115
+ declare namespace StandardSchemaV1$3 {
116
+ /** The Standard Schema properties interface. */
117
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
118
+ /** Validates unknown input values. */
119
+ readonly validate: (value: unknown, options?: StandardSchemaV1$3.Options | undefined) => Result<Output> | Promise<Result<Output>>;
120
+ }
121
+ /** The result interface of the validate function. */
122
+ type Result<Output> = SuccessResult<Output> | FailureResult;
123
+ /** The result interface if validation succeeds. */
124
+ interface SuccessResult<Output> {
125
+ /** The typed output value. */
126
+ readonly value: Output;
127
+ /** The absence of issues indicates success. */
128
+ readonly issues?: undefined;
129
+ }
130
+ interface Options {
131
+ /** Implicit support for additional vendor-specific parameters, if needed. */
132
+ readonly libraryOptions?: Record<string, unknown> | undefined;
133
+ }
134
+ /** The result interface if validation fails. */
135
+ interface FailureResult {
136
+ /** The issues of failed validation. */
137
+ readonly issues: ReadonlyArray<Issue>;
138
+ }
139
+ /** The issue interface of the failure output. */
140
+ interface Issue {
141
+ /** The error message of the issue. */
142
+ readonly message: string;
143
+ /** The path of the issue, if any. */
144
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
145
+ }
146
+ /** The path segment interface of the issue. */
147
+ interface PathSegment {
148
+ /** The key representing a path segment. */
149
+ readonly key: PropertyKey;
150
+ }
151
+ /** The Standard types interface. */
152
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
153
+ /** Infers the input type of a Standard. */
154
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
155
+ /** Infers the output type of a Standard. */
156
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
157
+ }
158
+ /** The Standard JSON Schema interface. */
159
+ interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
160
+ /** The Standard JSON Schema properties. */
161
+ readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
162
+ }
163
+ declare namespace StandardJSONSchemaV1 {
164
+ /** The Standard JSON Schema properties interface. */
165
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
166
+ /** Methods for generating the input/output JSON Schema. */
167
+ readonly jsonSchema: Converter;
168
+ }
169
+ /** The Standard JSON Schema converter interface. */
170
+ interface Converter {
171
+ /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
172
+ readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
173
+ /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
174
+ readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
175
+ }
176
+ /** The target version of the generated JSON Schema.
177
+ *
178
+ * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use.
179
+ *
180
+ * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
181
+ *
182
+ * All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
183
+ */
184
+ type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
185
+ /** The options for the input/output methods. */
186
+ interface Options {
187
+ /** Specifies the target version of the generated JSON Schema. Support for all versions is on a best-effort basis. If a given version is not supported, the library should throw. */
188
+ readonly target: Target;
189
+ /** Implicit support for additional vendor-specific parameters, if needed. */
190
+ readonly libraryOptions?: Record<string, unknown> | undefined;
191
+ }
192
+ /** The Standard types interface. */
193
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
194
+ /** Infers the input type of a Standard. */
195
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
196
+ /** Infers the output type of a Standard. */
197
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
198
+ }
199
+ interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1$3.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
200
+ //#endregion
201
+ //#region ../../node_modules/zod/v4/core/registries.d.cts
202
+ declare const $output: unique symbol;
203
+ type $output = typeof $output;
204
+ declare const $input: unique symbol;
205
+ type $input = typeof $input;
206
+ type $replace<Meta, S extends $ZodType> = Meta extends $output ? output<S> : Meta extends $input ? input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends ((...args: infer P) => infer R) ? (...args: { [K in keyof P]: $replace<P[K], S> }) => $replace<R, S> : Meta extends object ? { [K in keyof Meta]: $replace<Meta[K], S> } : Meta;
207
+ type MetadataType = object | undefined;
208
+ declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
209
+ _meta: Meta;
210
+ _schema: Schema;
211
+ _map: WeakMap<Schema, $replace<Meta, Schema>>;
212
+ _idmap: Map<string, Schema>;
213
+ add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
214
+ clear(): this;
215
+ remove(schema: Schema): this;
216
+ get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
217
+ has(schema: Schema): boolean;
218
+ }
219
+ interface JSONSchemaMeta {
220
+ id?: string | undefined;
221
+ title?: string | undefined;
222
+ description?: string | undefined;
223
+ deprecated?: boolean | undefined;
224
+ [k: string]: unknown;
225
+ }
226
+ interface GlobalMeta extends JSONSchemaMeta {}
227
+ //#endregion
228
+ //#region ../../node_modules/zod/v4/core/to-json-schema.d.cts
229
+ type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
230
+ interface JSONSchemaGeneratorParams {
231
+ processors: Record<string, Processor>;
232
+ /** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
233
+ * @default globalRegistry */
234
+ metadata?: $ZodRegistry<Record<string, any>>;
235
+ /** The JSON Schema version to target.
236
+ * - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
237
+ * - `"draft-07"` — JSON Schema Draft 7
238
+ * - `"draft-04"` — JSON Schema Draft 4
239
+ * - `"openapi-3.0"` — OpenAPI 3.0 Schema Object */
240
+ target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
241
+ /** How to handle unrepresentable types.
242
+ * - `"throw"` — Default. Unrepresentable types throw an error
243
+ * - `"any"` — Unrepresentable types become `{}` */
244
+ unrepresentable?: "throw" | "any";
245
+ /** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
246
+ override?: (ctx: {
247
+ zodSchema: $ZodTypes;
248
+ jsonSchema: BaseSchema;
249
+ path: (string | number)[];
250
+ }) => void;
251
+ /** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, defaults, coerced primitives, etc.
252
+ * - `"output"` — Default. Convert the output schema.
253
+ * - `"input"` — Convert the input schema. */
254
+ io?: "input" | "output";
255
+ cycles?: "ref" | "throw";
256
+ reused?: "ref" | "inline";
257
+ external?: {
258
+ registry: $ZodRegistry<{
259
+ id?: string | undefined;
260
+ }>;
261
+ uri?: ((id: string) => string) | undefined;
262
+ defs: Record<string, BaseSchema>;
263
+ } | undefined;
264
+ }
265
+ /**
266
+ * Parameters for the toJSONSchema function.
267
+ */
268
+ type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
269
+ interface ProcessParams {
270
+ schemaPath: $ZodType[];
271
+ path: (string | number)[];
272
+ }
273
+ interface Seen {
274
+ /** JSON Schema result for this Zod schema */
275
+ schema: BaseSchema;
276
+ /** A cached version of the schema that doesn't get overwritten during ref resolution */
277
+ def?: BaseSchema;
278
+ defId?: string | undefined;
279
+ /** Number of times this schema was encountered during traversal */
280
+ count: number;
281
+ /** Cycle path */
282
+ cycle?: (string | number)[] | undefined;
283
+ isParent?: boolean | undefined;
284
+ /** Schema to inherit JSON Schema properties from (set by processor for wrappers) */
285
+ ref?: $ZodType | null;
286
+ /** JSON Schema property path for this schema */
287
+ path?: (string | number)[] | undefined;
288
+ }
289
+ interface ToJSONSchemaContext {
290
+ processors: Record<string, Processor>;
291
+ metadataRegistry: $ZodRegistry<Record<string, any>>;
292
+ target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
293
+ unrepresentable: "throw" | "any";
294
+ override: (ctx: {
295
+ zodSchema: $ZodType;
296
+ jsonSchema: BaseSchema;
297
+ path: (string | number)[];
298
+ }) => void;
299
+ io: "input" | "output";
300
+ counter: number;
301
+ seen: Map<$ZodType, Seen>;
302
+ cycles: "ref" | "throw";
303
+ reused: "ref" | "inline";
304
+ external?: {
305
+ registry: $ZodRegistry<{
306
+ id?: string | undefined;
307
+ }>;
308
+ uri?: ((id: string) => string) | undefined;
309
+ defs: Record<string, BaseSchema>;
310
+ } | undefined;
311
+ }
312
+ type ZodStandardSchemaWithJSON$1<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
313
+ interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
314
+ "~standard": ZodStandardSchemaWithJSON$1<T>;
315
+ }
316
+ //#endregion
317
+ //#region ../../node_modules/zod/v4/core/util.d.cts
318
+ type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
319
+ 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 & {});
320
+ type IsAny<T> = 0 extends 1 & T ? true : false;
321
+ type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
322
+ type MakePartial<T, K extends keyof T> = Omit$1<T, K> & InexactPartial<Pick<T, K>>;
323
+ type NoUndefined<T> = T extends undefined ? never : T;
324
+ type LoosePartial<T extends object> = InexactPartial<T> & {
325
+ [k: string]: unknown;
326
+ };
327
+ type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
328
+ type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined };
329
+ type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
330
+ readonly [Symbol.toStringTag]: string;
331
+ } | Date | Error | Generator | Promise<unknown> | RegExp;
332
+ 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>;
333
+ type SomeObject = Record<PropertyKey, any>;
334
+ type Identity<T> = T;
335
+ type Flatten<T> = Identity<{ [k in keyof T]: T[k] }>;
336
+ type Prettify<T> = { [K in keyof T]: T[K] } & {};
337
+ 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] }>;
338
+ type TupleItems = ReadonlyArray<SomeType>;
339
+ type AnyFunc = (...args: any[]) => any;
340
+ type MaybeAsync<T> = T | Promise<T>;
341
+ type EnumValue = string | number;
342
+ type EnumLike = Readonly<Record<string, EnumValue>>;
343
+ type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k }>;
344
+ type Literal = string | number | bigint | boolean | null | undefined;
345
+ type Primitive = string | number | symbol | bigint | boolean | null | undefined;
346
+ type HasLength = {
347
+ length: number;
348
+ };
349
+ type Numeric = number | bigint | Date;
350
+ type PropValues = Record<string, Set<Primitive>>;
351
+ type PrimitiveSet = Set<Primitive>;
352
+ type EmptyToNever<T> = keyof T extends never ? never : T;
353
+ declare abstract class Class {
354
+ constructor(..._args: any[]);
355
+ }
356
+ //#endregion
357
+ //#region ../../node_modules/zod/v4/core/versions.d.cts
358
+ declare const version: {
359
+ readonly major: 4;
360
+ readonly minor: 3;
361
+ readonly patch: number;
362
+ };
363
+ //#endregion
364
+ //#region ../../node_modules/zod/v4/core/schemas.d.cts
365
+ interface ParseContext<T extends $ZodIssueBase = never> {
366
+ /** Customize error messages. */
367
+ readonly error?: $ZodErrorMap<T>;
368
+ /** Include the `input` field in issue objects. Default `false`. */
369
+ readonly reportInput?: boolean;
370
+ /** Skip eval-based fast path. Default `false`. */
371
+ readonly jitless?: boolean;
372
+ }
373
+ /** @internal */
374
+ interface ParseContextInternal<T extends $ZodIssueBase = never> extends ParseContext<T> {
375
+ readonly async?: boolean | undefined;
376
+ readonly direction?: "forward" | "backward";
377
+ readonly skipChecks?: boolean;
378
+ }
379
+ interface ParsePayload<T = unknown> {
380
+ value: T;
381
+ issues: $ZodRawIssue[];
382
+ /** A may to mark a whole payload as aborted. Used in codecs/pipes. */
383
+ aborted?: boolean;
384
+ }
385
+ type CheckFn<T> = (input: ParsePayload<T>) => MaybeAsync<void>;
386
+ interface $ZodTypeDef {
387
+ type: "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "null" | "undefined" | "void" | "never" | "any" | "unknown" | "date" | "object" | "record" | "file" | "array" | "tuple" | "union" | "intersection" | "map" | "set" | "enum" | "literal" | "nullable" | "optional" | "nonoptional" | "success" | "transform" | "default" | "prefault" | "catch" | "nan" | "pipe" | "readonly" | "template_literal" | "promise" | "lazy" | "function" | "custom";
388
+ error?: $ZodErrorMap<never> | undefined;
389
+ checks?: $ZodCheck<never>[];
390
+ }
391
+ interface _$ZodTypeInternals {
392
+ /** The `@zod/core` version of this schema */
393
+ version: typeof version;
394
+ /** Schema definition. */
395
+ def: $ZodTypeDef;
396
+ /** @internal Randomly generated ID for this schema. */
397
+ /** @internal List of deferred initializers. */
398
+ deferred: AnyFunc[] | undefined;
399
+ /** @internal Parses input and runs all checks (refinements). */
400
+ run(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
401
+ /** @internal Parses input, doesn't run checks. */
402
+ parse(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
403
+ /** @internal Stores identifiers for the set of traits implemented by this schema. */
404
+ traits: Set<string>;
405
+ /** @internal Indicates that a schema output type should be considered optional inside objects.
406
+ * @default Required
407
+ */
408
+ /** @internal */
409
+ optin?: "optional" | undefined;
410
+ /** @internal */
411
+ optout?: "optional" | undefined;
412
+ /** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
413
+ *
414
+ * Defined on: enum, const, literal, null, undefined
415
+ * Passthrough: optional, nullable, branded, default, catch, pipe
416
+ * Todo: unions?
417
+ */
418
+ values?: PrimitiveSet | undefined;
419
+ /** Default value bubbled up from */
420
+ /** @internal A set of literal discriminators used for the fast path in discriminated unions. */
421
+ propValues?: PropValues | undefined;
422
+ /** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
423
+ pattern: RegExp | undefined;
424
+ /** @internal The constructor function of this schema. */
425
+ constr: new (def: any) => $ZodType;
426
+ /** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
427
+ bag: Record<string, unknown>;
428
+ /** @internal The set of issues this schema might throw during type checking. */
429
+ isst: $ZodIssueBase;
430
+ /** @internal Subject to change, not a public API. */
431
+ processJSONSchema?: ((ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void) | undefined;
432
+ /** An optional method used to override `toJSONSchema` logic. */
433
+ toJSONSchema?: () => unknown;
434
+ /** @internal The parent of this schema. Only set during certain clone operations. */
435
+ parent?: $ZodType | undefined;
436
+ }
437
+ /** @internal */
438
+ interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
439
+ /** @internal The inferred output type */
440
+ output: O;
441
+ /** @internal The inferred input type */
442
+ input: I;
443
+ }
444
+ type $ZodStandardSchema<T> = StandardSchemaV1$3.Props<input<T>, output<T>>;
445
+ type SomeType = {
446
+ _zod: _$ZodTypeInternals;
447
+ };
448
+ interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
449
+ _zod: Internals;
450
+ "~standard": $ZodStandardSchema<this>;
451
+ }
452
+ interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T["output"], T["input"], T> {}
453
+ declare const $ZodType: $constructor<$ZodType>;
454
+ interface $ZodStringDef extends $ZodTypeDef {
455
+ type: "string";
456
+ coerce?: boolean;
457
+ checks?: $ZodCheck<string>[];
458
+ }
459
+ interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
460
+ def: $ZodStringDef;
461
+ /** @deprecated Internal API, use with caution (not deprecated) */
462
+ pattern: RegExp;
463
+ /** @deprecated Internal API, use with caution (not deprecated) */
464
+ isst: $ZodIssueInvalidType;
465
+ bag: LoosePartial<{
466
+ minimum: number;
467
+ maximum: number;
468
+ patterns: Set<RegExp>;
469
+ format: string;
470
+ contentEncoding: string;
471
+ }>;
472
+ }
473
+ interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {}
474
+ declare const $ZodString: $constructor<$ZodString>;
475
+ interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, $ZodCheckStringFormatDef<Format> {}
476
+ interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, $ZodCheckStringFormatInternals {
477
+ def: $ZodStringFormatDef<Format>;
478
+ }
479
+ interface $ZodStringFormat<Format extends string = string> extends $ZodType {
480
+ _zod: $ZodStringFormatInternals<Format>;
481
+ }
482
+ declare const $ZodStringFormat: $constructor<$ZodStringFormat>;
483
+ interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {}
484
+ interface $ZodGUID extends $ZodType {
485
+ _zod: $ZodGUIDInternals;
486
+ }
487
+ declare const $ZodGUID: $constructor<$ZodGUID>;
488
+ interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
489
+ version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
490
+ }
491
+ interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
492
+ def: $ZodUUIDDef;
493
+ }
494
+ interface $ZodUUID extends $ZodType {
495
+ _zod: $ZodUUIDInternals;
496
+ }
497
+ declare const $ZodUUID: $constructor<$ZodUUID>;
498
+ interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {}
499
+ interface $ZodEmail extends $ZodType {
500
+ _zod: $ZodEmailInternals;
501
+ }
502
+ declare const $ZodEmail: $constructor<$ZodEmail>;
503
+ interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
504
+ hostname?: RegExp | undefined;
505
+ protocol?: RegExp | undefined;
506
+ normalize?: boolean | undefined;
507
+ }
508
+ interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
509
+ def: $ZodURLDef;
510
+ }
511
+ interface $ZodURL extends $ZodType {
512
+ _zod: $ZodURLInternals;
513
+ }
514
+ declare const $ZodURL: $constructor<$ZodURL>;
515
+ interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {}
516
+ interface $ZodEmoji extends $ZodType {
517
+ _zod: $ZodEmojiInternals;
518
+ }
519
+ declare const $ZodEmoji: $constructor<$ZodEmoji>;
520
+ interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {}
521
+ interface $ZodNanoID extends $ZodType {
522
+ _zod: $ZodNanoIDInternals;
523
+ }
524
+ declare const $ZodNanoID: $constructor<$ZodNanoID>;
525
+ interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
526
+ interface $ZodCUID extends $ZodType {
527
+ _zod: $ZodCUIDInternals;
528
+ }
529
+ declare const $ZodCUID: $constructor<$ZodCUID>;
530
+ interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
531
+ interface $ZodCUID2 extends $ZodType {
532
+ _zod: $ZodCUID2Internals;
533
+ }
534
+ declare const $ZodCUID2: $constructor<$ZodCUID2>;
535
+ interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {}
536
+ interface $ZodULID extends $ZodType {
537
+ _zod: $ZodULIDInternals;
538
+ }
539
+ declare const $ZodULID: $constructor<$ZodULID>;
540
+ interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {}
541
+ interface $ZodXID extends $ZodType {
542
+ _zod: $ZodXIDInternals;
543
+ }
544
+ declare const $ZodXID: $constructor<$ZodXID>;
545
+ interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {}
546
+ interface $ZodKSUID extends $ZodType {
547
+ _zod: $ZodKSUIDInternals;
548
+ }
549
+ declare const $ZodKSUID: $constructor<$ZodKSUID>;
550
+ interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
551
+ precision: number | null;
552
+ offset: boolean;
553
+ local: boolean;
554
+ }
555
+ interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
556
+ def: $ZodISODateTimeDef;
557
+ }
558
+ interface $ZodISODateTime extends $ZodType {
559
+ _zod: $ZodISODateTimeInternals;
560
+ }
561
+ declare const $ZodISODateTime: $constructor<$ZodISODateTime>;
562
+ interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {}
563
+ interface $ZodISODate extends $ZodType {
564
+ _zod: $ZodISODateInternals;
565
+ }
566
+ declare const $ZodISODate: $constructor<$ZodISODate>;
567
+ interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
568
+ precision?: number | null;
569
+ }
570
+ interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
571
+ def: $ZodISOTimeDef;
572
+ }
573
+ interface $ZodISOTime extends $ZodType {
574
+ _zod: $ZodISOTimeInternals;
575
+ }
576
+ declare const $ZodISOTime: $constructor<$ZodISOTime>;
577
+ interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {}
578
+ interface $ZodISODuration extends $ZodType {
579
+ _zod: $ZodISODurationInternals;
580
+ }
581
+ declare const $ZodISODuration: $constructor<$ZodISODuration>;
582
+ interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
583
+ version?: "v4";
584
+ }
585
+ interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
586
+ def: $ZodIPv4Def;
587
+ }
588
+ interface $ZodIPv4 extends $ZodType {
589
+ _zod: $ZodIPv4Internals;
590
+ }
591
+ declare const $ZodIPv4: $constructor<$ZodIPv4>;
592
+ interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
593
+ version?: "v6";
594
+ }
595
+ interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
596
+ def: $ZodIPv6Def;
597
+ }
598
+ interface $ZodIPv6 extends $ZodType {
599
+ _zod: $ZodIPv6Internals;
600
+ }
601
+ declare const $ZodIPv6: $constructor<$ZodIPv6>;
602
+ interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
603
+ version?: "v4";
604
+ }
605
+ interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
606
+ def: $ZodCIDRv4Def;
607
+ }
608
+ interface $ZodCIDRv4 extends $ZodType {
609
+ _zod: $ZodCIDRv4Internals;
610
+ }
611
+ declare const $ZodCIDRv4: $constructor<$ZodCIDRv4>;
612
+ interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
613
+ version?: "v6";
614
+ }
615
+ interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
616
+ def: $ZodCIDRv6Def;
617
+ }
618
+ interface $ZodCIDRv6 extends $ZodType {
619
+ _zod: $ZodCIDRv6Internals;
620
+ }
621
+ declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>;
622
+ interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {}
623
+ interface $ZodBase64 extends $ZodType {
624
+ _zod: $ZodBase64Internals;
625
+ }
626
+ declare const $ZodBase64: $constructor<$ZodBase64>;
627
+ interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {}
628
+ interface $ZodBase64URL extends $ZodType {
629
+ _zod: $ZodBase64URLInternals;
630
+ }
631
+ declare const $ZodBase64URL: $constructor<$ZodBase64URL>;
632
+ interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {}
633
+ interface $ZodE164 extends $ZodType {
634
+ _zod: $ZodE164Internals;
635
+ }
636
+ declare const $ZodE164: $constructor<$ZodE164>;
637
+ interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
638
+ alg?: JWTAlgorithm | undefined;
639
+ }
640
+ interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
641
+ def: $ZodJWTDef;
642
+ }
643
+ interface $ZodJWT extends $ZodType {
644
+ _zod: $ZodJWTInternals;
645
+ }
646
+ declare const $ZodJWT: $constructor<$ZodJWT>;
647
+ interface $ZodNumberDef extends $ZodTypeDef {
648
+ type: "number";
649
+ coerce?: boolean;
650
+ }
651
+ interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
652
+ def: $ZodNumberDef;
653
+ /** @deprecated Internal API, use with caution (not deprecated) */
654
+ pattern: RegExp;
655
+ /** @deprecated Internal API, use with caution (not deprecated) */
656
+ isst: $ZodIssueInvalidType;
657
+ bag: LoosePartial<{
658
+ minimum: number;
659
+ maximum: number;
660
+ exclusiveMinimum: number;
661
+ exclusiveMaximum: number;
662
+ format: string;
663
+ pattern: RegExp;
664
+ }>;
665
+ }
666
+ interface $ZodNumber<Input = unknown> extends $ZodType {
667
+ _zod: $ZodNumberInternals<Input>;
668
+ }
669
+ declare const $ZodNumber: $constructor<$ZodNumber>;
670
+ interface $ZodBooleanDef extends $ZodTypeDef {
671
+ type: "boolean";
672
+ coerce?: boolean;
673
+ checks?: $ZodCheck<boolean>[];
674
+ }
675
+ interface $ZodBooleanInternals<T = unknown> extends $ZodTypeInternals<boolean, T> {
676
+ pattern: RegExp;
677
+ def: $ZodBooleanDef;
678
+ isst: $ZodIssueInvalidType;
679
+ }
680
+ interface $ZodBoolean<T = unknown> extends $ZodType {
681
+ _zod: $ZodBooleanInternals<T>;
682
+ }
683
+ declare const $ZodBoolean: $constructor<$ZodBoolean>;
684
+ interface $ZodBigIntDef extends $ZodTypeDef {
685
+ type: "bigint";
686
+ coerce?: boolean;
687
+ }
688
+ interface $ZodBigIntInternals<T = unknown> extends $ZodTypeInternals<bigint, T> {
689
+ pattern: RegExp;
690
+ /** @internal Internal API, use with caution */
691
+ def: $ZodBigIntDef;
692
+ isst: $ZodIssueInvalidType;
693
+ bag: LoosePartial<{
694
+ minimum: bigint;
695
+ maximum: bigint;
696
+ format: string;
697
+ }>;
698
+ }
699
+ interface $ZodBigInt<T = unknown> extends $ZodType {
700
+ _zod: $ZodBigIntInternals<T>;
701
+ }
702
+ declare const $ZodBigInt: $constructor<$ZodBigInt>;
703
+ interface $ZodSymbolDef extends $ZodTypeDef {
704
+ type: "symbol";
705
+ }
706
+ interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
707
+ def: $ZodSymbolDef;
708
+ isst: $ZodIssueInvalidType;
709
+ }
710
+ interface $ZodSymbol extends $ZodType {
711
+ _zod: $ZodSymbolInternals;
712
+ }
713
+ declare const $ZodSymbol: $constructor<$ZodSymbol>;
714
+ interface $ZodUndefinedDef extends $ZodTypeDef {
715
+ type: "undefined";
716
+ }
717
+ interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
718
+ pattern: RegExp;
719
+ def: $ZodUndefinedDef;
720
+ values: PrimitiveSet;
721
+ isst: $ZodIssueInvalidType;
722
+ }
723
+ interface $ZodUndefined extends $ZodType {
724
+ _zod: $ZodUndefinedInternals;
725
+ }
726
+ declare const $ZodUndefined: $constructor<$ZodUndefined>;
727
+ interface $ZodNullDef extends $ZodTypeDef {
728
+ type: "null";
729
+ }
730
+ interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
731
+ pattern: RegExp;
732
+ def: $ZodNullDef;
733
+ values: PrimitiveSet;
734
+ isst: $ZodIssueInvalidType;
735
+ }
736
+ interface $ZodNull extends $ZodType {
737
+ _zod: $ZodNullInternals;
738
+ }
739
+ declare const $ZodNull: $constructor<$ZodNull>;
740
+ interface $ZodAnyDef extends $ZodTypeDef {
741
+ type: "any";
742
+ }
743
+ interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
744
+ def: $ZodAnyDef;
745
+ isst: never;
746
+ }
747
+ interface $ZodAny extends $ZodType {
748
+ _zod: $ZodAnyInternals;
749
+ }
750
+ declare const $ZodAny: $constructor<$ZodAny>;
751
+ interface $ZodUnknownDef extends $ZodTypeDef {
752
+ type: "unknown";
753
+ }
754
+ interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
755
+ def: $ZodUnknownDef;
756
+ isst: never;
757
+ }
758
+ interface $ZodUnknown extends $ZodType {
759
+ _zod: $ZodUnknownInternals;
760
+ }
761
+ declare const $ZodUnknown: $constructor<$ZodUnknown>;
762
+ interface $ZodNeverDef extends $ZodTypeDef {
763
+ type: "never";
764
+ }
765
+ interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
766
+ def: $ZodNeverDef;
767
+ isst: $ZodIssueInvalidType;
768
+ }
769
+ interface $ZodNever extends $ZodType {
770
+ _zod: $ZodNeverInternals;
771
+ }
772
+ declare const $ZodNever: $constructor<$ZodNever>;
773
+ interface $ZodVoidDef extends $ZodTypeDef {
774
+ type: "void";
775
+ }
776
+ interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
777
+ def: $ZodVoidDef;
778
+ isst: $ZodIssueInvalidType;
779
+ }
780
+ interface $ZodVoid extends $ZodType {
781
+ _zod: $ZodVoidInternals;
782
+ }
783
+ declare const $ZodVoid: $constructor<$ZodVoid>;
784
+ interface $ZodDateDef extends $ZodTypeDef {
785
+ type: "date";
786
+ coerce?: boolean;
787
+ }
788
+ interface $ZodDateInternals<T = unknown> extends $ZodTypeInternals<Date, T> {
789
+ def: $ZodDateDef;
790
+ isst: $ZodIssueInvalidType;
791
+ bag: LoosePartial<{
792
+ minimum: Date;
793
+ maximum: Date;
794
+ format: string;
795
+ }>;
796
+ }
797
+ interface $ZodDate<T = unknown> extends $ZodType {
798
+ _zod: $ZodDateInternals<T>;
799
+ }
800
+ declare const $ZodDate: $constructor<$ZodDate>;
801
+ interface $ZodArrayDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
802
+ type: "array";
803
+ element: T;
804
+ }
805
+ interface $ZodArrayInternals<T extends SomeType = $ZodType> extends _$ZodTypeInternals {
806
+ def: $ZodArrayDef<T>;
807
+ isst: $ZodIssueInvalidType;
808
+ output: output<T>[];
809
+ input: input<T>[];
810
+ }
811
+ interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {}
812
+ declare const $ZodArray: $constructor<$ZodArray>;
813
+ type OptionalOutSchema = {
814
+ _zod: {
815
+ optout: "optional";
816
+ };
817
+ };
818
+ type OptionalInSchema = {
819
+ _zod: {
820
+ optin: "optional";
821
+ };
822
+ };
823
+ type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, output<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"] } & { -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"] } & Extra>;
824
+ type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, input<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"] } & { -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"] } & Extra>;
825
+ type $ZodObjectConfig = {
826
+ out: Record<string, unknown>;
827
+ in: Record<string, unknown>;
828
+ };
829
+ type $loose = {
830
+ out: Record<string, unknown>;
831
+ in: Record<string, unknown>;
832
+ };
833
+ type $strict = {
834
+ out: {};
835
+ in: {};
836
+ };
837
+ type $strip = {
838
+ out: {};
839
+ in: {};
840
+ };
841
+ type $catchall<T extends SomeType> = {
842
+ out: {
843
+ [k: string]: output<T>;
844
+ };
845
+ in: {
846
+ [k: string]: input<T>;
847
+ };
848
+ };
849
+ type $ZodShape = Readonly<{
850
+ [k: string]: $ZodType;
851
+ }>;
852
+ interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
853
+ type: "object";
854
+ shape: Shape;
855
+ catchall?: $ZodType | undefined;
856
+ }
857
+ interface $ZodObjectInternals< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
858
+ def: $ZodObjectDef<Shape>;
859
+ config: Config;
860
+ isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
861
+ propValues: PropValues;
862
+ output: $InferObjectOutput<Shape, Config["out"]>;
863
+ input: $InferObjectInput<Shape, Config["in"]>;
864
+ optin?: "optional" | undefined;
865
+ optout?: "optional" | undefined;
866
+ }
867
+ type $ZodLooseShape = Record<string, any>;
868
+ interface $ZodObject< /** @ts-ignore Cast variance */out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {}
869
+ declare const $ZodObject: $constructor<$ZodObject>;
870
+ type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
871
+ type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
872
+ interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
873
+ type: "union";
874
+ options: Options;
875
+ inclusive?: boolean;
876
+ }
877
+ type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
878
+ type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
879
+ interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends _$ZodTypeInternals {
880
+ def: $ZodUnionDef<T>;
881
+ isst: $ZodIssueInvalidUnion;
882
+ pattern: T[number]["_zod"]["pattern"];
883
+ values: T[number]["_zod"]["values"];
884
+ output: $InferUnionOutput<T[number]>;
885
+ input: $InferUnionInput<T[number]>;
886
+ optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
887
+ optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
888
+ }
889
+ interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodUnionInternals<T>> {
890
+ _zod: $ZodUnionInternals<T>;
891
+ }
892
+ declare const $ZodUnion: $constructor<$ZodUnion>;
893
+ interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
894
+ type: "intersection";
895
+ left: Left;
896
+ right: Right;
897
+ }
898
+ interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
899
+ def: $ZodIntersectionDef<A, B>;
900
+ isst: never;
901
+ optin: A["_zod"]["optin"] | B["_zod"]["optin"];
902
+ optout: A["_zod"]["optout"] | B["_zod"]["optout"];
903
+ output: output<A> & output<B>;
904
+ input: input<A> & input<B>;
905
+ }
906
+ interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
907
+ _zod: $ZodIntersectionInternals<A, B>;
908
+ }
909
+ declare const $ZodIntersection: $constructor<$ZodIntersection>;
910
+ interface $ZodTupleDef<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
911
+ type: "tuple";
912
+ items: T;
913
+ rest: Rest;
914
+ }
915
+ type $InferTupleInputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleInputTypeWithOptionals<T>, ...(Rest extends SomeType ? input<Rest>[] : [])];
916
+ type TupleInputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: input<T[k]> };
917
+ type TupleInputTypeWithOptionals<T extends TupleItems> = T extends readonly [...infer Prefix extends SomeType[], infer Tail extends SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...TupleInputTypeWithOptionals<Prefix>, input<Tail>?] : TupleInputTypeNoOptionals<T> : [];
918
+ type $InferTupleOutputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleOutputTypeWithOptionals<T>, ...(Rest extends SomeType ? output<Rest>[] : [])];
919
+ type TupleOutputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: output<T[k]> };
920
+ type TupleOutputTypeWithOptionals<T extends TupleItems> = T extends readonly [...infer Prefix extends SomeType[], infer Tail extends SomeType] ? Tail["_zod"]["optout"] extends "optional" ? [...TupleOutputTypeWithOptionals<Prefix>, output<Tail>?] : TupleOutputTypeNoOptionals<T> : [];
921
+ interface $ZodTupleInternals<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends _$ZodTypeInternals {
922
+ def: $ZodTupleDef<T, Rest>;
923
+ isst: $ZodIssueInvalidType | $ZodIssueTooBig<unknown[]> | $ZodIssueTooSmall<unknown[]>;
924
+ output: $InferTupleOutputType<T, Rest>;
925
+ input: $InferTupleInputType<T, Rest>;
926
+ }
927
+ interface $ZodTuple<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodType {
928
+ _zod: $ZodTupleInternals<T, Rest>;
929
+ }
930
+ declare const $ZodTuple: $constructor<$ZodTuple>;
931
+ type $ZodRecordKey = $ZodType<string | number | symbol, unknown>;
932
+ interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
933
+ type: "record";
934
+ keyType: Key;
935
+ valueType: Value;
936
+ /** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
937
+ mode?: "strict" | "loose";
938
+ }
939
+ type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<output<Key>, output<Value>>> : Record<output<Key>, output<Value>>;
940
+ type $InferZodRecordInput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<input<Key> & PropertyKey, input<Value>>> : Record<input<Key> & PropertyKey, input<Value>>;
941
+ interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
942
+ def: $ZodRecordDef<Key, Value>;
943
+ isst: $ZodIssueInvalidType | $ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
944
+ optin?: "optional" | undefined;
945
+ optout?: "optional" | undefined;
946
+ }
947
+ type $partial = {
948
+ "~~partial": true;
949
+ };
950
+ interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodType {
951
+ _zod: $ZodRecordInternals<Key, Value>;
952
+ }
953
+ declare const $ZodRecord: $constructor<$ZodRecord>;
954
+ interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
955
+ type: "map";
956
+ keyType: Key;
957
+ valueType: Value;
958
+ }
959
+ interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key>, output<Value>>, Map<input<Key>, input<Value>>> {
960
+ def: $ZodMapDef<Key, Value>;
961
+ isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement<unknown>;
962
+ optin?: "optional" | undefined;
963
+ optout?: "optional" | undefined;
964
+ }
965
+ interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
966
+ _zod: $ZodMapInternals<Key, Value>;
967
+ }
968
+ declare const $ZodMap: $constructor<$ZodMap>;
969
+ interface $ZodSetDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
970
+ type: "set";
971
+ valueType: T;
972
+ }
973
+ interface $ZodSetInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T>>, Set<input<T>>> {
974
+ def: $ZodSetDef<T>;
975
+ isst: $ZodIssueInvalidType;
976
+ optin?: "optional" | undefined;
977
+ optout?: "optional" | undefined;
978
+ }
979
+ interface $ZodSet<T extends SomeType = $ZodType> extends $ZodType {
980
+ _zod: $ZodSetInternals<T>;
981
+ }
982
+ declare const $ZodSet: $constructor<$ZodSet>;
983
+ type $InferEnumOutput<T extends EnumLike> = T[keyof T] & {};
984
+ type $InferEnumInput<T extends EnumLike> = T[keyof T] & {};
985
+ interface $ZodEnumDef<T extends EnumLike = EnumLike> extends $ZodTypeDef {
986
+ type: "enum";
987
+ entries: T;
988
+ }
989
+ interface $ZodEnumInternals< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
990
+ def: $ZodEnumDef<T>;
991
+ /** @deprecated Internal API, use with caution (not deprecated) */
992
+ values: PrimitiveSet;
993
+ /** @deprecated Internal API, use with caution (not deprecated) */
994
+ pattern: RegExp;
995
+ isst: $ZodIssueInvalidValue;
996
+ }
997
+ interface $ZodEnum<T extends EnumLike = EnumLike> extends $ZodType {
998
+ _zod: $ZodEnumInternals<T>;
999
+ }
1000
+ declare const $ZodEnum: $constructor<$ZodEnum>;
1001
+ interface $ZodLiteralDef<T extends Literal> extends $ZodTypeDef {
1002
+ type: "literal";
1003
+ values: T[];
1004
+ }
1005
+ interface $ZodLiteralInternals<T extends Literal = Literal> extends $ZodTypeInternals<T, T> {
1006
+ def: $ZodLiteralDef<T>;
1007
+ values: Set<T>;
1008
+ pattern: RegExp;
1009
+ isst: $ZodIssueInvalidValue;
1010
+ }
1011
+ interface $ZodLiteral<T extends Literal = Literal> extends $ZodType {
1012
+ _zod: $ZodLiteralInternals<T>;
1013
+ }
1014
+ declare const $ZodLiteral: $constructor<$ZodLiteral>;
1015
+ type _File = typeof globalThis extends {
1016
+ File: infer F extends new (...args: any[]) => any;
1017
+ } ? InstanceType<F> : {};
1018
+ /** Do not reference this directly. */
1019
+ interface File$1 extends _File {
1020
+ readonly type: string;
1021
+ readonly size: number;
1022
+ }
1023
+ interface $ZodFileDef extends $ZodTypeDef {
1024
+ type: "file";
1025
+ }
1026
+ interface $ZodFileInternals extends $ZodTypeInternals<File$1, File$1> {
1027
+ def: $ZodFileDef;
1028
+ isst: $ZodIssueInvalidType;
1029
+ bag: LoosePartial<{
1030
+ minimum: number;
1031
+ maximum: number;
1032
+ mime: MimeTypes[];
1033
+ }>;
1034
+ }
1035
+ interface $ZodFile extends $ZodType {
1036
+ _zod: $ZodFileInternals;
1037
+ }
1038
+ declare const $ZodFile: $constructor<$ZodFile>;
1039
+ interface $ZodTransformDef extends $ZodTypeDef {
1040
+ type: "transform";
1041
+ transform: (input: unknown, payload: ParsePayload<unknown>) => MaybeAsync<unknown>;
1042
+ }
1043
+ interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
1044
+ def: $ZodTransformDef;
1045
+ isst: never;
1046
+ }
1047
+ interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
1048
+ _zod: $ZodTransformInternals<O, I>;
1049
+ }
1050
+ declare const $ZodTransform: $constructor<$ZodTransform>;
1051
+ interface $ZodOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1052
+ type: "optional";
1053
+ innerType: T;
1054
+ }
1055
+ interface $ZodOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | undefined, input<T> | undefined> {
1056
+ def: $ZodOptionalDef<T>;
1057
+ optin: "optional";
1058
+ optout: "optional";
1059
+ isst: never;
1060
+ values: T["_zod"]["values"];
1061
+ pattern: T["_zod"]["pattern"];
1062
+ }
1063
+ interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
1064
+ _zod: $ZodOptionalInternals<T>;
1065
+ }
1066
+ declare const $ZodOptional: $constructor<$ZodOptional>;
1067
+ interface $ZodExactOptionalDef<T extends SomeType = $ZodType> extends $ZodOptionalDef<T> {}
1068
+ interface $ZodExactOptionalInternals<T extends SomeType = $ZodType> extends $ZodOptionalInternals<T> {
1069
+ def: $ZodExactOptionalDef<T>;
1070
+ output: output<T>;
1071
+ input: input<T>;
1072
+ }
1073
+ interface $ZodExactOptional<T extends SomeType = $ZodType> extends $ZodType {
1074
+ _zod: $ZodExactOptionalInternals<T>;
1075
+ }
1076
+ declare const $ZodExactOptional: $constructor<$ZodExactOptional>;
1077
+ interface $ZodNullableDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1078
+ type: "nullable";
1079
+ innerType: T;
1080
+ }
1081
+ interface $ZodNullableInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | null, input<T> | null> {
1082
+ def: $ZodNullableDef<T>;
1083
+ optin: T["_zod"]["optin"];
1084
+ optout: T["_zod"]["optout"];
1085
+ isst: never;
1086
+ values: T["_zod"]["values"];
1087
+ pattern: T["_zod"]["pattern"];
1088
+ }
1089
+ interface $ZodNullable<T extends SomeType = $ZodType> extends $ZodType {
1090
+ _zod: $ZodNullableInternals<T>;
1091
+ }
1092
+ declare const $ZodNullable: $constructor<$ZodNullable>;
1093
+ interface $ZodDefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1094
+ type: "default";
1095
+ innerType: T;
1096
+ /** The default value. May be a getter. */
1097
+ defaultValue: NoUndefined<output<T>>;
1098
+ }
1099
+ interface $ZodDefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
1100
+ def: $ZodDefaultDef<T>;
1101
+ optin: "optional";
1102
+ optout?: "optional" | undefined;
1103
+ isst: never;
1104
+ values: T["_zod"]["values"];
1105
+ }
1106
+ interface $ZodDefault<T extends SomeType = $ZodType> extends $ZodType {
1107
+ _zod: $ZodDefaultInternals<T>;
1108
+ }
1109
+ declare const $ZodDefault: $constructor<$ZodDefault>;
1110
+ interface $ZodPrefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1111
+ type: "prefault";
1112
+ innerType: T;
1113
+ /** The default value. May be a getter. */
1114
+ defaultValue: input<T>;
1115
+ }
1116
+ interface $ZodPrefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
1117
+ def: $ZodPrefaultDef<T>;
1118
+ optin: "optional";
1119
+ optout?: "optional" | undefined;
1120
+ isst: never;
1121
+ values: T["_zod"]["values"];
1122
+ }
1123
+ interface $ZodPrefault<T extends SomeType = $ZodType> extends $ZodType {
1124
+ _zod: $ZodPrefaultInternals<T>;
1125
+ }
1126
+ declare const $ZodPrefault: $constructor<$ZodPrefault>;
1127
+ interface $ZodNonOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1128
+ type: "nonoptional";
1129
+ innerType: T;
1130
+ }
1131
+ interface $ZodNonOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, NoUndefined<input<T>>> {
1132
+ def: $ZodNonOptionalDef<T>;
1133
+ isst: $ZodIssueInvalidType;
1134
+ values: T["_zod"]["values"];
1135
+ optin: "optional" | undefined;
1136
+ optout: "optional" | undefined;
1137
+ }
1138
+ interface $ZodNonOptional<T extends SomeType = $ZodType> extends $ZodType {
1139
+ _zod: $ZodNonOptionalInternals<T>;
1140
+ }
1141
+ declare const $ZodNonOptional: $constructor<$ZodNonOptional>;
1142
+ interface $ZodSuccessDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1143
+ type: "success";
1144
+ innerType: T;
1145
+ }
1146
+ interface $ZodSuccessInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input<T>> {
1147
+ def: $ZodSuccessDef<T>;
1148
+ isst: never;
1149
+ optin: T["_zod"]["optin"];
1150
+ optout: "optional" | undefined;
1151
+ }
1152
+ interface $ZodSuccess<T extends SomeType = $ZodType> extends $ZodType {
1153
+ _zod: $ZodSuccessInternals<T>;
1154
+ }
1155
+ declare const $ZodSuccess: $constructor<$ZodSuccess>;
1156
+ interface $ZodCatchCtx extends ParsePayload {
1157
+ /** @deprecated Use `ctx.issues` */
1158
+ error: {
1159
+ issues: $ZodIssue[];
1160
+ };
1161
+ /** @deprecated Use `ctx.value` */
1162
+ input: unknown;
1163
+ }
1164
+ interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1165
+ type: "catch";
1166
+ innerType: T;
1167
+ catchValue: (ctx: $ZodCatchCtx) => unknown;
1168
+ }
1169
+ interface $ZodCatchInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1170
+ def: $ZodCatchDef<T>;
1171
+ optin: T["_zod"]["optin"];
1172
+ optout: T["_zod"]["optout"];
1173
+ isst: never;
1174
+ values: T["_zod"]["values"];
1175
+ }
1176
+ interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
1177
+ _zod: $ZodCatchInternals<T>;
1178
+ }
1179
+ declare const $ZodCatch: $constructor<$ZodCatch>;
1180
+ interface $ZodNaNDef extends $ZodTypeDef {
1181
+ type: "nan";
1182
+ }
1183
+ interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
1184
+ def: $ZodNaNDef;
1185
+ isst: $ZodIssueInvalidType;
1186
+ }
1187
+ interface $ZodNaN extends $ZodType {
1188
+ _zod: $ZodNaNInternals;
1189
+ }
1190
+ declare const $ZodNaN: $constructor<$ZodNaN>;
1191
+ interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
1192
+ type: "pipe";
1193
+ in: A;
1194
+ out: B;
1195
+ /** Only defined inside $ZodCodec instances. */
1196
+ transform?: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
1197
+ /** Only defined inside $ZodCodec instances. */
1198
+ reverseTransform?: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
1199
+ }
1200
+ interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
1201
+ def: $ZodPipeDef<A, B>;
1202
+ isst: never;
1203
+ values: A["_zod"]["values"];
1204
+ optin: A["_zod"]["optin"];
1205
+ optout: B["_zod"]["optout"];
1206
+ propValues: A["_zod"]["propValues"];
1207
+ }
1208
+ interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
1209
+ _zod: $ZodPipeInternals<A, B>;
1210
+ }
1211
+ declare const $ZodPipe: $constructor<$ZodPipe>;
1212
+ interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1213
+ type: "readonly";
1214
+ innerType: T;
1215
+ }
1216
+ interface $ZodReadonlyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<MakeReadonly<output<T>>, MakeReadonly<input<T>>> {
1217
+ def: $ZodReadonlyDef<T>;
1218
+ optin: T["_zod"]["optin"];
1219
+ optout: T["_zod"]["optout"];
1220
+ isst: never;
1221
+ propValues: T["_zod"]["propValues"];
1222
+ values: T["_zod"]["values"];
1223
+ }
1224
+ interface $ZodReadonly<T extends SomeType = $ZodType> extends $ZodType {
1225
+ _zod: $ZodReadonlyInternals<T>;
1226
+ }
1227
+ declare const $ZodReadonly: $constructor<$ZodReadonly>;
1228
+ interface $ZodTemplateLiteralDef extends $ZodTypeDef {
1229
+ type: "template_literal";
1230
+ parts: $ZodTemplateLiteralPart[];
1231
+ format?: string | undefined;
1232
+ }
1233
+ interface $ZodTemplateLiteralInternals<Template extends string = string> extends $ZodTypeInternals<Template, Template> {
1234
+ pattern: RegExp;
1235
+ def: $ZodTemplateLiteralDef;
1236
+ isst: $ZodIssueInvalidType;
1237
+ }
1238
+ interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
1239
+ _zod: $ZodTemplateLiteralInternals<Template>;
1240
+ }
1241
+ type LiteralPart = Exclude<Literal, symbol>;
1242
+ interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
1243
+ pattern: RegExp;
1244
+ }
1245
+ interface SchemaPart extends $ZodType {
1246
+ _zod: SchemaPartInternals;
1247
+ }
1248
+ type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
1249
+ declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
1250
+ type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
1251
+ type $ZodFunctionIn = $ZodFunctionArgs;
1252
+ type $ZodFunctionOut = $ZodType;
1253
+ type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input<Returns>;
1254
+ type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => MaybeAsync<input<Returns>>;
1255
+ type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => output<Returns>;
1256
+ type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => Promise<output<Returns>>;
1257
+ interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
1258
+ type: "function";
1259
+ input: In;
1260
+ output: Out;
1261
+ }
1262
+ interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
1263
+ def: $ZodFunctionDef<Args, Returns>;
1264
+ isst: $ZodIssueInvalidType;
1265
+ }
1266
+ interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodType<any, any, $ZodFunctionInternals<Args, Returns>> {
1267
+ /** @deprecated */
1268
+ _def: $ZodFunctionDef<Args, Returns>;
1269
+ _input: $InferInnerFunctionType<Args, Returns>;
1270
+ _output: $InferOuterFunctionType<Args, Returns>;
1271
+ implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
1272
+ implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
1273
+ input<const Items extends TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest): $ZodFunction<$ZodTuple<Items, Rest>, Returns>;
1274
+ input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
1275
+ input(...args: any[]): $ZodFunction<any, Returns>;
1276
+ output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
1277
+ }
1278
+ declare const $ZodFunction: $constructor<$ZodFunction>;
1279
+ interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1280
+ type: "promise";
1281
+ innerType: T;
1282
+ }
1283
+ interface $ZodPromiseInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T>>, MaybeAsync<input<T>>> {
1284
+ def: $ZodPromiseDef<T>;
1285
+ isst: never;
1286
+ }
1287
+ interface $ZodPromise<T extends SomeType = $ZodType> extends $ZodType {
1288
+ _zod: $ZodPromiseInternals<T>;
1289
+ }
1290
+ declare const $ZodPromise: $constructor<$ZodPromise>;
1291
+ interface $ZodLazyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1292
+ type: "lazy";
1293
+ getter: () => T;
1294
+ }
1295
+ interface $ZodLazyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1296
+ def: $ZodLazyDef<T>;
1297
+ isst: never;
1298
+ /** Auto-cached way to retrieve the inner schema */
1299
+ innerType: T;
1300
+ pattern: T["_zod"]["pattern"];
1301
+ propValues: T["_zod"]["propValues"];
1302
+ optin: T["_zod"]["optin"];
1303
+ optout: T["_zod"]["optout"];
1304
+ }
1305
+ interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
1306
+ _zod: $ZodLazyInternals<T>;
1307
+ }
1308
+ declare const $ZodLazy: $constructor<$ZodLazy>;
1309
+ interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
1310
+ type: "custom";
1311
+ check: "custom";
1312
+ path?: PropertyKey[] | undefined;
1313
+ error?: $ZodErrorMap | undefined;
1314
+ params?: Record<string, any> | undefined;
1315
+ fn: (arg: O) => unknown;
1316
+ }
1317
+ interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, $ZodCheckInternals<O> {
1318
+ def: $ZodCustomDef;
1319
+ issc: $ZodIssue;
1320
+ isst: never;
1321
+ bag: LoosePartial<{
1322
+ Class: typeof Class;
1323
+ }>;
1324
+ }
1325
+ interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
1326
+ _zod: $ZodCustomInternals<O, I>;
1327
+ }
1328
+ declare const $ZodCustom: $constructor<$ZodCustom>;
1329
+ 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;
1330
+ //#endregion
1331
+ //#region ../../node_modules/zod/v4/core/checks.d.cts
1332
+ interface $ZodCheckDef {
1333
+ check: string;
1334
+ error?: $ZodErrorMap<never> | undefined;
1335
+ /** If true, no later checks will be executed if this check fails. Default `false`. */
1336
+ abort?: boolean | undefined;
1337
+ /** If provided, this check will only be executed if the function returns `true`. Defaults to `payload => z.util.isAborted(payload)`. */
1338
+ when?: ((payload: ParsePayload) => boolean) | undefined;
1339
+ }
1340
+ interface $ZodCheckInternals<T> {
1341
+ def: $ZodCheckDef;
1342
+ /** The set of issues this check might throw. */
1343
+ issc?: $ZodIssueBase;
1344
+ check(payload: ParsePayload<T>): MaybeAsync<void>;
1345
+ onattach: ((schema: $ZodType) => void)[];
1346
+ }
1347
+ interface $ZodCheck<in T = never> {
1348
+ _zod: $ZodCheckInternals<T>;
1349
+ }
1350
+ declare const $ZodCheck: $constructor<$ZodCheck<any>>;
1351
+ interface $ZodCheckLessThanDef extends $ZodCheckDef {
1352
+ check: "less_than";
1353
+ value: Numeric;
1354
+ inclusive: boolean;
1355
+ }
1356
+ interface $ZodCheckLessThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
1357
+ def: $ZodCheckLessThanDef;
1358
+ issc: $ZodIssueTooBig<T>;
1359
+ }
1360
+ interface $ZodCheckLessThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
1361
+ _zod: $ZodCheckLessThanInternals<T>;
1362
+ }
1363
+ declare const $ZodCheckLessThan: $constructor<$ZodCheckLessThan>;
1364
+ interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
1365
+ check: "greater_than";
1366
+ value: Numeric;
1367
+ inclusive: boolean;
1368
+ }
1369
+ interface $ZodCheckGreaterThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
1370
+ def: $ZodCheckGreaterThanDef;
1371
+ issc: $ZodIssueTooSmall<T>;
1372
+ }
1373
+ interface $ZodCheckGreaterThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
1374
+ _zod: $ZodCheckGreaterThanInternals<T>;
1375
+ }
1376
+ declare const $ZodCheckGreaterThan: $constructor<$ZodCheckGreaterThan>;
1377
+ interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
1378
+ check: "multiple_of";
1379
+ value: T;
1380
+ }
1381
+ interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint> extends $ZodCheckInternals<T> {
1382
+ def: $ZodCheckMultipleOfDef<T>;
1383
+ issc: $ZodIssueNotMultipleOf;
1384
+ }
1385
+ interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
1386
+ _zod: $ZodCheckMultipleOfInternals<T>;
1387
+ }
1388
+ declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
1389
+ type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
1390
+ interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
1391
+ check: "number_format";
1392
+ format: $ZodNumberFormats;
1393
+ }
1394
+ interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
1395
+ def: $ZodCheckNumberFormatDef;
1396
+ issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
1397
+ }
1398
+ interface $ZodCheckNumberFormat extends $ZodCheck<number> {
1399
+ _zod: $ZodCheckNumberFormatInternals;
1400
+ }
1401
+ declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
1402
+ interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
1403
+ check: "max_length";
1404
+ maximum: number;
1405
+ }
1406
+ interface $ZodCheckMaxLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1407
+ def: $ZodCheckMaxLengthDef;
1408
+ issc: $ZodIssueTooBig<T>;
1409
+ }
1410
+ interface $ZodCheckMaxLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
1411
+ _zod: $ZodCheckMaxLengthInternals<T>;
1412
+ }
1413
+ declare const $ZodCheckMaxLength: $constructor<$ZodCheckMaxLength>;
1414
+ interface $ZodCheckMinLengthDef extends $ZodCheckDef {
1415
+ check: "min_length";
1416
+ minimum: number;
1417
+ }
1418
+ interface $ZodCheckMinLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1419
+ def: $ZodCheckMinLengthDef;
1420
+ issc: $ZodIssueTooSmall<T>;
1421
+ }
1422
+ interface $ZodCheckMinLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
1423
+ _zod: $ZodCheckMinLengthInternals<T>;
1424
+ }
1425
+ declare const $ZodCheckMinLength: $constructor<$ZodCheckMinLength>;
1426
+ interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
1427
+ check: "length_equals";
1428
+ length: number;
1429
+ }
1430
+ interface $ZodCheckLengthEqualsInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1431
+ def: $ZodCheckLengthEqualsDef;
1432
+ issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
1433
+ }
1434
+ interface $ZodCheckLengthEquals<T extends HasLength = HasLength> extends $ZodCheck<T> {
1435
+ _zod: $ZodCheckLengthEqualsInternals<T>;
1436
+ }
1437
+ declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
1438
+ type $ZodStringFormats = "email" | "url" | "emoji" | "uuid" | "guid" | "nanoid" | "cuid" | "cuid2" | "ulid" | "xid" | "ksuid" | "datetime" | "date" | "time" | "duration" | "ipv4" | "ipv6" | "cidrv4" | "cidrv6" | "base64" | "base64url" | "json_string" | "e164" | "lowercase" | "uppercase" | "regex" | "jwt" | "starts_with" | "ends_with" | "includes";
1439
+ interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
1440
+ check: "string_format";
1441
+ format: Format;
1442
+ pattern?: RegExp | undefined;
1443
+ }
1444
+ interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
1445
+ def: $ZodCheckStringFormatDef;
1446
+ issc: $ZodIssueInvalidStringFormat;
1447
+ }
1448
+ interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
1449
+ format: "regex";
1450
+ pattern: RegExp;
1451
+ }
1452
+ interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
1453
+ def: $ZodCheckRegexDef;
1454
+ issc: $ZodIssueInvalidStringFormat;
1455
+ }
1456
+ interface $ZodCheckRegex extends $ZodCheck<string> {
1457
+ _zod: $ZodCheckRegexInternals;
1458
+ }
1459
+ declare const $ZodCheckRegex: $constructor<$ZodCheckRegex>;
1460
+ interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {}
1461
+ interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
1462
+ def: $ZodCheckLowerCaseDef;
1463
+ issc: $ZodIssueInvalidStringFormat;
1464
+ }
1465
+ interface $ZodCheckLowerCase extends $ZodCheck<string> {
1466
+ _zod: $ZodCheckLowerCaseInternals;
1467
+ }
1468
+ declare const $ZodCheckLowerCase: $constructor<$ZodCheckLowerCase>;
1469
+ interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {}
1470
+ interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
1471
+ def: $ZodCheckUpperCaseDef;
1472
+ issc: $ZodIssueInvalidStringFormat;
1473
+ }
1474
+ interface $ZodCheckUpperCase extends $ZodCheck<string> {
1475
+ _zod: $ZodCheckUpperCaseInternals;
1476
+ }
1477
+ declare const $ZodCheckUpperCase: $constructor<$ZodCheckUpperCase>;
1478
+ interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
1479
+ includes: string;
1480
+ position?: number | undefined;
1481
+ }
1482
+ interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
1483
+ def: $ZodCheckIncludesDef;
1484
+ issc: $ZodIssueInvalidStringFormat;
1485
+ }
1486
+ interface $ZodCheckIncludes extends $ZodCheck<string> {
1487
+ _zod: $ZodCheckIncludesInternals;
1488
+ }
1489
+ declare const $ZodCheckIncludes: $constructor<$ZodCheckIncludes>;
1490
+ interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
1491
+ prefix: string;
1492
+ }
1493
+ interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
1494
+ def: $ZodCheckStartsWithDef;
1495
+ issc: $ZodIssueInvalidStringFormat;
1496
+ }
1497
+ interface $ZodCheckStartsWith extends $ZodCheck<string> {
1498
+ _zod: $ZodCheckStartsWithInternals;
1499
+ }
1500
+ declare const $ZodCheckStartsWith: $constructor<$ZodCheckStartsWith>;
1501
+ interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
1502
+ suffix: string;
1503
+ }
1504
+ interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
1505
+ def: $ZodCheckEndsWithDef;
1506
+ issc: $ZodIssueInvalidStringFormat;
1507
+ }
1508
+ interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
1509
+ _zod: $ZodCheckEndsWithInternals;
1510
+ }
1511
+ declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
1512
+ //#endregion
1513
+ //#region ../../node_modules/zod/v4/core/errors.d.cts
1514
+ interface $ZodIssueBase {
1515
+ readonly code?: string;
1516
+ readonly input?: unknown;
1517
+ readonly path: PropertyKey[];
1518
+ readonly message: string;
1519
+ }
1520
+ type $ZodInvalidTypeExpected = "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "undefined" | "null" | "never" | "void" | "date" | "array" | "object" | "tuple" | "record" | "map" | "set" | "file" | "nonoptional" | "nan" | "function" | (string & {});
1521
+ interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
1522
+ readonly code: "invalid_type";
1523
+ readonly expected: $ZodInvalidTypeExpected;
1524
+ readonly input?: Input;
1525
+ }
1526
+ interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
1527
+ readonly code: "too_big";
1528
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
1529
+ readonly maximum: number | bigint;
1530
+ readonly inclusive?: boolean;
1531
+ readonly exact?: boolean;
1532
+ readonly input?: Input;
1533
+ }
1534
+ interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
1535
+ readonly code: "too_small";
1536
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
1537
+ readonly minimum: number | bigint;
1538
+ /** True if the allowable range includes the minimum */
1539
+ readonly inclusive?: boolean;
1540
+ /** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
1541
+ readonly exact?: boolean;
1542
+ readonly input?: Input;
1543
+ }
1544
+ interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
1545
+ readonly code: "invalid_format";
1546
+ readonly format: $ZodStringFormats | (string & {});
1547
+ readonly pattern?: string;
1548
+ readonly input?: string;
1549
+ }
1550
+ interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
1551
+ readonly code: "not_multiple_of";
1552
+ readonly divisor: number;
1553
+ readonly input?: Input;
1554
+ }
1555
+ interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
1556
+ readonly code: "unrecognized_keys";
1557
+ readonly keys: string[];
1558
+ readonly input?: Record<string, unknown>;
1559
+ }
1560
+ interface $ZodIssueInvalidUnionNoMatch extends $ZodIssueBase {
1561
+ readonly code: "invalid_union";
1562
+ readonly errors: $ZodIssue[][];
1563
+ readonly input?: unknown;
1564
+ readonly discriminator?: string | undefined;
1565
+ readonly inclusive?: true;
1566
+ }
1567
+ interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
1568
+ readonly code: "invalid_union";
1569
+ readonly errors: [];
1570
+ readonly input?: unknown;
1571
+ readonly discriminator?: string | undefined;
1572
+ readonly inclusive: false;
1573
+ }
1574
+ type $ZodIssueInvalidUnion = $ZodIssueInvalidUnionNoMatch | $ZodIssueInvalidUnionMultipleMatch;
1575
+ interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
1576
+ readonly code: "invalid_key";
1577
+ readonly origin: "map" | "record";
1578
+ readonly issues: $ZodIssue[];
1579
+ readonly input?: Input;
1580
+ }
1581
+ interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
1582
+ readonly code: "invalid_element";
1583
+ readonly origin: "map" | "set";
1584
+ readonly key: unknown;
1585
+ readonly issues: $ZodIssue[];
1586
+ readonly input?: Input;
1587
+ }
1588
+ interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
1589
+ readonly code: "invalid_value";
1590
+ readonly values: Primitive[];
1591
+ readonly input?: Input;
1592
+ }
1593
+ interface $ZodIssueCustom extends $ZodIssueBase {
1594
+ readonly code: "custom";
1595
+ readonly params?: Record<string, any> | undefined;
1596
+ readonly input?: unknown;
1597
+ }
1598
+ type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
1599
+ type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
1600
+ type RawIssue$1<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1601
+ /** The input data */readonly input: unknown; /** The schema or check that originated this issue. */
1602
+ readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will continue executing checks/refinements after this issue. */
1603
+ readonly continue?: boolean | undefined;
1604
+ } & Record<string, unknown>> : never;
1605
+ type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;
1606
+ interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {
1607
+ (issue: $ZodRawIssue<T>): {
1608
+ message: string;
1609
+ } | string | undefined | null;
1610
+ }
1611
+ interface $ZodError<T = unknown> extends Error {
1612
+ type: T;
1613
+ issues: $ZodIssue[];
1614
+ _zod: {
1615
+ output: T;
1616
+ def: $ZodIssue[];
1617
+ };
1618
+ stack?: string;
1619
+ name: string;
1620
+ }
1621
+ declare const $ZodError: $constructor<$ZodError>;
1622
+ type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
1623
+ type _FlattenedError<T, U = string> = {
1624
+ formErrors: U[];
1625
+ fieldErrors: { [P in keyof T]?: U[] };
1626
+ };
1627
+ type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U> } : T extends any[] ? {
1628
+ [k: number]: $ZodFormattedError<T[number], U>;
1629
+ } : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U> }> : any;
1630
+ type $ZodFormattedError<T, U = string> = {
1631
+ _errors: U[];
1632
+ } & Flatten<_ZodFormattedError<T, U>>;
1633
+ //#endregion
1634
+ //#region ../../node_modules/zod/v4/core/core.d.cts
1635
+ type ZodTrait = {
1636
+ _zod: {
1637
+ def: any;
1638
+ [k: string]: any;
1639
+ };
1640
+ };
1641
+ interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
1642
+ new (def: D): T;
1643
+ init(inst: T, def: D): asserts inst is T;
1644
+ }
1645
+ declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
1646
+ Parent?: typeof Class;
1647
+ }): $constructor<T, D>;
1648
+ declare const $brand: unique symbol;
1649
+ type $brand<T extends string | number | symbol = string | number | symbol> = {
1650
+ [$brand]: { [k in T]: true };
1651
+ };
1652
+ type $ZodBranded<T extends SomeType, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T & (Dir extends "inout" ? {
1653
+ _zod: {
1654
+ input: input<T> & $brand<Brand>;
1655
+ output: output<T> & $brand<Brand>;
1656
+ };
1657
+ } : Dir extends "in" ? {
1658
+ _zod: {
1659
+ input: input<T> & $brand<Brand>;
1660
+ };
1661
+ } : {
1662
+ _zod: {
1663
+ output: output<T> & $brand<Brand>;
1664
+ };
1665
+ });
1666
+ type input<T> = T extends {
1667
+ _zod: {
1668
+ input: any;
1669
+ };
1670
+ } ? T["_zod"]["input"] : unknown;
1671
+ type output<T> = T extends {
1672
+ _zod: {
1673
+ output: any;
1674
+ };
1675
+ } ? T["_zod"]["output"] : unknown;
1676
+ //#endregion
1677
+ //#region ../../node_modules/zod/v4/core/api.d.cts
1678
+ 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] ? {} : {
1679
+ error?: string | $ZodErrorMap<IssueTypes> | undefined; /** @deprecated This parameter is deprecated. Use `error` instead. */
1680
+ message?: string | undefined;
1681
+ })>>>;
1682
+ type TypeParams<T extends $ZodType = $ZodType & {
1683
+ _isst: never;
1684
+ }, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
1685
+ type CheckParams<T extends $ZodCheck = $ZodCheck, // & { _issc: never },
1686
+ AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
1687
+ 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>;
1688
+ 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>;
1689
+ type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
1690
+ type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">;
1691
+ type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
1692
+ type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
1693
+ type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
1694
+ type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
1695
+ type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
1696
+ type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
1697
+ type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
1698
+ type $ZodCheckXIDParams = CheckStringFormatParams<$ZodXID, "when">;
1699
+ type $ZodCheckKSUIDParams = CheckStringFormatParams<$ZodKSUID, "when">;
1700
+ type $ZodCheckIPv4Params = CheckStringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
1701
+ type $ZodCheckIPv6Params = CheckStringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
1702
+ type $ZodCheckCIDRv4Params = CheckStringFormatParams<$ZodCIDRv4, "pattern" | "when">;
1703
+ type $ZodCheckCIDRv6Params = CheckStringFormatParams<$ZodCIDRv6, "pattern" | "when">;
1704
+ type $ZodCheckBase64Params = CheckStringFormatParams<$ZodBase64, "pattern" | "when">;
1705
+ type $ZodCheckBase64URLParams = CheckStringFormatParams<$ZodBase64URL, "pattern" | "when">;
1706
+ type $ZodCheckE164Params = CheckStringFormatParams<$ZodE164, "when">;
1707
+ type $ZodCheckJWTParams = CheckStringFormatParams<$ZodJWT, "pattern" | "when">;
1708
+ type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "pattern" | "when">;
1709
+ type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
1710
+ type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
1711
+ type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
1712
+ type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
1713
+ type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
1714
+ type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
1715
+ type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
1716
+ type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
1717
+ type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
1718
+ type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
1719
+ type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
1720
+ type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
1721
+ type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
1722
+ type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
1723
+ type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
1724
+ type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
1725
+ type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
1726
+ type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
1727
+ type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
1728
+ type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
1729
+ type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1730
+ /** The schema or check that originated this issue. */readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
1731
+ readonly continue?: boolean | undefined;
1732
+ } & Record<string, unknown>> : never;
1733
+ interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
1734
+ addIssue(arg: string | $ZodSuperRefineIssue): void;
1735
+ }
1736
+ //#endregion
1737
+ //#region ../../node_modules/zod/v4/classic/errors.d.cts
1738
+ /** An Error-like class used to store Zod validation issues. */
1739
+ interface ZodError<T = unknown> extends $ZodError<T> {
1740
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
1741
+ format(): $ZodFormattedError<T>;
1742
+ format<U>(mapper: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
1743
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
1744
+ flatten(): $ZodFlattenedError<T>;
1745
+ flatten<U>(mapper: (issue: $ZodIssue) => U): $ZodFlattenedError<T, U>;
1746
+ /** @deprecated Push directly to `.issues` instead. */
1747
+ addIssue(issue: $ZodIssue): void;
1748
+ /** @deprecated Push directly to `.issues` instead. */
1749
+ addIssues(issues: $ZodIssue[]): void;
1750
+ /** @deprecated Check `err.issues.length === 0` instead. */
1751
+ isEmpty: boolean;
1752
+ }
1753
+ declare const ZodError: $constructor<ZodError>;
1754
+ //#endregion
1755
+ //#region ../../node_modules/zod/v4/classic/parse.d.cts
1756
+ type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
1757
+ type ZodSafeParseSuccess<T> = {
1758
+ success: true;
1759
+ data: T;
1760
+ error?: never;
1761
+ };
1762
+ type ZodSafeParseError<T> = {
1763
+ success: false;
1764
+ data?: never;
1765
+ error: ZodError<T>;
1766
+ };
1767
+ //#endregion
1768
+ //#region ../../node_modules/zod/v4/classic/schemas.d.cts
1769
+ type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
1770
+ interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
1771
+ def: Internals["def"];
1772
+ type: Internals["def"]["type"];
1773
+ /** @deprecated Use `.def` instead. */
1774
+ _def: Internals["def"];
1775
+ /** @deprecated Use `z.output<typeof schema>` instead. */
1776
+ _output: Internals["output"];
1777
+ /** @deprecated Use `z.input<typeof schema>` instead. */
1778
+ _input: Internals["input"];
1779
+ "~standard": ZodStandardSchemaWithJSON<this>;
1780
+ /** Converts this schema to a JSON Schema representation. */
1781
+ toJSONSchema(params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<this>;
1782
+ check(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
1783
+ with(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
1784
+ clone(def?: Internals["def"], params?: {
1785
+ parent: boolean;
1786
+ }): this;
1787
+ register<R extends $ZodRegistry>(registry: R, ...meta: this extends R["_schema"] ? undefined extends R["_meta"] ? [$replace<R["_meta"], this>?] : [$replace<R["_meta"], this>] : ["Incompatible schema"]): this;
1788
+ brand<T extends PropertyKey = PropertyKey, Dir extends "in" | "out" | "inout" = "out">(value?: T): PropertyKey extends T ? this : $ZodBranded<this, T, Dir>;
1789
+ parse(data: unknown, params?: ParseContext<$ZodIssue>): output<this>;
1790
+ safeParse(data: unknown, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
1791
+ parseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
1792
+ safeParseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
1793
+ spa: (data: unknown, params?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<this>>>;
1794
+ encode(data: output<this>, params?: ParseContext<$ZodIssue>): input<this>;
1795
+ decode(data: input<this>, params?: ParseContext<$ZodIssue>): output<this>;
1796
+ encodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<input<this>>;
1797
+ decodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
1798
+ safeEncode(data: output<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<input<this>>;
1799
+ safeDecode(data: input<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
1800
+ safeEncodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<input<this>>>;
1801
+ safeDecodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
1802
+ refine<Ch extends (arg: output<this>) => unknown | Promise<unknown>>(check: Ch, params?: string | $ZodCustomParams): Ch extends ((arg: any) => arg is infer R) ? this & ZodType<R, input<this>> : this;
1803
+ superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>): this;
1804
+ overwrite(fn: (x: output<this>) => output<this>): this;
1805
+ optional(): ZodOptional<this>;
1806
+ exactOptional(): ZodExactOptional<this>;
1807
+ nonoptional(params?: string | $ZodNonOptionalParams): ZodNonOptional<this>;
1808
+ nullable(): ZodNullable<this>;
1809
+ nullish(): ZodOptional<ZodNullable<this>>;
1810
+ default(def: NoUndefined<output<this>>): ZodDefault<this>;
1811
+ default(def: () => NoUndefined<output<this>>): ZodDefault<this>;
1812
+ prefault(def: () => input<this>): ZodPrefault<this>;
1813
+ prefault(def: input<this>): ZodPrefault<this>;
1814
+ array(): ZodArray<this>;
1815
+ or<T extends SomeType>(option: T): ZodUnion<[this, T]>;
1816
+ and<T extends SomeType>(incoming: T): ZodIntersection<this, T>;
1817
+ transform<NewOut>(transform: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, output<this>>>;
1818
+ catch(def: output<this>): ZodCatch<this>;
1819
+ catch(def: (ctx: $ZodCatchCtx) => output<this>): ZodCatch<this>;
1820
+ pipe<T extends $ZodType<any, output<this>>>(target: T | $ZodType<any, output<this>>): ZodPipe<this, T>;
1821
+ readonly(): ZodReadonly<this>;
1822
+ /** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
1823
+ describe(description: string): this;
1824
+ description?: string;
1825
+ /** Returns the metadata associated with this instance in `z.globalRegistry` */
1826
+ meta(): $replace<GlobalMeta, this> | undefined;
1827
+ /** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
1828
+ meta(data: $replace<GlobalMeta, this>): this;
1829
+ /** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
1830
+ *
1831
+ * ```ts
1832
+ * const schema = z.string().optional();
1833
+ * const isOptional = schema.safeParse(undefined).success; // true
1834
+ * ```
1835
+ */
1836
+ isOptional(): boolean;
1837
+ /**
1838
+ * @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
1839
+ *
1840
+ * ```ts
1841
+ * const schema = z.string().nullable();
1842
+ * const isNullable = schema.safeParse(null).success; // true
1843
+ * ```
1844
+ */
1845
+ isNullable(): boolean;
1846
+ apply<T>(fn: (schema: this) => T): T;
1847
+ }
1848
+ interface _ZodType<out Internals extends $ZodTypeInternals = $ZodTypeInternals> extends ZodType<any, any, Internals> {}
1849
+ declare const ZodType: $constructor<ZodType>;
1850
+ interface _ZodString<T extends $ZodStringInternals<unknown> = $ZodStringInternals<unknown>> extends _ZodType<T> {
1851
+ format: string | null;
1852
+ minLength: number | null;
1853
+ maxLength: number | null;
1854
+ regex(regex: RegExp, params?: string | $ZodCheckRegexParams): this;
1855
+ includes(value: string, params?: string | $ZodCheckIncludesParams): this;
1856
+ startsWith(value: string, params?: string | $ZodCheckStartsWithParams): this;
1857
+ endsWith(value: string, params?: string | $ZodCheckEndsWithParams): this;
1858
+ min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
1859
+ max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
1860
+ length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
1861
+ nonempty(params?: string | $ZodCheckMinLengthParams): this;
1862
+ lowercase(params?: string | $ZodCheckLowerCaseParams): this;
1863
+ uppercase(params?: string | $ZodCheckUpperCaseParams): this;
1864
+ trim(): this;
1865
+ normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
1866
+ toLowerCase(): this;
1867
+ toUpperCase(): this;
1868
+ slugify(): this;
1869
+ }
1870
+ /** @internal */
1871
+ declare const _ZodString: $constructor<_ZodString>;
1872
+ interface ZodString extends _ZodString<$ZodStringInternals<string>> {
1873
+ /** @deprecated Use `z.email()` instead. */
1874
+ email(params?: string | $ZodCheckEmailParams): this;
1875
+ /** @deprecated Use `z.url()` instead. */
1876
+ url(params?: string | $ZodCheckURLParams): this;
1877
+ /** @deprecated Use `z.jwt()` instead. */
1878
+ jwt(params?: string | $ZodCheckJWTParams): this;
1879
+ /** @deprecated Use `z.emoji()` instead. */
1880
+ emoji(params?: string | $ZodCheckEmojiParams): this;
1881
+ /** @deprecated Use `z.guid()` instead. */
1882
+ guid(params?: string | $ZodCheckGUIDParams): this;
1883
+ /** @deprecated Use `z.uuid()` instead. */
1884
+ uuid(params?: string | $ZodCheckUUIDParams): this;
1885
+ /** @deprecated Use `z.uuid()` instead. */
1886
+ uuidv4(params?: string | $ZodCheckUUIDParams): this;
1887
+ /** @deprecated Use `z.uuid()` instead. */
1888
+ uuidv6(params?: string | $ZodCheckUUIDParams): this;
1889
+ /** @deprecated Use `z.uuid()` instead. */
1890
+ uuidv7(params?: string | $ZodCheckUUIDParams): this;
1891
+ /** @deprecated Use `z.nanoid()` instead. */
1892
+ nanoid(params?: string | $ZodCheckNanoIDParams): this;
1893
+ /** @deprecated Use `z.guid()` instead. */
1894
+ guid(params?: string | $ZodCheckGUIDParams): this;
1895
+ /** @deprecated Use `z.cuid()` instead. */
1896
+ cuid(params?: string | $ZodCheckCUIDParams): this;
1897
+ /** @deprecated Use `z.cuid2()` instead. */
1898
+ cuid2(params?: string | $ZodCheckCUID2Params): this;
1899
+ /** @deprecated Use `z.ulid()` instead. */
1900
+ ulid(params?: string | $ZodCheckULIDParams): this;
1901
+ /** @deprecated Use `z.base64()` instead. */
1902
+ base64(params?: string | $ZodCheckBase64Params): this;
1903
+ /** @deprecated Use `z.base64url()` instead. */
1904
+ base64url(params?: string | $ZodCheckBase64URLParams): this;
1905
+ /** @deprecated Use `z.xid()` instead. */
1906
+ xid(params?: string | $ZodCheckXIDParams): this;
1907
+ /** @deprecated Use `z.ksuid()` instead. */
1908
+ ksuid(params?: string | $ZodCheckKSUIDParams): this;
1909
+ /** @deprecated Use `z.ipv4()` instead. */
1910
+ ipv4(params?: string | $ZodCheckIPv4Params): this;
1911
+ /** @deprecated Use `z.ipv6()` instead. */
1912
+ ipv6(params?: string | $ZodCheckIPv6Params): this;
1913
+ /** @deprecated Use `z.cidrv4()` instead. */
1914
+ cidrv4(params?: string | $ZodCheckCIDRv4Params): this;
1915
+ /** @deprecated Use `z.cidrv6()` instead. */
1916
+ cidrv6(params?: string | $ZodCheckCIDRv6Params): this;
1917
+ /** @deprecated Use `z.e164()` instead. */
1918
+ e164(params?: string | $ZodCheckE164Params): this;
1919
+ /** @deprecated Use `z.iso.datetime()` instead. */
1920
+ datetime(params?: string | $ZodCheckISODateTimeParams): this;
1921
+ /** @deprecated Use `z.iso.date()` instead. */
1922
+ date(params?: string | $ZodCheckISODateParams): this;
1923
+ /** @deprecated Use `z.iso.time()` instead. */
1924
+ time(params?: string | $ZodCheckISOTimeParams): this;
1925
+ /** @deprecated Use `z.iso.duration()` instead. */
1926
+ duration(params?: string | $ZodCheckISODurationParams): this;
1927
+ }
1928
+ declare const ZodString: $constructor<ZodString>;
1929
+ interface _ZodNumber<Internals extends $ZodNumberInternals = $ZodNumberInternals> extends _ZodType<Internals> {
1930
+ gt(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1931
+ /** Identical to .min() */
1932
+ gte(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1933
+ min(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1934
+ lt(value: number, params?: string | $ZodCheckLessThanParams): this;
1935
+ /** Identical to .max() */
1936
+ lte(value: number, params?: string | $ZodCheckLessThanParams): this;
1937
+ max(value: number, params?: string | $ZodCheckLessThanParams): this;
1938
+ /** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
1939
+ int(params?: string | $ZodCheckNumberFormatParams): this;
1940
+ /** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
1941
+ safe(params?: string | $ZodCheckNumberFormatParams): this;
1942
+ positive(params?: string | $ZodCheckGreaterThanParams): this;
1943
+ nonnegative(params?: string | $ZodCheckGreaterThanParams): this;
1944
+ negative(params?: string | $ZodCheckLessThanParams): this;
1945
+ nonpositive(params?: string | $ZodCheckLessThanParams): this;
1946
+ multipleOf(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1947
+ /** @deprecated Use `.multipleOf()` instead. */
1948
+ step(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1949
+ /** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
1950
+ finite(params?: unknown): this;
1951
+ minValue: number | null;
1952
+ maxValue: number | null;
1953
+ /** @deprecated Check the `format` property instead. */
1954
+ isInt: boolean;
1955
+ /** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
1956
+ isFinite: boolean;
1957
+ format: string | null;
1958
+ }
1959
+ interface ZodNumber extends _ZodNumber<$ZodNumberInternals<number>> {}
1960
+ declare const ZodNumber: $constructor<ZodNumber>;
1961
+ interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T>>, $ZodArray<T> {
1962
+ element: T;
1963
+ min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
1964
+ nonempty(params?: string | $ZodCheckMinLengthParams): this;
1965
+ max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
1966
+ length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
1967
+ unwrap(): T;
1968
+ "~standard": ZodStandardSchemaWithJSON<this>;
1969
+ }
1970
+ declare const ZodArray: $constructor<ZodArray>;
1971
+ type SafeExtendShape<Base extends $ZodShape, Ext extends $ZodLooseShape> = { [K in keyof Ext]: K extends keyof Base ? output<Ext[K]> extends output<Base[K]> ? input<Ext[K]> extends input<Base[K]> ? Ext[K] : never : never : Ext[K] };
1972
+ interface ZodObject< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodLooseShape, out Config extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape, Config>>, $ZodObject<Shape, Config> {
1973
+ "~standard": ZodStandardSchemaWithJSON<this>;
1974
+ shape: Shape;
1975
+ keyof(): ZodEnum<ToEnum<keyof Shape & string>>;
1976
+ /** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
1977
+ catchall<T extends SomeType>(schema: T): ZodObject<Shape, $catchall<T>>;
1978
+ /** @deprecated Use `z.looseObject()` or `.loose()` instead. */
1979
+ passthrough(): ZodObject<Shape, $loose>;
1980
+ /** Consider `z.looseObject(A.shape)` instead */
1981
+ loose(): ZodObject<Shape, $loose>;
1982
+ /** Consider `z.strictObject(A.shape)` instead */
1983
+ strict(): ZodObject<Shape, $strict>;
1984
+ /** This is the default behavior. This method call is likely unnecessary. */
1985
+ strip(): ZodObject<Shape, $strip>;
1986
+ extend<U extends $ZodLooseShape>(shape: U): ZodObject<Extend<Shape, U>, Config>;
1987
+ safeExtend<U extends $ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, SomeType>>): ZodObject<Extend<Shape, U>, Config>;
1988
+ /**
1989
+ * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
1990
+ */
1991
+ merge<U extends ZodObject>(other: U): ZodObject<Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
1992
+ pick<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
1993
+ omit<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<Flatten<Omit<Shape, Extract<keyof Shape, keyof M>>>, Config>;
1994
+ partial(): ZodObject<{ [k in keyof Shape]: ZodOptional<Shape[k]> }, Config>;
1995
+ partial<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ [k in keyof Shape]: k extends keyof M ? ZodOptional<Shape[k]> : Shape[k] }, Config>;
1996
+ required(): ZodObject<{ [k in keyof Shape]: ZodNonOptional<Shape[k]> }, Config>;
1997
+ required<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ [k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k] }, Config>;
1998
+ }
1999
+ declare const ZodObject: $constructor<ZodObject>;
2000
+ interface ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T>>, $ZodUnion<T> {
2001
+ "~standard": ZodStandardSchemaWithJSON<this>;
2002
+ options: T;
2003
+ }
2004
+ declare const ZodUnion: $constructor<ZodUnion>;
2005
+ interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A, B>>, $ZodIntersection<A, B> {
2006
+ "~standard": ZodStandardSchemaWithJSON<this>;
2007
+ }
2008
+ declare const ZodIntersection: $constructor<ZodIntersection>;
2009
+ interface ZodEnum< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
2010
+ "~standard": ZodStandardSchemaWithJSON<this>;
2011
+ enum: T;
2012
+ options: Array<T[keyof T]>;
2013
+ extract<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Pick<T, U[number]>>>;
2014
+ exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Omit<T, U[number]>>>;
2015
+ }
2016
+ declare const ZodEnum: $constructor<ZodEnum>;
2017
+ interface ZodTransform<O = unknown, I = unknown> extends _ZodType<$ZodTransformInternals<O, I>>, $ZodTransform<O, I> {
2018
+ "~standard": ZodStandardSchemaWithJSON<this>;
2019
+ }
2020
+ declare const ZodTransform: $constructor<ZodTransform>;
2021
+ interface ZodOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodOptionalInternals<T>>, $ZodOptional<T> {
2022
+ "~standard": ZodStandardSchemaWithJSON<this>;
2023
+ unwrap(): T;
2024
+ }
2025
+ declare const ZodOptional: $constructor<ZodOptional>;
2026
+ interface ZodExactOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodExactOptionalInternals<T>>, $ZodExactOptional<T> {
2027
+ "~standard": ZodStandardSchemaWithJSON<this>;
2028
+ unwrap(): T;
2029
+ }
2030
+ declare const ZodExactOptional: $constructor<ZodExactOptional>;
2031
+ interface ZodNullable<T extends SomeType = $ZodType> extends _ZodType<$ZodNullableInternals<T>>, $ZodNullable<T> {
2032
+ "~standard": ZodStandardSchemaWithJSON<this>;
2033
+ unwrap(): T;
2034
+ }
2035
+ declare const ZodNullable: $constructor<ZodNullable>;
2036
+ interface ZodDefault<T extends SomeType = $ZodType> extends _ZodType<$ZodDefaultInternals<T>>, $ZodDefault<T> {
2037
+ "~standard": ZodStandardSchemaWithJSON<this>;
2038
+ unwrap(): T;
2039
+ /** @deprecated Use `.unwrap()` instead. */
2040
+ removeDefault(): T;
2041
+ }
2042
+ declare const ZodDefault: $constructor<ZodDefault>;
2043
+ interface ZodPrefault<T extends SomeType = $ZodType> extends _ZodType<$ZodPrefaultInternals<T>>, $ZodPrefault<T> {
2044
+ "~standard": ZodStandardSchemaWithJSON<this>;
2045
+ unwrap(): T;
2046
+ }
2047
+ declare const ZodPrefault: $constructor<ZodPrefault>;
2048
+ interface ZodNonOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodNonOptionalInternals<T>>, $ZodNonOptional<T> {
2049
+ "~standard": ZodStandardSchemaWithJSON<this>;
2050
+ unwrap(): T;
2051
+ }
2052
+ declare const ZodNonOptional: $constructor<ZodNonOptional>;
2053
+ interface ZodCatch<T extends SomeType = $ZodType> extends _ZodType<$ZodCatchInternals<T>>, $ZodCatch<T> {
2054
+ "~standard": ZodStandardSchemaWithJSON<this>;
2055
+ unwrap(): T;
2056
+ /** @deprecated Use `.unwrap()` instead. */
2057
+ removeCatch(): T;
2058
+ }
2059
+ declare const ZodCatch: $constructor<ZodCatch>;
2060
+ interface ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A, B>>, $ZodPipe<A, B> {
2061
+ "~standard": ZodStandardSchemaWithJSON<this>;
2062
+ in: A;
2063
+ out: B;
2064
+ }
2065
+ declare const ZodPipe: $constructor<ZodPipe>;
2066
+ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadonlyInternals<T>>, $ZodReadonly<T> {
2067
+ "~standard": ZodStandardSchemaWithJSON<this>;
2068
+ unwrap(): T;
2069
+ }
2070
+ declare const ZodReadonly: $constructor<ZodReadonly>;
2071
+ //#endregion
14
2072
  //#region src/utils/config.d.ts
15
2073
  declare class Config<T extends StandardSchemaV1$2> {
16
2074
  private readonly schema;
@@ -26,7 +2084,12 @@ declare class Config<T extends StandardSchemaV1$2> {
26
2084
  }
27
2085
  //#endregion
28
2086
  //#region src/configs/DatabaseConfig.d.ts
29
- declare const DatabaseConfig: Config<any>;
2087
+ declare const DatabaseConfig: Config<ZodObject<{
2088
+ uri: ZodDefault<ZodString>;
2089
+ idleTimeout: ZodDefault<ZodNumber>;
2090
+ connectionTimeout: ZodDefault<ZodNumber>;
2091
+ maxPoolSize: ZodDefault<ZodNumber>;
2092
+ }, $strip>>;
30
2093
  //#endregion
31
2094
  //#region src/contracts/Auth.d.ts
32
2095
  declare abstract class Auth {
@@ -137,7 +2200,7 @@ type Prepare = {
137
2200
  interface IContext {
138
2201
  db: Database;
139
2202
  Q: Query;
140
- gen: Generator;
2203
+ gen: Generator$1;
141
2204
  logger: Logger;
142
2205
  prepare: Prepare;
143
2206
  execute: Executor;
@@ -163,7 +2226,7 @@ type IMiddleware = (ctx: {
163
2226
  }) => any;
164
2227
  //#endregion
165
2228
  //#region src/services/BunGenerator.d.ts
166
- declare class BunGenerator extends Generator$1 {
2229
+ declare class BunGenerator extends Generator$2 {
167
2230
  get id(): string;
168
2231
  code(length: number): string;
169
2232
  }
@@ -207,22 +2270,22 @@ declare class DizzleDatabase extends Database {
207
2270
  //#endregion
208
2271
  //#region src/utils/SERVER_ERROR.d.ts
209
2272
  declare namespace SERVER_ERROR {
210
- function RESOURCE_ID_NOT_FOUND(resource: string, id: string): any;
211
- function RESOURCE_NOT_FOUND(resource: string): any;
212
- function BAD_REQUEST(type: string, args: Record<string, any>): any;
213
- function RESOURCE_ID_ALREADY_EXISTS(resource: string, id: string): any;
214
- function VALIDATION(...issues: IThrowable[]): any;
215
- function SCHEMA_VALIDATION(issues: readonly StandardSchemaV1$2.Issue[]): any;
216
- function UNEXPECTED(type: string, args: Record<string, any>): any;
217
- const FORWARD: any;
218
- function GET_ENTITY_NOT_FOUND<T extends Table>(entity: T, id: string): any;
2273
+ function RESOURCE_ID_NOT_FOUND(resource: string, id: string): IThrowable;
2274
+ function RESOURCE_NOT_FOUND(resource: string): IThrowable;
2275
+ function BAD_REQUEST(type: string, args: Record<string, any>): IThrowable;
2276
+ function RESOURCE_ID_ALREADY_EXISTS(resource: string, id: string): IThrowable;
2277
+ function VALIDATION(...issues: IThrowable[]): IThrowable;
2278
+ function SCHEMA_VALIDATION(issues: readonly StandardSchemaV1$2.Issue[]): IThrowable;
2279
+ function UNEXPECTED(type: string, args: Record<string, any>): IThrowable;
2280
+ const FORWARD: typeof Throwable.forward;
2281
+ function GET_ENTITY_NOT_FOUND<T extends Table>(entity: T, id: string): IThrowable;
219
2282
  }
220
2283
  //#endregion
221
2284
  //#region src/context.d.ts
222
2285
  declare class Context implements IContext {
223
2286
  private readonly container;
224
2287
  readonly db: Database;
225
- readonly gen: Generator;
2288
+ readonly gen: Generator$1;
226
2289
  readonly logger: Logger;
227
2290
  constructor(container: IContainer, db: Database);
228
2291
  static create(contextData?: ContextData): Promise<Context>;
@@ -245,19 +2308,19 @@ declare class Command<IN extends StandardSchemaV1, OUT extends StandardSchemaV1>
245
2308
  readonly "~type": "kunk:command";
246
2309
  private constructor();
247
2310
  private static create;
248
- static PUBLIC: <IN_1 extends StandardSchemaV1 = StandardSchemaV1, OUT_1 extends StandardSchemaV1 = StandardSchemaV1>(setup: {
2311
+ static PUBLIC: <IN_1 extends StandardSchemaV1 = StandardSchemaV1<unknown, unknown>, OUT_1 extends StandardSchemaV1 = StandardSchemaV1<unknown, unknown>>(setup: {
249
2312
  name: string;
250
2313
  input: IN_1;
251
2314
  output: OUT_1;
252
2315
  middlewares?: IMiddleware[];
253
2316
  }, handler: ICommandHandler<IN_1, OUT_1>) => Command<IN_1, OUT_1>;
254
- static PROTECTED: <IN_1 extends StandardSchemaV1 = StandardSchemaV1, OUT_1 extends StandardSchemaV1 = StandardSchemaV1>(setup: {
2317
+ static PROTECTED: <IN_1 extends StandardSchemaV1 = StandardSchemaV1<unknown, unknown>, OUT_1 extends StandardSchemaV1 = StandardSchemaV1<unknown, unknown>>(setup: {
255
2318
  name: string;
256
2319
  input: IN_1;
257
2320
  output: OUT_1;
258
2321
  middlewares?: IMiddleware[];
259
2322
  }, handler: ICommandHandler<IN_1, OUT_1>) => Command<IN_1, OUT_1>;
260
- static PRIVATE: <IN_1 extends StandardSchemaV1 = StandardSchemaV1, OUT_1 extends StandardSchemaV1 = StandardSchemaV1>(setup: {
2323
+ static PRIVATE: <IN_1 extends StandardSchemaV1 = StandardSchemaV1<unknown, unknown>, OUT_1 extends StandardSchemaV1 = StandardSchemaV1<unknown, unknown>>(setup: {
261
2324
  name: string;
262
2325
  input: IN_1;
263
2326
  output: OUT_1;
@@ -333,11 +2396,15 @@ declare function route<K extends string, CMD extends ICommand<any, any>>(path: K
333
2396
  body: elysia_types0.IntersectIfObject<elysia.UnwrapBodySchema<CMD["input"], {}>, unknown>;
334
2397
  params: elysia_types0.IsNever<keyof elysia_types0.IntersectIfObject<elysia.ResolvePath<elysia_types0.JoinPath<"", K>>, unknown>> extends true ? elysia.ResolvePath<K> : elysia_types0.IntersectIfObject<elysia.ResolvePath<elysia_types0.JoinPath<"", K>>, unknown>;
335
2398
  query: unknown;
336
- headers: any;
2399
+ headers: {
2400
+ "x-tenant-id"?: string | undefined;
2401
+ };
337
2402
  response: elysia.ComposeElysiaResponse<elysia_types0.IntersectIfObjectSchema<elysia.UnwrapRoute<{
338
2403
  body: CMD["input"];
339
2404
  response: CMD["output"];
340
- headers: any;
2405
+ headers: ZodObject<{
2406
+ "x-tenant-id": ZodOptional<ZodDefault<ZodString>>;
2407
+ }, $strip>;
341
2408
  detail: {
342
2409
  summary: string;
343
2410
  };
@@ -349,7 +2416,9 @@ declare function route<K extends string, CMD extends ICommand<any, any>>(path: K
349
2416
  body: elysia_types0.IntersectIfObject<elysia.UnwrapBodySchema<CMD["input"], {}>, unknown> extends infer T_1 ? T_1 extends elysia_types0.IntersectIfObject<elysia.UnwrapBodySchema<CMD["input"], {}>, unknown> ? T_1 extends object ? { [K_2 in keyof T_1]: T_1[K_2] } : T_1 : never : never;
350
2417
  query: Record<string, string>;
351
2418
  params: undefined extends elysia_types0.IntersectIfObject<elysia.ResolvePath<elysia_types0.JoinPath<"", K>>, unknown> ? Record<string, string> : elysia_types0.IntersectIfObject<elysia.ResolvePath<elysia_types0.JoinPath<"", K>>, unknown> extends infer T_2 ? T_2 extends elysia_types0.IntersectIfObject<elysia.ResolvePath<elysia_types0.JoinPath<"", K>>, unknown> ? T_2 extends object ? { [K_3 in keyof T_2]: T_2[K_3] } : T_2 : never : never;
352
- headers: any;
2419
+ headers: {
2420
+ "x-tenant-id"?: string | undefined;
2421
+ };
353
2422
  cookie: Record<string, elysia.Cookie<unknown>>;
354
2423
  server: elysia_universal_server0.Server | null;
355
2424
  redirect: elysia.redirect;
@@ -514,7 +2583,7 @@ declare function route<K extends string, CMD extends ICommand<any, any>>(path: K
514
2583
  //#endregion
515
2584
  //#region src/registry.d.ts
516
2585
  declare const registry: Container;
517
- declare function gen(): unknown;
2586
+ declare function gen(): Generator$2;
518
2587
  declare const Q: typeof DrizzleQuery;
519
2588
  //#endregion
520
- export { Auth, BunGenerator, Command, Config, Context, ContextData, Database, DatabaseConfig, DizzleDatabase, DrizzleQuery, Generator, type I, IApplication, type ICommand, ICommandHandler, type IContainer, IContext, IContextCommand, type IError, IMiddleware, type IService, Logger, PinoLogger, Q, Query, SERVER_ERROR, Server, type StandardSchemaV1, Validator, gen, middleware, registry, route };
2589
+ export { Auth, BunGenerator, Command, Config, Context, ContextData, Database, DatabaseConfig, DizzleDatabase, DrizzleQuery, Generator$1 as Generator, type I, IApplication, type ICommand, ICommandHandler, type IContainer, IContext, IContextCommand, type IError, IMiddleware, type IService, Logger, PinoLogger, Q, Query, SERVER_ERROR, Server, type StandardSchemaV1, Validator, gen, middleware, registry, route };