@statelyai/sdk 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2843 @@
1
+ import { UnknownMachineConfig } from "xstate";
2
+
3
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema.d.cts
4
+ type _JSONSchema = boolean | JSONSchema;
5
+ type JSONSchema = {
6
+ [k: string]: unknown;
7
+ $schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
8
+ $id?: string;
9
+ $anchor?: string;
10
+ $ref?: string;
11
+ $dynamicRef?: string;
12
+ $dynamicAnchor?: string;
13
+ $vocabulary?: Record<string, boolean>;
14
+ $comment?: string;
15
+ $defs?: Record<string, JSONSchema>;
16
+ type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
17
+ additionalItems?: _JSONSchema;
18
+ unevaluatedItems?: _JSONSchema;
19
+ prefixItems?: _JSONSchema[];
20
+ items?: _JSONSchema | _JSONSchema[];
21
+ contains?: _JSONSchema;
22
+ additionalProperties?: _JSONSchema;
23
+ unevaluatedProperties?: _JSONSchema;
24
+ properties?: Record<string, _JSONSchema>;
25
+ patternProperties?: Record<string, _JSONSchema>;
26
+ dependentSchemas?: Record<string, _JSONSchema>;
27
+ propertyNames?: _JSONSchema;
28
+ if?: _JSONSchema;
29
+ then?: _JSONSchema;
30
+ else?: _JSONSchema;
31
+ allOf?: JSONSchema[];
32
+ anyOf?: JSONSchema[];
33
+ oneOf?: JSONSchema[];
34
+ not?: _JSONSchema;
35
+ multipleOf?: number;
36
+ maximum?: number;
37
+ exclusiveMaximum?: number | boolean;
38
+ minimum?: number;
39
+ exclusiveMinimum?: number | boolean;
40
+ maxLength?: number;
41
+ minLength?: number;
42
+ pattern?: string;
43
+ maxItems?: number;
44
+ minItems?: number;
45
+ uniqueItems?: boolean;
46
+ maxContains?: number;
47
+ minContains?: number;
48
+ maxProperties?: number;
49
+ minProperties?: number;
50
+ required?: string[];
51
+ dependentRequired?: Record<string, string[]>;
52
+ enum?: Array<string | number | boolean | null>;
53
+ const?: string | number | boolean | null;
54
+ id?: string;
55
+ title?: string;
56
+ description?: string;
57
+ default?: unknown;
58
+ deprecated?: boolean;
59
+ readOnly?: boolean;
60
+ writeOnly?: boolean;
61
+ nullable?: boolean;
62
+ examples?: unknown[];
63
+ format?: string;
64
+ contentMediaType?: string;
65
+ contentEncoding?: string;
66
+ contentSchema?: JSONSchema;
67
+ _prefault?: unknown;
68
+ };
69
+ type BaseSchema = JSONSchema;
70
+ //#endregion
71
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/standard-schema.d.cts
72
+ /** The Standard interface. */
73
+ interface StandardTypedV1<Input = unknown, Output = Input> {
74
+ /** The Standard properties. */
75
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
76
+ }
77
+ declare namespace StandardTypedV1 {
78
+ /** The Standard properties interface. */
79
+ interface Props<Input = unknown, Output = Input> {
80
+ /** The version number of the standard. */
81
+ readonly version: 1;
82
+ /** The vendor name of the schema library. */
83
+ readonly vendor: string;
84
+ /** Inferred types associated with the schema. */
85
+ readonly types?: Types<Input, Output> | undefined;
86
+ }
87
+ /** The Standard types interface. */
88
+ interface Types<Input = unknown, Output = Input> {
89
+ /** The input type of the schema. */
90
+ readonly input: Input;
91
+ /** The output type of the schema. */
92
+ readonly output: Output;
93
+ }
94
+ /** Infers the input type of a Standard. */
95
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
96
+ /** Infers the output type of a Standard. */
97
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
98
+ }
99
+ /** The Standard Schema interface. */
100
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
101
+ /** The Standard Schema properties. */
102
+ readonly "~standard": StandardSchemaV1.Props<Input, Output>;
103
+ }
104
+ declare namespace StandardSchemaV1 {
105
+ /** The Standard Schema properties interface. */
106
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
107
+ /** Validates unknown input values. */
108
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
109
+ }
110
+ /** The result interface of the validate function. */
111
+ type Result<Output> = SuccessResult<Output> | FailureResult;
112
+ /** The result interface if validation succeeds. */
113
+ interface SuccessResult<Output> {
114
+ /** The typed output value. */
115
+ readonly value: Output;
116
+ /** The absence of issues indicates success. */
117
+ readonly issues?: undefined;
118
+ }
119
+ interface Options {
120
+ /** Implicit support for additional vendor-specific parameters, if needed. */
121
+ readonly libraryOptions?: Record<string, unknown> | undefined;
122
+ }
123
+ /** The result interface if validation fails. */
124
+ interface FailureResult {
125
+ /** The issues of failed validation. */
126
+ readonly issues: ReadonlyArray<Issue>;
127
+ }
128
+ /** The issue interface of the failure output. */
129
+ interface Issue {
130
+ /** The error message of the issue. */
131
+ readonly message: string;
132
+ /** The path of the issue, if any. */
133
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
134
+ }
135
+ /** The path segment interface of the issue. */
136
+ interface PathSegment {
137
+ /** The key representing a path segment. */
138
+ readonly key: PropertyKey;
139
+ }
140
+ /** The Standard types interface. */
141
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
142
+ /** Infers the input type of a Standard. */
143
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
144
+ /** Infers the output type of a Standard. */
145
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
146
+ }
147
+ /** The Standard JSON Schema interface. */
148
+ interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
149
+ /** The Standard JSON Schema properties. */
150
+ readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
151
+ }
152
+ declare namespace StandardJSONSchemaV1 {
153
+ /** The Standard JSON Schema properties interface. */
154
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
155
+ /** Methods for generating the input/output JSON Schema. */
156
+ readonly jsonSchema: Converter;
157
+ }
158
+ /** The Standard JSON Schema converter interface. */
159
+ interface Converter {
160
+ /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
161
+ readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
162
+ /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
163
+ readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
164
+ }
165
+ /** The target version of the generated JSON Schema.
166
+ *
167
+ * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use.
168
+ *
169
+ * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
170
+ *
171
+ * All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
172
+ */
173
+ type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
174
+ /** The options for the input/output methods. */
175
+ interface Options {
176
+ /** 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. */
177
+ readonly target: Target;
178
+ /** Implicit support for additional vendor-specific parameters, if needed. */
179
+ readonly libraryOptions?: Record<string, unknown> | undefined;
180
+ }
181
+ /** The Standard types interface. */
182
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
183
+ /** Infers the input type of a Standard. */
184
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
185
+ /** Infers the output type of a Standard. */
186
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
187
+ }
188
+ interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
189
+ //#endregion
190
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.d.cts
191
+ declare const $output: unique symbol;
192
+ type $output = typeof $output;
193
+ declare const $input: unique symbol;
194
+ type $input = typeof $input;
195
+ 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;
196
+ type MetadataType = object | undefined;
197
+ declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
198
+ _meta: Meta;
199
+ _schema: Schema;
200
+ _map: WeakMap<Schema, $replace<Meta, Schema>>;
201
+ _idmap: Map<string, Schema>;
202
+ add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
203
+ clear(): this;
204
+ remove(schema: Schema): this;
205
+ get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
206
+ has(schema: Schema): boolean;
207
+ }
208
+ interface JSONSchemaMeta {
209
+ id?: string | undefined;
210
+ title?: string | undefined;
211
+ description?: string | undefined;
212
+ deprecated?: boolean | undefined;
213
+ [k: string]: unknown;
214
+ }
215
+ interface GlobalMeta extends JSONSchemaMeta {}
216
+ //#endregion
217
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.d.cts
218
+ type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
219
+ interface JSONSchemaGeneratorParams {
220
+ processors: Record<string, Processor>;
221
+ /** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
222
+ * @default globalRegistry */
223
+ metadata?: $ZodRegistry<Record<string, any>>;
224
+ /** The JSON Schema version to target.
225
+ * - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
226
+ * - `"draft-07"` — JSON Schema Draft 7
227
+ * - `"draft-04"` — JSON Schema Draft 4
228
+ * - `"openapi-3.0"` — OpenAPI 3.0 Schema Object */
229
+ target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
230
+ /** How to handle unrepresentable types.
231
+ * - `"throw"` — Default. Unrepresentable types throw an error
232
+ * - `"any"` — Unrepresentable types become `{}` */
233
+ unrepresentable?: "throw" | "any";
234
+ /** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
235
+ override?: (ctx: {
236
+ zodSchema: $ZodTypes;
237
+ jsonSchema: BaseSchema;
238
+ path: (string | number)[];
239
+ }) => void;
240
+ /** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, defaults, coerced primitives, etc.
241
+ * - `"output"` — Default. Convert the output schema.
242
+ * - `"input"` — Convert the input schema. */
243
+ io?: "input" | "output";
244
+ cycles?: "ref" | "throw";
245
+ reused?: "ref" | "inline";
246
+ external?: {
247
+ registry: $ZodRegistry<{
248
+ id?: string | undefined;
249
+ }>;
250
+ uri?: ((id: string) => string) | undefined;
251
+ defs: Record<string, BaseSchema>;
252
+ } | undefined;
253
+ }
254
+ /**
255
+ * Parameters for the toJSONSchema function.
256
+ */
257
+ type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
258
+ interface ProcessParams {
259
+ schemaPath: $ZodType[];
260
+ path: (string | number)[];
261
+ }
262
+ interface Seen {
263
+ /** JSON Schema result for this Zod schema */
264
+ schema: BaseSchema;
265
+ /** A cached version of the schema that doesn't get overwritten during ref resolution */
266
+ def?: BaseSchema;
267
+ defId?: string | undefined;
268
+ /** Number of times this schema was encountered during traversal */
269
+ count: number;
270
+ /** Cycle path */
271
+ cycle?: (string | number)[] | undefined;
272
+ isParent?: boolean | undefined;
273
+ /** Schema to inherit JSON Schema properties from (set by processor for wrappers) */
274
+ ref?: $ZodType | null;
275
+ /** JSON Schema property path for this schema */
276
+ path?: (string | number)[] | undefined;
277
+ }
278
+ interface ToJSONSchemaContext {
279
+ processors: Record<string, Processor>;
280
+ metadataRegistry: $ZodRegistry<Record<string, any>>;
281
+ target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
282
+ unrepresentable: "throw" | "any";
283
+ override: (ctx: {
284
+ zodSchema: $ZodType;
285
+ jsonSchema: BaseSchema;
286
+ path: (string | number)[];
287
+ }) => void;
288
+ io: "input" | "output";
289
+ counter: number;
290
+ seen: Map<$ZodType, Seen>;
291
+ cycles: "ref" | "throw";
292
+ reused: "ref" | "inline";
293
+ external?: {
294
+ registry: $ZodRegistry<{
295
+ id?: string | undefined;
296
+ }>;
297
+ uri?: ((id: string) => string) | undefined;
298
+ defs: Record<string, BaseSchema>;
299
+ } | undefined;
300
+ }
301
+ type ZodStandardSchemaWithJSON$1<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
302
+ interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
303
+ "~standard": ZodStandardSchemaWithJSON$1<T>;
304
+ }
305
+ //#endregion
306
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.d.cts
307
+ type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
308
+ 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 & {});
309
+ type IsAny<T> = 0 extends 1 & T ? true : false;
310
+ type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
311
+ type MakePartial<T, K extends keyof T> = Omit$1<T, K> & InexactPartial<Pick<T, K>>;
312
+ type NoUndefined<T> = T extends undefined ? never : T;
313
+ type LoosePartial<T extends object> = InexactPartial<T> & {
314
+ [k: string]: unknown;
315
+ };
316
+ type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
317
+ type Writeable<T> = { -readonly [P in keyof T]: T[P] } & {};
318
+ type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined };
319
+ type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
320
+ readonly [Symbol.toStringTag]: string;
321
+ } | Date | Error | Generator | Promise<unknown> | RegExp;
322
+ 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>;
323
+ type SomeObject = Record<PropertyKey, any>;
324
+ type Identity<T> = T;
325
+ type Flatten<T> = Identity<{ [k in keyof T]: T[k] }>;
326
+ type Prettify<T> = { [K in keyof T]: T[K] } & {};
327
+ 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] }>;
328
+ type TupleItems = ReadonlyArray<SomeType>;
329
+ type AnyFunc = (...args: any[]) => any;
330
+ type MaybeAsync<T> = T | Promise<T>;
331
+ type EnumValue = string | number;
332
+ type EnumLike = Readonly<Record<string, EnumValue>>;
333
+ type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k }>;
334
+ type Literal = string | number | bigint | boolean | null | undefined;
335
+ type Primitive = string | number | symbol | bigint | boolean | null | undefined;
336
+ type HasLength = {
337
+ length: number;
338
+ };
339
+ type Numeric = number | bigint | Date;
340
+ type PropValues = Record<string, Set<Primitive>>;
341
+ type PrimitiveSet = Set<Primitive>;
342
+ type EmptyToNever<T> = keyof T extends never ? never : T;
343
+ declare abstract class Class {
344
+ constructor(..._args: any[]);
345
+ }
346
+ //#endregion
347
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.d.cts
348
+ declare const version: {
349
+ readonly major: 4;
350
+ readonly minor: 4;
351
+ readonly patch: number;
352
+ };
353
+ //#endregion
354
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.d.cts
355
+ interface ParseContext<T extends $ZodIssueBase = never> {
356
+ /** Customize error messages. */
357
+ readonly error?: $ZodErrorMap<T>;
358
+ /** Include the `input` field in issue objects. Default `false`. */
359
+ readonly reportInput?: boolean;
360
+ /** Skip eval-based fast path. Default `false`. */
361
+ readonly jitless?: boolean;
362
+ }
363
+ /** @internal */
364
+ interface ParseContextInternal<T extends $ZodIssueBase = never> extends ParseContext<T> {
365
+ readonly async?: boolean | undefined;
366
+ readonly direction?: "forward" | "backward";
367
+ readonly skipChecks?: boolean;
368
+ }
369
+ interface ParsePayload<T = unknown> {
370
+ value: T;
371
+ issues: $ZodRawIssue[];
372
+ /** A way to mark a whole payload as aborted. Used in codecs/pipes. */
373
+ aborted?: boolean;
374
+ /** @internal Marks a value as a fallback that an outer wrapper (e.g.
375
+ * $ZodOptional) may override with its own interpretation when input was
376
+ * undefined. Set by $ZodCatch when catchValue substitutes and by every
377
+ * $ZodTransform invocation. */
378
+ fallback?: boolean | undefined;
379
+ }
380
+ type CheckFn<T> = (input: ParsePayload<T>) => MaybeAsync<void>;
381
+ interface $ZodTypeDef {
382
+ 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";
383
+ error?: $ZodErrorMap<never> | undefined;
384
+ checks?: $ZodCheck<never>[];
385
+ }
386
+ interface _$ZodTypeInternals {
387
+ /** The `@zod/core` version of this schema */
388
+ version: typeof version;
389
+ /** Schema definition. */
390
+ def: $ZodTypeDef;
391
+ /** @internal Randomly generated ID for this schema. */
392
+ /** @internal List of deferred initializers. */
393
+ deferred: AnyFunc[] | undefined;
394
+ /** @internal Parses input and runs all checks (refinements). */
395
+ run(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
396
+ /** @internal Parses input, doesn't run checks. */
397
+ parse(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
398
+ /** @internal Stores identifiers for the set of traits implemented by this schema. */
399
+ traits: Set<string>;
400
+ /** @internal Indicates that a schema output type should be considered optional inside objects.
401
+ * @default Required
402
+ */
403
+ /** @internal */
404
+ optin?: "optional" | undefined;
405
+ /** @internal */
406
+ optout?: "optional" | undefined;
407
+ /** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
408
+ *
409
+ * Defined on: enum, const, literal, null, undefined
410
+ * Passthrough: optional, nullable, branded, default, catch, pipe
411
+ * Todo: unions?
412
+ */
413
+ values?: PrimitiveSet | undefined;
414
+ /** Default value bubbled up from */
415
+ /** @internal A set of literal discriminators used for the fast path in discriminated unions. */
416
+ propValues?: PropValues | undefined;
417
+ /** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
418
+ pattern: RegExp | undefined;
419
+ /** @internal The constructor function of this schema. */
420
+ constr: new (def: any) => $ZodType;
421
+ /** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
422
+ bag: Record<string, unknown>;
423
+ /** @internal The set of issues this schema might throw during type checking. */
424
+ isst: $ZodIssueBase;
425
+ /** @internal Subject to change, not a public API. */
426
+ processJSONSchema?: ((ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void) | undefined;
427
+ /** An optional method used to override `toJSONSchema` logic. */
428
+ toJSONSchema?: () => unknown;
429
+ /** @internal The parent of this schema. Only set during certain clone operations. */
430
+ parent?: $ZodType | undefined;
431
+ }
432
+ /** @internal */
433
+ interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
434
+ /** @internal The inferred output type */
435
+ output: O;
436
+ /** @internal The inferred input type */
437
+ input: I;
438
+ }
439
+ type $ZodStandardSchema<T> = StandardSchemaV1.Props<input<T>, output<T>>;
440
+ type SomeType = {
441
+ _zod: _$ZodTypeInternals;
442
+ };
443
+ interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
444
+ _zod: Internals;
445
+ "~standard": $ZodStandardSchema<this>;
446
+ }
447
+ interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T["output"], T["input"], T> {}
448
+ declare const $ZodType: $constructor<$ZodType>;
449
+ interface $ZodStringDef extends $ZodTypeDef {
450
+ type: "string";
451
+ coerce?: boolean;
452
+ checks?: $ZodCheck<string>[];
453
+ }
454
+ interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
455
+ def: $ZodStringDef;
456
+ /** @deprecated Internal API, use with caution (not deprecated) */
457
+ pattern: RegExp;
458
+ /** @deprecated Internal API, use with caution (not deprecated) */
459
+ isst: $ZodIssueInvalidType;
460
+ bag: LoosePartial<{
461
+ minimum: number;
462
+ maximum: number;
463
+ patterns: Set<RegExp>;
464
+ format: string;
465
+ contentEncoding: string;
466
+ }>;
467
+ }
468
+ interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {}
469
+ declare const $ZodString: $constructor<$ZodString>;
470
+ interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, $ZodCheckStringFormatDef<Format> {}
471
+ interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, $ZodCheckStringFormatInternals {
472
+ def: $ZodStringFormatDef<Format>;
473
+ }
474
+ interface $ZodStringFormat<Format extends string = string> extends $ZodType {
475
+ _zod: $ZodStringFormatInternals<Format>;
476
+ }
477
+ declare const $ZodStringFormat: $constructor<$ZodStringFormat>;
478
+ interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {}
479
+ interface $ZodGUID extends $ZodType {
480
+ _zod: $ZodGUIDInternals;
481
+ }
482
+ declare const $ZodGUID: $constructor<$ZodGUID>;
483
+ interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
484
+ version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
485
+ }
486
+ interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
487
+ def: $ZodUUIDDef;
488
+ }
489
+ interface $ZodUUID extends $ZodType {
490
+ _zod: $ZodUUIDInternals;
491
+ }
492
+ declare const $ZodUUID: $constructor<$ZodUUID>;
493
+ interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {}
494
+ interface $ZodEmail extends $ZodType {
495
+ _zod: $ZodEmailInternals;
496
+ }
497
+ declare const $ZodEmail: $constructor<$ZodEmail>;
498
+ interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
499
+ hostname?: RegExp | undefined;
500
+ protocol?: RegExp | undefined;
501
+ normalize?: boolean | undefined;
502
+ }
503
+ interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
504
+ def: $ZodURLDef;
505
+ }
506
+ interface $ZodURL extends $ZodType {
507
+ _zod: $ZodURLInternals;
508
+ }
509
+ declare const $ZodURL: $constructor<$ZodURL>;
510
+ interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {}
511
+ interface $ZodEmoji extends $ZodType {
512
+ _zod: $ZodEmojiInternals;
513
+ }
514
+ declare const $ZodEmoji: $constructor<$ZodEmoji>;
515
+ interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {}
516
+ interface $ZodNanoID extends $ZodType {
517
+ _zod: $ZodNanoIDInternals;
518
+ }
519
+ declare const $ZodNanoID: $constructor<$ZodNanoID>;
520
+ /**
521
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
522
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
523
+ * See https://github.com/paralleldrive/cuid.
524
+ */
525
+ interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
526
+ /**
527
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
528
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
529
+ * See https://github.com/paralleldrive/cuid.
530
+ */
531
+ interface $ZodCUID extends $ZodType {
532
+ _zod: $ZodCUIDInternals;
533
+ }
534
+ /**
535
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
536
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
537
+ * See https://github.com/paralleldrive/cuid.
538
+ */
539
+ declare const $ZodCUID: $constructor<$ZodCUID>;
540
+ interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
541
+ interface $ZodCUID2 extends $ZodType {
542
+ _zod: $ZodCUID2Internals;
543
+ }
544
+ declare const $ZodCUID2: $constructor<$ZodCUID2>;
545
+ interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {}
546
+ interface $ZodULID extends $ZodType {
547
+ _zod: $ZodULIDInternals;
548
+ }
549
+ declare const $ZodULID: $constructor<$ZodULID>;
550
+ interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {}
551
+ interface $ZodXID extends $ZodType {
552
+ _zod: $ZodXIDInternals;
553
+ }
554
+ declare const $ZodXID: $constructor<$ZodXID>;
555
+ interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {}
556
+ interface $ZodKSUID extends $ZodType {
557
+ _zod: $ZodKSUIDInternals;
558
+ }
559
+ declare const $ZodKSUID: $constructor<$ZodKSUID>;
560
+ interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
561
+ precision: number | null;
562
+ offset: boolean;
563
+ local: boolean;
564
+ }
565
+ interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
566
+ def: $ZodISODateTimeDef;
567
+ }
568
+ interface $ZodISODateTime extends $ZodType {
569
+ _zod: $ZodISODateTimeInternals;
570
+ }
571
+ declare const $ZodISODateTime: $constructor<$ZodISODateTime>;
572
+ interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {}
573
+ interface $ZodISODate extends $ZodType {
574
+ _zod: $ZodISODateInternals;
575
+ }
576
+ declare const $ZodISODate: $constructor<$ZodISODate>;
577
+ interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
578
+ precision?: number | null;
579
+ }
580
+ interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
581
+ def: $ZodISOTimeDef;
582
+ }
583
+ interface $ZodISOTime extends $ZodType {
584
+ _zod: $ZodISOTimeInternals;
585
+ }
586
+ declare const $ZodISOTime: $constructor<$ZodISOTime>;
587
+ interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {}
588
+ interface $ZodISODuration extends $ZodType {
589
+ _zod: $ZodISODurationInternals;
590
+ }
591
+ declare const $ZodISODuration: $constructor<$ZodISODuration>;
592
+ interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
593
+ version?: "v4";
594
+ }
595
+ interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
596
+ def: $ZodIPv4Def;
597
+ }
598
+ interface $ZodIPv4 extends $ZodType {
599
+ _zod: $ZodIPv4Internals;
600
+ }
601
+ declare const $ZodIPv4: $constructor<$ZodIPv4>;
602
+ interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
603
+ version?: "v6";
604
+ }
605
+ interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
606
+ def: $ZodIPv6Def;
607
+ }
608
+ interface $ZodIPv6 extends $ZodType {
609
+ _zod: $ZodIPv6Internals;
610
+ }
611
+ declare const $ZodIPv6: $constructor<$ZodIPv6>;
612
+ interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
613
+ version?: "v4";
614
+ }
615
+ interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
616
+ def: $ZodCIDRv4Def;
617
+ }
618
+ interface $ZodCIDRv4 extends $ZodType {
619
+ _zod: $ZodCIDRv4Internals;
620
+ }
621
+ declare const $ZodCIDRv4: $constructor<$ZodCIDRv4>;
622
+ interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
623
+ version?: "v6";
624
+ }
625
+ interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
626
+ def: $ZodCIDRv6Def;
627
+ }
628
+ interface $ZodCIDRv6 extends $ZodType {
629
+ _zod: $ZodCIDRv6Internals;
630
+ }
631
+ declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>;
632
+ interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {}
633
+ interface $ZodBase64 extends $ZodType {
634
+ _zod: $ZodBase64Internals;
635
+ }
636
+ declare const $ZodBase64: $constructor<$ZodBase64>;
637
+ interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {}
638
+ interface $ZodBase64URL extends $ZodType {
639
+ _zod: $ZodBase64URLInternals;
640
+ }
641
+ declare const $ZodBase64URL: $constructor<$ZodBase64URL>;
642
+ interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {}
643
+ interface $ZodE164 extends $ZodType {
644
+ _zod: $ZodE164Internals;
645
+ }
646
+ declare const $ZodE164: $constructor<$ZodE164>;
647
+ interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
648
+ alg?: JWTAlgorithm | undefined;
649
+ }
650
+ interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
651
+ def: $ZodJWTDef;
652
+ }
653
+ interface $ZodJWT extends $ZodType {
654
+ _zod: $ZodJWTInternals;
655
+ }
656
+ declare const $ZodJWT: $constructor<$ZodJWT>;
657
+ interface $ZodNumberDef extends $ZodTypeDef {
658
+ type: "number";
659
+ coerce?: boolean;
660
+ }
661
+ interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
662
+ def: $ZodNumberDef;
663
+ /** @deprecated Internal API, use with caution (not deprecated) */
664
+ pattern: RegExp;
665
+ /** @deprecated Internal API, use with caution (not deprecated) */
666
+ isst: $ZodIssueInvalidType;
667
+ bag: LoosePartial<{
668
+ minimum: number;
669
+ maximum: number;
670
+ exclusiveMinimum: number;
671
+ exclusiveMaximum: number;
672
+ format: string;
673
+ pattern: RegExp;
674
+ }>;
675
+ }
676
+ interface $ZodNumber<Input = unknown> extends $ZodType {
677
+ _zod: $ZodNumberInternals<Input>;
678
+ }
679
+ declare const $ZodNumber: $constructor<$ZodNumber>;
680
+ interface $ZodBooleanDef extends $ZodTypeDef {
681
+ type: "boolean";
682
+ coerce?: boolean;
683
+ checks?: $ZodCheck<boolean>[];
684
+ }
685
+ interface $ZodBooleanInternals<T = unknown> extends $ZodTypeInternals<boolean, T> {
686
+ pattern: RegExp;
687
+ def: $ZodBooleanDef;
688
+ isst: $ZodIssueInvalidType;
689
+ }
690
+ interface $ZodBoolean<T = unknown> extends $ZodType {
691
+ _zod: $ZodBooleanInternals<T>;
692
+ }
693
+ declare const $ZodBoolean: $constructor<$ZodBoolean>;
694
+ interface $ZodBigIntDef extends $ZodTypeDef {
695
+ type: "bigint";
696
+ coerce?: boolean;
697
+ }
698
+ interface $ZodBigIntInternals<T = unknown> extends $ZodTypeInternals<bigint, T> {
699
+ pattern: RegExp;
700
+ /** @internal Internal API, use with caution */
701
+ def: $ZodBigIntDef;
702
+ isst: $ZodIssueInvalidType;
703
+ bag: LoosePartial<{
704
+ minimum: bigint;
705
+ maximum: bigint;
706
+ format: string;
707
+ }>;
708
+ }
709
+ interface $ZodBigInt<T = unknown> extends $ZodType {
710
+ _zod: $ZodBigIntInternals<T>;
711
+ }
712
+ declare const $ZodBigInt: $constructor<$ZodBigInt>;
713
+ interface $ZodSymbolDef extends $ZodTypeDef {
714
+ type: "symbol";
715
+ }
716
+ interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
717
+ def: $ZodSymbolDef;
718
+ isst: $ZodIssueInvalidType;
719
+ }
720
+ interface $ZodSymbol extends $ZodType {
721
+ _zod: $ZodSymbolInternals;
722
+ }
723
+ declare const $ZodSymbol: $constructor<$ZodSymbol>;
724
+ interface $ZodUndefinedDef extends $ZodTypeDef {
725
+ type: "undefined";
726
+ }
727
+ interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
728
+ pattern: RegExp;
729
+ def: $ZodUndefinedDef;
730
+ values: PrimitiveSet;
731
+ isst: $ZodIssueInvalidType;
732
+ }
733
+ interface $ZodUndefined extends $ZodType {
734
+ _zod: $ZodUndefinedInternals;
735
+ }
736
+ declare const $ZodUndefined: $constructor<$ZodUndefined>;
737
+ interface $ZodNullDef extends $ZodTypeDef {
738
+ type: "null";
739
+ }
740
+ interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
741
+ pattern: RegExp;
742
+ def: $ZodNullDef;
743
+ values: PrimitiveSet;
744
+ isst: $ZodIssueInvalidType;
745
+ }
746
+ interface $ZodNull extends $ZodType {
747
+ _zod: $ZodNullInternals;
748
+ }
749
+ declare const $ZodNull: $constructor<$ZodNull>;
750
+ interface $ZodAnyDef extends $ZodTypeDef {
751
+ type: "any";
752
+ }
753
+ interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
754
+ def: $ZodAnyDef;
755
+ isst: never;
756
+ }
757
+ interface $ZodAny extends $ZodType {
758
+ _zod: $ZodAnyInternals;
759
+ }
760
+ declare const $ZodAny: $constructor<$ZodAny>;
761
+ interface $ZodUnknownDef extends $ZodTypeDef {
762
+ type: "unknown";
763
+ }
764
+ interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
765
+ def: $ZodUnknownDef;
766
+ isst: never;
767
+ }
768
+ interface $ZodUnknown extends $ZodType {
769
+ _zod: $ZodUnknownInternals;
770
+ }
771
+ declare const $ZodUnknown: $constructor<$ZodUnknown>;
772
+ interface $ZodNeverDef extends $ZodTypeDef {
773
+ type: "never";
774
+ }
775
+ interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
776
+ def: $ZodNeverDef;
777
+ isst: $ZodIssueInvalidType;
778
+ }
779
+ interface $ZodNever extends $ZodType {
780
+ _zod: $ZodNeverInternals;
781
+ }
782
+ declare const $ZodNever: $constructor<$ZodNever>;
783
+ interface $ZodVoidDef extends $ZodTypeDef {
784
+ type: "void";
785
+ }
786
+ interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
787
+ def: $ZodVoidDef;
788
+ isst: $ZodIssueInvalidType;
789
+ }
790
+ interface $ZodVoid extends $ZodType {
791
+ _zod: $ZodVoidInternals;
792
+ }
793
+ declare const $ZodVoid: $constructor<$ZodVoid>;
794
+ interface $ZodDateDef extends $ZodTypeDef {
795
+ type: "date";
796
+ coerce?: boolean;
797
+ }
798
+ interface $ZodDateInternals<T = unknown> extends $ZodTypeInternals<Date, T> {
799
+ def: $ZodDateDef;
800
+ isst: $ZodIssueInvalidType;
801
+ bag: LoosePartial<{
802
+ minimum: Date;
803
+ maximum: Date;
804
+ format: string;
805
+ }>;
806
+ }
807
+ interface $ZodDate<T = unknown> extends $ZodType {
808
+ _zod: $ZodDateInternals<T>;
809
+ }
810
+ declare const $ZodDate: $constructor<$ZodDate>;
811
+ interface $ZodArrayDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
812
+ type: "array";
813
+ element: T;
814
+ }
815
+ interface $ZodArrayInternals<T extends SomeType = $ZodType> extends _$ZodTypeInternals {
816
+ def: $ZodArrayDef<T>;
817
+ isst: $ZodIssueInvalidType;
818
+ output: output<T>[];
819
+ input: input<T>[];
820
+ }
821
+ interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {}
822
+ declare const $ZodArray: $constructor<$ZodArray>;
823
+ type OptionalOutSchema = {
824
+ _zod: {
825
+ optout: "optional";
826
+ };
827
+ };
828
+ type OptionalInSchema = {
829
+ _zod: {
830
+ optin: "optional";
831
+ };
832
+ };
833
+ 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>;
834
+ 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>;
835
+ type $ZodObjectConfig = {
836
+ out: Record<string, unknown>;
837
+ in: Record<string, unknown>;
838
+ };
839
+ type $loose = {
840
+ out: Record<string, unknown>;
841
+ in: Record<string, unknown>;
842
+ };
843
+ type $strict = {
844
+ out: {};
845
+ in: {};
846
+ };
847
+ type $strip = {
848
+ out: {};
849
+ in: {};
850
+ };
851
+ type $catchall<T extends SomeType> = {
852
+ out: {
853
+ [k: string]: output<T>;
854
+ };
855
+ in: {
856
+ [k: string]: input<T>;
857
+ };
858
+ };
859
+ type $ZodShape = Readonly<{
860
+ [k: string]: $ZodType;
861
+ }>;
862
+ interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
863
+ type: "object";
864
+ shape: Shape;
865
+ catchall?: $ZodType | undefined;
866
+ }
867
+ interface $ZodObjectInternals< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
868
+ def: $ZodObjectDef<Shape>;
869
+ config: Config;
870
+ isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
871
+ propValues: PropValues;
872
+ output: $InferObjectOutput<Shape, Config["out"]>;
873
+ input: $InferObjectInput<Shape, Config["in"]>;
874
+ optin?: "optional" | undefined;
875
+ optout?: "optional" | undefined;
876
+ }
877
+ type $ZodLooseShape = Record<string, any>;
878
+ 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>> {}
879
+ declare const $ZodObject: $constructor<$ZodObject>;
880
+ type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
881
+ type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
882
+ interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
883
+ type: "union";
884
+ options: Options;
885
+ inclusive?: boolean;
886
+ }
887
+ type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
888
+ type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
889
+ interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends _$ZodTypeInternals {
890
+ def: $ZodUnionDef<T>;
891
+ isst: $ZodIssueInvalidUnion;
892
+ pattern: T[number]["_zod"]["pattern"];
893
+ values: T[number]["_zod"]["values"];
894
+ output: $InferUnionOutput<T[number]>;
895
+ input: $InferUnionInput<T[number]>;
896
+ optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
897
+ optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
898
+ }
899
+ interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodUnionInternals<T>> {
900
+ _zod: $ZodUnionInternals<T>;
901
+ }
902
+ declare const $ZodUnion: $constructor<$ZodUnion>;
903
+ interface $ZodDiscriminatedUnionDef<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionDef<Options> {
904
+ discriminator: Disc;
905
+ unionFallback?: boolean;
906
+ }
907
+ interface $ZodDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionInternals<Options> {
908
+ def: $ZodDiscriminatedUnionDef<Options, Disc>;
909
+ propValues: PropValues;
910
+ }
911
+ interface $ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodType {
912
+ _zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
913
+ }
914
+ declare const $ZodDiscriminatedUnion: $constructor<$ZodDiscriminatedUnion>;
915
+ interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
916
+ type: "intersection";
917
+ left: Left;
918
+ right: Right;
919
+ }
920
+ interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
921
+ def: $ZodIntersectionDef<A, B>;
922
+ isst: never;
923
+ optin: A["_zod"]["optin"] | B["_zod"]["optin"];
924
+ optout: A["_zod"]["optout"] | B["_zod"]["optout"];
925
+ output: output<A> & output<B>;
926
+ input: input<A> & input<B>;
927
+ }
928
+ interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
929
+ _zod: $ZodIntersectionInternals<A, B>;
930
+ }
931
+ declare const $ZodIntersection: $constructor<$ZodIntersection>;
932
+ interface $ZodTupleDef<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
933
+ type: "tuple";
934
+ items: T;
935
+ rest: Rest;
936
+ }
937
+ type $InferTupleInputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleInputTypeWithOptionals<T>, ...(Rest extends SomeType ? input<Rest>[] : [])];
938
+ type TupleInputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: input<T[k]> };
939
+ 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> : [];
940
+ type $InferTupleOutputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleOutputTypeWithOptionals<T>, ...(Rest extends SomeType ? output<Rest>[] : [])];
941
+ type TupleOutputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: output<T[k]> };
942
+ 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> : [];
943
+ interface $ZodTupleInternals<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends _$ZodTypeInternals {
944
+ def: $ZodTupleDef<T, Rest>;
945
+ isst: $ZodIssueInvalidType | $ZodIssueTooBig<unknown[]> | $ZodIssueTooSmall<unknown[]>;
946
+ output: $InferTupleOutputType<T, Rest>;
947
+ input: $InferTupleInputType<T, Rest>;
948
+ }
949
+ interface $ZodTuple<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodType {
950
+ _zod: $ZodTupleInternals<T, Rest>;
951
+ }
952
+ declare const $ZodTuple: $constructor<$ZodTuple>;
953
+ type $ZodRecordKey = $ZodType<string | number | symbol, unknown>;
954
+ interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
955
+ type: "record";
956
+ keyType: Key;
957
+ valueType: Value;
958
+ /** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
959
+ mode?: "strict" | "loose";
960
+ }
961
+ type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<output<Key>, output<Value>>> : Record<output<Key>, output<Value>>;
962
+ 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>>;
963
+ interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
964
+ def: $ZodRecordDef<Key, Value>;
965
+ isst: $ZodIssueInvalidType | $ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
966
+ optin?: "optional" | undefined;
967
+ optout?: "optional" | undefined;
968
+ }
969
+ type $partial = {
970
+ "~~partial": true;
971
+ };
972
+ interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodType {
973
+ _zod: $ZodRecordInternals<Key, Value>;
974
+ }
975
+ declare const $ZodRecord: $constructor<$ZodRecord>;
976
+ interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
977
+ type: "map";
978
+ keyType: Key;
979
+ valueType: Value;
980
+ }
981
+ interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key>, output<Value>>, Map<input<Key>, input<Value>>> {
982
+ def: $ZodMapDef<Key, Value>;
983
+ isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement<unknown>;
984
+ optin?: "optional" | undefined;
985
+ optout?: "optional" | undefined;
986
+ }
987
+ interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
988
+ _zod: $ZodMapInternals<Key, Value>;
989
+ }
990
+ declare const $ZodMap: $constructor<$ZodMap>;
991
+ interface $ZodSetDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
992
+ type: "set";
993
+ valueType: T;
994
+ }
995
+ interface $ZodSetInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T>>, Set<input<T>>> {
996
+ def: $ZodSetDef<T>;
997
+ isst: $ZodIssueInvalidType;
998
+ optin?: "optional" | undefined;
999
+ optout?: "optional" | undefined;
1000
+ }
1001
+ interface $ZodSet<T extends SomeType = $ZodType> extends $ZodType {
1002
+ _zod: $ZodSetInternals<T>;
1003
+ }
1004
+ declare const $ZodSet: $constructor<$ZodSet>;
1005
+ type $InferEnumOutput<T extends EnumLike> = T[keyof T] & {};
1006
+ type $InferEnumInput<T extends EnumLike> = T[keyof T] & {};
1007
+ interface $ZodEnumDef<T extends EnumLike = EnumLike> extends $ZodTypeDef {
1008
+ type: "enum";
1009
+ entries: T;
1010
+ }
1011
+ interface $ZodEnumInternals< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
1012
+ def: $ZodEnumDef<T>;
1013
+ /** @deprecated Internal API, use with caution (not deprecated) */
1014
+ values: PrimitiveSet;
1015
+ /** @deprecated Internal API, use with caution (not deprecated) */
1016
+ pattern: RegExp;
1017
+ isst: $ZodIssueInvalidValue;
1018
+ }
1019
+ interface $ZodEnum<T extends EnumLike = EnumLike> extends $ZodType {
1020
+ _zod: $ZodEnumInternals<T>;
1021
+ }
1022
+ declare const $ZodEnum: $constructor<$ZodEnum>;
1023
+ interface $ZodLiteralDef<T extends Literal> extends $ZodTypeDef {
1024
+ type: "literal";
1025
+ values: T[];
1026
+ }
1027
+ interface $ZodLiteralInternals<T extends Literal = Literal> extends $ZodTypeInternals<T, T> {
1028
+ def: $ZodLiteralDef<T>;
1029
+ values: Set<T>;
1030
+ pattern: RegExp;
1031
+ isst: $ZodIssueInvalidValue;
1032
+ }
1033
+ interface $ZodLiteral<T extends Literal = Literal> extends $ZodType {
1034
+ _zod: $ZodLiteralInternals<T>;
1035
+ }
1036
+ declare const $ZodLiteral: $constructor<$ZodLiteral>;
1037
+ type _File = typeof globalThis extends {
1038
+ File: infer F extends new (...args: any[]) => any;
1039
+ } ? InstanceType<F> : {};
1040
+ /** Do not reference this directly. */
1041
+ interface File extends _File {
1042
+ readonly type: string;
1043
+ readonly size: number;
1044
+ }
1045
+ interface $ZodFileDef extends $ZodTypeDef {
1046
+ type: "file";
1047
+ }
1048
+ interface $ZodFileInternals extends $ZodTypeInternals<File, File> {
1049
+ def: $ZodFileDef;
1050
+ isst: $ZodIssueInvalidType;
1051
+ bag: LoosePartial<{
1052
+ minimum: number;
1053
+ maximum: number;
1054
+ mime: MimeTypes[];
1055
+ }>;
1056
+ }
1057
+ interface $ZodFile extends $ZodType {
1058
+ _zod: $ZodFileInternals;
1059
+ }
1060
+ declare const $ZodFile: $constructor<$ZodFile>;
1061
+ interface $ZodTransformDef extends $ZodTypeDef {
1062
+ type: "transform";
1063
+ transform: (input: unknown, payload: ParsePayload<unknown>) => MaybeAsync<unknown>;
1064
+ }
1065
+ interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
1066
+ def: $ZodTransformDef;
1067
+ isst: never;
1068
+ }
1069
+ interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
1070
+ _zod: $ZodTransformInternals<O, I>;
1071
+ }
1072
+ declare const $ZodTransform: $constructor<$ZodTransform>;
1073
+ interface $ZodOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1074
+ type: "optional";
1075
+ innerType: T;
1076
+ }
1077
+ interface $ZodOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | undefined, input<T> | undefined> {
1078
+ def: $ZodOptionalDef<T>;
1079
+ optin: "optional";
1080
+ optout: "optional";
1081
+ isst: never;
1082
+ values: T["_zod"]["values"];
1083
+ pattern: T["_zod"]["pattern"];
1084
+ }
1085
+ interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
1086
+ _zod: $ZodOptionalInternals<T>;
1087
+ }
1088
+ declare const $ZodOptional: $constructor<$ZodOptional>;
1089
+ interface $ZodExactOptionalDef<T extends SomeType = $ZodType> extends $ZodOptionalDef<T> {}
1090
+ interface $ZodExactOptionalInternals<T extends SomeType = $ZodType> extends $ZodOptionalInternals<T> {
1091
+ def: $ZodExactOptionalDef<T>;
1092
+ output: output<T>;
1093
+ input: input<T>;
1094
+ }
1095
+ interface $ZodExactOptional<T extends SomeType = $ZodType> extends $ZodType {
1096
+ _zod: $ZodExactOptionalInternals<T>;
1097
+ }
1098
+ declare const $ZodExactOptional: $constructor<$ZodExactOptional>;
1099
+ interface $ZodNullableDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1100
+ type: "nullable";
1101
+ innerType: T;
1102
+ }
1103
+ interface $ZodNullableInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | null, input<T> | null> {
1104
+ def: $ZodNullableDef<T>;
1105
+ optin: T["_zod"]["optin"];
1106
+ optout: T["_zod"]["optout"];
1107
+ isst: never;
1108
+ values: T["_zod"]["values"];
1109
+ pattern: T["_zod"]["pattern"];
1110
+ }
1111
+ interface $ZodNullable<T extends SomeType = $ZodType> extends $ZodType {
1112
+ _zod: $ZodNullableInternals<T>;
1113
+ }
1114
+ declare const $ZodNullable: $constructor<$ZodNullable>;
1115
+ interface $ZodDefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1116
+ type: "default";
1117
+ innerType: T;
1118
+ /** The default value. May be a getter. */
1119
+ defaultValue: NoUndefined<output<T>>;
1120
+ }
1121
+ interface $ZodDefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
1122
+ def: $ZodDefaultDef<T>;
1123
+ optin: "optional";
1124
+ optout?: "optional" | undefined;
1125
+ isst: never;
1126
+ values: T["_zod"]["values"];
1127
+ }
1128
+ interface $ZodDefault<T extends SomeType = $ZodType> extends $ZodType {
1129
+ _zod: $ZodDefaultInternals<T>;
1130
+ }
1131
+ declare const $ZodDefault: $constructor<$ZodDefault>;
1132
+ interface $ZodPrefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1133
+ type: "prefault";
1134
+ innerType: T;
1135
+ /** The default value. May be a getter. */
1136
+ defaultValue: input<T>;
1137
+ }
1138
+ interface $ZodPrefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
1139
+ def: $ZodPrefaultDef<T>;
1140
+ optin: "optional";
1141
+ optout?: "optional" | undefined;
1142
+ isst: never;
1143
+ values: T["_zod"]["values"];
1144
+ }
1145
+ interface $ZodPrefault<T extends SomeType = $ZodType> extends $ZodType {
1146
+ _zod: $ZodPrefaultInternals<T>;
1147
+ }
1148
+ declare const $ZodPrefault: $constructor<$ZodPrefault>;
1149
+ interface $ZodNonOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1150
+ type: "nonoptional";
1151
+ innerType: T;
1152
+ }
1153
+ interface $ZodNonOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, NoUndefined<input<T>>> {
1154
+ def: $ZodNonOptionalDef<T>;
1155
+ isst: $ZodIssueInvalidType;
1156
+ values: T["_zod"]["values"];
1157
+ optin: "optional" | undefined;
1158
+ optout: "optional" | undefined;
1159
+ }
1160
+ interface $ZodNonOptional<T extends SomeType = $ZodType> extends $ZodType {
1161
+ _zod: $ZodNonOptionalInternals<T>;
1162
+ }
1163
+ declare const $ZodNonOptional: $constructor<$ZodNonOptional>;
1164
+ interface $ZodSuccessDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1165
+ type: "success";
1166
+ innerType: T;
1167
+ }
1168
+ interface $ZodSuccessInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input<T>> {
1169
+ def: $ZodSuccessDef<T>;
1170
+ isst: never;
1171
+ optin: T["_zod"]["optin"];
1172
+ optout: "optional" | undefined;
1173
+ }
1174
+ interface $ZodSuccess<T extends SomeType = $ZodType> extends $ZodType {
1175
+ _zod: $ZodSuccessInternals<T>;
1176
+ }
1177
+ declare const $ZodSuccess: $constructor<$ZodSuccess>;
1178
+ interface $ZodCatchCtx extends ParsePayload {
1179
+ /** @deprecated Use `ctx.issues` */
1180
+ error: {
1181
+ issues: $ZodIssue[];
1182
+ };
1183
+ /** @deprecated Use `ctx.value` */
1184
+ input: unknown;
1185
+ }
1186
+ interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1187
+ type: "catch";
1188
+ innerType: T;
1189
+ catchValue: (ctx: $ZodCatchCtx) => unknown;
1190
+ }
1191
+ interface $ZodCatchInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1192
+ def: $ZodCatchDef<T>;
1193
+ optin: T["_zod"]["optin"];
1194
+ optout: T["_zod"]["optout"];
1195
+ isst: never;
1196
+ values: T["_zod"]["values"];
1197
+ }
1198
+ interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
1199
+ _zod: $ZodCatchInternals<T>;
1200
+ }
1201
+ declare const $ZodCatch: $constructor<$ZodCatch>;
1202
+ interface $ZodNaNDef extends $ZodTypeDef {
1203
+ type: "nan";
1204
+ }
1205
+ interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
1206
+ def: $ZodNaNDef;
1207
+ isst: $ZodIssueInvalidType;
1208
+ }
1209
+ interface $ZodNaN extends $ZodType {
1210
+ _zod: $ZodNaNInternals;
1211
+ }
1212
+ declare const $ZodNaN: $constructor<$ZodNaN>;
1213
+ interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
1214
+ type: "pipe";
1215
+ in: A;
1216
+ out: B;
1217
+ /** Only defined inside $ZodCodec instances. */
1218
+ transform?: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
1219
+ /** Only defined inside $ZodCodec instances. */
1220
+ reverseTransform?: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
1221
+ }
1222
+ interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
1223
+ def: $ZodPipeDef<A, B>;
1224
+ isst: never;
1225
+ values: A["_zod"]["values"];
1226
+ optin: A["_zod"]["optin"];
1227
+ optout: B["_zod"]["optout"];
1228
+ propValues: A["_zod"]["propValues"];
1229
+ }
1230
+ interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
1231
+ _zod: $ZodPipeInternals<A, B>;
1232
+ }
1233
+ declare const $ZodPipe: $constructor<$ZodPipe>;
1234
+ interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1235
+ type: "readonly";
1236
+ innerType: T;
1237
+ }
1238
+ interface $ZodReadonlyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<MakeReadonly<output<T>>, MakeReadonly<input<T>>> {
1239
+ def: $ZodReadonlyDef<T>;
1240
+ optin: T["_zod"]["optin"];
1241
+ optout: T["_zod"]["optout"];
1242
+ isst: never;
1243
+ propValues: T["_zod"]["propValues"];
1244
+ values: T["_zod"]["values"];
1245
+ }
1246
+ interface $ZodReadonly<T extends SomeType = $ZodType> extends $ZodType {
1247
+ _zod: $ZodReadonlyInternals<T>;
1248
+ }
1249
+ declare const $ZodReadonly: $constructor<$ZodReadonly>;
1250
+ interface $ZodTemplateLiteralDef extends $ZodTypeDef {
1251
+ type: "template_literal";
1252
+ parts: $ZodTemplateLiteralPart[];
1253
+ format?: string | undefined;
1254
+ }
1255
+ interface $ZodTemplateLiteralInternals<Template extends string = string> extends $ZodTypeInternals<Template, Template> {
1256
+ pattern: RegExp;
1257
+ def: $ZodTemplateLiteralDef;
1258
+ isst: $ZodIssueInvalidType;
1259
+ }
1260
+ interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
1261
+ _zod: $ZodTemplateLiteralInternals<Template>;
1262
+ }
1263
+ type LiteralPart = Exclude<Literal, symbol>;
1264
+ interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
1265
+ pattern: RegExp;
1266
+ }
1267
+ interface SchemaPart extends $ZodType {
1268
+ _zod: SchemaPartInternals;
1269
+ }
1270
+ type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
1271
+ declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
1272
+ type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
1273
+ type $ZodFunctionIn = $ZodFunctionArgs;
1274
+ type $ZodFunctionOut = $ZodType;
1275
+ type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input<Returns>;
1276
+ type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => MaybeAsync<input<Returns>>;
1277
+ type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => output<Returns>;
1278
+ type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => Promise<output<Returns>>;
1279
+ interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
1280
+ type: "function";
1281
+ input: In;
1282
+ output: Out;
1283
+ }
1284
+ interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
1285
+ def: $ZodFunctionDef<Args, Returns>;
1286
+ isst: $ZodIssueInvalidType;
1287
+ }
1288
+ interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodType<any, any, $ZodFunctionInternals<Args, Returns>> {
1289
+ /** @deprecated */
1290
+ _def: $ZodFunctionDef<Args, Returns>;
1291
+ _input: $InferInnerFunctionType<Args, Returns>;
1292
+ _output: $InferOuterFunctionType<Args, Returns>;
1293
+ implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
1294
+ implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
1295
+ input<const Items extends TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest): $ZodFunction<$ZodTuple<Items, Rest>, Returns>;
1296
+ input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
1297
+ input(...args: any[]): $ZodFunction<any, Returns>;
1298
+ output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
1299
+ }
1300
+ declare const $ZodFunction: $constructor<$ZodFunction>;
1301
+ interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1302
+ type: "promise";
1303
+ innerType: T;
1304
+ }
1305
+ interface $ZodPromiseInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T>>, MaybeAsync<input<T>>> {
1306
+ def: $ZodPromiseDef<T>;
1307
+ isst: never;
1308
+ }
1309
+ interface $ZodPromise<T extends SomeType = $ZodType> extends $ZodType {
1310
+ _zod: $ZodPromiseInternals<T>;
1311
+ }
1312
+ declare const $ZodPromise: $constructor<$ZodPromise>;
1313
+ interface $ZodLazyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1314
+ type: "lazy";
1315
+ getter: () => T;
1316
+ }
1317
+ interface $ZodLazyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1318
+ def: $ZodLazyDef<T>;
1319
+ isst: never;
1320
+ /** Auto-cached way to retrieve the inner schema */
1321
+ innerType: T;
1322
+ pattern: T["_zod"]["pattern"];
1323
+ propValues: T["_zod"]["propValues"];
1324
+ optin: T["_zod"]["optin"];
1325
+ optout: T["_zod"]["optout"];
1326
+ }
1327
+ interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
1328
+ _zod: $ZodLazyInternals<T>;
1329
+ }
1330
+ declare const $ZodLazy: $constructor<$ZodLazy>;
1331
+ interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
1332
+ type: "custom";
1333
+ check: "custom";
1334
+ path?: PropertyKey[] | undefined;
1335
+ error?: $ZodErrorMap | undefined;
1336
+ params?: Record<string, any> | undefined;
1337
+ fn: (arg: O) => unknown;
1338
+ }
1339
+ interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, $ZodCheckInternals<O> {
1340
+ def: $ZodCustomDef;
1341
+ issc: $ZodIssue;
1342
+ isst: never;
1343
+ bag: LoosePartial<{
1344
+ Class: typeof Class;
1345
+ }>;
1346
+ }
1347
+ interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
1348
+ _zod: $ZodCustomInternals<O, I>;
1349
+ }
1350
+ declare const $ZodCustom: $constructor<$ZodCustom>;
1351
+ 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;
1352
+ //#endregion
1353
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.d.cts
1354
+ interface $ZodCheckDef {
1355
+ check: string;
1356
+ error?: $ZodErrorMap<never> | undefined;
1357
+ /** If true, no later checks will be executed if this check fails. Default `false`. */
1358
+ abort?: boolean | undefined;
1359
+ /** If provided, the check runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
1360
+ when?: ((payload: ParsePayload) => boolean) | undefined;
1361
+ }
1362
+ interface $ZodCheckInternals<T> {
1363
+ def: $ZodCheckDef;
1364
+ /** The set of issues this check might throw. */
1365
+ issc?: $ZodIssueBase;
1366
+ check(payload: ParsePayload<T>): MaybeAsync<void>;
1367
+ onattach: ((schema: $ZodType) => void)[];
1368
+ }
1369
+ interface $ZodCheck<in T = never> {
1370
+ _zod: $ZodCheckInternals<T>;
1371
+ }
1372
+ declare const $ZodCheck: $constructor<$ZodCheck<any>>;
1373
+ interface $ZodCheckLessThanDef extends $ZodCheckDef {
1374
+ check: "less_than";
1375
+ value: Numeric;
1376
+ inclusive: boolean;
1377
+ }
1378
+ interface $ZodCheckLessThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
1379
+ def: $ZodCheckLessThanDef;
1380
+ issc: $ZodIssueTooBig<T>;
1381
+ }
1382
+ interface $ZodCheckLessThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
1383
+ _zod: $ZodCheckLessThanInternals<T>;
1384
+ }
1385
+ declare const $ZodCheckLessThan: $constructor<$ZodCheckLessThan>;
1386
+ interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
1387
+ check: "greater_than";
1388
+ value: Numeric;
1389
+ inclusive: boolean;
1390
+ }
1391
+ interface $ZodCheckGreaterThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
1392
+ def: $ZodCheckGreaterThanDef;
1393
+ issc: $ZodIssueTooSmall<T>;
1394
+ }
1395
+ interface $ZodCheckGreaterThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
1396
+ _zod: $ZodCheckGreaterThanInternals<T>;
1397
+ }
1398
+ declare const $ZodCheckGreaterThan: $constructor<$ZodCheckGreaterThan>;
1399
+ interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
1400
+ check: "multiple_of";
1401
+ value: T;
1402
+ }
1403
+ interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint> extends $ZodCheckInternals<T> {
1404
+ def: $ZodCheckMultipleOfDef<T>;
1405
+ issc: $ZodIssueNotMultipleOf;
1406
+ }
1407
+ interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
1408
+ _zod: $ZodCheckMultipleOfInternals<T>;
1409
+ }
1410
+ declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
1411
+ type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
1412
+ interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
1413
+ check: "number_format";
1414
+ format: $ZodNumberFormats;
1415
+ }
1416
+ interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
1417
+ def: $ZodCheckNumberFormatDef;
1418
+ issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
1419
+ }
1420
+ interface $ZodCheckNumberFormat extends $ZodCheck<number> {
1421
+ _zod: $ZodCheckNumberFormatInternals;
1422
+ }
1423
+ declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
1424
+ interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
1425
+ check: "max_length";
1426
+ maximum: number;
1427
+ }
1428
+ interface $ZodCheckMaxLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1429
+ def: $ZodCheckMaxLengthDef;
1430
+ issc: $ZodIssueTooBig<T>;
1431
+ }
1432
+ interface $ZodCheckMaxLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
1433
+ _zod: $ZodCheckMaxLengthInternals<T>;
1434
+ }
1435
+ declare const $ZodCheckMaxLength: $constructor<$ZodCheckMaxLength>;
1436
+ interface $ZodCheckMinLengthDef extends $ZodCheckDef {
1437
+ check: "min_length";
1438
+ minimum: number;
1439
+ }
1440
+ interface $ZodCheckMinLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1441
+ def: $ZodCheckMinLengthDef;
1442
+ issc: $ZodIssueTooSmall<T>;
1443
+ }
1444
+ interface $ZodCheckMinLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
1445
+ _zod: $ZodCheckMinLengthInternals<T>;
1446
+ }
1447
+ declare const $ZodCheckMinLength: $constructor<$ZodCheckMinLength>;
1448
+ interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
1449
+ check: "length_equals";
1450
+ length: number;
1451
+ }
1452
+ interface $ZodCheckLengthEqualsInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1453
+ def: $ZodCheckLengthEqualsDef;
1454
+ issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
1455
+ }
1456
+ interface $ZodCheckLengthEquals<T extends HasLength = HasLength> extends $ZodCheck<T> {
1457
+ _zod: $ZodCheckLengthEqualsInternals<T>;
1458
+ }
1459
+ declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
1460
+ 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";
1461
+ interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
1462
+ check: "string_format";
1463
+ format: Format;
1464
+ pattern?: RegExp | undefined;
1465
+ }
1466
+ interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
1467
+ def: $ZodCheckStringFormatDef;
1468
+ issc: $ZodIssueInvalidStringFormat;
1469
+ }
1470
+ interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
1471
+ format: "regex";
1472
+ pattern: RegExp;
1473
+ }
1474
+ interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
1475
+ def: $ZodCheckRegexDef;
1476
+ issc: $ZodIssueInvalidStringFormat;
1477
+ }
1478
+ interface $ZodCheckRegex extends $ZodCheck<string> {
1479
+ _zod: $ZodCheckRegexInternals;
1480
+ }
1481
+ declare const $ZodCheckRegex: $constructor<$ZodCheckRegex>;
1482
+ interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {}
1483
+ interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
1484
+ def: $ZodCheckLowerCaseDef;
1485
+ issc: $ZodIssueInvalidStringFormat;
1486
+ }
1487
+ interface $ZodCheckLowerCase extends $ZodCheck<string> {
1488
+ _zod: $ZodCheckLowerCaseInternals;
1489
+ }
1490
+ declare const $ZodCheckLowerCase: $constructor<$ZodCheckLowerCase>;
1491
+ interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {}
1492
+ interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
1493
+ def: $ZodCheckUpperCaseDef;
1494
+ issc: $ZodIssueInvalidStringFormat;
1495
+ }
1496
+ interface $ZodCheckUpperCase extends $ZodCheck<string> {
1497
+ _zod: $ZodCheckUpperCaseInternals;
1498
+ }
1499
+ declare const $ZodCheckUpperCase: $constructor<$ZodCheckUpperCase>;
1500
+ interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
1501
+ includes: string;
1502
+ position?: number | undefined;
1503
+ }
1504
+ interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
1505
+ def: $ZodCheckIncludesDef;
1506
+ issc: $ZodIssueInvalidStringFormat;
1507
+ }
1508
+ interface $ZodCheckIncludes extends $ZodCheck<string> {
1509
+ _zod: $ZodCheckIncludesInternals;
1510
+ }
1511
+ declare const $ZodCheckIncludes: $constructor<$ZodCheckIncludes>;
1512
+ interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
1513
+ prefix: string;
1514
+ }
1515
+ interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
1516
+ def: $ZodCheckStartsWithDef;
1517
+ issc: $ZodIssueInvalidStringFormat;
1518
+ }
1519
+ interface $ZodCheckStartsWith extends $ZodCheck<string> {
1520
+ _zod: $ZodCheckStartsWithInternals;
1521
+ }
1522
+ declare const $ZodCheckStartsWith: $constructor<$ZodCheckStartsWith>;
1523
+ interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
1524
+ suffix: string;
1525
+ }
1526
+ interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
1527
+ def: $ZodCheckEndsWithDef;
1528
+ issc: $ZodIssueInvalidStringFormat;
1529
+ }
1530
+ interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
1531
+ _zod: $ZodCheckEndsWithInternals;
1532
+ }
1533
+ declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
1534
+ //#endregion
1535
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.d.cts
1536
+ interface $ZodIssueBase {
1537
+ readonly code?: string;
1538
+ readonly input?: unknown;
1539
+ readonly path: PropertyKey[];
1540
+ readonly message: string;
1541
+ }
1542
+ type $ZodInvalidTypeExpected = "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "undefined" | "null" | "never" | "void" | "date" | "array" | "object" | "tuple" | "record" | "map" | "set" | "file" | "nonoptional" | "nan" | "function" | (string & {});
1543
+ interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
1544
+ readonly code: "invalid_type";
1545
+ readonly expected: $ZodInvalidTypeExpected;
1546
+ readonly input?: Input;
1547
+ }
1548
+ interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
1549
+ readonly code: "too_big";
1550
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
1551
+ readonly maximum: number | bigint;
1552
+ readonly inclusive?: boolean;
1553
+ readonly exact?: boolean;
1554
+ readonly input?: Input;
1555
+ }
1556
+ interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
1557
+ readonly code: "too_small";
1558
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
1559
+ readonly minimum: number | bigint;
1560
+ /** True if the allowable range includes the minimum */
1561
+ readonly inclusive?: boolean;
1562
+ /** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
1563
+ readonly exact?: boolean;
1564
+ readonly input?: Input;
1565
+ }
1566
+ interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
1567
+ readonly code: "invalid_format";
1568
+ readonly format: $ZodStringFormats | (string & {});
1569
+ readonly pattern?: string;
1570
+ readonly input?: string;
1571
+ }
1572
+ interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
1573
+ readonly code: "not_multiple_of";
1574
+ readonly divisor: number;
1575
+ readonly input?: Input;
1576
+ }
1577
+ interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
1578
+ readonly code: "unrecognized_keys";
1579
+ readonly keys: string[];
1580
+ readonly input?: Record<string, unknown>;
1581
+ }
1582
+ interface $ZodIssueInvalidUnionNoMatch extends $ZodIssueBase {
1583
+ readonly code: "invalid_union";
1584
+ readonly errors: $ZodIssue[][];
1585
+ readonly input?: unknown;
1586
+ readonly discriminator?: string | undefined;
1587
+ readonly options?: Primitive[];
1588
+ readonly inclusive?: true;
1589
+ }
1590
+ interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
1591
+ readonly code: "invalid_union";
1592
+ readonly errors: [];
1593
+ readonly input?: unknown;
1594
+ readonly discriminator?: string | undefined;
1595
+ readonly inclusive: false;
1596
+ }
1597
+ type $ZodIssueInvalidUnion = $ZodIssueInvalidUnionNoMatch | $ZodIssueInvalidUnionMultipleMatch;
1598
+ interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
1599
+ readonly code: "invalid_key";
1600
+ readonly origin: "map" | "record";
1601
+ readonly issues: $ZodIssue[];
1602
+ readonly input?: Input;
1603
+ }
1604
+ interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
1605
+ readonly code: "invalid_element";
1606
+ readonly origin: "map" | "set";
1607
+ readonly key: unknown;
1608
+ readonly issues: $ZodIssue[];
1609
+ readonly input?: Input;
1610
+ }
1611
+ interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
1612
+ readonly code: "invalid_value";
1613
+ readonly values: Primitive[];
1614
+ readonly input?: Input;
1615
+ }
1616
+ interface $ZodIssueCustom extends $ZodIssueBase {
1617
+ readonly code: "custom";
1618
+ readonly params?: Record<string, any> | undefined;
1619
+ readonly input?: unknown;
1620
+ }
1621
+ type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
1622
+ type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
1623
+ type RawIssue$1<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1624
+ /** The input data */readonly input: unknown; /** The schema or check that originated this issue. */
1625
+ readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will continue executing checks/refinements after this issue. */
1626
+ readonly continue?: boolean | undefined;
1627
+ } & Record<string, unknown>> : never;
1628
+ type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;
1629
+ interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {
1630
+ (issue: $ZodRawIssue<T>): {
1631
+ message: string;
1632
+ } | string | undefined | null;
1633
+ }
1634
+ interface $ZodError<T = unknown> extends Error {
1635
+ type: T;
1636
+ issues: $ZodIssue[];
1637
+ _zod: {
1638
+ output: T;
1639
+ def: $ZodIssue[];
1640
+ };
1641
+ stack?: string;
1642
+ name: string;
1643
+ }
1644
+ declare const $ZodError: $constructor<$ZodError>;
1645
+ type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
1646
+ type _FlattenedError<T, U = string> = {
1647
+ formErrors: U[];
1648
+ fieldErrors: { [P in keyof T]?: U[] };
1649
+ };
1650
+ type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U> } : T extends any[] ? {
1651
+ [k: number]: $ZodFormattedError<T[number], U>;
1652
+ } : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U> }> : any;
1653
+ type $ZodFormattedError<T, U = string> = {
1654
+ _errors: U[];
1655
+ } & Flatten<_ZodFormattedError<T, U>>;
1656
+ //#endregion
1657
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.d.cts
1658
+ type ZodTrait = {
1659
+ _zod: {
1660
+ def: any;
1661
+ [k: string]: any;
1662
+ };
1663
+ };
1664
+ interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
1665
+ new (def: D): T;
1666
+ init(inst: T, def: D): asserts inst is T;
1667
+ }
1668
+ declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
1669
+ Parent?: typeof Class;
1670
+ }): $constructor<T, D>;
1671
+ declare const $brand: unique symbol;
1672
+ type $brand<T extends string | number | symbol = string | number | symbol> = {
1673
+ [$brand]: { [k in T]: true };
1674
+ };
1675
+ type $ZodBranded<T extends SomeType, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T & (Dir extends "inout" ? {
1676
+ _zod: {
1677
+ input: input<T> & $brand<Brand>;
1678
+ output: output<T> & $brand<Brand>;
1679
+ };
1680
+ } : Dir extends "in" ? {
1681
+ _zod: {
1682
+ input: input<T> & $brand<Brand>;
1683
+ };
1684
+ } : {
1685
+ _zod: {
1686
+ output: output<T> & $brand<Brand>;
1687
+ };
1688
+ });
1689
+ type input<T> = T extends {
1690
+ _zod: {
1691
+ input: any;
1692
+ };
1693
+ } ? T["_zod"]["input"] : unknown;
1694
+ type output<T> = T extends {
1695
+ _zod: {
1696
+ output: any;
1697
+ };
1698
+ } ? T["_zod"]["output"] : unknown;
1699
+ //#endregion
1700
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.d.cts
1701
+ 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] ? {} : {
1702
+ error?: string | $ZodErrorMap<IssueTypes> | undefined; /** @deprecated This parameter is deprecated. Use `error` instead. */
1703
+ message?: string | undefined;
1704
+ })>>>;
1705
+ type TypeParams<T extends $ZodType = $ZodType & {
1706
+ _isst: never;
1707
+ }, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
1708
+ type CheckParams<T extends $ZodCheck = $ZodCheck, // & { _issc: never },
1709
+ AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
1710
+ 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>;
1711
+ 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>;
1712
+ type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
1713
+ type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">;
1714
+ type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
1715
+ type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
1716
+ type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
1717
+ type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
1718
+ /**
1719
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
1720
+ * (timestamps embedded in the id). Use {@link _cuid2} instead.
1721
+ * See https://github.com/paralleldrive/cuid.
1722
+ */
1723
+ type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
1724
+ type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
1725
+ type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
1726
+ type $ZodCheckXIDParams = CheckStringFormatParams<$ZodXID, "when">;
1727
+ type $ZodCheckKSUIDParams = CheckStringFormatParams<$ZodKSUID, "when">;
1728
+ type $ZodCheckIPv4Params = CheckStringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
1729
+ type $ZodCheckIPv6Params = CheckStringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
1730
+ type $ZodCheckCIDRv4Params = CheckStringFormatParams<$ZodCIDRv4, "pattern" | "when">;
1731
+ type $ZodCheckCIDRv6Params = CheckStringFormatParams<$ZodCIDRv6, "pattern" | "when">;
1732
+ type $ZodCheckBase64Params = CheckStringFormatParams<$ZodBase64, "pattern" | "when">;
1733
+ type $ZodCheckBase64URLParams = CheckStringFormatParams<$ZodBase64URL, "pattern" | "when">;
1734
+ type $ZodCheckE164Params = CheckStringFormatParams<$ZodE164, "when">;
1735
+ type $ZodCheckJWTParams = CheckStringFormatParams<$ZodJWT, "pattern" | "when">;
1736
+ type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "pattern" | "when">;
1737
+ type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
1738
+ type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
1739
+ type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
1740
+ type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
1741
+ type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
1742
+ type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
1743
+ type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
1744
+ type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
1745
+ type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
1746
+ type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
1747
+ type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
1748
+ type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
1749
+ type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
1750
+ type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
1751
+ type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
1752
+ type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
1753
+ type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
1754
+ type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
1755
+ type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
1756
+ type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
1757
+ type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1758
+ /** The schema or check that originated this issue. */readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
1759
+ readonly continue?: boolean | undefined;
1760
+ } & Record<string, unknown>> : never;
1761
+ interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
1762
+ addIssue(arg: string | $ZodSuperRefineIssue): void;
1763
+ }
1764
+ interface $ZodSuperRefineParams {
1765
+ /** If provided, the refinement runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
1766
+ when?: ((payload: ParsePayload) => boolean) | undefined;
1767
+ }
1768
+ //#endregion
1769
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.d.cts
1770
+ /** An Error-like class used to store Zod validation issues. */
1771
+ interface ZodError<T = unknown> extends $ZodError<T> {
1772
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
1773
+ format(): $ZodFormattedError<T>;
1774
+ format<U>(mapper: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
1775
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
1776
+ flatten(): $ZodFlattenedError<T>;
1777
+ flatten<U>(mapper: (issue: $ZodIssue) => U): $ZodFlattenedError<T, U>;
1778
+ /** @deprecated Push directly to `.issues` instead. */
1779
+ addIssue(issue: $ZodIssue): void;
1780
+ /** @deprecated Push directly to `.issues` instead. */
1781
+ addIssues(issues: $ZodIssue[]): void;
1782
+ /** @deprecated Check `err.issues.length === 0` instead. */
1783
+ isEmpty: boolean;
1784
+ }
1785
+ declare const ZodError: $constructor<ZodError>;
1786
+ //#endregion
1787
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.d.cts
1788
+ type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
1789
+ type ZodSafeParseSuccess<T> = {
1790
+ success: true;
1791
+ data: T;
1792
+ error?: never;
1793
+ };
1794
+ type ZodSafeParseError<T> = {
1795
+ success: false;
1796
+ data?: never;
1797
+ error: ZodError<T>;
1798
+ };
1799
+ //#endregion
1800
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.d.cts
1801
+ type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
1802
+ interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
1803
+ def: Internals["def"];
1804
+ type: Internals["def"]["type"];
1805
+ /** @deprecated Use `.def` instead. */
1806
+ _def: Internals["def"];
1807
+ /** @deprecated Use `z.output<typeof schema>` instead. */
1808
+ _output: Internals["output"];
1809
+ /** @deprecated Use `z.input<typeof schema>` instead. */
1810
+ _input: Internals["input"];
1811
+ "~standard": ZodStandardSchemaWithJSON<this>;
1812
+ /** Converts this schema to a JSON Schema representation. */
1813
+ toJSONSchema(params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<this>;
1814
+ check(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
1815
+ with(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
1816
+ clone(def?: Internals["def"], params?: {
1817
+ parent: boolean;
1818
+ }): this;
1819
+ 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;
1820
+ brand<T extends PropertyKey = PropertyKey, Dir extends "in" | "out" | "inout" = "out">(value?: T): PropertyKey extends T ? this : $ZodBranded<this, T, Dir>;
1821
+ parse(data: unknown, params?: ParseContext<$ZodIssue>): output<this>;
1822
+ safeParse(data: unknown, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
1823
+ parseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
1824
+ safeParseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
1825
+ spa: (data: unknown, params?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<this>>>;
1826
+ encode(data: output<this>, params?: ParseContext<$ZodIssue>): input<this>;
1827
+ decode(data: input<this>, params?: ParseContext<$ZodIssue>): output<this>;
1828
+ encodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<input<this>>;
1829
+ decodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
1830
+ safeEncode(data: output<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<input<this>>;
1831
+ safeDecode(data: input<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
1832
+ safeEncodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<input<this>>>;
1833
+ safeDecodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
1834
+ 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;
1835
+ superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>, params?: $ZodSuperRefineParams): this;
1836
+ overwrite(fn: (x: output<this>) => output<this>): this;
1837
+ optional(): ZodOptional<this>;
1838
+ exactOptional(): ZodExactOptional<this>;
1839
+ nonoptional(params?: string | $ZodNonOptionalParams): ZodNonOptional<this>;
1840
+ nullable(): ZodNullable<this>;
1841
+ nullish(): ZodOptional<ZodNullable<this>>;
1842
+ default(def: NoUndefined<output<this>>): ZodDefault<this>;
1843
+ default(def: () => NoUndefined<output<this>>): ZodDefault<this>;
1844
+ prefault(def: () => input<this>): ZodPrefault<this>;
1845
+ prefault(def: input<this>): ZodPrefault<this>;
1846
+ array(): ZodArray<this>;
1847
+ or<T extends SomeType>(option: T): ZodUnion<[this, T]>;
1848
+ and<T extends SomeType>(incoming: T): ZodIntersection<this, T>;
1849
+ transform<NewOut>(transform: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, output<this>>>;
1850
+ catch(def: output<this>): ZodCatch<this>;
1851
+ catch(def: (ctx: $ZodCatchCtx) => output<this>): ZodCatch<this>;
1852
+ pipe<T extends $ZodType<any, output<this>>>(target: T | $ZodType<any, output<this>>): ZodPipe<this, T>;
1853
+ readonly(): ZodReadonly<this>;
1854
+ /** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
1855
+ describe(description: string): this;
1856
+ description?: string;
1857
+ /** Returns the metadata associated with this instance in `z.globalRegistry` */
1858
+ meta(): $replace<GlobalMeta, this> | undefined;
1859
+ /** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
1860
+ meta(data: $replace<GlobalMeta, this>): this;
1861
+ /** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
1862
+ *
1863
+ * ```ts
1864
+ * const schema = z.string().optional();
1865
+ * const isOptional = schema.safeParse(undefined).success; // true
1866
+ * ```
1867
+ */
1868
+ isOptional(): boolean;
1869
+ /**
1870
+ * @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
1871
+ *
1872
+ * ```ts
1873
+ * const schema = z.string().nullable();
1874
+ * const isNullable = schema.safeParse(null).success; // true
1875
+ * ```
1876
+ */
1877
+ isNullable(): boolean;
1878
+ apply<T>(fn: (schema: this) => T): T;
1879
+ }
1880
+ interface _ZodType<out Internals extends $ZodTypeInternals = $ZodTypeInternals> extends ZodType<any, any, Internals> {}
1881
+ declare const ZodType: $constructor<ZodType>;
1882
+ interface _ZodString<T extends $ZodStringInternals<unknown> = $ZodStringInternals<unknown>> extends _ZodType<T> {
1883
+ format: string | null;
1884
+ minLength: number | null;
1885
+ maxLength: number | null;
1886
+ regex(regex: RegExp, params?: string | $ZodCheckRegexParams): this;
1887
+ includes(value: string, params?: string | $ZodCheckIncludesParams): this;
1888
+ startsWith(value: string, params?: string | $ZodCheckStartsWithParams): this;
1889
+ endsWith(value: string, params?: string | $ZodCheckEndsWithParams): this;
1890
+ min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
1891
+ max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
1892
+ length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
1893
+ nonempty(params?: string | $ZodCheckMinLengthParams): this;
1894
+ lowercase(params?: string | $ZodCheckLowerCaseParams): this;
1895
+ uppercase(params?: string | $ZodCheckUpperCaseParams): this;
1896
+ trim(): this;
1897
+ normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
1898
+ toLowerCase(): this;
1899
+ toUpperCase(): this;
1900
+ slugify(): this;
1901
+ }
1902
+ /** @internal */
1903
+ declare const _ZodString: $constructor<_ZodString>;
1904
+ interface ZodString extends _ZodString<$ZodStringInternals<string>> {
1905
+ /** @deprecated Use `z.email()` instead. */
1906
+ email(params?: string | $ZodCheckEmailParams): this;
1907
+ /** @deprecated Use `z.url()` instead. */
1908
+ url(params?: string | $ZodCheckURLParams): this;
1909
+ /** @deprecated Use `z.jwt()` instead. */
1910
+ jwt(params?: string | $ZodCheckJWTParams): this;
1911
+ /** @deprecated Use `z.emoji()` instead. */
1912
+ emoji(params?: string | $ZodCheckEmojiParams): this;
1913
+ /** @deprecated Use `z.guid()` instead. */
1914
+ guid(params?: string | $ZodCheckGUIDParams): this;
1915
+ /** @deprecated Use `z.uuid()` instead. */
1916
+ uuid(params?: string | $ZodCheckUUIDParams): this;
1917
+ /** @deprecated Use `z.uuid()` instead. */
1918
+ uuidv4(params?: string | $ZodCheckUUIDParams): this;
1919
+ /** @deprecated Use `z.uuid()` instead. */
1920
+ uuidv6(params?: string | $ZodCheckUUIDParams): this;
1921
+ /** @deprecated Use `z.uuid()` instead. */
1922
+ uuidv7(params?: string | $ZodCheckUUIDParams): this;
1923
+ /** @deprecated Use `z.nanoid()` instead. */
1924
+ nanoid(params?: string | $ZodCheckNanoIDParams): this;
1925
+ /** @deprecated Use `z.guid()` instead. */
1926
+ guid(params?: string | $ZodCheckGUIDParams): this;
1927
+ /**
1928
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
1929
+ * (timestamps embedded in the id). Use `z.cuid2()` instead.
1930
+ * See https://github.com/paralleldrive/cuid.
1931
+ */
1932
+ cuid(params?: string | $ZodCheckCUIDParams): this;
1933
+ /** @deprecated Use `z.cuid2()` instead. */
1934
+ cuid2(params?: string | $ZodCheckCUID2Params): this;
1935
+ /** @deprecated Use `z.ulid()` instead. */
1936
+ ulid(params?: string | $ZodCheckULIDParams): this;
1937
+ /** @deprecated Use `z.base64()` instead. */
1938
+ base64(params?: string | $ZodCheckBase64Params): this;
1939
+ /** @deprecated Use `z.base64url()` instead. */
1940
+ base64url(params?: string | $ZodCheckBase64URLParams): this;
1941
+ /** @deprecated Use `z.xid()` instead. */
1942
+ xid(params?: string | $ZodCheckXIDParams): this;
1943
+ /** @deprecated Use `z.ksuid()` instead. */
1944
+ ksuid(params?: string | $ZodCheckKSUIDParams): this;
1945
+ /** @deprecated Use `z.ipv4()` instead. */
1946
+ ipv4(params?: string | $ZodCheckIPv4Params): this;
1947
+ /** @deprecated Use `z.ipv6()` instead. */
1948
+ ipv6(params?: string | $ZodCheckIPv6Params): this;
1949
+ /** @deprecated Use `z.cidrv4()` instead. */
1950
+ cidrv4(params?: string | $ZodCheckCIDRv4Params): this;
1951
+ /** @deprecated Use `z.cidrv6()` instead. */
1952
+ cidrv6(params?: string | $ZodCheckCIDRv6Params): this;
1953
+ /** @deprecated Use `z.e164()` instead. */
1954
+ e164(params?: string | $ZodCheckE164Params): this;
1955
+ /** @deprecated Use `z.iso.datetime()` instead. */
1956
+ datetime(params?: string | $ZodCheckISODateTimeParams): this;
1957
+ /** @deprecated Use `z.iso.date()` instead. */
1958
+ date(params?: string | $ZodCheckISODateParams): this;
1959
+ /** @deprecated Use `z.iso.time()` instead. */
1960
+ time(params?: string | $ZodCheckISOTimeParams): this;
1961
+ /** @deprecated Use `z.iso.duration()` instead. */
1962
+ duration(params?: string | $ZodCheckISODurationParams): this;
1963
+ }
1964
+ declare const ZodString: $constructor<ZodString>;
1965
+ interface _ZodNumber<Internals extends $ZodNumberInternals = $ZodNumberInternals> extends _ZodType<Internals> {
1966
+ gt(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1967
+ /** Identical to .min() */
1968
+ gte(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1969
+ min(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1970
+ lt(value: number, params?: string | $ZodCheckLessThanParams): this;
1971
+ /** Identical to .max() */
1972
+ lte(value: number, params?: string | $ZodCheckLessThanParams): this;
1973
+ max(value: number, params?: string | $ZodCheckLessThanParams): this;
1974
+ /** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
1975
+ int(params?: string | $ZodCheckNumberFormatParams): this;
1976
+ /** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
1977
+ safe(params?: string | $ZodCheckNumberFormatParams): this;
1978
+ positive(params?: string | $ZodCheckGreaterThanParams): this;
1979
+ nonnegative(params?: string | $ZodCheckGreaterThanParams): this;
1980
+ negative(params?: string | $ZodCheckLessThanParams): this;
1981
+ nonpositive(params?: string | $ZodCheckLessThanParams): this;
1982
+ multipleOf(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1983
+ /** @deprecated Use `.multipleOf()` instead. */
1984
+ step(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1985
+ /** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
1986
+ finite(params?: unknown): this;
1987
+ minValue: number | null;
1988
+ maxValue: number | null;
1989
+ /** @deprecated Check the `format` property instead. */
1990
+ isInt: boolean;
1991
+ /** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
1992
+ isFinite: boolean;
1993
+ format: string | null;
1994
+ }
1995
+ interface ZodNumber extends _ZodNumber<$ZodNumberInternals<number>> {}
1996
+ declare const ZodNumber: $constructor<ZodNumber>;
1997
+ interface _ZodBoolean<T extends $ZodBooleanInternals = $ZodBooleanInternals> extends _ZodType<T> {}
1998
+ interface ZodBoolean extends _ZodBoolean<$ZodBooleanInternals<boolean>> {}
1999
+ declare const ZodBoolean: $constructor<ZodBoolean>;
2000
+ interface ZodUnknown extends _ZodType<$ZodUnknownInternals> {}
2001
+ declare const ZodUnknown: $constructor<ZodUnknown>;
2002
+ interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T>>, $ZodArray<T> {
2003
+ element: T;
2004
+ min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
2005
+ nonempty(params?: string | $ZodCheckMinLengthParams): this;
2006
+ max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
2007
+ length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
2008
+ unwrap(): T;
2009
+ "~standard": ZodStandardSchemaWithJSON<this>;
2010
+ }
2011
+ declare const ZodArray: $constructor<ZodArray>;
2012
+ 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] };
2013
+ interface ZodObject< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodLooseShape, out Config extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape, Config>>, $ZodObject<Shape, Config> {
2014
+ "~standard": ZodStandardSchemaWithJSON<this>;
2015
+ shape: Shape;
2016
+ keyof(): ZodEnum<ToEnum<keyof Shape & string>>;
2017
+ /** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
2018
+ catchall<T extends SomeType>(schema: T): ZodObject<Shape, $catchall<T>>;
2019
+ /** @deprecated Use `z.looseObject()` or `.loose()` instead. */
2020
+ passthrough(): ZodObject<Shape, $loose>;
2021
+ /** Consider `z.looseObject(A.shape)` instead */
2022
+ loose(): ZodObject<Shape, $loose>;
2023
+ /** Consider `z.strictObject(A.shape)` instead */
2024
+ strict(): ZodObject<Shape, $strict>;
2025
+ /** This is the default behavior. This method call is likely unnecessary. */
2026
+ strip(): ZodObject<Shape, $strip>;
2027
+ extend<U extends $ZodLooseShape>(shape: U): ZodObject<Extend<Shape, Writeable<U>>, Config>;
2028
+ safeExtend<U extends $ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, SomeType>>): ZodObject<Extend<Shape, Writeable<U>>, Config>;
2029
+ /**
2030
+ * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
2031
+ */
2032
+ merge<U extends ZodObject>(other: U): ZodObject<Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
2033
+ 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>;
2034
+ 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>;
2035
+ partial(): ZodObject<{ -readonly [k in keyof Shape]: ZodOptional<Shape[k]> }, Config>;
2036
+ partial<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ -readonly [k in keyof Shape]: k extends keyof M ? ZodOptional<Shape[k]> : Shape[k] }, Config>;
2037
+ required(): ZodObject<{ -readonly [k in keyof Shape]: ZodNonOptional<Shape[k]> }, Config>;
2038
+ required<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ -readonly [k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k] }, Config>;
2039
+ }
2040
+ declare const ZodObject: $constructor<ZodObject>;
2041
+ interface ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T>>, $ZodUnion<T> {
2042
+ "~standard": ZodStandardSchemaWithJSON<this>;
2043
+ options: T;
2044
+ }
2045
+ declare const ZodUnion: $constructor<ZodUnion>;
2046
+ interface ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends ZodUnion<Options>, $ZodDiscriminatedUnion<Options, Disc> {
2047
+ "~standard": ZodStandardSchemaWithJSON<this>;
2048
+ _zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
2049
+ def: $ZodDiscriminatedUnionDef<Options, Disc>;
2050
+ }
2051
+ declare const ZodDiscriminatedUnion: $constructor<ZodDiscriminatedUnion>;
2052
+ interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A, B>>, $ZodIntersection<A, B> {
2053
+ "~standard": ZodStandardSchemaWithJSON<this>;
2054
+ }
2055
+ declare const ZodIntersection: $constructor<ZodIntersection>;
2056
+ interface ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends _ZodType<$ZodRecordInternals<Key, Value>>, $ZodRecord<Key, Value> {
2057
+ "~standard": ZodStandardSchemaWithJSON<this>;
2058
+ keyType: Key;
2059
+ valueType: Value;
2060
+ }
2061
+ declare const ZodRecord: $constructor<ZodRecord>;
2062
+ interface ZodEnum< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
2063
+ "~standard": ZodStandardSchemaWithJSON<this>;
2064
+ enum: T;
2065
+ options: Array<T[keyof T]>;
2066
+ extract<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Pick<T, U[number]>>>;
2067
+ exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Omit<T, U[number]>>>;
2068
+ }
2069
+ declare const ZodEnum: $constructor<ZodEnum>;
2070
+ interface ZodLiteral<T extends Literal = Literal> extends _ZodType<$ZodLiteralInternals<T>>, $ZodLiteral<T> {
2071
+ "~standard": ZodStandardSchemaWithJSON<this>;
2072
+ values: Set<T>;
2073
+ /** @legacy Use `.values` instead. Accessing this property will throw an error if the literal accepts multiple values. */
2074
+ value: T;
2075
+ }
2076
+ declare const ZodLiteral: $constructor<ZodLiteral>;
2077
+ interface ZodTransform<O = unknown, I = unknown> extends _ZodType<$ZodTransformInternals<O, I>>, $ZodTransform<O, I> {
2078
+ "~standard": ZodStandardSchemaWithJSON<this>;
2079
+ }
2080
+ declare const ZodTransform: $constructor<ZodTransform>;
2081
+ interface ZodOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodOptionalInternals<T>>, $ZodOptional<T> {
2082
+ "~standard": ZodStandardSchemaWithJSON<this>;
2083
+ unwrap(): T;
2084
+ }
2085
+ declare const ZodOptional: $constructor<ZodOptional>;
2086
+ interface ZodExactOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodExactOptionalInternals<T>>, $ZodExactOptional<T> {
2087
+ "~standard": ZodStandardSchemaWithJSON<this>;
2088
+ unwrap(): T;
2089
+ }
2090
+ declare const ZodExactOptional: $constructor<ZodExactOptional>;
2091
+ interface ZodNullable<T extends SomeType = $ZodType> extends _ZodType<$ZodNullableInternals<T>>, $ZodNullable<T> {
2092
+ "~standard": ZodStandardSchemaWithJSON<this>;
2093
+ unwrap(): T;
2094
+ }
2095
+ declare const ZodNullable: $constructor<ZodNullable>;
2096
+ interface ZodDefault<T extends SomeType = $ZodType> extends _ZodType<$ZodDefaultInternals<T>>, $ZodDefault<T> {
2097
+ "~standard": ZodStandardSchemaWithJSON<this>;
2098
+ unwrap(): T;
2099
+ /** @deprecated Use `.unwrap()` instead. */
2100
+ removeDefault(): T;
2101
+ }
2102
+ declare const ZodDefault: $constructor<ZodDefault>;
2103
+ interface ZodPrefault<T extends SomeType = $ZodType> extends _ZodType<$ZodPrefaultInternals<T>>, $ZodPrefault<T> {
2104
+ "~standard": ZodStandardSchemaWithJSON<this>;
2105
+ unwrap(): T;
2106
+ }
2107
+ declare const ZodPrefault: $constructor<ZodPrefault>;
2108
+ interface ZodNonOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodNonOptionalInternals<T>>, $ZodNonOptional<T> {
2109
+ "~standard": ZodStandardSchemaWithJSON<this>;
2110
+ unwrap(): T;
2111
+ }
2112
+ declare const ZodNonOptional: $constructor<ZodNonOptional>;
2113
+ interface ZodCatch<T extends SomeType = $ZodType> extends _ZodType<$ZodCatchInternals<T>>, $ZodCatch<T> {
2114
+ "~standard": ZodStandardSchemaWithJSON<this>;
2115
+ unwrap(): T;
2116
+ /** @deprecated Use `.unwrap()` instead. */
2117
+ removeCatch(): T;
2118
+ }
2119
+ declare const ZodCatch: $constructor<ZodCatch>;
2120
+ interface ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A, B>>, $ZodPipe<A, B> {
2121
+ "~standard": ZodStandardSchemaWithJSON<this>;
2122
+ in: A;
2123
+ out: B;
2124
+ }
2125
+ declare const ZodPipe: $constructor<ZodPipe>;
2126
+ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadonlyInternals<T>>, $ZodReadonly<T> {
2127
+ "~standard": ZodStandardSchemaWithJSON<this>;
2128
+ unwrap(): T;
2129
+ }
2130
+ declare const ZodReadonly: $constructor<ZodReadonly>;
2131
+ //#endregion
2132
+ //#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
2133
+ // ==================================================================================================
2134
+ // JSON Schema Draft 07
2135
+ // ==================================================================================================
2136
+ // https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
2137
+ // --------------------------------------------------------------------------------------------------
2138
+ /**
2139
+ * Primitive type
2140
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
2141
+ */
2142
+ type JSONSchema7TypeName = "string" //
2143
+ | "number" | "integer" | "boolean" | "object" | "array" | "null";
2144
+ /**
2145
+ * Primitive type
2146
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
2147
+ */
2148
+ type JSONSchema7Type = string //
2149
+ | number | boolean | JSONSchema7Object | JSONSchema7Array | null;
2150
+ // Workaround for infinite type recursion
2151
+ interface JSONSchema7Object {
2152
+ [key: string]: JSONSchema7Type;
2153
+ }
2154
+ // Workaround for infinite type recursion
2155
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
2156
+ interface JSONSchema7Array extends Array<JSONSchema7Type> {}
2157
+ /**
2158
+ * Meta schema
2159
+ *
2160
+ * Recommended values:
2161
+ * - 'http://json-schema.org/schema#'
2162
+ * - 'http://json-schema.org/hyper-schema#'
2163
+ * - 'http://json-schema.org/draft-07/schema#'
2164
+ * - 'http://json-schema.org/draft-07/hyper-schema#'
2165
+ *
2166
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
2167
+ */
2168
+ type JSONSchema7Version = string;
2169
+ /**
2170
+ * JSON Schema v7
2171
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
2172
+ */
2173
+ type JSONSchema7Definition = JSONSchema7 | boolean;
2174
+ interface JSONSchema7 {
2175
+ $id?: string | undefined;
2176
+ $ref?: string | undefined;
2177
+ $schema?: JSONSchema7Version | undefined;
2178
+ $comment?: string | undefined;
2179
+ /**
2180
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
2181
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
2182
+ */
2183
+ $defs?: {
2184
+ [key: string]: JSONSchema7Definition;
2185
+ } | undefined;
2186
+ /**
2187
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
2188
+ */
2189
+ type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
2190
+ enum?: JSONSchema7Type[] | undefined;
2191
+ const?: JSONSchema7Type | undefined;
2192
+ /**
2193
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
2194
+ */
2195
+ multipleOf?: number | undefined;
2196
+ maximum?: number | undefined;
2197
+ exclusiveMaximum?: number | undefined;
2198
+ minimum?: number | undefined;
2199
+ exclusiveMinimum?: number | undefined;
2200
+ /**
2201
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
2202
+ */
2203
+ maxLength?: number | undefined;
2204
+ minLength?: number | undefined;
2205
+ pattern?: string | undefined;
2206
+ /**
2207
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
2208
+ */
2209
+ items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
2210
+ additionalItems?: JSONSchema7Definition | undefined;
2211
+ maxItems?: number | undefined;
2212
+ minItems?: number | undefined;
2213
+ uniqueItems?: boolean | undefined;
2214
+ contains?: JSONSchema7Definition | undefined;
2215
+ /**
2216
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
2217
+ */
2218
+ maxProperties?: number | undefined;
2219
+ minProperties?: number | undefined;
2220
+ required?: string[] | undefined;
2221
+ properties?: {
2222
+ [key: string]: JSONSchema7Definition;
2223
+ } | undefined;
2224
+ patternProperties?: {
2225
+ [key: string]: JSONSchema7Definition;
2226
+ } | undefined;
2227
+ additionalProperties?: JSONSchema7Definition | undefined;
2228
+ dependencies?: {
2229
+ [key: string]: JSONSchema7Definition | string[];
2230
+ } | undefined;
2231
+ propertyNames?: JSONSchema7Definition | undefined;
2232
+ /**
2233
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
2234
+ */
2235
+ if?: JSONSchema7Definition | undefined;
2236
+ then?: JSONSchema7Definition | undefined;
2237
+ else?: JSONSchema7Definition | undefined;
2238
+ /**
2239
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
2240
+ */
2241
+ allOf?: JSONSchema7Definition[] | undefined;
2242
+ anyOf?: JSONSchema7Definition[] | undefined;
2243
+ oneOf?: JSONSchema7Definition[] | undefined;
2244
+ not?: JSONSchema7Definition | undefined;
2245
+ /**
2246
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
2247
+ */
2248
+ format?: string | undefined;
2249
+ /**
2250
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
2251
+ */
2252
+ contentMediaType?: string | undefined;
2253
+ contentEncoding?: string | undefined;
2254
+ /**
2255
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
2256
+ */
2257
+ definitions?: {
2258
+ [key: string]: JSONSchema7Definition;
2259
+ } | undefined;
2260
+ /**
2261
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
2262
+ */
2263
+ title?: string | undefined;
2264
+ description?: string | undefined;
2265
+ default?: JSONSchema7Type | undefined;
2266
+ readOnly?: boolean | undefined;
2267
+ writeOnly?: boolean | undefined;
2268
+ examples?: JSONSchema7Type | undefined;
2269
+ }
2270
+ //#endregion
2271
+ //#region ../graph-tools/dist/index.d.mts
2272
+ //#endregion
2273
+ //#region src/codegenTypes.d.ts
2274
+ interface CodeGenAction {
2275
+ /** Graph-native block id, referenced by `@statelyai.action.*` transitions. */
2276
+ id?: string;
2277
+ type: string;
2278
+ params?: Record<string, unknown>;
2279
+ }
2280
+ interface CodeGenGuard {
2281
+ type: string;
2282
+ code?: string;
2283
+ params?: Record<string, unknown>;
2284
+ }
2285
+ /**
2286
+ * Serialized inline expression directive.
2287
+ *
2288
+ * Code generation treats this object as JavaScript/TypeScript source, not as a
2289
+ * machine config object. It is used for fields such as invoke `input` and
2290
+ * `output` where XState accepts mapper expressions.
2291
+ */
2292
+ interface CodeExpression {
2293
+ '@type': 'code';
2294
+ lang: 'js' | 'ts';
2295
+ expr: string;
2296
+ imports?: CodeImport[];
2297
+ }
2298
+ interface CodeImport {
2299
+ package: string;
2300
+ import: string;
2301
+ importKind?: 'named' | 'default' | 'namespace';
2302
+ version?: string;
2303
+ }
2304
+ interface CodeGenInvoke {
2305
+ src: string;
2306
+ id: string;
2307
+ invocationId?: string;
2308
+ input?: Record<string, unknown> | CodeExpression;
2309
+ output?: Record<string, unknown> | CodeExpression;
2310
+ }
2311
+ interface CodeGenNodeData {
2312
+ nodeId?: string | null;
2313
+ key: string;
2314
+ type?: 'normal' | 'parallel' | 'final' | 'history' | 'choice' | null;
2315
+ initialId?: string | null;
2316
+ history?: 'shallow' | 'deep' | boolean;
2317
+ output?: Record<string, unknown> | CodeExpression;
2318
+ entry?: CodeGenAction[];
2319
+ exit?: CodeGenAction[];
2320
+ invokes?: CodeGenInvoke[];
2321
+ tags?: Array<string | {
2322
+ name: string;
2323
+ }>;
2324
+ description?: string | null;
2325
+ meta?: Record<string, unknown> | null;
2326
+ color?: string;
2327
+ parentId?: string | null;
2328
+ temp?: unknown;
2329
+ }
2330
+ interface CodeGenEdgeData {
2331
+ eventType: string;
2332
+ transitionType?: 'normal' | 'targetless' | 'reenter';
2333
+ guard?: CodeGenGuard | null;
2334
+ context?: Record<string, unknown> | CodeExpression;
2335
+ actions?: CodeGenAction[];
2336
+ description?: string | null;
2337
+ color?: string;
2338
+ meta?: Record<string, unknown> | null;
2339
+ temp?: unknown;
2340
+ }
2341
+ interface CodeGenImplementation {
2342
+ id: string;
2343
+ name: string;
2344
+ description?: string | null;
2345
+ icon?: string;
2346
+ paramsSchema?: JSONSchema7 | null;
2347
+ code?: {
2348
+ body: string;
2349
+ lang?: string;
2350
+ } | null;
2351
+ }
2352
+ interface CodeGenActorImplementation {
2353
+ id: string;
2354
+ name: string;
2355
+ description?: string | null;
2356
+ icon?: string;
2357
+ inputSchema?: JSONSchema7 | null;
2358
+ outputSchema?: JSONSchema7 | null;
2359
+ code?: {
2360
+ body: string;
2361
+ lang?: string;
2362
+ } | null;
2363
+ }
2364
+ interface CodeGenGraphData {
2365
+ context?: Record<string, unknown> | CodeExpression | null;
2366
+ schemas?: {
2367
+ context?: Record<string, JSONSchema7> | null;
2368
+ events?: Record<string, JSONSchema7> | null;
2369
+ input?: JSONSchema7 | null;
2370
+ output?: JSONSchema7 | null;
2371
+ } | null;
2372
+ implementations?: {
2373
+ actions: CodeGenImplementation[];
2374
+ guards: CodeGenImplementation[];
2375
+ actors: CodeGenActorImplementation[];
2376
+ delays: CodeGenImplementation[];
2377
+ } | null;
2378
+ }
2379
+ interface CodeGenNode {
2380
+ id: string;
2381
+ parentId?: string | null;
2382
+ data: CodeGenNodeData;
2383
+ }
2384
+ interface CodeGenEdge {
2385
+ id: string;
2386
+ sourceId: string;
2387
+ targetId: string;
2388
+ data: CodeGenEdgeData;
2389
+ }
2390
+ interface CodeGenGraph {
2391
+ id: string;
2392
+ nodes: CodeGenNode[];
2393
+ edges: CodeGenEdge[];
2394
+ data: CodeGenGraphData;
2395
+ } //#endregion
2396
+ //#region src/graphToMachineConfig.d.ts
2397
+ interface MachineConfigOptions {
2398
+ showDescriptions?: boolean;
2399
+ showMeta?: boolean;
2400
+ /**
2401
+ * Emit inline-code guards as a `{ type }` reference instead of an inline code
2402
+ * expression directive. The simulation needs this: it can't evaluate guard
2403
+ * source, so it stubs each guard by `type` (see getSimImplementations). A
2404
+ * code-expression guard has no `type`, so XState reads `undefined` and throws
2405
+ * "Guard 'undefined' is not implemented" the moment that transition is taken.
2406
+ */
2407
+ inlineGuardsAsTypeRef?: boolean;
2408
+ }
2409
+ declare function graphToMachineConfig(graph: CodeGenGraph, options?: MachineConfigOptions): UnknownMachineConfig; //#endregion
2410
+ //#region src/serializeJS.d.ts
2411
+ /**
2412
+ * Serializes JavaScript values as JS source code (not JSON).
2413
+ * - Unquoted keys for valid identifiers
2414
+ * - Single-quoted strings
2415
+ * - Omits undefined values
2416
+ * - Supports RawCode for verbatim expressions
2417
+ * - Supports inline expression directives for verbatim expressions
2418
+ */
2419
+ declare class RawCode {
2420
+ code: string;
2421
+ constructor(code: string);
2422
+ }
2423
+ declare function raw(code: string): RawCode;
2424
+ declare function serializeJS(value: unknown, indent?: number, step?: number): string; //#endregion
2425
+ //#region src/graphToXStateTS.d.ts
2426
+ interface XStateTSOptions extends MachineConfigOptions {
2427
+ exportStyle?: 'named' | 'default' | 'none';
2428
+ targetLanguage?: 'typescript' | 'javascript';
2429
+ xstateVersion?: 5 | 6;
2430
+ }
2431
+ declare function graphToXStateTS(graph: CodeGenGraph, options?: XStateTSOptions): string; //#endregion
2432
+ //#region src/jsonSchemaToTSType.d.ts
2433
+ declare function jsonSchemaToTSType(schema: JSONSchema7 | undefined | null): string;
2434
+ /**
2435
+ * Build an inline context type string from the schemas.context record.
2436
+ * Each key is a context property name, value is its JSONSchema7.
2437
+ */
2438
+ declare function contextSchemaToTSType(context: Record<string, JSONSchema7> | null | undefined): string | null;
2439
+ /**
2440
+ * Build an event union type from the schemas.events record.
2441
+ * Each key is the event type name, value describes the payload properties.
2442
+ */
2443
+ declare function eventsSchemaToTSType(events: Record<string, JSONSchema7> | null | undefined): string | null; //#endregion
2444
+ //#region src/graphPaths.d.ts
2445
+ declare const canvasColorSchema: ZodEnum<{
2446
+ green: "green";
2447
+ red: "red";
2448
+ purple: "purple";
2449
+ blue: "blue";
2450
+ orange: "orange";
2451
+ yellow: "yellow";
2452
+ pink: "pink";
2453
+ teal: "teal";
2454
+ }>;
2455
+ type CanvasColor = output<typeof canvasColorSchema>;
2456
+ declare const editorStateTypeSchema: ZodNullable<ZodEnum<{
2457
+ normal: "normal";
2458
+ parallel: "parallel";
2459
+ history: "history";
2460
+ final: "final";
2461
+ choice: "choice";
2462
+ }>>;
2463
+ type EditorStateType = output<typeof editorStateTypeSchema>;
2464
+ declare const actionLocationSchema: ZodUnion<readonly [ZodObject<{
2465
+ nodeId: ZodString;
2466
+ group: ZodEnum<{
2467
+ entry: "entry";
2468
+ exit: "exit";
2469
+ }>;
2470
+ }, $strip>, ZodObject<{
2471
+ edgeId: ZodString;
2472
+ group: ZodLiteral<"transition">;
2473
+ }, $strip>]>;
2474
+ type ActionLocation = output<typeof actionLocationSchema>;
2475
+ declare const implementationSourceTypeSchema: ZodEnum<{
2476
+ action: "action";
2477
+ guard: "guard";
2478
+ actor: "actor";
2479
+ delay: "delay";
2480
+ }>;
2481
+ type ImplementationSourceType = output<typeof implementationSourceTypeSchema>;
2482
+ /** Full union: generic graph ops + semantic state machine ops */
2483
+ declare const graphPatchSchema: ZodDiscriminatedUnion<[ZodObject<{
2484
+ op: ZodLiteral<"createNode">;
2485
+ description: ZodOptional<ZodString>;
2486
+ id: ZodOptional<ZodString>;
2487
+ parentId: ZodString;
2488
+ key: ZodString;
2489
+ type: ZodOptional<ZodNullable<ZodEnum<{
2490
+ normal: "normal";
2491
+ parallel: "parallel";
2492
+ history: "history";
2493
+ final: "final";
2494
+ choice: "choice";
2495
+ }>>>;
2496
+ x: ZodOptional<ZodNumber>;
2497
+ y: ZodOptional<ZodNumber>;
2498
+ }, $strip>, ZodObject<{
2499
+ op: ZodLiteral<"updateNode">;
2500
+ description: ZodOptional<ZodString>;
2501
+ nodeId: ZodString;
2502
+ data: ZodObject<{
2503
+ key: ZodOptional<ZodString>;
2504
+ type: ZodOptional<ZodNullable<ZodEnum<{
2505
+ normal: "normal";
2506
+ parallel: "parallel";
2507
+ history: "history";
2508
+ final: "final";
2509
+ choice: "choice";
2510
+ }>>>;
2511
+ description: ZodOptional<ZodString>;
2512
+ initialId: ZodOptional<ZodNullable<ZodString>>;
2513
+ }, $strip>;
2514
+ }, $strip>, ZodObject<{
2515
+ op: ZodLiteral<"deleteNode">;
2516
+ description: ZodOptional<ZodString>;
2517
+ nodeId: ZodString;
2518
+ }, $strip>, ZodObject<{
2519
+ op: ZodLiteral<"createEdge">;
2520
+ description: ZodOptional<ZodString>;
2521
+ id: ZodOptional<ZodString>;
2522
+ sourceId: ZodString;
2523
+ targetId: ZodString;
2524
+ eventType: ZodString;
2525
+ transitionType: ZodOptional<ZodEnum<{
2526
+ normal: "normal";
2527
+ targetless: "targetless";
2528
+ reenter: "reenter";
2529
+ }>>;
2530
+ }, $strip>, ZodObject<{
2531
+ op: ZodLiteral<"updateEdge">;
2532
+ description: ZodOptional<ZodString>;
2533
+ edgeId: ZodString;
2534
+ data: ZodObject<{
2535
+ sourceId: ZodOptional<ZodString>;
2536
+ targetId: ZodOptional<ZodString>;
2537
+ eventType: ZodOptional<ZodString>;
2538
+ transitionType: ZodOptional<ZodEnum<{
2539
+ normal: "normal";
2540
+ targetless: "targetless";
2541
+ reenter: "reenter";
2542
+ }>>;
2543
+ description: ZodOptional<ZodNullable<ZodString>>;
2544
+ }, $strip>;
2545
+ }, $strip>, ZodObject<{
2546
+ op: ZodLiteral<"deleteEdge">;
2547
+ description: ZodOptional<ZodString>;
2548
+ edgeId: ZodString;
2549
+ }, $strip>, ZodObject<{
2550
+ op: ZodLiteral<"createState">;
2551
+ description: ZodOptional<ZodString>;
2552
+ id: ZodOptional<ZodString>;
2553
+ parentId: ZodString;
2554
+ key: ZodString;
2555
+ type: ZodOptional<ZodNullable<ZodEnum<{
2556
+ normal: "normal";
2557
+ parallel: "parallel";
2558
+ history: "history";
2559
+ final: "final";
2560
+ choice: "choice";
2561
+ }>>>;
2562
+ x: ZodOptional<ZodNumber>;
2563
+ y: ZodOptional<ZodNumber>;
2564
+ color: ZodOptional<ZodNullable<ZodEnum<{
2565
+ green: "green";
2566
+ red: "red";
2567
+ purple: "purple";
2568
+ blue: "blue";
2569
+ orange: "orange";
2570
+ yellow: "yellow";
2571
+ pink: "pink";
2572
+ teal: "teal";
2573
+ }>>>;
2574
+ initial: ZodOptional<ZodBoolean>;
2575
+ }, $strip>, ZodObject<{
2576
+ op: ZodLiteral<"updateState">;
2577
+ description: ZodOptional<ZodString>;
2578
+ stateId: ZodString;
2579
+ key: ZodOptional<ZodString>;
2580
+ type: ZodOptional<ZodNullable<ZodEnum<{
2581
+ normal: "normal";
2582
+ parallel: "parallel";
2583
+ history: "history";
2584
+ final: "final";
2585
+ choice: "choice";
2586
+ }>>>;
2587
+ stateDescription: ZodOptional<ZodString>;
2588
+ initialId: ZodOptional<ZodNullable<ZodString>>;
2589
+ color: ZodOptional<ZodNullable<ZodEnum<{
2590
+ green: "green";
2591
+ red: "red";
2592
+ purple: "purple";
2593
+ blue: "blue";
2594
+ orange: "orange";
2595
+ yellow: "yellow";
2596
+ pink: "pink";
2597
+ teal: "teal";
2598
+ }>>>;
2599
+ meta: ZodOptional<ZodNullable<ZodRecord<ZodString, ZodUnknown>>>;
2600
+ history: ZodOptional<ZodNullable<ZodEnum<{
2601
+ shallow: "shallow";
2602
+ deep: "deep";
2603
+ }>>>;
2604
+ }, $strip>, ZodObject<{
2605
+ op: ZodLiteral<"deleteState">;
2606
+ description: ZodOptional<ZodString>;
2607
+ stateId: ZodString;
2608
+ }, $strip>, ZodObject<{
2609
+ op: ZodLiteral<"createTransition">;
2610
+ description: ZodOptional<ZodString>;
2611
+ id: ZodOptional<ZodString>;
2612
+ sourceId: ZodString;
2613
+ targetId: ZodString;
2614
+ eventType: ZodString;
2615
+ transitionType: ZodOptional<ZodEnum<{
2616
+ normal: "normal";
2617
+ targetless: "targetless";
2618
+ reenter: "reenter";
2619
+ }>>;
2620
+ guard: ZodOptional<ZodObject<{
2621
+ type: ZodString;
2622
+ code: ZodOptional<ZodString>;
2623
+ params: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2624
+ }, $strip>>;
2625
+ color: ZodOptional<ZodNullable<ZodEnum<{
2626
+ green: "green";
2627
+ red: "red";
2628
+ purple: "purple";
2629
+ blue: "blue";
2630
+ orange: "orange";
2631
+ yellow: "yellow";
2632
+ pink: "pink";
2633
+ teal: "teal";
2634
+ }>>>;
2635
+ transitionDescription: ZodOptional<ZodNullable<ZodString>>;
2636
+ }, $strip>, ZodObject<{
2637
+ op: ZodLiteral<"updateTransition">;
2638
+ description: ZodOptional<ZodString>;
2639
+ transitionId: ZodString;
2640
+ sourceId: ZodOptional<ZodString>;
2641
+ targetId: ZodOptional<ZodString>;
2642
+ eventType: ZodOptional<ZodString>;
2643
+ transitionType: ZodOptional<ZodEnum<{
2644
+ normal: "normal";
2645
+ targetless: "targetless";
2646
+ reenter: "reenter";
2647
+ }>>;
2648
+ transitionDescription: ZodOptional<ZodNullable<ZodString>>;
2649
+ color: ZodOptional<ZodNullable<ZodEnum<{
2650
+ green: "green";
2651
+ red: "red";
2652
+ purple: "purple";
2653
+ blue: "blue";
2654
+ orange: "orange";
2655
+ yellow: "yellow";
2656
+ pink: "pink";
2657
+ teal: "teal";
2658
+ }>>>;
2659
+ meta: ZodOptional<ZodNullable<ZodRecord<ZodString, ZodUnknown>>>;
2660
+ }, $strip>, ZodObject<{
2661
+ op: ZodLiteral<"deleteTransition">;
2662
+ description: ZodOptional<ZodString>;
2663
+ transitionId: ZodString;
2664
+ }, $strip>, ZodObject<{
2665
+ op: ZodLiteral<"createAction">;
2666
+ description: ZodOptional<ZodString>;
2667
+ location: ZodUnion<readonly [ZodObject<{
2668
+ nodeId: ZodString;
2669
+ group: ZodEnum<{
2670
+ entry: "entry";
2671
+ exit: "exit";
2672
+ }>;
2673
+ }, $strip>, ZodObject<{
2674
+ edgeId: ZodString;
2675
+ group: ZodLiteral<"transition">;
2676
+ }, $strip>]>;
2677
+ action: ZodObject<{
2678
+ id: ZodOptional<ZodString>;
2679
+ type: ZodString;
2680
+ params: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2681
+ }, $strip>;
2682
+ index: ZodOptional<ZodNumber>;
2683
+ }, $strip>, ZodObject<{
2684
+ op: ZodLiteral<"updateAction">;
2685
+ description: ZodOptional<ZodString>;
2686
+ location: ZodUnion<readonly [ZodObject<{
2687
+ nodeId: ZodString;
2688
+ group: ZodEnum<{
2689
+ entry: "entry";
2690
+ exit: "exit";
2691
+ }>;
2692
+ }, $strip>, ZodObject<{
2693
+ edgeId: ZodString;
2694
+ group: ZodLiteral<"transition">;
2695
+ }, $strip>]>;
2696
+ actionId: ZodString;
2697
+ data: ZodObject<{
2698
+ type: ZodOptional<ZodString>;
2699
+ params: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2700
+ }, $strip>;
2701
+ }, $strip>, ZodObject<{
2702
+ op: ZodLiteral<"deleteAction">;
2703
+ description: ZodOptional<ZodString>;
2704
+ location: ZodUnion<readonly [ZodObject<{
2705
+ nodeId: ZodString;
2706
+ group: ZodEnum<{
2707
+ entry: "entry";
2708
+ exit: "exit";
2709
+ }>;
2710
+ }, $strip>, ZodObject<{
2711
+ edgeId: ZodString;
2712
+ group: ZodLiteral<"transition">;
2713
+ }, $strip>]>;
2714
+ actionId: ZodString;
2715
+ }, $strip>, ZodObject<{
2716
+ op: ZodLiteral<"createInvoke">;
2717
+ description: ZodOptional<ZodString>;
2718
+ nodeId: ZodString;
2719
+ invoke: ZodObject<{
2720
+ id: ZodOptional<ZodString>;
2721
+ invocationId: ZodOptional<ZodString>;
2722
+ src: ZodString;
2723
+ code: ZodOptional<ZodString>;
2724
+ input: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2725
+ output: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2726
+ }, $strip>;
2727
+ }, $strip>, ZodObject<{
2728
+ op: ZodLiteral<"updateInvoke">;
2729
+ description: ZodOptional<ZodString>;
2730
+ nodeId: ZodString;
2731
+ invokeId: ZodString;
2732
+ data: ZodObject<{
2733
+ invocationId: ZodOptional<ZodString>;
2734
+ src: ZodOptional<ZodString>;
2735
+ code: ZodOptional<ZodString>;
2736
+ input: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2737
+ output: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2738
+ }, $strip>;
2739
+ }, $strip>, ZodObject<{
2740
+ op: ZodLiteral<"deleteInvoke">;
2741
+ description: ZodOptional<ZodString>;
2742
+ nodeId: ZodString;
2743
+ invokeId: ZodString;
2744
+ }, $strip>, ZodObject<{
2745
+ op: ZodLiteral<"createImplementation">;
2746
+ description: ZodOptional<ZodString>;
2747
+ sourceType: ZodEnum<{
2748
+ action: "action";
2749
+ guard: "guard";
2750
+ actor: "actor";
2751
+ delay: "delay";
2752
+ }>;
2753
+ implementation: ZodObject<{
2754
+ id: ZodString;
2755
+ name: ZodOptional<ZodString>;
2756
+ code: ZodOptional<ZodString>;
2757
+ }, $strip>;
2758
+ }, $strip>, ZodObject<{
2759
+ op: ZodLiteral<"updateImplementation">;
2760
+ description: ZodOptional<ZodString>;
2761
+ sourceType: ZodEnum<{
2762
+ action: "action";
2763
+ guard: "guard";
2764
+ actor: "actor";
2765
+ delay: "delay";
2766
+ }>;
2767
+ implementationId: ZodString;
2768
+ data: ZodObject<{
2769
+ name: ZodOptional<ZodString>;
2770
+ code: ZodOptional<ZodString>;
2771
+ }, $strip>;
2772
+ }, $strip>, ZodObject<{
2773
+ op: ZodLiteral<"deleteImplementation">;
2774
+ description: ZodOptional<ZodString>;
2775
+ sourceType: ZodEnum<{
2776
+ action: "action";
2777
+ guard: "guard";
2778
+ actor: "actor";
2779
+ delay: "delay";
2780
+ }>;
2781
+ implementationId: ZodString;
2782
+ }, $strip>, ZodObject<{
2783
+ op: ZodLiteral<"setGuard">;
2784
+ description: ZodOptional<ZodString>;
2785
+ edgeId: ZodString;
2786
+ guard: ZodObject<{
2787
+ type: ZodString;
2788
+ code: ZodOptional<ZodString>;
2789
+ params: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2790
+ }, $strip>;
2791
+ }, $strip>, ZodObject<{
2792
+ op: ZodLiteral<"deleteGuard">;
2793
+ description: ZodOptional<ZodString>;
2794
+ edgeId: ZodString;
2795
+ }, $strip>, ZodObject<{
2796
+ op: ZodLiteral<"createTag">;
2797
+ description: ZodOptional<ZodString>;
2798
+ nodeId: ZodString;
2799
+ tag: ZodObject<{
2800
+ name: ZodString;
2801
+ }, $strip>;
2802
+ }, $strip>, ZodObject<{
2803
+ op: ZodLiteral<"deleteTag">;
2804
+ description: ZodOptional<ZodString>;
2805
+ nodeId: ZodString;
2806
+ tagName: ZodString;
2807
+ }, $strip>, ZodObject<{
2808
+ op: ZodLiteral<"createAnnotation">;
2809
+ description: ZodOptional<ZodString>;
2810
+ id: ZodOptional<ZodString>;
2811
+ parentId: ZodNullable<ZodString>;
2812
+ content: ZodString;
2813
+ x: ZodOptional<ZodNumber>;
2814
+ y: ZodOptional<ZodNumber>;
2815
+ }, $strip>, ZodObject<{
2816
+ op: ZodLiteral<"updateAnnotation">;
2817
+ description: ZodOptional<ZodString>;
2818
+ annotationId: ZodString;
2819
+ data: ZodObject<{
2820
+ content: ZodOptional<ZodString>;
2821
+ }, $strip>;
2822
+ }, $strip>, ZodObject<{
2823
+ op: ZodLiteral<"deleteAnnotation">;
2824
+ description: ZodOptional<ZodString>;
2825
+ annotationId: ZodString;
2826
+ }, $strip>, ZodObject<{
2827
+ op: ZodLiteral<"setContext">;
2828
+ description: ZodOptional<ZodString>;
2829
+ context: ZodRecord<ZodString, ZodUnknown>;
2830
+ }, $strip>, ZodObject<{
2831
+ op: ZodLiteral<"updateSchemas">;
2832
+ description: ZodOptional<ZodString>;
2833
+ schemas: ZodObject<{
2834
+ context: ZodOptional<ZodNullable<ZodRecord<ZodString, ZodUnknown>>>;
2835
+ events: ZodOptional<ZodNullable<ZodRecord<ZodString, ZodUnknown>>>;
2836
+ input: ZodOptional<ZodNullable<ZodUnknown>>;
2837
+ output: ZodOptional<ZodNullable<ZodUnknown>>;
2838
+ }, $strip>;
2839
+ }, $strip>], "op">;
2840
+ type GraphPatch = output<typeof graphPatchSchema>;
2841
+ /** AI-only schema: semantic ops + shared ops (no generic graph ops) */
2842
+ //#endregion
2843
+ export { serializeJS as _, EditorStateType as a, MachineConfigOptions as c, contextSchemaToTSType as d, eventsSchemaToTSType as f, raw as g, jsonSchemaToTSType as h, CodeGenGraph as i, RawCode as l, graphToXStateTS as m, CanvasColor as n, GraphPatch as o, graphToMachineConfig as p, CodeExpression as r, ImplementationSourceType as s, ActionLocation as t, XStateTSOptions as u };