@plucky-ai/chat-sdk 0.6.0 → 0.7.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.
- package/README.md +0 -0
- package/bin/publish-npm +0 -0
- package/dist/index.cjs +309 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3863 -22
- package/dist/index.d.mts +3873 -0
- package/dist/index.mjs +341 -0
- package/dist/index.mjs.map +1 -0
- package/dist/package.json +3 -3
- package/package.json +17 -17
- package/dist/index.d.ts +0 -32
- package/dist/index.js +0 -106
- package/dist/index.js.map +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,3873 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema.d.cts
|
|
2
|
+
type _JSONSchema$1 = boolean | JSONSchema$1;
|
|
3
|
+
type JSONSchema$1 = {
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
6
|
+
$id?: string;
|
|
7
|
+
$anchor?: string;
|
|
8
|
+
$ref?: string;
|
|
9
|
+
$dynamicRef?: string;
|
|
10
|
+
$dynamicAnchor?: string;
|
|
11
|
+
$vocabulary?: Record<string, boolean>;
|
|
12
|
+
$comment?: string;
|
|
13
|
+
$defs?: Record<string, JSONSchema$1>;
|
|
14
|
+
type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
|
|
15
|
+
additionalItems?: _JSONSchema$1;
|
|
16
|
+
unevaluatedItems?: _JSONSchema$1;
|
|
17
|
+
prefixItems?: _JSONSchema$1[];
|
|
18
|
+
items?: _JSONSchema$1 | _JSONSchema$1[];
|
|
19
|
+
contains?: _JSONSchema$1;
|
|
20
|
+
additionalProperties?: _JSONSchema$1;
|
|
21
|
+
unevaluatedProperties?: _JSONSchema$1;
|
|
22
|
+
properties?: Record<string, _JSONSchema$1>;
|
|
23
|
+
patternProperties?: Record<string, _JSONSchema$1>;
|
|
24
|
+
dependentSchemas?: Record<string, _JSONSchema$1>;
|
|
25
|
+
propertyNames?: _JSONSchema$1;
|
|
26
|
+
if?: _JSONSchema$1;
|
|
27
|
+
then?: _JSONSchema$1;
|
|
28
|
+
else?: _JSONSchema$1;
|
|
29
|
+
allOf?: JSONSchema$1[];
|
|
30
|
+
anyOf?: JSONSchema$1[];
|
|
31
|
+
oneOf?: JSONSchema$1[];
|
|
32
|
+
not?: _JSONSchema$1;
|
|
33
|
+
multipleOf?: number;
|
|
34
|
+
maximum?: number;
|
|
35
|
+
exclusiveMaximum?: number | boolean;
|
|
36
|
+
minimum?: number;
|
|
37
|
+
exclusiveMinimum?: number | boolean;
|
|
38
|
+
maxLength?: number;
|
|
39
|
+
minLength?: number;
|
|
40
|
+
pattern?: string;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
maxContains?: number;
|
|
45
|
+
minContains?: number;
|
|
46
|
+
maxProperties?: number;
|
|
47
|
+
minProperties?: number;
|
|
48
|
+
required?: string[];
|
|
49
|
+
dependentRequired?: Record<string, string[]>;
|
|
50
|
+
enum?: Array<string | number | boolean | null>;
|
|
51
|
+
const?: string | number | boolean | null;
|
|
52
|
+
id?: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
default?: unknown;
|
|
56
|
+
deprecated?: boolean;
|
|
57
|
+
readOnly?: boolean;
|
|
58
|
+
writeOnly?: boolean;
|
|
59
|
+
nullable?: boolean;
|
|
60
|
+
examples?: unknown[];
|
|
61
|
+
format?: string;
|
|
62
|
+
contentMediaType?: string;
|
|
63
|
+
contentEncoding?: string;
|
|
64
|
+
contentSchema?: JSONSchema$1;
|
|
65
|
+
_prefault?: unknown;
|
|
66
|
+
};
|
|
67
|
+
type BaseSchema$1 = JSONSchema$1;
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/standard-schema.d.cts
|
|
70
|
+
/** The Standard interface. */
|
|
71
|
+
interface StandardTypedV1$1<Input = unknown, Output = Input> {
|
|
72
|
+
/** The Standard properties. */
|
|
73
|
+
readonly "~standard": StandardTypedV1$1.Props<Input, Output>;
|
|
74
|
+
}
|
|
75
|
+
declare namespace StandardTypedV1$1 {
|
|
76
|
+
/** The Standard properties interface. */
|
|
77
|
+
interface Props<Input = unknown, Output = Input> {
|
|
78
|
+
/** The version number of the standard. */
|
|
79
|
+
readonly version: 1;
|
|
80
|
+
/** The vendor name of the schema library. */
|
|
81
|
+
readonly vendor: string;
|
|
82
|
+
/** Inferred types associated with the schema. */
|
|
83
|
+
readonly types?: Types<Input, Output> | undefined;
|
|
84
|
+
}
|
|
85
|
+
/** The Standard types interface. */
|
|
86
|
+
interface Types<Input = unknown, Output = Input> {
|
|
87
|
+
/** The input type of the schema. */
|
|
88
|
+
readonly input: Input;
|
|
89
|
+
/** The output type of the schema. */
|
|
90
|
+
readonly output: Output;
|
|
91
|
+
}
|
|
92
|
+
/** Infers the input type of a Standard. */
|
|
93
|
+
type InferInput<Schema extends StandardTypedV1$1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
94
|
+
/** Infers the output type of a Standard. */
|
|
95
|
+
type InferOutput<Schema extends StandardTypedV1$1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
96
|
+
}
|
|
97
|
+
/** The Standard Schema interface. */
|
|
98
|
+
interface StandardSchemaV1$1<Input = unknown, Output = Input> {
|
|
99
|
+
/** The Standard Schema properties. */
|
|
100
|
+
readonly "~standard": StandardSchemaV1$1.Props<Input, Output>;
|
|
101
|
+
}
|
|
102
|
+
declare namespace StandardSchemaV1$1 {
|
|
103
|
+
/** The Standard Schema properties interface. */
|
|
104
|
+
interface Props<Input = unknown, Output = Input> extends StandardTypedV1$1.Props<Input, Output> {
|
|
105
|
+
/** Validates unknown input values. */
|
|
106
|
+
readonly validate: (value: unknown, options?: StandardSchemaV1$1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
|
|
107
|
+
}
|
|
108
|
+
/** The result interface of the validate function. */
|
|
109
|
+
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
110
|
+
/** The result interface if validation succeeds. */
|
|
111
|
+
interface SuccessResult<Output> {
|
|
112
|
+
/** The typed output value. */
|
|
113
|
+
readonly value: Output;
|
|
114
|
+
/** The absence of issues indicates success. */
|
|
115
|
+
readonly issues?: undefined;
|
|
116
|
+
}
|
|
117
|
+
interface Options {
|
|
118
|
+
/** Implicit support for additional vendor-specific parameters, if needed. */
|
|
119
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
120
|
+
}
|
|
121
|
+
/** The result interface if validation fails. */
|
|
122
|
+
interface FailureResult {
|
|
123
|
+
/** The issues of failed validation. */
|
|
124
|
+
readonly issues: ReadonlyArray<Issue>;
|
|
125
|
+
}
|
|
126
|
+
/** The issue interface of the failure output. */
|
|
127
|
+
interface Issue {
|
|
128
|
+
/** The error message of the issue. */
|
|
129
|
+
readonly message: string;
|
|
130
|
+
/** The path of the issue, if any. */
|
|
131
|
+
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
132
|
+
}
|
|
133
|
+
/** The path segment interface of the issue. */
|
|
134
|
+
interface PathSegment {
|
|
135
|
+
/** The key representing a path segment. */
|
|
136
|
+
readonly key: PropertyKey;
|
|
137
|
+
}
|
|
138
|
+
/** The Standard types interface. */
|
|
139
|
+
interface Types<Input = unknown, Output = Input> extends StandardTypedV1$1.Types<Input, Output> {}
|
|
140
|
+
/** Infers the input type of a Standard. */
|
|
141
|
+
type InferInput<Schema extends StandardTypedV1$1> = StandardTypedV1$1.InferInput<Schema>;
|
|
142
|
+
/** Infers the output type of a Standard. */
|
|
143
|
+
type InferOutput<Schema extends StandardTypedV1$1> = StandardTypedV1$1.InferOutput<Schema>;
|
|
144
|
+
}
|
|
145
|
+
/** The Standard JSON Schema interface. */
|
|
146
|
+
interface StandardJSONSchemaV1$1<Input = unknown, Output = Input> {
|
|
147
|
+
/** The Standard JSON Schema properties. */
|
|
148
|
+
readonly "~standard": StandardJSONSchemaV1$1.Props<Input, Output>;
|
|
149
|
+
}
|
|
150
|
+
declare namespace StandardJSONSchemaV1$1 {
|
|
151
|
+
/** The Standard JSON Schema properties interface. */
|
|
152
|
+
interface Props<Input = unknown, Output = Input> extends StandardTypedV1$1.Props<Input, Output> {
|
|
153
|
+
/** Methods for generating the input/output JSON Schema. */
|
|
154
|
+
readonly jsonSchema: Converter;
|
|
155
|
+
}
|
|
156
|
+
/** The Standard JSON Schema converter interface. */
|
|
157
|
+
interface Converter {
|
|
158
|
+
/** Converts the input type to JSON Schema. May throw if conversion is not supported. */
|
|
159
|
+
readonly input: (options: StandardJSONSchemaV1$1.Options) => Record<string, unknown>;
|
|
160
|
+
/** Converts the output type to JSON Schema. May throw if conversion is not supported. */
|
|
161
|
+
readonly output: (options: StandardJSONSchemaV1$1.Options) => Record<string, unknown>;
|
|
162
|
+
}
|
|
163
|
+
/** The target version of the generated JSON Schema.
|
|
164
|
+
*
|
|
165
|
+
* It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use.
|
|
166
|
+
*
|
|
167
|
+
* The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
|
|
168
|
+
*
|
|
169
|
+
* All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
|
|
170
|
+
*/
|
|
171
|
+
type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
|
|
172
|
+
/** The options for the input/output methods. */
|
|
173
|
+
interface Options {
|
|
174
|
+
/** 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. */
|
|
175
|
+
readonly target: Target;
|
|
176
|
+
/** Implicit support for additional vendor-specific parameters, if needed. */
|
|
177
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
178
|
+
}
|
|
179
|
+
/** The Standard types interface. */
|
|
180
|
+
interface Types<Input = unknown, Output = Input> extends StandardTypedV1$1.Types<Input, Output> {}
|
|
181
|
+
/** Infers the input type of a Standard. */
|
|
182
|
+
type InferInput<Schema extends StandardTypedV1$1> = StandardTypedV1$1.InferInput<Schema>;
|
|
183
|
+
/** Infers the output type of a Standard. */
|
|
184
|
+
type InferOutput<Schema extends StandardTypedV1$1> = StandardTypedV1$1.InferOutput<Schema>;
|
|
185
|
+
}
|
|
186
|
+
interface StandardSchemaWithJSONProps$1<Input = unknown, Output = Input> extends StandardSchemaV1$1.Props<Input, Output>, StandardJSONSchemaV1$1.Props<Input, Output> {}
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/registries.d.cts
|
|
189
|
+
declare const $output$1: unique symbol;
|
|
190
|
+
type $output$1 = typeof $output$1;
|
|
191
|
+
declare const $input$1: unique symbol;
|
|
192
|
+
type $input$1 = typeof $input$1;
|
|
193
|
+
type $replace$1<Meta, S extends $ZodType$1> = Meta extends $output$1 ? output$1<S> : Meta extends $input$1 ? input$1<S> : Meta extends (infer M)[] ? $replace$1<M, S>[] : Meta extends ((...args: infer P) => infer R) ? (...args: { [K in keyof P]: $replace$1<P[K], S> }) => $replace$1<R, S> : Meta extends object ? { [K in keyof Meta]: $replace$1<Meta[K], S> } : Meta;
|
|
194
|
+
type MetadataType$1 = object | undefined;
|
|
195
|
+
declare class $ZodRegistry$1<Meta extends MetadataType$1 = MetadataType$1, Schema extends $ZodType$1 = $ZodType$1> {
|
|
196
|
+
_meta: Meta;
|
|
197
|
+
_schema: Schema;
|
|
198
|
+
_map: WeakMap<Schema, $replace$1<Meta, Schema>>;
|
|
199
|
+
_idmap: Map<string, Schema>;
|
|
200
|
+
add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace$1<Meta, S>?] : [$replace$1<Meta, S>]): this;
|
|
201
|
+
clear(): this;
|
|
202
|
+
remove(schema: Schema): this;
|
|
203
|
+
get<S extends Schema>(schema: S): $replace$1<Meta, S> | undefined;
|
|
204
|
+
has(schema: Schema): boolean;
|
|
205
|
+
}
|
|
206
|
+
interface JSONSchemaMeta$1 {
|
|
207
|
+
id?: string | undefined;
|
|
208
|
+
title?: string | undefined;
|
|
209
|
+
description?: string | undefined;
|
|
210
|
+
deprecated?: boolean | undefined;
|
|
211
|
+
[k: string]: unknown;
|
|
212
|
+
}
|
|
213
|
+
interface GlobalMeta$1 extends JSONSchemaMeta$1 {}
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/to-json-schema.d.cts
|
|
216
|
+
type Processor$1<T extends $ZodType$1 = $ZodType$1> = (schema: T, ctx: ToJSONSchemaContext$1, json: BaseSchema$1, params: ProcessParams$1) => void;
|
|
217
|
+
interface JSONSchemaGeneratorParams$1 {
|
|
218
|
+
processors: Record<string, Processor$1>;
|
|
219
|
+
/** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
|
|
220
|
+
* @default globalRegistry */
|
|
221
|
+
metadata?: $ZodRegistry$1<Record<string, any>>;
|
|
222
|
+
/** The JSON Schema version to target.
|
|
223
|
+
* - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
|
|
224
|
+
* - `"draft-07"` — JSON Schema Draft 7
|
|
225
|
+
* - `"draft-04"` — JSON Schema Draft 4
|
|
226
|
+
* - `"openapi-3.0"` — OpenAPI 3.0 Schema Object */
|
|
227
|
+
target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
|
|
228
|
+
/** How to handle unrepresentable types.
|
|
229
|
+
* - `"throw"` — Default. Unrepresentable types throw an error
|
|
230
|
+
* - `"any"` — Unrepresentable types become `{}` */
|
|
231
|
+
unrepresentable?: "throw" | "any";
|
|
232
|
+
/** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
|
|
233
|
+
override?: (ctx: {
|
|
234
|
+
zodSchema: $ZodTypes$1;
|
|
235
|
+
jsonSchema: BaseSchema$1;
|
|
236
|
+
path: (string | number)[];
|
|
237
|
+
}) => void;
|
|
238
|
+
/** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, defaults, coerced primitives, etc.
|
|
239
|
+
* - `"output"` — Default. Convert the output schema.
|
|
240
|
+
* - `"input"` — Convert the input schema. */
|
|
241
|
+
io?: "input" | "output";
|
|
242
|
+
cycles?: "ref" | "throw";
|
|
243
|
+
reused?: "ref" | "inline";
|
|
244
|
+
external?: {
|
|
245
|
+
registry: $ZodRegistry$1<{
|
|
246
|
+
id?: string | undefined;
|
|
247
|
+
}>;
|
|
248
|
+
uri?: ((id: string) => string) | undefined;
|
|
249
|
+
defs: Record<string, BaseSchema$1>;
|
|
250
|
+
} | undefined;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Parameters for the toJSONSchema function.
|
|
254
|
+
*/
|
|
255
|
+
type ToJSONSchemaParams$1 = Omit<JSONSchemaGeneratorParams$1, "processors" | "external">;
|
|
256
|
+
interface ProcessParams$1 {
|
|
257
|
+
schemaPath: $ZodType$1[];
|
|
258
|
+
path: (string | number)[];
|
|
259
|
+
}
|
|
260
|
+
interface Seen$1 {
|
|
261
|
+
/** JSON Schema result for this Zod schema */
|
|
262
|
+
schema: BaseSchema$1;
|
|
263
|
+
/** A cached version of the schema that doesn't get overwritten during ref resolution */
|
|
264
|
+
def?: BaseSchema$1;
|
|
265
|
+
defId?: string | undefined;
|
|
266
|
+
/** Number of times this schema was encountered during traversal */
|
|
267
|
+
count: number;
|
|
268
|
+
/** Cycle path */
|
|
269
|
+
cycle?: (string | number)[] | undefined;
|
|
270
|
+
isParent?: boolean | undefined;
|
|
271
|
+
/** Schema to inherit JSON Schema properties from (set by processor for wrappers) */
|
|
272
|
+
ref?: $ZodType$1 | null;
|
|
273
|
+
/** JSON Schema property path for this schema */
|
|
274
|
+
path?: (string | number)[] | undefined;
|
|
275
|
+
}
|
|
276
|
+
interface ToJSONSchemaContext$1 {
|
|
277
|
+
processors: Record<string, Processor$1>;
|
|
278
|
+
metadataRegistry: $ZodRegistry$1<Record<string, any>>;
|
|
279
|
+
target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
|
|
280
|
+
unrepresentable: "throw" | "any";
|
|
281
|
+
override: (ctx: {
|
|
282
|
+
zodSchema: $ZodType$1;
|
|
283
|
+
jsonSchema: BaseSchema$1;
|
|
284
|
+
path: (string | number)[];
|
|
285
|
+
}) => void;
|
|
286
|
+
io: "input" | "output";
|
|
287
|
+
counter: number;
|
|
288
|
+
seen: Map<$ZodType$1, Seen$1>;
|
|
289
|
+
cycles: "ref" | "throw";
|
|
290
|
+
reused: "ref" | "inline";
|
|
291
|
+
external?: {
|
|
292
|
+
registry: $ZodRegistry$1<{
|
|
293
|
+
id?: string | undefined;
|
|
294
|
+
}>;
|
|
295
|
+
uri?: ((id: string) => string) | undefined;
|
|
296
|
+
defs: Record<string, BaseSchema$1>;
|
|
297
|
+
} | undefined;
|
|
298
|
+
}
|
|
299
|
+
type ZodStandardSchemaWithJSON$3<T> = StandardSchemaWithJSONProps$1<input$1<T>, output$1<T>>;
|
|
300
|
+
interface ZodStandardJSONSchemaPayload$1<T> extends BaseSchema$1 {
|
|
301
|
+
"~standard": ZodStandardSchemaWithJSON$3<T>;
|
|
302
|
+
}
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/util.d.cts
|
|
305
|
+
type MimeTypes$1 = "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 & {});
|
|
306
|
+
type IsAny$1<T> = 0 extends 1 & T ? true : false;
|
|
307
|
+
type Omit$2<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
308
|
+
type MakePartial$1<T, K extends keyof T> = Omit$2<T, K> & InexactPartial$1<Pick<T, K>>;
|
|
309
|
+
type NoUndefined$1<T> = T extends undefined ? never : T;
|
|
310
|
+
type LoosePartial$1<T extends object> = InexactPartial$1<T> & {
|
|
311
|
+
[k: string]: unknown;
|
|
312
|
+
};
|
|
313
|
+
type Mask$1<Keys extends PropertyKey> = { [K in Keys]?: true };
|
|
314
|
+
type InexactPartial$1<T> = { [P in keyof T]?: T[P] | undefined };
|
|
315
|
+
type BuiltIn$1 = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
316
|
+
readonly [Symbol.toStringTag]: string;
|
|
317
|
+
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
318
|
+
type MakeReadonly$1<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$1 ? T : Readonly<T>;
|
|
319
|
+
type SomeObject$1 = Record<PropertyKey, any>;
|
|
320
|
+
type Identity$1<T> = T;
|
|
321
|
+
type Flatten$1<T> = Identity$1<{ [k in keyof T]: T[k] }>;
|
|
322
|
+
type Prettify$1<T> = { [K in keyof T]: T[K] } & {};
|
|
323
|
+
type Extend$1<A extends SomeObject$1, B extends SomeObject$1> = Flatten$1<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] }>;
|
|
324
|
+
type TupleItems$1 = ReadonlyArray<SomeType$1>;
|
|
325
|
+
type AnyFunc$1 = (...args: any[]) => any;
|
|
326
|
+
type MaybeAsync$1<T> = T | Promise<T>;
|
|
327
|
+
type EnumValue$1 = string | number;
|
|
328
|
+
type EnumLike$1 = Readonly<Record<string, EnumValue$1>>;
|
|
329
|
+
type ToEnum$1<T extends EnumValue$1> = Flatten$1<{ [k in T]: k }>;
|
|
330
|
+
type Literal$1 = string | number | bigint | boolean | null | undefined;
|
|
331
|
+
type Primitive$1 = string | number | symbol | bigint | boolean | null | undefined;
|
|
332
|
+
type HasLength$1 = {
|
|
333
|
+
length: number;
|
|
334
|
+
};
|
|
335
|
+
type PropValues$1 = Record<string, Set<Primitive$1>>;
|
|
336
|
+
type PrimitiveSet$1 = Set<Primitive$1>;
|
|
337
|
+
type EmptyToNever$1<T> = keyof T extends never ? never : T;
|
|
338
|
+
declare abstract class Class$1 {
|
|
339
|
+
constructor(..._args: any[]);
|
|
340
|
+
}
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.d.cts
|
|
343
|
+
declare const version$1: {
|
|
344
|
+
readonly major: 4;
|
|
345
|
+
readonly minor: 3;
|
|
346
|
+
readonly patch: number;
|
|
347
|
+
};
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.d.cts
|
|
350
|
+
interface ParseContext$1<T extends $ZodIssueBase$1 = never> {
|
|
351
|
+
/** Customize error messages. */
|
|
352
|
+
readonly error?: $ZodErrorMap$1<T>;
|
|
353
|
+
/** Include the `input` field in issue objects. Default `false`. */
|
|
354
|
+
readonly reportInput?: boolean;
|
|
355
|
+
/** Skip eval-based fast path. Default `false`. */
|
|
356
|
+
readonly jitless?: boolean;
|
|
357
|
+
}
|
|
358
|
+
/** @internal */
|
|
359
|
+
interface ParseContextInternal$1<T extends $ZodIssueBase$1 = never> extends ParseContext$1<T> {
|
|
360
|
+
readonly async?: boolean | undefined;
|
|
361
|
+
readonly direction?: "forward" | "backward";
|
|
362
|
+
readonly skipChecks?: boolean;
|
|
363
|
+
}
|
|
364
|
+
interface ParsePayload$1<T = unknown> {
|
|
365
|
+
value: T;
|
|
366
|
+
issues: $ZodRawIssue$1[];
|
|
367
|
+
/** A may to mark a whole payload as aborted. Used in codecs/pipes. */
|
|
368
|
+
aborted?: boolean;
|
|
369
|
+
}
|
|
370
|
+
type CheckFn$1<T> = (input: ParsePayload$1<T>) => MaybeAsync$1<void>;
|
|
371
|
+
interface $ZodTypeDef$1 {
|
|
372
|
+
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";
|
|
373
|
+
error?: $ZodErrorMap$1<never> | undefined;
|
|
374
|
+
checks?: $ZodCheck$1<never>[];
|
|
375
|
+
}
|
|
376
|
+
interface _$ZodTypeInternals$1 {
|
|
377
|
+
/** The `@zod/core` version of this schema */
|
|
378
|
+
version: typeof version$1;
|
|
379
|
+
/** Schema definition. */
|
|
380
|
+
def: $ZodTypeDef$1;
|
|
381
|
+
/** @internal Randomly generated ID for this schema. */
|
|
382
|
+
/** @internal List of deferred initializers. */
|
|
383
|
+
deferred: AnyFunc$1[] | undefined;
|
|
384
|
+
/** @internal Parses input and runs all checks (refinements). */
|
|
385
|
+
run(payload: ParsePayload$1<any>, ctx: ParseContextInternal$1): MaybeAsync$1<ParsePayload$1>;
|
|
386
|
+
/** @internal Parses input, doesn't run checks. */
|
|
387
|
+
parse(payload: ParsePayload$1<any>, ctx: ParseContextInternal$1): MaybeAsync$1<ParsePayload$1>;
|
|
388
|
+
/** @internal Stores identifiers for the set of traits implemented by this schema. */
|
|
389
|
+
traits: Set<string>;
|
|
390
|
+
/** @internal Indicates that a schema output type should be considered optional inside objects.
|
|
391
|
+
* @default Required
|
|
392
|
+
*/
|
|
393
|
+
/** @internal */
|
|
394
|
+
optin?: "optional" | undefined;
|
|
395
|
+
/** @internal */
|
|
396
|
+
optout?: "optional" | undefined;
|
|
397
|
+
/** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
|
|
398
|
+
*
|
|
399
|
+
* Defined on: enum, const, literal, null, undefined
|
|
400
|
+
* Passthrough: optional, nullable, branded, default, catch, pipe
|
|
401
|
+
* Todo: unions?
|
|
402
|
+
*/
|
|
403
|
+
values?: PrimitiveSet$1 | undefined;
|
|
404
|
+
/** Default value bubbled up from */
|
|
405
|
+
/** @internal A set of literal discriminators used for the fast path in discriminated unions. */
|
|
406
|
+
propValues?: PropValues$1 | undefined;
|
|
407
|
+
/** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
|
|
408
|
+
pattern: RegExp | undefined;
|
|
409
|
+
/** @internal The constructor function of this schema. */
|
|
410
|
+
constr: new (def: any) => $ZodType$1;
|
|
411
|
+
/** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
|
|
412
|
+
bag: Record<string, unknown>;
|
|
413
|
+
/** @internal The set of issues this schema might throw during type checking. */
|
|
414
|
+
isst: $ZodIssueBase$1;
|
|
415
|
+
/** @internal Subject to change, not a public API. */
|
|
416
|
+
processJSONSchema?: ((ctx: ToJSONSchemaContext$1, json: BaseSchema$1, params: ProcessParams$1) => void) | undefined;
|
|
417
|
+
/** An optional method used to override `toJSONSchema` logic. */
|
|
418
|
+
toJSONSchema?: () => unknown;
|
|
419
|
+
/** @internal The parent of this schema. Only set during certain clone operations. */
|
|
420
|
+
parent?: $ZodType$1 | undefined;
|
|
421
|
+
}
|
|
422
|
+
/** @internal */
|
|
423
|
+
interface $ZodTypeInternals$1<out O = unknown, out I = unknown> extends _$ZodTypeInternals$1 {
|
|
424
|
+
/** @internal The inferred output type */
|
|
425
|
+
output: O;
|
|
426
|
+
/** @internal The inferred input type */
|
|
427
|
+
input: I;
|
|
428
|
+
}
|
|
429
|
+
type $ZodStandardSchema$1<T> = StandardSchemaV1$1.Props<input$1<T>, output$1<T>>;
|
|
430
|
+
type SomeType$1 = {
|
|
431
|
+
_zod: _$ZodTypeInternals$1;
|
|
432
|
+
};
|
|
433
|
+
interface $ZodType$1<O = unknown, I = unknown, Internals extends $ZodTypeInternals$1<O, I> = $ZodTypeInternals$1<O, I>> {
|
|
434
|
+
_zod: Internals;
|
|
435
|
+
"~standard": $ZodStandardSchema$1<this>;
|
|
436
|
+
}
|
|
437
|
+
interface _$ZodType$1<T extends $ZodTypeInternals$1 = $ZodTypeInternals$1> extends $ZodType$1<T["output"], T["input"], T> {}
|
|
438
|
+
declare const $ZodType$1: $constructor$1<$ZodType$1>;
|
|
439
|
+
interface $ZodStringDef$1 extends $ZodTypeDef$1 {
|
|
440
|
+
type: "string";
|
|
441
|
+
coerce?: boolean;
|
|
442
|
+
checks?: $ZodCheck$1<string>[];
|
|
443
|
+
}
|
|
444
|
+
interface $ZodStringInternals$1<Input> extends $ZodTypeInternals$1<string, Input> {
|
|
445
|
+
def: $ZodStringDef$1;
|
|
446
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
447
|
+
pattern: RegExp;
|
|
448
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
449
|
+
isst: $ZodIssueInvalidType$1;
|
|
450
|
+
bag: LoosePartial$1<{
|
|
451
|
+
minimum: number;
|
|
452
|
+
maximum: number;
|
|
453
|
+
patterns: Set<RegExp>;
|
|
454
|
+
format: string;
|
|
455
|
+
contentEncoding: string;
|
|
456
|
+
}>;
|
|
457
|
+
}
|
|
458
|
+
interface $ZodString$1<Input = unknown> extends _$ZodType$1<$ZodStringInternals$1<Input>> {}
|
|
459
|
+
declare const $ZodString$1: $constructor$1<$ZodString$1>;
|
|
460
|
+
interface $ZodNumberDef$1 extends $ZodTypeDef$1 {
|
|
461
|
+
type: "number";
|
|
462
|
+
coerce?: boolean;
|
|
463
|
+
}
|
|
464
|
+
interface $ZodNumberInternals$1<Input = unknown> extends $ZodTypeInternals$1<number, Input> {
|
|
465
|
+
def: $ZodNumberDef$1;
|
|
466
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
467
|
+
pattern: RegExp;
|
|
468
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
469
|
+
isst: $ZodIssueInvalidType$1;
|
|
470
|
+
bag: LoosePartial$1<{
|
|
471
|
+
minimum: number;
|
|
472
|
+
maximum: number;
|
|
473
|
+
exclusiveMinimum: number;
|
|
474
|
+
exclusiveMaximum: number;
|
|
475
|
+
format: string;
|
|
476
|
+
pattern: RegExp;
|
|
477
|
+
}>;
|
|
478
|
+
}
|
|
479
|
+
interface $ZodNumber$1<Input = unknown> extends $ZodType$1 {
|
|
480
|
+
_zod: $ZodNumberInternals$1<Input>;
|
|
481
|
+
}
|
|
482
|
+
declare const $ZodNumber$1: $constructor$1<$ZodNumber$1>;
|
|
483
|
+
interface $ZodBooleanDef$1 extends $ZodTypeDef$1 {
|
|
484
|
+
type: "boolean";
|
|
485
|
+
coerce?: boolean;
|
|
486
|
+
checks?: $ZodCheck$1<boolean>[];
|
|
487
|
+
}
|
|
488
|
+
interface $ZodBooleanInternals$1<T = unknown> extends $ZodTypeInternals$1<boolean, T> {
|
|
489
|
+
pattern: RegExp;
|
|
490
|
+
def: $ZodBooleanDef$1;
|
|
491
|
+
isst: $ZodIssueInvalidType$1;
|
|
492
|
+
}
|
|
493
|
+
interface $ZodBoolean$1<T = unknown> extends $ZodType$1 {
|
|
494
|
+
_zod: $ZodBooleanInternals$1<T>;
|
|
495
|
+
}
|
|
496
|
+
declare const $ZodBoolean$1: $constructor$1<$ZodBoolean$1>;
|
|
497
|
+
interface $ZodBigIntDef$1 extends $ZodTypeDef$1 {
|
|
498
|
+
type: "bigint";
|
|
499
|
+
coerce?: boolean;
|
|
500
|
+
}
|
|
501
|
+
interface $ZodBigIntInternals$1<T = unknown> extends $ZodTypeInternals$1<bigint, T> {
|
|
502
|
+
pattern: RegExp;
|
|
503
|
+
/** @internal Internal API, use with caution */
|
|
504
|
+
def: $ZodBigIntDef$1;
|
|
505
|
+
isst: $ZodIssueInvalidType$1;
|
|
506
|
+
bag: LoosePartial$1<{
|
|
507
|
+
minimum: bigint;
|
|
508
|
+
maximum: bigint;
|
|
509
|
+
format: string;
|
|
510
|
+
}>;
|
|
511
|
+
}
|
|
512
|
+
interface $ZodBigInt$1<T = unknown> extends $ZodType$1 {
|
|
513
|
+
_zod: $ZodBigIntInternals$1<T>;
|
|
514
|
+
}
|
|
515
|
+
declare const $ZodBigInt$1: $constructor$1<$ZodBigInt$1>;
|
|
516
|
+
interface $ZodSymbolDef$1 extends $ZodTypeDef$1 {
|
|
517
|
+
type: "symbol";
|
|
518
|
+
}
|
|
519
|
+
interface $ZodSymbolInternals$1 extends $ZodTypeInternals$1<symbol, symbol> {
|
|
520
|
+
def: $ZodSymbolDef$1;
|
|
521
|
+
isst: $ZodIssueInvalidType$1;
|
|
522
|
+
}
|
|
523
|
+
interface $ZodSymbol$1 extends $ZodType$1 {
|
|
524
|
+
_zod: $ZodSymbolInternals$1;
|
|
525
|
+
}
|
|
526
|
+
declare const $ZodSymbol$1: $constructor$1<$ZodSymbol$1>;
|
|
527
|
+
interface $ZodUndefinedDef$1 extends $ZodTypeDef$1 {
|
|
528
|
+
type: "undefined";
|
|
529
|
+
}
|
|
530
|
+
interface $ZodUndefinedInternals$1 extends $ZodTypeInternals$1<undefined, undefined> {
|
|
531
|
+
pattern: RegExp;
|
|
532
|
+
def: $ZodUndefinedDef$1;
|
|
533
|
+
values: PrimitiveSet$1;
|
|
534
|
+
isst: $ZodIssueInvalidType$1;
|
|
535
|
+
}
|
|
536
|
+
interface $ZodUndefined$1 extends $ZodType$1 {
|
|
537
|
+
_zod: $ZodUndefinedInternals$1;
|
|
538
|
+
}
|
|
539
|
+
declare const $ZodUndefined$1: $constructor$1<$ZodUndefined$1>;
|
|
540
|
+
interface $ZodNullDef$1 extends $ZodTypeDef$1 {
|
|
541
|
+
type: "null";
|
|
542
|
+
}
|
|
543
|
+
interface $ZodNullInternals$1 extends $ZodTypeInternals$1<null, null> {
|
|
544
|
+
pattern: RegExp;
|
|
545
|
+
def: $ZodNullDef$1;
|
|
546
|
+
values: PrimitiveSet$1;
|
|
547
|
+
isst: $ZodIssueInvalidType$1;
|
|
548
|
+
}
|
|
549
|
+
interface $ZodNull$1 extends $ZodType$1 {
|
|
550
|
+
_zod: $ZodNullInternals$1;
|
|
551
|
+
}
|
|
552
|
+
declare const $ZodNull$1: $constructor$1<$ZodNull$1>;
|
|
553
|
+
interface $ZodAnyDef$1 extends $ZodTypeDef$1 {
|
|
554
|
+
type: "any";
|
|
555
|
+
}
|
|
556
|
+
interface $ZodAnyInternals$1 extends $ZodTypeInternals$1<any, any> {
|
|
557
|
+
def: $ZodAnyDef$1;
|
|
558
|
+
isst: never;
|
|
559
|
+
}
|
|
560
|
+
interface $ZodAny$1 extends $ZodType$1 {
|
|
561
|
+
_zod: $ZodAnyInternals$1;
|
|
562
|
+
}
|
|
563
|
+
declare const $ZodAny$1: $constructor$1<$ZodAny$1>;
|
|
564
|
+
interface $ZodUnknownDef$1 extends $ZodTypeDef$1 {
|
|
565
|
+
type: "unknown";
|
|
566
|
+
}
|
|
567
|
+
interface $ZodUnknownInternals$1 extends $ZodTypeInternals$1<unknown, unknown> {
|
|
568
|
+
def: $ZodUnknownDef$1;
|
|
569
|
+
isst: never;
|
|
570
|
+
}
|
|
571
|
+
interface $ZodUnknown$1 extends $ZodType$1 {
|
|
572
|
+
_zod: $ZodUnknownInternals$1;
|
|
573
|
+
}
|
|
574
|
+
declare const $ZodUnknown$1: $constructor$1<$ZodUnknown$1>;
|
|
575
|
+
interface $ZodNeverDef$1 extends $ZodTypeDef$1 {
|
|
576
|
+
type: "never";
|
|
577
|
+
}
|
|
578
|
+
interface $ZodNeverInternals$1 extends $ZodTypeInternals$1<never, never> {
|
|
579
|
+
def: $ZodNeverDef$1;
|
|
580
|
+
isst: $ZodIssueInvalidType$1;
|
|
581
|
+
}
|
|
582
|
+
interface $ZodNever$1 extends $ZodType$1 {
|
|
583
|
+
_zod: $ZodNeverInternals$1;
|
|
584
|
+
}
|
|
585
|
+
declare const $ZodNever$1: $constructor$1<$ZodNever$1>;
|
|
586
|
+
interface $ZodVoidDef$1 extends $ZodTypeDef$1 {
|
|
587
|
+
type: "void";
|
|
588
|
+
}
|
|
589
|
+
interface $ZodVoidInternals$1 extends $ZodTypeInternals$1<void, void> {
|
|
590
|
+
def: $ZodVoidDef$1;
|
|
591
|
+
isst: $ZodIssueInvalidType$1;
|
|
592
|
+
}
|
|
593
|
+
interface $ZodVoid$1 extends $ZodType$1 {
|
|
594
|
+
_zod: $ZodVoidInternals$1;
|
|
595
|
+
}
|
|
596
|
+
declare const $ZodVoid$1: $constructor$1<$ZodVoid$1>;
|
|
597
|
+
interface $ZodDateDef$1 extends $ZodTypeDef$1 {
|
|
598
|
+
type: "date";
|
|
599
|
+
coerce?: boolean;
|
|
600
|
+
}
|
|
601
|
+
interface $ZodDateInternals$1<T = unknown> extends $ZodTypeInternals$1<Date, T> {
|
|
602
|
+
def: $ZodDateDef$1;
|
|
603
|
+
isst: $ZodIssueInvalidType$1;
|
|
604
|
+
bag: LoosePartial$1<{
|
|
605
|
+
minimum: Date;
|
|
606
|
+
maximum: Date;
|
|
607
|
+
format: string;
|
|
608
|
+
}>;
|
|
609
|
+
}
|
|
610
|
+
interface $ZodDate$1<T = unknown> extends $ZodType$1 {
|
|
611
|
+
_zod: $ZodDateInternals$1<T>;
|
|
612
|
+
}
|
|
613
|
+
declare const $ZodDate$1: $constructor$1<$ZodDate$1>;
|
|
614
|
+
interface $ZodArrayDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
615
|
+
type: "array";
|
|
616
|
+
element: T;
|
|
617
|
+
}
|
|
618
|
+
interface $ZodArrayInternals$1<T extends SomeType$1 = $ZodType$1> extends _$ZodTypeInternals$1 {
|
|
619
|
+
def: $ZodArrayDef$1<T>;
|
|
620
|
+
isst: $ZodIssueInvalidType$1;
|
|
621
|
+
output: output$1<T>[];
|
|
622
|
+
input: input$1<T>[];
|
|
623
|
+
}
|
|
624
|
+
interface $ZodArray$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1<any, any, $ZodArrayInternals$1<T>> {}
|
|
625
|
+
declare const $ZodArray$1: $constructor$1<$ZodArray$1>;
|
|
626
|
+
type OptionalOutSchema$1 = {
|
|
627
|
+
_zod: {
|
|
628
|
+
optout: "optional";
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
type OptionalInSchema$1 = {
|
|
632
|
+
_zod: {
|
|
633
|
+
optin: "optional";
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
type $InferObjectOutput$1<T extends $ZodLooseShape$1, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny$1<T[keyof T]> extends true ? Record<string, unknown> : Record<string, output$1<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify$1<{ -readonly [k in keyof T as T[k] extends OptionalOutSchema$1 ? never : k]: T[k]["_zod"]["output"] } & { -readonly [k in keyof T as T[k] extends OptionalOutSchema$1 ? k : never]?: T[k]["_zod"]["output"] } & Extra>;
|
|
637
|
+
type $InferObjectInput$1<T extends $ZodLooseShape$1, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny$1<T[keyof T]> extends true ? Record<string, unknown> : Record<string, input$1<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify$1<{ -readonly [k in keyof T as T[k] extends OptionalInSchema$1 ? never : k]: T[k]["_zod"]["input"] } & { -readonly [k in keyof T as T[k] extends OptionalInSchema$1 ? k : never]?: T[k]["_zod"]["input"] } & Extra>;
|
|
638
|
+
type $ZodObjectConfig$1 = {
|
|
639
|
+
out: Record<string, unknown>;
|
|
640
|
+
in: Record<string, unknown>;
|
|
641
|
+
};
|
|
642
|
+
type $loose$1 = {
|
|
643
|
+
out: Record<string, unknown>;
|
|
644
|
+
in: Record<string, unknown>;
|
|
645
|
+
};
|
|
646
|
+
type $strict$1 = {
|
|
647
|
+
out: {};
|
|
648
|
+
in: {};
|
|
649
|
+
};
|
|
650
|
+
type $strip$1 = {
|
|
651
|
+
out: {};
|
|
652
|
+
in: {};
|
|
653
|
+
};
|
|
654
|
+
type $catchall$1<T extends SomeType$1> = {
|
|
655
|
+
out: {
|
|
656
|
+
[k: string]: output$1<T>;
|
|
657
|
+
};
|
|
658
|
+
in: {
|
|
659
|
+
[k: string]: input$1<T>;
|
|
660
|
+
};
|
|
661
|
+
};
|
|
662
|
+
type $ZodShape$1 = Readonly<{
|
|
663
|
+
[k: string]: $ZodType$1;
|
|
664
|
+
}>;
|
|
665
|
+
interface $ZodObjectDef$1<Shape extends $ZodShape$1 = $ZodShape$1> extends $ZodTypeDef$1 {
|
|
666
|
+
type: "object";
|
|
667
|
+
shape: Shape;
|
|
668
|
+
catchall?: $ZodType$1 | undefined;
|
|
669
|
+
}
|
|
670
|
+
interface $ZodObjectInternals$1< /** @ts-ignore Cast variance */out Shape extends $ZodShape$1 = $ZodShape$1, out Config extends $ZodObjectConfig$1 = $ZodObjectConfig$1> extends _$ZodTypeInternals$1 {
|
|
671
|
+
def: $ZodObjectDef$1<Shape>;
|
|
672
|
+
config: Config;
|
|
673
|
+
isst: $ZodIssueInvalidType$1 | $ZodIssueUnrecognizedKeys$1;
|
|
674
|
+
propValues: PropValues$1;
|
|
675
|
+
output: $InferObjectOutput$1<Shape, Config["out"]>;
|
|
676
|
+
input: $InferObjectInput$1<Shape, Config["in"]>;
|
|
677
|
+
optin?: "optional" | undefined;
|
|
678
|
+
optout?: "optional" | undefined;
|
|
679
|
+
}
|
|
680
|
+
type $ZodLooseShape$1 = Record<string, any>;
|
|
681
|
+
interface $ZodObject$1< /** @ts-ignore Cast variance */out Shape extends Readonly<$ZodShape$1> = Readonly<$ZodShape$1>, out Params extends $ZodObjectConfig$1 = $ZodObjectConfig$1> extends $ZodType$1<any, any, $ZodObjectInternals$1<Shape, Params>> {}
|
|
682
|
+
declare const $ZodObject$1: $constructor$1<$ZodObject$1>;
|
|
683
|
+
type $InferUnionOutput$1<T extends SomeType$1> = T extends any ? output$1<T> : never;
|
|
684
|
+
type $InferUnionInput$1<T extends SomeType$1> = T extends any ? input$1<T> : never;
|
|
685
|
+
interface $ZodUnionDef$1<Options extends readonly SomeType$1[] = readonly $ZodType$1[]> extends $ZodTypeDef$1 {
|
|
686
|
+
type: "union";
|
|
687
|
+
options: Options;
|
|
688
|
+
inclusive?: boolean;
|
|
689
|
+
}
|
|
690
|
+
type IsOptionalIn$1<T extends SomeType$1> = T extends OptionalInSchema$1 ? true : false;
|
|
691
|
+
type IsOptionalOut$1<T extends SomeType$1> = T extends OptionalOutSchema$1 ? true : false;
|
|
692
|
+
interface $ZodUnionInternals$1<T extends readonly SomeType$1[] = readonly $ZodType$1[]> extends _$ZodTypeInternals$1 {
|
|
693
|
+
def: $ZodUnionDef$1<T>;
|
|
694
|
+
isst: $ZodIssueInvalidUnion$1;
|
|
695
|
+
pattern: T[number]["_zod"]["pattern"];
|
|
696
|
+
values: T[number]["_zod"]["values"];
|
|
697
|
+
output: $InferUnionOutput$1<T[number]>;
|
|
698
|
+
input: $InferUnionInput$1<T[number]>;
|
|
699
|
+
optin: IsOptionalIn$1<T[number]> extends false ? "optional" | undefined : "optional";
|
|
700
|
+
optout: IsOptionalOut$1<T[number]> extends false ? "optional" | undefined : "optional";
|
|
701
|
+
}
|
|
702
|
+
interface $ZodUnion$1<T extends readonly SomeType$1[] = readonly $ZodType$1[]> extends $ZodType$1<any, any, $ZodUnionInternals$1<T>> {
|
|
703
|
+
_zod: $ZodUnionInternals$1<T>;
|
|
704
|
+
}
|
|
705
|
+
declare const $ZodUnion$1: $constructor$1<$ZodUnion$1>;
|
|
706
|
+
interface $ZodIntersectionDef$1<Left extends SomeType$1 = $ZodType$1, Right extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
707
|
+
type: "intersection";
|
|
708
|
+
left: Left;
|
|
709
|
+
right: Right;
|
|
710
|
+
}
|
|
711
|
+
interface $ZodIntersectionInternals$1<A extends SomeType$1 = $ZodType$1, B extends SomeType$1 = $ZodType$1> extends _$ZodTypeInternals$1 {
|
|
712
|
+
def: $ZodIntersectionDef$1<A, B>;
|
|
713
|
+
isst: never;
|
|
714
|
+
optin: A["_zod"]["optin"] | B["_zod"]["optin"];
|
|
715
|
+
optout: A["_zod"]["optout"] | B["_zod"]["optout"];
|
|
716
|
+
output: output$1<A> & output$1<B>;
|
|
717
|
+
input: input$1<A> & input$1<B>;
|
|
718
|
+
}
|
|
719
|
+
interface $ZodIntersection$1<A extends SomeType$1 = $ZodType$1, B extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
720
|
+
_zod: $ZodIntersectionInternals$1<A, B>;
|
|
721
|
+
}
|
|
722
|
+
declare const $ZodIntersection$1: $constructor$1<$ZodIntersection$1>;
|
|
723
|
+
interface $ZodTupleDef$1<T extends TupleItems$1 = readonly $ZodType$1[], Rest extends SomeType$1 | null = $ZodType$1 | null> extends $ZodTypeDef$1 {
|
|
724
|
+
type: "tuple";
|
|
725
|
+
items: T;
|
|
726
|
+
rest: Rest;
|
|
727
|
+
}
|
|
728
|
+
type $InferTupleInputType$1<T extends TupleItems$1, Rest extends SomeType$1 | null> = [...TupleInputTypeWithOptionals$1<T>, ...(Rest extends SomeType$1 ? input$1<Rest>[] : [])];
|
|
729
|
+
type TupleInputTypeNoOptionals$1<T extends TupleItems$1> = { [k in keyof T]: input$1<T[k]> };
|
|
730
|
+
type TupleInputTypeWithOptionals$1<T extends TupleItems$1> = T extends readonly [...infer Prefix extends SomeType$1[], infer Tail extends SomeType$1] ? Tail["_zod"]["optin"] extends "optional" ? [...TupleInputTypeWithOptionals$1<Prefix>, input$1<Tail>?] : TupleInputTypeNoOptionals$1<T> : [];
|
|
731
|
+
type $InferTupleOutputType$1<T extends TupleItems$1, Rest extends SomeType$1 | null> = [...TupleOutputTypeWithOptionals$1<T>, ...(Rest extends SomeType$1 ? output$1<Rest>[] : [])];
|
|
732
|
+
type TupleOutputTypeNoOptionals$1<T extends TupleItems$1> = { [k in keyof T]: output$1<T[k]> };
|
|
733
|
+
type TupleOutputTypeWithOptionals$1<T extends TupleItems$1> = T extends readonly [...infer Prefix extends SomeType$1[], infer Tail extends SomeType$1] ? Tail["_zod"]["optout"] extends "optional" ? [...TupleOutputTypeWithOptionals$1<Prefix>, output$1<Tail>?] : TupleOutputTypeNoOptionals$1<T> : [];
|
|
734
|
+
interface $ZodTupleInternals$1<T extends TupleItems$1 = readonly $ZodType$1[], Rest extends SomeType$1 | null = $ZodType$1 | null> extends _$ZodTypeInternals$1 {
|
|
735
|
+
def: $ZodTupleDef$1<T, Rest>;
|
|
736
|
+
isst: $ZodIssueInvalidType$1 | $ZodIssueTooBig$1<unknown[]> | $ZodIssueTooSmall$1<unknown[]>;
|
|
737
|
+
output: $InferTupleOutputType$1<T, Rest>;
|
|
738
|
+
input: $InferTupleInputType$1<T, Rest>;
|
|
739
|
+
}
|
|
740
|
+
interface $ZodTuple$1<T extends TupleItems$1 = readonly $ZodType$1[], Rest extends SomeType$1 | null = $ZodType$1 | null> extends $ZodType$1 {
|
|
741
|
+
_zod: $ZodTupleInternals$1<T, Rest>;
|
|
742
|
+
}
|
|
743
|
+
declare const $ZodTuple$1: $constructor$1<$ZodTuple$1>;
|
|
744
|
+
type $ZodRecordKey$1 = $ZodType$1<string | number | symbol, unknown>;
|
|
745
|
+
interface $ZodRecordDef$1<Key extends $ZodRecordKey$1 = $ZodRecordKey$1, Value extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
746
|
+
type: "record";
|
|
747
|
+
keyType: Key;
|
|
748
|
+
valueType: Value;
|
|
749
|
+
/** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
|
|
750
|
+
mode?: "strict" | "loose";
|
|
751
|
+
}
|
|
752
|
+
type $InferZodRecordOutput$1<Key extends $ZodRecordKey$1 = $ZodRecordKey$1, Value extends SomeType$1 = $ZodType$1> = Key extends $partial$1 ? Partial<Record<output$1<Key>, output$1<Value>>> : Record<output$1<Key>, output$1<Value>>;
|
|
753
|
+
type $InferZodRecordInput$1<Key extends $ZodRecordKey$1 = $ZodRecordKey$1, Value extends SomeType$1 = $ZodType$1> = Key extends $partial$1 ? Partial<Record<input$1<Key> & PropertyKey, input$1<Value>>> : Record<input$1<Key> & PropertyKey, input$1<Value>>;
|
|
754
|
+
interface $ZodRecordInternals$1<Key extends $ZodRecordKey$1 = $ZodRecordKey$1, Value extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<$InferZodRecordOutput$1<Key, Value>, $InferZodRecordInput$1<Key, Value>> {
|
|
755
|
+
def: $ZodRecordDef$1<Key, Value>;
|
|
756
|
+
isst: $ZodIssueInvalidType$1 | $ZodIssueInvalidKey$1<Record<PropertyKey, unknown>>;
|
|
757
|
+
optin?: "optional" | undefined;
|
|
758
|
+
optout?: "optional" | undefined;
|
|
759
|
+
}
|
|
760
|
+
type $partial$1 = {
|
|
761
|
+
"~~partial": true;
|
|
762
|
+
};
|
|
763
|
+
interface $ZodRecord$1<Key extends $ZodRecordKey$1 = $ZodRecordKey$1, Value extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
764
|
+
_zod: $ZodRecordInternals$1<Key, Value>;
|
|
765
|
+
}
|
|
766
|
+
declare const $ZodRecord$1: $constructor$1<$ZodRecord$1>;
|
|
767
|
+
interface $ZodMapDef$1<Key extends SomeType$1 = $ZodType$1, Value extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
768
|
+
type: "map";
|
|
769
|
+
keyType: Key;
|
|
770
|
+
valueType: Value;
|
|
771
|
+
}
|
|
772
|
+
interface $ZodMapInternals$1<Key extends SomeType$1 = $ZodType$1, Value extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<Map<output$1<Key>, output$1<Value>>, Map<input$1<Key>, input$1<Value>>> {
|
|
773
|
+
def: $ZodMapDef$1<Key, Value>;
|
|
774
|
+
isst: $ZodIssueInvalidType$1 | $ZodIssueInvalidKey$1 | $ZodIssueInvalidElement$1<unknown>;
|
|
775
|
+
optin?: "optional" | undefined;
|
|
776
|
+
optout?: "optional" | undefined;
|
|
777
|
+
}
|
|
778
|
+
interface $ZodMap$1<Key extends SomeType$1 = $ZodType$1, Value extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
779
|
+
_zod: $ZodMapInternals$1<Key, Value>;
|
|
780
|
+
}
|
|
781
|
+
declare const $ZodMap$1: $constructor$1<$ZodMap$1>;
|
|
782
|
+
interface $ZodSetDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
783
|
+
type: "set";
|
|
784
|
+
valueType: T;
|
|
785
|
+
}
|
|
786
|
+
interface $ZodSetInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<Set<output$1<T>>, Set<input$1<T>>> {
|
|
787
|
+
def: $ZodSetDef$1<T>;
|
|
788
|
+
isst: $ZodIssueInvalidType$1;
|
|
789
|
+
optin?: "optional" | undefined;
|
|
790
|
+
optout?: "optional" | undefined;
|
|
791
|
+
}
|
|
792
|
+
interface $ZodSet$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
793
|
+
_zod: $ZodSetInternals$1<T>;
|
|
794
|
+
}
|
|
795
|
+
declare const $ZodSet$1: $constructor$1<$ZodSet$1>;
|
|
796
|
+
type $InferEnumOutput$1<T extends EnumLike$1> = T[keyof T] & {};
|
|
797
|
+
type $InferEnumInput$1<T extends EnumLike$1> = T[keyof T] & {};
|
|
798
|
+
interface $ZodEnumDef$1<T extends EnumLike$1 = EnumLike$1> extends $ZodTypeDef$1 {
|
|
799
|
+
type: "enum";
|
|
800
|
+
entries: T;
|
|
801
|
+
}
|
|
802
|
+
interface $ZodEnumInternals$1< /** @ts-ignore Cast variance */out T extends EnumLike$1 = EnumLike$1> extends $ZodTypeInternals$1<$InferEnumOutput$1<T>, $InferEnumInput$1<T>> {
|
|
803
|
+
def: $ZodEnumDef$1<T>;
|
|
804
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
805
|
+
values: PrimitiveSet$1;
|
|
806
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
807
|
+
pattern: RegExp;
|
|
808
|
+
isst: $ZodIssueInvalidValue$1;
|
|
809
|
+
}
|
|
810
|
+
interface $ZodEnum$1<T extends EnumLike$1 = EnumLike$1> extends $ZodType$1 {
|
|
811
|
+
_zod: $ZodEnumInternals$1<T>;
|
|
812
|
+
}
|
|
813
|
+
declare const $ZodEnum$1: $constructor$1<$ZodEnum$1>;
|
|
814
|
+
interface $ZodLiteralDef$1<T extends Literal$1> extends $ZodTypeDef$1 {
|
|
815
|
+
type: "literal";
|
|
816
|
+
values: T[];
|
|
817
|
+
}
|
|
818
|
+
interface $ZodLiteralInternals$1<T extends Literal$1 = Literal$1> extends $ZodTypeInternals$1<T, T> {
|
|
819
|
+
def: $ZodLiteralDef$1<T>;
|
|
820
|
+
values: Set<T>;
|
|
821
|
+
pattern: RegExp;
|
|
822
|
+
isst: $ZodIssueInvalidValue$1;
|
|
823
|
+
}
|
|
824
|
+
interface $ZodLiteral$1<T extends Literal$1 = Literal$1> extends $ZodType$1 {
|
|
825
|
+
_zod: $ZodLiteralInternals$1<T>;
|
|
826
|
+
}
|
|
827
|
+
declare const $ZodLiteral$1: $constructor$1<$ZodLiteral$1>;
|
|
828
|
+
type _File$1 = typeof globalThis extends {
|
|
829
|
+
File: infer F extends new (...args: any[]) => any;
|
|
830
|
+
} ? InstanceType<F> : {};
|
|
831
|
+
/** Do not reference this directly. */
|
|
832
|
+
interface File$1 extends _File$1 {
|
|
833
|
+
readonly type: string;
|
|
834
|
+
readonly size: number;
|
|
835
|
+
}
|
|
836
|
+
interface $ZodFileDef$1 extends $ZodTypeDef$1 {
|
|
837
|
+
type: "file";
|
|
838
|
+
}
|
|
839
|
+
interface $ZodFileInternals$1 extends $ZodTypeInternals$1<File$1, File$1> {
|
|
840
|
+
def: $ZodFileDef$1;
|
|
841
|
+
isst: $ZodIssueInvalidType$1;
|
|
842
|
+
bag: LoosePartial$1<{
|
|
843
|
+
minimum: number;
|
|
844
|
+
maximum: number;
|
|
845
|
+
mime: MimeTypes$1[];
|
|
846
|
+
}>;
|
|
847
|
+
}
|
|
848
|
+
interface $ZodFile$1 extends $ZodType$1 {
|
|
849
|
+
_zod: $ZodFileInternals$1;
|
|
850
|
+
}
|
|
851
|
+
declare const $ZodFile$1: $constructor$1<$ZodFile$1>;
|
|
852
|
+
interface $ZodTransformDef$1 extends $ZodTypeDef$1 {
|
|
853
|
+
type: "transform";
|
|
854
|
+
transform: (input: unknown, payload: ParsePayload$1<unknown>) => MaybeAsync$1<unknown>;
|
|
855
|
+
}
|
|
856
|
+
interface $ZodTransformInternals$1<O = unknown, I = unknown> extends $ZodTypeInternals$1<O, I> {
|
|
857
|
+
def: $ZodTransformDef$1;
|
|
858
|
+
isst: never;
|
|
859
|
+
}
|
|
860
|
+
interface $ZodTransform$1<O = unknown, I = unknown> extends $ZodType$1 {
|
|
861
|
+
_zod: $ZodTransformInternals$1<O, I>;
|
|
862
|
+
}
|
|
863
|
+
declare const $ZodTransform$1: $constructor$1<$ZodTransform$1>;
|
|
864
|
+
interface $ZodOptionalDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
865
|
+
type: "optional";
|
|
866
|
+
innerType: T;
|
|
867
|
+
}
|
|
868
|
+
interface $ZodOptionalInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<output$1<T> | undefined, input$1<T> | undefined> {
|
|
869
|
+
def: $ZodOptionalDef$1<T>;
|
|
870
|
+
optin: "optional";
|
|
871
|
+
optout: "optional";
|
|
872
|
+
isst: never;
|
|
873
|
+
values: T["_zod"]["values"];
|
|
874
|
+
pattern: T["_zod"]["pattern"];
|
|
875
|
+
}
|
|
876
|
+
interface $ZodOptional$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
877
|
+
_zod: $ZodOptionalInternals$1<T>;
|
|
878
|
+
}
|
|
879
|
+
declare const $ZodOptional$1: $constructor$1<$ZodOptional$1>;
|
|
880
|
+
interface $ZodExactOptionalDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodOptionalDef$1<T> {}
|
|
881
|
+
interface $ZodExactOptionalInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodOptionalInternals$1<T> {
|
|
882
|
+
def: $ZodExactOptionalDef$1<T>;
|
|
883
|
+
output: output$1<T>;
|
|
884
|
+
input: input$1<T>;
|
|
885
|
+
}
|
|
886
|
+
interface $ZodExactOptional$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
887
|
+
_zod: $ZodExactOptionalInternals$1<T>;
|
|
888
|
+
}
|
|
889
|
+
declare const $ZodExactOptional$1: $constructor$1<$ZodExactOptional$1>;
|
|
890
|
+
interface $ZodNullableDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
891
|
+
type: "nullable";
|
|
892
|
+
innerType: T;
|
|
893
|
+
}
|
|
894
|
+
interface $ZodNullableInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<output$1<T> | null, input$1<T> | null> {
|
|
895
|
+
def: $ZodNullableDef$1<T>;
|
|
896
|
+
optin: T["_zod"]["optin"];
|
|
897
|
+
optout: T["_zod"]["optout"];
|
|
898
|
+
isst: never;
|
|
899
|
+
values: T["_zod"]["values"];
|
|
900
|
+
pattern: T["_zod"]["pattern"];
|
|
901
|
+
}
|
|
902
|
+
interface $ZodNullable$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
903
|
+
_zod: $ZodNullableInternals$1<T>;
|
|
904
|
+
}
|
|
905
|
+
declare const $ZodNullable$1: $constructor$1<$ZodNullable$1>;
|
|
906
|
+
interface $ZodDefaultDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
907
|
+
type: "default";
|
|
908
|
+
innerType: T;
|
|
909
|
+
/** The default value. May be a getter. */
|
|
910
|
+
defaultValue: NoUndefined$1<output$1<T>>;
|
|
911
|
+
}
|
|
912
|
+
interface $ZodDefaultInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<NoUndefined$1<output$1<T>>, input$1<T> | undefined> {
|
|
913
|
+
def: $ZodDefaultDef$1<T>;
|
|
914
|
+
optin: "optional";
|
|
915
|
+
optout?: "optional" | undefined;
|
|
916
|
+
isst: never;
|
|
917
|
+
values: T["_zod"]["values"];
|
|
918
|
+
}
|
|
919
|
+
interface $ZodDefault$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
920
|
+
_zod: $ZodDefaultInternals$1<T>;
|
|
921
|
+
}
|
|
922
|
+
declare const $ZodDefault$1: $constructor$1<$ZodDefault$1>;
|
|
923
|
+
interface $ZodPrefaultDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
924
|
+
type: "prefault";
|
|
925
|
+
innerType: T;
|
|
926
|
+
/** The default value. May be a getter. */
|
|
927
|
+
defaultValue: input$1<T>;
|
|
928
|
+
}
|
|
929
|
+
interface $ZodPrefaultInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<NoUndefined$1<output$1<T>>, input$1<T> | undefined> {
|
|
930
|
+
def: $ZodPrefaultDef$1<T>;
|
|
931
|
+
optin: "optional";
|
|
932
|
+
optout?: "optional" | undefined;
|
|
933
|
+
isst: never;
|
|
934
|
+
values: T["_zod"]["values"];
|
|
935
|
+
}
|
|
936
|
+
interface $ZodPrefault$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
937
|
+
_zod: $ZodPrefaultInternals$1<T>;
|
|
938
|
+
}
|
|
939
|
+
declare const $ZodPrefault$1: $constructor$1<$ZodPrefault$1>;
|
|
940
|
+
interface $ZodNonOptionalDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
941
|
+
type: "nonoptional";
|
|
942
|
+
innerType: T;
|
|
943
|
+
}
|
|
944
|
+
interface $ZodNonOptionalInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<NoUndefined$1<output$1<T>>, NoUndefined$1<input$1<T>>> {
|
|
945
|
+
def: $ZodNonOptionalDef$1<T>;
|
|
946
|
+
isst: $ZodIssueInvalidType$1;
|
|
947
|
+
values: T["_zod"]["values"];
|
|
948
|
+
optin: "optional" | undefined;
|
|
949
|
+
optout: "optional" | undefined;
|
|
950
|
+
}
|
|
951
|
+
interface $ZodNonOptional$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
952
|
+
_zod: $ZodNonOptionalInternals$1<T>;
|
|
953
|
+
}
|
|
954
|
+
declare const $ZodNonOptional$1: $constructor$1<$ZodNonOptional$1>;
|
|
955
|
+
interface $ZodSuccessDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
956
|
+
type: "success";
|
|
957
|
+
innerType: T;
|
|
958
|
+
}
|
|
959
|
+
interface $ZodSuccessInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<boolean, input$1<T>> {
|
|
960
|
+
def: $ZodSuccessDef$1<T>;
|
|
961
|
+
isst: never;
|
|
962
|
+
optin: T["_zod"]["optin"];
|
|
963
|
+
optout: "optional" | undefined;
|
|
964
|
+
}
|
|
965
|
+
interface $ZodSuccess$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
966
|
+
_zod: $ZodSuccessInternals$1<T>;
|
|
967
|
+
}
|
|
968
|
+
declare const $ZodSuccess$1: $constructor$1<$ZodSuccess$1>;
|
|
969
|
+
interface $ZodCatchCtx$1 extends ParsePayload$1 {
|
|
970
|
+
/** @deprecated Use `ctx.issues` */
|
|
971
|
+
error: {
|
|
972
|
+
issues: $ZodIssue$1[];
|
|
973
|
+
};
|
|
974
|
+
/** @deprecated Use `ctx.value` */
|
|
975
|
+
input: unknown;
|
|
976
|
+
}
|
|
977
|
+
interface $ZodCatchDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
978
|
+
type: "catch";
|
|
979
|
+
innerType: T;
|
|
980
|
+
catchValue: (ctx: $ZodCatchCtx$1) => unknown;
|
|
981
|
+
}
|
|
982
|
+
interface $ZodCatchInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<output$1<T>, input$1<T>> {
|
|
983
|
+
def: $ZodCatchDef$1<T>;
|
|
984
|
+
optin: T["_zod"]["optin"];
|
|
985
|
+
optout: T["_zod"]["optout"];
|
|
986
|
+
isst: never;
|
|
987
|
+
values: T["_zod"]["values"];
|
|
988
|
+
}
|
|
989
|
+
interface $ZodCatch$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
990
|
+
_zod: $ZodCatchInternals$1<T>;
|
|
991
|
+
}
|
|
992
|
+
declare const $ZodCatch$1: $constructor$1<$ZodCatch$1>;
|
|
993
|
+
interface $ZodNaNDef$1 extends $ZodTypeDef$1 {
|
|
994
|
+
type: "nan";
|
|
995
|
+
}
|
|
996
|
+
interface $ZodNaNInternals$1 extends $ZodTypeInternals$1<number, number> {
|
|
997
|
+
def: $ZodNaNDef$1;
|
|
998
|
+
isst: $ZodIssueInvalidType$1;
|
|
999
|
+
}
|
|
1000
|
+
interface $ZodNaN$1 extends $ZodType$1 {
|
|
1001
|
+
_zod: $ZodNaNInternals$1;
|
|
1002
|
+
}
|
|
1003
|
+
declare const $ZodNaN$1: $constructor$1<$ZodNaN$1>;
|
|
1004
|
+
interface $ZodPipeDef$1<A extends SomeType$1 = $ZodType$1, B extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
1005
|
+
type: "pipe";
|
|
1006
|
+
in: A;
|
|
1007
|
+
out: B;
|
|
1008
|
+
/** Only defined inside $ZodCodec instances. */
|
|
1009
|
+
transform?: (value: output$1<A>, payload: ParsePayload$1<output$1<A>>) => MaybeAsync$1<input$1<B>>;
|
|
1010
|
+
/** Only defined inside $ZodCodec instances. */
|
|
1011
|
+
reverseTransform?: (value: input$1<B>, payload: ParsePayload$1<input$1<B>>) => MaybeAsync$1<output$1<A>>;
|
|
1012
|
+
}
|
|
1013
|
+
interface $ZodPipeInternals$1<A extends SomeType$1 = $ZodType$1, B extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<output$1<B>, input$1<A>> {
|
|
1014
|
+
def: $ZodPipeDef$1<A, B>;
|
|
1015
|
+
isst: never;
|
|
1016
|
+
values: A["_zod"]["values"];
|
|
1017
|
+
optin: A["_zod"]["optin"];
|
|
1018
|
+
optout: B["_zod"]["optout"];
|
|
1019
|
+
propValues: A["_zod"]["propValues"];
|
|
1020
|
+
}
|
|
1021
|
+
interface $ZodPipe$1<A extends SomeType$1 = $ZodType$1, B extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
1022
|
+
_zod: $ZodPipeInternals$1<A, B>;
|
|
1023
|
+
}
|
|
1024
|
+
declare const $ZodPipe$1: $constructor$1<$ZodPipe$1>;
|
|
1025
|
+
interface $ZodReadonlyDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
1026
|
+
type: "readonly";
|
|
1027
|
+
innerType: T;
|
|
1028
|
+
}
|
|
1029
|
+
interface $ZodReadonlyInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<MakeReadonly$1<output$1<T>>, MakeReadonly$1<input$1<T>>> {
|
|
1030
|
+
def: $ZodReadonlyDef$1<T>;
|
|
1031
|
+
optin: T["_zod"]["optin"];
|
|
1032
|
+
optout: T["_zod"]["optout"];
|
|
1033
|
+
isst: never;
|
|
1034
|
+
propValues: T["_zod"]["propValues"];
|
|
1035
|
+
values: T["_zod"]["values"];
|
|
1036
|
+
}
|
|
1037
|
+
interface $ZodReadonly$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
1038
|
+
_zod: $ZodReadonlyInternals$1<T>;
|
|
1039
|
+
}
|
|
1040
|
+
declare const $ZodReadonly$1: $constructor$1<$ZodReadonly$1>;
|
|
1041
|
+
interface $ZodTemplateLiteralDef$1 extends $ZodTypeDef$1 {
|
|
1042
|
+
type: "template_literal";
|
|
1043
|
+
parts: $ZodTemplateLiteralPart$1[];
|
|
1044
|
+
format?: string | undefined;
|
|
1045
|
+
}
|
|
1046
|
+
interface $ZodTemplateLiteralInternals$1<Template extends string = string> extends $ZodTypeInternals$1<Template, Template> {
|
|
1047
|
+
pattern: RegExp;
|
|
1048
|
+
def: $ZodTemplateLiteralDef$1;
|
|
1049
|
+
isst: $ZodIssueInvalidType$1;
|
|
1050
|
+
}
|
|
1051
|
+
interface $ZodTemplateLiteral$1<Template extends string = string> extends $ZodType$1 {
|
|
1052
|
+
_zod: $ZodTemplateLiteralInternals$1<Template>;
|
|
1053
|
+
}
|
|
1054
|
+
type LiteralPart$1 = Exclude<Literal$1, symbol>;
|
|
1055
|
+
interface SchemaPartInternals$1 extends $ZodTypeInternals$1<LiteralPart$1, LiteralPart$1> {
|
|
1056
|
+
pattern: RegExp;
|
|
1057
|
+
}
|
|
1058
|
+
interface SchemaPart$1 extends $ZodType$1 {
|
|
1059
|
+
_zod: SchemaPartInternals$1;
|
|
1060
|
+
}
|
|
1061
|
+
type $ZodTemplateLiteralPart$1 = LiteralPart$1 | SchemaPart$1;
|
|
1062
|
+
declare const $ZodTemplateLiteral$1: $constructor$1<$ZodTemplateLiteral$1>;
|
|
1063
|
+
type $ZodFunctionArgs$1 = $ZodType$1<unknown[], unknown[]>;
|
|
1064
|
+
type $ZodFunctionIn$1 = $ZodFunctionArgs$1;
|
|
1065
|
+
type $ZodFunctionOut$1 = $ZodType$1;
|
|
1066
|
+
type $InferInnerFunctionType$1<Args extends $ZodFunctionIn$1, Returns extends $ZodFunctionOut$1> = (...args: $ZodFunctionIn$1 extends Args ? never[] : output$1<Args>) => input$1<Returns>;
|
|
1067
|
+
type $InferInnerFunctionTypeAsync$1<Args extends $ZodFunctionIn$1, Returns extends $ZodFunctionOut$1> = (...args: $ZodFunctionIn$1 extends Args ? never[] : output$1<Args>) => MaybeAsync$1<input$1<Returns>>;
|
|
1068
|
+
type $InferOuterFunctionType$1<Args extends $ZodFunctionIn$1, Returns extends $ZodFunctionOut$1> = (...args: $ZodFunctionIn$1 extends Args ? never[] : input$1<Args>) => output$1<Returns>;
|
|
1069
|
+
type $InferOuterFunctionTypeAsync$1<Args extends $ZodFunctionIn$1, Returns extends $ZodFunctionOut$1> = (...args: $ZodFunctionIn$1 extends Args ? never[] : input$1<Args>) => Promise<output$1<Returns>>;
|
|
1070
|
+
interface $ZodFunctionDef$1<In extends $ZodFunctionIn$1 = $ZodFunctionIn$1, Out extends $ZodFunctionOut$1 = $ZodFunctionOut$1> extends $ZodTypeDef$1 {
|
|
1071
|
+
type: "function";
|
|
1072
|
+
input: In;
|
|
1073
|
+
output: Out;
|
|
1074
|
+
}
|
|
1075
|
+
interface $ZodFunctionInternals$1<Args extends $ZodFunctionIn$1, Returns extends $ZodFunctionOut$1> extends $ZodTypeInternals$1<$InferOuterFunctionType$1<Args, Returns>, $InferInnerFunctionType$1<Args, Returns>> {
|
|
1076
|
+
def: $ZodFunctionDef$1<Args, Returns>;
|
|
1077
|
+
isst: $ZodIssueInvalidType$1;
|
|
1078
|
+
}
|
|
1079
|
+
interface $ZodFunction$1<Args extends $ZodFunctionIn$1 = $ZodFunctionIn$1, Returns extends $ZodFunctionOut$1 = $ZodFunctionOut$1> extends $ZodType$1<any, any, $ZodFunctionInternals$1<Args, Returns>> {
|
|
1080
|
+
/** @deprecated */
|
|
1081
|
+
_def: $ZodFunctionDef$1<Args, Returns>;
|
|
1082
|
+
_input: $InferInnerFunctionType$1<Args, Returns>;
|
|
1083
|
+
_output: $InferOuterFunctionType$1<Args, Returns>;
|
|
1084
|
+
implement<F extends $InferInnerFunctionType$1<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
|
|
1085
|
+
implementAsync<F extends $InferInnerFunctionTypeAsync$1<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync$1<Args, Returns> ? F : $InferOuterFunctionTypeAsync$1<Args, Returns>;
|
|
1086
|
+
input<const Items extends TupleItems$1, const Rest extends $ZodFunctionOut$1 = $ZodFunctionOut$1>(args: Items, rest?: Rest): $ZodFunction$1<$ZodTuple$1<Items, Rest>, Returns>;
|
|
1087
|
+
input<NewArgs extends $ZodFunctionIn$1>(args: NewArgs): $ZodFunction$1<NewArgs, Returns>;
|
|
1088
|
+
input(...args: any[]): $ZodFunction$1<any, Returns>;
|
|
1089
|
+
output<NewReturns extends $ZodType$1>(output: NewReturns): $ZodFunction$1<Args, NewReturns>;
|
|
1090
|
+
}
|
|
1091
|
+
declare const $ZodFunction$1: $constructor$1<$ZodFunction$1>;
|
|
1092
|
+
interface $ZodPromiseDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
1093
|
+
type: "promise";
|
|
1094
|
+
innerType: T;
|
|
1095
|
+
}
|
|
1096
|
+
interface $ZodPromiseInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<Promise<output$1<T>>, MaybeAsync$1<input$1<T>>> {
|
|
1097
|
+
def: $ZodPromiseDef$1<T>;
|
|
1098
|
+
isst: never;
|
|
1099
|
+
}
|
|
1100
|
+
interface $ZodPromise$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
1101
|
+
_zod: $ZodPromiseInternals$1<T>;
|
|
1102
|
+
}
|
|
1103
|
+
declare const $ZodPromise$1: $constructor$1<$ZodPromise$1>;
|
|
1104
|
+
interface $ZodLazyDef$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeDef$1 {
|
|
1105
|
+
type: "lazy";
|
|
1106
|
+
getter: () => T;
|
|
1107
|
+
}
|
|
1108
|
+
interface $ZodLazyInternals$1<T extends SomeType$1 = $ZodType$1> extends $ZodTypeInternals$1<output$1<T>, input$1<T>> {
|
|
1109
|
+
def: $ZodLazyDef$1<T>;
|
|
1110
|
+
isst: never;
|
|
1111
|
+
/** Auto-cached way to retrieve the inner schema */
|
|
1112
|
+
innerType: T;
|
|
1113
|
+
pattern: T["_zod"]["pattern"];
|
|
1114
|
+
propValues: T["_zod"]["propValues"];
|
|
1115
|
+
optin: T["_zod"]["optin"];
|
|
1116
|
+
optout: T["_zod"]["optout"];
|
|
1117
|
+
}
|
|
1118
|
+
interface $ZodLazy$1<T extends SomeType$1 = $ZodType$1> extends $ZodType$1 {
|
|
1119
|
+
_zod: $ZodLazyInternals$1<T>;
|
|
1120
|
+
}
|
|
1121
|
+
declare const $ZodLazy$1: $constructor$1<$ZodLazy$1>;
|
|
1122
|
+
interface $ZodCustomDef$1<O = unknown> extends $ZodTypeDef$1, $ZodCheckDef$1 {
|
|
1123
|
+
type: "custom";
|
|
1124
|
+
check: "custom";
|
|
1125
|
+
path?: PropertyKey[] | undefined;
|
|
1126
|
+
error?: $ZodErrorMap$1 | undefined;
|
|
1127
|
+
params?: Record<string, any> | undefined;
|
|
1128
|
+
fn: (arg: O) => unknown;
|
|
1129
|
+
}
|
|
1130
|
+
interface $ZodCustomInternals$1<O = unknown, I = unknown> extends $ZodTypeInternals$1<O, I>, $ZodCheckInternals$1<O> {
|
|
1131
|
+
def: $ZodCustomDef$1;
|
|
1132
|
+
issc: $ZodIssue$1;
|
|
1133
|
+
isst: never;
|
|
1134
|
+
bag: LoosePartial$1<{
|
|
1135
|
+
Class: typeof Class$1;
|
|
1136
|
+
}>;
|
|
1137
|
+
}
|
|
1138
|
+
interface $ZodCustom$1<O = unknown, I = unknown> extends $ZodType$1 {
|
|
1139
|
+
_zod: $ZodCustomInternals$1<O, I>;
|
|
1140
|
+
}
|
|
1141
|
+
declare const $ZodCustom$1: $constructor$1<$ZodCustom$1>;
|
|
1142
|
+
type $ZodTypes$1 = $ZodString$1 | $ZodNumber$1 | $ZodBigInt$1 | $ZodBoolean$1 | $ZodDate$1 | $ZodSymbol$1 | $ZodUndefined$1 | $ZodNullable$1 | $ZodNull$1 | $ZodAny$1 | $ZodUnknown$1 | $ZodNever$1 | $ZodVoid$1 | $ZodArray$1 | $ZodObject$1 | $ZodUnion$1 | $ZodIntersection$1 | $ZodTuple$1 | $ZodRecord$1 | $ZodMap$1 | $ZodSet$1 | $ZodLiteral$1 | $ZodEnum$1 | $ZodFunction$1 | $ZodPromise$1 | $ZodLazy$1 | $ZodOptional$1 | $ZodDefault$1 | $ZodPrefault$1 | $ZodTemplateLiteral$1 | $ZodCustom$1 | $ZodTransform$1 | $ZodNonOptional$1 | $ZodReadonly$1 | $ZodNaN$1 | $ZodPipe$1 | $ZodSuccess$1 | $ZodCatch$1 | $ZodFile$1;
|
|
1143
|
+
//#endregion
|
|
1144
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/checks.d.cts
|
|
1145
|
+
interface $ZodCheckDef$1 {
|
|
1146
|
+
check: string;
|
|
1147
|
+
error?: $ZodErrorMap$1<never> | undefined;
|
|
1148
|
+
/** If true, no later checks will be executed if this check fails. Default `false`. */
|
|
1149
|
+
abort?: boolean | undefined;
|
|
1150
|
+
/** If provided, this check will only be executed if the function returns `true`. Defaults to `payload => z.util.isAborted(payload)`. */
|
|
1151
|
+
when?: ((payload: ParsePayload$1) => boolean) | undefined;
|
|
1152
|
+
}
|
|
1153
|
+
interface $ZodCheckInternals$1<T> {
|
|
1154
|
+
def: $ZodCheckDef$1;
|
|
1155
|
+
/** The set of issues this check might throw. */
|
|
1156
|
+
issc?: $ZodIssueBase$1;
|
|
1157
|
+
check(payload: ParsePayload$1<T>): MaybeAsync$1<void>;
|
|
1158
|
+
onattach: ((schema: $ZodType$1) => void)[];
|
|
1159
|
+
}
|
|
1160
|
+
interface $ZodCheck$1<in T = never> {
|
|
1161
|
+
_zod: $ZodCheckInternals$1<T>;
|
|
1162
|
+
}
|
|
1163
|
+
declare const $ZodCheck$1: $constructor$1<$ZodCheck$1<any>>;
|
|
1164
|
+
interface $ZodCheckMaxLengthDef$1 extends $ZodCheckDef$1 {
|
|
1165
|
+
check: "max_length";
|
|
1166
|
+
maximum: number;
|
|
1167
|
+
}
|
|
1168
|
+
interface $ZodCheckMaxLengthInternals$1<T extends HasLength$1 = HasLength$1> extends $ZodCheckInternals$1<T> {
|
|
1169
|
+
def: $ZodCheckMaxLengthDef$1;
|
|
1170
|
+
issc: $ZodIssueTooBig$1<T>;
|
|
1171
|
+
}
|
|
1172
|
+
interface $ZodCheckMaxLength$1<T extends HasLength$1 = HasLength$1> extends $ZodCheck$1<T> {
|
|
1173
|
+
_zod: $ZodCheckMaxLengthInternals$1<T>;
|
|
1174
|
+
}
|
|
1175
|
+
declare const $ZodCheckMaxLength$1: $constructor$1<$ZodCheckMaxLength$1>;
|
|
1176
|
+
interface $ZodCheckMinLengthDef$1 extends $ZodCheckDef$1 {
|
|
1177
|
+
check: "min_length";
|
|
1178
|
+
minimum: number;
|
|
1179
|
+
}
|
|
1180
|
+
interface $ZodCheckMinLengthInternals$1<T extends HasLength$1 = HasLength$1> extends $ZodCheckInternals$1<T> {
|
|
1181
|
+
def: $ZodCheckMinLengthDef$1;
|
|
1182
|
+
issc: $ZodIssueTooSmall$1<T>;
|
|
1183
|
+
}
|
|
1184
|
+
interface $ZodCheckMinLength$1<T extends HasLength$1 = HasLength$1> extends $ZodCheck$1<T> {
|
|
1185
|
+
_zod: $ZodCheckMinLengthInternals$1<T>;
|
|
1186
|
+
}
|
|
1187
|
+
declare const $ZodCheckMinLength$1: $constructor$1<$ZodCheckMinLength$1>;
|
|
1188
|
+
interface $ZodCheckLengthEqualsDef$1 extends $ZodCheckDef$1 {
|
|
1189
|
+
check: "length_equals";
|
|
1190
|
+
length: number;
|
|
1191
|
+
}
|
|
1192
|
+
interface $ZodCheckLengthEqualsInternals$1<T extends HasLength$1 = HasLength$1> extends $ZodCheckInternals$1<T> {
|
|
1193
|
+
def: $ZodCheckLengthEqualsDef$1;
|
|
1194
|
+
issc: $ZodIssueTooBig$1<T> | $ZodIssueTooSmall$1<T>;
|
|
1195
|
+
}
|
|
1196
|
+
interface $ZodCheckLengthEquals$1<T extends HasLength$1 = HasLength$1> extends $ZodCheck$1<T> {
|
|
1197
|
+
_zod: $ZodCheckLengthEqualsInternals$1<T>;
|
|
1198
|
+
}
|
|
1199
|
+
declare const $ZodCheckLengthEquals$1: $constructor$1<$ZodCheckLengthEquals$1>;
|
|
1200
|
+
type $ZodStringFormats$1 = "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";
|
|
1201
|
+
//#endregion
|
|
1202
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.d.cts
|
|
1203
|
+
interface $ZodIssueBase$1 {
|
|
1204
|
+
readonly code?: string;
|
|
1205
|
+
readonly input?: unknown;
|
|
1206
|
+
readonly path: PropertyKey[];
|
|
1207
|
+
readonly message: string;
|
|
1208
|
+
}
|
|
1209
|
+
type $ZodInvalidTypeExpected$1 = "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "undefined" | "null" | "never" | "void" | "date" | "array" | "object" | "tuple" | "record" | "map" | "set" | "file" | "nonoptional" | "nan" | "function" | (string & {});
|
|
1210
|
+
interface $ZodIssueInvalidType$1<Input = unknown> extends $ZodIssueBase$1 {
|
|
1211
|
+
readonly code: "invalid_type";
|
|
1212
|
+
readonly expected: $ZodInvalidTypeExpected$1;
|
|
1213
|
+
readonly input?: Input;
|
|
1214
|
+
}
|
|
1215
|
+
interface $ZodIssueTooBig$1<Input = unknown> extends $ZodIssueBase$1 {
|
|
1216
|
+
readonly code: "too_big";
|
|
1217
|
+
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
1218
|
+
readonly maximum: number | bigint;
|
|
1219
|
+
readonly inclusive?: boolean;
|
|
1220
|
+
readonly exact?: boolean;
|
|
1221
|
+
readonly input?: Input;
|
|
1222
|
+
}
|
|
1223
|
+
interface $ZodIssueTooSmall$1<Input = unknown> extends $ZodIssueBase$1 {
|
|
1224
|
+
readonly code: "too_small";
|
|
1225
|
+
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
1226
|
+
readonly minimum: number | bigint;
|
|
1227
|
+
/** True if the allowable range includes the minimum */
|
|
1228
|
+
readonly inclusive?: boolean;
|
|
1229
|
+
/** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
|
|
1230
|
+
readonly exact?: boolean;
|
|
1231
|
+
readonly input?: Input;
|
|
1232
|
+
}
|
|
1233
|
+
interface $ZodIssueInvalidStringFormat$1 extends $ZodIssueBase$1 {
|
|
1234
|
+
readonly code: "invalid_format";
|
|
1235
|
+
readonly format: $ZodStringFormats$1 | (string & {});
|
|
1236
|
+
readonly pattern?: string;
|
|
1237
|
+
readonly input?: string;
|
|
1238
|
+
}
|
|
1239
|
+
interface $ZodIssueNotMultipleOf$1<Input extends number | bigint = number | bigint> extends $ZodIssueBase$1 {
|
|
1240
|
+
readonly code: "not_multiple_of";
|
|
1241
|
+
readonly divisor: number;
|
|
1242
|
+
readonly input?: Input;
|
|
1243
|
+
}
|
|
1244
|
+
interface $ZodIssueUnrecognizedKeys$1 extends $ZodIssueBase$1 {
|
|
1245
|
+
readonly code: "unrecognized_keys";
|
|
1246
|
+
readonly keys: string[];
|
|
1247
|
+
readonly input?: Record<string, unknown>;
|
|
1248
|
+
}
|
|
1249
|
+
interface $ZodIssueInvalidUnionNoMatch$1 extends $ZodIssueBase$1 {
|
|
1250
|
+
readonly code: "invalid_union";
|
|
1251
|
+
readonly errors: $ZodIssue$1[][];
|
|
1252
|
+
readonly input?: unknown;
|
|
1253
|
+
readonly discriminator?: string | undefined;
|
|
1254
|
+
readonly inclusive?: true;
|
|
1255
|
+
}
|
|
1256
|
+
interface $ZodIssueInvalidUnionMultipleMatch$1 extends $ZodIssueBase$1 {
|
|
1257
|
+
readonly code: "invalid_union";
|
|
1258
|
+
readonly errors: [];
|
|
1259
|
+
readonly input?: unknown;
|
|
1260
|
+
readonly discriminator?: string | undefined;
|
|
1261
|
+
readonly inclusive: false;
|
|
1262
|
+
}
|
|
1263
|
+
type $ZodIssueInvalidUnion$1 = $ZodIssueInvalidUnionNoMatch$1 | $ZodIssueInvalidUnionMultipleMatch$1;
|
|
1264
|
+
interface $ZodIssueInvalidKey$1<Input = unknown> extends $ZodIssueBase$1 {
|
|
1265
|
+
readonly code: "invalid_key";
|
|
1266
|
+
readonly origin: "map" | "record";
|
|
1267
|
+
readonly issues: $ZodIssue$1[];
|
|
1268
|
+
readonly input?: Input;
|
|
1269
|
+
}
|
|
1270
|
+
interface $ZodIssueInvalidElement$1<Input = unknown> extends $ZodIssueBase$1 {
|
|
1271
|
+
readonly code: "invalid_element";
|
|
1272
|
+
readonly origin: "map" | "set";
|
|
1273
|
+
readonly key: unknown;
|
|
1274
|
+
readonly issues: $ZodIssue$1[];
|
|
1275
|
+
readonly input?: Input;
|
|
1276
|
+
}
|
|
1277
|
+
interface $ZodIssueInvalidValue$1<Input = unknown> extends $ZodIssueBase$1 {
|
|
1278
|
+
readonly code: "invalid_value";
|
|
1279
|
+
readonly values: Primitive$1[];
|
|
1280
|
+
readonly input?: Input;
|
|
1281
|
+
}
|
|
1282
|
+
interface $ZodIssueCustom$1 extends $ZodIssueBase$1 {
|
|
1283
|
+
readonly code: "custom";
|
|
1284
|
+
readonly params?: Record<string, any> | undefined;
|
|
1285
|
+
readonly input?: unknown;
|
|
1286
|
+
}
|
|
1287
|
+
type $ZodIssue$1 = $ZodIssueInvalidType$1 | $ZodIssueTooBig$1 | $ZodIssueTooSmall$1 | $ZodIssueInvalidStringFormat$1 | $ZodIssueNotMultipleOf$1 | $ZodIssueUnrecognizedKeys$1 | $ZodIssueInvalidUnion$1 | $ZodIssueInvalidKey$1 | $ZodIssueInvalidElement$1 | $ZodIssueInvalidValue$1 | $ZodIssueCustom$1;
|
|
1288
|
+
type $ZodInternalIssue$1<T extends $ZodIssueBase$1 = $ZodIssue$1> = T extends any ? RawIssue$3<T> : never;
|
|
1289
|
+
type RawIssue$3<T extends $ZodIssueBase$1> = T extends any ? Flatten$1<MakePartial$1<T, "message" | "path"> & {
|
|
1290
|
+
/** The input data */readonly input: unknown; /** The schema or check that originated this issue. */
|
|
1291
|
+
readonly inst?: $ZodType$1 | $ZodCheck$1; /** If `true`, Zod will continue executing checks/refinements after this issue. */
|
|
1292
|
+
readonly continue?: boolean | undefined;
|
|
1293
|
+
} & Record<string, unknown>> : never;
|
|
1294
|
+
type $ZodRawIssue$1<T extends $ZodIssueBase$1 = $ZodIssue$1> = $ZodInternalIssue$1<T>;
|
|
1295
|
+
interface $ZodErrorMap$1<T extends $ZodIssueBase$1 = $ZodIssue$1> {
|
|
1296
|
+
(issue: $ZodRawIssue$1<T>): {
|
|
1297
|
+
message: string;
|
|
1298
|
+
} | string | undefined | null;
|
|
1299
|
+
}
|
|
1300
|
+
interface $ZodError$1<T = unknown> extends Error {
|
|
1301
|
+
type: T;
|
|
1302
|
+
issues: $ZodIssue$1[];
|
|
1303
|
+
_zod: {
|
|
1304
|
+
output: T;
|
|
1305
|
+
def: $ZodIssue$1[];
|
|
1306
|
+
};
|
|
1307
|
+
stack?: string;
|
|
1308
|
+
name: string;
|
|
1309
|
+
}
|
|
1310
|
+
declare const $ZodError$1: $constructor$1<$ZodError$1>;
|
|
1311
|
+
type $ZodFlattenedError$1<T, U = string> = _FlattenedError$1<T, U>;
|
|
1312
|
+
type _FlattenedError$1<T, U = string> = {
|
|
1313
|
+
formErrors: U[];
|
|
1314
|
+
fieldErrors: { [P in keyof T]?: U[] };
|
|
1315
|
+
};
|
|
1316
|
+
type _ZodFormattedError$1<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError$1<T[K], U> } : T extends any[] ? {
|
|
1317
|
+
[k: number]: $ZodFormattedError$1<T[number], U>;
|
|
1318
|
+
} : T extends object ? Flatten$1<{ [K in keyof T]?: $ZodFormattedError$1<T[K], U> }> : any;
|
|
1319
|
+
type $ZodFormattedError$1<T, U = string> = {
|
|
1320
|
+
_errors: U[];
|
|
1321
|
+
} & Flatten$1<_ZodFormattedError$1<T, U>>;
|
|
1322
|
+
//#endregion
|
|
1323
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.d.cts
|
|
1324
|
+
type ZodTrait$1 = {
|
|
1325
|
+
_zod: {
|
|
1326
|
+
def: any;
|
|
1327
|
+
[k: string]: any;
|
|
1328
|
+
};
|
|
1329
|
+
};
|
|
1330
|
+
interface $constructor$1<T extends ZodTrait$1, D = T["_zod"]["def"]> {
|
|
1331
|
+
new (def: D): T;
|
|
1332
|
+
init(inst: T, def: D): asserts inst is T;
|
|
1333
|
+
}
|
|
1334
|
+
declare function $constructor$1<T extends ZodTrait$1, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
|
|
1335
|
+
Parent?: typeof Class$1;
|
|
1336
|
+
}): $constructor$1<T, D>;
|
|
1337
|
+
declare const $brand$1: unique symbol;
|
|
1338
|
+
type $brand$1<T extends string | number | symbol = string | number | symbol> = {
|
|
1339
|
+
[$brand$1]: { [k in T]: true };
|
|
1340
|
+
};
|
|
1341
|
+
type $ZodBranded$1<T extends SomeType$1, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T & (Dir extends "inout" ? {
|
|
1342
|
+
_zod: {
|
|
1343
|
+
input: input$1<T> & $brand$1<Brand>;
|
|
1344
|
+
output: output$1<T> & $brand$1<Brand>;
|
|
1345
|
+
};
|
|
1346
|
+
} : Dir extends "in" ? {
|
|
1347
|
+
_zod: {
|
|
1348
|
+
input: input$1<T> & $brand$1<Brand>;
|
|
1349
|
+
};
|
|
1350
|
+
} : {
|
|
1351
|
+
_zod: {
|
|
1352
|
+
output: output$1<T> & $brand$1<Brand>;
|
|
1353
|
+
};
|
|
1354
|
+
});
|
|
1355
|
+
type input$1<T> = T extends {
|
|
1356
|
+
_zod: {
|
|
1357
|
+
input: any;
|
|
1358
|
+
};
|
|
1359
|
+
} ? T["_zod"]["input"] : unknown;
|
|
1360
|
+
type output$1<T> = T extends {
|
|
1361
|
+
_zod: {
|
|
1362
|
+
output: any;
|
|
1363
|
+
};
|
|
1364
|
+
} ? T["_zod"]["output"] : unknown;
|
|
1365
|
+
//#endregion
|
|
1366
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.d.cts
|
|
1367
|
+
type Params$1<T extends $ZodType$1 | $ZodCheck$1, IssueTypes extends $ZodIssueBase$1, OmitKeys extends keyof T["_zod"]["def"] = never> = Flatten$1<Partial<EmptyToNever$1<Omit<T["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
|
|
1368
|
+
error?: string | $ZodErrorMap$1<IssueTypes> | undefined; /** @deprecated This parameter is deprecated. Use `error` instead. */
|
|
1369
|
+
message?: string | undefined;
|
|
1370
|
+
})>>>;
|
|
1371
|
+
type TypeParams$1<T extends $ZodType$1 = $ZodType$1 & {
|
|
1372
|
+
_isst: never;
|
|
1373
|
+
}, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params$1<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
|
|
1374
|
+
type CheckParams$1<T extends $ZodCheck$1 = $ZodCheck$1, // & { _issc: never },
|
|
1375
|
+
AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params$1<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
|
|
1376
|
+
type CheckTypeParams$1<T extends $ZodType$1 & $ZodCheck$1 = $ZodType$1 & $ZodCheck$1, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error" | "check"> = never> = Params$1<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "checks" | "error" | "check" | AlsoOmit>;
|
|
1377
|
+
type $ZodCheckMaxLengthParams$1 = CheckParams$1<$ZodCheckMaxLength$1, "maximum" | "when">;
|
|
1378
|
+
type $ZodCheckMinLengthParams$1 = CheckParams$1<$ZodCheckMinLength$1, "minimum" | "when">;
|
|
1379
|
+
type $ZodCheckLengthEqualsParams$1 = CheckParams$1<$ZodCheckLengthEquals$1, "length" | "when">;
|
|
1380
|
+
type $ZodEnumParams$1 = TypeParams$1<$ZodEnum$1, "entries">;
|
|
1381
|
+
type $ZodNonOptionalParams$1 = TypeParams$1<$ZodNonOptional$1, "innerType">;
|
|
1382
|
+
type $ZodCustomParams$1 = CheckTypeParams$1<$ZodCustom$1, "fn">;
|
|
1383
|
+
type $ZodSuperRefineIssue$1<T extends $ZodIssueBase$1 = $ZodIssue$1> = T extends any ? RawIssue$2<T> : never;
|
|
1384
|
+
type RawIssue$2<T extends $ZodIssueBase$1> = T extends any ? Flatten$1<MakePartial$1<T, "message" | "path"> & {
|
|
1385
|
+
/** The schema or check that originated this issue. */readonly inst?: $ZodType$1 | $ZodCheck$1; /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
|
|
1386
|
+
readonly continue?: boolean | undefined;
|
|
1387
|
+
} & Record<string, unknown>> : never;
|
|
1388
|
+
interface $RefinementCtx$1<T = unknown> extends ParsePayload$1<T> {
|
|
1389
|
+
addIssue(arg: string | $ZodSuperRefineIssue$1): void;
|
|
1390
|
+
}
|
|
1391
|
+
//#endregion
|
|
1392
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/errors.d.cts
|
|
1393
|
+
/** An Error-like class used to store Zod validation issues. */
|
|
1394
|
+
interface ZodError$1<T = unknown> extends $ZodError$1<T> {
|
|
1395
|
+
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
1396
|
+
format(): $ZodFormattedError$1<T>;
|
|
1397
|
+
format<U>(mapper: (issue: $ZodIssue$1) => U): $ZodFormattedError$1<T, U>;
|
|
1398
|
+
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
1399
|
+
flatten(): $ZodFlattenedError$1<T>;
|
|
1400
|
+
flatten<U>(mapper: (issue: $ZodIssue$1) => U): $ZodFlattenedError$1<T, U>;
|
|
1401
|
+
/** @deprecated Push directly to `.issues` instead. */
|
|
1402
|
+
addIssue(issue: $ZodIssue$1): void;
|
|
1403
|
+
/** @deprecated Push directly to `.issues` instead. */
|
|
1404
|
+
addIssues(issues: $ZodIssue$1[]): void;
|
|
1405
|
+
/** @deprecated Check `err.issues.length === 0` instead. */
|
|
1406
|
+
isEmpty: boolean;
|
|
1407
|
+
}
|
|
1408
|
+
declare const ZodError$1: $constructor$1<ZodError$1>;
|
|
1409
|
+
//#endregion
|
|
1410
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/parse.d.cts
|
|
1411
|
+
type ZodSafeParseResult$1<T> = ZodSafeParseSuccess$1<T> | ZodSafeParseError$1<T>;
|
|
1412
|
+
type ZodSafeParseSuccess$1<T> = {
|
|
1413
|
+
success: true;
|
|
1414
|
+
data: T;
|
|
1415
|
+
error?: never;
|
|
1416
|
+
};
|
|
1417
|
+
type ZodSafeParseError$1<T> = {
|
|
1418
|
+
success: false;
|
|
1419
|
+
data?: never;
|
|
1420
|
+
error: ZodError$1<T>;
|
|
1421
|
+
};
|
|
1422
|
+
//#endregion
|
|
1423
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.d.cts
|
|
1424
|
+
type ZodStandardSchemaWithJSON$2<T> = StandardSchemaWithJSONProps$1<input$1<T>, output$1<T>>;
|
|
1425
|
+
interface ZodType$1<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals$1<Output, Input> = $ZodTypeInternals$1<Output, Input>> extends $ZodType$1<Output, Input, Internals> {
|
|
1426
|
+
def: Internals["def"];
|
|
1427
|
+
type: Internals["def"]["type"];
|
|
1428
|
+
/** @deprecated Use `.def` instead. */
|
|
1429
|
+
_def: Internals["def"];
|
|
1430
|
+
/** @deprecated Use `z.output<typeof schema>` instead. */
|
|
1431
|
+
_output: Internals["output"];
|
|
1432
|
+
/** @deprecated Use `z.input<typeof schema>` instead. */
|
|
1433
|
+
_input: Internals["input"];
|
|
1434
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1435
|
+
/** Converts this schema to a JSON Schema representation. */
|
|
1436
|
+
toJSONSchema(params?: ToJSONSchemaParams$1): ZodStandardJSONSchemaPayload$1<this>;
|
|
1437
|
+
check(...checks: (CheckFn$1<output$1<this>> | $ZodCheck$1<output$1<this>>)[]): this;
|
|
1438
|
+
with(...checks: (CheckFn$1<output$1<this>> | $ZodCheck$1<output$1<this>>)[]): this;
|
|
1439
|
+
clone(def?: Internals["def"], params?: {
|
|
1440
|
+
parent: boolean;
|
|
1441
|
+
}): this;
|
|
1442
|
+
register<R extends $ZodRegistry$1>(registry: R, ...meta: this extends R["_schema"] ? undefined extends R["_meta"] ? [$replace$1<R["_meta"], this>?] : [$replace$1<R["_meta"], this>] : ["Incompatible schema"]): this;
|
|
1443
|
+
brand<T extends PropertyKey = PropertyKey, Dir extends "in" | "out" | "inout" = "out">(value?: T): PropertyKey extends T ? this : $ZodBranded$1<this, T, Dir>;
|
|
1444
|
+
parse(data: unknown, params?: ParseContext$1<$ZodIssue$1>): output$1<this>;
|
|
1445
|
+
safeParse(data: unknown, params?: ParseContext$1<$ZodIssue$1>): ZodSafeParseResult$1<output$1<this>>;
|
|
1446
|
+
parseAsync(data: unknown, params?: ParseContext$1<$ZodIssue$1>): Promise<output$1<this>>;
|
|
1447
|
+
safeParseAsync(data: unknown, params?: ParseContext$1<$ZodIssue$1>): Promise<ZodSafeParseResult$1<output$1<this>>>;
|
|
1448
|
+
spa: (data: unknown, params?: ParseContext$1<$ZodIssue$1>) => Promise<ZodSafeParseResult$1<output$1<this>>>;
|
|
1449
|
+
encode(data: output$1<this>, params?: ParseContext$1<$ZodIssue$1>): input$1<this>;
|
|
1450
|
+
decode(data: input$1<this>, params?: ParseContext$1<$ZodIssue$1>): output$1<this>;
|
|
1451
|
+
encodeAsync(data: output$1<this>, params?: ParseContext$1<$ZodIssue$1>): Promise<input$1<this>>;
|
|
1452
|
+
decodeAsync(data: input$1<this>, params?: ParseContext$1<$ZodIssue$1>): Promise<output$1<this>>;
|
|
1453
|
+
safeEncode(data: output$1<this>, params?: ParseContext$1<$ZodIssue$1>): ZodSafeParseResult$1<input$1<this>>;
|
|
1454
|
+
safeDecode(data: input$1<this>, params?: ParseContext$1<$ZodIssue$1>): ZodSafeParseResult$1<output$1<this>>;
|
|
1455
|
+
safeEncodeAsync(data: output$1<this>, params?: ParseContext$1<$ZodIssue$1>): Promise<ZodSafeParseResult$1<input$1<this>>>;
|
|
1456
|
+
safeDecodeAsync(data: input$1<this>, params?: ParseContext$1<$ZodIssue$1>): Promise<ZodSafeParseResult$1<output$1<this>>>;
|
|
1457
|
+
refine<Ch extends (arg: output$1<this>) => unknown | Promise<unknown>>(check: Ch, params?: string | $ZodCustomParams$1): Ch extends ((arg: any) => arg is infer R) ? this & ZodType$1<R, input$1<this>> : this;
|
|
1458
|
+
superRefine(refinement: (arg: output$1<this>, ctx: $RefinementCtx$1<output$1<this>>) => void | Promise<void>): this;
|
|
1459
|
+
overwrite(fn: (x: output$1<this>) => output$1<this>): this;
|
|
1460
|
+
optional(): ZodOptional$1<this>;
|
|
1461
|
+
exactOptional(): ZodExactOptional$1<this>;
|
|
1462
|
+
nonoptional(params?: string | $ZodNonOptionalParams$1): ZodNonOptional$1<this>;
|
|
1463
|
+
nullable(): ZodNullable$1<this>;
|
|
1464
|
+
nullish(): ZodOptional$1<ZodNullable$1<this>>;
|
|
1465
|
+
default(def: NoUndefined$1<output$1<this>>): ZodDefault$1<this>;
|
|
1466
|
+
default(def: () => NoUndefined$1<output$1<this>>): ZodDefault$1<this>;
|
|
1467
|
+
prefault(def: () => input$1<this>): ZodPrefault$1<this>;
|
|
1468
|
+
prefault(def: input$1<this>): ZodPrefault$1<this>;
|
|
1469
|
+
array(): ZodArray$1<this>;
|
|
1470
|
+
or<T extends SomeType$1>(option: T): ZodUnion$1<[this, T]>;
|
|
1471
|
+
and<T extends SomeType$1>(incoming: T): ZodIntersection$1<this, T>;
|
|
1472
|
+
transform<NewOut>(transform: (arg: output$1<this>, ctx: $RefinementCtx$1<output$1<this>>) => NewOut | Promise<NewOut>): ZodPipe$1<this, ZodTransform$1<Awaited<NewOut>, output$1<this>>>;
|
|
1473
|
+
catch(def: output$1<this>): ZodCatch$1<this>;
|
|
1474
|
+
catch(def: (ctx: $ZodCatchCtx$1) => output$1<this>): ZodCatch$1<this>;
|
|
1475
|
+
pipe<T extends $ZodType$1<any, output$1<this>>>(target: T | $ZodType$1<any, output$1<this>>): ZodPipe$1<this, T>;
|
|
1476
|
+
readonly(): ZodReadonly$1<this>;
|
|
1477
|
+
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
|
|
1478
|
+
describe(description: string): this;
|
|
1479
|
+
description?: string;
|
|
1480
|
+
/** Returns the metadata associated with this instance in `z.globalRegistry` */
|
|
1481
|
+
meta(): $replace$1<GlobalMeta$1, this> | undefined;
|
|
1482
|
+
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
|
|
1483
|
+
meta(data: $replace$1<GlobalMeta$1, this>): this;
|
|
1484
|
+
/** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
|
|
1485
|
+
*
|
|
1486
|
+
* ```ts
|
|
1487
|
+
* const schema = z.string().optional();
|
|
1488
|
+
* const isOptional = schema.safeParse(undefined).success; // true
|
|
1489
|
+
* ```
|
|
1490
|
+
*/
|
|
1491
|
+
isOptional(): boolean;
|
|
1492
|
+
/**
|
|
1493
|
+
* @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
|
|
1494
|
+
*
|
|
1495
|
+
* ```ts
|
|
1496
|
+
* const schema = z.string().nullable();
|
|
1497
|
+
* const isNullable = schema.safeParse(null).success; // true
|
|
1498
|
+
* ```
|
|
1499
|
+
*/
|
|
1500
|
+
isNullable(): boolean;
|
|
1501
|
+
apply<T>(fn: (schema: this) => T): T;
|
|
1502
|
+
}
|
|
1503
|
+
interface _ZodType$1<out Internals extends $ZodTypeInternals$1 = $ZodTypeInternals$1> extends ZodType$1<any, any, Internals> {}
|
|
1504
|
+
declare const ZodType$1: $constructor$1<ZodType$1>;
|
|
1505
|
+
interface ZodArray$1<T extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodArrayInternals$1<T>>, $ZodArray$1<T> {
|
|
1506
|
+
element: T;
|
|
1507
|
+
min(minLength: number, params?: string | $ZodCheckMinLengthParams$1): this;
|
|
1508
|
+
nonempty(params?: string | $ZodCheckMinLengthParams$1): this;
|
|
1509
|
+
max(maxLength: number, params?: string | $ZodCheckMaxLengthParams$1): this;
|
|
1510
|
+
length(len: number, params?: string | $ZodCheckLengthEqualsParams$1): this;
|
|
1511
|
+
unwrap(): T;
|
|
1512
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1513
|
+
}
|
|
1514
|
+
declare const ZodArray$1: $constructor$1<ZodArray$1>;
|
|
1515
|
+
type SafeExtendShape$1<Base extends $ZodShape$1, Ext extends $ZodLooseShape$1> = { [K in keyof Ext]: K extends keyof Base ? output$1<Ext[K]> extends output$1<Base[K]> ? input$1<Ext[K]> extends input$1<Base[K]> ? Ext[K] : never : never : Ext[K] };
|
|
1516
|
+
interface ZodObject$1< /** @ts-ignore Cast variance */out Shape extends $ZodShape$1 = $ZodLooseShape$1, out Config extends $ZodObjectConfig$1 = $strip$1> extends _ZodType$1<$ZodObjectInternals$1<Shape, Config>>, $ZodObject$1<Shape, Config> {
|
|
1517
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1518
|
+
shape: Shape;
|
|
1519
|
+
keyof(): ZodEnum$1<ToEnum$1<keyof Shape & string>>;
|
|
1520
|
+
/** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
|
|
1521
|
+
catchall<T extends SomeType$1>(schema: T): ZodObject$1<Shape, $catchall$1<T>>;
|
|
1522
|
+
/** @deprecated Use `z.looseObject()` or `.loose()` instead. */
|
|
1523
|
+
passthrough(): ZodObject$1<Shape, $loose$1>;
|
|
1524
|
+
/** Consider `z.looseObject(A.shape)` instead */
|
|
1525
|
+
loose(): ZodObject$1<Shape, $loose$1>;
|
|
1526
|
+
/** Consider `z.strictObject(A.shape)` instead */
|
|
1527
|
+
strict(): ZodObject$1<Shape, $strict$1>;
|
|
1528
|
+
/** This is the default behavior. This method call is likely unnecessary. */
|
|
1529
|
+
strip(): ZodObject$1<Shape, $strip$1>;
|
|
1530
|
+
extend<U extends $ZodLooseShape$1>(shape: U): ZodObject$1<Extend$1<Shape, U>, Config>;
|
|
1531
|
+
safeExtend<U extends $ZodLooseShape$1>(shape: SafeExtendShape$1<Shape, U> & Partial<Record<keyof Shape, SomeType$1>>): ZodObject$1<Extend$1<Shape, U>, Config>;
|
|
1532
|
+
/**
|
|
1533
|
+
* @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
|
|
1534
|
+
*/
|
|
1535
|
+
merge<U extends ZodObject$1>(other: U): ZodObject$1<Extend$1<Shape, U["shape"]>, U["_zod"]["config"]>;
|
|
1536
|
+
pick<M extends Mask$1<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject$1<Flatten$1<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
|
|
1537
|
+
omit<M extends Mask$1<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject$1<Flatten$1<Omit<Shape, Extract<keyof Shape, keyof M>>>, Config>;
|
|
1538
|
+
partial(): ZodObject$1<{ [k in keyof Shape]: ZodOptional$1<Shape[k]> }, Config>;
|
|
1539
|
+
partial<M extends Mask$1<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject$1<{ [k in keyof Shape]: k extends keyof M ? ZodOptional$1<Shape[k]> : Shape[k] }, Config>;
|
|
1540
|
+
required(): ZodObject$1<{ [k in keyof Shape]: ZodNonOptional$1<Shape[k]> }, Config>;
|
|
1541
|
+
required<M extends Mask$1<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject$1<{ [k in keyof Shape]: k extends keyof M ? ZodNonOptional$1<Shape[k]> : Shape[k] }, Config>;
|
|
1542
|
+
}
|
|
1543
|
+
declare const ZodObject$1: $constructor$1<ZodObject$1>;
|
|
1544
|
+
interface ZodUnion$1<T extends readonly SomeType$1[] = readonly $ZodType$1[]> extends _ZodType$1<$ZodUnionInternals$1<T>>, $ZodUnion$1<T> {
|
|
1545
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1546
|
+
options: T;
|
|
1547
|
+
}
|
|
1548
|
+
declare const ZodUnion$1: $constructor$1<ZodUnion$1>;
|
|
1549
|
+
interface ZodIntersection$1<A extends SomeType$1 = $ZodType$1, B extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodIntersectionInternals$1<A, B>>, $ZodIntersection$1<A, B> {
|
|
1550
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1551
|
+
}
|
|
1552
|
+
declare const ZodIntersection$1: $constructor$1<ZodIntersection$1>;
|
|
1553
|
+
interface ZodEnum$1< /** @ts-ignore Cast variance */out T extends EnumLike$1 = EnumLike$1> extends _ZodType$1<$ZodEnumInternals$1<T>>, $ZodEnum$1<T> {
|
|
1554
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1555
|
+
enum: T;
|
|
1556
|
+
options: Array<T[keyof T]>;
|
|
1557
|
+
extract<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams$1): ZodEnum$1<Flatten$1<Pick<T, U[number]>>>;
|
|
1558
|
+
exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams$1): ZodEnum$1<Flatten$1<Omit<T, U[number]>>>;
|
|
1559
|
+
}
|
|
1560
|
+
declare const ZodEnum$1: $constructor$1<ZodEnum$1>;
|
|
1561
|
+
interface ZodTransform$1<O = unknown, I = unknown> extends _ZodType$1<$ZodTransformInternals$1<O, I>>, $ZodTransform$1<O, I> {
|
|
1562
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1563
|
+
}
|
|
1564
|
+
declare const ZodTransform$1: $constructor$1<ZodTransform$1>;
|
|
1565
|
+
interface ZodOptional$1<T extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodOptionalInternals$1<T>>, $ZodOptional$1<T> {
|
|
1566
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1567
|
+
unwrap(): T;
|
|
1568
|
+
}
|
|
1569
|
+
declare const ZodOptional$1: $constructor$1<ZodOptional$1>;
|
|
1570
|
+
interface ZodExactOptional$1<T extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodExactOptionalInternals$1<T>>, $ZodExactOptional$1<T> {
|
|
1571
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1572
|
+
unwrap(): T;
|
|
1573
|
+
}
|
|
1574
|
+
declare const ZodExactOptional$1: $constructor$1<ZodExactOptional$1>;
|
|
1575
|
+
interface ZodNullable$1<T extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodNullableInternals$1<T>>, $ZodNullable$1<T> {
|
|
1576
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1577
|
+
unwrap(): T;
|
|
1578
|
+
}
|
|
1579
|
+
declare const ZodNullable$1: $constructor$1<ZodNullable$1>;
|
|
1580
|
+
interface ZodDefault$1<T extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodDefaultInternals$1<T>>, $ZodDefault$1<T> {
|
|
1581
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1582
|
+
unwrap(): T;
|
|
1583
|
+
/** @deprecated Use `.unwrap()` instead. */
|
|
1584
|
+
removeDefault(): T;
|
|
1585
|
+
}
|
|
1586
|
+
declare const ZodDefault$1: $constructor$1<ZodDefault$1>;
|
|
1587
|
+
interface ZodPrefault$1<T extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodPrefaultInternals$1<T>>, $ZodPrefault$1<T> {
|
|
1588
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1589
|
+
unwrap(): T;
|
|
1590
|
+
}
|
|
1591
|
+
declare const ZodPrefault$1: $constructor$1<ZodPrefault$1>;
|
|
1592
|
+
interface ZodNonOptional$1<T extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodNonOptionalInternals$1<T>>, $ZodNonOptional$1<T> {
|
|
1593
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1594
|
+
unwrap(): T;
|
|
1595
|
+
}
|
|
1596
|
+
declare const ZodNonOptional$1: $constructor$1<ZodNonOptional$1>;
|
|
1597
|
+
interface ZodCatch$1<T extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodCatchInternals$1<T>>, $ZodCatch$1<T> {
|
|
1598
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1599
|
+
unwrap(): T;
|
|
1600
|
+
/** @deprecated Use `.unwrap()` instead. */
|
|
1601
|
+
removeCatch(): T;
|
|
1602
|
+
}
|
|
1603
|
+
declare const ZodCatch$1: $constructor$1<ZodCatch$1>;
|
|
1604
|
+
interface ZodPipe$1<A extends SomeType$1 = $ZodType$1, B extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodPipeInternals$1<A, B>>, $ZodPipe$1<A, B> {
|
|
1605
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1606
|
+
in: A;
|
|
1607
|
+
out: B;
|
|
1608
|
+
}
|
|
1609
|
+
declare const ZodPipe$1: $constructor$1<ZodPipe$1>;
|
|
1610
|
+
interface ZodReadonly$1<T extends SomeType$1 = $ZodType$1> extends _ZodType$1<$ZodReadonlyInternals$1<T>>, $ZodReadonly$1<T> {
|
|
1611
|
+
"~standard": ZodStandardSchemaWithJSON$2<this>;
|
|
1612
|
+
unwrap(): T;
|
|
1613
|
+
}
|
|
1614
|
+
declare const ZodReadonly$1: $constructor$1<ZodReadonly$1>;
|
|
1615
|
+
//#endregion
|
|
1616
|
+
//#region ../loader-types/dist/index.d.mts
|
|
1617
|
+
//#region src/index.d.ts
|
|
1618
|
+
/**
|
|
1619
|
+
* Configuration options for initializing the Plucky chat widget.
|
|
1620
|
+
*
|
|
1621
|
+
* Pass this object to {@link Plucky} (chat-sdk) or {@link useChat} (React)
|
|
1622
|
+
* to embed the widget on the page.
|
|
1623
|
+
*
|
|
1624
|
+
* @example
|
|
1625
|
+
* ```ts
|
|
1626
|
+
* Plucky({
|
|
1627
|
+
* appId: 'my-app-id',
|
|
1628
|
+
* baseUrl: 'https://widget.plucky.ai',
|
|
1629
|
+
* user: { id: 'user-123', name: 'Jane Doe', email: 'jane@example.com' },
|
|
1630
|
+
* mode: 'push',
|
|
1631
|
+
* autoOpen: false,
|
|
1632
|
+
* })
|
|
1633
|
+
* ```
|
|
1634
|
+
*/
|
|
1635
|
+
type PluckySettingsParams = {
|
|
1636
|
+
/**
|
|
1637
|
+
* Base URL of the Plucky widget server (e.g., `'https://widget.plucky.ai'`).
|
|
1638
|
+
* The loader script and widget iframe are served from this origin.
|
|
1639
|
+
*/
|
|
1640
|
+
baseUrl: string;
|
|
1641
|
+
/**
|
|
1642
|
+
* Unique identifier for your Plucky app, obtained from the Plucky dashboard.
|
|
1643
|
+
*/
|
|
1644
|
+
appId: string;
|
|
1645
|
+
/**
|
|
1646
|
+
* Optional user identification and metadata. When provided, the widget
|
|
1647
|
+
* associates conversations with this user and displays their name/email
|
|
1648
|
+
* in the dashboard.
|
|
1649
|
+
*
|
|
1650
|
+
* @example
|
|
1651
|
+
* ```ts
|
|
1652
|
+
* user: {
|
|
1653
|
+
* id: 'user-123',
|
|
1654
|
+
* name: 'Jane Doe',
|
|
1655
|
+
* email: 'jane@example.com',
|
|
1656
|
+
* createdAt: '2024-01-15T00:00:00Z',
|
|
1657
|
+
* metadata: { plan: 'pro', company: 'Acme' },
|
|
1658
|
+
* }
|
|
1659
|
+
* ```
|
|
1660
|
+
*/
|
|
1661
|
+
user?: {
|
|
1662
|
+
/** Unique identifier for the user in your system. */id: string; /** Display name shown in the Plucky dashboard. */
|
|
1663
|
+
name?: string; /** Email address shown in the Plucky dashboard. */
|
|
1664
|
+
email?: string;
|
|
1665
|
+
/**
|
|
1666
|
+
* ISO 8601 timestamp of when the user was created in your system.
|
|
1667
|
+
* Used for analytics and segmentation in the dashboard.
|
|
1668
|
+
*/
|
|
1669
|
+
createdAt?: string;
|
|
1670
|
+
/**
|
|
1671
|
+
* Arbitrary key-value metadata attached to the user.
|
|
1672
|
+
* Visible in the Plucky dashboard and can be used for filtering.
|
|
1673
|
+
*/
|
|
1674
|
+
metadata?: Record<string, any>;
|
|
1675
|
+
};
|
|
1676
|
+
/**
|
|
1677
|
+
* Built-in system tools to enable for the AI assistant.
|
|
1678
|
+
*
|
|
1679
|
+
* @example
|
|
1680
|
+
* ```ts
|
|
1681
|
+
* systemTools: { readPage: true }
|
|
1682
|
+
* ```
|
|
1683
|
+
*/
|
|
1684
|
+
systemTools?: {
|
|
1685
|
+
/**
|
|
1686
|
+
* When `true`, enables the `readPage` system tool that allows the AI
|
|
1687
|
+
* assistant to read the content of the current page. Defaults to `false`.
|
|
1688
|
+
*/
|
|
1689
|
+
readPage?: boolean;
|
|
1690
|
+
};
|
|
1691
|
+
/**
|
|
1692
|
+
* Display mode for the widget.
|
|
1693
|
+
* - `'push'` (default) — fixed sidebar that pushes page content.
|
|
1694
|
+
* - `'overlay'` — fixed sidebar that overlays page content.
|
|
1695
|
+
* - `'inline'` — widget is mounted inside a container element specified by {@link containerId}.
|
|
1696
|
+
*/
|
|
1697
|
+
mode?: 'push' | 'overlay' | 'inline';
|
|
1698
|
+
/**
|
|
1699
|
+
* The `id` of the container element to mount the widget into.
|
|
1700
|
+
* Required when `mode` is `'inline'`. The element must exist in the DOM
|
|
1701
|
+
* before calling init / mounting the widget.
|
|
1702
|
+
*/
|
|
1703
|
+
containerId?: string;
|
|
1704
|
+
/**
|
|
1705
|
+
* Whether to auto-open the widget when it loads. Defaults to `true`.
|
|
1706
|
+
* Set to `false` to start with the widget closed.
|
|
1707
|
+
*/
|
|
1708
|
+
autoOpen?: boolean;
|
|
1709
|
+
/**
|
|
1710
|
+
* Whether to show a floating trigger button in the bottom-right corner.
|
|
1711
|
+
* When clicked, the trigger button toggles the widget open/closed.
|
|
1712
|
+
* Defaults to `false`.
|
|
1713
|
+
*/
|
|
1714
|
+
triggerButton?: boolean;
|
|
1715
|
+
/**
|
|
1716
|
+
* URL patterns the widget should be **visible** on.
|
|
1717
|
+
* Uses Chrome-style match patterns (e.g. `'https://*.example.com/app/*'`).
|
|
1718
|
+
* When omitted or empty, every page is included by default.
|
|
1719
|
+
* If a URL matches both `include` and `exclude`, `exclude` wins.
|
|
1720
|
+
*/
|
|
1721
|
+
include?: string[];
|
|
1722
|
+
/**
|
|
1723
|
+
* URL patterns the widget should be **hidden** on.
|
|
1724
|
+
* Uses Chrome-style match patterns (e.g. `'https://example.com/login'`).
|
|
1725
|
+
* Takes priority over `include` — if a URL matches both, it is excluded.
|
|
1726
|
+
* The widget stays mounted but is hidden on excluded pages.
|
|
1727
|
+
*/
|
|
1728
|
+
exclude?: string[];
|
|
1729
|
+
};
|
|
1730
|
+
/**
|
|
1731
|
+
* Serializable subset of a tool definition sent across the iframe boundary.
|
|
1732
|
+
* This does not include the callback — only metadata used by the widget
|
|
1733
|
+
* to display tool information and validate inputs.
|
|
1734
|
+
*
|
|
1735
|
+
* @see {@link ToolConfig} for the full tool definition including the callback.
|
|
1736
|
+
*/
|
|
1737
|
+
interface SimpleToolConfig$1 {
|
|
1738
|
+
/** Unique name for the tool (e.g., `'getWeather'`). Must be unique across all registered tools. */
|
|
1739
|
+
name: string;
|
|
1740
|
+
/** Human-readable description of what the tool does. Shown to the AI assistant to help it decide when to use the tool. */
|
|
1741
|
+
description: string;
|
|
1742
|
+
/**
|
|
1743
|
+
* Text displayed in the chat while the tool is executing.
|
|
1744
|
+
* Set to `null` to suppress the loading indicator entirely.
|
|
1745
|
+
* @default undefined (uses the widget's default loading text)
|
|
1746
|
+
*/
|
|
1747
|
+
defaultLoadingText?: string | null;
|
|
1748
|
+
/**
|
|
1749
|
+
* Text displayed in the chat after the tool completes successfully.
|
|
1750
|
+
* Set to `null` to suppress the success message entirely.
|
|
1751
|
+
* Can be overridden per-invocation by returning `{ content, successText }` from the callback.
|
|
1752
|
+
* @default undefined (uses the widget's default success text)
|
|
1753
|
+
*/
|
|
1754
|
+
defaultSuccessText?: string | null;
|
|
1755
|
+
/**
|
|
1756
|
+
* JSON Schema or Zod object schema describing the tool's expected input.
|
|
1757
|
+
* When a Zod schema is provided, it is automatically converted to JSON Schema
|
|
1758
|
+
* before being sent to the AI model.
|
|
1759
|
+
*
|
|
1760
|
+
* @example
|
|
1761
|
+
* ```ts
|
|
1762
|
+
* import { z } from 'zod'
|
|
1763
|
+
*
|
|
1764
|
+
* inputSchema: z.object({
|
|
1765
|
+
* city: z.string().describe('City name to look up'),
|
|
1766
|
+
* units: z.enum(['celsius', 'fahrenheit']).optional(),
|
|
1767
|
+
* })
|
|
1768
|
+
* ```
|
|
1769
|
+
*/
|
|
1770
|
+
inputSchema?: ZodObject$1 | Record<string, unknown>;
|
|
1771
|
+
}
|
|
1772
|
+
type InferToolInput<T extends ZodObject$1<any> | Record<string, unknown> | undefined> = T extends ZodObject$1<any> ? output$1<T> : Record<string, unknown>;
|
|
1773
|
+
/**
|
|
1774
|
+
* Return type for a tool callback. Either a plain string (used as the tool
|
|
1775
|
+
* result content) or an object with `content` and an optional `successText`
|
|
1776
|
+
* override.
|
|
1777
|
+
*
|
|
1778
|
+
* @example
|
|
1779
|
+
* ```ts
|
|
1780
|
+
* // Simple string result
|
|
1781
|
+
* cb: async ({ city }) => `The weather in ${city} is sunny.`
|
|
1782
|
+
*
|
|
1783
|
+
* // Object result with custom success text
|
|
1784
|
+
* cb: async ({ city }) => ({
|
|
1785
|
+
* content: JSON.stringify({ temp: 72, condition: 'sunny' }),
|
|
1786
|
+
* successText: `Fetched weather for ${city}`,
|
|
1787
|
+
* })
|
|
1788
|
+
* ```
|
|
1789
|
+
*/
|
|
1790
|
+
type ToolCallbackResult = string | {
|
|
1791
|
+
/** The content returned to the AI assistant as the tool result. */content: string; /** Optional override for the success text displayed in the chat UI after the tool completes. */
|
|
1792
|
+
successText?: string;
|
|
1793
|
+
};
|
|
1794
|
+
/**
|
|
1795
|
+
* Full tool definition including the callback function.
|
|
1796
|
+
*
|
|
1797
|
+
* Register tools with {@link addTools} (chat-sdk) or {@link useTools} (React)
|
|
1798
|
+
* to let the AI assistant invoke custom functions on the host page.
|
|
1799
|
+
*
|
|
1800
|
+
* @typeParam TInputSchema - The type of the input schema (Zod object or plain JSON Schema).
|
|
1801
|
+
* When a Zod schema is provided, the callback `input` parameter is automatically
|
|
1802
|
+
* inferred from it.
|
|
1803
|
+
*
|
|
1804
|
+
* @example
|
|
1805
|
+
* ```ts
|
|
1806
|
+
* import { z } from 'zod'
|
|
1807
|
+
*
|
|
1808
|
+
* const weatherTool: ToolConfig = {
|
|
1809
|
+
* name: 'getWeather',
|
|
1810
|
+
* description: 'Fetches current weather for a city',
|
|
1811
|
+
* inputSchema: z.object({
|
|
1812
|
+
* city: z.string().describe('City name'),
|
|
1813
|
+
* }),
|
|
1814
|
+
* cb: async ({ city }) => `The weather in ${city} is sunny.`,
|
|
1815
|
+
* }
|
|
1816
|
+
* ```
|
|
1817
|
+
*/
|
|
1818
|
+
interface ToolConfig<TInputSchema extends ZodObject$1<any> | Record<string, unknown> | undefined = any> extends Omit<SimpleToolConfig$1, 'inputSchema'> {
|
|
1819
|
+
/**
|
|
1820
|
+
* JSON Schema or Zod object schema describing the tool's expected input.
|
|
1821
|
+
* When a Zod schema is provided, the `cb` parameter type is automatically inferred.
|
|
1822
|
+
*/
|
|
1823
|
+
inputSchema?: TInputSchema;
|
|
1824
|
+
/**
|
|
1825
|
+
* Callback executed when the AI assistant invokes this tool.
|
|
1826
|
+
* Receives the parsed input (typed from `inputSchema` if using Zod) and
|
|
1827
|
+
* must return a {@link ToolCallbackResult}.
|
|
1828
|
+
*
|
|
1829
|
+
* @param input - The input arguments passed by the AI assistant, validated against `inputSchema`.
|
|
1830
|
+
* @returns The tool result — either a string or `{ content, successText }`.
|
|
1831
|
+
*/
|
|
1832
|
+
cb?: (input: InferToolInput<TInputSchema>) => Promise<ToolCallbackResult> | ToolCallbackResult;
|
|
1833
|
+
}
|
|
1834
|
+
/**
|
|
1835
|
+
* Settings that can be updated after the widget has been initialized.
|
|
1836
|
+
* Passed to {@link updateSettings} to modify user information at runtime.
|
|
1837
|
+
*/
|
|
1838
|
+
interface PluckyUpdateSettingsParams {
|
|
1839
|
+
/** Updated user identification and metadata. Only provided fields are merged. */
|
|
1840
|
+
user?: PluckySettingsParams['user'];
|
|
1841
|
+
}
|
|
1842
|
+
/**
|
|
1843
|
+
* Maps every postMessage `type` string to its payload type.
|
|
1844
|
+
*
|
|
1845
|
+
* Both the loader (host-side transport) and the widget (IframeCommunicator)
|
|
1846
|
+
* derive their typed `send` / `on` signatures from this interface.
|
|
1847
|
+
* Adding a new message here automatically requires typed handling on both sides.
|
|
1848
|
+
*/
|
|
1849
|
+
//#endregion
|
|
1850
|
+
//#region ../loader/dist/load.d.ts
|
|
1851
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema.d.cts
|
|
1852
|
+
type _JSONSchema = boolean | JSONSchema;
|
|
1853
|
+
type JSONSchema = {
|
|
1854
|
+
[k: string]: unknown;
|
|
1855
|
+
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
1856
|
+
$id?: string;
|
|
1857
|
+
$anchor?: string;
|
|
1858
|
+
$ref?: string;
|
|
1859
|
+
$dynamicRef?: string;
|
|
1860
|
+
$dynamicAnchor?: string;
|
|
1861
|
+
$vocabulary?: Record<string, boolean>;
|
|
1862
|
+
$comment?: string;
|
|
1863
|
+
$defs?: Record<string, JSONSchema>;
|
|
1864
|
+
type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
|
|
1865
|
+
additionalItems?: _JSONSchema;
|
|
1866
|
+
unevaluatedItems?: _JSONSchema;
|
|
1867
|
+
prefixItems?: _JSONSchema[];
|
|
1868
|
+
items?: _JSONSchema | _JSONSchema[];
|
|
1869
|
+
contains?: _JSONSchema;
|
|
1870
|
+
additionalProperties?: _JSONSchema;
|
|
1871
|
+
unevaluatedProperties?: _JSONSchema;
|
|
1872
|
+
properties?: Record<string, _JSONSchema>;
|
|
1873
|
+
patternProperties?: Record<string, _JSONSchema>;
|
|
1874
|
+
dependentSchemas?: Record<string, _JSONSchema>;
|
|
1875
|
+
propertyNames?: _JSONSchema;
|
|
1876
|
+
if?: _JSONSchema;
|
|
1877
|
+
then?: _JSONSchema;
|
|
1878
|
+
else?: _JSONSchema;
|
|
1879
|
+
allOf?: JSONSchema[];
|
|
1880
|
+
anyOf?: JSONSchema[];
|
|
1881
|
+
oneOf?: JSONSchema[];
|
|
1882
|
+
not?: _JSONSchema;
|
|
1883
|
+
multipleOf?: number;
|
|
1884
|
+
maximum?: number;
|
|
1885
|
+
exclusiveMaximum?: number | boolean;
|
|
1886
|
+
minimum?: number;
|
|
1887
|
+
exclusiveMinimum?: number | boolean;
|
|
1888
|
+
maxLength?: number;
|
|
1889
|
+
minLength?: number;
|
|
1890
|
+
pattern?: string;
|
|
1891
|
+
maxItems?: number;
|
|
1892
|
+
minItems?: number;
|
|
1893
|
+
uniqueItems?: boolean;
|
|
1894
|
+
maxContains?: number;
|
|
1895
|
+
minContains?: number;
|
|
1896
|
+
maxProperties?: number;
|
|
1897
|
+
minProperties?: number;
|
|
1898
|
+
required?: string[];
|
|
1899
|
+
dependentRequired?: Record<string, string[]>;
|
|
1900
|
+
enum?: Array<string | number | boolean | null>;
|
|
1901
|
+
const?: string | number | boolean | null;
|
|
1902
|
+
id?: string;
|
|
1903
|
+
title?: string;
|
|
1904
|
+
description?: string;
|
|
1905
|
+
default?: unknown;
|
|
1906
|
+
deprecated?: boolean;
|
|
1907
|
+
readOnly?: boolean;
|
|
1908
|
+
writeOnly?: boolean;
|
|
1909
|
+
nullable?: boolean;
|
|
1910
|
+
examples?: unknown[];
|
|
1911
|
+
format?: string;
|
|
1912
|
+
contentMediaType?: string;
|
|
1913
|
+
contentEncoding?: string;
|
|
1914
|
+
contentSchema?: JSONSchema;
|
|
1915
|
+
_prefault?: unknown;
|
|
1916
|
+
};
|
|
1917
|
+
type BaseSchema = JSONSchema; //#endregion
|
|
1918
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/standard-schema.d.cts
|
|
1919
|
+
/** The Standard interface. */
|
|
1920
|
+
interface StandardTypedV1<Input = unknown, Output = Input> {
|
|
1921
|
+
/** The Standard properties. */
|
|
1922
|
+
readonly "~standard": StandardTypedV1.Props<Input, Output>;
|
|
1923
|
+
}
|
|
1924
|
+
declare namespace StandardTypedV1 {
|
|
1925
|
+
/** The Standard properties interface. */
|
|
1926
|
+
interface Props<Input = unknown, Output = Input> {
|
|
1927
|
+
/** The version number of the standard. */
|
|
1928
|
+
readonly version: 1;
|
|
1929
|
+
/** The vendor name of the schema library. */
|
|
1930
|
+
readonly vendor: string;
|
|
1931
|
+
/** Inferred types associated with the schema. */
|
|
1932
|
+
readonly types?: Types<Input, Output> | undefined;
|
|
1933
|
+
}
|
|
1934
|
+
/** The Standard types interface. */
|
|
1935
|
+
interface Types<Input = unknown, Output = Input> {
|
|
1936
|
+
/** The input type of the schema. */
|
|
1937
|
+
readonly input: Input;
|
|
1938
|
+
/** The output type of the schema. */
|
|
1939
|
+
readonly output: Output;
|
|
1940
|
+
}
|
|
1941
|
+
/** Infers the input type of a Standard. */
|
|
1942
|
+
type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
1943
|
+
/** Infers the output type of a Standard. */
|
|
1944
|
+
type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
1945
|
+
}
|
|
1946
|
+
/** The Standard Schema interface. */
|
|
1947
|
+
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
1948
|
+
/** The Standard Schema properties. */
|
|
1949
|
+
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
|
|
1950
|
+
}
|
|
1951
|
+
declare namespace StandardSchemaV1 {
|
|
1952
|
+
/** The Standard Schema properties interface. */
|
|
1953
|
+
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
|
|
1954
|
+
/** Validates unknown input values. */
|
|
1955
|
+
readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
|
|
1956
|
+
}
|
|
1957
|
+
/** The result interface of the validate function. */
|
|
1958
|
+
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
1959
|
+
/** The result interface if validation succeeds. */
|
|
1960
|
+
interface SuccessResult<Output> {
|
|
1961
|
+
/** The typed output value. */
|
|
1962
|
+
readonly value: Output;
|
|
1963
|
+
/** The absence of issues indicates success. */
|
|
1964
|
+
readonly issues?: undefined;
|
|
1965
|
+
}
|
|
1966
|
+
interface Options {
|
|
1967
|
+
/** Implicit support for additional vendor-specific parameters, if needed. */
|
|
1968
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
1969
|
+
}
|
|
1970
|
+
/** The result interface if validation fails. */
|
|
1971
|
+
interface FailureResult {
|
|
1972
|
+
/** The issues of failed validation. */
|
|
1973
|
+
readonly issues: ReadonlyArray<Issue>;
|
|
1974
|
+
}
|
|
1975
|
+
/** The issue interface of the failure output. */
|
|
1976
|
+
interface Issue {
|
|
1977
|
+
/** The error message of the issue. */
|
|
1978
|
+
readonly message: string;
|
|
1979
|
+
/** The path of the issue, if any. */
|
|
1980
|
+
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
1981
|
+
}
|
|
1982
|
+
/** The path segment interface of the issue. */
|
|
1983
|
+
interface PathSegment {
|
|
1984
|
+
/** The key representing a path segment. */
|
|
1985
|
+
readonly key: PropertyKey;
|
|
1986
|
+
}
|
|
1987
|
+
/** The Standard types interface. */
|
|
1988
|
+
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
|
|
1989
|
+
/** Infers the input type of a Standard. */
|
|
1990
|
+
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
|
|
1991
|
+
/** Infers the output type of a Standard. */
|
|
1992
|
+
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
1993
|
+
}
|
|
1994
|
+
/** The Standard JSON Schema interface. */
|
|
1995
|
+
interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
|
|
1996
|
+
/** The Standard JSON Schema properties. */
|
|
1997
|
+
readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
|
|
1998
|
+
}
|
|
1999
|
+
declare namespace StandardJSONSchemaV1 {
|
|
2000
|
+
/** The Standard JSON Schema properties interface. */
|
|
2001
|
+
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
|
|
2002
|
+
/** Methods for generating the input/output JSON Schema. */
|
|
2003
|
+
readonly jsonSchema: Converter;
|
|
2004
|
+
}
|
|
2005
|
+
/** The Standard JSON Schema converter interface. */
|
|
2006
|
+
interface Converter {
|
|
2007
|
+
/** Converts the input type to JSON Schema. May throw if conversion is not supported. */
|
|
2008
|
+
readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
|
|
2009
|
+
/** Converts the output type to JSON Schema. May throw if conversion is not supported. */
|
|
2010
|
+
readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
|
|
2011
|
+
}
|
|
2012
|
+
/** The target version of the generated JSON Schema.
|
|
2013
|
+
*
|
|
2014
|
+
* It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use.
|
|
2015
|
+
*
|
|
2016
|
+
* The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
|
|
2017
|
+
*
|
|
2018
|
+
* All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
|
|
2019
|
+
*/
|
|
2020
|
+
type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
|
|
2021
|
+
/** The options for the input/output methods. */
|
|
2022
|
+
interface Options {
|
|
2023
|
+
/** 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. */
|
|
2024
|
+
readonly target: Target;
|
|
2025
|
+
/** Implicit support for additional vendor-specific parameters, if needed. */
|
|
2026
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
2027
|
+
}
|
|
2028
|
+
/** The Standard types interface. */
|
|
2029
|
+
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
|
|
2030
|
+
/** Infers the input type of a Standard. */
|
|
2031
|
+
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
|
|
2032
|
+
/** Infers the output type of a Standard. */
|
|
2033
|
+
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
2034
|
+
}
|
|
2035
|
+
interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {} //#endregion
|
|
2036
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/registries.d.cts
|
|
2037
|
+
declare const $output: unique symbol;
|
|
2038
|
+
type $output = typeof $output;
|
|
2039
|
+
declare const $input: unique symbol;
|
|
2040
|
+
type $input = typeof $input;
|
|
2041
|
+
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;
|
|
2042
|
+
type MetadataType = object | undefined;
|
|
2043
|
+
declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
|
|
2044
|
+
_meta: Meta;
|
|
2045
|
+
_schema: Schema;
|
|
2046
|
+
_map: WeakMap<Schema, $replace<Meta, Schema>>;
|
|
2047
|
+
_idmap: Map<string, Schema>;
|
|
2048
|
+
add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
|
|
2049
|
+
clear(): this;
|
|
2050
|
+
remove(schema: Schema): this;
|
|
2051
|
+
get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
|
|
2052
|
+
has(schema: Schema): boolean;
|
|
2053
|
+
}
|
|
2054
|
+
interface JSONSchemaMeta {
|
|
2055
|
+
id?: string | undefined;
|
|
2056
|
+
title?: string | undefined;
|
|
2057
|
+
description?: string | undefined;
|
|
2058
|
+
deprecated?: boolean | undefined;
|
|
2059
|
+
[k: string]: unknown;
|
|
2060
|
+
}
|
|
2061
|
+
interface GlobalMeta extends JSONSchemaMeta {} //#endregion
|
|
2062
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/to-json-schema.d.cts
|
|
2063
|
+
type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
|
|
2064
|
+
interface JSONSchemaGeneratorParams {
|
|
2065
|
+
processors: Record<string, Processor>;
|
|
2066
|
+
/** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
|
|
2067
|
+
* @default globalRegistry */
|
|
2068
|
+
metadata?: $ZodRegistry<Record<string, any>>;
|
|
2069
|
+
/** The JSON Schema version to target.
|
|
2070
|
+
* - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
|
|
2071
|
+
* - `"draft-07"` — JSON Schema Draft 7
|
|
2072
|
+
* - `"draft-04"` — JSON Schema Draft 4
|
|
2073
|
+
* - `"openapi-3.0"` — OpenAPI 3.0 Schema Object */
|
|
2074
|
+
target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
|
|
2075
|
+
/** How to handle unrepresentable types.
|
|
2076
|
+
* - `"throw"` — Default. Unrepresentable types throw an error
|
|
2077
|
+
* - `"any"` — Unrepresentable types become `{}` */
|
|
2078
|
+
unrepresentable?: "throw" | "any";
|
|
2079
|
+
/** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
|
|
2080
|
+
override?: (ctx: {
|
|
2081
|
+
zodSchema: $ZodTypes;
|
|
2082
|
+
jsonSchema: BaseSchema;
|
|
2083
|
+
path: (string | number)[];
|
|
2084
|
+
}) => void;
|
|
2085
|
+
/** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, defaults, coerced primitives, etc.
|
|
2086
|
+
* - `"output"` — Default. Convert the output schema.
|
|
2087
|
+
* - `"input"` — Convert the input schema. */
|
|
2088
|
+
io?: "input" | "output";
|
|
2089
|
+
cycles?: "ref" | "throw";
|
|
2090
|
+
reused?: "ref" | "inline";
|
|
2091
|
+
external?: {
|
|
2092
|
+
registry: $ZodRegistry<{
|
|
2093
|
+
id?: string | undefined;
|
|
2094
|
+
}>;
|
|
2095
|
+
uri?: ((id: string) => string) | undefined;
|
|
2096
|
+
defs: Record<string, BaseSchema>;
|
|
2097
|
+
} | undefined;
|
|
2098
|
+
}
|
|
2099
|
+
/**
|
|
2100
|
+
* Parameters for the toJSONSchema function.
|
|
2101
|
+
*/
|
|
2102
|
+
type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
|
|
2103
|
+
interface ProcessParams {
|
|
2104
|
+
schemaPath: $ZodType[];
|
|
2105
|
+
path: (string | number)[];
|
|
2106
|
+
}
|
|
2107
|
+
interface Seen {
|
|
2108
|
+
/** JSON Schema result for this Zod schema */
|
|
2109
|
+
schema: BaseSchema;
|
|
2110
|
+
/** A cached version of the schema that doesn't get overwritten during ref resolution */
|
|
2111
|
+
def?: BaseSchema;
|
|
2112
|
+
defId?: string | undefined;
|
|
2113
|
+
/** Number of times this schema was encountered during traversal */
|
|
2114
|
+
count: number;
|
|
2115
|
+
/** Cycle path */
|
|
2116
|
+
cycle?: (string | number)[] | undefined;
|
|
2117
|
+
isParent?: boolean | undefined;
|
|
2118
|
+
/** Schema to inherit JSON Schema properties from (set by processor for wrappers) */
|
|
2119
|
+
ref?: $ZodType | null;
|
|
2120
|
+
/** JSON Schema property path for this schema */
|
|
2121
|
+
path?: (string | number)[] | undefined;
|
|
2122
|
+
}
|
|
2123
|
+
interface ToJSONSchemaContext {
|
|
2124
|
+
processors: Record<string, Processor>;
|
|
2125
|
+
metadataRegistry: $ZodRegistry<Record<string, any>>;
|
|
2126
|
+
target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
|
|
2127
|
+
unrepresentable: "throw" | "any";
|
|
2128
|
+
override: (ctx: {
|
|
2129
|
+
zodSchema: $ZodType;
|
|
2130
|
+
jsonSchema: BaseSchema;
|
|
2131
|
+
path: (string | number)[];
|
|
2132
|
+
}) => void;
|
|
2133
|
+
io: "input" | "output";
|
|
2134
|
+
counter: number;
|
|
2135
|
+
seen: Map<$ZodType, Seen>;
|
|
2136
|
+
cycles: "ref" | "throw";
|
|
2137
|
+
reused: "ref" | "inline";
|
|
2138
|
+
external?: {
|
|
2139
|
+
registry: $ZodRegistry<{
|
|
2140
|
+
id?: string | undefined;
|
|
2141
|
+
}>;
|
|
2142
|
+
uri?: ((id: string) => string) | undefined;
|
|
2143
|
+
defs: Record<string, BaseSchema>;
|
|
2144
|
+
} | undefined;
|
|
2145
|
+
}
|
|
2146
|
+
type ZodStandardSchemaWithJSON$1<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
|
|
2147
|
+
interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
|
|
2148
|
+
"~standard": ZodStandardSchemaWithJSON$1<T>;
|
|
2149
|
+
} //#endregion
|
|
2150
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/util.d.cts
|
|
2151
|
+
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 & {});
|
|
2152
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
2153
|
+
type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
2154
|
+
type MakePartial<T, K extends keyof T> = Omit$1<T, K> & InexactPartial<Pick<T, K>>;
|
|
2155
|
+
type NoUndefined<T> = T extends undefined ? never : T;
|
|
2156
|
+
type LoosePartial<T extends object> = InexactPartial<T> & {
|
|
2157
|
+
[k: string]: unknown;
|
|
2158
|
+
};
|
|
2159
|
+
type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
|
|
2160
|
+
type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined };
|
|
2161
|
+
type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
2162
|
+
readonly [Symbol.toStringTag]: string;
|
|
2163
|
+
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
2164
|
+
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>;
|
|
2165
|
+
type SomeObject = Record<PropertyKey, any>;
|
|
2166
|
+
type Identity<T> = T;
|
|
2167
|
+
type Flatten<T> = Identity<{ [k in keyof T]: T[k] }>;
|
|
2168
|
+
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
2169
|
+
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] }>;
|
|
2170
|
+
type TupleItems = ReadonlyArray<SomeType>;
|
|
2171
|
+
type AnyFunc = (...args: any[]) => any;
|
|
2172
|
+
type MaybeAsync<T> = T | Promise<T>;
|
|
2173
|
+
type EnumValue = string | number;
|
|
2174
|
+
type EnumLike = Readonly<Record<string, EnumValue>>;
|
|
2175
|
+
type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k }>;
|
|
2176
|
+
type Literal = string | number | bigint | boolean | null | undefined;
|
|
2177
|
+
type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
2178
|
+
type HasLength = {
|
|
2179
|
+
length: number;
|
|
2180
|
+
};
|
|
2181
|
+
type PropValues = Record<string, Set<Primitive>>;
|
|
2182
|
+
type PrimitiveSet = Set<Primitive>;
|
|
2183
|
+
type EmptyToNever<T> = keyof T extends never ? never : T;
|
|
2184
|
+
declare abstract class Class {
|
|
2185
|
+
constructor(..._args: any[]);
|
|
2186
|
+
} //#endregion
|
|
2187
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.d.cts
|
|
2188
|
+
declare const version: {
|
|
2189
|
+
readonly major: 4;
|
|
2190
|
+
readonly minor: 3;
|
|
2191
|
+
readonly patch: number;
|
|
2192
|
+
}; //#endregion
|
|
2193
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.d.cts
|
|
2194
|
+
interface ParseContext<T extends $ZodIssueBase = never> {
|
|
2195
|
+
/** Customize error messages. */
|
|
2196
|
+
readonly error?: $ZodErrorMap<T>;
|
|
2197
|
+
/** Include the `input` field in issue objects. Default `false`. */
|
|
2198
|
+
readonly reportInput?: boolean;
|
|
2199
|
+
/** Skip eval-based fast path. Default `false`. */
|
|
2200
|
+
readonly jitless?: boolean;
|
|
2201
|
+
}
|
|
2202
|
+
/** @internal */
|
|
2203
|
+
interface ParseContextInternal<T extends $ZodIssueBase = never> extends ParseContext<T> {
|
|
2204
|
+
readonly async?: boolean | undefined;
|
|
2205
|
+
readonly direction?: "forward" | "backward";
|
|
2206
|
+
readonly skipChecks?: boolean;
|
|
2207
|
+
}
|
|
2208
|
+
interface ParsePayload<T = unknown> {
|
|
2209
|
+
value: T;
|
|
2210
|
+
issues: $ZodRawIssue[];
|
|
2211
|
+
/** A may to mark a whole payload as aborted. Used in codecs/pipes. */
|
|
2212
|
+
aborted?: boolean;
|
|
2213
|
+
}
|
|
2214
|
+
type CheckFn<T> = (input: ParsePayload<T>) => MaybeAsync<void>;
|
|
2215
|
+
interface $ZodTypeDef {
|
|
2216
|
+
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";
|
|
2217
|
+
error?: $ZodErrorMap<never> | undefined;
|
|
2218
|
+
checks?: $ZodCheck<never>[];
|
|
2219
|
+
}
|
|
2220
|
+
interface _$ZodTypeInternals {
|
|
2221
|
+
/** The `@zod/core` version of this schema */
|
|
2222
|
+
version: typeof version;
|
|
2223
|
+
/** Schema definition. */
|
|
2224
|
+
def: $ZodTypeDef;
|
|
2225
|
+
/** @internal Randomly generated ID for this schema. */
|
|
2226
|
+
/** @internal List of deferred initializers. */
|
|
2227
|
+
deferred: AnyFunc[] | undefined;
|
|
2228
|
+
/** @internal Parses input and runs all checks (refinements). */
|
|
2229
|
+
run(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
|
|
2230
|
+
/** @internal Parses input, doesn't run checks. */
|
|
2231
|
+
parse(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
|
|
2232
|
+
/** @internal Stores identifiers for the set of traits implemented by this schema. */
|
|
2233
|
+
traits: Set<string>;
|
|
2234
|
+
/** @internal Indicates that a schema output type should be considered optional inside objects.
|
|
2235
|
+
* @default Required
|
|
2236
|
+
*/
|
|
2237
|
+
/** @internal */
|
|
2238
|
+
optin?: "optional" | undefined;
|
|
2239
|
+
/** @internal */
|
|
2240
|
+
optout?: "optional" | undefined;
|
|
2241
|
+
/** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
|
|
2242
|
+
*
|
|
2243
|
+
* Defined on: enum, const, literal, null, undefined
|
|
2244
|
+
* Passthrough: optional, nullable, branded, default, catch, pipe
|
|
2245
|
+
* Todo: unions?
|
|
2246
|
+
*/
|
|
2247
|
+
values?: PrimitiveSet | undefined;
|
|
2248
|
+
/** Default value bubbled up from */
|
|
2249
|
+
/** @internal A set of literal discriminators used for the fast path in discriminated unions. */
|
|
2250
|
+
propValues?: PropValues | undefined;
|
|
2251
|
+
/** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
|
|
2252
|
+
pattern: RegExp | undefined;
|
|
2253
|
+
/** @internal The constructor function of this schema. */
|
|
2254
|
+
constr: new (def: any) => $ZodType;
|
|
2255
|
+
/** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
|
|
2256
|
+
bag: Record<string, unknown>;
|
|
2257
|
+
/** @internal The set of issues this schema might throw during type checking. */
|
|
2258
|
+
isst: $ZodIssueBase;
|
|
2259
|
+
/** @internal Subject to change, not a public API. */
|
|
2260
|
+
processJSONSchema?: ((ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void) | undefined;
|
|
2261
|
+
/** An optional method used to override `toJSONSchema` logic. */
|
|
2262
|
+
toJSONSchema?: () => unknown;
|
|
2263
|
+
/** @internal The parent of this schema. Only set during certain clone operations. */
|
|
2264
|
+
parent?: $ZodType | undefined;
|
|
2265
|
+
}
|
|
2266
|
+
/** @internal */
|
|
2267
|
+
interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
|
|
2268
|
+
/** @internal The inferred output type */
|
|
2269
|
+
output: O;
|
|
2270
|
+
/** @internal The inferred input type */
|
|
2271
|
+
input: I;
|
|
2272
|
+
}
|
|
2273
|
+
type $ZodStandardSchema<T> = StandardSchemaV1.Props<input<T>, output<T>>;
|
|
2274
|
+
type SomeType = {
|
|
2275
|
+
_zod: _$ZodTypeInternals;
|
|
2276
|
+
};
|
|
2277
|
+
interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
|
|
2278
|
+
_zod: Internals;
|
|
2279
|
+
"~standard": $ZodStandardSchema<this>;
|
|
2280
|
+
}
|
|
2281
|
+
interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T["output"], T["input"], T> {}
|
|
2282
|
+
declare const $ZodType: $constructor<$ZodType>;
|
|
2283
|
+
interface $ZodStringDef extends $ZodTypeDef {
|
|
2284
|
+
type: "string";
|
|
2285
|
+
coerce?: boolean;
|
|
2286
|
+
checks?: $ZodCheck<string>[];
|
|
2287
|
+
}
|
|
2288
|
+
interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
|
|
2289
|
+
def: $ZodStringDef;
|
|
2290
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
2291
|
+
pattern: RegExp;
|
|
2292
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
2293
|
+
isst: $ZodIssueInvalidType;
|
|
2294
|
+
bag: LoosePartial<{
|
|
2295
|
+
minimum: number;
|
|
2296
|
+
maximum: number;
|
|
2297
|
+
patterns: Set<RegExp>;
|
|
2298
|
+
format: string;
|
|
2299
|
+
contentEncoding: string;
|
|
2300
|
+
}>;
|
|
2301
|
+
}
|
|
2302
|
+
interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {}
|
|
2303
|
+
declare const $ZodString: $constructor<$ZodString>;
|
|
2304
|
+
interface $ZodNumberDef extends $ZodTypeDef {
|
|
2305
|
+
type: "number";
|
|
2306
|
+
coerce?: boolean;
|
|
2307
|
+
}
|
|
2308
|
+
interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
|
|
2309
|
+
def: $ZodNumberDef;
|
|
2310
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
2311
|
+
pattern: RegExp;
|
|
2312
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
2313
|
+
isst: $ZodIssueInvalidType;
|
|
2314
|
+
bag: LoosePartial<{
|
|
2315
|
+
minimum: number;
|
|
2316
|
+
maximum: number;
|
|
2317
|
+
exclusiveMinimum: number;
|
|
2318
|
+
exclusiveMaximum: number;
|
|
2319
|
+
format: string;
|
|
2320
|
+
pattern: RegExp;
|
|
2321
|
+
}>;
|
|
2322
|
+
}
|
|
2323
|
+
interface $ZodNumber<Input = unknown> extends $ZodType {
|
|
2324
|
+
_zod: $ZodNumberInternals<Input>;
|
|
2325
|
+
}
|
|
2326
|
+
declare const $ZodNumber: $constructor<$ZodNumber>;
|
|
2327
|
+
interface $ZodBooleanDef extends $ZodTypeDef {
|
|
2328
|
+
type: "boolean";
|
|
2329
|
+
coerce?: boolean;
|
|
2330
|
+
checks?: $ZodCheck<boolean>[];
|
|
2331
|
+
}
|
|
2332
|
+
interface $ZodBooleanInternals<T = unknown> extends $ZodTypeInternals<boolean, T> {
|
|
2333
|
+
pattern: RegExp;
|
|
2334
|
+
def: $ZodBooleanDef;
|
|
2335
|
+
isst: $ZodIssueInvalidType;
|
|
2336
|
+
}
|
|
2337
|
+
interface $ZodBoolean<T = unknown> extends $ZodType {
|
|
2338
|
+
_zod: $ZodBooleanInternals<T>;
|
|
2339
|
+
}
|
|
2340
|
+
declare const $ZodBoolean: $constructor<$ZodBoolean>;
|
|
2341
|
+
interface $ZodBigIntDef extends $ZodTypeDef {
|
|
2342
|
+
type: "bigint";
|
|
2343
|
+
coerce?: boolean;
|
|
2344
|
+
}
|
|
2345
|
+
interface $ZodBigIntInternals<T = unknown> extends $ZodTypeInternals<bigint, T> {
|
|
2346
|
+
pattern: RegExp;
|
|
2347
|
+
/** @internal Internal API, use with caution */
|
|
2348
|
+
def: $ZodBigIntDef;
|
|
2349
|
+
isst: $ZodIssueInvalidType;
|
|
2350
|
+
bag: LoosePartial<{
|
|
2351
|
+
minimum: bigint;
|
|
2352
|
+
maximum: bigint;
|
|
2353
|
+
format: string;
|
|
2354
|
+
}>;
|
|
2355
|
+
}
|
|
2356
|
+
interface $ZodBigInt<T = unknown> extends $ZodType {
|
|
2357
|
+
_zod: $ZodBigIntInternals<T>;
|
|
2358
|
+
}
|
|
2359
|
+
declare const $ZodBigInt: $constructor<$ZodBigInt>;
|
|
2360
|
+
interface $ZodSymbolDef extends $ZodTypeDef {
|
|
2361
|
+
type: "symbol";
|
|
2362
|
+
}
|
|
2363
|
+
interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
|
|
2364
|
+
def: $ZodSymbolDef;
|
|
2365
|
+
isst: $ZodIssueInvalidType;
|
|
2366
|
+
}
|
|
2367
|
+
interface $ZodSymbol extends $ZodType {
|
|
2368
|
+
_zod: $ZodSymbolInternals;
|
|
2369
|
+
}
|
|
2370
|
+
declare const $ZodSymbol: $constructor<$ZodSymbol>;
|
|
2371
|
+
interface $ZodUndefinedDef extends $ZodTypeDef {
|
|
2372
|
+
type: "undefined";
|
|
2373
|
+
}
|
|
2374
|
+
interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
|
|
2375
|
+
pattern: RegExp;
|
|
2376
|
+
def: $ZodUndefinedDef;
|
|
2377
|
+
values: PrimitiveSet;
|
|
2378
|
+
isst: $ZodIssueInvalidType;
|
|
2379
|
+
}
|
|
2380
|
+
interface $ZodUndefined extends $ZodType {
|
|
2381
|
+
_zod: $ZodUndefinedInternals;
|
|
2382
|
+
}
|
|
2383
|
+
declare const $ZodUndefined: $constructor<$ZodUndefined>;
|
|
2384
|
+
interface $ZodNullDef extends $ZodTypeDef {
|
|
2385
|
+
type: "null";
|
|
2386
|
+
}
|
|
2387
|
+
interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
|
|
2388
|
+
pattern: RegExp;
|
|
2389
|
+
def: $ZodNullDef;
|
|
2390
|
+
values: PrimitiveSet;
|
|
2391
|
+
isst: $ZodIssueInvalidType;
|
|
2392
|
+
}
|
|
2393
|
+
interface $ZodNull extends $ZodType {
|
|
2394
|
+
_zod: $ZodNullInternals;
|
|
2395
|
+
}
|
|
2396
|
+
declare const $ZodNull: $constructor<$ZodNull>;
|
|
2397
|
+
interface $ZodAnyDef extends $ZodTypeDef {
|
|
2398
|
+
type: "any";
|
|
2399
|
+
}
|
|
2400
|
+
interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
|
|
2401
|
+
def: $ZodAnyDef;
|
|
2402
|
+
isst: never;
|
|
2403
|
+
}
|
|
2404
|
+
interface $ZodAny extends $ZodType {
|
|
2405
|
+
_zod: $ZodAnyInternals;
|
|
2406
|
+
}
|
|
2407
|
+
declare const $ZodAny: $constructor<$ZodAny>;
|
|
2408
|
+
interface $ZodUnknownDef extends $ZodTypeDef {
|
|
2409
|
+
type: "unknown";
|
|
2410
|
+
}
|
|
2411
|
+
interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
|
|
2412
|
+
def: $ZodUnknownDef;
|
|
2413
|
+
isst: never;
|
|
2414
|
+
}
|
|
2415
|
+
interface $ZodUnknown extends $ZodType {
|
|
2416
|
+
_zod: $ZodUnknownInternals;
|
|
2417
|
+
}
|
|
2418
|
+
declare const $ZodUnknown: $constructor<$ZodUnknown>;
|
|
2419
|
+
interface $ZodNeverDef extends $ZodTypeDef {
|
|
2420
|
+
type: "never";
|
|
2421
|
+
}
|
|
2422
|
+
interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
|
|
2423
|
+
def: $ZodNeverDef;
|
|
2424
|
+
isst: $ZodIssueInvalidType;
|
|
2425
|
+
}
|
|
2426
|
+
interface $ZodNever extends $ZodType {
|
|
2427
|
+
_zod: $ZodNeverInternals;
|
|
2428
|
+
}
|
|
2429
|
+
declare const $ZodNever: $constructor<$ZodNever>;
|
|
2430
|
+
interface $ZodVoidDef extends $ZodTypeDef {
|
|
2431
|
+
type: "void";
|
|
2432
|
+
}
|
|
2433
|
+
interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
|
|
2434
|
+
def: $ZodVoidDef;
|
|
2435
|
+
isst: $ZodIssueInvalidType;
|
|
2436
|
+
}
|
|
2437
|
+
interface $ZodVoid extends $ZodType {
|
|
2438
|
+
_zod: $ZodVoidInternals;
|
|
2439
|
+
}
|
|
2440
|
+
declare const $ZodVoid: $constructor<$ZodVoid>;
|
|
2441
|
+
interface $ZodDateDef extends $ZodTypeDef {
|
|
2442
|
+
type: "date";
|
|
2443
|
+
coerce?: boolean;
|
|
2444
|
+
}
|
|
2445
|
+
interface $ZodDateInternals<T = unknown> extends $ZodTypeInternals<Date, T> {
|
|
2446
|
+
def: $ZodDateDef;
|
|
2447
|
+
isst: $ZodIssueInvalidType;
|
|
2448
|
+
bag: LoosePartial<{
|
|
2449
|
+
minimum: Date;
|
|
2450
|
+
maximum: Date;
|
|
2451
|
+
format: string;
|
|
2452
|
+
}>;
|
|
2453
|
+
}
|
|
2454
|
+
interface $ZodDate<T = unknown> extends $ZodType {
|
|
2455
|
+
_zod: $ZodDateInternals<T>;
|
|
2456
|
+
}
|
|
2457
|
+
declare const $ZodDate: $constructor<$ZodDate>;
|
|
2458
|
+
interface $ZodArrayDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2459
|
+
type: "array";
|
|
2460
|
+
element: T;
|
|
2461
|
+
}
|
|
2462
|
+
interface $ZodArrayInternals<T extends SomeType = $ZodType> extends _$ZodTypeInternals {
|
|
2463
|
+
def: $ZodArrayDef<T>;
|
|
2464
|
+
isst: $ZodIssueInvalidType;
|
|
2465
|
+
output: output<T>[];
|
|
2466
|
+
input: input<T>[];
|
|
2467
|
+
}
|
|
2468
|
+
interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {}
|
|
2469
|
+
declare const $ZodArray: $constructor<$ZodArray>;
|
|
2470
|
+
type OptionalOutSchema = {
|
|
2471
|
+
_zod: {
|
|
2472
|
+
optout: "optional";
|
|
2473
|
+
};
|
|
2474
|
+
};
|
|
2475
|
+
type OptionalInSchema = {
|
|
2476
|
+
_zod: {
|
|
2477
|
+
optin: "optional";
|
|
2478
|
+
};
|
|
2479
|
+
};
|
|
2480
|
+
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>;
|
|
2481
|
+
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>;
|
|
2482
|
+
type $ZodObjectConfig = {
|
|
2483
|
+
out: Record<string, unknown>;
|
|
2484
|
+
in: Record<string, unknown>;
|
|
2485
|
+
};
|
|
2486
|
+
type $loose = {
|
|
2487
|
+
out: Record<string, unknown>;
|
|
2488
|
+
in: Record<string, unknown>;
|
|
2489
|
+
};
|
|
2490
|
+
type $strict = {
|
|
2491
|
+
out: {};
|
|
2492
|
+
in: {};
|
|
2493
|
+
};
|
|
2494
|
+
type $strip = {
|
|
2495
|
+
out: {};
|
|
2496
|
+
in: {};
|
|
2497
|
+
};
|
|
2498
|
+
type $catchall<T extends SomeType> = {
|
|
2499
|
+
out: {
|
|
2500
|
+
[k: string]: output<T>;
|
|
2501
|
+
};
|
|
2502
|
+
in: {
|
|
2503
|
+
[k: string]: input<T>;
|
|
2504
|
+
};
|
|
2505
|
+
};
|
|
2506
|
+
type $ZodShape = Readonly<{
|
|
2507
|
+
[k: string]: $ZodType;
|
|
2508
|
+
}>;
|
|
2509
|
+
interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
|
|
2510
|
+
type: "object";
|
|
2511
|
+
shape: Shape;
|
|
2512
|
+
catchall?: $ZodType | undefined;
|
|
2513
|
+
}
|
|
2514
|
+
interface $ZodObjectInternals< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
|
|
2515
|
+
def: $ZodObjectDef<Shape>;
|
|
2516
|
+
config: Config;
|
|
2517
|
+
isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
|
|
2518
|
+
propValues: PropValues;
|
|
2519
|
+
output: $InferObjectOutput<Shape, Config["out"]>;
|
|
2520
|
+
input: $InferObjectInput<Shape, Config["in"]>;
|
|
2521
|
+
optin?: "optional" | undefined;
|
|
2522
|
+
optout?: "optional" | undefined;
|
|
2523
|
+
}
|
|
2524
|
+
type $ZodLooseShape = Record<string, any>;
|
|
2525
|
+
interface $ZodObject< /** @ts-ignore Cast variance */out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {}
|
|
2526
|
+
declare const $ZodObject: $constructor<$ZodObject>;
|
|
2527
|
+
type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
|
|
2528
|
+
type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
|
|
2529
|
+
interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
|
|
2530
|
+
type: "union";
|
|
2531
|
+
options: Options;
|
|
2532
|
+
inclusive?: boolean;
|
|
2533
|
+
}
|
|
2534
|
+
type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
|
|
2535
|
+
type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
|
|
2536
|
+
interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends _$ZodTypeInternals {
|
|
2537
|
+
def: $ZodUnionDef<T>;
|
|
2538
|
+
isst: $ZodIssueInvalidUnion;
|
|
2539
|
+
pattern: T[number]["_zod"]["pattern"];
|
|
2540
|
+
values: T[number]["_zod"]["values"];
|
|
2541
|
+
output: $InferUnionOutput<T[number]>;
|
|
2542
|
+
input: $InferUnionInput<T[number]>;
|
|
2543
|
+
optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
|
|
2544
|
+
optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
|
|
2545
|
+
}
|
|
2546
|
+
interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodUnionInternals<T>> {
|
|
2547
|
+
_zod: $ZodUnionInternals<T>;
|
|
2548
|
+
}
|
|
2549
|
+
declare const $ZodUnion: $constructor<$ZodUnion>;
|
|
2550
|
+
interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2551
|
+
type: "intersection";
|
|
2552
|
+
left: Left;
|
|
2553
|
+
right: Right;
|
|
2554
|
+
}
|
|
2555
|
+
interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
|
|
2556
|
+
def: $ZodIntersectionDef<A, B>;
|
|
2557
|
+
isst: never;
|
|
2558
|
+
optin: A["_zod"]["optin"] | B["_zod"]["optin"];
|
|
2559
|
+
optout: A["_zod"]["optout"] | B["_zod"]["optout"];
|
|
2560
|
+
output: output<A> & output<B>;
|
|
2561
|
+
input: input<A> & input<B>;
|
|
2562
|
+
}
|
|
2563
|
+
interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
2564
|
+
_zod: $ZodIntersectionInternals<A, B>;
|
|
2565
|
+
}
|
|
2566
|
+
declare const $ZodIntersection: $constructor<$ZodIntersection>;
|
|
2567
|
+
interface $ZodTupleDef<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
|
|
2568
|
+
type: "tuple";
|
|
2569
|
+
items: T;
|
|
2570
|
+
rest: Rest;
|
|
2571
|
+
}
|
|
2572
|
+
type $InferTupleInputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleInputTypeWithOptionals<T>, ...(Rest extends SomeType ? input<Rest>[] : [])];
|
|
2573
|
+
type TupleInputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: input<T[k]> };
|
|
2574
|
+
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> : [];
|
|
2575
|
+
type $InferTupleOutputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleOutputTypeWithOptionals<T>, ...(Rest extends SomeType ? output<Rest>[] : [])];
|
|
2576
|
+
type TupleOutputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: output<T[k]> };
|
|
2577
|
+
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> : [];
|
|
2578
|
+
interface $ZodTupleInternals<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends _$ZodTypeInternals {
|
|
2579
|
+
def: $ZodTupleDef<T, Rest>;
|
|
2580
|
+
isst: $ZodIssueInvalidType | $ZodIssueTooBig<unknown[]> | $ZodIssueTooSmall<unknown[]>;
|
|
2581
|
+
output: $InferTupleOutputType<T, Rest>;
|
|
2582
|
+
input: $InferTupleInputType<T, Rest>;
|
|
2583
|
+
}
|
|
2584
|
+
interface $ZodTuple<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodType {
|
|
2585
|
+
_zod: $ZodTupleInternals<T, Rest>;
|
|
2586
|
+
}
|
|
2587
|
+
declare const $ZodTuple: $constructor<$ZodTuple>;
|
|
2588
|
+
type $ZodRecordKey = $ZodType<string | number | symbol, unknown>;
|
|
2589
|
+
interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2590
|
+
type: "record";
|
|
2591
|
+
keyType: Key;
|
|
2592
|
+
valueType: Value;
|
|
2593
|
+
/** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
|
|
2594
|
+
mode?: "strict" | "loose";
|
|
2595
|
+
}
|
|
2596
|
+
type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<output<Key>, output<Value>>> : Record<output<Key>, output<Value>>;
|
|
2597
|
+
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>>;
|
|
2598
|
+
interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
|
|
2599
|
+
def: $ZodRecordDef<Key, Value>;
|
|
2600
|
+
isst: $ZodIssueInvalidType | $ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
|
|
2601
|
+
optin?: "optional" | undefined;
|
|
2602
|
+
optout?: "optional" | undefined;
|
|
2603
|
+
}
|
|
2604
|
+
type $partial = {
|
|
2605
|
+
"~~partial": true;
|
|
2606
|
+
};
|
|
2607
|
+
interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodType {
|
|
2608
|
+
_zod: $ZodRecordInternals<Key, Value>;
|
|
2609
|
+
}
|
|
2610
|
+
declare const $ZodRecord: $constructor<$ZodRecord>;
|
|
2611
|
+
interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2612
|
+
type: "map";
|
|
2613
|
+
keyType: Key;
|
|
2614
|
+
valueType: Value;
|
|
2615
|
+
}
|
|
2616
|
+
interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key>, output<Value>>, Map<input<Key>, input<Value>>> {
|
|
2617
|
+
def: $ZodMapDef<Key, Value>;
|
|
2618
|
+
isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement<unknown>;
|
|
2619
|
+
optin?: "optional" | undefined;
|
|
2620
|
+
optout?: "optional" | undefined;
|
|
2621
|
+
}
|
|
2622
|
+
interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
|
|
2623
|
+
_zod: $ZodMapInternals<Key, Value>;
|
|
2624
|
+
}
|
|
2625
|
+
declare const $ZodMap: $constructor<$ZodMap>;
|
|
2626
|
+
interface $ZodSetDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2627
|
+
type: "set";
|
|
2628
|
+
valueType: T;
|
|
2629
|
+
}
|
|
2630
|
+
interface $ZodSetInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T>>, Set<input<T>>> {
|
|
2631
|
+
def: $ZodSetDef<T>;
|
|
2632
|
+
isst: $ZodIssueInvalidType;
|
|
2633
|
+
optin?: "optional" | undefined;
|
|
2634
|
+
optout?: "optional" | undefined;
|
|
2635
|
+
}
|
|
2636
|
+
interface $ZodSet<T extends SomeType = $ZodType> extends $ZodType {
|
|
2637
|
+
_zod: $ZodSetInternals<T>;
|
|
2638
|
+
}
|
|
2639
|
+
declare const $ZodSet: $constructor<$ZodSet>;
|
|
2640
|
+
type $InferEnumOutput<T extends EnumLike> = T[keyof T] & {};
|
|
2641
|
+
type $InferEnumInput<T extends EnumLike> = T[keyof T] & {};
|
|
2642
|
+
interface $ZodEnumDef<T extends EnumLike = EnumLike> extends $ZodTypeDef {
|
|
2643
|
+
type: "enum";
|
|
2644
|
+
entries: T;
|
|
2645
|
+
}
|
|
2646
|
+
interface $ZodEnumInternals< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
|
|
2647
|
+
def: $ZodEnumDef<T>;
|
|
2648
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
2649
|
+
values: PrimitiveSet;
|
|
2650
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
2651
|
+
pattern: RegExp;
|
|
2652
|
+
isst: $ZodIssueInvalidValue;
|
|
2653
|
+
}
|
|
2654
|
+
interface $ZodEnum<T extends EnumLike = EnumLike> extends $ZodType {
|
|
2655
|
+
_zod: $ZodEnumInternals<T>;
|
|
2656
|
+
}
|
|
2657
|
+
declare const $ZodEnum: $constructor<$ZodEnum>;
|
|
2658
|
+
interface $ZodLiteralDef<T extends Literal> extends $ZodTypeDef {
|
|
2659
|
+
type: "literal";
|
|
2660
|
+
values: T[];
|
|
2661
|
+
}
|
|
2662
|
+
interface $ZodLiteralInternals<T extends Literal = Literal> extends $ZodTypeInternals<T, T> {
|
|
2663
|
+
def: $ZodLiteralDef<T>;
|
|
2664
|
+
values: Set<T>;
|
|
2665
|
+
pattern: RegExp;
|
|
2666
|
+
isst: $ZodIssueInvalidValue;
|
|
2667
|
+
}
|
|
2668
|
+
interface $ZodLiteral<T extends Literal = Literal> extends $ZodType {
|
|
2669
|
+
_zod: $ZodLiteralInternals<T>;
|
|
2670
|
+
}
|
|
2671
|
+
declare const $ZodLiteral: $constructor<$ZodLiteral>;
|
|
2672
|
+
type _File = typeof globalThis extends {
|
|
2673
|
+
File: infer F extends new (...args: any[]) => any;
|
|
2674
|
+
} ? InstanceType<F> : {};
|
|
2675
|
+
/** Do not reference this directly. */
|
|
2676
|
+
interface File extends _File {
|
|
2677
|
+
readonly type: string;
|
|
2678
|
+
readonly size: number;
|
|
2679
|
+
}
|
|
2680
|
+
interface $ZodFileDef extends $ZodTypeDef {
|
|
2681
|
+
type: "file";
|
|
2682
|
+
}
|
|
2683
|
+
interface $ZodFileInternals extends $ZodTypeInternals<File, File> {
|
|
2684
|
+
def: $ZodFileDef;
|
|
2685
|
+
isst: $ZodIssueInvalidType;
|
|
2686
|
+
bag: LoosePartial<{
|
|
2687
|
+
minimum: number;
|
|
2688
|
+
maximum: number;
|
|
2689
|
+
mime: MimeTypes[];
|
|
2690
|
+
}>;
|
|
2691
|
+
}
|
|
2692
|
+
interface $ZodFile extends $ZodType {
|
|
2693
|
+
_zod: $ZodFileInternals;
|
|
2694
|
+
}
|
|
2695
|
+
declare const $ZodFile: $constructor<$ZodFile>;
|
|
2696
|
+
interface $ZodTransformDef extends $ZodTypeDef {
|
|
2697
|
+
type: "transform";
|
|
2698
|
+
transform: (input: unknown, payload: ParsePayload<unknown>) => MaybeAsync<unknown>;
|
|
2699
|
+
}
|
|
2700
|
+
interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
|
|
2701
|
+
def: $ZodTransformDef;
|
|
2702
|
+
isst: never;
|
|
2703
|
+
}
|
|
2704
|
+
interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
|
|
2705
|
+
_zod: $ZodTransformInternals<O, I>;
|
|
2706
|
+
}
|
|
2707
|
+
declare const $ZodTransform: $constructor<$ZodTransform>;
|
|
2708
|
+
interface $ZodOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2709
|
+
type: "optional";
|
|
2710
|
+
innerType: T;
|
|
2711
|
+
}
|
|
2712
|
+
interface $ZodOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | undefined, input<T> | undefined> {
|
|
2713
|
+
def: $ZodOptionalDef<T>;
|
|
2714
|
+
optin: "optional";
|
|
2715
|
+
optout: "optional";
|
|
2716
|
+
isst: never;
|
|
2717
|
+
values: T["_zod"]["values"];
|
|
2718
|
+
pattern: T["_zod"]["pattern"];
|
|
2719
|
+
}
|
|
2720
|
+
interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
|
|
2721
|
+
_zod: $ZodOptionalInternals<T>;
|
|
2722
|
+
}
|
|
2723
|
+
declare const $ZodOptional: $constructor<$ZodOptional>;
|
|
2724
|
+
interface $ZodExactOptionalDef<T extends SomeType = $ZodType> extends $ZodOptionalDef<T> {}
|
|
2725
|
+
interface $ZodExactOptionalInternals<T extends SomeType = $ZodType> extends $ZodOptionalInternals<T> {
|
|
2726
|
+
def: $ZodExactOptionalDef<T>;
|
|
2727
|
+
output: output<T>;
|
|
2728
|
+
input: input<T>;
|
|
2729
|
+
}
|
|
2730
|
+
interface $ZodExactOptional<T extends SomeType = $ZodType> extends $ZodType {
|
|
2731
|
+
_zod: $ZodExactOptionalInternals<T>;
|
|
2732
|
+
}
|
|
2733
|
+
declare const $ZodExactOptional: $constructor<$ZodExactOptional>;
|
|
2734
|
+
interface $ZodNullableDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2735
|
+
type: "nullable";
|
|
2736
|
+
innerType: T;
|
|
2737
|
+
}
|
|
2738
|
+
interface $ZodNullableInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | null, input<T> | null> {
|
|
2739
|
+
def: $ZodNullableDef<T>;
|
|
2740
|
+
optin: T["_zod"]["optin"];
|
|
2741
|
+
optout: T["_zod"]["optout"];
|
|
2742
|
+
isst: never;
|
|
2743
|
+
values: T["_zod"]["values"];
|
|
2744
|
+
pattern: T["_zod"]["pattern"];
|
|
2745
|
+
}
|
|
2746
|
+
interface $ZodNullable<T extends SomeType = $ZodType> extends $ZodType {
|
|
2747
|
+
_zod: $ZodNullableInternals<T>;
|
|
2748
|
+
}
|
|
2749
|
+
declare const $ZodNullable: $constructor<$ZodNullable>;
|
|
2750
|
+
interface $ZodDefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2751
|
+
type: "default";
|
|
2752
|
+
innerType: T;
|
|
2753
|
+
/** The default value. May be a getter. */
|
|
2754
|
+
defaultValue: NoUndefined<output<T>>;
|
|
2755
|
+
}
|
|
2756
|
+
interface $ZodDefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
|
|
2757
|
+
def: $ZodDefaultDef<T>;
|
|
2758
|
+
optin: "optional";
|
|
2759
|
+
optout?: "optional" | undefined;
|
|
2760
|
+
isst: never;
|
|
2761
|
+
values: T["_zod"]["values"];
|
|
2762
|
+
}
|
|
2763
|
+
interface $ZodDefault<T extends SomeType = $ZodType> extends $ZodType {
|
|
2764
|
+
_zod: $ZodDefaultInternals<T>;
|
|
2765
|
+
}
|
|
2766
|
+
declare const $ZodDefault: $constructor<$ZodDefault>;
|
|
2767
|
+
interface $ZodPrefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2768
|
+
type: "prefault";
|
|
2769
|
+
innerType: T;
|
|
2770
|
+
/** The default value. May be a getter. */
|
|
2771
|
+
defaultValue: input<T>;
|
|
2772
|
+
}
|
|
2773
|
+
interface $ZodPrefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
|
|
2774
|
+
def: $ZodPrefaultDef<T>;
|
|
2775
|
+
optin: "optional";
|
|
2776
|
+
optout?: "optional" | undefined;
|
|
2777
|
+
isst: never;
|
|
2778
|
+
values: T["_zod"]["values"];
|
|
2779
|
+
}
|
|
2780
|
+
interface $ZodPrefault<T extends SomeType = $ZodType> extends $ZodType {
|
|
2781
|
+
_zod: $ZodPrefaultInternals<T>;
|
|
2782
|
+
}
|
|
2783
|
+
declare const $ZodPrefault: $constructor<$ZodPrefault>;
|
|
2784
|
+
interface $ZodNonOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2785
|
+
type: "nonoptional";
|
|
2786
|
+
innerType: T;
|
|
2787
|
+
}
|
|
2788
|
+
interface $ZodNonOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, NoUndefined<input<T>>> {
|
|
2789
|
+
def: $ZodNonOptionalDef<T>;
|
|
2790
|
+
isst: $ZodIssueInvalidType;
|
|
2791
|
+
values: T["_zod"]["values"];
|
|
2792
|
+
optin: "optional" | undefined;
|
|
2793
|
+
optout: "optional" | undefined;
|
|
2794
|
+
}
|
|
2795
|
+
interface $ZodNonOptional<T extends SomeType = $ZodType> extends $ZodType {
|
|
2796
|
+
_zod: $ZodNonOptionalInternals<T>;
|
|
2797
|
+
}
|
|
2798
|
+
declare const $ZodNonOptional: $constructor<$ZodNonOptional>;
|
|
2799
|
+
interface $ZodSuccessDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2800
|
+
type: "success";
|
|
2801
|
+
innerType: T;
|
|
2802
|
+
}
|
|
2803
|
+
interface $ZodSuccessInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input<T>> {
|
|
2804
|
+
def: $ZodSuccessDef<T>;
|
|
2805
|
+
isst: never;
|
|
2806
|
+
optin: T["_zod"]["optin"];
|
|
2807
|
+
optout: "optional" | undefined;
|
|
2808
|
+
}
|
|
2809
|
+
interface $ZodSuccess<T extends SomeType = $ZodType> extends $ZodType {
|
|
2810
|
+
_zod: $ZodSuccessInternals<T>;
|
|
2811
|
+
}
|
|
2812
|
+
declare const $ZodSuccess: $constructor<$ZodSuccess>;
|
|
2813
|
+
interface $ZodCatchCtx extends ParsePayload {
|
|
2814
|
+
/** @deprecated Use `ctx.issues` */
|
|
2815
|
+
error: {
|
|
2816
|
+
issues: $ZodIssue[];
|
|
2817
|
+
};
|
|
2818
|
+
/** @deprecated Use `ctx.value` */
|
|
2819
|
+
input: unknown;
|
|
2820
|
+
}
|
|
2821
|
+
interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2822
|
+
type: "catch";
|
|
2823
|
+
innerType: T;
|
|
2824
|
+
catchValue: (ctx: $ZodCatchCtx) => unknown;
|
|
2825
|
+
}
|
|
2826
|
+
interface $ZodCatchInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
|
|
2827
|
+
def: $ZodCatchDef<T>;
|
|
2828
|
+
optin: T["_zod"]["optin"];
|
|
2829
|
+
optout: T["_zod"]["optout"];
|
|
2830
|
+
isst: never;
|
|
2831
|
+
values: T["_zod"]["values"];
|
|
2832
|
+
}
|
|
2833
|
+
interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
|
|
2834
|
+
_zod: $ZodCatchInternals<T>;
|
|
2835
|
+
}
|
|
2836
|
+
declare const $ZodCatch: $constructor<$ZodCatch>;
|
|
2837
|
+
interface $ZodNaNDef extends $ZodTypeDef {
|
|
2838
|
+
type: "nan";
|
|
2839
|
+
}
|
|
2840
|
+
interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
|
|
2841
|
+
def: $ZodNaNDef;
|
|
2842
|
+
isst: $ZodIssueInvalidType;
|
|
2843
|
+
}
|
|
2844
|
+
interface $ZodNaN extends $ZodType {
|
|
2845
|
+
_zod: $ZodNaNInternals;
|
|
2846
|
+
}
|
|
2847
|
+
declare const $ZodNaN: $constructor<$ZodNaN>;
|
|
2848
|
+
interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2849
|
+
type: "pipe";
|
|
2850
|
+
in: A;
|
|
2851
|
+
out: B;
|
|
2852
|
+
/** Only defined inside $ZodCodec instances. */
|
|
2853
|
+
transform?: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
|
|
2854
|
+
/** Only defined inside $ZodCodec instances. */
|
|
2855
|
+
reverseTransform?: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
|
|
2856
|
+
}
|
|
2857
|
+
interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
|
|
2858
|
+
def: $ZodPipeDef<A, B>;
|
|
2859
|
+
isst: never;
|
|
2860
|
+
values: A["_zod"]["values"];
|
|
2861
|
+
optin: A["_zod"]["optin"];
|
|
2862
|
+
optout: B["_zod"]["optout"];
|
|
2863
|
+
propValues: A["_zod"]["propValues"];
|
|
2864
|
+
}
|
|
2865
|
+
interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
2866
|
+
_zod: $ZodPipeInternals<A, B>;
|
|
2867
|
+
}
|
|
2868
|
+
declare const $ZodPipe: $constructor<$ZodPipe>;
|
|
2869
|
+
interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2870
|
+
type: "readonly";
|
|
2871
|
+
innerType: T;
|
|
2872
|
+
}
|
|
2873
|
+
interface $ZodReadonlyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<MakeReadonly<output<T>>, MakeReadonly<input<T>>> {
|
|
2874
|
+
def: $ZodReadonlyDef<T>;
|
|
2875
|
+
optin: T["_zod"]["optin"];
|
|
2876
|
+
optout: T["_zod"]["optout"];
|
|
2877
|
+
isst: never;
|
|
2878
|
+
propValues: T["_zod"]["propValues"];
|
|
2879
|
+
values: T["_zod"]["values"];
|
|
2880
|
+
}
|
|
2881
|
+
interface $ZodReadonly<T extends SomeType = $ZodType> extends $ZodType {
|
|
2882
|
+
_zod: $ZodReadonlyInternals<T>;
|
|
2883
|
+
}
|
|
2884
|
+
declare const $ZodReadonly: $constructor<$ZodReadonly>;
|
|
2885
|
+
interface $ZodTemplateLiteralDef extends $ZodTypeDef {
|
|
2886
|
+
type: "template_literal";
|
|
2887
|
+
parts: $ZodTemplateLiteralPart[];
|
|
2888
|
+
format?: string | undefined;
|
|
2889
|
+
}
|
|
2890
|
+
interface $ZodTemplateLiteralInternals<Template extends string = string> extends $ZodTypeInternals<Template, Template> {
|
|
2891
|
+
pattern: RegExp;
|
|
2892
|
+
def: $ZodTemplateLiteralDef;
|
|
2893
|
+
isst: $ZodIssueInvalidType;
|
|
2894
|
+
}
|
|
2895
|
+
interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
|
|
2896
|
+
_zod: $ZodTemplateLiteralInternals<Template>;
|
|
2897
|
+
}
|
|
2898
|
+
type LiteralPart = Exclude<Literal, symbol>;
|
|
2899
|
+
interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
|
|
2900
|
+
pattern: RegExp;
|
|
2901
|
+
}
|
|
2902
|
+
interface SchemaPart extends $ZodType {
|
|
2903
|
+
_zod: SchemaPartInternals;
|
|
2904
|
+
}
|
|
2905
|
+
type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
|
|
2906
|
+
declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
|
|
2907
|
+
type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
|
|
2908
|
+
type $ZodFunctionIn = $ZodFunctionArgs;
|
|
2909
|
+
type $ZodFunctionOut = $ZodType;
|
|
2910
|
+
type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input<Returns>;
|
|
2911
|
+
type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => MaybeAsync<input<Returns>>;
|
|
2912
|
+
type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => output<Returns>;
|
|
2913
|
+
type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => Promise<output<Returns>>;
|
|
2914
|
+
interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
|
|
2915
|
+
type: "function";
|
|
2916
|
+
input: In;
|
|
2917
|
+
output: Out;
|
|
2918
|
+
}
|
|
2919
|
+
interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
|
|
2920
|
+
def: $ZodFunctionDef<Args, Returns>;
|
|
2921
|
+
isst: $ZodIssueInvalidType;
|
|
2922
|
+
}
|
|
2923
|
+
interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodType<any, any, $ZodFunctionInternals<Args, Returns>> {
|
|
2924
|
+
/** @deprecated */
|
|
2925
|
+
_def: $ZodFunctionDef<Args, Returns>;
|
|
2926
|
+
_input: $InferInnerFunctionType<Args, Returns>;
|
|
2927
|
+
_output: $InferOuterFunctionType<Args, Returns>;
|
|
2928
|
+
implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
|
|
2929
|
+
implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
|
|
2930
|
+
input<const Items extends TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest): $ZodFunction<$ZodTuple<Items, Rest>, Returns>;
|
|
2931
|
+
input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
|
|
2932
|
+
input(...args: any[]): $ZodFunction<any, Returns>;
|
|
2933
|
+
output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
|
|
2934
|
+
}
|
|
2935
|
+
declare const $ZodFunction: $constructor<$ZodFunction>;
|
|
2936
|
+
interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2937
|
+
type: "promise";
|
|
2938
|
+
innerType: T;
|
|
2939
|
+
}
|
|
2940
|
+
interface $ZodPromiseInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T>>, MaybeAsync<input<T>>> {
|
|
2941
|
+
def: $ZodPromiseDef<T>;
|
|
2942
|
+
isst: never;
|
|
2943
|
+
}
|
|
2944
|
+
interface $ZodPromise<T extends SomeType = $ZodType> extends $ZodType {
|
|
2945
|
+
_zod: $ZodPromiseInternals<T>;
|
|
2946
|
+
}
|
|
2947
|
+
declare const $ZodPromise: $constructor<$ZodPromise>;
|
|
2948
|
+
interface $ZodLazyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2949
|
+
type: "lazy";
|
|
2950
|
+
getter: () => T;
|
|
2951
|
+
}
|
|
2952
|
+
interface $ZodLazyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
|
|
2953
|
+
def: $ZodLazyDef<T>;
|
|
2954
|
+
isst: never;
|
|
2955
|
+
/** Auto-cached way to retrieve the inner schema */
|
|
2956
|
+
innerType: T;
|
|
2957
|
+
pattern: T["_zod"]["pattern"];
|
|
2958
|
+
propValues: T["_zod"]["propValues"];
|
|
2959
|
+
optin: T["_zod"]["optin"];
|
|
2960
|
+
optout: T["_zod"]["optout"];
|
|
2961
|
+
}
|
|
2962
|
+
interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
|
|
2963
|
+
_zod: $ZodLazyInternals<T>;
|
|
2964
|
+
}
|
|
2965
|
+
declare const $ZodLazy: $constructor<$ZodLazy>;
|
|
2966
|
+
interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
|
|
2967
|
+
type: "custom";
|
|
2968
|
+
check: "custom";
|
|
2969
|
+
path?: PropertyKey[] | undefined;
|
|
2970
|
+
error?: $ZodErrorMap | undefined;
|
|
2971
|
+
params?: Record<string, any> | undefined;
|
|
2972
|
+
fn: (arg: O) => unknown;
|
|
2973
|
+
}
|
|
2974
|
+
interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, $ZodCheckInternals<O> {
|
|
2975
|
+
def: $ZodCustomDef;
|
|
2976
|
+
issc: $ZodIssue;
|
|
2977
|
+
isst: never;
|
|
2978
|
+
bag: LoosePartial<{
|
|
2979
|
+
Class: typeof Class;
|
|
2980
|
+
}>;
|
|
2981
|
+
}
|
|
2982
|
+
interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
|
|
2983
|
+
_zod: $ZodCustomInternals<O, I>;
|
|
2984
|
+
}
|
|
2985
|
+
declare const $ZodCustom: $constructor<$ZodCustom>;
|
|
2986
|
+
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; //#endregion
|
|
2987
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/checks.d.cts
|
|
2988
|
+
interface $ZodCheckDef {
|
|
2989
|
+
check: string;
|
|
2990
|
+
error?: $ZodErrorMap<never> | undefined;
|
|
2991
|
+
/** If true, no later checks will be executed if this check fails. Default `false`. */
|
|
2992
|
+
abort?: boolean | undefined;
|
|
2993
|
+
/** If provided, this check will only be executed if the function returns `true`. Defaults to `payload => z.util.isAborted(payload)`. */
|
|
2994
|
+
when?: ((payload: ParsePayload) => boolean) | undefined;
|
|
2995
|
+
}
|
|
2996
|
+
interface $ZodCheckInternals<T> {
|
|
2997
|
+
def: $ZodCheckDef;
|
|
2998
|
+
/** The set of issues this check might throw. */
|
|
2999
|
+
issc?: $ZodIssueBase;
|
|
3000
|
+
check(payload: ParsePayload<T>): MaybeAsync<void>;
|
|
3001
|
+
onattach: ((schema: $ZodType) => void)[];
|
|
3002
|
+
}
|
|
3003
|
+
interface $ZodCheck<in T = never> {
|
|
3004
|
+
_zod: $ZodCheckInternals<T>;
|
|
3005
|
+
}
|
|
3006
|
+
declare const $ZodCheck: $constructor<$ZodCheck<any>>;
|
|
3007
|
+
interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
|
|
3008
|
+
check: "max_length";
|
|
3009
|
+
maximum: number;
|
|
3010
|
+
}
|
|
3011
|
+
interface $ZodCheckMaxLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
|
|
3012
|
+
def: $ZodCheckMaxLengthDef;
|
|
3013
|
+
issc: $ZodIssueTooBig<T>;
|
|
3014
|
+
}
|
|
3015
|
+
interface $ZodCheckMaxLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
|
|
3016
|
+
_zod: $ZodCheckMaxLengthInternals<T>;
|
|
3017
|
+
}
|
|
3018
|
+
declare const $ZodCheckMaxLength: $constructor<$ZodCheckMaxLength>;
|
|
3019
|
+
interface $ZodCheckMinLengthDef extends $ZodCheckDef {
|
|
3020
|
+
check: "min_length";
|
|
3021
|
+
minimum: number;
|
|
3022
|
+
}
|
|
3023
|
+
interface $ZodCheckMinLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
|
|
3024
|
+
def: $ZodCheckMinLengthDef;
|
|
3025
|
+
issc: $ZodIssueTooSmall<T>;
|
|
3026
|
+
}
|
|
3027
|
+
interface $ZodCheckMinLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
|
|
3028
|
+
_zod: $ZodCheckMinLengthInternals<T>;
|
|
3029
|
+
}
|
|
3030
|
+
declare const $ZodCheckMinLength: $constructor<$ZodCheckMinLength>;
|
|
3031
|
+
interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
|
|
3032
|
+
check: "length_equals";
|
|
3033
|
+
length: number;
|
|
3034
|
+
}
|
|
3035
|
+
interface $ZodCheckLengthEqualsInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
|
|
3036
|
+
def: $ZodCheckLengthEqualsDef;
|
|
3037
|
+
issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
|
|
3038
|
+
}
|
|
3039
|
+
interface $ZodCheckLengthEquals<T extends HasLength = HasLength> extends $ZodCheck<T> {
|
|
3040
|
+
_zod: $ZodCheckLengthEqualsInternals<T>;
|
|
3041
|
+
}
|
|
3042
|
+
declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
|
|
3043
|
+
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"; //#endregion
|
|
3044
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.d.cts
|
|
3045
|
+
interface $ZodIssueBase {
|
|
3046
|
+
readonly code?: string;
|
|
3047
|
+
readonly input?: unknown;
|
|
3048
|
+
readonly path: PropertyKey[];
|
|
3049
|
+
readonly message: string;
|
|
3050
|
+
}
|
|
3051
|
+
type $ZodInvalidTypeExpected = "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "undefined" | "null" | "never" | "void" | "date" | "array" | "object" | "tuple" | "record" | "map" | "set" | "file" | "nonoptional" | "nan" | "function" | (string & {});
|
|
3052
|
+
interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
|
|
3053
|
+
readonly code: "invalid_type";
|
|
3054
|
+
readonly expected: $ZodInvalidTypeExpected;
|
|
3055
|
+
readonly input?: Input;
|
|
3056
|
+
}
|
|
3057
|
+
interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
|
|
3058
|
+
readonly code: "too_big";
|
|
3059
|
+
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
3060
|
+
readonly maximum: number | bigint;
|
|
3061
|
+
readonly inclusive?: boolean;
|
|
3062
|
+
readonly exact?: boolean;
|
|
3063
|
+
readonly input?: Input;
|
|
3064
|
+
}
|
|
3065
|
+
interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
|
|
3066
|
+
readonly code: "too_small";
|
|
3067
|
+
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
3068
|
+
readonly minimum: number | bigint;
|
|
3069
|
+
/** True if the allowable range includes the minimum */
|
|
3070
|
+
readonly inclusive?: boolean;
|
|
3071
|
+
/** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
|
|
3072
|
+
readonly exact?: boolean;
|
|
3073
|
+
readonly input?: Input;
|
|
3074
|
+
}
|
|
3075
|
+
interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
|
|
3076
|
+
readonly code: "invalid_format";
|
|
3077
|
+
readonly format: $ZodStringFormats | (string & {});
|
|
3078
|
+
readonly pattern?: string;
|
|
3079
|
+
readonly input?: string;
|
|
3080
|
+
}
|
|
3081
|
+
interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
|
|
3082
|
+
readonly code: "not_multiple_of";
|
|
3083
|
+
readonly divisor: number;
|
|
3084
|
+
readonly input?: Input;
|
|
3085
|
+
}
|
|
3086
|
+
interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
|
|
3087
|
+
readonly code: "unrecognized_keys";
|
|
3088
|
+
readonly keys: string[];
|
|
3089
|
+
readonly input?: Record<string, unknown>;
|
|
3090
|
+
}
|
|
3091
|
+
interface $ZodIssueInvalidUnionNoMatch extends $ZodIssueBase {
|
|
3092
|
+
readonly code: "invalid_union";
|
|
3093
|
+
readonly errors: $ZodIssue[][];
|
|
3094
|
+
readonly input?: unknown;
|
|
3095
|
+
readonly discriminator?: string | undefined;
|
|
3096
|
+
readonly inclusive?: true;
|
|
3097
|
+
}
|
|
3098
|
+
interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
|
|
3099
|
+
readonly code: "invalid_union";
|
|
3100
|
+
readonly errors: [];
|
|
3101
|
+
readonly input?: unknown;
|
|
3102
|
+
readonly discriminator?: string | undefined;
|
|
3103
|
+
readonly inclusive: false;
|
|
3104
|
+
}
|
|
3105
|
+
type $ZodIssueInvalidUnion = $ZodIssueInvalidUnionNoMatch | $ZodIssueInvalidUnionMultipleMatch;
|
|
3106
|
+
interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
|
|
3107
|
+
readonly code: "invalid_key";
|
|
3108
|
+
readonly origin: "map" | "record";
|
|
3109
|
+
readonly issues: $ZodIssue[];
|
|
3110
|
+
readonly input?: Input;
|
|
3111
|
+
}
|
|
3112
|
+
interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
|
|
3113
|
+
readonly code: "invalid_element";
|
|
3114
|
+
readonly origin: "map" | "set";
|
|
3115
|
+
readonly key: unknown;
|
|
3116
|
+
readonly issues: $ZodIssue[];
|
|
3117
|
+
readonly input?: Input;
|
|
3118
|
+
}
|
|
3119
|
+
interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
|
|
3120
|
+
readonly code: "invalid_value";
|
|
3121
|
+
readonly values: Primitive[];
|
|
3122
|
+
readonly input?: Input;
|
|
3123
|
+
}
|
|
3124
|
+
interface $ZodIssueCustom extends $ZodIssueBase {
|
|
3125
|
+
readonly code: "custom";
|
|
3126
|
+
readonly params?: Record<string, any> | undefined;
|
|
3127
|
+
readonly input?: unknown;
|
|
3128
|
+
}
|
|
3129
|
+
type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
|
|
3130
|
+
type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
|
|
3131
|
+
type RawIssue$1<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
|
|
3132
|
+
/** The input data */readonly input: unknown; /** The schema or check that originated this issue. */
|
|
3133
|
+
readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will continue executing checks/refinements after this issue. */
|
|
3134
|
+
readonly continue?: boolean | undefined;
|
|
3135
|
+
} & Record<string, unknown>> : never;
|
|
3136
|
+
type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;
|
|
3137
|
+
interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {
|
|
3138
|
+
(issue: $ZodRawIssue<T>): {
|
|
3139
|
+
message: string;
|
|
3140
|
+
} | string | undefined | null;
|
|
3141
|
+
}
|
|
3142
|
+
interface $ZodError<T = unknown> extends Error {
|
|
3143
|
+
type: T;
|
|
3144
|
+
issues: $ZodIssue[];
|
|
3145
|
+
_zod: {
|
|
3146
|
+
output: T;
|
|
3147
|
+
def: $ZodIssue[];
|
|
3148
|
+
};
|
|
3149
|
+
stack?: string;
|
|
3150
|
+
name: string;
|
|
3151
|
+
}
|
|
3152
|
+
declare const $ZodError: $constructor<$ZodError>;
|
|
3153
|
+
type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
|
|
3154
|
+
type _FlattenedError<T, U = string> = {
|
|
3155
|
+
formErrors: U[];
|
|
3156
|
+
fieldErrors: { [P in keyof T]?: U[] };
|
|
3157
|
+
};
|
|
3158
|
+
type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U> } : T extends any[] ? {
|
|
3159
|
+
[k: number]: $ZodFormattedError<T[number], U>;
|
|
3160
|
+
} : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U> }> : any;
|
|
3161
|
+
type $ZodFormattedError<T, U = string> = {
|
|
3162
|
+
_errors: U[];
|
|
3163
|
+
} & Flatten<_ZodFormattedError<T, U>>; //#endregion
|
|
3164
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.d.cts
|
|
3165
|
+
type ZodTrait = {
|
|
3166
|
+
_zod: {
|
|
3167
|
+
def: any;
|
|
3168
|
+
[k: string]: any;
|
|
3169
|
+
};
|
|
3170
|
+
};
|
|
3171
|
+
interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
|
|
3172
|
+
new (def: D): T;
|
|
3173
|
+
init(inst: T, def: D): asserts inst is T;
|
|
3174
|
+
}
|
|
3175
|
+
declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
|
|
3176
|
+
Parent?: typeof Class;
|
|
3177
|
+
}): $constructor<T, D>;
|
|
3178
|
+
declare const $brand: unique symbol;
|
|
3179
|
+
type $brand<T extends string | number | symbol = string | number | symbol> = {
|
|
3180
|
+
[$brand]: { [k in T]: true };
|
|
3181
|
+
};
|
|
3182
|
+
type $ZodBranded<T extends SomeType, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T & (Dir extends "inout" ? {
|
|
3183
|
+
_zod: {
|
|
3184
|
+
input: input<T> & $brand<Brand>;
|
|
3185
|
+
output: output<T> & $brand<Brand>;
|
|
3186
|
+
};
|
|
3187
|
+
} : Dir extends "in" ? {
|
|
3188
|
+
_zod: {
|
|
3189
|
+
input: input<T> & $brand<Brand>;
|
|
3190
|
+
};
|
|
3191
|
+
} : {
|
|
3192
|
+
_zod: {
|
|
3193
|
+
output: output<T> & $brand<Brand>;
|
|
3194
|
+
};
|
|
3195
|
+
});
|
|
3196
|
+
type input<T> = T extends {
|
|
3197
|
+
_zod: {
|
|
3198
|
+
input: any;
|
|
3199
|
+
};
|
|
3200
|
+
} ? T["_zod"]["input"] : unknown;
|
|
3201
|
+
type output<T> = T extends {
|
|
3202
|
+
_zod: {
|
|
3203
|
+
output: any;
|
|
3204
|
+
};
|
|
3205
|
+
} ? T["_zod"]["output"] : unknown; //#endregion
|
|
3206
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.d.cts
|
|
3207
|
+
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] ? {} : {
|
|
3208
|
+
error?: string | $ZodErrorMap<IssueTypes> | undefined; /** @deprecated This parameter is deprecated. Use `error` instead. */
|
|
3209
|
+
message?: string | undefined;
|
|
3210
|
+
})>>>;
|
|
3211
|
+
type TypeParams<T extends $ZodType = $ZodType & {
|
|
3212
|
+
_isst: never;
|
|
3213
|
+
}, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
|
|
3214
|
+
type CheckParams<T extends $ZodCheck = $ZodCheck, // & { _issc: never },
|
|
3215
|
+
AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
|
|
3216
|
+
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>;
|
|
3217
|
+
type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
|
|
3218
|
+
type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
|
|
3219
|
+
type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
|
|
3220
|
+
type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
|
|
3221
|
+
type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
|
|
3222
|
+
type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
|
|
3223
|
+
type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
|
|
3224
|
+
type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
|
|
3225
|
+
/** The schema or check that originated this issue. */readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
|
|
3226
|
+
readonly continue?: boolean | undefined;
|
|
3227
|
+
} & Record<string, unknown>> : never;
|
|
3228
|
+
interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
|
|
3229
|
+
addIssue(arg: string | $ZodSuperRefineIssue): void;
|
|
3230
|
+
} //#endregion
|
|
3231
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/errors.d.cts
|
|
3232
|
+
/** An Error-like class used to store Zod validation issues. */
|
|
3233
|
+
interface ZodError<T = unknown> extends $ZodError<T> {
|
|
3234
|
+
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
3235
|
+
format(): $ZodFormattedError<T>;
|
|
3236
|
+
format<U>(mapper: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
|
|
3237
|
+
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
3238
|
+
flatten(): $ZodFlattenedError<T>;
|
|
3239
|
+
flatten<U>(mapper: (issue: $ZodIssue) => U): $ZodFlattenedError<T, U>;
|
|
3240
|
+
/** @deprecated Push directly to `.issues` instead. */
|
|
3241
|
+
addIssue(issue: $ZodIssue): void;
|
|
3242
|
+
/** @deprecated Push directly to `.issues` instead. */
|
|
3243
|
+
addIssues(issues: $ZodIssue[]): void;
|
|
3244
|
+
/** @deprecated Check `err.issues.length === 0` instead. */
|
|
3245
|
+
isEmpty: boolean;
|
|
3246
|
+
}
|
|
3247
|
+
declare const ZodError: $constructor<ZodError>; //#endregion
|
|
3248
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/parse.d.cts
|
|
3249
|
+
type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
|
|
3250
|
+
type ZodSafeParseSuccess<T> = {
|
|
3251
|
+
success: true;
|
|
3252
|
+
data: T;
|
|
3253
|
+
error?: never;
|
|
3254
|
+
};
|
|
3255
|
+
type ZodSafeParseError<T> = {
|
|
3256
|
+
success: false;
|
|
3257
|
+
data?: never;
|
|
3258
|
+
error: ZodError<T>;
|
|
3259
|
+
}; //#endregion
|
|
3260
|
+
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.d.cts
|
|
3261
|
+
type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
|
|
3262
|
+
interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
|
|
3263
|
+
def: Internals["def"];
|
|
3264
|
+
type: Internals["def"]["type"];
|
|
3265
|
+
/** @deprecated Use `.def` instead. */
|
|
3266
|
+
_def: Internals["def"];
|
|
3267
|
+
/** @deprecated Use `z.output<typeof schema>` instead. */
|
|
3268
|
+
_output: Internals["output"];
|
|
3269
|
+
/** @deprecated Use `z.input<typeof schema>` instead. */
|
|
3270
|
+
_input: Internals["input"];
|
|
3271
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3272
|
+
/** Converts this schema to a JSON Schema representation. */
|
|
3273
|
+
toJSONSchema(params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<this>;
|
|
3274
|
+
check(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
|
|
3275
|
+
with(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
|
|
3276
|
+
clone(def?: Internals["def"], params?: {
|
|
3277
|
+
parent: boolean;
|
|
3278
|
+
}): this;
|
|
3279
|
+
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;
|
|
3280
|
+
brand<T extends PropertyKey = PropertyKey, Dir extends "in" | "out" | "inout" = "out">(value?: T): PropertyKey extends T ? this : $ZodBranded<this, T, Dir>;
|
|
3281
|
+
parse(data: unknown, params?: ParseContext<$ZodIssue>): output<this>;
|
|
3282
|
+
safeParse(data: unknown, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
|
|
3283
|
+
parseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
|
|
3284
|
+
safeParseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
|
|
3285
|
+
spa: (data: unknown, params?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<this>>>;
|
|
3286
|
+
encode(data: output<this>, params?: ParseContext<$ZodIssue>): input<this>;
|
|
3287
|
+
decode(data: input<this>, params?: ParseContext<$ZodIssue>): output<this>;
|
|
3288
|
+
encodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<input<this>>;
|
|
3289
|
+
decodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
|
|
3290
|
+
safeEncode(data: output<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<input<this>>;
|
|
3291
|
+
safeDecode(data: input<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
|
|
3292
|
+
safeEncodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<input<this>>>;
|
|
3293
|
+
safeDecodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
|
|
3294
|
+
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;
|
|
3295
|
+
superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>): this;
|
|
3296
|
+
overwrite(fn: (x: output<this>) => output<this>): this;
|
|
3297
|
+
optional(): ZodOptional<this>;
|
|
3298
|
+
exactOptional(): ZodExactOptional<this>;
|
|
3299
|
+
nonoptional(params?: string | $ZodNonOptionalParams): ZodNonOptional<this>;
|
|
3300
|
+
nullable(): ZodNullable<this>;
|
|
3301
|
+
nullish(): ZodOptional<ZodNullable<this>>;
|
|
3302
|
+
default(def: NoUndefined<output<this>>): ZodDefault<this>;
|
|
3303
|
+
default(def: () => NoUndefined<output<this>>): ZodDefault<this>;
|
|
3304
|
+
prefault(def: () => input<this>): ZodPrefault<this>;
|
|
3305
|
+
prefault(def: input<this>): ZodPrefault<this>;
|
|
3306
|
+
array(): ZodArray<this>;
|
|
3307
|
+
or<T extends SomeType>(option: T): ZodUnion<[this, T]>;
|
|
3308
|
+
and<T extends SomeType>(incoming: T): ZodIntersection<this, T>;
|
|
3309
|
+
transform<NewOut>(transform: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, output<this>>>;
|
|
3310
|
+
catch(def: output<this>): ZodCatch<this>;
|
|
3311
|
+
catch(def: (ctx: $ZodCatchCtx) => output<this>): ZodCatch<this>;
|
|
3312
|
+
pipe<T extends $ZodType<any, output<this>>>(target: T | $ZodType<any, output<this>>): ZodPipe<this, T>;
|
|
3313
|
+
readonly(): ZodReadonly<this>;
|
|
3314
|
+
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
|
|
3315
|
+
describe(description: string): this;
|
|
3316
|
+
description?: string;
|
|
3317
|
+
/** Returns the metadata associated with this instance in `z.globalRegistry` */
|
|
3318
|
+
meta(): $replace<GlobalMeta, this> | undefined;
|
|
3319
|
+
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
|
|
3320
|
+
meta(data: $replace<GlobalMeta, this>): this;
|
|
3321
|
+
/** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
|
|
3322
|
+
*
|
|
3323
|
+
* ```ts
|
|
3324
|
+
* const schema = z.string().optional();
|
|
3325
|
+
* const isOptional = schema.safeParse(undefined).success; // true
|
|
3326
|
+
* ```
|
|
3327
|
+
*/
|
|
3328
|
+
isOptional(): boolean;
|
|
3329
|
+
/**
|
|
3330
|
+
* @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
|
|
3331
|
+
*
|
|
3332
|
+
* ```ts
|
|
3333
|
+
* const schema = z.string().nullable();
|
|
3334
|
+
* const isNullable = schema.safeParse(null).success; // true
|
|
3335
|
+
* ```
|
|
3336
|
+
*/
|
|
3337
|
+
isNullable(): boolean;
|
|
3338
|
+
apply<T>(fn: (schema: this) => T): T;
|
|
3339
|
+
}
|
|
3340
|
+
interface _ZodType<out Internals extends $ZodTypeInternals = $ZodTypeInternals> extends ZodType<any, any, Internals> {}
|
|
3341
|
+
declare const ZodType: $constructor<ZodType>;
|
|
3342
|
+
interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T>>, $ZodArray<T> {
|
|
3343
|
+
element: T;
|
|
3344
|
+
min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
|
|
3345
|
+
nonempty(params?: string | $ZodCheckMinLengthParams): this;
|
|
3346
|
+
max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
|
|
3347
|
+
length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
|
|
3348
|
+
unwrap(): T;
|
|
3349
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3350
|
+
}
|
|
3351
|
+
declare const ZodArray: $constructor<ZodArray>;
|
|
3352
|
+
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] };
|
|
3353
|
+
interface ZodObject< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodLooseShape, out Config extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape, Config>>, $ZodObject<Shape, Config> {
|
|
3354
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3355
|
+
shape: Shape;
|
|
3356
|
+
keyof(): ZodEnum<ToEnum<keyof Shape & string>>;
|
|
3357
|
+
/** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
|
|
3358
|
+
catchall<T extends SomeType>(schema: T): ZodObject<Shape, $catchall<T>>;
|
|
3359
|
+
/** @deprecated Use `z.looseObject()` or `.loose()` instead. */
|
|
3360
|
+
passthrough(): ZodObject<Shape, $loose>;
|
|
3361
|
+
/** Consider `z.looseObject(A.shape)` instead */
|
|
3362
|
+
loose(): ZodObject<Shape, $loose>;
|
|
3363
|
+
/** Consider `z.strictObject(A.shape)` instead */
|
|
3364
|
+
strict(): ZodObject<Shape, $strict>;
|
|
3365
|
+
/** This is the default behavior. This method call is likely unnecessary. */
|
|
3366
|
+
strip(): ZodObject<Shape, $strip>;
|
|
3367
|
+
extend<U extends $ZodLooseShape>(shape: U): ZodObject<Extend<Shape, U>, Config>;
|
|
3368
|
+
safeExtend<U extends $ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, SomeType>>): ZodObject<Extend<Shape, U>, Config>;
|
|
3369
|
+
/**
|
|
3370
|
+
* @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
|
|
3371
|
+
*/
|
|
3372
|
+
merge<U extends ZodObject>(other: U): ZodObject<Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
|
|
3373
|
+
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>;
|
|
3374
|
+
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>;
|
|
3375
|
+
partial(): ZodObject<{ [k in keyof Shape]: ZodOptional<Shape[k]> }, Config>;
|
|
3376
|
+
partial<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ [k in keyof Shape]: k extends keyof M ? ZodOptional<Shape[k]> : Shape[k] }, Config>;
|
|
3377
|
+
required(): ZodObject<{ [k in keyof Shape]: ZodNonOptional<Shape[k]> }, Config>;
|
|
3378
|
+
required<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ [k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k] }, Config>;
|
|
3379
|
+
}
|
|
3380
|
+
declare const ZodObject: $constructor<ZodObject>;
|
|
3381
|
+
interface ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T>>, $ZodUnion<T> {
|
|
3382
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3383
|
+
options: T;
|
|
3384
|
+
}
|
|
3385
|
+
declare const ZodUnion: $constructor<ZodUnion>;
|
|
3386
|
+
interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A, B>>, $ZodIntersection<A, B> {
|
|
3387
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3388
|
+
}
|
|
3389
|
+
declare const ZodIntersection: $constructor<ZodIntersection>;
|
|
3390
|
+
interface ZodEnum< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
|
|
3391
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3392
|
+
enum: T;
|
|
3393
|
+
options: Array<T[keyof T]>;
|
|
3394
|
+
extract<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Pick<T, U[number]>>>;
|
|
3395
|
+
exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Omit<T, U[number]>>>;
|
|
3396
|
+
}
|
|
3397
|
+
declare const ZodEnum: $constructor<ZodEnum>;
|
|
3398
|
+
interface ZodTransform<O = unknown, I = unknown> extends _ZodType<$ZodTransformInternals<O, I>>, $ZodTransform<O, I> {
|
|
3399
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3400
|
+
}
|
|
3401
|
+
declare const ZodTransform: $constructor<ZodTransform>;
|
|
3402
|
+
interface ZodOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodOptionalInternals<T>>, $ZodOptional<T> {
|
|
3403
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3404
|
+
unwrap(): T;
|
|
3405
|
+
}
|
|
3406
|
+
declare const ZodOptional: $constructor<ZodOptional>;
|
|
3407
|
+
interface ZodExactOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodExactOptionalInternals<T>>, $ZodExactOptional<T> {
|
|
3408
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3409
|
+
unwrap(): T;
|
|
3410
|
+
}
|
|
3411
|
+
declare const ZodExactOptional: $constructor<ZodExactOptional>;
|
|
3412
|
+
interface ZodNullable<T extends SomeType = $ZodType> extends _ZodType<$ZodNullableInternals<T>>, $ZodNullable<T> {
|
|
3413
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3414
|
+
unwrap(): T;
|
|
3415
|
+
}
|
|
3416
|
+
declare const ZodNullable: $constructor<ZodNullable>;
|
|
3417
|
+
interface ZodDefault<T extends SomeType = $ZodType> extends _ZodType<$ZodDefaultInternals<T>>, $ZodDefault<T> {
|
|
3418
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3419
|
+
unwrap(): T;
|
|
3420
|
+
/** @deprecated Use `.unwrap()` instead. */
|
|
3421
|
+
removeDefault(): T;
|
|
3422
|
+
}
|
|
3423
|
+
declare const ZodDefault: $constructor<ZodDefault>;
|
|
3424
|
+
interface ZodPrefault<T extends SomeType = $ZodType> extends _ZodType<$ZodPrefaultInternals<T>>, $ZodPrefault<T> {
|
|
3425
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3426
|
+
unwrap(): T;
|
|
3427
|
+
}
|
|
3428
|
+
declare const ZodPrefault: $constructor<ZodPrefault>;
|
|
3429
|
+
interface ZodNonOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodNonOptionalInternals<T>>, $ZodNonOptional<T> {
|
|
3430
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3431
|
+
unwrap(): T;
|
|
3432
|
+
}
|
|
3433
|
+
declare const ZodNonOptional: $constructor<ZodNonOptional>;
|
|
3434
|
+
interface ZodCatch<T extends SomeType = $ZodType> extends _ZodType<$ZodCatchInternals<T>>, $ZodCatch<T> {
|
|
3435
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3436
|
+
unwrap(): T;
|
|
3437
|
+
/** @deprecated Use `.unwrap()` instead. */
|
|
3438
|
+
removeCatch(): T;
|
|
3439
|
+
}
|
|
3440
|
+
declare const ZodCatch: $constructor<ZodCatch>;
|
|
3441
|
+
interface ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A, B>>, $ZodPipe<A, B> {
|
|
3442
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3443
|
+
in: A;
|
|
3444
|
+
out: B;
|
|
3445
|
+
}
|
|
3446
|
+
declare const ZodPipe: $constructor<ZodPipe>;
|
|
3447
|
+
interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadonlyInternals<T>>, $ZodReadonly<T> {
|
|
3448
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
3449
|
+
unwrap(): T;
|
|
3450
|
+
}
|
|
3451
|
+
declare const ZodReadonly: $constructor<ZodReadonly>; //#endregion
|
|
3452
|
+
//#region ../loader-types/dist/index.d.mts
|
|
3453
|
+
//#region src/index.d.ts
|
|
3454
|
+
/**
|
|
3455
|
+
* Configuration options for initializing the Plucky chat widget.
|
|
3456
|
+
*
|
|
3457
|
+
* Pass this object to {@link Plucky} (chat-sdk) or {@link useChat} (React)
|
|
3458
|
+
* to embed the widget on the page.
|
|
3459
|
+
*
|
|
3460
|
+
* @example
|
|
3461
|
+
* ```ts
|
|
3462
|
+
* Plucky({
|
|
3463
|
+
* appId: 'my-app-id',
|
|
3464
|
+
* baseUrl: 'https://widget.plucky.ai',
|
|
3465
|
+
* user: { id: 'user-123', name: 'Jane Doe', email: 'jane@example.com' },
|
|
3466
|
+
* mode: 'push',
|
|
3467
|
+
* autoOpen: false,
|
|
3468
|
+
* })
|
|
3469
|
+
* ```
|
|
3470
|
+
*/
|
|
3471
|
+
/**
|
|
3472
|
+
* Serializable subset of a tool definition sent across the iframe boundary.
|
|
3473
|
+
* This does not include the callback — only metadata used by the widget
|
|
3474
|
+
* to display tool information and validate inputs.
|
|
3475
|
+
*
|
|
3476
|
+
* @see {@link ToolConfig} for the full tool definition including the callback.
|
|
3477
|
+
*/
|
|
3478
|
+
interface SimpleToolConfig {
|
|
3479
|
+
/** Unique name for the tool (e.g., `'getWeather'`). Must be unique across all registered tools. */
|
|
3480
|
+
name: string;
|
|
3481
|
+
/** Human-readable description of what the tool does. Shown to the AI assistant to help it decide when to use the tool. */
|
|
3482
|
+
description: string;
|
|
3483
|
+
/**
|
|
3484
|
+
* Text displayed in the chat while the tool is executing.
|
|
3485
|
+
* Set to `null` to suppress the loading indicator entirely.
|
|
3486
|
+
* @default undefined (uses the widget's default loading text)
|
|
3487
|
+
*/
|
|
3488
|
+
defaultLoadingText?: string | null;
|
|
3489
|
+
/**
|
|
3490
|
+
* Text displayed in the chat after the tool completes successfully.
|
|
3491
|
+
* Set to `null` to suppress the success message entirely.
|
|
3492
|
+
* Can be overridden per-invocation by returning `{ content, successText }` from the callback.
|
|
3493
|
+
* @default undefined (uses the widget's default success text)
|
|
3494
|
+
*/
|
|
3495
|
+
defaultSuccessText?: string | null;
|
|
3496
|
+
/**
|
|
3497
|
+
* JSON Schema or Zod object schema describing the tool's expected input.
|
|
3498
|
+
* When a Zod schema is provided, it is automatically converted to JSON Schema
|
|
3499
|
+
* before being sent to the AI model.
|
|
3500
|
+
*
|
|
3501
|
+
* @example
|
|
3502
|
+
* ```ts
|
|
3503
|
+
* import { z } from 'zod'
|
|
3504
|
+
*
|
|
3505
|
+
* inputSchema: z.object({
|
|
3506
|
+
* city: z.string().describe('City name to look up'),
|
|
3507
|
+
* units: z.enum(['celsius', 'fahrenheit']).optional(),
|
|
3508
|
+
* })
|
|
3509
|
+
* ```
|
|
3510
|
+
*/
|
|
3511
|
+
inputSchema?: ZodObject | Record<string, unknown>;
|
|
3512
|
+
}
|
|
3513
|
+
/**
|
|
3514
|
+
* Maps every postMessage `type` string to its payload type.
|
|
3515
|
+
*
|
|
3516
|
+
* Both the loader (host-side transport) and the widget (IframeCommunicator)
|
|
3517
|
+
* derive their typed `send` / `on` signatures from this interface.
|
|
3518
|
+
* Adding a new message here automatically requires typed handling on both sides.
|
|
3519
|
+
*/
|
|
3520
|
+
interface FrameMessageMap {
|
|
3521
|
+
PLUCKY_LOAD_CONFIG: {
|
|
3522
|
+
appId: string;
|
|
3523
|
+
user: Record<string, unknown>;
|
|
3524
|
+
mode: string;
|
|
3525
|
+
sessionToken?: string;
|
|
3526
|
+
tools: SimpleToolConfig[];
|
|
3527
|
+
tags: string[];
|
|
3528
|
+
};
|
|
3529
|
+
PLUCKY_SEND_MESSAGE: {
|
|
3530
|
+
content: string | unknown[];
|
|
3531
|
+
createChat: boolean;
|
|
3532
|
+
chatId?: string;
|
|
3533
|
+
};
|
|
3534
|
+
PLUCKY_SET_INPUT: {
|
|
3535
|
+
input: string;
|
|
3536
|
+
createChat: boolean;
|
|
3537
|
+
};
|
|
3538
|
+
PLUCKY_FOCUS_INPUT: void;
|
|
3539
|
+
PLUCKY_SET_MOBILE: {
|
|
3540
|
+
isMobile: boolean;
|
|
3541
|
+
};
|
|
3542
|
+
PLUCKY_SESSION_REQUEST: {
|
|
3543
|
+
reason?: string;
|
|
3544
|
+
};
|
|
3545
|
+
PLUCKY_TOOL_CONFIG_UPDATED: {
|
|
3546
|
+
tools: SimpleToolConfig[];
|
|
3547
|
+
};
|
|
3548
|
+
PLUCKY_WIDGET_MOUNTED: void;
|
|
3549
|
+
PLUCKY_SESSION_LOADED: void;
|
|
3550
|
+
PLUCKY_SESSION_UPDATED: {
|
|
3551
|
+
token: string;
|
|
3552
|
+
};
|
|
3553
|
+
PLUCKY_CLOSE: void;
|
|
3554
|
+
PLUCKY_SET_WIDTH: number;
|
|
3555
|
+
PLUCKY_SWITCH_MODE: {
|
|
3556
|
+
mode: string;
|
|
3557
|
+
};
|
|
3558
|
+
PLUCKY_RESPONSE_RECEIVED: {
|
|
3559
|
+
messages: unknown[];
|
|
3560
|
+
chatId: string;
|
|
3561
|
+
};
|
|
3562
|
+
PLUCKY_CONFIG_LOADED: void;
|
|
3563
|
+
PLUCKY_TOOL_CALL: unknown;
|
|
3564
|
+
PLUCKY_SET_FULLSCREEN: {
|
|
3565
|
+
fullscreen: boolean;
|
|
3566
|
+
};
|
|
3567
|
+
PLUCKY_VISIBILITY: 'visible' | 'hidden';
|
|
3568
|
+
}
|
|
3569
|
+
/** Every postMessage type string used across the frame boundary. */
|
|
3570
|
+
type FrameMessageType = keyof FrameMessageMap;
|
|
3571
|
+
/** Extract the payload type for a given message type. */
|
|
3572
|
+
/**
|
|
3573
|
+
* Every command that can be dispatched via `Plucky(action, payload)`.
|
|
3574
|
+
* Add new commands here — TypeScript will enforce that handlers and
|
|
3575
|
+
* SDK wrappers stay in sync.
|
|
3576
|
+
*/
|
|
3577
|
+
//#endregion
|
|
3578
|
+
//#region src/Plucky.d.ts
|
|
3579
|
+
/**
|
|
3580
|
+
* Initializes the Plucky chat widget on the page.
|
|
3581
|
+
*
|
|
3582
|
+
* Injects a settings script and loader bootstrap script into `<head>`.
|
|
3583
|
+
* On subsequent calls the function is a no-op — the widget can only be
|
|
3584
|
+
* attached once per page lifecycle. To re-initialize after removal,
|
|
3585
|
+
* call {@link unmount} first.
|
|
3586
|
+
*
|
|
3587
|
+
* @param options - Widget configuration. Required fields:
|
|
3588
|
+
*
|
|
3589
|
+
* | Property | Type | Description |
|
|
3590
|
+
* |---|---|---|
|
|
3591
|
+
* | `appId` | `string` | **(required)** Your Plucky app ID from the dashboard. |
|
|
3592
|
+
* | `baseUrl` | `string` | **(required)** Widget server origin (e.g., `'https://widget.plucky.ai'`). |
|
|
3593
|
+
* | `user` | `object` | Identify the current user (`{ id, name?, email?, createdAt?, metadata? }`). |
|
|
3594
|
+
* | `user.id` | `string` | Unique user identifier in your system. |
|
|
3595
|
+
* | `user.name` | `string` | Display name shown in the dashboard. |
|
|
3596
|
+
* | `user.email` | `string` | Email shown in the dashboard. |
|
|
3597
|
+
* | `user.createdAt` | `string` | ISO 8601 timestamp of user creation. |
|
|
3598
|
+
* | `user.metadata` | `Record<string, any>` | Arbitrary key-value pairs for segmentation. |
|
|
3599
|
+
* | `systemTools` | `object` | Built-in tools to enable (e.g., `{ readPage: true }`). |
|
|
3600
|
+
* | `mode` | `'push' \| 'overlay' \| 'inline'` | Display mode. Default: `'push'`. |
|
|
3601
|
+
* | `containerId` | `string` | Container element ID — required when `mode` is `'inline'`. |
|
|
3602
|
+
* | `autoOpen` | `boolean` | Auto-open on load. Default: `true`. |
|
|
3603
|
+
* | `triggerButton` | `boolean` | Show floating trigger button. Default: `false`. |
|
|
3604
|
+
*
|
|
3605
|
+
* @example
|
|
3606
|
+
* ```ts
|
|
3607
|
+
* import { Plucky } from '@plucky-ai/chat-sdk'
|
|
3608
|
+
*
|
|
3609
|
+
* Plucky({
|
|
3610
|
+
* appId: 'your-app-id',
|
|
3611
|
+
* baseUrl: 'https://widget.plucky.ai',
|
|
3612
|
+
* user: { id: 'user-123', name: 'Jane' },
|
|
3613
|
+
* })
|
|
3614
|
+
* ```
|
|
3615
|
+
*
|
|
3616
|
+
* @example Inline mode
|
|
3617
|
+
* ```ts
|
|
3618
|
+
* Plucky({
|
|
3619
|
+
* appId: 'your-app-id',
|
|
3620
|
+
* baseUrl: 'https://widget.plucky.ai',
|
|
3621
|
+
* mode: 'inline',
|
|
3622
|
+
* containerId: 'chat-container',
|
|
3623
|
+
* autoOpen: true,
|
|
3624
|
+
* })
|
|
3625
|
+
* ```
|
|
3626
|
+
*/
|
|
3627
|
+
declare function Plucky(options: PluckySettingsParams): void;
|
|
3628
|
+
//#endregion
|
|
3629
|
+
//#region src/index.d.ts
|
|
3630
|
+
/**
|
|
3631
|
+
* Opens the chat widget.
|
|
3632
|
+
*
|
|
3633
|
+
* If the widget is already open this is a no-op.
|
|
3634
|
+
*
|
|
3635
|
+
* @example
|
|
3636
|
+
* ```ts
|
|
3637
|
+
* open()
|
|
3638
|
+
* ```
|
|
3639
|
+
*/
|
|
3640
|
+
declare const open: () => void;
|
|
3641
|
+
/**
|
|
3642
|
+
* Closes the chat widget.
|
|
3643
|
+
*
|
|
3644
|
+
* If the widget is already closed this is a no-op.
|
|
3645
|
+
*
|
|
3646
|
+
* @example
|
|
3647
|
+
* ```ts
|
|
3648
|
+
* close()
|
|
3649
|
+
* ```
|
|
3650
|
+
*/
|
|
3651
|
+
declare const close: () => void;
|
|
3652
|
+
/**
|
|
3653
|
+
* Toggles the chat widget between open and closed states.
|
|
3654
|
+
*
|
|
3655
|
+
* @example
|
|
3656
|
+
* ```ts
|
|
3657
|
+
* toggle()
|
|
3658
|
+
* ```
|
|
3659
|
+
*/
|
|
3660
|
+
declare const toggle: () => void;
|
|
3661
|
+
/**
|
|
3662
|
+
* Sends a message in the chat on behalf of the user.
|
|
3663
|
+
*
|
|
3664
|
+
* @param payload - The message payload.
|
|
3665
|
+
* @param payload.content - The text content of the message to send.
|
|
3666
|
+
* @param payload.createChat - When `true`, creates a new chat session before sending.
|
|
3667
|
+
*
|
|
3668
|
+
* @example
|
|
3669
|
+
* ```ts
|
|
3670
|
+
* sendMessage({ content: 'Hello!', createChat: true })
|
|
3671
|
+
* ```
|
|
3672
|
+
*/
|
|
3673
|
+
declare const sendMessage: (payload: {
|
|
3674
|
+
content: string;
|
|
3675
|
+
createChat?: boolean;
|
|
3676
|
+
}) => void;
|
|
3677
|
+
/**
|
|
3678
|
+
* Sets the content of the chat input field without sending it.
|
|
3679
|
+
*
|
|
3680
|
+
* Useful for pre-filling a prompt that the user can review before submitting.
|
|
3681
|
+
*
|
|
3682
|
+
* @param payload - The input payload.
|
|
3683
|
+
* @param payload.content - The text to place in the input field.
|
|
3684
|
+
* @param payload.createChat - When `true`, creates a new chat session if one doesn't exist.
|
|
3685
|
+
*
|
|
3686
|
+
* @example
|
|
3687
|
+
* ```ts
|
|
3688
|
+
* setInput({ content: 'Draft message...' })
|
|
3689
|
+
* ```
|
|
3690
|
+
*/
|
|
3691
|
+
declare const setInput: (payload: {
|
|
3692
|
+
content: string;
|
|
3693
|
+
createChat?: boolean;
|
|
3694
|
+
}) => void;
|
|
3695
|
+
/**
|
|
3696
|
+
* Registers one or more custom tools that the AI assistant can invoke.
|
|
3697
|
+
*
|
|
3698
|
+
* Each tool specifies a name, description, optional Zod/JSON input schema,
|
|
3699
|
+
* and a callback that is executed when the assistant calls the tool.
|
|
3700
|
+
* Tools persist until explicitly removed with {@link removeTools} or
|
|
3701
|
+
* the widget is {@link unmount | unmounted}.
|
|
3702
|
+
*
|
|
3703
|
+
* @param tools - Array of {@link ToolConfig} objects. Each tool object accepts:
|
|
3704
|
+
*
|
|
3705
|
+
* | Property | Type | Description |
|
|
3706
|
+
* |---|---|---|
|
|
3707
|
+
* | `name` | `string` | **(required)** Unique tool name (e.g., `'getWeather'`). |
|
|
3708
|
+
* | `description` | `string` | **(required)** Tells the AI when to use this tool. |
|
|
3709
|
+
* | `inputSchema` | `ZodObject \| Record<string, unknown>` | Zod or JSON Schema describing expected input. |
|
|
3710
|
+
* | `cb` | `(input) => string \| { content, successText? }` | Callback invoked when the AI calls the tool. May be async. |
|
|
3711
|
+
* | `defaultLoadingText` | `string \| null` | Text shown while the tool runs. `null` hides it. |
|
|
3712
|
+
* | `defaultSuccessText` | `string \| null` | Text shown on completion. `null` hides it. |
|
|
3713
|
+
*
|
|
3714
|
+
* @example Basic tool without a schema
|
|
3715
|
+
* ```ts
|
|
3716
|
+
* addTools([
|
|
3717
|
+
* {
|
|
3718
|
+
* name: 'getWeather',
|
|
3719
|
+
* description: 'Fetches current weather for a city',
|
|
3720
|
+
* cb: async ({ city }) => `The weather in ${city} is sunny.`,
|
|
3721
|
+
* },
|
|
3722
|
+
* ])
|
|
3723
|
+
* ```
|
|
3724
|
+
*
|
|
3725
|
+
* @example Tool with a Zod input schema
|
|
3726
|
+
* ```ts
|
|
3727
|
+
* import { z } from 'zod'
|
|
3728
|
+
*
|
|
3729
|
+
* addTools([
|
|
3730
|
+
* {
|
|
3731
|
+
* name: 'getWeather',
|
|
3732
|
+
* description: 'Fetches current weather for a city',
|
|
3733
|
+
* inputSchema: z.object({
|
|
3734
|
+
* city: z.string().describe('City name to look up'),
|
|
3735
|
+
* units: z.enum(['celsius', 'fahrenheit']).optional(),
|
|
3736
|
+
* }),
|
|
3737
|
+
* cb: async ({ city, units }) => {
|
|
3738
|
+
* const data = await fetchWeather(city, units)
|
|
3739
|
+
* return { content: JSON.stringify(data), successText: `Weather for ${city}` }
|
|
3740
|
+
* },
|
|
3741
|
+
* },
|
|
3742
|
+
* ])
|
|
3743
|
+
* ```
|
|
3744
|
+
*/
|
|
3745
|
+
declare const addTools: (payload: ToolConfig<any>[]) => void;
|
|
3746
|
+
/**
|
|
3747
|
+
* Removes previously registered tools by name.
|
|
3748
|
+
*
|
|
3749
|
+
* @param names - Array of tool name strings to unregister.
|
|
3750
|
+
*
|
|
3751
|
+
* @example
|
|
3752
|
+
* ```ts
|
|
3753
|
+
* removeTools(['getWeather'])
|
|
3754
|
+
* ```
|
|
3755
|
+
*/
|
|
3756
|
+
declare const removeTools: (payload: string[]) => void;
|
|
3757
|
+
/**
|
|
3758
|
+
* Sets the width of the chat widget sidebar in pixels.
|
|
3759
|
+
*
|
|
3760
|
+
* @param width - Width in pixels.
|
|
3761
|
+
*
|
|
3762
|
+
* @example
|
|
3763
|
+
* ```ts
|
|
3764
|
+
* setWidth(500)
|
|
3765
|
+
* ```
|
|
3766
|
+
*/
|
|
3767
|
+
declare const setWidth: (payload: number) => void;
|
|
3768
|
+
/**
|
|
3769
|
+
* Shows the floating trigger button in the bottom-right corner of the page.
|
|
3770
|
+
*
|
|
3771
|
+
* The trigger button allows users to toggle the widget open/closed.
|
|
3772
|
+
*
|
|
3773
|
+
* @example
|
|
3774
|
+
* ```ts
|
|
3775
|
+
* showTriggerButton()
|
|
3776
|
+
* ```
|
|
3777
|
+
*/
|
|
3778
|
+
declare const showTriggerButton: () => void;
|
|
3779
|
+
/**
|
|
3780
|
+
* Hides the floating trigger button.
|
|
3781
|
+
*
|
|
3782
|
+
* @example
|
|
3783
|
+
* ```ts
|
|
3784
|
+
* hideTriggerButton()
|
|
3785
|
+
* ```
|
|
3786
|
+
*/
|
|
3787
|
+
declare const hideTriggerButton: () => void;
|
|
3788
|
+
/**
|
|
3789
|
+
* Unmounts the Plucky widget and removes it from the DOM entirely.
|
|
3790
|
+
*
|
|
3791
|
+
* After calling this, the widget must be re-initialized with {@link Plucky}
|
|
3792
|
+
* to appear again.
|
|
3793
|
+
*
|
|
3794
|
+
* @example
|
|
3795
|
+
* ```ts
|
|
3796
|
+
* unmount()
|
|
3797
|
+
* ```
|
|
3798
|
+
*/
|
|
3799
|
+
declare const unmount: () => void;
|
|
3800
|
+
/**
|
|
3801
|
+
* Updates widget settings after initialization (e.g., user information).
|
|
3802
|
+
*
|
|
3803
|
+
* Only fields present in the payload are updated; omitted fields remain unchanged.
|
|
3804
|
+
*
|
|
3805
|
+
* @param settings - Partial settings to merge.
|
|
3806
|
+
* @param settings.user - Updated user identification and metadata.
|
|
3807
|
+
*
|
|
3808
|
+
* @example
|
|
3809
|
+
* ```ts
|
|
3810
|
+
* updateSettings({ user: { id: 'user-456', name: 'Jane' } })
|
|
3811
|
+
* ```
|
|
3812
|
+
*/
|
|
3813
|
+
declare const updateSettings: (payload: PluckyUpdateSettingsParams) => void;
|
|
3814
|
+
/**
|
|
3815
|
+
* Enables or disables fullscreen mode for the chat widget.
|
|
3816
|
+
*
|
|
3817
|
+
* @param fullscreen - `true` to enter fullscreen, `false` to exit.
|
|
3818
|
+
*
|
|
3819
|
+
* @example
|
|
3820
|
+
* ```ts
|
|
3821
|
+
* setFullscreen(true)
|
|
3822
|
+
* ```
|
|
3823
|
+
*/
|
|
3824
|
+
declare function setFullscreen(fullscreen: boolean): void;
|
|
3825
|
+
/**
|
|
3826
|
+
* Subscribes to a widget event.
|
|
3827
|
+
*
|
|
3828
|
+
* Events are emitted by the widget iframe and forwarded to the host page.
|
|
3829
|
+
* Use {@link removeEventListener} with the same `event` and `listener`
|
|
3830
|
+
* reference to unsubscribe.
|
|
3831
|
+
*
|
|
3832
|
+
* @param event - The event name to listen for (e.g., `'PLUCKY_RESPONSE_RECEIVED'`).
|
|
3833
|
+
* @param listener - Callback invoked with the event payload.
|
|
3834
|
+
*
|
|
3835
|
+
* @example
|
|
3836
|
+
* ```ts
|
|
3837
|
+
* const onResponse = (payload) => console.log('Response:', payload)
|
|
3838
|
+
* addEventListener('PLUCKY_RESPONSE_RECEIVED', onResponse)
|
|
3839
|
+
* ```
|
|
3840
|
+
*/
|
|
3841
|
+
declare function addEventListener(event: string, listener: (payload: unknown) => void): void;
|
|
3842
|
+
/**
|
|
3843
|
+
* Removes a previously registered event listener.
|
|
3844
|
+
*
|
|
3845
|
+
* The `event` and `listener` arguments must match those passed to
|
|
3846
|
+
* {@link addEventListener}.
|
|
3847
|
+
*
|
|
3848
|
+
* @param event - The event name to stop listening for.
|
|
3849
|
+
* @param listener - The exact listener function reference to remove.
|
|
3850
|
+
*
|
|
3851
|
+
* @example
|
|
3852
|
+
* ```ts
|
|
3853
|
+
* removeEventListener('PLUCKY_RESPONSE_RECEIVED', onResponse)
|
|
3854
|
+
* ```
|
|
3855
|
+
*/
|
|
3856
|
+
declare function removeEventListener(event: string, listener: (payload: unknown) => void): void;
|
|
3857
|
+
/**
|
|
3858
|
+
* Returns whether the widget has finished loading and is ready to
|
|
3859
|
+
* accept commands.
|
|
3860
|
+
*
|
|
3861
|
+
* @returns `true` if the widget is initialized and responsive, `false` otherwise.
|
|
3862
|
+
*
|
|
3863
|
+
* @example
|
|
3864
|
+
* ```ts
|
|
3865
|
+
* if (isReady()) {
|
|
3866
|
+
* sendMessage({ content: 'Hi!' })
|
|
3867
|
+
* }
|
|
3868
|
+
* ```
|
|
3869
|
+
*/
|
|
3870
|
+
declare function isReady(): boolean;
|
|
3871
|
+
//#endregion
|
|
3872
|
+
export { type FrameMessageType as MessageType, Plucky, type ToolConfig, addEventListener, addTools, close, hideTriggerButton, isReady, open, removeEventListener, removeTools, sendMessage, setFullscreen, setInput, setWidth, showTriggerButton, toggle, unmount, updateSettings };
|
|
3873
|
+
//# sourceMappingURL=index.d.mts.map
|