@vscode/web-editors 0.0.2-0

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,2643 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { HubRpcConnection, InterfaceClient, InterfaceDefinition, MemberMap } from "@vscode/hubrpc";
6
+ import { MessageEndpoint, MessageLikeEvent, WindowMessageTransport } from "@vscode/hubrpc/web";
7
+ import { HubAccessDuration, HubAccessRequest, HubAccessResult } from "@vscode/hubrpc/hub/common";
8
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema.d.cts
9
+ type _JSONSchema = boolean | JSONSchema;
10
+ type JSONSchema = {
11
+ [k: string]: unknown;
12
+ $schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
13
+ $id?: string;
14
+ $anchor?: string;
15
+ $ref?: string;
16
+ $dynamicRef?: string;
17
+ $dynamicAnchor?: string;
18
+ $vocabulary?: Record<string, boolean>;
19
+ $comment?: string;
20
+ $defs?: Record<string, JSONSchema>;
21
+ type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
22
+ additionalItems?: _JSONSchema;
23
+ unevaluatedItems?: _JSONSchema;
24
+ prefixItems?: _JSONSchema[];
25
+ items?: _JSONSchema | _JSONSchema[];
26
+ contains?: _JSONSchema;
27
+ additionalProperties?: _JSONSchema;
28
+ unevaluatedProperties?: _JSONSchema;
29
+ properties?: Record<string, _JSONSchema>;
30
+ patternProperties?: Record<string, _JSONSchema>;
31
+ dependentSchemas?: Record<string, _JSONSchema>;
32
+ propertyNames?: _JSONSchema;
33
+ if?: _JSONSchema;
34
+ then?: _JSONSchema;
35
+ else?: _JSONSchema;
36
+ allOf?: JSONSchema[];
37
+ anyOf?: JSONSchema[];
38
+ oneOf?: JSONSchema[];
39
+ not?: _JSONSchema;
40
+ multipleOf?: number;
41
+ maximum?: number;
42
+ exclusiveMaximum?: number | boolean;
43
+ minimum?: number;
44
+ exclusiveMinimum?: number | boolean;
45
+ maxLength?: number;
46
+ minLength?: number;
47
+ pattern?: string;
48
+ maxItems?: number;
49
+ minItems?: number;
50
+ uniqueItems?: boolean;
51
+ maxContains?: number;
52
+ minContains?: number;
53
+ maxProperties?: number;
54
+ minProperties?: number;
55
+ required?: string[];
56
+ dependentRequired?: Record<string, string[]>;
57
+ enum?: Array<string | number | boolean | null>;
58
+ const?: string | number | boolean | null;
59
+ id?: string;
60
+ title?: string;
61
+ description?: string;
62
+ default?: unknown;
63
+ deprecated?: boolean;
64
+ readOnly?: boolean;
65
+ writeOnly?: boolean;
66
+ nullable?: boolean;
67
+ examples?: unknown[];
68
+ format?: string;
69
+ contentMediaType?: string;
70
+ contentEncoding?: string;
71
+ contentSchema?: JSONSchema;
72
+ _prefault?: unknown;
73
+ };
74
+ type BaseSchema = JSONSchema;
75
+ //#endregion
76
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/standard-schema.d.cts
77
+ /** The Standard interface. */
78
+ interface StandardTypedV1<Input = unknown, Output = Input> {
79
+ /** The Standard properties. */
80
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
81
+ }
82
+ declare namespace StandardTypedV1 {
83
+ /** The Standard properties interface. */
84
+ interface Props<Input = unknown, Output = Input> {
85
+ /** The version number of the standard. */
86
+ readonly version: 1;
87
+ /** The vendor name of the schema library. */
88
+ readonly vendor: string;
89
+ /** Inferred types associated with the schema. */
90
+ readonly types?: Types<Input, Output> | undefined;
91
+ }
92
+ /** The Standard types interface. */
93
+ interface Types<Input = unknown, Output = Input> {
94
+ /** The input type of the schema. */
95
+ readonly input: Input;
96
+ /** The output type of the schema. */
97
+ readonly output: Output;
98
+ }
99
+ /** Infers the input type of a Standard. */
100
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
101
+ /** Infers the output type of a Standard. */
102
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
103
+ }
104
+ /** The Standard Schema interface. */
105
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
106
+ /** The Standard Schema properties. */
107
+ readonly "~standard": StandardSchemaV1.Props<Input, Output>;
108
+ }
109
+ declare namespace StandardSchemaV1 {
110
+ /** The Standard Schema properties interface. */
111
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
112
+ /** Validates unknown input values. */
113
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
114
+ }
115
+ /** The result interface of the validate function. */
116
+ type Result<Output> = SuccessResult<Output> | FailureResult;
117
+ /** The result interface if validation succeeds. */
118
+ interface SuccessResult<Output> {
119
+ /** The typed output value. */
120
+ readonly value: Output;
121
+ /** The absence of issues indicates success. */
122
+ readonly issues?: undefined;
123
+ }
124
+ interface Options {
125
+ /** Implicit support for additional vendor-specific parameters, if needed. */
126
+ readonly libraryOptions?: Record<string, unknown> | undefined;
127
+ }
128
+ /** The result interface if validation fails. */
129
+ interface FailureResult {
130
+ /** The issues of failed validation. */
131
+ readonly issues: ReadonlyArray<Issue>;
132
+ }
133
+ /** The issue interface of the failure output. */
134
+ interface Issue {
135
+ /** The error message of the issue. */
136
+ readonly message: string;
137
+ /** The path of the issue, if any. */
138
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
139
+ }
140
+ /** The path segment interface of the issue. */
141
+ interface PathSegment {
142
+ /** The key representing a path segment. */
143
+ readonly key: PropertyKey;
144
+ }
145
+ /** The Standard types interface. */
146
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
147
+ /** Infers the input type of a Standard. */
148
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
149
+ /** Infers the output type of a Standard. */
150
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
151
+ }
152
+ /** The Standard JSON Schema interface. */
153
+ interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
154
+ /** The Standard JSON Schema properties. */
155
+ readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
156
+ }
157
+ declare namespace StandardJSONSchemaV1 {
158
+ /** The Standard JSON Schema properties interface. */
159
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
160
+ /** Methods for generating the input/output JSON Schema. */
161
+ readonly jsonSchema: Converter;
162
+ }
163
+ /** The Standard JSON Schema converter interface. */
164
+ interface Converter {
165
+ /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
166
+ readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
167
+ /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
168
+ readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
169
+ }
170
+ /** The target version of the generated JSON Schema.
171
+ *
172
+ * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use.
173
+ *
174
+ * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
175
+ *
176
+ * All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
177
+ */
178
+ type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
179
+ /** The options for the input/output methods. */
180
+ interface Options {
181
+ /** 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. */
182
+ readonly target: Target;
183
+ /** Implicit support for additional vendor-specific parameters, if needed. */
184
+ readonly libraryOptions?: Record<string, unknown> | undefined;
185
+ }
186
+ /** The Standard types interface. */
187
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
188
+ /** Infers the input type of a Standard. */
189
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
190
+ /** Infers the output type of a Standard. */
191
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
192
+ }
193
+ interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
194
+ //#endregion
195
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.d.cts
196
+ declare const $output: unique symbol;
197
+ type $output = typeof $output;
198
+ declare const $input: unique symbol;
199
+ type $input = typeof $input;
200
+ 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;
201
+ type MetadataType = object | undefined;
202
+ declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
203
+ _meta: Meta;
204
+ _schema: Schema;
205
+ _map: WeakMap<Schema, $replace<Meta, Schema>>;
206
+ _idmap: Map<string, Schema>;
207
+ add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
208
+ clear(): this;
209
+ remove(schema: Schema): this;
210
+ get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
211
+ has(schema: Schema): boolean;
212
+ }
213
+ interface JSONSchemaMeta {
214
+ id?: string | undefined;
215
+ title?: string | undefined;
216
+ description?: string | undefined;
217
+ deprecated?: boolean | undefined;
218
+ [k: string]: unknown;
219
+ }
220
+ interface GlobalMeta extends JSONSchemaMeta {}
221
+ //#endregion
222
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.d.cts
223
+ type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
224
+ interface JSONSchemaGeneratorParams {
225
+ processors: Record<string, Processor>;
226
+ /** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
227
+ * @default globalRegistry */
228
+ metadata?: $ZodRegistry<Record<string, any>>;
229
+ /** The JSON Schema version to target.
230
+ * - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
231
+ * - `"draft-07"` — JSON Schema Draft 7
232
+ * - `"draft-04"` — JSON Schema Draft 4
233
+ * - `"openapi-3.0"` — OpenAPI 3.0 Schema Object */
234
+ target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
235
+ /** How to handle unrepresentable types.
236
+ * - `"throw"` — Default. Unrepresentable types throw an error
237
+ * - `"any"` — Unrepresentable types become `{}` */
238
+ unrepresentable?: "throw" | "any";
239
+ /** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
240
+ override?: (ctx: {
241
+ zodSchema: $ZodTypes;
242
+ jsonSchema: BaseSchema;
243
+ path: (string | number)[];
244
+ }) => void;
245
+ /** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, defaults, coerced primitives, etc.
246
+ * - `"output"` — Default. Convert the output schema.
247
+ * - `"input"` — Convert the input schema. */
248
+ io?: "input" | "output";
249
+ cycles?: "ref" | "throw";
250
+ reused?: "ref" | "inline";
251
+ external?: {
252
+ registry: $ZodRegistry<{
253
+ id?: string | undefined;
254
+ }>;
255
+ uri?: ((id: string) => string) | undefined;
256
+ defs: Record<string, BaseSchema>;
257
+ } | undefined;
258
+ }
259
+ /**
260
+ * Parameters for the toJSONSchema function.
261
+ */
262
+ type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
263
+ interface ProcessParams {
264
+ schemaPath: $ZodType[];
265
+ path: (string | number)[];
266
+ }
267
+ interface Seen {
268
+ /** JSON Schema result for this Zod schema */
269
+ schema: BaseSchema;
270
+ /** A cached version of the schema that doesn't get overwritten during ref resolution */
271
+ def?: BaseSchema;
272
+ defId?: string | undefined;
273
+ /** Number of times this schema was encountered during traversal */
274
+ count: number;
275
+ /** Cycle path */
276
+ cycle?: (string | number)[] | undefined;
277
+ isParent?: boolean | undefined;
278
+ /** Schema to inherit JSON Schema properties from (set by processor for wrappers) */
279
+ ref?: $ZodType | null;
280
+ /** JSON Schema property path for this schema */
281
+ path?: (string | number)[] | undefined;
282
+ }
283
+ interface ToJSONSchemaContext {
284
+ processors: Record<string, Processor>;
285
+ metadataRegistry: $ZodRegistry<Record<string, any>>;
286
+ target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
287
+ unrepresentable: "throw" | "any";
288
+ override: (ctx: {
289
+ zodSchema: $ZodType;
290
+ jsonSchema: BaseSchema;
291
+ path: (string | number)[];
292
+ }) => void;
293
+ io: "input" | "output";
294
+ counter: number;
295
+ seen: Map<$ZodType, Seen>;
296
+ cycles: "ref" | "throw";
297
+ reused: "ref" | "inline";
298
+ external?: {
299
+ registry: $ZodRegistry<{
300
+ id?: string | undefined;
301
+ }>;
302
+ uri?: ((id: string) => string) | undefined;
303
+ defs: Record<string, BaseSchema>;
304
+ } | undefined;
305
+ }
306
+ type ZodStandardSchemaWithJSON$1<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
307
+ interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
308
+ "~standard": ZodStandardSchemaWithJSON$1<T>;
309
+ }
310
+ //#endregion
311
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.d.cts
312
+ type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
313
+ 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 & {});
314
+ type IsAny<T> = 0 extends 1 & T ? true : false;
315
+ type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
316
+ type MakePartial<T, K extends keyof T> = Omit$1<T, K> & InexactPartial<Pick<T, K>>;
317
+ type NoUndefined<T> = T extends undefined ? never : T;
318
+ type LoosePartial<T extends object> = InexactPartial<T> & {
319
+ [k: string]: unknown;
320
+ };
321
+ type Mask<Keys extends PropertyKey> = { [K in Keys]?: true; };
322
+ type Writeable<T> = { -readonly [P in keyof T]: T[P]; } & {};
323
+ type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined; };
324
+ type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
325
+ readonly [Symbol.toStringTag]: string;
326
+ } | Date | Error | Generator | Promise<unknown> | RegExp;
327
+ 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>;
328
+ type SomeObject = Record<PropertyKey, any>;
329
+ type Identity<T> = T;
330
+ type Flatten<T> = Identity<{ [k in keyof T]: T[k]; }>;
331
+ type Prettify<T> = { [K in keyof T]: T[K]; } & {};
332
+ 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]; }>;
333
+ type TupleItems = ReadonlyArray<SomeType>;
334
+ type AnyFunc = (...args: any[]) => any;
335
+ type MaybeAsync<T> = T | Promise<T>;
336
+ type EnumValue = string | number;
337
+ type EnumLike = Readonly<Record<string, EnumValue>>;
338
+ type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k; }>;
339
+ type Literal = string | number | bigint | boolean | null | undefined;
340
+ type Primitive = string | number | symbol | bigint | boolean | null | undefined;
341
+ type HasLength = {
342
+ length: number;
343
+ };
344
+ type Numeric = number | bigint | Date;
345
+ type PropValues = Record<string, Set<Primitive>>;
346
+ type PrimitiveSet = Set<Primitive>;
347
+ type EmptyToNever<T> = keyof T extends never ? never : T;
348
+ declare abstract class Class {
349
+ constructor(..._args: any[]);
350
+ }
351
+ //#endregion
352
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.d.cts
353
+ declare const version: {
354
+ readonly major: 4;
355
+ readonly minor: 4;
356
+ readonly patch: number;
357
+ };
358
+ //#endregion
359
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.d.cts
360
+ interface ParseContext<T extends $ZodIssueBase = never> {
361
+ /** Customize error messages. */
362
+ readonly error?: $ZodErrorMap<T>;
363
+ /** Include the `input` field in issue objects. Default `false`. */
364
+ readonly reportInput?: boolean;
365
+ /** Skip eval-based fast path. Default `false`. */
366
+ readonly jitless?: boolean;
367
+ }
368
+ /** @internal */
369
+ interface ParseContextInternal<T extends $ZodIssueBase = never> extends ParseContext<T> {
370
+ readonly async?: boolean | undefined;
371
+ readonly direction?: "forward" | "backward";
372
+ readonly skipChecks?: boolean;
373
+ }
374
+ interface ParsePayload<T = unknown> {
375
+ value: T;
376
+ issues: $ZodRawIssue[];
377
+ /** A way to mark a whole payload as aborted. Used in codecs/pipes. */
378
+ aborted?: boolean;
379
+ /** @internal Marks a value as a fallback that an outer wrapper (e.g.
380
+ * $ZodOptional) may override with its own interpretation when input was
381
+ * undefined. Set by $ZodCatch when catchValue substitutes and by every
382
+ * $ZodTransform invocation. */
383
+ fallback?: boolean | undefined;
384
+ }
385
+ type CheckFn<T> = (input: ParsePayload<T>) => MaybeAsync<void>;
386
+ interface $ZodTypeDef {
387
+ type: "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "null" | "undefined" | "void" | "never" | "any" | "unknown" | "date" | "object" | "record" | "file" | "array" | "tuple" | "union" | "intersection" | "map" | "set" | "enum" | "literal" | "nullable" | "optional" | "nonoptional" | "success" | "transform" | "default" | "prefault" | "catch" | "nan" | "pipe" | "readonly" | "template_literal" | "promise" | "lazy" | "function" | "custom";
388
+ error?: $ZodErrorMap<never> | undefined;
389
+ checks?: $ZodCheck<never>[];
390
+ }
391
+ interface _$ZodTypeInternals {
392
+ /** The `@zod/core` version of this schema */
393
+ version: typeof version;
394
+ /** Schema definition. */
395
+ def: $ZodTypeDef;
396
+ /** @internal Randomly generated ID for this schema. */
397
+ /** @internal List of deferred initializers. */
398
+ deferred: AnyFunc[] | undefined;
399
+ /** @internal Parses input and runs all checks (refinements). */
400
+ run(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
401
+ /** @internal Parses input, doesn't run checks. */
402
+ parse(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
403
+ /** @internal Stores identifiers for the set of traits implemented by this schema. */
404
+ traits: Set<string>;
405
+ /** @internal Indicates that a schema output type should be considered optional inside objects.
406
+ * @default Required
407
+ */
408
+ /** @internal */
409
+ optin?: "optional" | undefined;
410
+ /** @internal */
411
+ optout?: "optional" | undefined;
412
+ /** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
413
+ *
414
+ * Defined on: enum, const, literal, null, undefined
415
+ * Passthrough: optional, nullable, branded, default, catch, pipe
416
+ * Todo: unions?
417
+ */
418
+ values?: PrimitiveSet | undefined;
419
+ /** Default value bubbled up from */
420
+ /** @internal A set of literal discriminators used for the fast path in discriminated unions. */
421
+ propValues?: PropValues | undefined;
422
+ /** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
423
+ pattern: RegExp | undefined;
424
+ /** @internal The constructor function of this schema. */
425
+ constr: new (def: any) => $ZodType;
426
+ /** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
427
+ bag: Record<string, unknown>;
428
+ /** @internal The set of issues this schema might throw during type checking. */
429
+ isst: $ZodIssueBase;
430
+ /** @internal Subject to change, not a public API. */
431
+ processJSONSchema?: ((ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void) | undefined;
432
+ /** An optional method used to override `toJSONSchema` logic. */
433
+ toJSONSchema?: () => unknown;
434
+ /** @internal The parent of this schema. Only set during certain clone operations. */
435
+ parent?: $ZodType | undefined;
436
+ }
437
+ /** @internal */
438
+ interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
439
+ /** @internal The inferred output type */
440
+ output: O;
441
+ /** @internal The inferred input type */
442
+ input: I;
443
+ }
444
+ type $ZodStandardSchema<T> = StandardSchemaV1.Props<input<T>, output<T>>;
445
+ type SomeType = {
446
+ _zod: _$ZodTypeInternals;
447
+ };
448
+ interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
449
+ _zod: Internals;
450
+ "~standard": $ZodStandardSchema<this>;
451
+ }
452
+ interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T["output"], T["input"], T> {}
453
+ declare const $ZodType: $constructor<$ZodType>;
454
+ interface $ZodStringDef extends $ZodTypeDef {
455
+ type: "string";
456
+ coerce?: boolean;
457
+ checks?: $ZodCheck<string>[];
458
+ }
459
+ interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
460
+ def: $ZodStringDef;
461
+ /** @deprecated Internal API, use with caution (not deprecated) */
462
+ pattern: RegExp;
463
+ /** @deprecated Internal API, use with caution (not deprecated) */
464
+ isst: $ZodIssueInvalidType;
465
+ bag: LoosePartial<{
466
+ minimum: number;
467
+ maximum: number;
468
+ patterns: Set<RegExp>;
469
+ format: string;
470
+ contentEncoding: string;
471
+ }>;
472
+ }
473
+ interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {}
474
+ declare const $ZodString: $constructor<$ZodString>;
475
+ interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, $ZodCheckStringFormatDef<Format> {}
476
+ interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, $ZodCheckStringFormatInternals {
477
+ def: $ZodStringFormatDef<Format>;
478
+ }
479
+ interface $ZodStringFormat<Format extends string = string> extends $ZodType {
480
+ _zod: $ZodStringFormatInternals<Format>;
481
+ }
482
+ declare const $ZodStringFormat: $constructor<$ZodStringFormat>;
483
+ interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {}
484
+ interface $ZodGUID extends $ZodType {
485
+ _zod: $ZodGUIDInternals;
486
+ }
487
+ declare const $ZodGUID: $constructor<$ZodGUID>;
488
+ interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
489
+ version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
490
+ }
491
+ interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
492
+ def: $ZodUUIDDef;
493
+ }
494
+ interface $ZodUUID extends $ZodType {
495
+ _zod: $ZodUUIDInternals;
496
+ }
497
+ declare const $ZodUUID: $constructor<$ZodUUID>;
498
+ interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {}
499
+ interface $ZodEmail extends $ZodType {
500
+ _zod: $ZodEmailInternals;
501
+ }
502
+ declare const $ZodEmail: $constructor<$ZodEmail>;
503
+ interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
504
+ hostname?: RegExp | undefined;
505
+ protocol?: RegExp | undefined;
506
+ normalize?: boolean | undefined;
507
+ }
508
+ interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
509
+ def: $ZodURLDef;
510
+ }
511
+ interface $ZodURL extends $ZodType {
512
+ _zod: $ZodURLInternals;
513
+ }
514
+ declare const $ZodURL: $constructor<$ZodURL>;
515
+ interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {}
516
+ interface $ZodEmoji extends $ZodType {
517
+ _zod: $ZodEmojiInternals;
518
+ }
519
+ declare const $ZodEmoji: $constructor<$ZodEmoji>;
520
+ interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {}
521
+ interface $ZodNanoID extends $ZodType {
522
+ _zod: $ZodNanoIDInternals;
523
+ }
524
+ declare const $ZodNanoID: $constructor<$ZodNanoID>;
525
+ /**
526
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
527
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
528
+ * See https://github.com/paralleldrive/cuid.
529
+ */
530
+ interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
531
+ /**
532
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
533
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
534
+ * See https://github.com/paralleldrive/cuid.
535
+ */
536
+ interface $ZodCUID extends $ZodType {
537
+ _zod: $ZodCUIDInternals;
538
+ }
539
+ /**
540
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
541
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
542
+ * See https://github.com/paralleldrive/cuid.
543
+ */
544
+ declare const $ZodCUID: $constructor<$ZodCUID>;
545
+ interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
546
+ interface $ZodCUID2 extends $ZodType {
547
+ _zod: $ZodCUID2Internals;
548
+ }
549
+ declare const $ZodCUID2: $constructor<$ZodCUID2>;
550
+ interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {}
551
+ interface $ZodULID extends $ZodType {
552
+ _zod: $ZodULIDInternals;
553
+ }
554
+ declare const $ZodULID: $constructor<$ZodULID>;
555
+ interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {}
556
+ interface $ZodXID extends $ZodType {
557
+ _zod: $ZodXIDInternals;
558
+ }
559
+ declare const $ZodXID: $constructor<$ZodXID>;
560
+ interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {}
561
+ interface $ZodKSUID extends $ZodType {
562
+ _zod: $ZodKSUIDInternals;
563
+ }
564
+ declare const $ZodKSUID: $constructor<$ZodKSUID>;
565
+ interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
566
+ precision: number | null;
567
+ offset: boolean;
568
+ local: boolean;
569
+ }
570
+ interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
571
+ def: $ZodISODateTimeDef;
572
+ }
573
+ interface $ZodISODateTime extends $ZodType {
574
+ _zod: $ZodISODateTimeInternals;
575
+ }
576
+ declare const $ZodISODateTime: $constructor<$ZodISODateTime>;
577
+ interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {}
578
+ interface $ZodISODate extends $ZodType {
579
+ _zod: $ZodISODateInternals;
580
+ }
581
+ declare const $ZodISODate: $constructor<$ZodISODate>;
582
+ interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
583
+ precision?: number | null;
584
+ }
585
+ interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
586
+ def: $ZodISOTimeDef;
587
+ }
588
+ interface $ZodISOTime extends $ZodType {
589
+ _zod: $ZodISOTimeInternals;
590
+ }
591
+ declare const $ZodISOTime: $constructor<$ZodISOTime>;
592
+ interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {}
593
+ interface $ZodISODuration extends $ZodType {
594
+ _zod: $ZodISODurationInternals;
595
+ }
596
+ declare const $ZodISODuration: $constructor<$ZodISODuration>;
597
+ interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
598
+ version?: "v4";
599
+ }
600
+ interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
601
+ def: $ZodIPv4Def;
602
+ }
603
+ interface $ZodIPv4 extends $ZodType {
604
+ _zod: $ZodIPv4Internals;
605
+ }
606
+ declare const $ZodIPv4: $constructor<$ZodIPv4>;
607
+ interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
608
+ version?: "v6";
609
+ }
610
+ interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
611
+ def: $ZodIPv6Def;
612
+ }
613
+ interface $ZodIPv6 extends $ZodType {
614
+ _zod: $ZodIPv6Internals;
615
+ }
616
+ declare const $ZodIPv6: $constructor<$ZodIPv6>;
617
+ interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
618
+ version?: "v4";
619
+ }
620
+ interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
621
+ def: $ZodCIDRv4Def;
622
+ }
623
+ interface $ZodCIDRv4 extends $ZodType {
624
+ _zod: $ZodCIDRv4Internals;
625
+ }
626
+ declare const $ZodCIDRv4: $constructor<$ZodCIDRv4>;
627
+ interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
628
+ version?: "v6";
629
+ }
630
+ interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
631
+ def: $ZodCIDRv6Def;
632
+ }
633
+ interface $ZodCIDRv6 extends $ZodType {
634
+ _zod: $ZodCIDRv6Internals;
635
+ }
636
+ declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>;
637
+ interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {}
638
+ interface $ZodBase64 extends $ZodType {
639
+ _zod: $ZodBase64Internals;
640
+ }
641
+ declare const $ZodBase64: $constructor<$ZodBase64>;
642
+ interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {}
643
+ interface $ZodBase64URL extends $ZodType {
644
+ _zod: $ZodBase64URLInternals;
645
+ }
646
+ declare const $ZodBase64URL: $constructor<$ZodBase64URL>;
647
+ interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {}
648
+ interface $ZodE164 extends $ZodType {
649
+ _zod: $ZodE164Internals;
650
+ }
651
+ declare const $ZodE164: $constructor<$ZodE164>;
652
+ interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
653
+ alg?: JWTAlgorithm | undefined;
654
+ }
655
+ interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
656
+ def: $ZodJWTDef;
657
+ }
658
+ interface $ZodJWT extends $ZodType {
659
+ _zod: $ZodJWTInternals;
660
+ }
661
+ declare const $ZodJWT: $constructor<$ZodJWT>;
662
+ interface $ZodNumberDef extends $ZodTypeDef {
663
+ type: "number";
664
+ coerce?: boolean;
665
+ }
666
+ interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
667
+ def: $ZodNumberDef;
668
+ /** @deprecated Internal API, use with caution (not deprecated) */
669
+ pattern: RegExp;
670
+ /** @deprecated Internal API, use with caution (not deprecated) */
671
+ isst: $ZodIssueInvalidType;
672
+ bag: LoosePartial<{
673
+ minimum: number;
674
+ maximum: number;
675
+ exclusiveMinimum: number;
676
+ exclusiveMaximum: number;
677
+ format: string;
678
+ pattern: RegExp;
679
+ }>;
680
+ }
681
+ interface $ZodNumber<Input = unknown> extends $ZodType {
682
+ _zod: $ZodNumberInternals<Input>;
683
+ }
684
+ declare const $ZodNumber: $constructor<$ZodNumber>;
685
+ interface $ZodBooleanDef extends $ZodTypeDef {
686
+ type: "boolean";
687
+ coerce?: boolean;
688
+ checks?: $ZodCheck<boolean>[];
689
+ }
690
+ interface $ZodBooleanInternals<T = unknown> extends $ZodTypeInternals<boolean, T> {
691
+ pattern: RegExp;
692
+ def: $ZodBooleanDef;
693
+ isst: $ZodIssueInvalidType;
694
+ }
695
+ interface $ZodBoolean<T = unknown> extends $ZodType {
696
+ _zod: $ZodBooleanInternals<T>;
697
+ }
698
+ declare const $ZodBoolean: $constructor<$ZodBoolean>;
699
+ interface $ZodBigIntDef extends $ZodTypeDef {
700
+ type: "bigint";
701
+ coerce?: boolean;
702
+ }
703
+ interface $ZodBigIntInternals<T = unknown> extends $ZodTypeInternals<bigint, T> {
704
+ pattern: RegExp;
705
+ /** @internal Internal API, use with caution */
706
+ def: $ZodBigIntDef;
707
+ isst: $ZodIssueInvalidType;
708
+ bag: LoosePartial<{
709
+ minimum: bigint;
710
+ maximum: bigint;
711
+ format: string;
712
+ }>;
713
+ }
714
+ interface $ZodBigInt<T = unknown> extends $ZodType {
715
+ _zod: $ZodBigIntInternals<T>;
716
+ }
717
+ declare const $ZodBigInt: $constructor<$ZodBigInt>;
718
+ interface $ZodSymbolDef extends $ZodTypeDef {
719
+ type: "symbol";
720
+ }
721
+ interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
722
+ def: $ZodSymbolDef;
723
+ isst: $ZodIssueInvalidType;
724
+ }
725
+ interface $ZodSymbol extends $ZodType {
726
+ _zod: $ZodSymbolInternals;
727
+ }
728
+ declare const $ZodSymbol: $constructor<$ZodSymbol>;
729
+ interface $ZodUndefinedDef extends $ZodTypeDef {
730
+ type: "undefined";
731
+ }
732
+ interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
733
+ pattern: RegExp;
734
+ def: $ZodUndefinedDef;
735
+ values: PrimitiveSet;
736
+ isst: $ZodIssueInvalidType;
737
+ }
738
+ interface $ZodUndefined extends $ZodType {
739
+ _zod: $ZodUndefinedInternals;
740
+ }
741
+ declare const $ZodUndefined: $constructor<$ZodUndefined>;
742
+ interface $ZodNullDef extends $ZodTypeDef {
743
+ type: "null";
744
+ }
745
+ interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
746
+ pattern: RegExp;
747
+ def: $ZodNullDef;
748
+ values: PrimitiveSet;
749
+ isst: $ZodIssueInvalidType;
750
+ }
751
+ interface $ZodNull extends $ZodType {
752
+ _zod: $ZodNullInternals;
753
+ }
754
+ declare const $ZodNull: $constructor<$ZodNull>;
755
+ interface $ZodAnyDef extends $ZodTypeDef {
756
+ type: "any";
757
+ }
758
+ interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
759
+ def: $ZodAnyDef;
760
+ isst: never;
761
+ }
762
+ interface $ZodAny extends $ZodType {
763
+ _zod: $ZodAnyInternals;
764
+ }
765
+ declare const $ZodAny: $constructor<$ZodAny>;
766
+ interface $ZodUnknownDef extends $ZodTypeDef {
767
+ type: "unknown";
768
+ }
769
+ interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
770
+ def: $ZodUnknownDef;
771
+ isst: never;
772
+ }
773
+ interface $ZodUnknown extends $ZodType {
774
+ _zod: $ZodUnknownInternals;
775
+ }
776
+ declare const $ZodUnknown: $constructor<$ZodUnknown>;
777
+ interface $ZodNeverDef extends $ZodTypeDef {
778
+ type: "never";
779
+ }
780
+ interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
781
+ def: $ZodNeverDef;
782
+ isst: $ZodIssueInvalidType;
783
+ }
784
+ interface $ZodNever extends $ZodType {
785
+ _zod: $ZodNeverInternals;
786
+ }
787
+ declare const $ZodNever: $constructor<$ZodNever>;
788
+ interface $ZodVoidDef extends $ZodTypeDef {
789
+ type: "void";
790
+ }
791
+ interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
792
+ def: $ZodVoidDef;
793
+ isst: $ZodIssueInvalidType;
794
+ }
795
+ interface $ZodVoid extends $ZodType {
796
+ _zod: $ZodVoidInternals;
797
+ }
798
+ declare const $ZodVoid: $constructor<$ZodVoid>;
799
+ interface $ZodDateDef extends $ZodTypeDef {
800
+ type: "date";
801
+ coerce?: boolean;
802
+ }
803
+ interface $ZodDateInternals<T = unknown> extends $ZodTypeInternals<Date, T> {
804
+ def: $ZodDateDef;
805
+ isst: $ZodIssueInvalidType;
806
+ bag: LoosePartial<{
807
+ minimum: Date;
808
+ maximum: Date;
809
+ format: string;
810
+ }>;
811
+ }
812
+ interface $ZodDate<T = unknown> extends $ZodType {
813
+ _zod: $ZodDateInternals<T>;
814
+ }
815
+ declare const $ZodDate: $constructor<$ZodDate>;
816
+ interface $ZodArrayDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
817
+ type: "array";
818
+ element: T;
819
+ }
820
+ interface $ZodArrayInternals<T extends SomeType = $ZodType> extends _$ZodTypeInternals {
821
+ def: $ZodArrayDef<T>;
822
+ isst: $ZodIssueInvalidType;
823
+ output: output<T>[];
824
+ input: input<T>[];
825
+ }
826
+ interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {}
827
+ declare const $ZodArray: $constructor<$ZodArray>;
828
+ type OptionalOutSchema = {
829
+ _zod: {
830
+ optout: "optional";
831
+ };
832
+ };
833
+ type OptionalInSchema = {
834
+ _zod: {
835
+ optin: "optional";
836
+ };
837
+ };
838
+ 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>;
839
+ 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>;
840
+ type $ZodObjectConfig = {
841
+ out: Record<string, unknown>;
842
+ in: Record<string, unknown>;
843
+ };
844
+ type $loose = {
845
+ out: Record<string, unknown>;
846
+ in: Record<string, unknown>;
847
+ };
848
+ type $strict = {
849
+ out: {};
850
+ in: {};
851
+ };
852
+ type $strip = {
853
+ out: {};
854
+ in: {};
855
+ };
856
+ type $catchall<T extends SomeType> = {
857
+ out: {
858
+ [k: string]: output<T>;
859
+ };
860
+ in: {
861
+ [k: string]: input<T>;
862
+ };
863
+ };
864
+ type $ZodShape = Readonly<{
865
+ [k: string]: $ZodType;
866
+ }>;
867
+ interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
868
+ type: "object";
869
+ shape: Shape;
870
+ catchall?: $ZodType | undefined;
871
+ }
872
+ interface $ZodObjectInternals<
873
+ /** @ts-ignore Cast variance */
874
+ out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
875
+ def: $ZodObjectDef<Shape>;
876
+ config: Config;
877
+ isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
878
+ propValues: PropValues;
879
+ output: $InferObjectOutput<Shape, Config["out"]>;
880
+ input: $InferObjectInput<Shape, Config["in"]>;
881
+ optin?: "optional" | undefined;
882
+ optout?: "optional" | undefined;
883
+ }
884
+ type $ZodLooseShape = Record<string, any>;
885
+ interface $ZodObject<
886
+ /** @ts-ignore Cast variance */
887
+ out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {}
888
+ declare const $ZodObject: $constructor<$ZodObject>;
889
+ type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
890
+ type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
891
+ interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
892
+ type: "union";
893
+ options: Options;
894
+ inclusive?: boolean;
895
+ }
896
+ type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
897
+ type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
898
+ interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends _$ZodTypeInternals {
899
+ def: $ZodUnionDef<T>;
900
+ isst: $ZodIssueInvalidUnion;
901
+ pattern: T[number]["_zod"]["pattern"];
902
+ values: T[number]["_zod"]["values"];
903
+ output: $InferUnionOutput<T[number]>;
904
+ input: $InferUnionInput<T[number]>;
905
+ optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
906
+ optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
907
+ }
908
+ interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodUnionInternals<T>> {
909
+ _zod: $ZodUnionInternals<T>;
910
+ }
911
+ declare const $ZodUnion: $constructor<$ZodUnion>;
912
+ interface $ZodDiscriminatedUnionDef<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionDef<Options> {
913
+ discriminator: Disc;
914
+ unionFallback?: boolean;
915
+ }
916
+ interface $ZodDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionInternals<Options> {
917
+ def: $ZodDiscriminatedUnionDef<Options, Disc>;
918
+ propValues: PropValues;
919
+ }
920
+ interface $ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodType {
921
+ _zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
922
+ }
923
+ declare const $ZodDiscriminatedUnion: $constructor<$ZodDiscriminatedUnion>;
924
+ interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
925
+ type: "intersection";
926
+ left: Left;
927
+ right: Right;
928
+ }
929
+ interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
930
+ def: $ZodIntersectionDef<A, B>;
931
+ isst: never;
932
+ optin: A["_zod"]["optin"] | B["_zod"]["optin"];
933
+ optout: A["_zod"]["optout"] | B["_zod"]["optout"];
934
+ output: output<A> & output<B>;
935
+ input: input<A> & input<B>;
936
+ }
937
+ interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
938
+ _zod: $ZodIntersectionInternals<A, B>;
939
+ }
940
+ declare const $ZodIntersection: $constructor<$ZodIntersection>;
941
+ interface $ZodTupleDef<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
942
+ type: "tuple";
943
+ items: T;
944
+ rest: Rest;
945
+ }
946
+ type $InferTupleInputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleInputTypeWithOptionals<T>, ...(Rest extends SomeType ? input<Rest>[] : [])];
947
+ type TupleInputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: input<T[k]>; };
948
+ 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> : [];
949
+ type $InferTupleOutputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleOutputTypeWithOptionals<T>, ...(Rest extends SomeType ? output<Rest>[] : [])];
950
+ type TupleOutputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: output<T[k]>; };
951
+ 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> : [];
952
+ interface $ZodTupleInternals<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends _$ZodTypeInternals {
953
+ def: $ZodTupleDef<T, Rest>;
954
+ isst: $ZodIssueInvalidType | $ZodIssueTooBig<unknown[]> | $ZodIssueTooSmall<unknown[]>;
955
+ output: $InferTupleOutputType<T, Rest>;
956
+ input: $InferTupleInputType<T, Rest>;
957
+ }
958
+ interface $ZodTuple<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodType {
959
+ _zod: $ZodTupleInternals<T, Rest>;
960
+ }
961
+ declare const $ZodTuple: $constructor<$ZodTuple>;
962
+ type $ZodRecordKey = $ZodType<string | number | symbol, unknown>;
963
+ interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
964
+ type: "record";
965
+ keyType: Key;
966
+ valueType: Value;
967
+ /** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
968
+ mode?: "strict" | "loose";
969
+ }
970
+ type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<output<Key>, output<Value>>> : Record<output<Key>, output<Value>>;
971
+ 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>>;
972
+ interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
973
+ def: $ZodRecordDef<Key, Value>;
974
+ isst: $ZodIssueInvalidType | $ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
975
+ optin?: "optional" | undefined;
976
+ optout?: "optional" | undefined;
977
+ }
978
+ type $partial = {
979
+ "~~partial": true;
980
+ };
981
+ interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodType {
982
+ _zod: $ZodRecordInternals<Key, Value>;
983
+ }
984
+ declare const $ZodRecord: $constructor<$ZodRecord>;
985
+ interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
986
+ type: "map";
987
+ keyType: Key;
988
+ valueType: Value;
989
+ }
990
+ interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key>, output<Value>>, Map<input<Key>, input<Value>>> {
991
+ def: $ZodMapDef<Key, Value>;
992
+ isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement<unknown>;
993
+ optin?: "optional" | undefined;
994
+ optout?: "optional" | undefined;
995
+ }
996
+ interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
997
+ _zod: $ZodMapInternals<Key, Value>;
998
+ }
999
+ declare const $ZodMap: $constructor<$ZodMap>;
1000
+ interface $ZodSetDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1001
+ type: "set";
1002
+ valueType: T;
1003
+ }
1004
+ interface $ZodSetInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T>>, Set<input<T>>> {
1005
+ def: $ZodSetDef<T>;
1006
+ isst: $ZodIssueInvalidType;
1007
+ optin?: "optional" | undefined;
1008
+ optout?: "optional" | undefined;
1009
+ }
1010
+ interface $ZodSet<T extends SomeType = $ZodType> extends $ZodType {
1011
+ _zod: $ZodSetInternals<T>;
1012
+ }
1013
+ declare const $ZodSet: $constructor<$ZodSet>;
1014
+ type $InferEnumOutput<T extends EnumLike> = T[keyof T] & {};
1015
+ type $InferEnumInput<T extends EnumLike> = T[keyof T] & {};
1016
+ interface $ZodEnumDef<T extends EnumLike = EnumLike> extends $ZodTypeDef {
1017
+ type: "enum";
1018
+ entries: T;
1019
+ }
1020
+ interface $ZodEnumInternals<
1021
+ /** @ts-ignore Cast variance */
1022
+ out T extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
1023
+ def: $ZodEnumDef<T>;
1024
+ /** @deprecated Internal API, use with caution (not deprecated) */
1025
+ values: PrimitiveSet;
1026
+ /** @deprecated Internal API, use with caution (not deprecated) */
1027
+ pattern: RegExp;
1028
+ isst: $ZodIssueInvalidValue;
1029
+ }
1030
+ interface $ZodEnum<T extends EnumLike = EnumLike> extends $ZodType {
1031
+ _zod: $ZodEnumInternals<T>;
1032
+ }
1033
+ declare const $ZodEnum: $constructor<$ZodEnum>;
1034
+ interface $ZodLiteralDef<T extends Literal> extends $ZodTypeDef {
1035
+ type: "literal";
1036
+ values: T[];
1037
+ }
1038
+ interface $ZodLiteralInternals<T extends Literal = Literal> extends $ZodTypeInternals<T, T> {
1039
+ def: $ZodLiteralDef<T>;
1040
+ values: Set<T>;
1041
+ pattern: RegExp;
1042
+ isst: $ZodIssueInvalidValue;
1043
+ }
1044
+ interface $ZodLiteral<T extends Literal = Literal> extends $ZodType {
1045
+ _zod: $ZodLiteralInternals<T>;
1046
+ }
1047
+ declare const $ZodLiteral: $constructor<$ZodLiteral>;
1048
+ /** Do not reference this directly. */
1049
+ interface File extends _File {
1050
+ readonly type: string;
1051
+ readonly size: number;
1052
+ }
1053
+ interface $ZodFileDef extends $ZodTypeDef {
1054
+ type: "file";
1055
+ }
1056
+ interface $ZodFileInternals extends $ZodTypeInternals<File, File> {
1057
+ def: $ZodFileDef;
1058
+ isst: $ZodIssueInvalidType;
1059
+ bag: LoosePartial<{
1060
+ minimum: number;
1061
+ maximum: number;
1062
+ mime: MimeTypes[];
1063
+ }>;
1064
+ }
1065
+ interface $ZodFile extends $ZodType {
1066
+ _zod: $ZodFileInternals;
1067
+ }
1068
+ declare const $ZodFile: $constructor<$ZodFile>;
1069
+ interface $ZodTransformDef extends $ZodTypeDef {
1070
+ type: "transform";
1071
+ transform: (input: unknown, payload: ParsePayload<unknown>) => MaybeAsync<unknown>;
1072
+ }
1073
+ interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
1074
+ def: $ZodTransformDef;
1075
+ isst: never;
1076
+ }
1077
+ interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
1078
+ _zod: $ZodTransformInternals<O, I>;
1079
+ }
1080
+ declare const $ZodTransform: $constructor<$ZodTransform>;
1081
+ interface $ZodOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1082
+ type: "optional";
1083
+ innerType: T;
1084
+ }
1085
+ interface $ZodOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | undefined, input<T> | undefined> {
1086
+ def: $ZodOptionalDef<T>;
1087
+ optin: "optional";
1088
+ optout: "optional";
1089
+ isst: never;
1090
+ values: T["_zod"]["values"];
1091
+ pattern: T["_zod"]["pattern"];
1092
+ }
1093
+ interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
1094
+ _zod: $ZodOptionalInternals<T>;
1095
+ }
1096
+ declare const $ZodOptional: $constructor<$ZodOptional>;
1097
+ interface $ZodExactOptionalDef<T extends SomeType = $ZodType> extends $ZodOptionalDef<T> {}
1098
+ interface $ZodExactOptionalInternals<T extends SomeType = $ZodType> extends $ZodOptionalInternals<T> {
1099
+ def: $ZodExactOptionalDef<T>;
1100
+ output: output<T>;
1101
+ input: input<T>;
1102
+ }
1103
+ interface $ZodExactOptional<T extends SomeType = $ZodType> extends $ZodType {
1104
+ _zod: $ZodExactOptionalInternals<T>;
1105
+ }
1106
+ declare const $ZodExactOptional: $constructor<$ZodExactOptional>;
1107
+ interface $ZodNullableDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1108
+ type: "nullable";
1109
+ innerType: T;
1110
+ }
1111
+ interface $ZodNullableInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | null, input<T> | null> {
1112
+ def: $ZodNullableDef<T>;
1113
+ optin: T["_zod"]["optin"];
1114
+ optout: T["_zod"]["optout"];
1115
+ isst: never;
1116
+ values: T["_zod"]["values"];
1117
+ pattern: T["_zod"]["pattern"];
1118
+ }
1119
+ interface $ZodNullable<T extends SomeType = $ZodType> extends $ZodType {
1120
+ _zod: $ZodNullableInternals<T>;
1121
+ }
1122
+ declare const $ZodNullable: $constructor<$ZodNullable>;
1123
+ interface $ZodDefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1124
+ type: "default";
1125
+ innerType: T;
1126
+ /** The default value. May be a getter. */
1127
+ defaultValue: NoUndefined<output<T>>;
1128
+ }
1129
+ interface $ZodDefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
1130
+ def: $ZodDefaultDef<T>;
1131
+ optin: "optional";
1132
+ optout?: "optional" | undefined;
1133
+ isst: never;
1134
+ values: T["_zod"]["values"];
1135
+ }
1136
+ interface $ZodDefault<T extends SomeType = $ZodType> extends $ZodType {
1137
+ _zod: $ZodDefaultInternals<T>;
1138
+ }
1139
+ declare const $ZodDefault: $constructor<$ZodDefault>;
1140
+ interface $ZodPrefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1141
+ type: "prefault";
1142
+ innerType: T;
1143
+ /** The default value. May be a getter. */
1144
+ defaultValue: input<T>;
1145
+ }
1146
+ interface $ZodPrefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
1147
+ def: $ZodPrefaultDef<T>;
1148
+ optin: "optional";
1149
+ optout?: "optional" | undefined;
1150
+ isst: never;
1151
+ values: T["_zod"]["values"];
1152
+ }
1153
+ interface $ZodPrefault<T extends SomeType = $ZodType> extends $ZodType {
1154
+ _zod: $ZodPrefaultInternals<T>;
1155
+ }
1156
+ declare const $ZodPrefault: $constructor<$ZodPrefault>;
1157
+ interface $ZodNonOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1158
+ type: "nonoptional";
1159
+ innerType: T;
1160
+ }
1161
+ interface $ZodNonOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, NoUndefined<input<T>>> {
1162
+ def: $ZodNonOptionalDef<T>;
1163
+ isst: $ZodIssueInvalidType;
1164
+ values: T["_zod"]["values"];
1165
+ optin: "optional" | undefined;
1166
+ optout: "optional" | undefined;
1167
+ }
1168
+ interface $ZodNonOptional<T extends SomeType = $ZodType> extends $ZodType {
1169
+ _zod: $ZodNonOptionalInternals<T>;
1170
+ }
1171
+ declare const $ZodNonOptional: $constructor<$ZodNonOptional>;
1172
+ interface $ZodSuccessDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1173
+ type: "success";
1174
+ innerType: T;
1175
+ }
1176
+ interface $ZodSuccessInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input<T>> {
1177
+ def: $ZodSuccessDef<T>;
1178
+ isst: never;
1179
+ optin: T["_zod"]["optin"];
1180
+ optout: "optional" | undefined;
1181
+ }
1182
+ interface $ZodSuccess<T extends SomeType = $ZodType> extends $ZodType {
1183
+ _zod: $ZodSuccessInternals<T>;
1184
+ }
1185
+ declare const $ZodSuccess: $constructor<$ZodSuccess>;
1186
+ interface $ZodCatchCtx extends ParsePayload {
1187
+ /** @deprecated Use `ctx.issues` */
1188
+ error: {
1189
+ issues: $ZodIssue[];
1190
+ };
1191
+ /** @deprecated Use `ctx.value` */
1192
+ input: unknown;
1193
+ }
1194
+ interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1195
+ type: "catch";
1196
+ innerType: T;
1197
+ catchValue: (ctx: $ZodCatchCtx) => unknown;
1198
+ }
1199
+ interface $ZodCatchInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1200
+ def: $ZodCatchDef<T>;
1201
+ optin: T["_zod"]["optin"];
1202
+ optout: T["_zod"]["optout"];
1203
+ isst: never;
1204
+ values: T["_zod"]["values"];
1205
+ }
1206
+ interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
1207
+ _zod: $ZodCatchInternals<T>;
1208
+ }
1209
+ declare const $ZodCatch: $constructor<$ZodCatch>;
1210
+ interface $ZodNaNDef extends $ZodTypeDef {
1211
+ type: "nan";
1212
+ }
1213
+ interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
1214
+ def: $ZodNaNDef;
1215
+ isst: $ZodIssueInvalidType;
1216
+ }
1217
+ interface $ZodNaN extends $ZodType {
1218
+ _zod: $ZodNaNInternals;
1219
+ }
1220
+ declare const $ZodNaN: $constructor<$ZodNaN>;
1221
+ interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
1222
+ type: "pipe";
1223
+ in: A;
1224
+ out: B;
1225
+ /** Only defined inside $ZodCodec instances. */
1226
+ transform?: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
1227
+ /** Only defined inside $ZodCodec instances. */
1228
+ reverseTransform?: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
1229
+ }
1230
+ interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
1231
+ def: $ZodPipeDef<A, B>;
1232
+ isst: never;
1233
+ values: A["_zod"]["values"];
1234
+ optin: A["_zod"]["optin"];
1235
+ optout: B["_zod"]["optout"];
1236
+ propValues: A["_zod"]["propValues"];
1237
+ }
1238
+ interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
1239
+ _zod: $ZodPipeInternals<A, B>;
1240
+ }
1241
+ declare const $ZodPipe: $constructor<$ZodPipe>;
1242
+ interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1243
+ type: "readonly";
1244
+ innerType: T;
1245
+ }
1246
+ interface $ZodReadonlyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<MakeReadonly<output<T>>, MakeReadonly<input<T>>> {
1247
+ def: $ZodReadonlyDef<T>;
1248
+ optin: T["_zod"]["optin"];
1249
+ optout: T["_zod"]["optout"];
1250
+ isst: never;
1251
+ propValues: T["_zod"]["propValues"];
1252
+ values: T["_zod"]["values"];
1253
+ }
1254
+ interface $ZodReadonly<T extends SomeType = $ZodType> extends $ZodType {
1255
+ _zod: $ZodReadonlyInternals<T>;
1256
+ }
1257
+ declare const $ZodReadonly: $constructor<$ZodReadonly>;
1258
+ interface $ZodTemplateLiteralDef extends $ZodTypeDef {
1259
+ type: "template_literal";
1260
+ parts: $ZodTemplateLiteralPart[];
1261
+ format?: string | undefined;
1262
+ }
1263
+ interface $ZodTemplateLiteralInternals<Template extends string = string> extends $ZodTypeInternals<Template, Template> {
1264
+ pattern: RegExp;
1265
+ def: $ZodTemplateLiteralDef;
1266
+ isst: $ZodIssueInvalidType;
1267
+ }
1268
+ interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
1269
+ _zod: $ZodTemplateLiteralInternals<Template>;
1270
+ }
1271
+ type LiteralPart = Exclude<Literal, symbol>;
1272
+ interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
1273
+ pattern: RegExp;
1274
+ }
1275
+ interface SchemaPart extends $ZodType {
1276
+ _zod: SchemaPartInternals;
1277
+ }
1278
+ type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
1279
+ declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
1280
+ type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
1281
+ type $ZodFunctionIn = $ZodFunctionArgs;
1282
+ type $ZodFunctionOut = $ZodType;
1283
+ type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input<Returns>;
1284
+ type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => MaybeAsync<input<Returns>>;
1285
+ type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => output<Returns>;
1286
+ type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => Promise<output<Returns>>;
1287
+ interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
1288
+ type: "function";
1289
+ input: In;
1290
+ output: Out;
1291
+ }
1292
+ interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
1293
+ def: $ZodFunctionDef<Args, Returns>;
1294
+ isst: $ZodIssueInvalidType;
1295
+ }
1296
+ interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodType<any, any, $ZodFunctionInternals<Args, Returns>> {
1297
+ /** @deprecated */
1298
+ _def: $ZodFunctionDef<Args, Returns>;
1299
+ _input: $InferInnerFunctionType<Args, Returns>;
1300
+ _output: $InferOuterFunctionType<Args, Returns>;
1301
+ implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
1302
+ implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
1303
+ input<const Items extends TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest): $ZodFunction<$ZodTuple<Items, Rest>, Returns>;
1304
+ input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
1305
+ input(...args: any[]): $ZodFunction<any, Returns>;
1306
+ output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
1307
+ }
1308
+ declare const $ZodFunction: $constructor<$ZodFunction>;
1309
+ interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1310
+ type: "promise";
1311
+ innerType: T;
1312
+ }
1313
+ interface $ZodPromiseInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T>>, MaybeAsync<input<T>>> {
1314
+ def: $ZodPromiseDef<T>;
1315
+ isst: never;
1316
+ }
1317
+ interface $ZodPromise<T extends SomeType = $ZodType> extends $ZodType {
1318
+ _zod: $ZodPromiseInternals<T>;
1319
+ }
1320
+ declare const $ZodPromise: $constructor<$ZodPromise>;
1321
+ interface $ZodLazyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1322
+ type: "lazy";
1323
+ getter: () => T;
1324
+ }
1325
+ interface $ZodLazyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1326
+ def: $ZodLazyDef<T>;
1327
+ isst: never;
1328
+ /** Auto-cached way to retrieve the inner schema */
1329
+ innerType: T;
1330
+ pattern: T["_zod"]["pattern"];
1331
+ propValues: T["_zod"]["propValues"];
1332
+ optin: T["_zod"]["optin"];
1333
+ optout: T["_zod"]["optout"];
1334
+ }
1335
+ interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
1336
+ _zod: $ZodLazyInternals<T>;
1337
+ }
1338
+ declare const $ZodLazy: $constructor<$ZodLazy>;
1339
+ interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
1340
+ type: "custom";
1341
+ check: "custom";
1342
+ path?: PropertyKey[] | undefined;
1343
+ error?: $ZodErrorMap | undefined;
1344
+ params?: Record<string, any> | undefined;
1345
+ fn: (arg: O) => unknown;
1346
+ }
1347
+ interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, $ZodCheckInternals<O> {
1348
+ def: $ZodCustomDef;
1349
+ issc: $ZodIssue;
1350
+ isst: never;
1351
+ bag: LoosePartial<{
1352
+ Class: typeof Class;
1353
+ }>;
1354
+ }
1355
+ interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
1356
+ _zod: $ZodCustomInternals<O, I>;
1357
+ }
1358
+ declare const $ZodCustom: $constructor<$ZodCustom>;
1359
+ 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;
1360
+ //#endregion
1361
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.d.cts
1362
+ interface $ZodCheckDef {
1363
+ check: string;
1364
+ error?: $ZodErrorMap<never> | undefined;
1365
+ /** If true, no later checks will be executed if this check fails. Default `false`. */
1366
+ abort?: boolean | undefined;
1367
+ /** If provided, the check runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
1368
+ when?: ((payload: ParsePayload) => boolean) | undefined;
1369
+ }
1370
+ interface $ZodCheckInternals<T> {
1371
+ def: $ZodCheckDef;
1372
+ /** The set of issues this check might throw. */
1373
+ issc?: $ZodIssueBase;
1374
+ check(payload: ParsePayload<T>): MaybeAsync<void>;
1375
+ onattach: ((schema: $ZodType) => void)[];
1376
+ }
1377
+ interface $ZodCheck<in T = never> {
1378
+ _zod: $ZodCheckInternals<T>;
1379
+ }
1380
+ declare const $ZodCheck: $constructor<$ZodCheck<any>>;
1381
+ interface $ZodCheckLessThanDef extends $ZodCheckDef {
1382
+ check: "less_than";
1383
+ value: Numeric;
1384
+ inclusive: boolean;
1385
+ }
1386
+ interface $ZodCheckLessThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
1387
+ def: $ZodCheckLessThanDef;
1388
+ issc: $ZodIssueTooBig<T>;
1389
+ }
1390
+ interface $ZodCheckLessThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
1391
+ _zod: $ZodCheckLessThanInternals<T>;
1392
+ }
1393
+ declare const $ZodCheckLessThan: $constructor<$ZodCheckLessThan>;
1394
+ interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
1395
+ check: "greater_than";
1396
+ value: Numeric;
1397
+ inclusive: boolean;
1398
+ }
1399
+ interface $ZodCheckGreaterThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
1400
+ def: $ZodCheckGreaterThanDef;
1401
+ issc: $ZodIssueTooSmall<T>;
1402
+ }
1403
+ interface $ZodCheckGreaterThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
1404
+ _zod: $ZodCheckGreaterThanInternals<T>;
1405
+ }
1406
+ declare const $ZodCheckGreaterThan: $constructor<$ZodCheckGreaterThan>;
1407
+ interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
1408
+ check: "multiple_of";
1409
+ value: T;
1410
+ }
1411
+ interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint> extends $ZodCheckInternals<T> {
1412
+ def: $ZodCheckMultipleOfDef<T>;
1413
+ issc: $ZodIssueNotMultipleOf;
1414
+ }
1415
+ interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
1416
+ _zod: $ZodCheckMultipleOfInternals<T>;
1417
+ }
1418
+ declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
1419
+ type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
1420
+ interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
1421
+ check: "number_format";
1422
+ format: $ZodNumberFormats;
1423
+ }
1424
+ interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
1425
+ def: $ZodCheckNumberFormatDef;
1426
+ issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
1427
+ }
1428
+ interface $ZodCheckNumberFormat extends $ZodCheck<number> {
1429
+ _zod: $ZodCheckNumberFormatInternals;
1430
+ }
1431
+ declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
1432
+ interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
1433
+ check: "max_length";
1434
+ maximum: number;
1435
+ }
1436
+ interface $ZodCheckMaxLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1437
+ def: $ZodCheckMaxLengthDef;
1438
+ issc: $ZodIssueTooBig<T>;
1439
+ }
1440
+ interface $ZodCheckMaxLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
1441
+ _zod: $ZodCheckMaxLengthInternals<T>;
1442
+ }
1443
+ declare const $ZodCheckMaxLength: $constructor<$ZodCheckMaxLength>;
1444
+ interface $ZodCheckMinLengthDef extends $ZodCheckDef {
1445
+ check: "min_length";
1446
+ minimum: number;
1447
+ }
1448
+ interface $ZodCheckMinLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1449
+ def: $ZodCheckMinLengthDef;
1450
+ issc: $ZodIssueTooSmall<T>;
1451
+ }
1452
+ interface $ZodCheckMinLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
1453
+ _zod: $ZodCheckMinLengthInternals<T>;
1454
+ }
1455
+ declare const $ZodCheckMinLength: $constructor<$ZodCheckMinLength>;
1456
+ interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
1457
+ check: "length_equals";
1458
+ length: number;
1459
+ }
1460
+ interface $ZodCheckLengthEqualsInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1461
+ def: $ZodCheckLengthEqualsDef;
1462
+ issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
1463
+ }
1464
+ interface $ZodCheckLengthEquals<T extends HasLength = HasLength> extends $ZodCheck<T> {
1465
+ _zod: $ZodCheckLengthEqualsInternals<T>;
1466
+ }
1467
+ declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
1468
+ 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";
1469
+ interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
1470
+ check: "string_format";
1471
+ format: Format;
1472
+ pattern?: RegExp | undefined;
1473
+ }
1474
+ interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
1475
+ def: $ZodCheckStringFormatDef;
1476
+ issc: $ZodIssueInvalidStringFormat;
1477
+ }
1478
+ interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
1479
+ format: "regex";
1480
+ pattern: RegExp;
1481
+ }
1482
+ interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
1483
+ def: $ZodCheckRegexDef;
1484
+ issc: $ZodIssueInvalidStringFormat;
1485
+ }
1486
+ interface $ZodCheckRegex extends $ZodCheck<string> {
1487
+ _zod: $ZodCheckRegexInternals;
1488
+ }
1489
+ declare const $ZodCheckRegex: $constructor<$ZodCheckRegex>;
1490
+ interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {}
1491
+ interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
1492
+ def: $ZodCheckLowerCaseDef;
1493
+ issc: $ZodIssueInvalidStringFormat;
1494
+ }
1495
+ interface $ZodCheckLowerCase extends $ZodCheck<string> {
1496
+ _zod: $ZodCheckLowerCaseInternals;
1497
+ }
1498
+ declare const $ZodCheckLowerCase: $constructor<$ZodCheckLowerCase>;
1499
+ interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {}
1500
+ interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
1501
+ def: $ZodCheckUpperCaseDef;
1502
+ issc: $ZodIssueInvalidStringFormat;
1503
+ }
1504
+ interface $ZodCheckUpperCase extends $ZodCheck<string> {
1505
+ _zod: $ZodCheckUpperCaseInternals;
1506
+ }
1507
+ declare const $ZodCheckUpperCase: $constructor<$ZodCheckUpperCase>;
1508
+ interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
1509
+ includes: string;
1510
+ position?: number | undefined;
1511
+ }
1512
+ interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
1513
+ def: $ZodCheckIncludesDef;
1514
+ issc: $ZodIssueInvalidStringFormat;
1515
+ }
1516
+ interface $ZodCheckIncludes extends $ZodCheck<string> {
1517
+ _zod: $ZodCheckIncludesInternals;
1518
+ }
1519
+ declare const $ZodCheckIncludes: $constructor<$ZodCheckIncludes>;
1520
+ interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
1521
+ prefix: string;
1522
+ }
1523
+ interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
1524
+ def: $ZodCheckStartsWithDef;
1525
+ issc: $ZodIssueInvalidStringFormat;
1526
+ }
1527
+ interface $ZodCheckStartsWith extends $ZodCheck<string> {
1528
+ _zod: $ZodCheckStartsWithInternals;
1529
+ }
1530
+ declare const $ZodCheckStartsWith: $constructor<$ZodCheckStartsWith>;
1531
+ interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
1532
+ suffix: string;
1533
+ }
1534
+ interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
1535
+ def: $ZodCheckEndsWithDef;
1536
+ issc: $ZodIssueInvalidStringFormat;
1537
+ }
1538
+ interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
1539
+ _zod: $ZodCheckEndsWithInternals;
1540
+ }
1541
+ declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
1542
+ //#endregion
1543
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.d.cts
1544
+ interface $ZodIssueBase {
1545
+ readonly code?: string;
1546
+ readonly input?: unknown;
1547
+ readonly path: PropertyKey[];
1548
+ readonly message: string;
1549
+ }
1550
+ type $ZodInvalidTypeExpected = "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "undefined" | "null" | "never" | "void" | "date" | "array" | "object" | "tuple" | "record" | "map" | "set" | "file" | "nonoptional" | "nan" | "function" | (string & {});
1551
+ interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
1552
+ readonly code: "invalid_type";
1553
+ readonly expected: $ZodInvalidTypeExpected;
1554
+ readonly input?: Input;
1555
+ }
1556
+ interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
1557
+ readonly code: "too_big";
1558
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
1559
+ readonly maximum: number | bigint;
1560
+ readonly inclusive?: boolean;
1561
+ readonly exact?: boolean;
1562
+ readonly input?: Input;
1563
+ }
1564
+ interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
1565
+ readonly code: "too_small";
1566
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
1567
+ readonly minimum: number | bigint;
1568
+ /** True if the allowable range includes the minimum */
1569
+ readonly inclusive?: boolean;
1570
+ /** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
1571
+ readonly exact?: boolean;
1572
+ readonly input?: Input;
1573
+ }
1574
+ interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
1575
+ readonly code: "invalid_format";
1576
+ readonly format: $ZodStringFormats | (string & {});
1577
+ readonly pattern?: string;
1578
+ readonly input?: string;
1579
+ }
1580
+ interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
1581
+ readonly code: "not_multiple_of";
1582
+ readonly divisor: number;
1583
+ readonly input?: Input;
1584
+ }
1585
+ interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
1586
+ readonly code: "unrecognized_keys";
1587
+ readonly keys: string[];
1588
+ readonly input?: Record<string, unknown>;
1589
+ }
1590
+ interface $ZodIssueInvalidUnionNoMatch extends $ZodIssueBase {
1591
+ readonly code: "invalid_union";
1592
+ readonly errors: $ZodIssue[][];
1593
+ readonly input?: unknown;
1594
+ readonly discriminator?: string | undefined;
1595
+ readonly options?: Primitive[];
1596
+ readonly inclusive?: true;
1597
+ }
1598
+ interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
1599
+ readonly code: "invalid_union";
1600
+ readonly errors: [];
1601
+ readonly input?: unknown;
1602
+ readonly discriminator?: string | undefined;
1603
+ readonly inclusive: false;
1604
+ }
1605
+ type $ZodIssueInvalidUnion = $ZodIssueInvalidUnionNoMatch | $ZodIssueInvalidUnionMultipleMatch;
1606
+ interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
1607
+ readonly code: "invalid_key";
1608
+ readonly origin: "map" | "record";
1609
+ readonly issues: $ZodIssue[];
1610
+ readonly input?: Input;
1611
+ }
1612
+ interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
1613
+ readonly code: "invalid_element";
1614
+ readonly origin: "map" | "set";
1615
+ readonly key: unknown;
1616
+ readonly issues: $ZodIssue[];
1617
+ readonly input?: Input;
1618
+ }
1619
+ interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
1620
+ readonly code: "invalid_value";
1621
+ readonly values: Primitive[];
1622
+ readonly input?: Input;
1623
+ }
1624
+ interface $ZodIssueCustom extends $ZodIssueBase {
1625
+ readonly code: "custom";
1626
+ readonly params?: Record<string, any> | undefined;
1627
+ readonly input?: unknown;
1628
+ }
1629
+ type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
1630
+ type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
1631
+ type RawIssue$1<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1632
+ /** The input data */
1633
+ readonly input: unknown;
1634
+ /** The schema or check that originated this issue. */
1635
+ readonly inst?: $ZodType | $ZodCheck;
1636
+ /** If `true`, Zod will continue executing checks/refinements after this issue. */
1637
+ readonly continue?: boolean | undefined;
1638
+ } & Record<string, unknown>> : never;
1639
+ type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;
1640
+ interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {
1641
+ (issue: $ZodRawIssue<T>): {
1642
+ message: string;
1643
+ } | string | undefined | null;
1644
+ }
1645
+ interface $ZodError<T = unknown> extends Error {
1646
+ type: T;
1647
+ issues: $ZodIssue[];
1648
+ _zod: {
1649
+ output: T;
1650
+ def: $ZodIssue[];
1651
+ };
1652
+ stack?: string;
1653
+ name: string;
1654
+ }
1655
+ declare const $ZodError: $constructor<$ZodError>;
1656
+ type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
1657
+ type _FlattenedError<T, U = string> = {
1658
+ formErrors: U[];
1659
+ fieldErrors: { [P in keyof T]?: U[]; };
1660
+ };
1661
+ type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U>; } : T extends any[] ? {
1662
+ [k: number]: $ZodFormattedError<T[number], U>;
1663
+ } : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U>; }> : any;
1664
+ type $ZodFormattedError<T, U = string> = {
1665
+ _errors: U[];
1666
+ } & Flatten<_ZodFormattedError<T, U>>;
1667
+ //#endregion
1668
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.d.cts
1669
+ type ZodTrait = {
1670
+ _zod: {
1671
+ def: any;
1672
+ [k: string]: any;
1673
+ };
1674
+ };
1675
+ interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
1676
+ new (def: D): T;
1677
+ init(inst: T, def: D): asserts inst is T;
1678
+ }
1679
+ declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
1680
+ Parent?: typeof Class;
1681
+ }): $constructor<T, D>;
1682
+ declare const $brand: unique symbol;
1683
+ type $brand<T extends string | number | symbol = string | number | symbol> = {
1684
+ [$brand]: { [k in T]: true; };
1685
+ };
1686
+ type $ZodBranded<T extends SomeType, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T & (Dir extends "inout" ? {
1687
+ _zod: {
1688
+ input: input<T> & $brand<Brand>;
1689
+ output: output<T> & $brand<Brand>;
1690
+ };
1691
+ } : Dir extends "in" ? {
1692
+ _zod: {
1693
+ input: input<T> & $brand<Brand>;
1694
+ };
1695
+ } : {
1696
+ _zod: {
1697
+ output: output<T> & $brand<Brand>;
1698
+ };
1699
+ });
1700
+ type input<T> = T extends {
1701
+ _zod: {
1702
+ input: any;
1703
+ };
1704
+ } ? T["_zod"]["input"] : unknown;
1705
+ type output<T> = T extends {
1706
+ _zod: {
1707
+ output: any;
1708
+ };
1709
+ } ? T["_zod"]["output"] : unknown;
1710
+ //#endregion
1711
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.d.cts
1712
+ 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] ? {} : {
1713
+ error?: string | $ZodErrorMap<IssueTypes> | undefined;
1714
+ /** @deprecated This parameter is deprecated. Use `error` instead. */
1715
+ message?: string | undefined;
1716
+ })>>>;
1717
+ type TypeParams<T extends $ZodType = $ZodType & {
1718
+ _isst: never;
1719
+ }, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
1720
+ type CheckParams<T extends $ZodCheck = $ZodCheck // & { _issc: never },
1721
+ , AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
1722
+ 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>;
1723
+ 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>;
1724
+ type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
1725
+ type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">;
1726
+ type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
1727
+ type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
1728
+ type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
1729
+ type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
1730
+ /**
1731
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
1732
+ * (timestamps embedded in the id). Use {@link _cuid2} instead.
1733
+ * See https://github.com/paralleldrive/cuid.
1734
+ */
1735
+ type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
1736
+ type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
1737
+ type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
1738
+ type $ZodCheckXIDParams = CheckStringFormatParams<$ZodXID, "when">;
1739
+ type $ZodCheckKSUIDParams = CheckStringFormatParams<$ZodKSUID, "when">;
1740
+ type $ZodCheckIPv4Params = CheckStringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
1741
+ type $ZodCheckIPv6Params = CheckStringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
1742
+ type $ZodCheckCIDRv4Params = CheckStringFormatParams<$ZodCIDRv4, "pattern" | "when">;
1743
+ type $ZodCheckCIDRv6Params = CheckStringFormatParams<$ZodCIDRv6, "pattern" | "when">;
1744
+ type $ZodCheckBase64Params = CheckStringFormatParams<$ZodBase64, "pattern" | "when">;
1745
+ type $ZodCheckBase64URLParams = CheckStringFormatParams<$ZodBase64URL, "pattern" | "when">;
1746
+ type $ZodCheckE164Params = CheckStringFormatParams<$ZodE164, "when">;
1747
+ type $ZodCheckJWTParams = CheckStringFormatParams<$ZodJWT, "pattern" | "when">;
1748
+ type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "pattern" | "when">;
1749
+ type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
1750
+ type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
1751
+ type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
1752
+ type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
1753
+ type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
1754
+ type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
1755
+ type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
1756
+ type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
1757
+ type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
1758
+ type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
1759
+ type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
1760
+ type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
1761
+ type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
1762
+ type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
1763
+ type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
1764
+ type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
1765
+ type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
1766
+ type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
1767
+ type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
1768
+ type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
1769
+ type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1770
+ /** The schema or check that originated this issue. */
1771
+ readonly inst?: $ZodType | $ZodCheck;
1772
+ /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
1773
+ readonly continue?: boolean | undefined;
1774
+ } & Record<string, unknown>> : never;
1775
+ interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
1776
+ addIssue(arg: string | $ZodSuperRefineIssue): void;
1777
+ }
1778
+ interface $ZodSuperRefineParams {
1779
+ /** If provided, the refinement runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
1780
+ when?: ((payload: ParsePayload) => boolean) | undefined;
1781
+ }
1782
+ //#endregion
1783
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.d.cts
1784
+ /** An Error-like class used to store Zod validation issues. */
1785
+ interface ZodError<T = unknown> extends $ZodError<T> {
1786
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
1787
+ format(): $ZodFormattedError<T>;
1788
+ format<U>(mapper: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
1789
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
1790
+ flatten(): $ZodFlattenedError<T>;
1791
+ flatten<U>(mapper: (issue: $ZodIssue) => U): $ZodFlattenedError<T, U>;
1792
+ /** @deprecated Push directly to `.issues` instead. */
1793
+ addIssue(issue: $ZodIssue): void;
1794
+ /** @deprecated Push directly to `.issues` instead. */
1795
+ addIssues(issues: $ZodIssue[]): void;
1796
+ /** @deprecated Check `err.issues.length === 0` instead. */
1797
+ isEmpty: boolean;
1798
+ }
1799
+ declare const ZodError: $constructor<ZodError>;
1800
+ //#endregion
1801
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.d.cts
1802
+ type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
1803
+ type ZodSafeParseSuccess<T> = {
1804
+ success: true;
1805
+ data: T;
1806
+ error?: never;
1807
+ };
1808
+ type ZodSafeParseError<T> = {
1809
+ success: false;
1810
+ data?: never;
1811
+ error: ZodError<T>;
1812
+ };
1813
+ //#endregion
1814
+ //#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.d.cts
1815
+ type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
1816
+ interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
1817
+ def: Internals["def"];
1818
+ type: Internals["def"]["type"];
1819
+ /** @deprecated Use `.def` instead. */
1820
+ _def: Internals["def"];
1821
+ /** @deprecated Use `z.output<typeof schema>` instead. */
1822
+ _output: Internals["output"];
1823
+ /** @deprecated Use `z.input<typeof schema>` instead. */
1824
+ _input: Internals["input"];
1825
+ "~standard": ZodStandardSchemaWithJSON<this>;
1826
+ /** Converts this schema to a JSON Schema representation. */
1827
+ toJSONSchema(params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<this>;
1828
+ check(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
1829
+ with(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
1830
+ clone(def?: Internals["def"], params?: {
1831
+ parent: boolean;
1832
+ }): this;
1833
+ 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;
1834
+ brand<T extends PropertyKey = PropertyKey, Dir extends "in" | "out" | "inout" = "out">(value?: T): PropertyKey extends T ? this : $ZodBranded<this, T, Dir>;
1835
+ parse(data: unknown, params?: ParseContext<$ZodIssue>): output<this>;
1836
+ safeParse(data: unknown, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
1837
+ parseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
1838
+ safeParseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
1839
+ spa: (data: unknown, params?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<this>>>;
1840
+ encode(data: output<this>, params?: ParseContext<$ZodIssue>): input<this>;
1841
+ decode(data: input<this>, params?: ParseContext<$ZodIssue>): output<this>;
1842
+ encodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<input<this>>;
1843
+ decodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
1844
+ safeEncode(data: output<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<input<this>>;
1845
+ safeDecode(data: input<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
1846
+ safeEncodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<input<this>>>;
1847
+ safeDecodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
1848
+ 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;
1849
+ superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>, params?: $ZodSuperRefineParams): this;
1850
+ overwrite(fn: (x: output<this>) => output<this>): this;
1851
+ optional(): ZodOptional<this>;
1852
+ exactOptional(): ZodExactOptional<this>;
1853
+ nonoptional(params?: string | $ZodNonOptionalParams): ZodNonOptional<this>;
1854
+ nullable(): ZodNullable<this>;
1855
+ nullish(): ZodOptional<ZodNullable<this>>;
1856
+ default(def: NoUndefined<output<this>>): ZodDefault<this>;
1857
+ default(def: () => NoUndefined<output<this>>): ZodDefault<this>;
1858
+ prefault(def: () => input<this>): ZodPrefault<this>;
1859
+ prefault(def: input<this>): ZodPrefault<this>;
1860
+ array(): ZodArray<this>;
1861
+ or<T extends SomeType>(option: T): ZodUnion<[this, T]>;
1862
+ and<T extends SomeType>(incoming: T): ZodIntersection<this, T>;
1863
+ transform<NewOut>(transform: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, output<this>>>;
1864
+ catch(def: output<this>): ZodCatch<this>;
1865
+ catch(def: (ctx: $ZodCatchCtx) => output<this>): ZodCatch<this>;
1866
+ pipe<T extends $ZodType<any, output<this>>>(target: T | $ZodType<any, output<this>>): ZodPipe<this, T>;
1867
+ readonly(): ZodReadonly<this>;
1868
+ /** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
1869
+ describe(description: string): this;
1870
+ description?: string;
1871
+ /** Returns the metadata associated with this instance in `z.globalRegistry` */
1872
+ meta(): $replace<GlobalMeta, this> | undefined;
1873
+ /** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
1874
+ meta(data: $replace<GlobalMeta, this>): this;
1875
+ /** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
1876
+ *
1877
+ * ```ts
1878
+ * const schema = z.string().optional();
1879
+ * const isOptional = schema.safeParse(undefined).success; // true
1880
+ * ```
1881
+ */
1882
+ isOptional(): boolean;
1883
+ /**
1884
+ * @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
1885
+ *
1886
+ * ```ts
1887
+ * const schema = z.string().nullable();
1888
+ * const isNullable = schema.safeParse(null).success; // true
1889
+ * ```
1890
+ */
1891
+ isNullable(): boolean;
1892
+ apply<T>(fn: (schema: this) => T): T;
1893
+ }
1894
+ interface _ZodType<out Internals extends $ZodTypeInternals = $ZodTypeInternals> extends ZodType<any, any, Internals> {}
1895
+ declare const ZodType: $constructor<ZodType>;
1896
+ interface _ZodString<T extends $ZodStringInternals<unknown> = $ZodStringInternals<unknown>> extends _ZodType<T> {
1897
+ format: string | null;
1898
+ minLength: number | null;
1899
+ maxLength: number | null;
1900
+ regex(regex: RegExp, params?: string | $ZodCheckRegexParams): this;
1901
+ includes(value: string, params?: string | $ZodCheckIncludesParams): this;
1902
+ startsWith(value: string, params?: string | $ZodCheckStartsWithParams): this;
1903
+ endsWith(value: string, params?: string | $ZodCheckEndsWithParams): this;
1904
+ min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
1905
+ max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
1906
+ length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
1907
+ nonempty(params?: string | $ZodCheckMinLengthParams): this;
1908
+ lowercase(params?: string | $ZodCheckLowerCaseParams): this;
1909
+ uppercase(params?: string | $ZodCheckUpperCaseParams): this;
1910
+ trim(): this;
1911
+ normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
1912
+ toLowerCase(): this;
1913
+ toUpperCase(): this;
1914
+ slugify(): this;
1915
+ }
1916
+ /** @internal */
1917
+ declare const _ZodString: $constructor<_ZodString>;
1918
+ interface ZodString extends _ZodString<$ZodStringInternals<string>> {
1919
+ /** @deprecated Use `z.email()` instead. */
1920
+ email(params?: string | $ZodCheckEmailParams): this;
1921
+ /** @deprecated Use `z.url()` instead. */
1922
+ url(params?: string | $ZodCheckURLParams): this;
1923
+ /** @deprecated Use `z.jwt()` instead. */
1924
+ jwt(params?: string | $ZodCheckJWTParams): this;
1925
+ /** @deprecated Use `z.emoji()` instead. */
1926
+ emoji(params?: string | $ZodCheckEmojiParams): this;
1927
+ /** @deprecated Use `z.guid()` instead. */
1928
+ guid(params?: string | $ZodCheckGUIDParams): this;
1929
+ /** @deprecated Use `z.uuid()` instead. */
1930
+ uuid(params?: string | $ZodCheckUUIDParams): this;
1931
+ /** @deprecated Use `z.uuid()` instead. */
1932
+ uuidv4(params?: string | $ZodCheckUUIDParams): this;
1933
+ /** @deprecated Use `z.uuid()` instead. */
1934
+ uuidv6(params?: string | $ZodCheckUUIDParams): this;
1935
+ /** @deprecated Use `z.uuid()` instead. */
1936
+ uuidv7(params?: string | $ZodCheckUUIDParams): this;
1937
+ /** @deprecated Use `z.nanoid()` instead. */
1938
+ nanoid(params?: string | $ZodCheckNanoIDParams): this;
1939
+ /** @deprecated Use `z.guid()` instead. */
1940
+ guid(params?: string | $ZodCheckGUIDParams): this;
1941
+ /**
1942
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
1943
+ * (timestamps embedded in the id). Use `z.cuid2()` instead.
1944
+ * See https://github.com/paralleldrive/cuid.
1945
+ */
1946
+ cuid(params?: string | $ZodCheckCUIDParams): this;
1947
+ /** @deprecated Use `z.cuid2()` instead. */
1948
+ cuid2(params?: string | $ZodCheckCUID2Params): this;
1949
+ /** @deprecated Use `z.ulid()` instead. */
1950
+ ulid(params?: string | $ZodCheckULIDParams): this;
1951
+ /** @deprecated Use `z.base64()` instead. */
1952
+ base64(params?: string | $ZodCheckBase64Params): this;
1953
+ /** @deprecated Use `z.base64url()` instead. */
1954
+ base64url(params?: string | $ZodCheckBase64URLParams): this;
1955
+ /** @deprecated Use `z.xid()` instead. */
1956
+ xid(params?: string | $ZodCheckXIDParams): this;
1957
+ /** @deprecated Use `z.ksuid()` instead. */
1958
+ ksuid(params?: string | $ZodCheckKSUIDParams): this;
1959
+ /** @deprecated Use `z.ipv4()` instead. */
1960
+ ipv4(params?: string | $ZodCheckIPv4Params): this;
1961
+ /** @deprecated Use `z.ipv6()` instead. */
1962
+ ipv6(params?: string | $ZodCheckIPv6Params): this;
1963
+ /** @deprecated Use `z.cidrv4()` instead. */
1964
+ cidrv4(params?: string | $ZodCheckCIDRv4Params): this;
1965
+ /** @deprecated Use `z.cidrv6()` instead. */
1966
+ cidrv6(params?: string | $ZodCheckCIDRv6Params): this;
1967
+ /** @deprecated Use `z.e164()` instead. */
1968
+ e164(params?: string | $ZodCheckE164Params): this;
1969
+ /** @deprecated Use `z.iso.datetime()` instead. */
1970
+ datetime(params?: string | $ZodCheckISODateTimeParams): this;
1971
+ /** @deprecated Use `z.iso.date()` instead. */
1972
+ date(params?: string | $ZodCheckISODateParams): this;
1973
+ /** @deprecated Use `z.iso.time()` instead. */
1974
+ time(params?: string | $ZodCheckISOTimeParams): this;
1975
+ /** @deprecated Use `z.iso.duration()` instead. */
1976
+ duration(params?: string | $ZodCheckISODurationParams): this;
1977
+ }
1978
+ declare const ZodString: $constructor<ZodString>;
1979
+ interface _ZodNumber<Internals extends $ZodNumberInternals = $ZodNumberInternals> extends _ZodType<Internals> {
1980
+ gt(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1981
+ /** Identical to .min() */
1982
+ gte(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1983
+ min(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1984
+ lt(value: number, params?: string | $ZodCheckLessThanParams): this;
1985
+ /** Identical to .max() */
1986
+ lte(value: number, params?: string | $ZodCheckLessThanParams): this;
1987
+ max(value: number, params?: string | $ZodCheckLessThanParams): this;
1988
+ /** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
1989
+ int(params?: string | $ZodCheckNumberFormatParams): this;
1990
+ /** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
1991
+ safe(params?: string | $ZodCheckNumberFormatParams): this;
1992
+ positive(params?: string | $ZodCheckGreaterThanParams): this;
1993
+ nonnegative(params?: string | $ZodCheckGreaterThanParams): this;
1994
+ negative(params?: string | $ZodCheckLessThanParams): this;
1995
+ nonpositive(params?: string | $ZodCheckLessThanParams): this;
1996
+ multipleOf(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1997
+ /** @deprecated Use `.multipleOf()` instead. */
1998
+ step(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1999
+ /** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
2000
+ finite(params?: unknown): this;
2001
+ minValue: number | null;
2002
+ maxValue: number | null;
2003
+ /** @deprecated Check the `format` property instead. */
2004
+ isInt: boolean;
2005
+ /** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
2006
+ isFinite: boolean;
2007
+ format: string | null;
2008
+ }
2009
+ interface ZodNumber extends _ZodNumber<$ZodNumberInternals<number>> {}
2010
+ declare const ZodNumber: $constructor<ZodNumber>;
2011
+ interface _ZodBoolean<T extends $ZodBooleanInternals = $ZodBooleanInternals> extends _ZodType<T> {}
2012
+ interface ZodBoolean extends _ZodBoolean<$ZodBooleanInternals<boolean>> {}
2013
+ declare const ZodBoolean: $constructor<ZodBoolean>;
2014
+ interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T>>, $ZodArray<T> {
2015
+ element: T;
2016
+ min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
2017
+ nonempty(params?: string | $ZodCheckMinLengthParams): this;
2018
+ max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
2019
+ length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
2020
+ unwrap(): T;
2021
+ "~standard": ZodStandardSchemaWithJSON<this>;
2022
+ }
2023
+ declare const ZodArray: $constructor<ZodArray>;
2024
+ 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]; };
2025
+ interface ZodObject<
2026
+ /** @ts-ignore Cast variance */
2027
+ out Shape extends $ZodShape = $ZodLooseShape, out Config extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape, Config>>, $ZodObject<Shape, Config> {
2028
+ "~standard": ZodStandardSchemaWithJSON<this>;
2029
+ shape: Shape;
2030
+ keyof(): ZodEnum<ToEnum<keyof Shape & string>>;
2031
+ /** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
2032
+ catchall<T extends SomeType>(schema: T): ZodObject<Shape, $catchall<T>>;
2033
+ /** @deprecated Use `z.looseObject()` or `.loose()` instead. */
2034
+ passthrough(): ZodObject<Shape, $loose>;
2035
+ /** Consider `z.looseObject(A.shape)` instead */
2036
+ loose(): ZodObject<Shape, $loose>;
2037
+ /** Consider `z.strictObject(A.shape)` instead */
2038
+ strict(): ZodObject<Shape, $strict>;
2039
+ /** This is the default behavior. This method call is likely unnecessary. */
2040
+ strip(): ZodObject<Shape, $strip>;
2041
+ extend<U extends $ZodLooseShape>(shape: U): ZodObject<Extend<Shape, Writeable<U>>, Config>;
2042
+ safeExtend<U extends $ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, SomeType>>): ZodObject<Extend<Shape, Writeable<U>>, Config>;
2043
+ /**
2044
+ * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
2045
+ */
2046
+ merge<U extends ZodObject>(other: U): ZodObject<Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
2047
+ 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>;
2048
+ 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>;
2049
+ partial(): ZodObject<{ -readonly [k in keyof Shape]: ZodOptional<Shape[k]>; }, Config>;
2050
+ 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>;
2051
+ required(): ZodObject<{ -readonly [k in keyof Shape]: ZodNonOptional<Shape[k]>; }, Config>;
2052
+ 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>;
2053
+ }
2054
+ declare const ZodObject: $constructor<ZodObject>;
2055
+ interface ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T>>, $ZodUnion<T> {
2056
+ "~standard": ZodStandardSchemaWithJSON<this>;
2057
+ options: T;
2058
+ }
2059
+ declare const ZodUnion: $constructor<ZodUnion>;
2060
+ interface ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends ZodUnion<Options>, $ZodDiscriminatedUnion<Options, Disc> {
2061
+ "~standard": ZodStandardSchemaWithJSON<this>;
2062
+ _zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
2063
+ def: $ZodDiscriminatedUnionDef<Options, Disc>;
2064
+ }
2065
+ declare const ZodDiscriminatedUnion: $constructor<ZodDiscriminatedUnion>;
2066
+ interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A, B>>, $ZodIntersection<A, B> {
2067
+ "~standard": ZodStandardSchemaWithJSON<this>;
2068
+ }
2069
+ declare const ZodIntersection: $constructor<ZodIntersection>;
2070
+ interface ZodEnum<
2071
+ /** @ts-ignore Cast variance */
2072
+ out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
2073
+ "~standard": ZodStandardSchemaWithJSON<this>;
2074
+ enum: T;
2075
+ options: Array<T[keyof T]>;
2076
+ extract<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Pick<T, U[number]>>>;
2077
+ exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Omit<T, U[number]>>>;
2078
+ }
2079
+ declare const ZodEnum: $constructor<ZodEnum>;
2080
+ interface ZodLiteral<T extends Literal = Literal> extends _ZodType<$ZodLiteralInternals<T>>, $ZodLiteral<T> {
2081
+ "~standard": ZodStandardSchemaWithJSON<this>;
2082
+ values: Set<T>;
2083
+ /** @legacy Use `.values` instead. Accessing this property will throw an error if the literal accepts multiple values. */
2084
+ value: T;
2085
+ }
2086
+ declare const ZodLiteral: $constructor<ZodLiteral>;
2087
+ interface ZodTransform<O = unknown, I = unknown> extends _ZodType<$ZodTransformInternals<O, I>>, $ZodTransform<O, I> {
2088
+ "~standard": ZodStandardSchemaWithJSON<this>;
2089
+ }
2090
+ declare const ZodTransform: $constructor<ZodTransform>;
2091
+ interface ZodOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodOptionalInternals<T>>, $ZodOptional<T> {
2092
+ "~standard": ZodStandardSchemaWithJSON<this>;
2093
+ unwrap(): T;
2094
+ }
2095
+ declare const ZodOptional: $constructor<ZodOptional>;
2096
+ interface ZodExactOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodExactOptionalInternals<T>>, $ZodExactOptional<T> {
2097
+ "~standard": ZodStandardSchemaWithJSON<this>;
2098
+ unwrap(): T;
2099
+ }
2100
+ declare const ZodExactOptional: $constructor<ZodExactOptional>;
2101
+ interface ZodNullable<T extends SomeType = $ZodType> extends _ZodType<$ZodNullableInternals<T>>, $ZodNullable<T> {
2102
+ "~standard": ZodStandardSchemaWithJSON<this>;
2103
+ unwrap(): T;
2104
+ }
2105
+ declare const ZodNullable: $constructor<ZodNullable>;
2106
+ interface ZodDefault<T extends SomeType = $ZodType> extends _ZodType<$ZodDefaultInternals<T>>, $ZodDefault<T> {
2107
+ "~standard": ZodStandardSchemaWithJSON<this>;
2108
+ unwrap(): T;
2109
+ /** @deprecated Use `.unwrap()` instead. */
2110
+ removeDefault(): T;
2111
+ }
2112
+ declare const ZodDefault: $constructor<ZodDefault>;
2113
+ interface ZodPrefault<T extends SomeType = $ZodType> extends _ZodType<$ZodPrefaultInternals<T>>, $ZodPrefault<T> {
2114
+ "~standard": ZodStandardSchemaWithJSON<this>;
2115
+ unwrap(): T;
2116
+ }
2117
+ declare const ZodPrefault: $constructor<ZodPrefault>;
2118
+ interface ZodNonOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodNonOptionalInternals<T>>, $ZodNonOptional<T> {
2119
+ "~standard": ZodStandardSchemaWithJSON<this>;
2120
+ unwrap(): T;
2121
+ }
2122
+ declare const ZodNonOptional: $constructor<ZodNonOptional>;
2123
+ interface ZodCatch<T extends SomeType = $ZodType> extends _ZodType<$ZodCatchInternals<T>>, $ZodCatch<T> {
2124
+ "~standard": ZodStandardSchemaWithJSON<this>;
2125
+ unwrap(): T;
2126
+ /** @deprecated Use `.unwrap()` instead. */
2127
+ removeCatch(): T;
2128
+ }
2129
+ declare const ZodCatch: $constructor<ZodCatch>;
2130
+ interface ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A, B>>, $ZodPipe<A, B> {
2131
+ "~standard": ZodStandardSchemaWithJSON<this>;
2132
+ in: A;
2133
+ out: B;
2134
+ }
2135
+ declare const ZodPipe: $constructor<ZodPipe>;
2136
+ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadonlyInternals<T>>, $ZodReadonly<T> {
2137
+ "~standard": ZodStandardSchemaWithJSON<this>;
2138
+ unwrap(): T;
2139
+ }
2140
+ declare const ZodReadonly: $constructor<ZodReadonly>;
2141
+ //#endregion
2142
+ //#region src/protocol.d.ts
2143
+ declare const zEditorCapabilities: ZodObject<{
2144
+ supportsContentEdits: ZodOptional<ZodBoolean>;
2145
+ supportsOptions: ZodOptional<ZodBoolean>;
2146
+ }, $strip>;
2147
+ declare const zHostCapabilities: ZodObject<{
2148
+ supportsContentEdits: ZodOptional<ZodBoolean>;
2149
+ supportsOptions: ZodOptional<ZodBoolean>;
2150
+ supportsForceUpdate: ZodOptional<ZodBoolean>;
2151
+ }, $strip>;
2152
+ declare const zTextEdit: ZodObject<{
2153
+ offset: ZodNumber;
2154
+ length: ZodNumber;
2155
+ newText: ZodString;
2156
+ }, $strip>;
2157
+ declare const zContentEdit: ZodDiscriminatedUnion<[ZodObject<{
2158
+ kind: ZodLiteral<"replace">;
2159
+ path: ZodArray<ZodString>;
2160
+ newValue: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>;
2161
+ }, $strip>, ZodObject<{
2162
+ kind: ZodLiteral<"stringEdits">;
2163
+ path: ZodArray<ZodString>;
2164
+ stringEdits: ZodArray<ZodObject<{
2165
+ offset: ZodNumber;
2166
+ length: ZodNumber;
2167
+ newText: ZodString;
2168
+ }, $strip>>;
2169
+ }, $strip>], "kind">;
2170
+ type ContentEdit = output<typeof zContentEdit>;
2171
+ type TextEdit = output<typeof zTextEdit>;
2172
+ type EditorCapabilities = output<typeof zEditorCapabilities>;
2173
+ type HostCapabilities = output<typeof zHostCapabilities>;
2174
+ type ContentType = "text" | "json";
2175
+ declare const webEditorHostInterface: any;
2176
+ declare const webEditorInterface: any;
2177
+ declare const zEmbeddedAppDescriptor: ZodObject<{
2178
+ handleId: ZodString;
2179
+ appId: ZodString;
2180
+ serviceId: ZodString;
2181
+ serviceIdPrefix: ZodString;
2182
+ }, $strip>;
2183
+ declare const zEmbeddingContext: ZodObject<{
2184
+ handleId: ZodString;
2185
+ appId: ZodString;
2186
+ serviceId: ZodString;
2187
+ serviceIdPrefix: ZodString;
2188
+ parentAppId: ZodString;
2189
+ }, $strip>;
2190
+ type EmbeddedAppDescriptor = output<typeof zEmbeddedAppDescriptor>;
2191
+ type EmbeddingContext = output<typeof zEmbeddingContext>;
2192
+ declare const vscodeAppHostInterface: any;
2193
+ /** Host-to-parent notifications for loaded child runtime changes. */
2194
+ declare const vscodeAppEmbeddingEventsInterface: any;
2195
+ /** Typed proxy used by the editor to invoke host methods. */
2196
+ type WebEditorHostProxy = InterfaceClient<typeof webEditorHostInterface>;
2197
+ /** Typed proxy used by the host to invoke editor methods. */
2198
+ type WebEditorProxy = InterfaceClient<typeof webEditorInterface>;
2199
+ /** Typed proxy used by an app to invoke `vscode-app-host` methods. */
2200
+ type VsCodeAppHostProxy = InterfaceClient<typeof vscodeAppHostInterface>;
2201
+ type VsCodeAppEmbeddingEventsProxy = InterfaceClient<typeof vscodeAppEmbeddingEventsInterface>;
2202
+ /** Scope a registration is written to. */
2203
+ type EditorScope = "workspace" | "global";
2204
+ /** This app's registration in one scope. */
2205
+ interface ScopeRegistration {
2206
+ /** Wired for the type (an "Open as Custom Editor" toolbar button appears). */
2207
+ readonly registered: boolean;
2208
+ /** The type auto-opens in this app (implies {@link registered}). */
2209
+ readonly isDefault: boolean;
2210
+ }
2211
+ /** Per-scope registration reported by `getEditorRegistration`. */
2212
+ interface EditorRegistrationStatus {
2213
+ /** Registration in user (global) settings. */
2214
+ readonly global: ScopeRegistration;
2215
+ /** Registration in the open workspace's settings. */
2216
+ readonly workspace: ScopeRegistration;
2217
+ /** Whether a workspace is open (so a workspace-scoped action applies). */
2218
+ readonly hasWorkspace: boolean;
2219
+ }
2220
+ /** Result of {@link vscodeAppHostInterface.configureEditorAssociation}. */
2221
+ interface EditorAssociationResult extends EditorRegistrationStatus {
2222
+ /** Whether the registration changed while the dialog was open. */
2223
+ readonly changed: boolean;
2224
+ }
2225
+ //#endregion
2226
+ //#region src/content/contentModel.d.ts
2227
+ type JsonValue = unknown;
2228
+ /**
2229
+ * Apply a list of {@link ContentEdit}s to a JSON value.
2230
+ *
2231
+ * Edits are applied in order. Each edit either replaces the value at `path`
2232
+ * or applies a sequence of string edits to the string at `path`.
2233
+ *
2234
+ * Returns the new root value. May mutate intermediate containers — callers
2235
+ * should treat the input as consumed.
2236
+ */
2237
+ declare function applyContentEdits(root: JsonValue, edits: readonly ContentEdit[]): JsonValue;
2238
+ /** Apply a list of {@link TextEdit}s to a string. Edits are applied in array order. */
2239
+ declare function applyTextEdits(text: string, edits: readonly TextEdit[]): string;
2240
+ //#endregion
2241
+ //#region src/content/textJsonCodec.d.ts
2242
+ /**
2243
+ * Options for encoding text as JSON content.
2244
+ *
2245
+ * `indentation` is forwarded to `JSON.stringify`. The encoded value may
2246
+ * contain a `$web-editor.format-json` hint that overrides this.
2247
+ */
2248
+ interface JsonFormatOptions {
2249
+ indentation?: number | "\t" | undefined;
2250
+ }
2251
+ /**
2252
+ * Encode a host-side text document into the value the editor sees.
2253
+ *
2254
+ * - `text`: identity.
2255
+ * - `json`: `JSON.parse(text)`. Throws on parse error.
2256
+ */
2257
+ declare function encodeForEditor(text: string, contentType: ContentType): JsonValue;
2258
+ /**
2259
+ * Decode the editor-side value back into the text the host stores.
2260
+ *
2261
+ * - `text`: must be a string; returned as-is.
2262
+ * - `json`: stringified. Honors `$web-editor.format-json` on the value
2263
+ * (number | "\t") and otherwise the passed-in options.
2264
+ */
2265
+ declare function decodeFromEditor(value: JsonValue, contentType: ContentType, options?: JsonFormatOptions): string;
2266
+ //#endregion
2267
+ //#region src/utils/event.d.ts
2268
+ interface IDisposable {
2269
+ dispose(): void;
2270
+ }
2271
+ type EventListener<T> = (event: T) => void;
2272
+ type Event<T> = (listener: EventListener<T>) => IDisposable;
2273
+ //#endregion
2274
+ //#region src/host/WebEditorHost.d.ts
2275
+ interface WebEditorHostOptions {
2276
+ /**
2277
+ * A connection wired up with a {@link IMessageTransport} that talks to the editor.
2278
+ * The host takes ownership and closes it on dispose.
2279
+ */
2280
+ connection: HubRpcConnection;
2281
+ /**
2282
+ * What the host stores. `text` is plain text; `json` is round-tripped through
2283
+ * `JSON.parse` / `JSON.stringify`. Default `text`.
2284
+ *
2285
+ * The editor announces its own `contentType` in `initialized`. They must match.
2286
+ */
2287
+ contentType?: ContentType;
2288
+ /** Initial text. Default `""`. */
2289
+ initialText?: string;
2290
+ /** Initial read-only state. Default `false`. */
2291
+ readOnly?: boolean;
2292
+ /** Indentation for JSON content. Ignored for text. */
2293
+ jsonFormat?: JsonFormatOptions;
2294
+ /** Host capabilities advertised on `initialized`. */
2295
+ capabilities?: HostCapabilities;
2296
+ /** Called when the editor sends malformed input. Defaults to `console.error`. */
2297
+ onError?: (message: string, detail?: unknown) => void;
2298
+ }
2299
+ /**
2300
+ * Host-side façade for the web-editor v0.12 protocol.
2301
+ *
2302
+ * Owns the canonical text content. Translates between text/JSON form and the
2303
+ * structural edits exchanged with the editor. Maintains the revision pair
2304
+ * required by the client-authority conflict policy.
2305
+ */
2306
+ declare class WebEditorHost implements IDisposable {
2307
+ private readonly _connection;
2308
+ private readonly _editor;
2309
+ private readonly _contentType;
2310
+ private readonly _jsonFormat;
2311
+ private readonly _onError;
2312
+ private readonly _capabilities;
2313
+ private _text;
2314
+ private _readOnly;
2315
+ private _serverRevision;
2316
+ private _acknowledgedClientRevision;
2317
+ private _editorInitialized;
2318
+ private _editorCapabilities;
2319
+ private readonly _onDidChangeText;
2320
+ readonly onDidChangeText: Event<{
2321
+ text: string;
2322
+ }>;
2323
+ private readonly _onDidInitialize;
2324
+ readonly onDidInitialize: Event<{
2325
+ capabilities: EditorCapabilities | undefined;
2326
+ }>;
2327
+ private readonly _onDidReportSize;
2328
+ readonly onDidReportSize: Event<{
2329
+ height: number;
2330
+ }>;
2331
+ constructor(options: WebEditorHostOptions);
2332
+ /** The text the host believes the document currently holds. */
2333
+ getText(): string;
2334
+ /**
2335
+ * Push a new full text to the editor. Sent as a `replace` at the document
2336
+ * root. If `force`, the editor must adopt it even with pending local edits.
2337
+ */
2338
+ setText(text: string, opts?: {
2339
+ force?: boolean;
2340
+ }): void;
2341
+ getReadOnly(): boolean;
2342
+ setReadOnly(readOnly: boolean): void;
2343
+ /**
2344
+ * Push fine-grained edits to the editor.
2345
+ * The host is responsible for keeping its own `_text` consistent with these edits.
2346
+ */
2347
+ applyEdits(edits: readonly ContentEdit[]): void;
2348
+ dispose(): void;
2349
+ private _pushFullUpdate;
2350
+ }
2351
+ //#endregion
2352
+ //#region src/client/connection.d.ts
2353
+ /**
2354
+ * Accepted `connection` inputs for the editor-side clients.
2355
+ *
2356
+ * - A ready {@link HubRpcConnection} — used as-is.
2357
+ * - The literal `"windowParent"` — the client builds a connection over a
2358
+ * {@link WindowMessageTransport} talking to `window.parent`. This lets an
2359
+ * app avoid depending on `@vscode/hubrpc` directly.
2360
+ */
2361
+ type ConnectionInput = HubRpcConnection | "windowParent";
2362
+ /**
2363
+ * Create a {@link HubRpcConnection} wired to the parent window via
2364
+ * {@link WindowMessageTransport}. Use inside an iframe whose host is the
2365
+ * embedding (parent) window.
2366
+ */
2367
+ declare function createWindowParentConnection(): HubRpcConnection;
2368
+ /**
2369
+ * A resolved host connection, plus the ability to obtain a *signed* send-only
2370
+ * connection (managed identity) for the rare cap-gated call that needs one
2371
+ * (e.g. registering the app as the default editor for a file type).
2372
+ *
2373
+ * The main {@link connection} is left unsigned — the vast majority of calls
2374
+ * don't need an identity, and signing every call would force a managed-identity
2375
+ * handshake on connect. The signed path is built lazily, only when a cap-gated
2376
+ * call actually asks for it.
2377
+ */
2378
+ declare class HostConnection {
2379
+ /** The primary (unsigned) connection to the host. */
2380
+ readonly connection: HubRpcConnection;
2381
+ private readonly _channel;
2382
+ /**
2383
+ * Build from a {@link ConnectionInput}. When `"windowParent"`, we retain
2384
+ * the underlying {@link Channel} so a managed-identity signing layer can be
2385
+ * added later over the *same* transport. When given a ready
2386
+ * {@link HubRpcConnection}, the signed path is unavailable (we have no
2387
+ * channel to wrap).
2388
+ */
2389
+ static from(input: ConnectionInput): HostConnection;
2390
+ private _signed;
2391
+ private constructor();
2392
+ /**
2393
+ * A send-only connection whose outbound calls are signed with a managed
2394
+ * identity. Built lazily and memoized — only set up when a cap-gated call
2395
+ * (e.g. registering as the default editor) actually needs it.
2396
+ *
2397
+ * Shares the underlying transport with {@link connection} and never binds
2398
+ * an inbound handler (the main connection owns the receive side); response
2399
+ * correlation happens in the shared `JsonRpcChannel`.
2400
+ */
2401
+ getSignedConnection(): Promise<HubRpcConnection>;
2402
+ /**
2403
+ * Request an explicit capability and persist durable grants in the same
2404
+ * managed principal used by {@link getSignedConnection}.
2405
+ */
2406
+ requestAccess(req: HubAccessRequest): Promise<HubAccessResult>;
2407
+ /**
2408
+ * Fail before loading a child when this connection cannot later request and
2409
+ * exercise the parent-to-child capability.
2410
+ */
2411
+ requireEmbeddedAppSupport(): void;
2412
+ private _requireManagedIdentityChannel;
2413
+ private _getSigned;
2414
+ private _buildSigned;
2415
+ }
2416
+ //#endregion
2417
+ //#region src/client/WebEditorClient.d.ts
2418
+ interface WebEditorClientOptions {
2419
+ /**
2420
+ * A connection that talks to the host, or the literal `"windowParent"` to
2421
+ * build one over a `WindowMessageTransport` to `window.parent` (so the app
2422
+ * needn't depend on `@vscode/hubrpc`). The client takes ownership and
2423
+ * closes it on dispose.
2424
+ */
2425
+ connection: ConnectionInput;
2426
+ /** Editor's content type. Must match what the host expects. Default `text`. */
2427
+ contentType?: ContentType;
2428
+ /** Editor capabilities announced to the host. */
2429
+ capabilities?: EditorCapabilities;
2430
+ /** Optional handler for `getContentSchema` requests from the host. */
2431
+ getContentSchema?: () => unknown | Promise<unknown>;
2432
+ /** Called when host messages are malformed or inconsistent. */
2433
+ onError?: (message: string, detail?: unknown) => void;
2434
+ }
2435
+ interface WebEditorClientState {
2436
+ content: JsonValue;
2437
+ readOnly: boolean;
2438
+ }
2439
+ /**
2440
+ * Editor-side façade for the web-editor v0.12 protocol.
2441
+ *
2442
+ * Calls `host.initialized` immediately, then exposes the current content and
2443
+ * read-only flag as observable events. Local edits made through {@link applyEdits}
2444
+ * are sent to the host with monotonically increasing client revisions.
2445
+ */
2446
+ declare class WebEditorClient implements IDisposable {
2447
+ private readonly _connection;
2448
+ private readonly _host;
2449
+ private readonly _onError;
2450
+ private _content;
2451
+ private _readOnly;
2452
+ private _options;
2453
+ private _hostCapabilities;
2454
+ private _clientRevision;
2455
+ private _basedOnServerRevision;
2456
+ /** Number of un-acked local revisions. While > 0 the editor has pending edits. */
2457
+ private _pendingLocalEdits;
2458
+ private readonly _onDidChangeContent;
2459
+ readonly onDidChangeContent: Event<{
2460
+ content: JsonValue;
2461
+ force: boolean;
2462
+ }>;
2463
+ private readonly _onDidApplyHostEdits;
2464
+ readonly onDidApplyHostEdits: Event<{
2465
+ edits: ContentEdit[];
2466
+ content: JsonValue;
2467
+ }>;
2468
+ private readonly _onDidChangeReadOnly;
2469
+ readonly onDidChangeReadOnly: Event<{
2470
+ readOnly: boolean;
2471
+ }>;
2472
+ private readonly _onDidChangeOptions;
2473
+ readonly onDidChangeOptions: Event<{
2474
+ options: JsonValue;
2475
+ }>;
2476
+ /** Resolves once the host has acknowledged `initialized`. */
2477
+ readonly onDidConnect: Promise<{
2478
+ capabilities: HostCapabilities | undefined;
2479
+ }>;
2480
+ static connect(options: WebEditorClientOptions): Promise<WebEditorClient>;
2481
+ constructor(options: WebEditorClientOptions);
2482
+ /**
2483
+ * The underlying connection. Reuse it to talk to other host interfaces
2484
+ * (e.g. `vscode-app-host`) over the same transport instead of opening a
2485
+ * second one.
2486
+ */
2487
+ get connection(): HubRpcConnection;
2488
+ getContent(): JsonValue;
2489
+ getReadOnly(): boolean;
2490
+ getOptions(): JsonValue;
2491
+ getHostCapabilities(): HostCapabilities | undefined;
2492
+ /**
2493
+ * Apply local edits and notify the host. Updates the local content state
2494
+ * synchronously, then sends a single `applyContentEdit` notification.
2495
+ */
2496
+ applyEdits(edits: readonly ContentEdit[]): void;
2497
+ /**
2498
+ * Report the editor's current laid-out content height (px) to the host.
2499
+ * A host embedding this editor in an iframe uses it to size the frame.
2500
+ */
2501
+ reportSize(height: number): void;
2502
+ dispose(): void;
2503
+ private _handleUpdate;
2504
+ private _handleApplyContentEdits;
2505
+ private _acknowledge;
2506
+ }
2507
+ //#endregion
2508
+ //#region src/client/VsCodeAppHostClient.d.ts
2509
+ interface VsCodeAppHostClientOptions {
2510
+ /**
2511
+ * A connection that talks to the host, or the literal `"windowParent"` to
2512
+ * build one over a `WindowMessageTransport` to `window.parent` (so the app
2513
+ * needn't depend on `@vscode/hubrpc`).
2514
+ */
2515
+ connection: ConnectionInput;
2516
+ }
2517
+ /** The data document an app `.vscode-app.html` is bound to, if any. */
2518
+ interface AppContext {
2519
+ /**
2520
+ * The bound data document, or `null` when the app was opened directly
2521
+ * (i.e. not editing a file) — in which case it may offer to
2522
+ * {@link VsCodeAppHostClient.configureEditorAssociation associate} itself
2523
+ * with the file extensions it can edit.
2524
+ */
2525
+ dataDocument: {
2526
+ contentType: ContentType;
2527
+ } | null;
2528
+ /** Information about the parent relationship, or `null` for a root app. */
2529
+ embedding: EmbeddingContext | null;
2530
+ }
2531
+ interface EmbeddedAppAccessOptions {
2532
+ /** How long the parent-to-child capability should live. */
2533
+ readonly duration?: HubAccessDuration;
2534
+ /** Human-readable purpose shown in the trusted host prompt. */
2535
+ readonly purpose?: string;
2536
+ }
2537
+ /**
2538
+ * A loaded child app. Service calls use the parent's managed identity; the
2539
+ * child's capabilities remain private to the child.
2540
+ */
2541
+ declare class EmbeddedAppHandle implements EmbeddedAppDescriptor {
2542
+ private readonly _hostConnection;
2543
+ private readonly _host;
2544
+ readonly handleId: string;
2545
+ private _appId;
2546
+ private _serviceId;
2547
+ private _serviceIdPrefix;
2548
+ private readonly _changeListeners;
2549
+ private readonly _disposeListeners;
2550
+ get appId(): string;
2551
+ get serviceId(): string;
2552
+ get serviceIdPrefix(): string;
2553
+ constructor(descriptor: EmbeddedAppDescriptor, _hostConnection: HostConnection, _host: VsCodeAppHostProxy);
2554
+ /** Subscribe to identity/service-id changes after a child reload. */
2555
+ onDidChange(listener: (handle: EmbeddedAppHandle) => void): {
2556
+ dispose(): void;
2557
+ };
2558
+ /** Subscribe to host- or parent-initiated unload. */
2559
+ onDidDispose(listener: () => void): {
2560
+ dispose(): void;
2561
+ };
2562
+ /**
2563
+ * Request access to selected members on every live instance in this stable
2564
+ * parent/child relationship.
2565
+ */
2566
+ requestAccess<TDef extends InterfaceDefinition<MemberMap>>(iface: TDef, members: readonly Extract<keyof TDef["members"], string>[], options?: EmbeddedAppAccessOptions): Promise<HubAccessResult>;
2567
+ /** Return a typed child-service proxy over the parent's signed connection. */
2568
+ getService<TDef extends InterfaceDefinition<MemberMap>>(iface: TDef): Promise<InterfaceClient<TDef>>;
2569
+ /** Unload this direct child and recursively dispose its descendants. */
2570
+ unload(): Promise<void>;
2571
+ /** @internal */
2572
+ update(descriptor: EmbeddedAppDescriptor): void;
2573
+ /** @internal */
2574
+ markDisposed(): void;
2575
+ }
2576
+ /**
2577
+ * Editor-side façade for the `vscode-app-host` interface that every
2578
+ * `.vscode-app.html` host registers.
2579
+ *
2580
+ * Use {@link getContext} to detect whether the app was opened bound to a data
2581
+ * file (drive a {@link import("./WebEditorClient").WebEditorClient} over the
2582
+ * same {@link connection}) or opened directly (call
2583
+ * {@link configureEditorAssociation}).
2584
+ */
2585
+ declare class VsCodeAppHostClient {
2586
+ private readonly _hostConnection;
2587
+ private readonly _host;
2588
+ private readonly _embeddedHandles;
2589
+ private readonly _pendingEmbeddedLoadCancels;
2590
+ private readonly _embeddingEventsRegistration;
2591
+ private _disposed;
2592
+ constructor(options: VsCodeAppHostClientOptions);
2593
+ /**
2594
+ * The underlying connection. Reuse it (e.g. for a `WebEditorClient`) instead
2595
+ * of opening a second transport to the same host.
2596
+ */
2597
+ get connection(): HubRpcConnection;
2598
+ /** Ask the host for the app's context (whether it is bound to a data file). */
2599
+ getContext(): Promise<AppContext>;
2600
+ /**
2601
+ * Load a relative `.vscode-app.html` as a hidden child. Resolves only after
2602
+ * the child has mounted and called {@link embeddedReady}.
2603
+ */
2604
+ loadApp(path: string, options?: {
2605
+ readonly signal?: AbortSignal;
2606
+ }): Promise<EmbeddedAppHandle>;
2607
+ /** Dispose event handlers and invalidate handles owned by this client. */
2608
+ dispose(): void;
2609
+ /** Signal that this embedded app has registered its parent-facing API. */
2610
+ embeddedReady(): void;
2611
+ /** Show or hide this embedded app's trusted modal surface. */
2612
+ setModalVisibility(options: {
2613
+ readonly visible: boolean;
2614
+ readonly presentation?: {
2615
+ readonly title?: string;
2616
+ };
2617
+ }): Promise<void>;
2618
+ /**
2619
+ * This app's registration for `extension` (e.g. `".csv"`), per scope. A
2620
+ * lightweight, ungated read served on the app's own root overlay — never
2621
+ * prompts the user and needs no managed identity. Each scope reports
2622
+ * `registered` (toolbar button) and `isDefault` (auto-open); `hasWorkspace`
2623
+ * tells whether a workspace-scoped action is meaningful.
2624
+ */
2625
+ getEditorRegistration(extension: string): Promise<EditorRegistrationStatus>;
2626
+ /**
2627
+ * Ask the host to show its trusted, host-rendered editor-association dialog
2628
+ * for `extension` (e.g. `".csv"`). The host owns the UI and applies any
2629
+ * change itself — the app never writes settings and needs no capability.
2630
+ *
2631
+ * Pass `dismissable: false` to request an unclosable dialog; the host only
2632
+ * honours that when the app was opened directly (no bound data document).
2633
+ * When opened directly the dialog is always unclosable (the user can still
2634
+ * close the editor tab). Resolves once the dialog is dismissed, reporting
2635
+ * the final per-scope registration and whether anything `changed`.
2636
+ */
2637
+ configureEditorAssociation(extension: string, options?: {
2638
+ dismissable?: boolean;
2639
+ }): Promise<EditorAssociationResult>;
2640
+ }
2641
+ //#endregion
2642
+ export { AppContext, type ConnectionInput, ContentEdit, ContentType, EditorAssociationResult, EditorCapabilities, EditorRegistrationStatus, EditorScope, EmbeddedAppAccessOptions, EmbeddedAppDescriptor, EmbeddedAppHandle, EmbeddingContext, type Event, HostCapabilities, type IDisposable, JsonFormatOptions, JsonValue, type MessageEndpoint, type MessageLikeEvent, ScopeRegistration, TextEdit, VsCodeAppEmbeddingEventsProxy, VsCodeAppHostClient, VsCodeAppHostClientOptions, VsCodeAppHostProxy, WebEditorClient, WebEditorClientOptions, WebEditorClientState, WebEditorHost, WebEditorHostOptions, WebEditorHostProxy, WebEditorProxy, WindowMessageTransport, applyContentEdits, applyTextEdits, createWindowParentConnection, decodeFromEditor, encodeForEditor, vscodeAppEmbeddingEventsInterface, vscodeAppHostInterface, webEditorHostInterface, webEditorInterface };
2643
+ //# sourceMappingURL=index.d.ts.map