unplugin-devpilot 0.0.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/LICENSE +21 -0
- package/dist/client/index.d.mts +62 -0
- package/dist/client/index.mjs +146 -0
- package/dist/client/virtual.d.ts +6 -0
- package/dist/farm.d.mts +19 -0
- package/dist/farm.mjs +26 -0
- package/dist/index-CL0Gw5-1.d.mts +4130 -0
- package/dist/index-CyKvTBcJ.d.mts +228 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +4 -0
- package/dist/plugin-PB-j5Ck2.mjs +36 -0
- package/dist/plugin.d.mts +2 -0
- package/dist/plugin.mjs +3 -0
- package/dist/rspack.d.mts +19 -0
- package/dist/rspack.mjs +26 -0
- package/dist/src-aMXlip6o.mjs +24085 -0
- package/dist/vite.d.mts +19 -0
- package/dist/vite.mjs +26 -0
- package/dist/webpack.d.mts +19 -0
- package/dist/webpack.mjs +26 -0
- package/package.json +76 -0
|
@@ -0,0 +1,4130 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.d.cts
|
|
2
|
+
type Primitive$2 = string | number | symbol | bigint | boolean | null | undefined;
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.d.cts
|
|
5
|
+
declare namespace util {
|
|
6
|
+
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends (<V>() => V extends U ? 1 : 2) ? true : false;
|
|
7
|
+
export type isAny<T> = 0 extends 1 & T ? true : false;
|
|
8
|
+
export const assertEqual: <A, B>(_: AssertEqual<A, B>) => void;
|
|
9
|
+
export function assertIs<T>(_arg: T): void;
|
|
10
|
+
export function assertNever(_x: never): never;
|
|
11
|
+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
12
|
+
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
13
|
+
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
14
|
+
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
|
|
15
|
+
export type InexactPartial<T> = { [k in keyof T]?: T[k] | undefined };
|
|
16
|
+
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k };
|
|
17
|
+
export const getValidEnumValues: (obj: any) => any[];
|
|
18
|
+
export const objectValues: (obj: any) => any[];
|
|
19
|
+
export const objectKeys: ObjectConstructor["keys"];
|
|
20
|
+
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
21
|
+
export type identity<T> = objectUtil.identity<T>;
|
|
22
|
+
export type flatten<T> = objectUtil.flatten<T>;
|
|
23
|
+
export type noUndefined<T> = T extends undefined ? never : T;
|
|
24
|
+
export const isInteger: NumberConstructor["isInteger"];
|
|
25
|
+
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
26
|
+
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
27
|
+
export {};
|
|
28
|
+
}
|
|
29
|
+
declare namespace objectUtil {
|
|
30
|
+
export type MergeShapes<U, V> = keyof U & keyof V extends never ? U & V : { [k in Exclude<keyof U, keyof V>]: U[k] } & V;
|
|
31
|
+
type optionalKeys<T extends object> = { [k in keyof T]: undefined extends T[k] ? k : never }[keyof T];
|
|
32
|
+
type requiredKeys<T extends object> = { [k in keyof T]: undefined extends T[k] ? never : k }[keyof T];
|
|
33
|
+
export type addQuestionMarks<T extends object, _O = any> = { [K in requiredKeys<T>]: T[K] } & { [K in optionalKeys<T>]?: T[K] } & { [k in keyof T]?: unknown };
|
|
34
|
+
export type identity<T> = T;
|
|
35
|
+
export type flatten<T> = identity<{ [k in keyof T]: T[k] }>;
|
|
36
|
+
export type noNeverKeys<T> = { [k in keyof T]: [T[k]] extends [never] ? never : k }[keyof T];
|
|
37
|
+
export type noNever<T> = identity<{ [k in noNeverKeys<T>]: k extends keyof T ? T[k] : never }>;
|
|
38
|
+
export const mergeShapes: <U, T>(first: U, second: T) => T & U;
|
|
39
|
+
export type extendShape<A extends object, B extends object> = 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] };
|
|
40
|
+
export {};
|
|
41
|
+
}
|
|
42
|
+
declare const ZodParsedType: {
|
|
43
|
+
string: "string";
|
|
44
|
+
nan: "nan";
|
|
45
|
+
number: "number";
|
|
46
|
+
integer: "integer";
|
|
47
|
+
float: "float";
|
|
48
|
+
boolean: "boolean";
|
|
49
|
+
date: "date";
|
|
50
|
+
bigint: "bigint";
|
|
51
|
+
symbol: "symbol";
|
|
52
|
+
function: "function";
|
|
53
|
+
undefined: "undefined";
|
|
54
|
+
null: "null";
|
|
55
|
+
array: "array";
|
|
56
|
+
object: "object";
|
|
57
|
+
unknown: "unknown";
|
|
58
|
+
promise: "promise";
|
|
59
|
+
void: "void";
|
|
60
|
+
never: "never";
|
|
61
|
+
map: "map";
|
|
62
|
+
set: "set";
|
|
63
|
+
};
|
|
64
|
+
type ZodParsedType = keyof typeof ZodParsedType;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/ZodError.d.cts
|
|
67
|
+
type allKeys<T> = T extends any ? keyof T : never;
|
|
68
|
+
type typeToFlattenedError<T, U = string> = {
|
|
69
|
+
formErrors: U[];
|
|
70
|
+
fieldErrors: { [P in allKeys<T>]?: U[] };
|
|
71
|
+
};
|
|
72
|
+
declare const ZodIssueCode: {
|
|
73
|
+
custom: "custom";
|
|
74
|
+
invalid_type: "invalid_type";
|
|
75
|
+
too_big: "too_big";
|
|
76
|
+
too_small: "too_small";
|
|
77
|
+
not_multiple_of: "not_multiple_of";
|
|
78
|
+
unrecognized_keys: "unrecognized_keys";
|
|
79
|
+
invalid_union: "invalid_union";
|
|
80
|
+
invalid_literal: "invalid_literal";
|
|
81
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
82
|
+
invalid_enum_value: "invalid_enum_value";
|
|
83
|
+
invalid_arguments: "invalid_arguments";
|
|
84
|
+
invalid_return_type: "invalid_return_type";
|
|
85
|
+
invalid_date: "invalid_date";
|
|
86
|
+
invalid_string: "invalid_string";
|
|
87
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
88
|
+
not_finite: "not_finite";
|
|
89
|
+
};
|
|
90
|
+
type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
91
|
+
type ZodIssueBase = {
|
|
92
|
+
path: (string | number)[];
|
|
93
|
+
message?: string | undefined;
|
|
94
|
+
};
|
|
95
|
+
interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
96
|
+
code: typeof ZodIssueCode.invalid_type;
|
|
97
|
+
expected: ZodParsedType;
|
|
98
|
+
received: ZodParsedType;
|
|
99
|
+
}
|
|
100
|
+
interface ZodInvalidLiteralIssue extends ZodIssueBase {
|
|
101
|
+
code: typeof ZodIssueCode.invalid_literal;
|
|
102
|
+
expected: unknown;
|
|
103
|
+
received: unknown;
|
|
104
|
+
}
|
|
105
|
+
interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
|
|
106
|
+
code: typeof ZodIssueCode.unrecognized_keys;
|
|
107
|
+
keys: string[];
|
|
108
|
+
}
|
|
109
|
+
interface ZodInvalidUnionIssue extends ZodIssueBase {
|
|
110
|
+
code: typeof ZodIssueCode.invalid_union;
|
|
111
|
+
unionErrors: ZodError$1[];
|
|
112
|
+
}
|
|
113
|
+
interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
|
|
114
|
+
code: typeof ZodIssueCode.invalid_union_discriminator;
|
|
115
|
+
options: Primitive$2[];
|
|
116
|
+
}
|
|
117
|
+
interface ZodInvalidEnumValueIssue extends ZodIssueBase {
|
|
118
|
+
received: string | number;
|
|
119
|
+
code: typeof ZodIssueCode.invalid_enum_value;
|
|
120
|
+
options: (string | number)[];
|
|
121
|
+
}
|
|
122
|
+
interface ZodInvalidArgumentsIssue extends ZodIssueBase {
|
|
123
|
+
code: typeof ZodIssueCode.invalid_arguments;
|
|
124
|
+
argumentsError: ZodError$1;
|
|
125
|
+
}
|
|
126
|
+
interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
|
|
127
|
+
code: typeof ZodIssueCode.invalid_return_type;
|
|
128
|
+
returnTypeError: ZodError$1;
|
|
129
|
+
}
|
|
130
|
+
interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
131
|
+
code: typeof ZodIssueCode.invalid_date;
|
|
132
|
+
}
|
|
133
|
+
type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "cidr" | "base64" | "jwt" | "base64url" | {
|
|
134
|
+
includes: string;
|
|
135
|
+
position?: number | undefined;
|
|
136
|
+
} | {
|
|
137
|
+
startsWith: string;
|
|
138
|
+
} | {
|
|
139
|
+
endsWith: string;
|
|
140
|
+
};
|
|
141
|
+
interface ZodInvalidStringIssue extends ZodIssueBase {
|
|
142
|
+
code: typeof ZodIssueCode.invalid_string;
|
|
143
|
+
validation: StringValidation;
|
|
144
|
+
}
|
|
145
|
+
interface ZodTooSmallIssue extends ZodIssueBase {
|
|
146
|
+
code: typeof ZodIssueCode.too_small;
|
|
147
|
+
minimum: number | bigint;
|
|
148
|
+
inclusive: boolean;
|
|
149
|
+
exact?: boolean;
|
|
150
|
+
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
151
|
+
}
|
|
152
|
+
interface ZodTooBigIssue extends ZodIssueBase {
|
|
153
|
+
code: typeof ZodIssueCode.too_big;
|
|
154
|
+
maximum: number | bigint;
|
|
155
|
+
inclusive: boolean;
|
|
156
|
+
exact?: boolean;
|
|
157
|
+
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
158
|
+
}
|
|
159
|
+
interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
160
|
+
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
161
|
+
}
|
|
162
|
+
interface ZodNotMultipleOfIssue extends ZodIssueBase {
|
|
163
|
+
code: typeof ZodIssueCode.not_multiple_of;
|
|
164
|
+
multipleOf: number | bigint;
|
|
165
|
+
}
|
|
166
|
+
interface ZodNotFiniteIssue extends ZodIssueBase {
|
|
167
|
+
code: typeof ZodIssueCode.not_finite;
|
|
168
|
+
}
|
|
169
|
+
interface ZodCustomIssue extends ZodIssueBase {
|
|
170
|
+
code: typeof ZodIssueCode.custom;
|
|
171
|
+
params?: {
|
|
172
|
+
[k: string]: any;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
|
|
176
|
+
type ZodIssue = ZodIssueOptionalMessage & {
|
|
177
|
+
fatal?: boolean | undefined;
|
|
178
|
+
message: string;
|
|
179
|
+
};
|
|
180
|
+
type recursiveZodFormattedError<T> = T extends [any, ...any[]] ? { [K in keyof T]?: ZodFormattedError<T[K]> } : T extends any[] ? {
|
|
181
|
+
[k: number]: ZodFormattedError<T[number]>;
|
|
182
|
+
} : T extends object ? { [K in keyof T]?: ZodFormattedError<T[K]> } : unknown;
|
|
183
|
+
type ZodFormattedError<T, U = string> = {
|
|
184
|
+
_errors: U[];
|
|
185
|
+
} & recursiveZodFormattedError<NonNullable<T>>;
|
|
186
|
+
declare class ZodError$1<T = any> extends Error {
|
|
187
|
+
issues: ZodIssue[];
|
|
188
|
+
get errors(): ZodIssue[];
|
|
189
|
+
constructor(issues: ZodIssue[]);
|
|
190
|
+
format(): ZodFormattedError<T>;
|
|
191
|
+
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
|
|
192
|
+
static create: (issues: ZodIssue[]) => ZodError$1<any>;
|
|
193
|
+
static assert(value: unknown): asserts value is ZodError$1;
|
|
194
|
+
toString(): string;
|
|
195
|
+
get message(): string;
|
|
196
|
+
get isEmpty(): boolean;
|
|
197
|
+
addIssue: (sub: ZodIssue) => void;
|
|
198
|
+
addIssues: (subs?: ZodIssue[]) => void;
|
|
199
|
+
flatten(): typeToFlattenedError<T>;
|
|
200
|
+
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
|
|
201
|
+
get formErrors(): typeToFlattenedError<T, string>;
|
|
202
|
+
}
|
|
203
|
+
type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
|
|
204
|
+
type IssueData = stripPath<ZodIssueOptionalMessage> & {
|
|
205
|
+
path?: (string | number)[];
|
|
206
|
+
fatal?: boolean | undefined;
|
|
207
|
+
};
|
|
208
|
+
type ErrorMapCtx = {
|
|
209
|
+
defaultError: string;
|
|
210
|
+
data: any;
|
|
211
|
+
};
|
|
212
|
+
type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => {
|
|
213
|
+
message: string;
|
|
214
|
+
};
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.d.cts
|
|
217
|
+
type ParseParams = {
|
|
218
|
+
path: (string | number)[];
|
|
219
|
+
errorMap: ZodErrorMap;
|
|
220
|
+
async: boolean;
|
|
221
|
+
};
|
|
222
|
+
type ParsePathComponent = string | number;
|
|
223
|
+
type ParsePath = ParsePathComponent[];
|
|
224
|
+
interface ParseContext$1 {
|
|
225
|
+
readonly common: {
|
|
226
|
+
readonly issues: ZodIssue[];
|
|
227
|
+
readonly contextualErrorMap?: ZodErrorMap | undefined;
|
|
228
|
+
readonly async: boolean;
|
|
229
|
+
};
|
|
230
|
+
readonly path: ParsePath;
|
|
231
|
+
readonly schemaErrorMap?: ZodErrorMap | undefined;
|
|
232
|
+
readonly parent: ParseContext$1 | null;
|
|
233
|
+
readonly data: any;
|
|
234
|
+
readonly parsedType: ZodParsedType;
|
|
235
|
+
}
|
|
236
|
+
type ParseInput = {
|
|
237
|
+
data: any;
|
|
238
|
+
path: (string | number)[];
|
|
239
|
+
parent: ParseContext$1;
|
|
240
|
+
};
|
|
241
|
+
declare class ParseStatus {
|
|
242
|
+
value: "aborted" | "dirty" | "valid";
|
|
243
|
+
dirty(): void;
|
|
244
|
+
abort(): void;
|
|
245
|
+
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
|
|
246
|
+
static mergeObjectAsync(status: ParseStatus, pairs: {
|
|
247
|
+
key: ParseReturnType<any>;
|
|
248
|
+
value: ParseReturnType<any>;
|
|
249
|
+
}[]): Promise<SyncParseReturnType<any>>;
|
|
250
|
+
static mergeObjectSync(status: ParseStatus, pairs: {
|
|
251
|
+
key: SyncParseReturnType<any>;
|
|
252
|
+
value: SyncParseReturnType<any>;
|
|
253
|
+
alwaysSet?: boolean;
|
|
254
|
+
}[]): SyncParseReturnType;
|
|
255
|
+
}
|
|
256
|
+
type INVALID = {
|
|
257
|
+
status: "aborted";
|
|
258
|
+
};
|
|
259
|
+
declare const INVALID: INVALID;
|
|
260
|
+
type DIRTY<T> = {
|
|
261
|
+
status: "dirty";
|
|
262
|
+
value: T;
|
|
263
|
+
};
|
|
264
|
+
declare const DIRTY: <T>(value: T) => DIRTY<T>;
|
|
265
|
+
type OK<T> = {
|
|
266
|
+
status: "valid";
|
|
267
|
+
value: T;
|
|
268
|
+
};
|
|
269
|
+
declare const OK: <T>(value: T) => OK<T>;
|
|
270
|
+
type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
|
|
271
|
+
type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
|
|
272
|
+
type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/errorUtil.d.cts
|
|
275
|
+
declare namespace errorUtil {
|
|
276
|
+
type ErrMessage = string | {
|
|
277
|
+
message?: string | undefined;
|
|
278
|
+
};
|
|
279
|
+
const errToObj: (message?: ErrMessage) => {
|
|
280
|
+
message?: string | undefined;
|
|
281
|
+
};
|
|
282
|
+
const toString: (message?: ErrMessage) => string | undefined;
|
|
283
|
+
}
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/standard-schema.d.cts
|
|
286
|
+
/**
|
|
287
|
+
* The Standard Schema interface.
|
|
288
|
+
*/
|
|
289
|
+
type StandardSchemaV1$1<Input = unknown, Output = Input> = {
|
|
290
|
+
/**
|
|
291
|
+
* The Standard Schema properties.
|
|
292
|
+
*/
|
|
293
|
+
readonly "~standard": StandardSchemaV1$1.Props<Input, Output>;
|
|
294
|
+
};
|
|
295
|
+
declare namespace StandardSchemaV1$1 {
|
|
296
|
+
/**
|
|
297
|
+
* The Standard Schema properties interface.
|
|
298
|
+
*/
|
|
299
|
+
export interface Props<Input = unknown, Output = Input> {
|
|
300
|
+
/**
|
|
301
|
+
* The version number of the standard.
|
|
302
|
+
*/
|
|
303
|
+
readonly version: 1;
|
|
304
|
+
/**
|
|
305
|
+
* The vendor name of the schema library.
|
|
306
|
+
*/
|
|
307
|
+
readonly vendor: string;
|
|
308
|
+
/**
|
|
309
|
+
* Validates unknown input values.
|
|
310
|
+
*/
|
|
311
|
+
readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
|
|
312
|
+
/**
|
|
313
|
+
* Inferred types associated with the schema.
|
|
314
|
+
*/
|
|
315
|
+
readonly types?: Types<Input, Output> | undefined;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* The result interface of the validate function.
|
|
319
|
+
*/
|
|
320
|
+
export type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
321
|
+
/**
|
|
322
|
+
* The result interface if validation succeeds.
|
|
323
|
+
*/
|
|
324
|
+
export interface SuccessResult<Output> {
|
|
325
|
+
/**
|
|
326
|
+
* The typed output value.
|
|
327
|
+
*/
|
|
328
|
+
readonly value: Output;
|
|
329
|
+
/**
|
|
330
|
+
* The non-existent issues.
|
|
331
|
+
*/
|
|
332
|
+
readonly issues?: undefined;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* The result interface if validation fails.
|
|
336
|
+
*/
|
|
337
|
+
export interface FailureResult {
|
|
338
|
+
/**
|
|
339
|
+
* The issues of failed validation.
|
|
340
|
+
*/
|
|
341
|
+
readonly issues: ReadonlyArray<Issue>;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* The issue interface of the failure output.
|
|
345
|
+
*/
|
|
346
|
+
export interface Issue {
|
|
347
|
+
/**
|
|
348
|
+
* The error message of the issue.
|
|
349
|
+
*/
|
|
350
|
+
readonly message: string;
|
|
351
|
+
/**
|
|
352
|
+
* The path of the issue, if any.
|
|
353
|
+
*/
|
|
354
|
+
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* The path segment interface of the issue.
|
|
358
|
+
*/
|
|
359
|
+
export interface PathSegment {
|
|
360
|
+
/**
|
|
361
|
+
* The key representing a path segment.
|
|
362
|
+
*/
|
|
363
|
+
readonly key: PropertyKey;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* The Standard Schema types interface.
|
|
367
|
+
*/
|
|
368
|
+
export interface Types<Input = unknown, Output = Input> {
|
|
369
|
+
/**
|
|
370
|
+
* The input type of the schema.
|
|
371
|
+
*/
|
|
372
|
+
readonly input: Input;
|
|
373
|
+
/**
|
|
374
|
+
* The output type of the schema.
|
|
375
|
+
*/
|
|
376
|
+
readonly output: Output;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Infers the input type of a Standard Schema.
|
|
380
|
+
*/
|
|
381
|
+
export type InferInput<Schema extends StandardSchemaV1$1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
382
|
+
/**
|
|
383
|
+
* Infers the output type of a Standard Schema.
|
|
384
|
+
*/
|
|
385
|
+
export type InferOutput<Schema extends StandardSchemaV1$1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
386
|
+
export {};
|
|
387
|
+
}
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.d.cts
|
|
390
|
+
interface RefinementCtx {
|
|
391
|
+
addIssue: (arg: IssueData) => void;
|
|
392
|
+
path: (string | number)[];
|
|
393
|
+
}
|
|
394
|
+
type ZodTypeAny = ZodType$1<any, any, any>;
|
|
395
|
+
type TypeOf<T extends ZodType$1<any, any, any>> = T["_output"];
|
|
396
|
+
type input$1<T extends ZodType$1<any, any, any>> = T["_input"];
|
|
397
|
+
type output$1<T extends ZodType$1<any, any, any>> = T["_output"];
|
|
398
|
+
type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
|
|
399
|
+
interface ZodTypeDef {
|
|
400
|
+
errorMap?: ZodErrorMap | undefined;
|
|
401
|
+
description?: string | undefined;
|
|
402
|
+
}
|
|
403
|
+
type RawCreateParams = {
|
|
404
|
+
errorMap?: ZodErrorMap | undefined;
|
|
405
|
+
invalid_type_error?: string | undefined;
|
|
406
|
+
required_error?: string | undefined;
|
|
407
|
+
message?: string | undefined;
|
|
408
|
+
description?: string | undefined;
|
|
409
|
+
} | undefined;
|
|
410
|
+
type SafeParseSuccess<Output> = {
|
|
411
|
+
success: true;
|
|
412
|
+
data: Output;
|
|
413
|
+
error?: never;
|
|
414
|
+
};
|
|
415
|
+
type SafeParseError<Input> = {
|
|
416
|
+
success: false;
|
|
417
|
+
error: ZodError$1<Input>;
|
|
418
|
+
data?: never;
|
|
419
|
+
};
|
|
420
|
+
type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>;
|
|
421
|
+
declare abstract class ZodType$1<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
|
|
422
|
+
readonly _type: Output;
|
|
423
|
+
readonly _output: Output;
|
|
424
|
+
readonly _input: Input;
|
|
425
|
+
readonly _def: Def;
|
|
426
|
+
get description(): string | undefined;
|
|
427
|
+
"~standard": StandardSchemaV1$1.Props<Input, Output>;
|
|
428
|
+
abstract _parse(input: ParseInput): ParseReturnType<Output>;
|
|
429
|
+
_getType(input: ParseInput): string;
|
|
430
|
+
_getOrReturnCtx(input: ParseInput, ctx?: ParseContext$1 | undefined): ParseContext$1;
|
|
431
|
+
_processInputParams(input: ParseInput): {
|
|
432
|
+
status: ParseStatus;
|
|
433
|
+
ctx: ParseContext$1;
|
|
434
|
+
};
|
|
435
|
+
_parseSync(input: ParseInput): SyncParseReturnType<Output>;
|
|
436
|
+
_parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
|
|
437
|
+
parse(data: unknown, params?: util.InexactPartial<ParseParams>): Output;
|
|
438
|
+
safeParse(data: unknown, params?: util.InexactPartial<ParseParams>): SafeParseReturnType<Input, Output>;
|
|
439
|
+
"~validate"(data: unknown): StandardSchemaV1$1.Result<Output> | Promise<StandardSchemaV1$1.Result<Output>>;
|
|
440
|
+
parseAsync(data: unknown, params?: util.InexactPartial<ParseParams>): Promise<Output>;
|
|
441
|
+
safeParseAsync(data: unknown, params?: util.InexactPartial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
442
|
+
/** Alias of safeParseAsync */
|
|
443
|
+
spa: (data: unknown, params?: util.InexactPartial<ParseParams>) => Promise<SafeParseReturnType<Input, Output>>;
|
|
444
|
+
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
|
|
445
|
+
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
446
|
+
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
|
|
447
|
+
refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
|
|
448
|
+
_refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
|
|
449
|
+
superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
|
|
450
|
+
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
|
|
451
|
+
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => Promise<void>): ZodEffects<this, Output, Input>;
|
|
452
|
+
constructor(def: Def);
|
|
453
|
+
optional(): ZodOptional$1<this>;
|
|
454
|
+
nullable(): ZodNullable$1<this>;
|
|
455
|
+
nullish(): ZodOptional$1<ZodNullable$1<this>>;
|
|
456
|
+
array(): ZodArray$1<this>;
|
|
457
|
+
promise(): ZodPromise<this>;
|
|
458
|
+
or<T extends ZodTypeAny>(option: T): ZodUnion$1<[this, T]>;
|
|
459
|
+
and<T extends ZodTypeAny>(incoming: T): ZodIntersection$1<this, T>;
|
|
460
|
+
transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;
|
|
461
|
+
default(def: util.noUndefined<Input>): ZodDefault$1<this>;
|
|
462
|
+
default(def: () => util.noUndefined<Input>): ZodDefault$1<this>;
|
|
463
|
+
brand<B extends string | number | symbol>(brand?: B): ZodBranded<this, B>;
|
|
464
|
+
catch(def: Output): ZodCatch$1<this>;
|
|
465
|
+
catch(def: (ctx: {
|
|
466
|
+
error: ZodError$1;
|
|
467
|
+
input: Input;
|
|
468
|
+
}) => Output): ZodCatch$1<this>;
|
|
469
|
+
describe(description: string): this;
|
|
470
|
+
pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>;
|
|
471
|
+
readonly(): ZodReadonly$1<this>;
|
|
472
|
+
isOptional(): boolean;
|
|
473
|
+
isNullable(): boolean;
|
|
474
|
+
}
|
|
475
|
+
interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
476
|
+
type: T;
|
|
477
|
+
typeName: ZodFirstPartyTypeKind.ZodArray;
|
|
478
|
+
exactLength: {
|
|
479
|
+
value: number;
|
|
480
|
+
message?: string | undefined;
|
|
481
|
+
} | null;
|
|
482
|
+
minLength: {
|
|
483
|
+
value: number;
|
|
484
|
+
message?: string | undefined;
|
|
485
|
+
} | null;
|
|
486
|
+
maxLength: {
|
|
487
|
+
value: number;
|
|
488
|
+
message?: string | undefined;
|
|
489
|
+
} | null;
|
|
490
|
+
}
|
|
491
|
+
type ArrayCardinality = "many" | "atleastone";
|
|
492
|
+
type arrayOutputType<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][];
|
|
493
|
+
declare class ZodArray$1<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> extends ZodType$1<arrayOutputType<T, Cardinality>, ZodArrayDef<T>, Cardinality extends "atleastone" ? [T["_input"], ...T["_input"][]] : T["_input"][]> {
|
|
494
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
495
|
+
get element(): T;
|
|
496
|
+
min(minLength: number, message?: errorUtil.ErrMessage): this;
|
|
497
|
+
max(maxLength: number, message?: errorUtil.ErrMessage): this;
|
|
498
|
+
length(len: number, message?: errorUtil.ErrMessage): this;
|
|
499
|
+
nonempty(message?: errorUtil.ErrMessage): ZodArray$1<T, "atleastone">;
|
|
500
|
+
static create: <El extends ZodTypeAny>(schema: El, params?: RawCreateParams) => ZodArray$1<El>;
|
|
501
|
+
}
|
|
502
|
+
type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
503
|
+
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>> extends ZodTypeDef {
|
|
504
|
+
options: T;
|
|
505
|
+
typeName: ZodFirstPartyTypeKind.ZodUnion;
|
|
506
|
+
}
|
|
507
|
+
declare class ZodUnion$1<T extends ZodUnionOptions> extends ZodType$1<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
|
|
508
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
509
|
+
get options(): T;
|
|
510
|
+
static create: <Options extends Readonly<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>>(types: Options, params?: RawCreateParams) => ZodUnion$1<Options>;
|
|
511
|
+
}
|
|
512
|
+
interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
513
|
+
left: T;
|
|
514
|
+
right: U;
|
|
515
|
+
typeName: ZodFirstPartyTypeKind.ZodIntersection;
|
|
516
|
+
}
|
|
517
|
+
declare class ZodIntersection$1<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType$1<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
|
|
518
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
519
|
+
static create: <TSchema extends ZodTypeAny, USchema extends ZodTypeAny>(left: TSchema, right: USchema, params?: RawCreateParams) => ZodIntersection$1<TSchema, USchema>;
|
|
520
|
+
}
|
|
521
|
+
interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
522
|
+
type: T;
|
|
523
|
+
typeName: ZodFirstPartyTypeKind.ZodPromise;
|
|
524
|
+
}
|
|
525
|
+
declare class ZodPromise<T extends ZodTypeAny> extends ZodType$1<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
|
|
526
|
+
unwrap(): T;
|
|
527
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
528
|
+
static create: <Inner extends ZodTypeAny>(schema: Inner, params?: RawCreateParams) => ZodPromise<Inner>;
|
|
529
|
+
}
|
|
530
|
+
type RefinementEffect<T> = {
|
|
531
|
+
type: "refinement";
|
|
532
|
+
refinement: (arg: T, ctx: RefinementCtx) => any;
|
|
533
|
+
};
|
|
534
|
+
type TransformEffect<T> = {
|
|
535
|
+
type: "transform";
|
|
536
|
+
transform: (arg: T, ctx: RefinementCtx) => any;
|
|
537
|
+
};
|
|
538
|
+
type PreprocessEffect<T> = {
|
|
539
|
+
type: "preprocess";
|
|
540
|
+
transform: (arg: T, ctx: RefinementCtx) => any;
|
|
541
|
+
};
|
|
542
|
+
type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;
|
|
543
|
+
interface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
544
|
+
schema: T;
|
|
545
|
+
typeName: ZodFirstPartyTypeKind.ZodEffects;
|
|
546
|
+
effect: Effect<any>;
|
|
547
|
+
}
|
|
548
|
+
declare class ZodEffects<T extends ZodTypeAny, Output = output$1<T>, Input = input$1<T>> extends ZodType$1<Output, ZodEffectsDef<T>, Input> {
|
|
549
|
+
innerType(): T;
|
|
550
|
+
sourceType(): T;
|
|
551
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
552
|
+
static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"]>;
|
|
553
|
+
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
|
|
554
|
+
}
|
|
555
|
+
interface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
556
|
+
innerType: T;
|
|
557
|
+
typeName: ZodFirstPartyTypeKind.ZodOptional;
|
|
558
|
+
}
|
|
559
|
+
declare class ZodOptional$1<T extends ZodTypeAny> extends ZodType$1<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
|
|
560
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
561
|
+
unwrap(): T;
|
|
562
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params?: RawCreateParams) => ZodOptional$1<Inner>;
|
|
563
|
+
}
|
|
564
|
+
interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
565
|
+
innerType: T;
|
|
566
|
+
typeName: ZodFirstPartyTypeKind.ZodNullable;
|
|
567
|
+
}
|
|
568
|
+
declare class ZodNullable$1<T extends ZodTypeAny> extends ZodType$1<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
|
|
569
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
570
|
+
unwrap(): T;
|
|
571
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params?: RawCreateParams) => ZodNullable$1<Inner>;
|
|
572
|
+
}
|
|
573
|
+
interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
574
|
+
innerType: T;
|
|
575
|
+
defaultValue: () => util.noUndefined<T["_input"]>;
|
|
576
|
+
typeName: ZodFirstPartyTypeKind.ZodDefault;
|
|
577
|
+
}
|
|
578
|
+
declare class ZodDefault$1<T extends ZodTypeAny> extends ZodType$1<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
|
|
579
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
580
|
+
removeDefault(): T;
|
|
581
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params: RawCreateParams & {
|
|
582
|
+
default: Inner["_input"] | (() => util.noUndefined<Inner["_input"]>);
|
|
583
|
+
}) => ZodDefault$1<Inner>;
|
|
584
|
+
}
|
|
585
|
+
interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
586
|
+
innerType: T;
|
|
587
|
+
catchValue: (ctx: {
|
|
588
|
+
error: ZodError$1;
|
|
589
|
+
input: unknown;
|
|
590
|
+
}) => T["_input"];
|
|
591
|
+
typeName: ZodFirstPartyTypeKind.ZodCatch;
|
|
592
|
+
}
|
|
593
|
+
declare class ZodCatch$1<T extends ZodTypeAny> extends ZodType$1<T["_output"], ZodCatchDef<T>, unknown> {
|
|
594
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
595
|
+
removeCatch(): T;
|
|
596
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params: RawCreateParams & {
|
|
597
|
+
catch: Inner["_output"] | (() => Inner["_output"]);
|
|
598
|
+
}) => ZodCatch$1<Inner>;
|
|
599
|
+
}
|
|
600
|
+
interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
|
|
601
|
+
type: T;
|
|
602
|
+
typeName: ZodFirstPartyTypeKind.ZodBranded;
|
|
603
|
+
}
|
|
604
|
+
declare const BRAND: unique symbol;
|
|
605
|
+
type BRAND<T extends string | number | symbol> = {
|
|
606
|
+
[BRAND]: { [k in T]: true };
|
|
607
|
+
};
|
|
608
|
+
declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType$1<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"]> {
|
|
609
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
610
|
+
unwrap(): T;
|
|
611
|
+
}
|
|
612
|
+
interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodTypeDef {
|
|
613
|
+
in: A;
|
|
614
|
+
out: B;
|
|
615
|
+
typeName: ZodFirstPartyTypeKind.ZodPipeline;
|
|
616
|
+
}
|
|
617
|
+
declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType$1<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
|
|
618
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
619
|
+
static create<ASchema extends ZodTypeAny, BSchema extends ZodTypeAny>(a: ASchema, b: BSchema): ZodPipeline<ASchema, BSchema>;
|
|
620
|
+
}
|
|
621
|
+
type BuiltIn$1 = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
622
|
+
readonly [Symbol.toStringTag]: string;
|
|
623
|
+
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
624
|
+
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>;
|
|
625
|
+
interface ZodReadonlyDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
626
|
+
innerType: T;
|
|
627
|
+
typeName: ZodFirstPartyTypeKind.ZodReadonly;
|
|
628
|
+
}
|
|
629
|
+
declare class ZodReadonly$1<T extends ZodTypeAny> extends ZodType$1<MakeReadonly$1<T["_output"]>, ZodReadonlyDef<T>, MakeReadonly$1<T["_input"]>> {
|
|
630
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
631
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params?: RawCreateParams) => ZodReadonly$1<Inner>;
|
|
632
|
+
unwrap(): T;
|
|
633
|
+
}
|
|
634
|
+
declare enum ZodFirstPartyTypeKind {
|
|
635
|
+
ZodString = "ZodString",
|
|
636
|
+
ZodNumber = "ZodNumber",
|
|
637
|
+
ZodNaN = "ZodNaN",
|
|
638
|
+
ZodBigInt = "ZodBigInt",
|
|
639
|
+
ZodBoolean = "ZodBoolean",
|
|
640
|
+
ZodDate = "ZodDate",
|
|
641
|
+
ZodSymbol = "ZodSymbol",
|
|
642
|
+
ZodUndefined = "ZodUndefined",
|
|
643
|
+
ZodNull = "ZodNull",
|
|
644
|
+
ZodAny = "ZodAny",
|
|
645
|
+
ZodUnknown = "ZodUnknown",
|
|
646
|
+
ZodNever = "ZodNever",
|
|
647
|
+
ZodVoid = "ZodVoid",
|
|
648
|
+
ZodArray = "ZodArray",
|
|
649
|
+
ZodObject = "ZodObject",
|
|
650
|
+
ZodUnion = "ZodUnion",
|
|
651
|
+
ZodDiscriminatedUnion = "ZodDiscriminatedUnion",
|
|
652
|
+
ZodIntersection = "ZodIntersection",
|
|
653
|
+
ZodTuple = "ZodTuple",
|
|
654
|
+
ZodRecord = "ZodRecord",
|
|
655
|
+
ZodMap = "ZodMap",
|
|
656
|
+
ZodSet = "ZodSet",
|
|
657
|
+
ZodFunction = "ZodFunction",
|
|
658
|
+
ZodLazy = "ZodLazy",
|
|
659
|
+
ZodLiteral = "ZodLiteral",
|
|
660
|
+
ZodEnum = "ZodEnum",
|
|
661
|
+
ZodEffects = "ZodEffects",
|
|
662
|
+
ZodNativeEnum = "ZodNativeEnum",
|
|
663
|
+
ZodOptional = "ZodOptional",
|
|
664
|
+
ZodNullable = "ZodNullable",
|
|
665
|
+
ZodDefault = "ZodDefault",
|
|
666
|
+
ZodCatch = "ZodCatch",
|
|
667
|
+
ZodPromise = "ZodPromise",
|
|
668
|
+
ZodBranded = "ZodBranded",
|
|
669
|
+
ZodPipeline = "ZodPipeline",
|
|
670
|
+
ZodReadonly = "ZodReadonly"
|
|
671
|
+
}
|
|
672
|
+
//#endregion
|
|
673
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.cts
|
|
674
|
+
type _JSONSchema = boolean | JSONSchema;
|
|
675
|
+
type JSONSchema = {
|
|
676
|
+
[k: string]: unknown;
|
|
677
|
+
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
678
|
+
$id?: string;
|
|
679
|
+
$anchor?: string;
|
|
680
|
+
$ref?: string;
|
|
681
|
+
$dynamicRef?: string;
|
|
682
|
+
$dynamicAnchor?: string;
|
|
683
|
+
$vocabulary?: Record<string, boolean>;
|
|
684
|
+
$comment?: string;
|
|
685
|
+
$defs?: Record<string, JSONSchema>;
|
|
686
|
+
type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
|
|
687
|
+
additionalItems?: _JSONSchema;
|
|
688
|
+
unevaluatedItems?: _JSONSchema;
|
|
689
|
+
prefixItems?: _JSONSchema[];
|
|
690
|
+
items?: _JSONSchema | _JSONSchema[];
|
|
691
|
+
contains?: _JSONSchema;
|
|
692
|
+
additionalProperties?: _JSONSchema;
|
|
693
|
+
unevaluatedProperties?: _JSONSchema;
|
|
694
|
+
properties?: Record<string, _JSONSchema>;
|
|
695
|
+
patternProperties?: Record<string, _JSONSchema>;
|
|
696
|
+
dependentSchemas?: Record<string, _JSONSchema>;
|
|
697
|
+
propertyNames?: _JSONSchema;
|
|
698
|
+
if?: _JSONSchema;
|
|
699
|
+
then?: _JSONSchema;
|
|
700
|
+
else?: _JSONSchema;
|
|
701
|
+
allOf?: JSONSchema[];
|
|
702
|
+
anyOf?: JSONSchema[];
|
|
703
|
+
oneOf?: JSONSchema[];
|
|
704
|
+
not?: _JSONSchema;
|
|
705
|
+
multipleOf?: number;
|
|
706
|
+
maximum?: number;
|
|
707
|
+
exclusiveMaximum?: number | boolean;
|
|
708
|
+
minimum?: number;
|
|
709
|
+
exclusiveMinimum?: number | boolean;
|
|
710
|
+
maxLength?: number;
|
|
711
|
+
minLength?: number;
|
|
712
|
+
pattern?: string;
|
|
713
|
+
maxItems?: number;
|
|
714
|
+
minItems?: number;
|
|
715
|
+
uniqueItems?: boolean;
|
|
716
|
+
maxContains?: number;
|
|
717
|
+
minContains?: number;
|
|
718
|
+
maxProperties?: number;
|
|
719
|
+
minProperties?: number;
|
|
720
|
+
required?: string[];
|
|
721
|
+
dependentRequired?: Record<string, string[]>;
|
|
722
|
+
enum?: Array<string | number | boolean | null>;
|
|
723
|
+
const?: string | number | boolean | null;
|
|
724
|
+
id?: string;
|
|
725
|
+
title?: string;
|
|
726
|
+
description?: string;
|
|
727
|
+
default?: unknown;
|
|
728
|
+
deprecated?: boolean;
|
|
729
|
+
readOnly?: boolean;
|
|
730
|
+
writeOnly?: boolean;
|
|
731
|
+
nullable?: boolean;
|
|
732
|
+
examples?: unknown[];
|
|
733
|
+
format?: string;
|
|
734
|
+
contentMediaType?: string;
|
|
735
|
+
contentEncoding?: string;
|
|
736
|
+
contentSchema?: JSONSchema;
|
|
737
|
+
_prefault?: unknown;
|
|
738
|
+
};
|
|
739
|
+
type BaseSchema = JSONSchema;
|
|
740
|
+
//#endregion
|
|
741
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/standard-schema.d.cts
|
|
742
|
+
/** The Standard interface. */
|
|
743
|
+
interface StandardTypedV1<Input = unknown, Output = Input> {
|
|
744
|
+
/** The Standard properties. */
|
|
745
|
+
readonly "~standard": StandardTypedV1.Props<Input, Output>;
|
|
746
|
+
}
|
|
747
|
+
declare namespace StandardTypedV1 {
|
|
748
|
+
/** The Standard properties interface. */
|
|
749
|
+
interface Props<Input = unknown, Output = Input> {
|
|
750
|
+
/** The version number of the standard. */
|
|
751
|
+
readonly version: 1;
|
|
752
|
+
/** The vendor name of the schema library. */
|
|
753
|
+
readonly vendor: string;
|
|
754
|
+
/** Inferred types associated with the schema. */
|
|
755
|
+
readonly types?: Types<Input, Output> | undefined;
|
|
756
|
+
}
|
|
757
|
+
/** The Standard types interface. */
|
|
758
|
+
interface Types<Input = unknown, Output = Input> {
|
|
759
|
+
/** The input type of the schema. */
|
|
760
|
+
readonly input: Input;
|
|
761
|
+
/** The output type of the schema. */
|
|
762
|
+
readonly output: Output;
|
|
763
|
+
}
|
|
764
|
+
/** Infers the input type of a Standard. */
|
|
765
|
+
type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
766
|
+
/** Infers the output type of a Standard. */
|
|
767
|
+
type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
768
|
+
}
|
|
769
|
+
/** The Standard Schema interface. */
|
|
770
|
+
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
771
|
+
/** The Standard Schema properties. */
|
|
772
|
+
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
|
|
773
|
+
}
|
|
774
|
+
declare namespace StandardSchemaV1 {
|
|
775
|
+
/** The Standard Schema properties interface. */
|
|
776
|
+
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
|
|
777
|
+
/** Validates unknown input values. */
|
|
778
|
+
readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
|
|
779
|
+
}
|
|
780
|
+
/** The result interface of the validate function. */
|
|
781
|
+
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
782
|
+
/** The result interface if validation succeeds. */
|
|
783
|
+
interface SuccessResult<Output> {
|
|
784
|
+
/** The typed output value. */
|
|
785
|
+
readonly value: Output;
|
|
786
|
+
/** The absence of issues indicates success. */
|
|
787
|
+
readonly issues?: undefined;
|
|
788
|
+
}
|
|
789
|
+
interface Options {
|
|
790
|
+
/** Implicit support for additional vendor-specific parameters, if needed. */
|
|
791
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
792
|
+
}
|
|
793
|
+
/** The result interface if validation fails. */
|
|
794
|
+
interface FailureResult {
|
|
795
|
+
/** The issues of failed validation. */
|
|
796
|
+
readonly issues: ReadonlyArray<Issue>;
|
|
797
|
+
}
|
|
798
|
+
/** The issue interface of the failure output. */
|
|
799
|
+
interface Issue {
|
|
800
|
+
/** The error message of the issue. */
|
|
801
|
+
readonly message: string;
|
|
802
|
+
/** The path of the issue, if any. */
|
|
803
|
+
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
804
|
+
}
|
|
805
|
+
/** The path segment interface of the issue. */
|
|
806
|
+
interface PathSegment {
|
|
807
|
+
/** The key representing a path segment. */
|
|
808
|
+
readonly key: PropertyKey;
|
|
809
|
+
}
|
|
810
|
+
/** The Standard types interface. */
|
|
811
|
+
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
|
|
812
|
+
/** Infers the input type of a Standard. */
|
|
813
|
+
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
|
|
814
|
+
/** Infers the output type of a Standard. */
|
|
815
|
+
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
816
|
+
}
|
|
817
|
+
/** The Standard JSON Schema interface. */
|
|
818
|
+
interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
|
|
819
|
+
/** The Standard JSON Schema properties. */
|
|
820
|
+
readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
|
|
821
|
+
}
|
|
822
|
+
declare namespace StandardJSONSchemaV1 {
|
|
823
|
+
/** The Standard JSON Schema properties interface. */
|
|
824
|
+
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
|
|
825
|
+
/** Methods for generating the input/output JSON Schema. */
|
|
826
|
+
readonly jsonSchema: Converter;
|
|
827
|
+
}
|
|
828
|
+
/** The Standard JSON Schema converter interface. */
|
|
829
|
+
interface Converter {
|
|
830
|
+
/** Converts the input type to JSON Schema. May throw if conversion is not supported. */
|
|
831
|
+
readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
|
|
832
|
+
/** Converts the output type to JSON Schema. May throw if conversion is not supported. */
|
|
833
|
+
readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
|
|
834
|
+
}
|
|
835
|
+
/** The target version of the generated JSON Schema.
|
|
836
|
+
*
|
|
837
|
+
* It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use.
|
|
838
|
+
*
|
|
839
|
+
* The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
|
|
840
|
+
*
|
|
841
|
+
* All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
|
|
842
|
+
*/
|
|
843
|
+
type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
|
|
844
|
+
/** The options for the input/output methods. */
|
|
845
|
+
interface Options {
|
|
846
|
+
/** 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. */
|
|
847
|
+
readonly target: Target;
|
|
848
|
+
/** Implicit support for additional vendor-specific parameters, if needed. */
|
|
849
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
850
|
+
}
|
|
851
|
+
/** The Standard types interface. */
|
|
852
|
+
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
|
|
853
|
+
/** Infers the input type of a Standard. */
|
|
854
|
+
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
|
|
855
|
+
/** Infers the output type of a Standard. */
|
|
856
|
+
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
857
|
+
}
|
|
858
|
+
interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
|
|
859
|
+
//#endregion
|
|
860
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.cts
|
|
861
|
+
declare const $output: unique symbol;
|
|
862
|
+
type $output = typeof $output;
|
|
863
|
+
declare const $input: unique symbol;
|
|
864
|
+
type $input = typeof $input;
|
|
865
|
+
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;
|
|
866
|
+
type MetadataType = object | undefined;
|
|
867
|
+
declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
|
|
868
|
+
_meta: Meta;
|
|
869
|
+
_schema: Schema;
|
|
870
|
+
_map: WeakMap<Schema, $replace<Meta, Schema>>;
|
|
871
|
+
_idmap: Map<string, Schema>;
|
|
872
|
+
add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
|
|
873
|
+
clear(): this;
|
|
874
|
+
remove(schema: Schema): this;
|
|
875
|
+
get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
|
|
876
|
+
has(schema: Schema): boolean;
|
|
877
|
+
}
|
|
878
|
+
interface JSONSchemaMeta {
|
|
879
|
+
id?: string | undefined;
|
|
880
|
+
title?: string | undefined;
|
|
881
|
+
description?: string | undefined;
|
|
882
|
+
deprecated?: boolean | undefined;
|
|
883
|
+
[k: string]: unknown;
|
|
884
|
+
}
|
|
885
|
+
interface GlobalMeta extends JSONSchemaMeta {}
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts
|
|
888
|
+
type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
|
|
889
|
+
interface JSONSchemaGeneratorParams {
|
|
890
|
+
processors: Record<string, Processor>;
|
|
891
|
+
/** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
|
|
892
|
+
* @default globalRegistry */
|
|
893
|
+
metadata?: $ZodRegistry<Record<string, any>>;
|
|
894
|
+
/** The JSON Schema version to target.
|
|
895
|
+
* - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
|
|
896
|
+
* - `"draft-07"` — JSON Schema Draft 7
|
|
897
|
+
* - `"draft-04"` — JSON Schema Draft 4
|
|
898
|
+
* - `"openapi-3.0"` — OpenAPI 3.0 Schema Object */
|
|
899
|
+
target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
|
|
900
|
+
/** How to handle unrepresentable types.
|
|
901
|
+
* - `"throw"` — Default. Unrepresentable types throw an error
|
|
902
|
+
* - `"any"` — Unrepresentable types become `{}` */
|
|
903
|
+
unrepresentable?: "throw" | "any";
|
|
904
|
+
/** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
|
|
905
|
+
override?: (ctx: {
|
|
906
|
+
zodSchema: $ZodTypes;
|
|
907
|
+
jsonSchema: BaseSchema;
|
|
908
|
+
path: (string | number)[];
|
|
909
|
+
}) => void;
|
|
910
|
+
/** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, defaults, coerced primitives, etc.
|
|
911
|
+
* - `"output"` — Default. Convert the output schema.
|
|
912
|
+
* - `"input"` — Convert the input schema. */
|
|
913
|
+
io?: "input" | "output";
|
|
914
|
+
cycles?: "ref" | "throw";
|
|
915
|
+
reused?: "ref" | "inline";
|
|
916
|
+
external?: {
|
|
917
|
+
registry: $ZodRegistry<{
|
|
918
|
+
id?: string | undefined;
|
|
919
|
+
}>;
|
|
920
|
+
uri?: ((id: string) => string) | undefined;
|
|
921
|
+
defs: Record<string, BaseSchema>;
|
|
922
|
+
} | undefined;
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Parameters for the toJSONSchema function.
|
|
926
|
+
*/
|
|
927
|
+
type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
|
|
928
|
+
interface ProcessParams {
|
|
929
|
+
schemaPath: $ZodType[];
|
|
930
|
+
path: (string | number)[];
|
|
931
|
+
}
|
|
932
|
+
interface Seen {
|
|
933
|
+
/** JSON Schema result for this Zod schema */
|
|
934
|
+
schema: BaseSchema;
|
|
935
|
+
/** A cached version of the schema that doesn't get overwritten during ref resolution */
|
|
936
|
+
def?: BaseSchema;
|
|
937
|
+
defId?: string | undefined;
|
|
938
|
+
/** Number of times this schema was encountered during traversal */
|
|
939
|
+
count: number;
|
|
940
|
+
/** Cycle path */
|
|
941
|
+
cycle?: (string | number)[] | undefined;
|
|
942
|
+
isParent?: boolean | undefined;
|
|
943
|
+
/** Schema to inherit JSON Schema properties from (set by processor for wrappers) */
|
|
944
|
+
ref?: $ZodType | null;
|
|
945
|
+
/** JSON Schema property path for this schema */
|
|
946
|
+
path?: (string | number)[] | undefined;
|
|
947
|
+
}
|
|
948
|
+
interface ToJSONSchemaContext {
|
|
949
|
+
processors: Record<string, Processor>;
|
|
950
|
+
metadataRegistry: $ZodRegistry<Record<string, any>>;
|
|
951
|
+
target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
|
|
952
|
+
unrepresentable: "throw" | "any";
|
|
953
|
+
override: (ctx: {
|
|
954
|
+
zodSchema: $ZodType;
|
|
955
|
+
jsonSchema: BaseSchema;
|
|
956
|
+
path: (string | number)[];
|
|
957
|
+
}) => void;
|
|
958
|
+
io: "input" | "output";
|
|
959
|
+
counter: number;
|
|
960
|
+
seen: Map<$ZodType, Seen>;
|
|
961
|
+
cycles: "ref" | "throw";
|
|
962
|
+
reused: "ref" | "inline";
|
|
963
|
+
external?: {
|
|
964
|
+
registry: $ZodRegistry<{
|
|
965
|
+
id?: string | undefined;
|
|
966
|
+
}>;
|
|
967
|
+
uri?: ((id: string) => string) | undefined;
|
|
968
|
+
defs: Record<string, BaseSchema>;
|
|
969
|
+
} | undefined;
|
|
970
|
+
}
|
|
971
|
+
type ZodStandardSchemaWithJSON$1<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
|
|
972
|
+
interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
|
|
973
|
+
"~standard": ZodStandardSchemaWithJSON$1<T>;
|
|
974
|
+
}
|
|
975
|
+
//#endregion
|
|
976
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.d.cts
|
|
977
|
+
type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
|
|
978
|
+
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 & {});
|
|
979
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
980
|
+
type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
981
|
+
type MakePartial<T, K extends keyof T> = Omit$1<T, K> & InexactPartial<Pick<T, K>>;
|
|
982
|
+
type NoUndefined<T> = T extends undefined ? never : T;
|
|
983
|
+
type LoosePartial<T extends object> = InexactPartial<T> & {
|
|
984
|
+
[k: string]: unknown;
|
|
985
|
+
};
|
|
986
|
+
type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
|
|
987
|
+
type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined };
|
|
988
|
+
type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
989
|
+
readonly [Symbol.toStringTag]: string;
|
|
990
|
+
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
991
|
+
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>;
|
|
992
|
+
type SomeObject = Record<PropertyKey, any>;
|
|
993
|
+
type Identity<T> = T;
|
|
994
|
+
type Flatten$1<T> = Identity<{ [k in keyof T]: T[k] }>;
|
|
995
|
+
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
996
|
+
type Extend<A extends SomeObject, B extends SomeObject> = 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] }>;
|
|
997
|
+
type TupleItems = ReadonlyArray<SomeType>;
|
|
998
|
+
type AnyFunc = (...args: any[]) => any;
|
|
999
|
+
type MaybeAsync<T> = T | Promise<T>;
|
|
1000
|
+
type EnumValue = string | number;
|
|
1001
|
+
type EnumLike = Readonly<Record<string, EnumValue>>;
|
|
1002
|
+
type ToEnum<T extends EnumValue> = Flatten$1<{ [k in T]: k }>;
|
|
1003
|
+
type Literal = string | number | bigint | boolean | null | undefined;
|
|
1004
|
+
type Primitive$1 = string | number | symbol | bigint | boolean | null | undefined;
|
|
1005
|
+
type HasLength = {
|
|
1006
|
+
length: number;
|
|
1007
|
+
};
|
|
1008
|
+
type Numeric = number | bigint | Date;
|
|
1009
|
+
type PropValues = Record<string, Set<Primitive$1>>;
|
|
1010
|
+
type PrimitiveSet = Set<Primitive$1>;
|
|
1011
|
+
type EmptyToNever<T> = keyof T extends never ? never : T;
|
|
1012
|
+
declare abstract class Class {
|
|
1013
|
+
constructor(..._args: any[]);
|
|
1014
|
+
}
|
|
1015
|
+
//#endregion
|
|
1016
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.d.cts
|
|
1017
|
+
declare const version: {
|
|
1018
|
+
readonly major: 4;
|
|
1019
|
+
readonly minor: 3;
|
|
1020
|
+
readonly patch: number;
|
|
1021
|
+
};
|
|
1022
|
+
//#endregion
|
|
1023
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.d.cts
|
|
1024
|
+
interface ParseContext<T extends $ZodIssueBase = never> {
|
|
1025
|
+
/** Customize error messages. */
|
|
1026
|
+
readonly error?: $ZodErrorMap<T>;
|
|
1027
|
+
/** Include the `input` field in issue objects. Default `false`. */
|
|
1028
|
+
readonly reportInput?: boolean;
|
|
1029
|
+
/** Skip eval-based fast path. Default `false`. */
|
|
1030
|
+
readonly jitless?: boolean;
|
|
1031
|
+
}
|
|
1032
|
+
/** @internal */
|
|
1033
|
+
interface ParseContextInternal<T extends $ZodIssueBase = never> extends ParseContext<T> {
|
|
1034
|
+
readonly async?: boolean | undefined;
|
|
1035
|
+
readonly direction?: "forward" | "backward";
|
|
1036
|
+
readonly skipChecks?: boolean;
|
|
1037
|
+
}
|
|
1038
|
+
interface ParsePayload<T = unknown> {
|
|
1039
|
+
value: T;
|
|
1040
|
+
issues: $ZodRawIssue[];
|
|
1041
|
+
/** A may to mark a whole payload as aborted. Used in codecs/pipes. */
|
|
1042
|
+
aborted?: boolean;
|
|
1043
|
+
}
|
|
1044
|
+
type CheckFn<T> = (input: ParsePayload<T>) => MaybeAsync<void>;
|
|
1045
|
+
interface $ZodTypeDef {
|
|
1046
|
+
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";
|
|
1047
|
+
error?: $ZodErrorMap<never> | undefined;
|
|
1048
|
+
checks?: $ZodCheck<never>[];
|
|
1049
|
+
}
|
|
1050
|
+
interface _$ZodTypeInternals {
|
|
1051
|
+
/** The `@zod/core` version of this schema */
|
|
1052
|
+
version: typeof version;
|
|
1053
|
+
/** Schema definition. */
|
|
1054
|
+
def: $ZodTypeDef;
|
|
1055
|
+
/** @internal Randomly generated ID for this schema. */
|
|
1056
|
+
/** @internal List of deferred initializers. */
|
|
1057
|
+
deferred: AnyFunc[] | undefined;
|
|
1058
|
+
/** @internal Parses input and runs all checks (refinements). */
|
|
1059
|
+
run(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
|
|
1060
|
+
/** @internal Parses input, doesn't run checks. */
|
|
1061
|
+
parse(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
|
|
1062
|
+
/** @internal Stores identifiers for the set of traits implemented by this schema. */
|
|
1063
|
+
traits: Set<string>;
|
|
1064
|
+
/** @internal Indicates that a schema output type should be considered optional inside objects.
|
|
1065
|
+
* @default Required
|
|
1066
|
+
*/
|
|
1067
|
+
/** @internal */
|
|
1068
|
+
optin?: "optional" | undefined;
|
|
1069
|
+
/** @internal */
|
|
1070
|
+
optout?: "optional" | undefined;
|
|
1071
|
+
/** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
|
|
1072
|
+
*
|
|
1073
|
+
* Defined on: enum, const, literal, null, undefined
|
|
1074
|
+
* Passthrough: optional, nullable, branded, default, catch, pipe
|
|
1075
|
+
* Todo: unions?
|
|
1076
|
+
*/
|
|
1077
|
+
values?: PrimitiveSet | undefined;
|
|
1078
|
+
/** Default value bubbled up from */
|
|
1079
|
+
/** @internal A set of literal discriminators used for the fast path in discriminated unions. */
|
|
1080
|
+
propValues?: PropValues | undefined;
|
|
1081
|
+
/** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
|
|
1082
|
+
pattern: RegExp | undefined;
|
|
1083
|
+
/** @internal The constructor function of this schema. */
|
|
1084
|
+
constr: new (def: any) => $ZodType;
|
|
1085
|
+
/** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
|
|
1086
|
+
bag: Record<string, unknown>;
|
|
1087
|
+
/** @internal The set of issues this schema might throw during type checking. */
|
|
1088
|
+
isst: $ZodIssueBase;
|
|
1089
|
+
/** @internal Subject to change, not a public API. */
|
|
1090
|
+
processJSONSchema?: ((ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void) | undefined;
|
|
1091
|
+
/** An optional method used to override `toJSONSchema` logic. */
|
|
1092
|
+
toJSONSchema?: () => unknown;
|
|
1093
|
+
/** @internal The parent of this schema. Only set during certain clone operations. */
|
|
1094
|
+
parent?: $ZodType | undefined;
|
|
1095
|
+
}
|
|
1096
|
+
/** @internal */
|
|
1097
|
+
interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
|
|
1098
|
+
/** @internal The inferred output type */
|
|
1099
|
+
output: O;
|
|
1100
|
+
/** @internal The inferred input type */
|
|
1101
|
+
input: I;
|
|
1102
|
+
}
|
|
1103
|
+
type $ZodStandardSchema<T> = StandardSchemaV1.Props<input<T>, output<T>>;
|
|
1104
|
+
type SomeType = {
|
|
1105
|
+
_zod: _$ZodTypeInternals;
|
|
1106
|
+
};
|
|
1107
|
+
interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
|
|
1108
|
+
_zod: Internals;
|
|
1109
|
+
"~standard": $ZodStandardSchema<this>;
|
|
1110
|
+
}
|
|
1111
|
+
interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T["output"], T["input"], T> {}
|
|
1112
|
+
declare const $ZodType: $constructor<$ZodType>;
|
|
1113
|
+
interface $ZodStringDef extends $ZodTypeDef {
|
|
1114
|
+
type: "string";
|
|
1115
|
+
coerce?: boolean;
|
|
1116
|
+
checks?: $ZodCheck<string>[];
|
|
1117
|
+
}
|
|
1118
|
+
interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
|
|
1119
|
+
def: $ZodStringDef;
|
|
1120
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
1121
|
+
pattern: RegExp;
|
|
1122
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
1123
|
+
isst: $ZodIssueInvalidType;
|
|
1124
|
+
bag: LoosePartial<{
|
|
1125
|
+
minimum: number;
|
|
1126
|
+
maximum: number;
|
|
1127
|
+
patterns: Set<RegExp>;
|
|
1128
|
+
format: string;
|
|
1129
|
+
contentEncoding: string;
|
|
1130
|
+
}>;
|
|
1131
|
+
}
|
|
1132
|
+
interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {}
|
|
1133
|
+
declare const $ZodString: $constructor<$ZodString>;
|
|
1134
|
+
interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, $ZodCheckStringFormatDef<Format> {}
|
|
1135
|
+
interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, $ZodCheckStringFormatInternals {
|
|
1136
|
+
def: $ZodStringFormatDef<Format>;
|
|
1137
|
+
}
|
|
1138
|
+
interface $ZodStringFormat<Format extends string = string> extends $ZodType {
|
|
1139
|
+
_zod: $ZodStringFormatInternals<Format>;
|
|
1140
|
+
}
|
|
1141
|
+
declare const $ZodStringFormat: $constructor<$ZodStringFormat>;
|
|
1142
|
+
interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {}
|
|
1143
|
+
interface $ZodGUID extends $ZodType {
|
|
1144
|
+
_zod: $ZodGUIDInternals;
|
|
1145
|
+
}
|
|
1146
|
+
declare const $ZodGUID: $constructor<$ZodGUID>;
|
|
1147
|
+
interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
|
|
1148
|
+
version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
|
|
1149
|
+
}
|
|
1150
|
+
interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
|
|
1151
|
+
def: $ZodUUIDDef;
|
|
1152
|
+
}
|
|
1153
|
+
interface $ZodUUID extends $ZodType {
|
|
1154
|
+
_zod: $ZodUUIDInternals;
|
|
1155
|
+
}
|
|
1156
|
+
declare const $ZodUUID: $constructor<$ZodUUID>;
|
|
1157
|
+
interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {}
|
|
1158
|
+
interface $ZodEmail extends $ZodType {
|
|
1159
|
+
_zod: $ZodEmailInternals;
|
|
1160
|
+
}
|
|
1161
|
+
declare const $ZodEmail: $constructor<$ZodEmail>;
|
|
1162
|
+
interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
|
|
1163
|
+
hostname?: RegExp | undefined;
|
|
1164
|
+
protocol?: RegExp | undefined;
|
|
1165
|
+
normalize?: boolean | undefined;
|
|
1166
|
+
}
|
|
1167
|
+
interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
|
|
1168
|
+
def: $ZodURLDef;
|
|
1169
|
+
}
|
|
1170
|
+
interface $ZodURL extends $ZodType {
|
|
1171
|
+
_zod: $ZodURLInternals;
|
|
1172
|
+
}
|
|
1173
|
+
declare const $ZodURL: $constructor<$ZodURL>;
|
|
1174
|
+
interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {}
|
|
1175
|
+
interface $ZodEmoji extends $ZodType {
|
|
1176
|
+
_zod: $ZodEmojiInternals;
|
|
1177
|
+
}
|
|
1178
|
+
declare const $ZodEmoji: $constructor<$ZodEmoji>;
|
|
1179
|
+
interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {}
|
|
1180
|
+
interface $ZodNanoID extends $ZodType {
|
|
1181
|
+
_zod: $ZodNanoIDInternals;
|
|
1182
|
+
}
|
|
1183
|
+
declare const $ZodNanoID: $constructor<$ZodNanoID>;
|
|
1184
|
+
interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
|
|
1185
|
+
interface $ZodCUID extends $ZodType {
|
|
1186
|
+
_zod: $ZodCUIDInternals;
|
|
1187
|
+
}
|
|
1188
|
+
declare const $ZodCUID: $constructor<$ZodCUID>;
|
|
1189
|
+
interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
|
|
1190
|
+
interface $ZodCUID2 extends $ZodType {
|
|
1191
|
+
_zod: $ZodCUID2Internals;
|
|
1192
|
+
}
|
|
1193
|
+
declare const $ZodCUID2: $constructor<$ZodCUID2>;
|
|
1194
|
+
interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {}
|
|
1195
|
+
interface $ZodULID extends $ZodType {
|
|
1196
|
+
_zod: $ZodULIDInternals;
|
|
1197
|
+
}
|
|
1198
|
+
declare const $ZodULID: $constructor<$ZodULID>;
|
|
1199
|
+
interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {}
|
|
1200
|
+
interface $ZodXID extends $ZodType {
|
|
1201
|
+
_zod: $ZodXIDInternals;
|
|
1202
|
+
}
|
|
1203
|
+
declare const $ZodXID: $constructor<$ZodXID>;
|
|
1204
|
+
interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {}
|
|
1205
|
+
interface $ZodKSUID extends $ZodType {
|
|
1206
|
+
_zod: $ZodKSUIDInternals;
|
|
1207
|
+
}
|
|
1208
|
+
declare const $ZodKSUID: $constructor<$ZodKSUID>;
|
|
1209
|
+
interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
|
|
1210
|
+
precision: number | null;
|
|
1211
|
+
offset: boolean;
|
|
1212
|
+
local: boolean;
|
|
1213
|
+
}
|
|
1214
|
+
interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
|
|
1215
|
+
def: $ZodISODateTimeDef;
|
|
1216
|
+
}
|
|
1217
|
+
interface $ZodISODateTime extends $ZodType {
|
|
1218
|
+
_zod: $ZodISODateTimeInternals;
|
|
1219
|
+
}
|
|
1220
|
+
declare const $ZodISODateTime: $constructor<$ZodISODateTime>;
|
|
1221
|
+
interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {}
|
|
1222
|
+
interface $ZodISODate extends $ZodType {
|
|
1223
|
+
_zod: $ZodISODateInternals;
|
|
1224
|
+
}
|
|
1225
|
+
declare const $ZodISODate: $constructor<$ZodISODate>;
|
|
1226
|
+
interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
|
|
1227
|
+
precision?: number | null;
|
|
1228
|
+
}
|
|
1229
|
+
interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
|
|
1230
|
+
def: $ZodISOTimeDef;
|
|
1231
|
+
}
|
|
1232
|
+
interface $ZodISOTime extends $ZodType {
|
|
1233
|
+
_zod: $ZodISOTimeInternals;
|
|
1234
|
+
}
|
|
1235
|
+
declare const $ZodISOTime: $constructor<$ZodISOTime>;
|
|
1236
|
+
interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {}
|
|
1237
|
+
interface $ZodISODuration extends $ZodType {
|
|
1238
|
+
_zod: $ZodISODurationInternals;
|
|
1239
|
+
}
|
|
1240
|
+
declare const $ZodISODuration: $constructor<$ZodISODuration>;
|
|
1241
|
+
interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
|
|
1242
|
+
version?: "v4";
|
|
1243
|
+
}
|
|
1244
|
+
interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
|
|
1245
|
+
def: $ZodIPv4Def;
|
|
1246
|
+
}
|
|
1247
|
+
interface $ZodIPv4 extends $ZodType {
|
|
1248
|
+
_zod: $ZodIPv4Internals;
|
|
1249
|
+
}
|
|
1250
|
+
declare const $ZodIPv4: $constructor<$ZodIPv4>;
|
|
1251
|
+
interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
|
|
1252
|
+
version?: "v6";
|
|
1253
|
+
}
|
|
1254
|
+
interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
|
|
1255
|
+
def: $ZodIPv6Def;
|
|
1256
|
+
}
|
|
1257
|
+
interface $ZodIPv6 extends $ZodType {
|
|
1258
|
+
_zod: $ZodIPv6Internals;
|
|
1259
|
+
}
|
|
1260
|
+
declare const $ZodIPv6: $constructor<$ZodIPv6>;
|
|
1261
|
+
interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
|
|
1262
|
+
version?: "v4";
|
|
1263
|
+
}
|
|
1264
|
+
interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
|
|
1265
|
+
def: $ZodCIDRv4Def;
|
|
1266
|
+
}
|
|
1267
|
+
interface $ZodCIDRv4 extends $ZodType {
|
|
1268
|
+
_zod: $ZodCIDRv4Internals;
|
|
1269
|
+
}
|
|
1270
|
+
declare const $ZodCIDRv4: $constructor<$ZodCIDRv4>;
|
|
1271
|
+
interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
|
|
1272
|
+
version?: "v6";
|
|
1273
|
+
}
|
|
1274
|
+
interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
|
|
1275
|
+
def: $ZodCIDRv6Def;
|
|
1276
|
+
}
|
|
1277
|
+
interface $ZodCIDRv6 extends $ZodType {
|
|
1278
|
+
_zod: $ZodCIDRv6Internals;
|
|
1279
|
+
}
|
|
1280
|
+
declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>;
|
|
1281
|
+
interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {}
|
|
1282
|
+
interface $ZodBase64 extends $ZodType {
|
|
1283
|
+
_zod: $ZodBase64Internals;
|
|
1284
|
+
}
|
|
1285
|
+
declare const $ZodBase64: $constructor<$ZodBase64>;
|
|
1286
|
+
interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {}
|
|
1287
|
+
interface $ZodBase64URL extends $ZodType {
|
|
1288
|
+
_zod: $ZodBase64URLInternals;
|
|
1289
|
+
}
|
|
1290
|
+
declare const $ZodBase64URL: $constructor<$ZodBase64URL>;
|
|
1291
|
+
interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {}
|
|
1292
|
+
interface $ZodE164 extends $ZodType {
|
|
1293
|
+
_zod: $ZodE164Internals;
|
|
1294
|
+
}
|
|
1295
|
+
declare const $ZodE164: $constructor<$ZodE164>;
|
|
1296
|
+
interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
|
|
1297
|
+
alg?: JWTAlgorithm | undefined;
|
|
1298
|
+
}
|
|
1299
|
+
interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
|
|
1300
|
+
def: $ZodJWTDef;
|
|
1301
|
+
}
|
|
1302
|
+
interface $ZodJWT extends $ZodType {
|
|
1303
|
+
_zod: $ZodJWTInternals;
|
|
1304
|
+
}
|
|
1305
|
+
declare const $ZodJWT: $constructor<$ZodJWT>;
|
|
1306
|
+
interface $ZodNumberDef extends $ZodTypeDef {
|
|
1307
|
+
type: "number";
|
|
1308
|
+
coerce?: boolean;
|
|
1309
|
+
}
|
|
1310
|
+
interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
|
|
1311
|
+
def: $ZodNumberDef;
|
|
1312
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
1313
|
+
pattern: RegExp;
|
|
1314
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
1315
|
+
isst: $ZodIssueInvalidType;
|
|
1316
|
+
bag: LoosePartial<{
|
|
1317
|
+
minimum: number;
|
|
1318
|
+
maximum: number;
|
|
1319
|
+
exclusiveMinimum: number;
|
|
1320
|
+
exclusiveMaximum: number;
|
|
1321
|
+
format: string;
|
|
1322
|
+
pattern: RegExp;
|
|
1323
|
+
}>;
|
|
1324
|
+
}
|
|
1325
|
+
interface $ZodNumber<Input = unknown> extends $ZodType {
|
|
1326
|
+
_zod: $ZodNumberInternals<Input>;
|
|
1327
|
+
}
|
|
1328
|
+
declare const $ZodNumber: $constructor<$ZodNumber>;
|
|
1329
|
+
interface $ZodBooleanDef extends $ZodTypeDef {
|
|
1330
|
+
type: "boolean";
|
|
1331
|
+
coerce?: boolean;
|
|
1332
|
+
checks?: $ZodCheck<boolean>[];
|
|
1333
|
+
}
|
|
1334
|
+
interface $ZodBooleanInternals<T = unknown> extends $ZodTypeInternals<boolean, T> {
|
|
1335
|
+
pattern: RegExp;
|
|
1336
|
+
def: $ZodBooleanDef;
|
|
1337
|
+
isst: $ZodIssueInvalidType;
|
|
1338
|
+
}
|
|
1339
|
+
interface $ZodBoolean<T = unknown> extends $ZodType {
|
|
1340
|
+
_zod: $ZodBooleanInternals<T>;
|
|
1341
|
+
}
|
|
1342
|
+
declare const $ZodBoolean: $constructor<$ZodBoolean>;
|
|
1343
|
+
interface $ZodBigIntDef extends $ZodTypeDef {
|
|
1344
|
+
type: "bigint";
|
|
1345
|
+
coerce?: boolean;
|
|
1346
|
+
}
|
|
1347
|
+
interface $ZodBigIntInternals<T = unknown> extends $ZodTypeInternals<bigint, T> {
|
|
1348
|
+
pattern: RegExp;
|
|
1349
|
+
/** @internal Internal API, use with caution */
|
|
1350
|
+
def: $ZodBigIntDef;
|
|
1351
|
+
isst: $ZodIssueInvalidType;
|
|
1352
|
+
bag: LoosePartial<{
|
|
1353
|
+
minimum: bigint;
|
|
1354
|
+
maximum: bigint;
|
|
1355
|
+
format: string;
|
|
1356
|
+
}>;
|
|
1357
|
+
}
|
|
1358
|
+
interface $ZodBigInt<T = unknown> extends $ZodType {
|
|
1359
|
+
_zod: $ZodBigIntInternals<T>;
|
|
1360
|
+
}
|
|
1361
|
+
declare const $ZodBigInt: $constructor<$ZodBigInt>;
|
|
1362
|
+
interface $ZodSymbolDef extends $ZodTypeDef {
|
|
1363
|
+
type: "symbol";
|
|
1364
|
+
}
|
|
1365
|
+
interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
|
|
1366
|
+
def: $ZodSymbolDef;
|
|
1367
|
+
isst: $ZodIssueInvalidType;
|
|
1368
|
+
}
|
|
1369
|
+
interface $ZodSymbol extends $ZodType {
|
|
1370
|
+
_zod: $ZodSymbolInternals;
|
|
1371
|
+
}
|
|
1372
|
+
declare const $ZodSymbol: $constructor<$ZodSymbol>;
|
|
1373
|
+
interface $ZodUndefinedDef extends $ZodTypeDef {
|
|
1374
|
+
type: "undefined";
|
|
1375
|
+
}
|
|
1376
|
+
interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
|
|
1377
|
+
pattern: RegExp;
|
|
1378
|
+
def: $ZodUndefinedDef;
|
|
1379
|
+
values: PrimitiveSet;
|
|
1380
|
+
isst: $ZodIssueInvalidType;
|
|
1381
|
+
}
|
|
1382
|
+
interface $ZodUndefined extends $ZodType {
|
|
1383
|
+
_zod: $ZodUndefinedInternals;
|
|
1384
|
+
}
|
|
1385
|
+
declare const $ZodUndefined: $constructor<$ZodUndefined>;
|
|
1386
|
+
interface $ZodNullDef extends $ZodTypeDef {
|
|
1387
|
+
type: "null";
|
|
1388
|
+
}
|
|
1389
|
+
interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
|
|
1390
|
+
pattern: RegExp;
|
|
1391
|
+
def: $ZodNullDef;
|
|
1392
|
+
values: PrimitiveSet;
|
|
1393
|
+
isst: $ZodIssueInvalidType;
|
|
1394
|
+
}
|
|
1395
|
+
interface $ZodNull extends $ZodType {
|
|
1396
|
+
_zod: $ZodNullInternals;
|
|
1397
|
+
}
|
|
1398
|
+
declare const $ZodNull: $constructor<$ZodNull>;
|
|
1399
|
+
interface $ZodAnyDef extends $ZodTypeDef {
|
|
1400
|
+
type: "any";
|
|
1401
|
+
}
|
|
1402
|
+
interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
|
|
1403
|
+
def: $ZodAnyDef;
|
|
1404
|
+
isst: never;
|
|
1405
|
+
}
|
|
1406
|
+
interface $ZodAny extends $ZodType {
|
|
1407
|
+
_zod: $ZodAnyInternals;
|
|
1408
|
+
}
|
|
1409
|
+
declare const $ZodAny: $constructor<$ZodAny>;
|
|
1410
|
+
interface $ZodUnknownDef extends $ZodTypeDef {
|
|
1411
|
+
type: "unknown";
|
|
1412
|
+
}
|
|
1413
|
+
interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
|
|
1414
|
+
def: $ZodUnknownDef;
|
|
1415
|
+
isst: never;
|
|
1416
|
+
}
|
|
1417
|
+
interface $ZodUnknown extends $ZodType {
|
|
1418
|
+
_zod: $ZodUnknownInternals;
|
|
1419
|
+
}
|
|
1420
|
+
declare const $ZodUnknown: $constructor<$ZodUnknown>;
|
|
1421
|
+
interface $ZodNeverDef extends $ZodTypeDef {
|
|
1422
|
+
type: "never";
|
|
1423
|
+
}
|
|
1424
|
+
interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
|
|
1425
|
+
def: $ZodNeverDef;
|
|
1426
|
+
isst: $ZodIssueInvalidType;
|
|
1427
|
+
}
|
|
1428
|
+
interface $ZodNever extends $ZodType {
|
|
1429
|
+
_zod: $ZodNeverInternals;
|
|
1430
|
+
}
|
|
1431
|
+
declare const $ZodNever: $constructor<$ZodNever>;
|
|
1432
|
+
interface $ZodVoidDef extends $ZodTypeDef {
|
|
1433
|
+
type: "void";
|
|
1434
|
+
}
|
|
1435
|
+
interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
|
|
1436
|
+
def: $ZodVoidDef;
|
|
1437
|
+
isst: $ZodIssueInvalidType;
|
|
1438
|
+
}
|
|
1439
|
+
interface $ZodVoid extends $ZodType {
|
|
1440
|
+
_zod: $ZodVoidInternals;
|
|
1441
|
+
}
|
|
1442
|
+
declare const $ZodVoid: $constructor<$ZodVoid>;
|
|
1443
|
+
interface $ZodDateDef extends $ZodTypeDef {
|
|
1444
|
+
type: "date";
|
|
1445
|
+
coerce?: boolean;
|
|
1446
|
+
}
|
|
1447
|
+
interface $ZodDateInternals<T = unknown> extends $ZodTypeInternals<Date, T> {
|
|
1448
|
+
def: $ZodDateDef;
|
|
1449
|
+
isst: $ZodIssueInvalidType;
|
|
1450
|
+
bag: LoosePartial<{
|
|
1451
|
+
minimum: Date;
|
|
1452
|
+
maximum: Date;
|
|
1453
|
+
format: string;
|
|
1454
|
+
}>;
|
|
1455
|
+
}
|
|
1456
|
+
interface $ZodDate<T = unknown> extends $ZodType {
|
|
1457
|
+
_zod: $ZodDateInternals<T>;
|
|
1458
|
+
}
|
|
1459
|
+
declare const $ZodDate: $constructor<$ZodDate>;
|
|
1460
|
+
interface $ZodArrayDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1461
|
+
type: "array";
|
|
1462
|
+
element: T;
|
|
1463
|
+
}
|
|
1464
|
+
interface $ZodArrayInternals<T extends SomeType = $ZodType> extends _$ZodTypeInternals {
|
|
1465
|
+
def: $ZodArrayDef<T>;
|
|
1466
|
+
isst: $ZodIssueInvalidType;
|
|
1467
|
+
output: output<T>[];
|
|
1468
|
+
input: input<T>[];
|
|
1469
|
+
}
|
|
1470
|
+
interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {}
|
|
1471
|
+
declare const $ZodArray: $constructor<$ZodArray>;
|
|
1472
|
+
type OptionalOutSchema = {
|
|
1473
|
+
_zod: {
|
|
1474
|
+
optout: "optional";
|
|
1475
|
+
};
|
|
1476
|
+
};
|
|
1477
|
+
type OptionalInSchema = {
|
|
1478
|
+
_zod: {
|
|
1479
|
+
optin: "optional";
|
|
1480
|
+
};
|
|
1481
|
+
};
|
|
1482
|
+
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>;
|
|
1483
|
+
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>;
|
|
1484
|
+
type $ZodObjectConfig = {
|
|
1485
|
+
out: Record<string, unknown>;
|
|
1486
|
+
in: Record<string, unknown>;
|
|
1487
|
+
};
|
|
1488
|
+
type $loose = {
|
|
1489
|
+
out: Record<string, unknown>;
|
|
1490
|
+
in: Record<string, unknown>;
|
|
1491
|
+
};
|
|
1492
|
+
type $strict = {
|
|
1493
|
+
out: {};
|
|
1494
|
+
in: {};
|
|
1495
|
+
};
|
|
1496
|
+
type $strip = {
|
|
1497
|
+
out: {};
|
|
1498
|
+
in: {};
|
|
1499
|
+
};
|
|
1500
|
+
type $catchall<T extends SomeType> = {
|
|
1501
|
+
out: {
|
|
1502
|
+
[k: string]: output<T>;
|
|
1503
|
+
};
|
|
1504
|
+
in: {
|
|
1505
|
+
[k: string]: input<T>;
|
|
1506
|
+
};
|
|
1507
|
+
};
|
|
1508
|
+
type $ZodShape = Readonly<{
|
|
1509
|
+
[k: string]: $ZodType;
|
|
1510
|
+
}>;
|
|
1511
|
+
interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
|
|
1512
|
+
type: "object";
|
|
1513
|
+
shape: Shape;
|
|
1514
|
+
catchall?: $ZodType | undefined;
|
|
1515
|
+
}
|
|
1516
|
+
interface $ZodObjectInternals< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
|
|
1517
|
+
def: $ZodObjectDef<Shape>;
|
|
1518
|
+
config: Config;
|
|
1519
|
+
isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
|
|
1520
|
+
propValues: PropValues;
|
|
1521
|
+
output: $InferObjectOutput<Shape, Config["out"]>;
|
|
1522
|
+
input: $InferObjectInput<Shape, Config["in"]>;
|
|
1523
|
+
optin?: "optional" | undefined;
|
|
1524
|
+
optout?: "optional" | undefined;
|
|
1525
|
+
}
|
|
1526
|
+
type $ZodLooseShape = Record<string, any>;
|
|
1527
|
+
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>> {}
|
|
1528
|
+
declare const $ZodObject: $constructor<$ZodObject>;
|
|
1529
|
+
type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
|
|
1530
|
+
type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
|
|
1531
|
+
interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
|
|
1532
|
+
type: "union";
|
|
1533
|
+
options: Options;
|
|
1534
|
+
inclusive?: boolean;
|
|
1535
|
+
}
|
|
1536
|
+
type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
|
|
1537
|
+
type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
|
|
1538
|
+
interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends _$ZodTypeInternals {
|
|
1539
|
+
def: $ZodUnionDef<T>;
|
|
1540
|
+
isst: $ZodIssueInvalidUnion;
|
|
1541
|
+
pattern: T[number]["_zod"]["pattern"];
|
|
1542
|
+
values: T[number]["_zod"]["values"];
|
|
1543
|
+
output: $InferUnionOutput<T[number]>;
|
|
1544
|
+
input: $InferUnionInput<T[number]>;
|
|
1545
|
+
optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
|
|
1546
|
+
optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
|
|
1547
|
+
}
|
|
1548
|
+
interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodUnionInternals<T>> {
|
|
1549
|
+
_zod: $ZodUnionInternals<T>;
|
|
1550
|
+
}
|
|
1551
|
+
declare const $ZodUnion: $constructor<$ZodUnion>;
|
|
1552
|
+
interface $ZodDiscriminatedUnionDef<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionDef<Options> {
|
|
1553
|
+
discriminator: Disc;
|
|
1554
|
+
unionFallback?: boolean;
|
|
1555
|
+
}
|
|
1556
|
+
interface $ZodDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionInternals<Options> {
|
|
1557
|
+
def: $ZodDiscriminatedUnionDef<Options, Disc>;
|
|
1558
|
+
propValues: PropValues;
|
|
1559
|
+
}
|
|
1560
|
+
interface $ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodType {
|
|
1561
|
+
_zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
|
|
1562
|
+
}
|
|
1563
|
+
declare const $ZodDiscriminatedUnion: $constructor<$ZodDiscriminatedUnion>;
|
|
1564
|
+
interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1565
|
+
type: "intersection";
|
|
1566
|
+
left: Left;
|
|
1567
|
+
right: Right;
|
|
1568
|
+
}
|
|
1569
|
+
interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
|
|
1570
|
+
def: $ZodIntersectionDef<A, B>;
|
|
1571
|
+
isst: never;
|
|
1572
|
+
optin: A["_zod"]["optin"] | B["_zod"]["optin"];
|
|
1573
|
+
optout: A["_zod"]["optout"] | B["_zod"]["optout"];
|
|
1574
|
+
output: output<A> & output<B>;
|
|
1575
|
+
input: input<A> & input<B>;
|
|
1576
|
+
}
|
|
1577
|
+
interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
1578
|
+
_zod: $ZodIntersectionInternals<A, B>;
|
|
1579
|
+
}
|
|
1580
|
+
declare const $ZodIntersection: $constructor<$ZodIntersection>;
|
|
1581
|
+
interface $ZodTupleDef<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
|
|
1582
|
+
type: "tuple";
|
|
1583
|
+
items: T;
|
|
1584
|
+
rest: Rest;
|
|
1585
|
+
}
|
|
1586
|
+
type $InferTupleInputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleInputTypeWithOptionals<T>, ...(Rest extends SomeType ? input<Rest>[] : [])];
|
|
1587
|
+
type TupleInputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: input<T[k]> };
|
|
1588
|
+
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> : [];
|
|
1589
|
+
type $InferTupleOutputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleOutputTypeWithOptionals<T>, ...(Rest extends SomeType ? output<Rest>[] : [])];
|
|
1590
|
+
type TupleOutputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: output<T[k]> };
|
|
1591
|
+
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> : [];
|
|
1592
|
+
interface $ZodTupleInternals<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends _$ZodTypeInternals {
|
|
1593
|
+
def: $ZodTupleDef<T, Rest>;
|
|
1594
|
+
isst: $ZodIssueInvalidType | $ZodIssueTooBig<unknown[]> | $ZodIssueTooSmall<unknown[]>;
|
|
1595
|
+
output: $InferTupleOutputType<T, Rest>;
|
|
1596
|
+
input: $InferTupleInputType<T, Rest>;
|
|
1597
|
+
}
|
|
1598
|
+
interface $ZodTuple<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodType {
|
|
1599
|
+
_zod: $ZodTupleInternals<T, Rest>;
|
|
1600
|
+
}
|
|
1601
|
+
declare const $ZodTuple: $constructor<$ZodTuple>;
|
|
1602
|
+
type $ZodRecordKey = $ZodType<string | number | symbol, unknown>;
|
|
1603
|
+
interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1604
|
+
type: "record";
|
|
1605
|
+
keyType: Key;
|
|
1606
|
+
valueType: Value;
|
|
1607
|
+
/** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
|
|
1608
|
+
mode?: "strict" | "loose";
|
|
1609
|
+
}
|
|
1610
|
+
type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<output<Key>, output<Value>>> : Record<output<Key>, output<Value>>;
|
|
1611
|
+
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>>;
|
|
1612
|
+
interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
|
|
1613
|
+
def: $ZodRecordDef<Key, Value>;
|
|
1614
|
+
isst: $ZodIssueInvalidType | $ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
|
|
1615
|
+
optin?: "optional" | undefined;
|
|
1616
|
+
optout?: "optional" | undefined;
|
|
1617
|
+
}
|
|
1618
|
+
type $partial = {
|
|
1619
|
+
"~~partial": true;
|
|
1620
|
+
};
|
|
1621
|
+
interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodType {
|
|
1622
|
+
_zod: $ZodRecordInternals<Key, Value>;
|
|
1623
|
+
}
|
|
1624
|
+
declare const $ZodRecord: $constructor<$ZodRecord>;
|
|
1625
|
+
interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1626
|
+
type: "map";
|
|
1627
|
+
keyType: Key;
|
|
1628
|
+
valueType: Value;
|
|
1629
|
+
}
|
|
1630
|
+
interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key>, output<Value>>, Map<input<Key>, input<Value>>> {
|
|
1631
|
+
def: $ZodMapDef<Key, Value>;
|
|
1632
|
+
isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement<unknown>;
|
|
1633
|
+
optin?: "optional" | undefined;
|
|
1634
|
+
optout?: "optional" | undefined;
|
|
1635
|
+
}
|
|
1636
|
+
interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
|
|
1637
|
+
_zod: $ZodMapInternals<Key, Value>;
|
|
1638
|
+
}
|
|
1639
|
+
declare const $ZodMap: $constructor<$ZodMap>;
|
|
1640
|
+
interface $ZodSetDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1641
|
+
type: "set";
|
|
1642
|
+
valueType: T;
|
|
1643
|
+
}
|
|
1644
|
+
interface $ZodSetInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T>>, Set<input<T>>> {
|
|
1645
|
+
def: $ZodSetDef<T>;
|
|
1646
|
+
isst: $ZodIssueInvalidType;
|
|
1647
|
+
optin?: "optional" | undefined;
|
|
1648
|
+
optout?: "optional" | undefined;
|
|
1649
|
+
}
|
|
1650
|
+
interface $ZodSet<T extends SomeType = $ZodType> extends $ZodType {
|
|
1651
|
+
_zod: $ZodSetInternals<T>;
|
|
1652
|
+
}
|
|
1653
|
+
declare const $ZodSet: $constructor<$ZodSet>;
|
|
1654
|
+
type $InferEnumOutput<T extends EnumLike> = T[keyof T] & {};
|
|
1655
|
+
type $InferEnumInput<T extends EnumLike> = T[keyof T] & {};
|
|
1656
|
+
interface $ZodEnumDef<T extends EnumLike = EnumLike> extends $ZodTypeDef {
|
|
1657
|
+
type: "enum";
|
|
1658
|
+
entries: T;
|
|
1659
|
+
}
|
|
1660
|
+
interface $ZodEnumInternals< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
|
|
1661
|
+
def: $ZodEnumDef<T>;
|
|
1662
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
1663
|
+
values: PrimitiveSet;
|
|
1664
|
+
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
1665
|
+
pattern: RegExp;
|
|
1666
|
+
isst: $ZodIssueInvalidValue;
|
|
1667
|
+
}
|
|
1668
|
+
interface $ZodEnum<T extends EnumLike = EnumLike> extends $ZodType {
|
|
1669
|
+
_zod: $ZodEnumInternals<T>;
|
|
1670
|
+
}
|
|
1671
|
+
declare const $ZodEnum: $constructor<$ZodEnum>;
|
|
1672
|
+
interface $ZodLiteralDef<T extends Literal> extends $ZodTypeDef {
|
|
1673
|
+
type: "literal";
|
|
1674
|
+
values: T[];
|
|
1675
|
+
}
|
|
1676
|
+
interface $ZodLiteralInternals<T extends Literal = Literal> extends $ZodTypeInternals<T, T> {
|
|
1677
|
+
def: $ZodLiteralDef<T>;
|
|
1678
|
+
values: Set<T>;
|
|
1679
|
+
pattern: RegExp;
|
|
1680
|
+
isst: $ZodIssueInvalidValue;
|
|
1681
|
+
}
|
|
1682
|
+
interface $ZodLiteral<T extends Literal = Literal> extends $ZodType {
|
|
1683
|
+
_zod: $ZodLiteralInternals<T>;
|
|
1684
|
+
}
|
|
1685
|
+
declare const $ZodLiteral: $constructor<$ZodLiteral>;
|
|
1686
|
+
type _File = typeof globalThis extends {
|
|
1687
|
+
File: infer F extends new (...args: any[]) => any;
|
|
1688
|
+
} ? InstanceType<F> : {};
|
|
1689
|
+
/** Do not reference this directly. */
|
|
1690
|
+
interface File extends _File {
|
|
1691
|
+
readonly type: string;
|
|
1692
|
+
readonly size: number;
|
|
1693
|
+
}
|
|
1694
|
+
interface $ZodFileDef extends $ZodTypeDef {
|
|
1695
|
+
type: "file";
|
|
1696
|
+
}
|
|
1697
|
+
interface $ZodFileInternals extends $ZodTypeInternals<File, File> {
|
|
1698
|
+
def: $ZodFileDef;
|
|
1699
|
+
isst: $ZodIssueInvalidType;
|
|
1700
|
+
bag: LoosePartial<{
|
|
1701
|
+
minimum: number;
|
|
1702
|
+
maximum: number;
|
|
1703
|
+
mime: MimeTypes[];
|
|
1704
|
+
}>;
|
|
1705
|
+
}
|
|
1706
|
+
interface $ZodFile extends $ZodType {
|
|
1707
|
+
_zod: $ZodFileInternals;
|
|
1708
|
+
}
|
|
1709
|
+
declare const $ZodFile: $constructor<$ZodFile>;
|
|
1710
|
+
interface $ZodTransformDef extends $ZodTypeDef {
|
|
1711
|
+
type: "transform";
|
|
1712
|
+
transform: (input: unknown, payload: ParsePayload<unknown>) => MaybeAsync<unknown>;
|
|
1713
|
+
}
|
|
1714
|
+
interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
|
|
1715
|
+
def: $ZodTransformDef;
|
|
1716
|
+
isst: never;
|
|
1717
|
+
}
|
|
1718
|
+
interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
|
|
1719
|
+
_zod: $ZodTransformInternals<O, I>;
|
|
1720
|
+
}
|
|
1721
|
+
declare const $ZodTransform: $constructor<$ZodTransform>;
|
|
1722
|
+
interface $ZodOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1723
|
+
type: "optional";
|
|
1724
|
+
innerType: T;
|
|
1725
|
+
}
|
|
1726
|
+
interface $ZodOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | undefined, input<T> | undefined> {
|
|
1727
|
+
def: $ZodOptionalDef<T>;
|
|
1728
|
+
optin: "optional";
|
|
1729
|
+
optout: "optional";
|
|
1730
|
+
isst: never;
|
|
1731
|
+
values: T["_zod"]["values"];
|
|
1732
|
+
pattern: T["_zod"]["pattern"];
|
|
1733
|
+
}
|
|
1734
|
+
interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
|
|
1735
|
+
_zod: $ZodOptionalInternals<T>;
|
|
1736
|
+
}
|
|
1737
|
+
declare const $ZodOptional: $constructor<$ZodOptional>;
|
|
1738
|
+
interface $ZodExactOptionalDef<T extends SomeType = $ZodType> extends $ZodOptionalDef<T> {}
|
|
1739
|
+
interface $ZodExactOptionalInternals<T extends SomeType = $ZodType> extends $ZodOptionalInternals<T> {
|
|
1740
|
+
def: $ZodExactOptionalDef<T>;
|
|
1741
|
+
output: output<T>;
|
|
1742
|
+
input: input<T>;
|
|
1743
|
+
}
|
|
1744
|
+
interface $ZodExactOptional<T extends SomeType = $ZodType> extends $ZodType {
|
|
1745
|
+
_zod: $ZodExactOptionalInternals<T>;
|
|
1746
|
+
}
|
|
1747
|
+
declare const $ZodExactOptional: $constructor<$ZodExactOptional>;
|
|
1748
|
+
interface $ZodNullableDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1749
|
+
type: "nullable";
|
|
1750
|
+
innerType: T;
|
|
1751
|
+
}
|
|
1752
|
+
interface $ZodNullableInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | null, input<T> | null> {
|
|
1753
|
+
def: $ZodNullableDef<T>;
|
|
1754
|
+
optin: T["_zod"]["optin"];
|
|
1755
|
+
optout: T["_zod"]["optout"];
|
|
1756
|
+
isst: never;
|
|
1757
|
+
values: T["_zod"]["values"];
|
|
1758
|
+
pattern: T["_zod"]["pattern"];
|
|
1759
|
+
}
|
|
1760
|
+
interface $ZodNullable<T extends SomeType = $ZodType> extends $ZodType {
|
|
1761
|
+
_zod: $ZodNullableInternals<T>;
|
|
1762
|
+
}
|
|
1763
|
+
declare const $ZodNullable: $constructor<$ZodNullable>;
|
|
1764
|
+
interface $ZodDefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1765
|
+
type: "default";
|
|
1766
|
+
innerType: T;
|
|
1767
|
+
/** The default value. May be a getter. */
|
|
1768
|
+
defaultValue: NoUndefined<output<T>>;
|
|
1769
|
+
}
|
|
1770
|
+
interface $ZodDefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
|
|
1771
|
+
def: $ZodDefaultDef<T>;
|
|
1772
|
+
optin: "optional";
|
|
1773
|
+
optout?: "optional" | undefined;
|
|
1774
|
+
isst: never;
|
|
1775
|
+
values: T["_zod"]["values"];
|
|
1776
|
+
}
|
|
1777
|
+
interface $ZodDefault<T extends SomeType = $ZodType> extends $ZodType {
|
|
1778
|
+
_zod: $ZodDefaultInternals<T>;
|
|
1779
|
+
}
|
|
1780
|
+
declare const $ZodDefault: $constructor<$ZodDefault>;
|
|
1781
|
+
interface $ZodPrefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1782
|
+
type: "prefault";
|
|
1783
|
+
innerType: T;
|
|
1784
|
+
/** The default value. May be a getter. */
|
|
1785
|
+
defaultValue: input<T>;
|
|
1786
|
+
}
|
|
1787
|
+
interface $ZodPrefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
|
|
1788
|
+
def: $ZodPrefaultDef<T>;
|
|
1789
|
+
optin: "optional";
|
|
1790
|
+
optout?: "optional" | undefined;
|
|
1791
|
+
isst: never;
|
|
1792
|
+
values: T["_zod"]["values"];
|
|
1793
|
+
}
|
|
1794
|
+
interface $ZodPrefault<T extends SomeType = $ZodType> extends $ZodType {
|
|
1795
|
+
_zod: $ZodPrefaultInternals<T>;
|
|
1796
|
+
}
|
|
1797
|
+
declare const $ZodPrefault: $constructor<$ZodPrefault>;
|
|
1798
|
+
interface $ZodNonOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1799
|
+
type: "nonoptional";
|
|
1800
|
+
innerType: T;
|
|
1801
|
+
}
|
|
1802
|
+
interface $ZodNonOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, NoUndefined<input<T>>> {
|
|
1803
|
+
def: $ZodNonOptionalDef<T>;
|
|
1804
|
+
isst: $ZodIssueInvalidType;
|
|
1805
|
+
values: T["_zod"]["values"];
|
|
1806
|
+
optin: "optional" | undefined;
|
|
1807
|
+
optout: "optional" | undefined;
|
|
1808
|
+
}
|
|
1809
|
+
interface $ZodNonOptional<T extends SomeType = $ZodType> extends $ZodType {
|
|
1810
|
+
_zod: $ZodNonOptionalInternals<T>;
|
|
1811
|
+
}
|
|
1812
|
+
declare const $ZodNonOptional: $constructor<$ZodNonOptional>;
|
|
1813
|
+
interface $ZodSuccessDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1814
|
+
type: "success";
|
|
1815
|
+
innerType: T;
|
|
1816
|
+
}
|
|
1817
|
+
interface $ZodSuccessInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input<T>> {
|
|
1818
|
+
def: $ZodSuccessDef<T>;
|
|
1819
|
+
isst: never;
|
|
1820
|
+
optin: T["_zod"]["optin"];
|
|
1821
|
+
optout: "optional" | undefined;
|
|
1822
|
+
}
|
|
1823
|
+
interface $ZodSuccess<T extends SomeType = $ZodType> extends $ZodType {
|
|
1824
|
+
_zod: $ZodSuccessInternals<T>;
|
|
1825
|
+
}
|
|
1826
|
+
declare const $ZodSuccess: $constructor<$ZodSuccess>;
|
|
1827
|
+
interface $ZodCatchCtx extends ParsePayload {
|
|
1828
|
+
/** @deprecated Use `ctx.issues` */
|
|
1829
|
+
error: {
|
|
1830
|
+
issues: $ZodIssue[];
|
|
1831
|
+
};
|
|
1832
|
+
/** @deprecated Use `ctx.value` */
|
|
1833
|
+
input: unknown;
|
|
1834
|
+
}
|
|
1835
|
+
interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1836
|
+
type: "catch";
|
|
1837
|
+
innerType: T;
|
|
1838
|
+
catchValue: (ctx: $ZodCatchCtx) => unknown;
|
|
1839
|
+
}
|
|
1840
|
+
interface $ZodCatchInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
|
|
1841
|
+
def: $ZodCatchDef<T>;
|
|
1842
|
+
optin: T["_zod"]["optin"];
|
|
1843
|
+
optout: T["_zod"]["optout"];
|
|
1844
|
+
isst: never;
|
|
1845
|
+
values: T["_zod"]["values"];
|
|
1846
|
+
}
|
|
1847
|
+
interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
|
|
1848
|
+
_zod: $ZodCatchInternals<T>;
|
|
1849
|
+
}
|
|
1850
|
+
declare const $ZodCatch: $constructor<$ZodCatch>;
|
|
1851
|
+
interface $ZodNaNDef extends $ZodTypeDef {
|
|
1852
|
+
type: "nan";
|
|
1853
|
+
}
|
|
1854
|
+
interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
|
|
1855
|
+
def: $ZodNaNDef;
|
|
1856
|
+
isst: $ZodIssueInvalidType;
|
|
1857
|
+
}
|
|
1858
|
+
interface $ZodNaN extends $ZodType {
|
|
1859
|
+
_zod: $ZodNaNInternals;
|
|
1860
|
+
}
|
|
1861
|
+
declare const $ZodNaN: $constructor<$ZodNaN>;
|
|
1862
|
+
interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1863
|
+
type: "pipe";
|
|
1864
|
+
in: A;
|
|
1865
|
+
out: B;
|
|
1866
|
+
/** Only defined inside $ZodCodec instances. */
|
|
1867
|
+
transform?: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
|
|
1868
|
+
/** Only defined inside $ZodCodec instances. */
|
|
1869
|
+
reverseTransform?: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
|
|
1870
|
+
}
|
|
1871
|
+
interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
|
|
1872
|
+
def: $ZodPipeDef<A, B>;
|
|
1873
|
+
isst: never;
|
|
1874
|
+
values: A["_zod"]["values"];
|
|
1875
|
+
optin: A["_zod"]["optin"];
|
|
1876
|
+
optout: B["_zod"]["optout"];
|
|
1877
|
+
propValues: A["_zod"]["propValues"];
|
|
1878
|
+
}
|
|
1879
|
+
interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
1880
|
+
_zod: $ZodPipeInternals<A, B>;
|
|
1881
|
+
}
|
|
1882
|
+
declare const $ZodPipe: $constructor<$ZodPipe>;
|
|
1883
|
+
interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1884
|
+
type: "readonly";
|
|
1885
|
+
innerType: T;
|
|
1886
|
+
}
|
|
1887
|
+
interface $ZodReadonlyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<MakeReadonly<output<T>>, MakeReadonly<input<T>>> {
|
|
1888
|
+
def: $ZodReadonlyDef<T>;
|
|
1889
|
+
optin: T["_zod"]["optin"];
|
|
1890
|
+
optout: T["_zod"]["optout"];
|
|
1891
|
+
isst: never;
|
|
1892
|
+
propValues: T["_zod"]["propValues"];
|
|
1893
|
+
values: T["_zod"]["values"];
|
|
1894
|
+
}
|
|
1895
|
+
interface $ZodReadonly<T extends SomeType = $ZodType> extends $ZodType {
|
|
1896
|
+
_zod: $ZodReadonlyInternals<T>;
|
|
1897
|
+
}
|
|
1898
|
+
declare const $ZodReadonly: $constructor<$ZodReadonly>;
|
|
1899
|
+
interface $ZodTemplateLiteralDef extends $ZodTypeDef {
|
|
1900
|
+
type: "template_literal";
|
|
1901
|
+
parts: $ZodTemplateLiteralPart[];
|
|
1902
|
+
format?: string | undefined;
|
|
1903
|
+
}
|
|
1904
|
+
interface $ZodTemplateLiteralInternals<Template extends string = string> extends $ZodTypeInternals<Template, Template> {
|
|
1905
|
+
pattern: RegExp;
|
|
1906
|
+
def: $ZodTemplateLiteralDef;
|
|
1907
|
+
isst: $ZodIssueInvalidType;
|
|
1908
|
+
}
|
|
1909
|
+
interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
|
|
1910
|
+
_zod: $ZodTemplateLiteralInternals<Template>;
|
|
1911
|
+
}
|
|
1912
|
+
type LiteralPart = Exclude<Literal, symbol>;
|
|
1913
|
+
interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
|
|
1914
|
+
pattern: RegExp;
|
|
1915
|
+
}
|
|
1916
|
+
interface SchemaPart extends $ZodType {
|
|
1917
|
+
_zod: SchemaPartInternals;
|
|
1918
|
+
}
|
|
1919
|
+
type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
|
|
1920
|
+
declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
|
|
1921
|
+
type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
|
|
1922
|
+
type $ZodFunctionIn = $ZodFunctionArgs;
|
|
1923
|
+
type $ZodFunctionOut = $ZodType;
|
|
1924
|
+
type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input<Returns>;
|
|
1925
|
+
type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => MaybeAsync<input<Returns>>;
|
|
1926
|
+
type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => output<Returns>;
|
|
1927
|
+
type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => Promise<output<Returns>>;
|
|
1928
|
+
interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
|
|
1929
|
+
type: "function";
|
|
1930
|
+
input: In;
|
|
1931
|
+
output: Out;
|
|
1932
|
+
}
|
|
1933
|
+
interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
|
|
1934
|
+
def: $ZodFunctionDef<Args, Returns>;
|
|
1935
|
+
isst: $ZodIssueInvalidType;
|
|
1936
|
+
}
|
|
1937
|
+
interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodType<any, any, $ZodFunctionInternals<Args, Returns>> {
|
|
1938
|
+
/** @deprecated */
|
|
1939
|
+
_def: $ZodFunctionDef<Args, Returns>;
|
|
1940
|
+
_input: $InferInnerFunctionType<Args, Returns>;
|
|
1941
|
+
_output: $InferOuterFunctionType<Args, Returns>;
|
|
1942
|
+
implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
|
|
1943
|
+
implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
|
|
1944
|
+
input<const Items extends TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest): $ZodFunction<$ZodTuple<Items, Rest>, Returns>;
|
|
1945
|
+
input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
|
|
1946
|
+
input(...args: any[]): $ZodFunction<any, Returns>;
|
|
1947
|
+
output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
|
|
1948
|
+
}
|
|
1949
|
+
declare const $ZodFunction: $constructor<$ZodFunction>;
|
|
1950
|
+
interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1951
|
+
type: "promise";
|
|
1952
|
+
innerType: T;
|
|
1953
|
+
}
|
|
1954
|
+
interface $ZodPromiseInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T>>, MaybeAsync<input<T>>> {
|
|
1955
|
+
def: $ZodPromiseDef<T>;
|
|
1956
|
+
isst: never;
|
|
1957
|
+
}
|
|
1958
|
+
interface $ZodPromise<T extends SomeType = $ZodType> extends $ZodType {
|
|
1959
|
+
_zod: $ZodPromiseInternals<T>;
|
|
1960
|
+
}
|
|
1961
|
+
declare const $ZodPromise: $constructor<$ZodPromise>;
|
|
1962
|
+
interface $ZodLazyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1963
|
+
type: "lazy";
|
|
1964
|
+
getter: () => T;
|
|
1965
|
+
}
|
|
1966
|
+
interface $ZodLazyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
|
|
1967
|
+
def: $ZodLazyDef<T>;
|
|
1968
|
+
isst: never;
|
|
1969
|
+
/** Auto-cached way to retrieve the inner schema */
|
|
1970
|
+
innerType: T;
|
|
1971
|
+
pattern: T["_zod"]["pattern"];
|
|
1972
|
+
propValues: T["_zod"]["propValues"];
|
|
1973
|
+
optin: T["_zod"]["optin"];
|
|
1974
|
+
optout: T["_zod"]["optout"];
|
|
1975
|
+
}
|
|
1976
|
+
interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
|
|
1977
|
+
_zod: $ZodLazyInternals<T>;
|
|
1978
|
+
}
|
|
1979
|
+
declare const $ZodLazy: $constructor<$ZodLazy>;
|
|
1980
|
+
interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
|
|
1981
|
+
type: "custom";
|
|
1982
|
+
check: "custom";
|
|
1983
|
+
path?: PropertyKey[] | undefined;
|
|
1984
|
+
error?: $ZodErrorMap | undefined;
|
|
1985
|
+
params?: Record<string, any> | undefined;
|
|
1986
|
+
fn: (arg: O) => unknown;
|
|
1987
|
+
}
|
|
1988
|
+
interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, $ZodCheckInternals<O> {
|
|
1989
|
+
def: $ZodCustomDef;
|
|
1990
|
+
issc: $ZodIssue;
|
|
1991
|
+
isst: never;
|
|
1992
|
+
bag: LoosePartial<{
|
|
1993
|
+
Class: typeof Class;
|
|
1994
|
+
}>;
|
|
1995
|
+
}
|
|
1996
|
+
interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
|
|
1997
|
+
_zod: $ZodCustomInternals<O, I>;
|
|
1998
|
+
}
|
|
1999
|
+
declare const $ZodCustom: $constructor<$ZodCustom>;
|
|
2000
|
+
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;
|
|
2001
|
+
//#endregion
|
|
2002
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.d.cts
|
|
2003
|
+
interface $ZodCheckDef {
|
|
2004
|
+
check: string;
|
|
2005
|
+
error?: $ZodErrorMap<never> | undefined;
|
|
2006
|
+
/** If true, no later checks will be executed if this check fails. Default `false`. */
|
|
2007
|
+
abort?: boolean | undefined;
|
|
2008
|
+
/** If provided, this check will only be executed if the function returns `true`. Defaults to `payload => z.util.isAborted(payload)`. */
|
|
2009
|
+
when?: ((payload: ParsePayload) => boolean) | undefined;
|
|
2010
|
+
}
|
|
2011
|
+
interface $ZodCheckInternals<T> {
|
|
2012
|
+
def: $ZodCheckDef;
|
|
2013
|
+
/** The set of issues this check might throw. */
|
|
2014
|
+
issc?: $ZodIssueBase;
|
|
2015
|
+
check(payload: ParsePayload<T>): MaybeAsync<void>;
|
|
2016
|
+
onattach: ((schema: $ZodType) => void)[];
|
|
2017
|
+
}
|
|
2018
|
+
interface $ZodCheck<in T = never> {
|
|
2019
|
+
_zod: $ZodCheckInternals<T>;
|
|
2020
|
+
}
|
|
2021
|
+
declare const $ZodCheck: $constructor<$ZodCheck<any>>;
|
|
2022
|
+
interface $ZodCheckLessThanDef extends $ZodCheckDef {
|
|
2023
|
+
check: "less_than";
|
|
2024
|
+
value: Numeric;
|
|
2025
|
+
inclusive: boolean;
|
|
2026
|
+
}
|
|
2027
|
+
interface $ZodCheckLessThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
|
|
2028
|
+
def: $ZodCheckLessThanDef;
|
|
2029
|
+
issc: $ZodIssueTooBig<T>;
|
|
2030
|
+
}
|
|
2031
|
+
interface $ZodCheckLessThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
|
|
2032
|
+
_zod: $ZodCheckLessThanInternals<T>;
|
|
2033
|
+
}
|
|
2034
|
+
declare const $ZodCheckLessThan: $constructor<$ZodCheckLessThan>;
|
|
2035
|
+
interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
|
|
2036
|
+
check: "greater_than";
|
|
2037
|
+
value: Numeric;
|
|
2038
|
+
inclusive: boolean;
|
|
2039
|
+
}
|
|
2040
|
+
interface $ZodCheckGreaterThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
|
|
2041
|
+
def: $ZodCheckGreaterThanDef;
|
|
2042
|
+
issc: $ZodIssueTooSmall<T>;
|
|
2043
|
+
}
|
|
2044
|
+
interface $ZodCheckGreaterThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
|
|
2045
|
+
_zod: $ZodCheckGreaterThanInternals<T>;
|
|
2046
|
+
}
|
|
2047
|
+
declare const $ZodCheckGreaterThan: $constructor<$ZodCheckGreaterThan>;
|
|
2048
|
+
interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
|
|
2049
|
+
check: "multiple_of";
|
|
2050
|
+
value: T;
|
|
2051
|
+
}
|
|
2052
|
+
interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint> extends $ZodCheckInternals<T> {
|
|
2053
|
+
def: $ZodCheckMultipleOfDef<T>;
|
|
2054
|
+
issc: $ZodIssueNotMultipleOf;
|
|
2055
|
+
}
|
|
2056
|
+
interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
|
|
2057
|
+
_zod: $ZodCheckMultipleOfInternals<T>;
|
|
2058
|
+
}
|
|
2059
|
+
declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
|
|
2060
|
+
type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
|
|
2061
|
+
interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
|
|
2062
|
+
check: "number_format";
|
|
2063
|
+
format: $ZodNumberFormats;
|
|
2064
|
+
}
|
|
2065
|
+
interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
|
|
2066
|
+
def: $ZodCheckNumberFormatDef;
|
|
2067
|
+
issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
|
|
2068
|
+
}
|
|
2069
|
+
interface $ZodCheckNumberFormat extends $ZodCheck<number> {
|
|
2070
|
+
_zod: $ZodCheckNumberFormatInternals;
|
|
2071
|
+
}
|
|
2072
|
+
declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
|
|
2073
|
+
interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
|
|
2074
|
+
check: "max_length";
|
|
2075
|
+
maximum: number;
|
|
2076
|
+
}
|
|
2077
|
+
interface $ZodCheckMaxLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
|
|
2078
|
+
def: $ZodCheckMaxLengthDef;
|
|
2079
|
+
issc: $ZodIssueTooBig<T>;
|
|
2080
|
+
}
|
|
2081
|
+
interface $ZodCheckMaxLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
|
|
2082
|
+
_zod: $ZodCheckMaxLengthInternals<T>;
|
|
2083
|
+
}
|
|
2084
|
+
declare const $ZodCheckMaxLength: $constructor<$ZodCheckMaxLength>;
|
|
2085
|
+
interface $ZodCheckMinLengthDef extends $ZodCheckDef {
|
|
2086
|
+
check: "min_length";
|
|
2087
|
+
minimum: number;
|
|
2088
|
+
}
|
|
2089
|
+
interface $ZodCheckMinLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
|
|
2090
|
+
def: $ZodCheckMinLengthDef;
|
|
2091
|
+
issc: $ZodIssueTooSmall<T>;
|
|
2092
|
+
}
|
|
2093
|
+
interface $ZodCheckMinLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
|
|
2094
|
+
_zod: $ZodCheckMinLengthInternals<T>;
|
|
2095
|
+
}
|
|
2096
|
+
declare const $ZodCheckMinLength: $constructor<$ZodCheckMinLength>;
|
|
2097
|
+
interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
|
|
2098
|
+
check: "length_equals";
|
|
2099
|
+
length: number;
|
|
2100
|
+
}
|
|
2101
|
+
interface $ZodCheckLengthEqualsInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
|
|
2102
|
+
def: $ZodCheckLengthEqualsDef;
|
|
2103
|
+
issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
|
|
2104
|
+
}
|
|
2105
|
+
interface $ZodCheckLengthEquals<T extends HasLength = HasLength> extends $ZodCheck<T> {
|
|
2106
|
+
_zod: $ZodCheckLengthEqualsInternals<T>;
|
|
2107
|
+
}
|
|
2108
|
+
declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
|
|
2109
|
+
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";
|
|
2110
|
+
interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
|
|
2111
|
+
check: "string_format";
|
|
2112
|
+
format: Format;
|
|
2113
|
+
pattern?: RegExp | undefined;
|
|
2114
|
+
}
|
|
2115
|
+
interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
|
|
2116
|
+
def: $ZodCheckStringFormatDef;
|
|
2117
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2118
|
+
}
|
|
2119
|
+
interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
|
|
2120
|
+
format: "regex";
|
|
2121
|
+
pattern: RegExp;
|
|
2122
|
+
}
|
|
2123
|
+
interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
|
|
2124
|
+
def: $ZodCheckRegexDef;
|
|
2125
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2126
|
+
}
|
|
2127
|
+
interface $ZodCheckRegex extends $ZodCheck<string> {
|
|
2128
|
+
_zod: $ZodCheckRegexInternals;
|
|
2129
|
+
}
|
|
2130
|
+
declare const $ZodCheckRegex: $constructor<$ZodCheckRegex>;
|
|
2131
|
+
interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {}
|
|
2132
|
+
interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
|
|
2133
|
+
def: $ZodCheckLowerCaseDef;
|
|
2134
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2135
|
+
}
|
|
2136
|
+
interface $ZodCheckLowerCase extends $ZodCheck<string> {
|
|
2137
|
+
_zod: $ZodCheckLowerCaseInternals;
|
|
2138
|
+
}
|
|
2139
|
+
declare const $ZodCheckLowerCase: $constructor<$ZodCheckLowerCase>;
|
|
2140
|
+
interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {}
|
|
2141
|
+
interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
|
|
2142
|
+
def: $ZodCheckUpperCaseDef;
|
|
2143
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2144
|
+
}
|
|
2145
|
+
interface $ZodCheckUpperCase extends $ZodCheck<string> {
|
|
2146
|
+
_zod: $ZodCheckUpperCaseInternals;
|
|
2147
|
+
}
|
|
2148
|
+
declare const $ZodCheckUpperCase: $constructor<$ZodCheckUpperCase>;
|
|
2149
|
+
interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
|
|
2150
|
+
includes: string;
|
|
2151
|
+
position?: number | undefined;
|
|
2152
|
+
}
|
|
2153
|
+
interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
|
|
2154
|
+
def: $ZodCheckIncludesDef;
|
|
2155
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2156
|
+
}
|
|
2157
|
+
interface $ZodCheckIncludes extends $ZodCheck<string> {
|
|
2158
|
+
_zod: $ZodCheckIncludesInternals;
|
|
2159
|
+
}
|
|
2160
|
+
declare const $ZodCheckIncludes: $constructor<$ZodCheckIncludes>;
|
|
2161
|
+
interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
|
|
2162
|
+
prefix: string;
|
|
2163
|
+
}
|
|
2164
|
+
interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
|
|
2165
|
+
def: $ZodCheckStartsWithDef;
|
|
2166
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2167
|
+
}
|
|
2168
|
+
interface $ZodCheckStartsWith extends $ZodCheck<string> {
|
|
2169
|
+
_zod: $ZodCheckStartsWithInternals;
|
|
2170
|
+
}
|
|
2171
|
+
declare const $ZodCheckStartsWith: $constructor<$ZodCheckStartsWith>;
|
|
2172
|
+
interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
|
|
2173
|
+
suffix: string;
|
|
2174
|
+
}
|
|
2175
|
+
interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
|
|
2176
|
+
def: $ZodCheckEndsWithDef;
|
|
2177
|
+
issc: $ZodIssueInvalidStringFormat;
|
|
2178
|
+
}
|
|
2179
|
+
interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
|
|
2180
|
+
_zod: $ZodCheckEndsWithInternals;
|
|
2181
|
+
}
|
|
2182
|
+
declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
|
|
2183
|
+
//#endregion
|
|
2184
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.d.cts
|
|
2185
|
+
interface $ZodIssueBase {
|
|
2186
|
+
readonly code?: string;
|
|
2187
|
+
readonly input?: unknown;
|
|
2188
|
+
readonly path: PropertyKey[];
|
|
2189
|
+
readonly message: string;
|
|
2190
|
+
}
|
|
2191
|
+
type $ZodInvalidTypeExpected = "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "undefined" | "null" | "never" | "void" | "date" | "array" | "object" | "tuple" | "record" | "map" | "set" | "file" | "nonoptional" | "nan" | "function" | (string & {});
|
|
2192
|
+
interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
|
|
2193
|
+
readonly code: "invalid_type";
|
|
2194
|
+
readonly expected: $ZodInvalidTypeExpected;
|
|
2195
|
+
readonly input?: Input;
|
|
2196
|
+
}
|
|
2197
|
+
interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
|
|
2198
|
+
readonly code: "too_big";
|
|
2199
|
+
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
2200
|
+
readonly maximum: number | bigint;
|
|
2201
|
+
readonly inclusive?: boolean;
|
|
2202
|
+
readonly exact?: boolean;
|
|
2203
|
+
readonly input?: Input;
|
|
2204
|
+
}
|
|
2205
|
+
interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
|
|
2206
|
+
readonly code: "too_small";
|
|
2207
|
+
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
2208
|
+
readonly minimum: number | bigint;
|
|
2209
|
+
/** True if the allowable range includes the minimum */
|
|
2210
|
+
readonly inclusive?: boolean;
|
|
2211
|
+
/** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
|
|
2212
|
+
readonly exact?: boolean;
|
|
2213
|
+
readonly input?: Input;
|
|
2214
|
+
}
|
|
2215
|
+
interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
|
|
2216
|
+
readonly code: "invalid_format";
|
|
2217
|
+
readonly format: $ZodStringFormats | (string & {});
|
|
2218
|
+
readonly pattern?: string;
|
|
2219
|
+
readonly input?: string;
|
|
2220
|
+
}
|
|
2221
|
+
interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
|
|
2222
|
+
readonly code: "not_multiple_of";
|
|
2223
|
+
readonly divisor: number;
|
|
2224
|
+
readonly input?: Input;
|
|
2225
|
+
}
|
|
2226
|
+
interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
|
|
2227
|
+
readonly code: "unrecognized_keys";
|
|
2228
|
+
readonly keys: string[];
|
|
2229
|
+
readonly input?: Record<string, unknown>;
|
|
2230
|
+
}
|
|
2231
|
+
interface $ZodIssueInvalidUnionNoMatch extends $ZodIssueBase {
|
|
2232
|
+
readonly code: "invalid_union";
|
|
2233
|
+
readonly errors: $ZodIssue[][];
|
|
2234
|
+
readonly input?: unknown;
|
|
2235
|
+
readonly discriminator?: string | undefined;
|
|
2236
|
+
readonly inclusive?: true;
|
|
2237
|
+
}
|
|
2238
|
+
interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
|
|
2239
|
+
readonly code: "invalid_union";
|
|
2240
|
+
readonly errors: [];
|
|
2241
|
+
readonly input?: unknown;
|
|
2242
|
+
readonly discriminator?: string | undefined;
|
|
2243
|
+
readonly inclusive: false;
|
|
2244
|
+
}
|
|
2245
|
+
type $ZodIssueInvalidUnion = $ZodIssueInvalidUnionNoMatch | $ZodIssueInvalidUnionMultipleMatch;
|
|
2246
|
+
interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
|
|
2247
|
+
readonly code: "invalid_key";
|
|
2248
|
+
readonly origin: "map" | "record";
|
|
2249
|
+
readonly issues: $ZodIssue[];
|
|
2250
|
+
readonly input?: Input;
|
|
2251
|
+
}
|
|
2252
|
+
interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
|
|
2253
|
+
readonly code: "invalid_element";
|
|
2254
|
+
readonly origin: "map" | "set";
|
|
2255
|
+
readonly key: unknown;
|
|
2256
|
+
readonly issues: $ZodIssue[];
|
|
2257
|
+
readonly input?: Input;
|
|
2258
|
+
}
|
|
2259
|
+
interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
|
|
2260
|
+
readonly code: "invalid_value";
|
|
2261
|
+
readonly values: Primitive$1[];
|
|
2262
|
+
readonly input?: Input;
|
|
2263
|
+
}
|
|
2264
|
+
interface $ZodIssueCustom extends $ZodIssueBase {
|
|
2265
|
+
readonly code: "custom";
|
|
2266
|
+
readonly params?: Record<string, any> | undefined;
|
|
2267
|
+
readonly input?: unknown;
|
|
2268
|
+
}
|
|
2269
|
+
type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
|
|
2270
|
+
type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
|
|
2271
|
+
type RawIssue$1<T extends $ZodIssueBase> = T extends any ? Flatten$1<MakePartial<T, "message" | "path"> & {
|
|
2272
|
+
/** The input data */readonly input: unknown; /** The schema or check that originated this issue. */
|
|
2273
|
+
readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will continue executing checks/refinements after this issue. */
|
|
2274
|
+
readonly continue?: boolean | undefined;
|
|
2275
|
+
} & Record<string, unknown>> : never;
|
|
2276
|
+
type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;
|
|
2277
|
+
interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {
|
|
2278
|
+
(issue: $ZodRawIssue<T>): {
|
|
2279
|
+
message: string;
|
|
2280
|
+
} | string | undefined | null;
|
|
2281
|
+
}
|
|
2282
|
+
interface $ZodError<T = unknown> extends Error {
|
|
2283
|
+
type: T;
|
|
2284
|
+
issues: $ZodIssue[];
|
|
2285
|
+
_zod: {
|
|
2286
|
+
output: T;
|
|
2287
|
+
def: $ZodIssue[];
|
|
2288
|
+
};
|
|
2289
|
+
stack?: string;
|
|
2290
|
+
name: string;
|
|
2291
|
+
}
|
|
2292
|
+
declare const $ZodError: $constructor<$ZodError>;
|
|
2293
|
+
type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
|
|
2294
|
+
type _FlattenedError<T, U = string> = {
|
|
2295
|
+
formErrors: U[];
|
|
2296
|
+
fieldErrors: { [P in keyof T]?: U[] };
|
|
2297
|
+
};
|
|
2298
|
+
type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U> } : T extends any[] ? {
|
|
2299
|
+
[k: number]: $ZodFormattedError<T[number], U>;
|
|
2300
|
+
} : T extends object ? Flatten$1<{ [K in keyof T]?: $ZodFormattedError<T[K], U> }> : any;
|
|
2301
|
+
type $ZodFormattedError<T, U = string> = {
|
|
2302
|
+
_errors: U[];
|
|
2303
|
+
} & Flatten$1<_ZodFormattedError<T, U>>;
|
|
2304
|
+
//#endregion
|
|
2305
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.d.cts
|
|
2306
|
+
type ZodTrait = {
|
|
2307
|
+
_zod: {
|
|
2308
|
+
def: any;
|
|
2309
|
+
[k: string]: any;
|
|
2310
|
+
};
|
|
2311
|
+
};
|
|
2312
|
+
interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
|
|
2313
|
+
new (def: D): T;
|
|
2314
|
+
init(inst: T, def: D): asserts inst is T;
|
|
2315
|
+
}
|
|
2316
|
+
declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
|
|
2317
|
+
Parent?: typeof Class;
|
|
2318
|
+
}): $constructor<T, D>;
|
|
2319
|
+
declare const $brand: unique symbol;
|
|
2320
|
+
type $brand<T extends string | number | symbol = string | number | symbol> = {
|
|
2321
|
+
[$brand]: { [k in T]: true };
|
|
2322
|
+
};
|
|
2323
|
+
type $ZodBranded<T extends SomeType, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T & (Dir extends "inout" ? {
|
|
2324
|
+
_zod: {
|
|
2325
|
+
input: input<T> & $brand<Brand>;
|
|
2326
|
+
output: output<T> & $brand<Brand>;
|
|
2327
|
+
};
|
|
2328
|
+
} : Dir extends "in" ? {
|
|
2329
|
+
_zod: {
|
|
2330
|
+
input: input<T> & $brand<Brand>;
|
|
2331
|
+
};
|
|
2332
|
+
} : {
|
|
2333
|
+
_zod: {
|
|
2334
|
+
output: output<T> & $brand<Brand>;
|
|
2335
|
+
};
|
|
2336
|
+
});
|
|
2337
|
+
type input<T> = T extends {
|
|
2338
|
+
_zod: {
|
|
2339
|
+
input: any;
|
|
2340
|
+
};
|
|
2341
|
+
} ? T["_zod"]["input"] : unknown;
|
|
2342
|
+
type output<T> = T extends {
|
|
2343
|
+
_zod: {
|
|
2344
|
+
output: any;
|
|
2345
|
+
};
|
|
2346
|
+
} ? T["_zod"]["output"] : unknown;
|
|
2347
|
+
//#endregion
|
|
2348
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.d.cts
|
|
2349
|
+
type Params<T extends $ZodType | $ZodCheck, IssueTypes extends $ZodIssueBase, OmitKeys extends keyof T["_zod"]["def"] = never> = Flatten$1<Partial<EmptyToNever<Omit<T["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
|
|
2350
|
+
error?: string | $ZodErrorMap<IssueTypes> | undefined; /** @deprecated This parameter is deprecated. Use `error` instead. */
|
|
2351
|
+
message?: string | undefined;
|
|
2352
|
+
})>>>;
|
|
2353
|
+
type TypeParams<T extends $ZodType = $ZodType & {
|
|
2354
|
+
_isst: never;
|
|
2355
|
+
}, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
|
|
2356
|
+
type CheckParams<T extends $ZodCheck = $ZodCheck, // & { _issc: never },
|
|
2357
|
+
AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
|
|
2358
|
+
type CheckStringFormatParams<T extends $ZodStringFormat = $ZodStringFormat, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
|
|
2359
|
+
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>;
|
|
2360
|
+
type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
|
|
2361
|
+
type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">;
|
|
2362
|
+
type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
2363
|
+
type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
|
|
2364
|
+
type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
|
|
2365
|
+
type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
|
|
2366
|
+
type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
|
|
2367
|
+
type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
|
|
2368
|
+
type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
|
|
2369
|
+
type $ZodCheckXIDParams = CheckStringFormatParams<$ZodXID, "when">;
|
|
2370
|
+
type $ZodCheckKSUIDParams = CheckStringFormatParams<$ZodKSUID, "when">;
|
|
2371
|
+
type $ZodCheckIPv4Params = CheckStringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
|
|
2372
|
+
type $ZodCheckIPv6Params = CheckStringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
|
|
2373
|
+
type $ZodCheckCIDRv4Params = CheckStringFormatParams<$ZodCIDRv4, "pattern" | "when">;
|
|
2374
|
+
type $ZodCheckCIDRv6Params = CheckStringFormatParams<$ZodCIDRv6, "pattern" | "when">;
|
|
2375
|
+
type $ZodCheckBase64Params = CheckStringFormatParams<$ZodBase64, "pattern" | "when">;
|
|
2376
|
+
type $ZodCheckBase64URLParams = CheckStringFormatParams<$ZodBase64URL, "pattern" | "when">;
|
|
2377
|
+
type $ZodCheckE164Params = CheckStringFormatParams<$ZodE164, "when">;
|
|
2378
|
+
type $ZodCheckJWTParams = CheckStringFormatParams<$ZodJWT, "pattern" | "when">;
|
|
2379
|
+
type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "pattern" | "when">;
|
|
2380
|
+
type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
|
|
2381
|
+
type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
|
|
2382
|
+
type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
|
|
2383
|
+
type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
|
|
2384
|
+
type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
|
|
2385
|
+
type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
|
|
2386
|
+
type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
|
|
2387
|
+
type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
|
|
2388
|
+
type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
|
|
2389
|
+
type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
|
|
2390
|
+
type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
|
|
2391
|
+
type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
|
|
2392
|
+
type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
|
|
2393
|
+
type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
|
|
2394
|
+
type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
|
|
2395
|
+
type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
|
|
2396
|
+
type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
|
|
2397
|
+
type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
|
|
2398
|
+
type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
|
|
2399
|
+
type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
|
|
2400
|
+
type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten$1<MakePartial<T, "message" | "path"> & {
|
|
2401
|
+
/** The schema or check that originated this issue. */readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
|
|
2402
|
+
readonly continue?: boolean | undefined;
|
|
2403
|
+
} & Record<string, unknown>> : never;
|
|
2404
|
+
interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
|
|
2405
|
+
addIssue(arg: string | $ZodSuperRefineIssue): void;
|
|
2406
|
+
}
|
|
2407
|
+
//#endregion
|
|
2408
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.d.ts
|
|
2409
|
+
type AnySchema = ZodTypeAny | $ZodType;
|
|
2410
|
+
type ZodRawShapeCompat = Record<string, AnySchema>;
|
|
2411
|
+
type SchemaOutput<S> = S extends ZodTypeAny ? TypeOf<S> : S extends $ZodType ? output<S> : never;
|
|
2412
|
+
/**
|
|
2413
|
+
* Infers the output type from a ZodRawShapeCompat (raw shape object).
|
|
2414
|
+
* Maps over each key in the shape and infers the output type from each schema.
|
|
2415
|
+
*/
|
|
2416
|
+
type ShapeOutput<Shape extends ZodRawShapeCompat> = { [K in keyof Shape]: SchemaOutput<Shape[K]> };
|
|
2417
|
+
//#endregion
|
|
2418
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.d.cts
|
|
2419
|
+
/** An Error-like class used to store Zod validation issues. */
|
|
2420
|
+
interface ZodError<T = unknown> extends $ZodError<T> {
|
|
2421
|
+
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
2422
|
+
format(): $ZodFormattedError<T>;
|
|
2423
|
+
format<U>(mapper: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
|
|
2424
|
+
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
2425
|
+
flatten(): $ZodFlattenedError<T>;
|
|
2426
|
+
flatten<U>(mapper: (issue: $ZodIssue) => U): $ZodFlattenedError<T, U>;
|
|
2427
|
+
/** @deprecated Push directly to `.issues` instead. */
|
|
2428
|
+
addIssue(issue: $ZodIssue): void;
|
|
2429
|
+
/** @deprecated Push directly to `.issues` instead. */
|
|
2430
|
+
addIssues(issues: $ZodIssue[]): void;
|
|
2431
|
+
/** @deprecated Check `err.issues.length === 0` instead. */
|
|
2432
|
+
isEmpty: boolean;
|
|
2433
|
+
}
|
|
2434
|
+
declare const ZodError: $constructor<ZodError>;
|
|
2435
|
+
//#endregion
|
|
2436
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.d.cts
|
|
2437
|
+
type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
|
|
2438
|
+
type ZodSafeParseSuccess<T> = {
|
|
2439
|
+
success: true;
|
|
2440
|
+
data: T;
|
|
2441
|
+
error?: never;
|
|
2442
|
+
};
|
|
2443
|
+
type ZodSafeParseError<T> = {
|
|
2444
|
+
success: false;
|
|
2445
|
+
data?: never;
|
|
2446
|
+
error: ZodError<T>;
|
|
2447
|
+
};
|
|
2448
|
+
//#endregion
|
|
2449
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.d.cts
|
|
2450
|
+
type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
|
|
2451
|
+
interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
|
|
2452
|
+
def: Internals["def"];
|
|
2453
|
+
type: Internals["def"]["type"];
|
|
2454
|
+
/** @deprecated Use `.def` instead. */
|
|
2455
|
+
_def: Internals["def"];
|
|
2456
|
+
/** @deprecated Use `z.output<typeof schema>` instead. */
|
|
2457
|
+
_output: Internals["output"];
|
|
2458
|
+
/** @deprecated Use `z.input<typeof schema>` instead. */
|
|
2459
|
+
_input: Internals["input"];
|
|
2460
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2461
|
+
/** Converts this schema to a JSON Schema representation. */
|
|
2462
|
+
toJSONSchema(params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<this>;
|
|
2463
|
+
check(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
|
|
2464
|
+
with(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
|
|
2465
|
+
clone(def?: Internals["def"], params?: {
|
|
2466
|
+
parent: boolean;
|
|
2467
|
+
}): this;
|
|
2468
|
+
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;
|
|
2469
|
+
brand<T extends PropertyKey = PropertyKey, Dir extends "in" | "out" | "inout" = "out">(value?: T): PropertyKey extends T ? this : $ZodBranded<this, T, Dir>;
|
|
2470
|
+
parse(data: unknown, params?: ParseContext<$ZodIssue>): output<this>;
|
|
2471
|
+
safeParse(data: unknown, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
|
|
2472
|
+
parseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
|
|
2473
|
+
safeParseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
|
|
2474
|
+
spa: (data: unknown, params?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<this>>>;
|
|
2475
|
+
encode(data: output<this>, params?: ParseContext<$ZodIssue>): input<this>;
|
|
2476
|
+
decode(data: input<this>, params?: ParseContext<$ZodIssue>): output<this>;
|
|
2477
|
+
encodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<input<this>>;
|
|
2478
|
+
decodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
|
|
2479
|
+
safeEncode(data: output<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<input<this>>;
|
|
2480
|
+
safeDecode(data: input<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
|
|
2481
|
+
safeEncodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<input<this>>>;
|
|
2482
|
+
safeDecodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
|
|
2483
|
+
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;
|
|
2484
|
+
superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>): this;
|
|
2485
|
+
overwrite(fn: (x: output<this>) => output<this>): this;
|
|
2486
|
+
optional(): ZodOptional<this>;
|
|
2487
|
+
exactOptional(): ZodExactOptional<this>;
|
|
2488
|
+
nonoptional(params?: string | $ZodNonOptionalParams): ZodNonOptional<this>;
|
|
2489
|
+
nullable(): ZodNullable<this>;
|
|
2490
|
+
nullish(): ZodOptional<ZodNullable<this>>;
|
|
2491
|
+
default(def: NoUndefined<output<this>>): ZodDefault<this>;
|
|
2492
|
+
default(def: () => NoUndefined<output<this>>): ZodDefault<this>;
|
|
2493
|
+
prefault(def: () => input<this>): ZodPrefault<this>;
|
|
2494
|
+
prefault(def: input<this>): ZodPrefault<this>;
|
|
2495
|
+
array(): ZodArray<this>;
|
|
2496
|
+
or<T extends SomeType>(option: T): ZodUnion<[this, T]>;
|
|
2497
|
+
and<T extends SomeType>(incoming: T): ZodIntersection<this, T>;
|
|
2498
|
+
transform<NewOut>(transform: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, output<this>>>;
|
|
2499
|
+
catch(def: output<this>): ZodCatch<this>;
|
|
2500
|
+
catch(def: (ctx: $ZodCatchCtx) => output<this>): ZodCatch<this>;
|
|
2501
|
+
pipe<T extends $ZodType<any, output<this>>>(target: T | $ZodType<any, output<this>>): ZodPipe<this, T>;
|
|
2502
|
+
readonly(): ZodReadonly<this>;
|
|
2503
|
+
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
|
|
2504
|
+
describe(description: string): this;
|
|
2505
|
+
description?: string;
|
|
2506
|
+
/** Returns the metadata associated with this instance in `z.globalRegistry` */
|
|
2507
|
+
meta(): $replace<GlobalMeta, this> | undefined;
|
|
2508
|
+
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
|
|
2509
|
+
meta(data: $replace<GlobalMeta, this>): this;
|
|
2510
|
+
/** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
|
|
2511
|
+
*
|
|
2512
|
+
* ```ts
|
|
2513
|
+
* const schema = z.string().optional();
|
|
2514
|
+
* const isOptional = schema.safeParse(undefined).success; // true
|
|
2515
|
+
* ```
|
|
2516
|
+
*/
|
|
2517
|
+
isOptional(): boolean;
|
|
2518
|
+
/**
|
|
2519
|
+
* @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
|
|
2520
|
+
*
|
|
2521
|
+
* ```ts
|
|
2522
|
+
* const schema = z.string().nullable();
|
|
2523
|
+
* const isNullable = schema.safeParse(null).success; // true
|
|
2524
|
+
* ```
|
|
2525
|
+
*/
|
|
2526
|
+
isNullable(): boolean;
|
|
2527
|
+
apply<T>(fn: (schema: this) => T): T;
|
|
2528
|
+
}
|
|
2529
|
+
interface _ZodType<out Internals extends $ZodTypeInternals = $ZodTypeInternals> extends ZodType<any, any, Internals> {}
|
|
2530
|
+
declare const ZodType: $constructor<ZodType>;
|
|
2531
|
+
interface _ZodString<T extends $ZodStringInternals<unknown> = $ZodStringInternals<unknown>> extends _ZodType<T> {
|
|
2532
|
+
format: string | null;
|
|
2533
|
+
minLength: number | null;
|
|
2534
|
+
maxLength: number | null;
|
|
2535
|
+
regex(regex: RegExp, params?: string | $ZodCheckRegexParams): this;
|
|
2536
|
+
includes(value: string, params?: string | $ZodCheckIncludesParams): this;
|
|
2537
|
+
startsWith(value: string, params?: string | $ZodCheckStartsWithParams): this;
|
|
2538
|
+
endsWith(value: string, params?: string | $ZodCheckEndsWithParams): this;
|
|
2539
|
+
min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
|
|
2540
|
+
max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
|
|
2541
|
+
length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
|
|
2542
|
+
nonempty(params?: string | $ZodCheckMinLengthParams): this;
|
|
2543
|
+
lowercase(params?: string | $ZodCheckLowerCaseParams): this;
|
|
2544
|
+
uppercase(params?: string | $ZodCheckUpperCaseParams): this;
|
|
2545
|
+
trim(): this;
|
|
2546
|
+
normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
|
|
2547
|
+
toLowerCase(): this;
|
|
2548
|
+
toUpperCase(): this;
|
|
2549
|
+
slugify(): this;
|
|
2550
|
+
}
|
|
2551
|
+
/** @internal */
|
|
2552
|
+
declare const _ZodString: $constructor<_ZodString>;
|
|
2553
|
+
interface ZodString extends _ZodString<$ZodStringInternals<string>> {
|
|
2554
|
+
/** @deprecated Use `z.email()` instead. */
|
|
2555
|
+
email(params?: string | $ZodCheckEmailParams): this;
|
|
2556
|
+
/** @deprecated Use `z.url()` instead. */
|
|
2557
|
+
url(params?: string | $ZodCheckURLParams): this;
|
|
2558
|
+
/** @deprecated Use `z.jwt()` instead. */
|
|
2559
|
+
jwt(params?: string | $ZodCheckJWTParams): this;
|
|
2560
|
+
/** @deprecated Use `z.emoji()` instead. */
|
|
2561
|
+
emoji(params?: string | $ZodCheckEmojiParams): this;
|
|
2562
|
+
/** @deprecated Use `z.guid()` instead. */
|
|
2563
|
+
guid(params?: string | $ZodCheckGUIDParams): this;
|
|
2564
|
+
/** @deprecated Use `z.uuid()` instead. */
|
|
2565
|
+
uuid(params?: string | $ZodCheckUUIDParams): this;
|
|
2566
|
+
/** @deprecated Use `z.uuid()` instead. */
|
|
2567
|
+
uuidv4(params?: string | $ZodCheckUUIDParams): this;
|
|
2568
|
+
/** @deprecated Use `z.uuid()` instead. */
|
|
2569
|
+
uuidv6(params?: string | $ZodCheckUUIDParams): this;
|
|
2570
|
+
/** @deprecated Use `z.uuid()` instead. */
|
|
2571
|
+
uuidv7(params?: string | $ZodCheckUUIDParams): this;
|
|
2572
|
+
/** @deprecated Use `z.nanoid()` instead. */
|
|
2573
|
+
nanoid(params?: string | $ZodCheckNanoIDParams): this;
|
|
2574
|
+
/** @deprecated Use `z.guid()` instead. */
|
|
2575
|
+
guid(params?: string | $ZodCheckGUIDParams): this;
|
|
2576
|
+
/** @deprecated Use `z.cuid()` instead. */
|
|
2577
|
+
cuid(params?: string | $ZodCheckCUIDParams): this;
|
|
2578
|
+
/** @deprecated Use `z.cuid2()` instead. */
|
|
2579
|
+
cuid2(params?: string | $ZodCheckCUID2Params): this;
|
|
2580
|
+
/** @deprecated Use `z.ulid()` instead. */
|
|
2581
|
+
ulid(params?: string | $ZodCheckULIDParams): this;
|
|
2582
|
+
/** @deprecated Use `z.base64()` instead. */
|
|
2583
|
+
base64(params?: string | $ZodCheckBase64Params): this;
|
|
2584
|
+
/** @deprecated Use `z.base64url()` instead. */
|
|
2585
|
+
base64url(params?: string | $ZodCheckBase64URLParams): this;
|
|
2586
|
+
/** @deprecated Use `z.xid()` instead. */
|
|
2587
|
+
xid(params?: string | $ZodCheckXIDParams): this;
|
|
2588
|
+
/** @deprecated Use `z.ksuid()` instead. */
|
|
2589
|
+
ksuid(params?: string | $ZodCheckKSUIDParams): this;
|
|
2590
|
+
/** @deprecated Use `z.ipv4()` instead. */
|
|
2591
|
+
ipv4(params?: string | $ZodCheckIPv4Params): this;
|
|
2592
|
+
/** @deprecated Use `z.ipv6()` instead. */
|
|
2593
|
+
ipv6(params?: string | $ZodCheckIPv6Params): this;
|
|
2594
|
+
/** @deprecated Use `z.cidrv4()` instead. */
|
|
2595
|
+
cidrv4(params?: string | $ZodCheckCIDRv4Params): this;
|
|
2596
|
+
/** @deprecated Use `z.cidrv6()` instead. */
|
|
2597
|
+
cidrv6(params?: string | $ZodCheckCIDRv6Params): this;
|
|
2598
|
+
/** @deprecated Use `z.e164()` instead. */
|
|
2599
|
+
e164(params?: string | $ZodCheckE164Params): this;
|
|
2600
|
+
/** @deprecated Use `z.iso.datetime()` instead. */
|
|
2601
|
+
datetime(params?: string | $ZodCheckISODateTimeParams): this;
|
|
2602
|
+
/** @deprecated Use `z.iso.date()` instead. */
|
|
2603
|
+
date(params?: string | $ZodCheckISODateParams): this;
|
|
2604
|
+
/** @deprecated Use `z.iso.time()` instead. */
|
|
2605
|
+
time(params?: string | $ZodCheckISOTimeParams): this;
|
|
2606
|
+
/** @deprecated Use `z.iso.duration()` instead. */
|
|
2607
|
+
duration(params?: string | $ZodCheckISODurationParams): this;
|
|
2608
|
+
}
|
|
2609
|
+
declare const ZodString: $constructor<ZodString>;
|
|
2610
|
+
interface ZodStringFormat<Format extends string = string> extends _ZodString<$ZodStringFormatInternals<Format>> {}
|
|
2611
|
+
declare const ZodStringFormat: $constructor<ZodStringFormat>;
|
|
2612
|
+
interface _ZodNumber<Internals extends $ZodNumberInternals = $ZodNumberInternals> extends _ZodType<Internals> {
|
|
2613
|
+
gt(value: number, params?: string | $ZodCheckGreaterThanParams): this;
|
|
2614
|
+
/** Identical to .min() */
|
|
2615
|
+
gte(value: number, params?: string | $ZodCheckGreaterThanParams): this;
|
|
2616
|
+
min(value: number, params?: string | $ZodCheckGreaterThanParams): this;
|
|
2617
|
+
lt(value: number, params?: string | $ZodCheckLessThanParams): this;
|
|
2618
|
+
/** Identical to .max() */
|
|
2619
|
+
lte(value: number, params?: string | $ZodCheckLessThanParams): this;
|
|
2620
|
+
max(value: number, params?: string | $ZodCheckLessThanParams): this;
|
|
2621
|
+
/** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
|
|
2622
|
+
int(params?: string | $ZodCheckNumberFormatParams): this;
|
|
2623
|
+
/** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
|
|
2624
|
+
safe(params?: string | $ZodCheckNumberFormatParams): this;
|
|
2625
|
+
positive(params?: string | $ZodCheckGreaterThanParams): this;
|
|
2626
|
+
nonnegative(params?: string | $ZodCheckGreaterThanParams): this;
|
|
2627
|
+
negative(params?: string | $ZodCheckLessThanParams): this;
|
|
2628
|
+
nonpositive(params?: string | $ZodCheckLessThanParams): this;
|
|
2629
|
+
multipleOf(value: number, params?: string | $ZodCheckMultipleOfParams): this;
|
|
2630
|
+
/** @deprecated Use `.multipleOf()` instead. */
|
|
2631
|
+
step(value: number, params?: string | $ZodCheckMultipleOfParams): this;
|
|
2632
|
+
/** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
|
|
2633
|
+
finite(params?: unknown): this;
|
|
2634
|
+
minValue: number | null;
|
|
2635
|
+
maxValue: number | null;
|
|
2636
|
+
/** @deprecated Check the `format` property instead. */
|
|
2637
|
+
isInt: boolean;
|
|
2638
|
+
/** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
|
|
2639
|
+
isFinite: boolean;
|
|
2640
|
+
format: string | null;
|
|
2641
|
+
}
|
|
2642
|
+
interface ZodNumber extends _ZodNumber<$ZodNumberInternals<number>> {}
|
|
2643
|
+
declare const ZodNumber: $constructor<ZodNumber>;
|
|
2644
|
+
interface _ZodBoolean<T extends $ZodBooleanInternals = $ZodBooleanInternals> extends _ZodType<T> {}
|
|
2645
|
+
interface ZodBoolean extends _ZodBoolean<$ZodBooleanInternals<boolean>> {}
|
|
2646
|
+
declare const ZodBoolean: $constructor<ZodBoolean>;
|
|
2647
|
+
interface ZodNull extends _ZodType<$ZodNullInternals> {}
|
|
2648
|
+
declare const ZodNull: $constructor<ZodNull>;
|
|
2649
|
+
interface ZodUnknown extends _ZodType<$ZodUnknownInternals> {}
|
|
2650
|
+
declare const ZodUnknown: $constructor<ZodUnknown>;
|
|
2651
|
+
interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T>>, $ZodArray<T> {
|
|
2652
|
+
element: T;
|
|
2653
|
+
min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
|
|
2654
|
+
nonempty(params?: string | $ZodCheckMinLengthParams): this;
|
|
2655
|
+
max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
|
|
2656
|
+
length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
|
|
2657
|
+
unwrap(): T;
|
|
2658
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2659
|
+
}
|
|
2660
|
+
declare const ZodArray: $constructor<ZodArray>;
|
|
2661
|
+
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] };
|
|
2662
|
+
interface ZodObject< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodLooseShape, out Config extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape, Config>>, $ZodObject<Shape, Config> {
|
|
2663
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2664
|
+
shape: Shape;
|
|
2665
|
+
keyof(): ZodEnum<ToEnum<keyof Shape & string>>;
|
|
2666
|
+
/** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
|
|
2667
|
+
catchall<T extends SomeType>(schema: T): ZodObject<Shape, $catchall<T>>;
|
|
2668
|
+
/** @deprecated Use `z.looseObject()` or `.loose()` instead. */
|
|
2669
|
+
passthrough(): ZodObject<Shape, $loose>;
|
|
2670
|
+
/** Consider `z.looseObject(A.shape)` instead */
|
|
2671
|
+
loose(): ZodObject<Shape, $loose>;
|
|
2672
|
+
/** Consider `z.strictObject(A.shape)` instead */
|
|
2673
|
+
strict(): ZodObject<Shape, $strict>;
|
|
2674
|
+
/** This is the default behavior. This method call is likely unnecessary. */
|
|
2675
|
+
strip(): ZodObject<Shape, $strip>;
|
|
2676
|
+
extend<U extends $ZodLooseShape>(shape: U): ZodObject<Extend<Shape, U>, Config>;
|
|
2677
|
+
safeExtend<U extends $ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, SomeType>>): ZodObject<Extend<Shape, U>, Config>;
|
|
2678
|
+
/**
|
|
2679
|
+
* @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
|
|
2680
|
+
*/
|
|
2681
|
+
merge<U extends ZodObject>(other: U): ZodObject<Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
|
|
2682
|
+
pick<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<Flatten$1<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
|
|
2683
|
+
omit<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<Flatten$1<Omit<Shape, Extract<keyof Shape, keyof M>>>, Config>;
|
|
2684
|
+
partial(): ZodObject<{ [k in keyof Shape]: ZodOptional<Shape[k]> }, Config>;
|
|
2685
|
+
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>;
|
|
2686
|
+
required(): ZodObject<{ [k in keyof Shape]: ZodNonOptional<Shape[k]> }, Config>;
|
|
2687
|
+
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>;
|
|
2688
|
+
}
|
|
2689
|
+
declare const ZodObject: $constructor<ZodObject>;
|
|
2690
|
+
interface ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T>>, $ZodUnion<T> {
|
|
2691
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2692
|
+
options: T;
|
|
2693
|
+
}
|
|
2694
|
+
declare const ZodUnion: $constructor<ZodUnion>;
|
|
2695
|
+
interface ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends ZodUnion<Options>, $ZodDiscriminatedUnion<Options, Disc> {
|
|
2696
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2697
|
+
_zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
|
|
2698
|
+
def: $ZodDiscriminatedUnionDef<Options, Disc>;
|
|
2699
|
+
}
|
|
2700
|
+
declare const ZodDiscriminatedUnion: $constructor<ZodDiscriminatedUnion>;
|
|
2701
|
+
interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A, B>>, $ZodIntersection<A, B> {
|
|
2702
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2703
|
+
}
|
|
2704
|
+
declare const ZodIntersection: $constructor<ZodIntersection>;
|
|
2705
|
+
interface ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends _ZodType<$ZodRecordInternals<Key, Value>>, $ZodRecord<Key, Value> {
|
|
2706
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2707
|
+
keyType: Key;
|
|
2708
|
+
valueType: Value;
|
|
2709
|
+
}
|
|
2710
|
+
declare const ZodRecord: $constructor<ZodRecord>;
|
|
2711
|
+
interface ZodEnum< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
|
|
2712
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2713
|
+
enum: T;
|
|
2714
|
+
options: Array<T[keyof T]>;
|
|
2715
|
+
extract<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten$1<Pick<T, U[number]>>>;
|
|
2716
|
+
exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten$1<Omit<T, U[number]>>>;
|
|
2717
|
+
}
|
|
2718
|
+
declare const ZodEnum: $constructor<ZodEnum>;
|
|
2719
|
+
interface ZodLiteral<T extends Literal = Literal> extends _ZodType<$ZodLiteralInternals<T>>, $ZodLiteral<T> {
|
|
2720
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2721
|
+
values: Set<T>;
|
|
2722
|
+
/** @legacy Use `.values` instead. Accessing this property will throw an error if the literal accepts multiple values. */
|
|
2723
|
+
value: T;
|
|
2724
|
+
}
|
|
2725
|
+
declare const ZodLiteral: $constructor<ZodLiteral>;
|
|
2726
|
+
interface ZodTransform<O = unknown, I = unknown> extends _ZodType<$ZodTransformInternals<O, I>>, $ZodTransform<O, I> {
|
|
2727
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2728
|
+
}
|
|
2729
|
+
declare const ZodTransform: $constructor<ZodTransform>;
|
|
2730
|
+
interface ZodOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodOptionalInternals<T>>, $ZodOptional<T> {
|
|
2731
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2732
|
+
unwrap(): T;
|
|
2733
|
+
}
|
|
2734
|
+
declare const ZodOptional: $constructor<ZodOptional>;
|
|
2735
|
+
interface ZodExactOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodExactOptionalInternals<T>>, $ZodExactOptional<T> {
|
|
2736
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2737
|
+
unwrap(): T;
|
|
2738
|
+
}
|
|
2739
|
+
declare const ZodExactOptional: $constructor<ZodExactOptional>;
|
|
2740
|
+
interface ZodNullable<T extends SomeType = $ZodType> extends _ZodType<$ZodNullableInternals<T>>, $ZodNullable<T> {
|
|
2741
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2742
|
+
unwrap(): T;
|
|
2743
|
+
}
|
|
2744
|
+
declare const ZodNullable: $constructor<ZodNullable>;
|
|
2745
|
+
interface ZodDefault<T extends SomeType = $ZodType> extends _ZodType<$ZodDefaultInternals<T>>, $ZodDefault<T> {
|
|
2746
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2747
|
+
unwrap(): T;
|
|
2748
|
+
/** @deprecated Use `.unwrap()` instead. */
|
|
2749
|
+
removeDefault(): T;
|
|
2750
|
+
}
|
|
2751
|
+
declare const ZodDefault: $constructor<ZodDefault>;
|
|
2752
|
+
interface ZodPrefault<T extends SomeType = $ZodType> extends _ZodType<$ZodPrefaultInternals<T>>, $ZodPrefault<T> {
|
|
2753
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2754
|
+
unwrap(): T;
|
|
2755
|
+
}
|
|
2756
|
+
declare const ZodPrefault: $constructor<ZodPrefault>;
|
|
2757
|
+
interface ZodNonOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodNonOptionalInternals<T>>, $ZodNonOptional<T> {
|
|
2758
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2759
|
+
unwrap(): T;
|
|
2760
|
+
}
|
|
2761
|
+
declare const ZodNonOptional: $constructor<ZodNonOptional>;
|
|
2762
|
+
interface ZodCatch<T extends SomeType = $ZodType> extends _ZodType<$ZodCatchInternals<T>>, $ZodCatch<T> {
|
|
2763
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2764
|
+
unwrap(): T;
|
|
2765
|
+
/** @deprecated Use `.unwrap()` instead. */
|
|
2766
|
+
removeCatch(): T;
|
|
2767
|
+
}
|
|
2768
|
+
declare const ZodCatch: $constructor<ZodCatch>;
|
|
2769
|
+
interface ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A, B>>, $ZodPipe<A, B> {
|
|
2770
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2771
|
+
in: A;
|
|
2772
|
+
out: B;
|
|
2773
|
+
}
|
|
2774
|
+
declare const ZodPipe: $constructor<ZodPipe>;
|
|
2775
|
+
interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadonlyInternals<T>>, $ZodReadonly<T> {
|
|
2776
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2777
|
+
unwrap(): T;
|
|
2778
|
+
}
|
|
2779
|
+
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
2780
|
+
interface ZodCustom<O = unknown, I = unknown> extends _ZodType<$ZodCustomInternals<O, I>>, $ZodCustom<O, I> {
|
|
2781
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2782
|
+
}
|
|
2783
|
+
declare const ZodCustom: $constructor<ZodCustom>;
|
|
2784
|
+
//#endregion
|
|
2785
|
+
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.d.cts
|
|
2786
|
+
interface ZodISODateTime extends ZodStringFormat {
|
|
2787
|
+
_zod: $ZodISODateTimeInternals;
|
|
2788
|
+
}
|
|
2789
|
+
declare const ZodISODateTime: $constructor<ZodISODateTime>;
|
|
2790
|
+
//#endregion
|
|
2791
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/types.d.ts
|
|
2792
|
+
/**
|
|
2793
|
+
* Information about a validated access token, provided to request handlers.
|
|
2794
|
+
*/
|
|
2795
|
+
interface AuthInfo {
|
|
2796
|
+
/**
|
|
2797
|
+
* The access token.
|
|
2798
|
+
*/
|
|
2799
|
+
token: string;
|
|
2800
|
+
/**
|
|
2801
|
+
* The client ID associated with this token.
|
|
2802
|
+
*/
|
|
2803
|
+
clientId: string;
|
|
2804
|
+
/**
|
|
2805
|
+
* Scopes associated with this token.
|
|
2806
|
+
*/
|
|
2807
|
+
scopes: string[];
|
|
2808
|
+
/**
|
|
2809
|
+
* When the token expires (in seconds since epoch).
|
|
2810
|
+
*/
|
|
2811
|
+
expiresAt?: number;
|
|
2812
|
+
/**
|
|
2813
|
+
* The RFC 8707 resource server identifier for which this token is valid.
|
|
2814
|
+
* If set, this MUST match the MCP server's resource identifier (minus hash fragment).
|
|
2815
|
+
*/
|
|
2816
|
+
resource?: URL;
|
|
2817
|
+
/**
|
|
2818
|
+
* Additional data associated with the token.
|
|
2819
|
+
* This field should be used for any additional data that needs to be attached to the auth info.
|
|
2820
|
+
*/
|
|
2821
|
+
extra?: Record<string, unknown>;
|
|
2822
|
+
}
|
|
2823
|
+
//#endregion
|
|
2824
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.d.ts
|
|
2825
|
+
/**
|
|
2826
|
+
* Task creation parameters, used to ask that the server create a task to represent a request.
|
|
2827
|
+
*/
|
|
2828
|
+
declare const TaskCreationParamsSchema: ZodObject<{
|
|
2829
|
+
/**
|
|
2830
|
+
* Time in milliseconds to keep task results available after completion.
|
|
2831
|
+
* If null, the task has unlimited lifetime until manually cleaned up.
|
|
2832
|
+
*/
|
|
2833
|
+
ttl: ZodOptional<ZodUnion<readonly [ZodNumber, ZodNull]>>;
|
|
2834
|
+
/**
|
|
2835
|
+
* Time in milliseconds to wait between task status requests.
|
|
2836
|
+
*/
|
|
2837
|
+
pollInterval: ZodOptional<ZodNumber>;
|
|
2838
|
+
}, $loose>;
|
|
2839
|
+
/**
|
|
2840
|
+
* Metadata for associating messages with a task.
|
|
2841
|
+
* Include this in the `_meta` field under the key `io.modelcontextprotocol/related-task`.
|
|
2842
|
+
*/
|
|
2843
|
+
declare const RelatedTaskMetadataSchema: ZodObject<{
|
|
2844
|
+
taskId: ZodString;
|
|
2845
|
+
}, $strip>;
|
|
2846
|
+
declare const RequestMetaSchema: ZodObject<{
|
|
2847
|
+
/**
|
|
2848
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
2849
|
+
*/
|
|
2850
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
2851
|
+
/**
|
|
2852
|
+
* If specified, this request is related to the provided task.
|
|
2853
|
+
*/
|
|
2854
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
2855
|
+
taskId: ZodString;
|
|
2856
|
+
}, $strip>>;
|
|
2857
|
+
}, $loose>;
|
|
2858
|
+
/**
|
|
2859
|
+
* Common params for any request.
|
|
2860
|
+
*/
|
|
2861
|
+
declare const RequestSchema: ZodObject<{
|
|
2862
|
+
method: ZodString;
|
|
2863
|
+
params: ZodOptional<ZodObject<{
|
|
2864
|
+
_meta: ZodOptional<ZodObject<{
|
|
2865
|
+
/**
|
|
2866
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
2867
|
+
*/
|
|
2868
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
2869
|
+
/**
|
|
2870
|
+
* If specified, this request is related to the provided task.
|
|
2871
|
+
*/
|
|
2872
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
2873
|
+
taskId: ZodString;
|
|
2874
|
+
}, $strip>>;
|
|
2875
|
+
}, $loose>>;
|
|
2876
|
+
}, $loose>>;
|
|
2877
|
+
}, $strip>;
|
|
2878
|
+
declare const NotificationSchema: ZodObject<{
|
|
2879
|
+
method: ZodString;
|
|
2880
|
+
params: ZodOptional<ZodObject<{
|
|
2881
|
+
_meta: ZodOptional<ZodObject<{
|
|
2882
|
+
/**
|
|
2883
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
2884
|
+
*/
|
|
2885
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
2886
|
+
/**
|
|
2887
|
+
* If specified, this request is related to the provided task.
|
|
2888
|
+
*/
|
|
2889
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
2890
|
+
taskId: ZodString;
|
|
2891
|
+
}, $strip>>;
|
|
2892
|
+
}, $loose>>;
|
|
2893
|
+
}, $loose>>;
|
|
2894
|
+
}, $strip>;
|
|
2895
|
+
declare const ResultSchema: ZodObject<{
|
|
2896
|
+
/**
|
|
2897
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
2898
|
+
* for notes on _meta usage.
|
|
2899
|
+
*/
|
|
2900
|
+
_meta: ZodOptional<ZodObject<{
|
|
2901
|
+
/**
|
|
2902
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
2903
|
+
*/
|
|
2904
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
2905
|
+
/**
|
|
2906
|
+
* If specified, this request is related to the provided task.
|
|
2907
|
+
*/
|
|
2908
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
2909
|
+
taskId: ZodString;
|
|
2910
|
+
}, $strip>>;
|
|
2911
|
+
}, $loose>>;
|
|
2912
|
+
}, $loose>;
|
|
2913
|
+
/**
|
|
2914
|
+
* A uniquely identifying ID for a request in JSON-RPC.
|
|
2915
|
+
*/
|
|
2916
|
+
declare const RequestIdSchema: ZodUnion<readonly [ZodString, ZodNumber]>;
|
|
2917
|
+
declare const ProgressSchema: ZodObject<{
|
|
2918
|
+
progress: ZodNumber;
|
|
2919
|
+
total: ZodOptional<ZodNumber>;
|
|
2920
|
+
message: ZodOptional<ZodString>;
|
|
2921
|
+
}, $strip>;
|
|
2922
|
+
/**
|
|
2923
|
+
* A pollable state object associated with a request.
|
|
2924
|
+
*/
|
|
2925
|
+
declare const TaskSchema: ZodObject<{
|
|
2926
|
+
taskId: ZodString;
|
|
2927
|
+
status: ZodEnum<{
|
|
2928
|
+
working: "working";
|
|
2929
|
+
input_required: "input_required";
|
|
2930
|
+
completed: "completed";
|
|
2931
|
+
failed: "failed";
|
|
2932
|
+
cancelled: "cancelled";
|
|
2933
|
+
}>;
|
|
2934
|
+
ttl: ZodUnion<readonly [ZodNumber, ZodNull]>;
|
|
2935
|
+
createdAt: ZodString;
|
|
2936
|
+
lastUpdatedAt: ZodString;
|
|
2937
|
+
pollInterval: ZodOptional<ZodNumber>;
|
|
2938
|
+
statusMessage: ZodOptional<ZodString>;
|
|
2939
|
+
}, $strip>;
|
|
2940
|
+
/**
|
|
2941
|
+
* Additional properties describing a Tool to clients.
|
|
2942
|
+
*
|
|
2943
|
+
* NOTE: all properties in ToolAnnotations are **hints**.
|
|
2944
|
+
* They are not guaranteed to provide a faithful description of
|
|
2945
|
+
* tool behavior (including descriptive properties like `title`).
|
|
2946
|
+
*
|
|
2947
|
+
* Clients should never make tool use decisions based on ToolAnnotations
|
|
2948
|
+
* received from untrusted servers.
|
|
2949
|
+
*/
|
|
2950
|
+
declare const ToolAnnotationsSchema: ZodObject<{
|
|
2951
|
+
title: ZodOptional<ZodString>;
|
|
2952
|
+
readOnlyHint: ZodOptional<ZodBoolean>;
|
|
2953
|
+
destructiveHint: ZodOptional<ZodBoolean>;
|
|
2954
|
+
idempotentHint: ZodOptional<ZodBoolean>;
|
|
2955
|
+
openWorldHint: ZodOptional<ZodBoolean>;
|
|
2956
|
+
}, $strip>;
|
|
2957
|
+
/**
|
|
2958
|
+
* The server's response to a tool call.
|
|
2959
|
+
*/
|
|
2960
|
+
declare const CallToolResultSchema: ZodObject<{
|
|
2961
|
+
_meta: ZodOptional<ZodObject<{
|
|
2962
|
+
/**
|
|
2963
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
2964
|
+
*/
|
|
2965
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
2966
|
+
/**
|
|
2967
|
+
* If specified, this request is related to the provided task.
|
|
2968
|
+
*/
|
|
2969
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
2970
|
+
taskId: ZodString;
|
|
2971
|
+
}, $strip>>;
|
|
2972
|
+
}, $loose>>;
|
|
2973
|
+
content: ZodDefault<ZodArray<ZodUnion<readonly [ZodObject<{
|
|
2974
|
+
type: ZodLiteral<"text">;
|
|
2975
|
+
text: ZodString;
|
|
2976
|
+
annotations: ZodOptional<ZodObject<{
|
|
2977
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
2978
|
+
user: "user";
|
|
2979
|
+
assistant: "assistant";
|
|
2980
|
+
}>>>;
|
|
2981
|
+
priority: ZodOptional<ZodNumber>;
|
|
2982
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
2983
|
+
}, $strip>>;
|
|
2984
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
2985
|
+
}, $strip>, ZodObject<{
|
|
2986
|
+
type: ZodLiteral<"image">;
|
|
2987
|
+
data: ZodString;
|
|
2988
|
+
mimeType: ZodString;
|
|
2989
|
+
annotations: ZodOptional<ZodObject<{
|
|
2990
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
2991
|
+
user: "user";
|
|
2992
|
+
assistant: "assistant";
|
|
2993
|
+
}>>>;
|
|
2994
|
+
priority: ZodOptional<ZodNumber>;
|
|
2995
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
2996
|
+
}, $strip>>;
|
|
2997
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
2998
|
+
}, $strip>, ZodObject<{
|
|
2999
|
+
type: ZodLiteral<"audio">;
|
|
3000
|
+
data: ZodString;
|
|
3001
|
+
mimeType: ZodString;
|
|
3002
|
+
annotations: ZodOptional<ZodObject<{
|
|
3003
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3004
|
+
user: "user";
|
|
3005
|
+
assistant: "assistant";
|
|
3006
|
+
}>>>;
|
|
3007
|
+
priority: ZodOptional<ZodNumber>;
|
|
3008
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3009
|
+
}, $strip>>;
|
|
3010
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3011
|
+
}, $strip>, ZodObject<{
|
|
3012
|
+
uri: ZodString;
|
|
3013
|
+
description: ZodOptional<ZodString>;
|
|
3014
|
+
mimeType: ZodOptional<ZodString>;
|
|
3015
|
+
annotations: ZodOptional<ZodObject<{
|
|
3016
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3017
|
+
user: "user";
|
|
3018
|
+
assistant: "assistant";
|
|
3019
|
+
}>>>;
|
|
3020
|
+
priority: ZodOptional<ZodNumber>;
|
|
3021
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3022
|
+
}, $strip>>;
|
|
3023
|
+
_meta: ZodOptional<ZodObject<{}, $loose>>;
|
|
3024
|
+
icons: ZodOptional<ZodArray<ZodObject<{
|
|
3025
|
+
src: ZodString;
|
|
3026
|
+
mimeType: ZodOptional<ZodString>;
|
|
3027
|
+
sizes: ZodOptional<ZodArray<ZodString>>;
|
|
3028
|
+
theme: ZodOptional<ZodEnum<{
|
|
3029
|
+
light: "light";
|
|
3030
|
+
dark: "dark";
|
|
3031
|
+
}>>;
|
|
3032
|
+
}, $strip>>>;
|
|
3033
|
+
name: ZodString;
|
|
3034
|
+
title: ZodOptional<ZodString>;
|
|
3035
|
+
type: ZodLiteral<"resource_link">;
|
|
3036
|
+
}, $strip>, ZodObject<{
|
|
3037
|
+
type: ZodLiteral<"resource">;
|
|
3038
|
+
resource: ZodUnion<readonly [ZodObject<{
|
|
3039
|
+
uri: ZodString;
|
|
3040
|
+
mimeType: ZodOptional<ZodString>;
|
|
3041
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3042
|
+
text: ZodString;
|
|
3043
|
+
}, $strip>, ZodObject<{
|
|
3044
|
+
uri: ZodString;
|
|
3045
|
+
mimeType: ZodOptional<ZodString>;
|
|
3046
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3047
|
+
blob: ZodString;
|
|
3048
|
+
}, $strip>]>;
|
|
3049
|
+
annotations: ZodOptional<ZodObject<{
|
|
3050
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3051
|
+
user: "user";
|
|
3052
|
+
assistant: "assistant";
|
|
3053
|
+
}>>>;
|
|
3054
|
+
priority: ZodOptional<ZodNumber>;
|
|
3055
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3056
|
+
}, $strip>>;
|
|
3057
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3058
|
+
}, $strip>]>>>;
|
|
3059
|
+
structuredContent: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3060
|
+
isError: ZodOptional<ZodBoolean>;
|
|
3061
|
+
}, $loose>;
|
|
3062
|
+
declare const ServerRequestSchema: ZodUnion<readonly [ZodObject<{
|
|
3063
|
+
method: ZodLiteral<"ping">;
|
|
3064
|
+
params: ZodOptional<ZodObject<{
|
|
3065
|
+
_meta: ZodOptional<ZodObject<{
|
|
3066
|
+
/**
|
|
3067
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3068
|
+
*/
|
|
3069
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3070
|
+
/**
|
|
3071
|
+
* If specified, this request is related to the provided task.
|
|
3072
|
+
*/
|
|
3073
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3074
|
+
taskId: ZodString;
|
|
3075
|
+
}, $strip>>;
|
|
3076
|
+
}, $loose>>;
|
|
3077
|
+
}, $strip>>;
|
|
3078
|
+
}, $strip>, ZodObject<{
|
|
3079
|
+
method: ZodLiteral<"sampling/createMessage">;
|
|
3080
|
+
params: ZodObject<{
|
|
3081
|
+
_meta: ZodOptional<ZodObject<{
|
|
3082
|
+
/**
|
|
3083
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3084
|
+
*/
|
|
3085
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3086
|
+
/**
|
|
3087
|
+
* If specified, this request is related to the provided task.
|
|
3088
|
+
*/
|
|
3089
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3090
|
+
taskId: ZodString;
|
|
3091
|
+
}, $strip>>;
|
|
3092
|
+
}, $loose>>;
|
|
3093
|
+
task: ZodOptional<ZodObject<{
|
|
3094
|
+
ttl: ZodOptional<ZodNumber>;
|
|
3095
|
+
}, $strip>>;
|
|
3096
|
+
messages: ZodArray<ZodObject<{
|
|
3097
|
+
role: ZodEnum<{
|
|
3098
|
+
user: "user";
|
|
3099
|
+
assistant: "assistant";
|
|
3100
|
+
}>;
|
|
3101
|
+
content: ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
3102
|
+
type: ZodLiteral<"text">;
|
|
3103
|
+
text: ZodString;
|
|
3104
|
+
annotations: ZodOptional<ZodObject<{
|
|
3105
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3106
|
+
user: "user";
|
|
3107
|
+
assistant: "assistant";
|
|
3108
|
+
}>>>;
|
|
3109
|
+
priority: ZodOptional<ZodNumber>;
|
|
3110
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3111
|
+
}, $strip>>;
|
|
3112
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3113
|
+
}, $strip>, ZodObject<{
|
|
3114
|
+
type: ZodLiteral<"image">;
|
|
3115
|
+
data: ZodString;
|
|
3116
|
+
mimeType: ZodString;
|
|
3117
|
+
annotations: ZodOptional<ZodObject<{
|
|
3118
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3119
|
+
user: "user";
|
|
3120
|
+
assistant: "assistant";
|
|
3121
|
+
}>>>;
|
|
3122
|
+
priority: ZodOptional<ZodNumber>;
|
|
3123
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3124
|
+
}, $strip>>;
|
|
3125
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3126
|
+
}, $strip>, ZodObject<{
|
|
3127
|
+
type: ZodLiteral<"audio">;
|
|
3128
|
+
data: ZodString;
|
|
3129
|
+
mimeType: ZodString;
|
|
3130
|
+
annotations: ZodOptional<ZodObject<{
|
|
3131
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3132
|
+
user: "user";
|
|
3133
|
+
assistant: "assistant";
|
|
3134
|
+
}>>>;
|
|
3135
|
+
priority: ZodOptional<ZodNumber>;
|
|
3136
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3137
|
+
}, $strip>>;
|
|
3138
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3139
|
+
}, $strip>, ZodObject<{
|
|
3140
|
+
type: ZodLiteral<"tool_use">;
|
|
3141
|
+
name: ZodString;
|
|
3142
|
+
id: ZodString;
|
|
3143
|
+
input: ZodRecord<ZodString, ZodUnknown>;
|
|
3144
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3145
|
+
}, $strip>, ZodObject<{
|
|
3146
|
+
type: ZodLiteral<"tool_result">;
|
|
3147
|
+
toolUseId: ZodString;
|
|
3148
|
+
content: ZodDefault<ZodArray<ZodUnion<readonly [ZodObject<{
|
|
3149
|
+
type: ZodLiteral<"text">;
|
|
3150
|
+
text: ZodString;
|
|
3151
|
+
annotations: ZodOptional<ZodObject<{
|
|
3152
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3153
|
+
user: "user";
|
|
3154
|
+
assistant: "assistant";
|
|
3155
|
+
}>>>;
|
|
3156
|
+
priority: ZodOptional<ZodNumber>;
|
|
3157
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3158
|
+
}, $strip>>;
|
|
3159
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3160
|
+
}, $strip>, ZodObject<{
|
|
3161
|
+
type: ZodLiteral<"image">;
|
|
3162
|
+
data: ZodString;
|
|
3163
|
+
mimeType: ZodString;
|
|
3164
|
+
annotations: ZodOptional<ZodObject<{
|
|
3165
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3166
|
+
user: "user";
|
|
3167
|
+
assistant: "assistant";
|
|
3168
|
+
}>>>;
|
|
3169
|
+
priority: ZodOptional<ZodNumber>;
|
|
3170
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3171
|
+
}, $strip>>;
|
|
3172
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3173
|
+
}, $strip>, ZodObject<{
|
|
3174
|
+
type: ZodLiteral<"audio">;
|
|
3175
|
+
data: ZodString;
|
|
3176
|
+
mimeType: ZodString;
|
|
3177
|
+
annotations: ZodOptional<ZodObject<{
|
|
3178
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3179
|
+
user: "user";
|
|
3180
|
+
assistant: "assistant";
|
|
3181
|
+
}>>>;
|
|
3182
|
+
priority: ZodOptional<ZodNumber>;
|
|
3183
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3184
|
+
}, $strip>>;
|
|
3185
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3186
|
+
}, $strip>, ZodObject<{
|
|
3187
|
+
uri: ZodString;
|
|
3188
|
+
description: ZodOptional<ZodString>;
|
|
3189
|
+
mimeType: ZodOptional<ZodString>;
|
|
3190
|
+
annotations: ZodOptional<ZodObject<{
|
|
3191
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3192
|
+
user: "user";
|
|
3193
|
+
assistant: "assistant";
|
|
3194
|
+
}>>>;
|
|
3195
|
+
priority: ZodOptional<ZodNumber>;
|
|
3196
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3197
|
+
}, $strip>>;
|
|
3198
|
+
_meta: ZodOptional<ZodObject<{}, $loose>>;
|
|
3199
|
+
icons: ZodOptional<ZodArray<ZodObject<{
|
|
3200
|
+
src: ZodString;
|
|
3201
|
+
mimeType: ZodOptional<ZodString>;
|
|
3202
|
+
sizes: ZodOptional<ZodArray<ZodString>>;
|
|
3203
|
+
theme: ZodOptional<ZodEnum<{
|
|
3204
|
+
light: "light";
|
|
3205
|
+
dark: "dark";
|
|
3206
|
+
}>>;
|
|
3207
|
+
}, $strip>>>;
|
|
3208
|
+
name: ZodString;
|
|
3209
|
+
title: ZodOptional<ZodString>;
|
|
3210
|
+
type: ZodLiteral<"resource_link">;
|
|
3211
|
+
}, $strip>, ZodObject<{
|
|
3212
|
+
type: ZodLiteral<"resource">;
|
|
3213
|
+
resource: ZodUnion<readonly [ZodObject<{
|
|
3214
|
+
uri: ZodString;
|
|
3215
|
+
mimeType: ZodOptional<ZodString>;
|
|
3216
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3217
|
+
text: ZodString;
|
|
3218
|
+
}, $strip>, ZodObject<{
|
|
3219
|
+
uri: ZodString;
|
|
3220
|
+
mimeType: ZodOptional<ZodString>;
|
|
3221
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3222
|
+
blob: ZodString;
|
|
3223
|
+
}, $strip>]>;
|
|
3224
|
+
annotations: ZodOptional<ZodObject<{
|
|
3225
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3226
|
+
user: "user";
|
|
3227
|
+
assistant: "assistant";
|
|
3228
|
+
}>>>;
|
|
3229
|
+
priority: ZodOptional<ZodNumber>;
|
|
3230
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3231
|
+
}, $strip>>;
|
|
3232
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3233
|
+
}, $strip>]>>>;
|
|
3234
|
+
structuredContent: ZodOptional<ZodObject<{}, $loose>>;
|
|
3235
|
+
isError: ZodOptional<ZodBoolean>;
|
|
3236
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3237
|
+
}, $strip>]>, ZodArray<ZodDiscriminatedUnion<[ZodObject<{
|
|
3238
|
+
type: ZodLiteral<"text">;
|
|
3239
|
+
text: ZodString;
|
|
3240
|
+
annotations: ZodOptional<ZodObject<{
|
|
3241
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3242
|
+
user: "user";
|
|
3243
|
+
assistant: "assistant";
|
|
3244
|
+
}>>>;
|
|
3245
|
+
priority: ZodOptional<ZodNumber>;
|
|
3246
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3247
|
+
}, $strip>>;
|
|
3248
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3249
|
+
}, $strip>, ZodObject<{
|
|
3250
|
+
type: ZodLiteral<"image">;
|
|
3251
|
+
data: ZodString;
|
|
3252
|
+
mimeType: ZodString;
|
|
3253
|
+
annotations: ZodOptional<ZodObject<{
|
|
3254
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3255
|
+
user: "user";
|
|
3256
|
+
assistant: "assistant";
|
|
3257
|
+
}>>>;
|
|
3258
|
+
priority: ZodOptional<ZodNumber>;
|
|
3259
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3260
|
+
}, $strip>>;
|
|
3261
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3262
|
+
}, $strip>, ZodObject<{
|
|
3263
|
+
type: ZodLiteral<"audio">;
|
|
3264
|
+
data: ZodString;
|
|
3265
|
+
mimeType: ZodString;
|
|
3266
|
+
annotations: ZodOptional<ZodObject<{
|
|
3267
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3268
|
+
user: "user";
|
|
3269
|
+
assistant: "assistant";
|
|
3270
|
+
}>>>;
|
|
3271
|
+
priority: ZodOptional<ZodNumber>;
|
|
3272
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3273
|
+
}, $strip>>;
|
|
3274
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3275
|
+
}, $strip>, ZodObject<{
|
|
3276
|
+
type: ZodLiteral<"tool_use">;
|
|
3277
|
+
name: ZodString;
|
|
3278
|
+
id: ZodString;
|
|
3279
|
+
input: ZodRecord<ZodString, ZodUnknown>;
|
|
3280
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3281
|
+
}, $strip>, ZodObject<{
|
|
3282
|
+
type: ZodLiteral<"tool_result">;
|
|
3283
|
+
toolUseId: ZodString;
|
|
3284
|
+
content: ZodDefault<ZodArray<ZodUnion<readonly [ZodObject<{
|
|
3285
|
+
type: ZodLiteral<"text">;
|
|
3286
|
+
text: ZodString;
|
|
3287
|
+
annotations: ZodOptional<ZodObject<{
|
|
3288
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3289
|
+
user: "user";
|
|
3290
|
+
assistant: "assistant";
|
|
3291
|
+
}>>>;
|
|
3292
|
+
priority: ZodOptional<ZodNumber>;
|
|
3293
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3294
|
+
}, $strip>>;
|
|
3295
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3296
|
+
}, $strip>, ZodObject<{
|
|
3297
|
+
type: ZodLiteral<"image">;
|
|
3298
|
+
data: ZodString;
|
|
3299
|
+
mimeType: ZodString;
|
|
3300
|
+
annotations: ZodOptional<ZodObject<{
|
|
3301
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3302
|
+
user: "user";
|
|
3303
|
+
assistant: "assistant";
|
|
3304
|
+
}>>>;
|
|
3305
|
+
priority: ZodOptional<ZodNumber>;
|
|
3306
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3307
|
+
}, $strip>>;
|
|
3308
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3309
|
+
}, $strip>, ZodObject<{
|
|
3310
|
+
type: ZodLiteral<"audio">;
|
|
3311
|
+
data: ZodString;
|
|
3312
|
+
mimeType: ZodString;
|
|
3313
|
+
annotations: ZodOptional<ZodObject<{
|
|
3314
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3315
|
+
user: "user";
|
|
3316
|
+
assistant: "assistant";
|
|
3317
|
+
}>>>;
|
|
3318
|
+
priority: ZodOptional<ZodNumber>;
|
|
3319
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3320
|
+
}, $strip>>;
|
|
3321
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3322
|
+
}, $strip>, ZodObject<{
|
|
3323
|
+
uri: ZodString;
|
|
3324
|
+
description: ZodOptional<ZodString>;
|
|
3325
|
+
mimeType: ZodOptional<ZodString>;
|
|
3326
|
+
annotations: ZodOptional<ZodObject<{
|
|
3327
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3328
|
+
user: "user";
|
|
3329
|
+
assistant: "assistant";
|
|
3330
|
+
}>>>;
|
|
3331
|
+
priority: ZodOptional<ZodNumber>;
|
|
3332
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3333
|
+
}, $strip>>;
|
|
3334
|
+
_meta: ZodOptional<ZodObject<{}, $loose>>;
|
|
3335
|
+
icons: ZodOptional<ZodArray<ZodObject<{
|
|
3336
|
+
src: ZodString;
|
|
3337
|
+
mimeType: ZodOptional<ZodString>;
|
|
3338
|
+
sizes: ZodOptional<ZodArray<ZodString>>;
|
|
3339
|
+
theme: ZodOptional<ZodEnum<{
|
|
3340
|
+
light: "light";
|
|
3341
|
+
dark: "dark";
|
|
3342
|
+
}>>;
|
|
3343
|
+
}, $strip>>>;
|
|
3344
|
+
name: ZodString;
|
|
3345
|
+
title: ZodOptional<ZodString>;
|
|
3346
|
+
type: ZodLiteral<"resource_link">;
|
|
3347
|
+
}, $strip>, ZodObject<{
|
|
3348
|
+
type: ZodLiteral<"resource">;
|
|
3349
|
+
resource: ZodUnion<readonly [ZodObject<{
|
|
3350
|
+
uri: ZodString;
|
|
3351
|
+
mimeType: ZodOptional<ZodString>;
|
|
3352
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3353
|
+
text: ZodString;
|
|
3354
|
+
}, $strip>, ZodObject<{
|
|
3355
|
+
uri: ZodString;
|
|
3356
|
+
mimeType: ZodOptional<ZodString>;
|
|
3357
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3358
|
+
blob: ZodString;
|
|
3359
|
+
}, $strip>]>;
|
|
3360
|
+
annotations: ZodOptional<ZodObject<{
|
|
3361
|
+
audience: ZodOptional<ZodArray<ZodEnum<{
|
|
3362
|
+
user: "user";
|
|
3363
|
+
assistant: "assistant";
|
|
3364
|
+
}>>>;
|
|
3365
|
+
priority: ZodOptional<ZodNumber>;
|
|
3366
|
+
lastModified: ZodOptional<ZodISODateTime>;
|
|
3367
|
+
}, $strip>>;
|
|
3368
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3369
|
+
}, $strip>]>>>;
|
|
3370
|
+
structuredContent: ZodOptional<ZodObject<{}, $loose>>;
|
|
3371
|
+
isError: ZodOptional<ZodBoolean>;
|
|
3372
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3373
|
+
}, $strip>]>>]>;
|
|
3374
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3375
|
+
}, $strip>>;
|
|
3376
|
+
modelPreferences: ZodOptional<ZodObject<{
|
|
3377
|
+
hints: ZodOptional<ZodArray<ZodObject<{
|
|
3378
|
+
name: ZodOptional<ZodString>;
|
|
3379
|
+
}, $strip>>>;
|
|
3380
|
+
costPriority: ZodOptional<ZodNumber>;
|
|
3381
|
+
speedPriority: ZodOptional<ZodNumber>;
|
|
3382
|
+
intelligencePriority: ZodOptional<ZodNumber>;
|
|
3383
|
+
}, $strip>>;
|
|
3384
|
+
systemPrompt: ZodOptional<ZodString>;
|
|
3385
|
+
includeContext: ZodOptional<ZodEnum<{
|
|
3386
|
+
none: "none";
|
|
3387
|
+
thisServer: "thisServer";
|
|
3388
|
+
allServers: "allServers";
|
|
3389
|
+
}>>;
|
|
3390
|
+
temperature: ZodOptional<ZodNumber>;
|
|
3391
|
+
maxTokens: ZodNumber;
|
|
3392
|
+
stopSequences: ZodOptional<ZodArray<ZodString>>;
|
|
3393
|
+
metadata: ZodOptional<ZodCustom<object, object>>;
|
|
3394
|
+
tools: ZodOptional<ZodArray<ZodObject<{
|
|
3395
|
+
description: ZodOptional<ZodString>;
|
|
3396
|
+
inputSchema: ZodObject<{
|
|
3397
|
+
type: ZodLiteral<"object">;
|
|
3398
|
+
properties: ZodOptional<ZodRecord<ZodString, ZodCustom<object, object>>>;
|
|
3399
|
+
required: ZodOptional<ZodArray<ZodString>>;
|
|
3400
|
+
}, $catchall<ZodUnknown>>;
|
|
3401
|
+
outputSchema: ZodOptional<ZodObject<{
|
|
3402
|
+
type: ZodLiteral<"object">;
|
|
3403
|
+
properties: ZodOptional<ZodRecord<ZodString, ZodCustom<object, object>>>;
|
|
3404
|
+
required: ZodOptional<ZodArray<ZodString>>;
|
|
3405
|
+
}, $catchall<ZodUnknown>>>;
|
|
3406
|
+
annotations: ZodOptional<ZodObject<{
|
|
3407
|
+
title: ZodOptional<ZodString>;
|
|
3408
|
+
readOnlyHint: ZodOptional<ZodBoolean>;
|
|
3409
|
+
destructiveHint: ZodOptional<ZodBoolean>;
|
|
3410
|
+
idempotentHint: ZodOptional<ZodBoolean>;
|
|
3411
|
+
openWorldHint: ZodOptional<ZodBoolean>;
|
|
3412
|
+
}, $strip>>;
|
|
3413
|
+
execution: ZodOptional<ZodObject<{
|
|
3414
|
+
taskSupport: ZodOptional<ZodEnum<{
|
|
3415
|
+
optional: "optional";
|
|
3416
|
+
required: "required";
|
|
3417
|
+
forbidden: "forbidden";
|
|
3418
|
+
}>>;
|
|
3419
|
+
}, $strip>>;
|
|
3420
|
+
_meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
3421
|
+
icons: ZodOptional<ZodArray<ZodObject<{
|
|
3422
|
+
src: ZodString;
|
|
3423
|
+
mimeType: ZodOptional<ZodString>;
|
|
3424
|
+
sizes: ZodOptional<ZodArray<ZodString>>;
|
|
3425
|
+
theme: ZodOptional<ZodEnum<{
|
|
3426
|
+
light: "light";
|
|
3427
|
+
dark: "dark";
|
|
3428
|
+
}>>;
|
|
3429
|
+
}, $strip>>>;
|
|
3430
|
+
name: ZodString;
|
|
3431
|
+
title: ZodOptional<ZodString>;
|
|
3432
|
+
}, $strip>>>;
|
|
3433
|
+
toolChoice: ZodOptional<ZodObject<{
|
|
3434
|
+
mode: ZodOptional<ZodEnum<{
|
|
3435
|
+
required: "required";
|
|
3436
|
+
auto: "auto";
|
|
3437
|
+
none: "none";
|
|
3438
|
+
}>>;
|
|
3439
|
+
}, $strip>>;
|
|
3440
|
+
}, $strip>;
|
|
3441
|
+
}, $strip>, ZodObject<{
|
|
3442
|
+
method: ZodLiteral<"elicitation/create">;
|
|
3443
|
+
params: ZodUnion<readonly [ZodObject<{
|
|
3444
|
+
_meta: ZodOptional<ZodObject<{
|
|
3445
|
+
/**
|
|
3446
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3447
|
+
*/
|
|
3448
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3449
|
+
/**
|
|
3450
|
+
* If specified, this request is related to the provided task.
|
|
3451
|
+
*/
|
|
3452
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3453
|
+
taskId: ZodString;
|
|
3454
|
+
}, $strip>>;
|
|
3455
|
+
}, $loose>>;
|
|
3456
|
+
task: ZodOptional<ZodObject<{
|
|
3457
|
+
ttl: ZodOptional<ZodNumber>;
|
|
3458
|
+
}, $strip>>;
|
|
3459
|
+
mode: ZodOptional<ZodLiteral<"form">>;
|
|
3460
|
+
message: ZodString;
|
|
3461
|
+
requestedSchema: ZodObject<{
|
|
3462
|
+
type: ZodLiteral<"object">;
|
|
3463
|
+
properties: ZodRecord<ZodString, ZodUnion<readonly [ZodUnion<readonly [ZodObject<{
|
|
3464
|
+
type: ZodLiteral<"string">;
|
|
3465
|
+
title: ZodOptional<ZodString>;
|
|
3466
|
+
description: ZodOptional<ZodString>;
|
|
3467
|
+
enum: ZodArray<ZodString>;
|
|
3468
|
+
enumNames: ZodOptional<ZodArray<ZodString>>;
|
|
3469
|
+
default: ZodOptional<ZodString>;
|
|
3470
|
+
}, $strip>, ZodUnion<readonly [ZodObject<{
|
|
3471
|
+
type: ZodLiteral<"string">;
|
|
3472
|
+
title: ZodOptional<ZodString>;
|
|
3473
|
+
description: ZodOptional<ZodString>;
|
|
3474
|
+
enum: ZodArray<ZodString>;
|
|
3475
|
+
default: ZodOptional<ZodString>;
|
|
3476
|
+
}, $strip>, ZodObject<{
|
|
3477
|
+
type: ZodLiteral<"string">;
|
|
3478
|
+
title: ZodOptional<ZodString>;
|
|
3479
|
+
description: ZodOptional<ZodString>;
|
|
3480
|
+
oneOf: ZodArray<ZodObject<{
|
|
3481
|
+
const: ZodString;
|
|
3482
|
+
title: ZodString;
|
|
3483
|
+
}, $strip>>;
|
|
3484
|
+
default: ZodOptional<ZodString>;
|
|
3485
|
+
}, $strip>]>, ZodUnion<readonly [ZodObject<{
|
|
3486
|
+
type: ZodLiteral<"array">;
|
|
3487
|
+
title: ZodOptional<ZodString>;
|
|
3488
|
+
description: ZodOptional<ZodString>;
|
|
3489
|
+
minItems: ZodOptional<ZodNumber>;
|
|
3490
|
+
maxItems: ZodOptional<ZodNumber>;
|
|
3491
|
+
items: ZodObject<{
|
|
3492
|
+
type: ZodLiteral<"string">;
|
|
3493
|
+
enum: ZodArray<ZodString>;
|
|
3494
|
+
}, $strip>;
|
|
3495
|
+
default: ZodOptional<ZodArray<ZodString>>;
|
|
3496
|
+
}, $strip>, ZodObject<{
|
|
3497
|
+
type: ZodLiteral<"array">;
|
|
3498
|
+
title: ZodOptional<ZodString>;
|
|
3499
|
+
description: ZodOptional<ZodString>;
|
|
3500
|
+
minItems: ZodOptional<ZodNumber>;
|
|
3501
|
+
maxItems: ZodOptional<ZodNumber>;
|
|
3502
|
+
items: ZodObject<{
|
|
3503
|
+
anyOf: ZodArray<ZodObject<{
|
|
3504
|
+
const: ZodString;
|
|
3505
|
+
title: ZodString;
|
|
3506
|
+
}, $strip>>;
|
|
3507
|
+
}, $strip>;
|
|
3508
|
+
default: ZodOptional<ZodArray<ZodString>>;
|
|
3509
|
+
}, $strip>]>]>, ZodObject<{
|
|
3510
|
+
type: ZodLiteral<"boolean">;
|
|
3511
|
+
title: ZodOptional<ZodString>;
|
|
3512
|
+
description: ZodOptional<ZodString>;
|
|
3513
|
+
default: ZodOptional<ZodBoolean>;
|
|
3514
|
+
}, $strip>, ZodObject<{
|
|
3515
|
+
type: ZodLiteral<"string">;
|
|
3516
|
+
title: ZodOptional<ZodString>;
|
|
3517
|
+
description: ZodOptional<ZodString>;
|
|
3518
|
+
minLength: ZodOptional<ZodNumber>;
|
|
3519
|
+
maxLength: ZodOptional<ZodNumber>;
|
|
3520
|
+
format: ZodOptional<ZodEnum<{
|
|
3521
|
+
date: "date";
|
|
3522
|
+
uri: "uri";
|
|
3523
|
+
email: "email";
|
|
3524
|
+
"date-time": "date-time";
|
|
3525
|
+
}>>;
|
|
3526
|
+
default: ZodOptional<ZodString>;
|
|
3527
|
+
}, $strip>, ZodObject<{
|
|
3528
|
+
type: ZodEnum<{
|
|
3529
|
+
number: "number";
|
|
3530
|
+
integer: "integer";
|
|
3531
|
+
}>;
|
|
3532
|
+
title: ZodOptional<ZodString>;
|
|
3533
|
+
description: ZodOptional<ZodString>;
|
|
3534
|
+
minimum: ZodOptional<ZodNumber>;
|
|
3535
|
+
maximum: ZodOptional<ZodNumber>;
|
|
3536
|
+
default: ZodOptional<ZodNumber>;
|
|
3537
|
+
}, $strip>]>>;
|
|
3538
|
+
required: ZodOptional<ZodArray<ZodString>>;
|
|
3539
|
+
}, $strip>;
|
|
3540
|
+
}, $strip>, ZodObject<{
|
|
3541
|
+
_meta: ZodOptional<ZodObject<{
|
|
3542
|
+
/**
|
|
3543
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3544
|
+
*/
|
|
3545
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3546
|
+
/**
|
|
3547
|
+
* If specified, this request is related to the provided task.
|
|
3548
|
+
*/
|
|
3549
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3550
|
+
taskId: ZodString;
|
|
3551
|
+
}, $strip>>;
|
|
3552
|
+
}, $loose>>;
|
|
3553
|
+
task: ZodOptional<ZodObject<{
|
|
3554
|
+
ttl: ZodOptional<ZodNumber>;
|
|
3555
|
+
}, $strip>>;
|
|
3556
|
+
mode: ZodLiteral<"url">;
|
|
3557
|
+
message: ZodString;
|
|
3558
|
+
elicitationId: ZodString;
|
|
3559
|
+
url: ZodString;
|
|
3560
|
+
}, $strip>]>;
|
|
3561
|
+
}, $strip>, ZodObject<{
|
|
3562
|
+
method: ZodLiteral<"roots/list">;
|
|
3563
|
+
params: ZodOptional<ZodObject<{
|
|
3564
|
+
_meta: ZodOptional<ZodObject<{
|
|
3565
|
+
/**
|
|
3566
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3567
|
+
*/
|
|
3568
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3569
|
+
/**
|
|
3570
|
+
* If specified, this request is related to the provided task.
|
|
3571
|
+
*/
|
|
3572
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3573
|
+
taskId: ZodString;
|
|
3574
|
+
}, $strip>>;
|
|
3575
|
+
}, $loose>>;
|
|
3576
|
+
}, $strip>>;
|
|
3577
|
+
}, $strip>, ZodObject<{
|
|
3578
|
+
method: ZodLiteral<"tasks/get">;
|
|
3579
|
+
params: ZodObject<{
|
|
3580
|
+
_meta: ZodOptional<ZodObject<{
|
|
3581
|
+
/**
|
|
3582
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3583
|
+
*/
|
|
3584
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3585
|
+
/**
|
|
3586
|
+
* If specified, this request is related to the provided task.
|
|
3587
|
+
*/
|
|
3588
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3589
|
+
taskId: ZodString;
|
|
3590
|
+
}, $strip>>;
|
|
3591
|
+
}, $loose>>;
|
|
3592
|
+
taskId: ZodString;
|
|
3593
|
+
}, $strip>;
|
|
3594
|
+
}, $strip>, ZodObject<{
|
|
3595
|
+
method: ZodLiteral<"tasks/result">;
|
|
3596
|
+
params: ZodObject<{
|
|
3597
|
+
_meta: ZodOptional<ZodObject<{
|
|
3598
|
+
/**
|
|
3599
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3600
|
+
*/
|
|
3601
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3602
|
+
/**
|
|
3603
|
+
* If specified, this request is related to the provided task.
|
|
3604
|
+
*/
|
|
3605
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3606
|
+
taskId: ZodString;
|
|
3607
|
+
}, $strip>>;
|
|
3608
|
+
}, $loose>>;
|
|
3609
|
+
taskId: ZodString;
|
|
3610
|
+
}, $strip>;
|
|
3611
|
+
}, $strip>, ZodObject<{
|
|
3612
|
+
params: ZodOptional<ZodObject<{
|
|
3613
|
+
_meta: ZodOptional<ZodObject<{
|
|
3614
|
+
/**
|
|
3615
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3616
|
+
*/
|
|
3617
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3618
|
+
/**
|
|
3619
|
+
* If specified, this request is related to the provided task.
|
|
3620
|
+
*/
|
|
3621
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3622
|
+
taskId: ZodString;
|
|
3623
|
+
}, $strip>>;
|
|
3624
|
+
}, $loose>>;
|
|
3625
|
+
cursor: ZodOptional<ZodString>;
|
|
3626
|
+
}, $strip>>;
|
|
3627
|
+
method: ZodLiteral<"tasks/list">;
|
|
3628
|
+
}, $strip>, ZodObject<{
|
|
3629
|
+
method: ZodLiteral<"tasks/cancel">;
|
|
3630
|
+
params: ZodObject<{
|
|
3631
|
+
_meta: ZodOptional<ZodObject<{
|
|
3632
|
+
/**
|
|
3633
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3634
|
+
*/
|
|
3635
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3636
|
+
/**
|
|
3637
|
+
* If specified, this request is related to the provided task.
|
|
3638
|
+
*/
|
|
3639
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3640
|
+
taskId: ZodString;
|
|
3641
|
+
}, $strip>>;
|
|
3642
|
+
}, $loose>>;
|
|
3643
|
+
taskId: ZodString;
|
|
3644
|
+
}, $strip>;
|
|
3645
|
+
}, $strip>]>;
|
|
3646
|
+
declare const ServerNotificationSchema: ZodUnion<readonly [ZodObject<{
|
|
3647
|
+
method: ZodLiteral<"notifications/cancelled">;
|
|
3648
|
+
params: ZodObject<{
|
|
3649
|
+
_meta: ZodOptional<ZodObject<{
|
|
3650
|
+
/**
|
|
3651
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3652
|
+
*/
|
|
3653
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3654
|
+
/**
|
|
3655
|
+
* If specified, this request is related to the provided task.
|
|
3656
|
+
*/
|
|
3657
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3658
|
+
taskId: ZodString;
|
|
3659
|
+
}, $strip>>;
|
|
3660
|
+
}, $loose>>;
|
|
3661
|
+
requestId: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3662
|
+
reason: ZodOptional<ZodString>;
|
|
3663
|
+
}, $strip>;
|
|
3664
|
+
}, $strip>, ZodObject<{
|
|
3665
|
+
method: ZodLiteral<"notifications/progress">;
|
|
3666
|
+
params: ZodObject<{
|
|
3667
|
+
progressToken: ZodUnion<readonly [ZodString, ZodNumber]>;
|
|
3668
|
+
progress: ZodNumber;
|
|
3669
|
+
total: ZodOptional<ZodNumber>;
|
|
3670
|
+
message: ZodOptional<ZodString>;
|
|
3671
|
+
_meta: ZodOptional<ZodObject<{
|
|
3672
|
+
/**
|
|
3673
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3674
|
+
*/
|
|
3675
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3676
|
+
/**
|
|
3677
|
+
* If specified, this request is related to the provided task.
|
|
3678
|
+
*/
|
|
3679
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3680
|
+
taskId: ZodString;
|
|
3681
|
+
}, $strip>>;
|
|
3682
|
+
}, $loose>>;
|
|
3683
|
+
}, $strip>;
|
|
3684
|
+
}, $strip>, ZodObject<{
|
|
3685
|
+
method: ZodLiteral<"notifications/message">;
|
|
3686
|
+
params: ZodObject<{
|
|
3687
|
+
_meta: ZodOptional<ZodObject<{
|
|
3688
|
+
/**
|
|
3689
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3690
|
+
*/
|
|
3691
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3692
|
+
/**
|
|
3693
|
+
* If specified, this request is related to the provided task.
|
|
3694
|
+
*/
|
|
3695
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3696
|
+
taskId: ZodString;
|
|
3697
|
+
}, $strip>>;
|
|
3698
|
+
}, $loose>>;
|
|
3699
|
+
level: ZodEnum<{
|
|
3700
|
+
error: "error";
|
|
3701
|
+
debug: "debug";
|
|
3702
|
+
info: "info";
|
|
3703
|
+
notice: "notice";
|
|
3704
|
+
warning: "warning";
|
|
3705
|
+
critical: "critical";
|
|
3706
|
+
alert: "alert";
|
|
3707
|
+
emergency: "emergency";
|
|
3708
|
+
}>;
|
|
3709
|
+
logger: ZodOptional<ZodString>;
|
|
3710
|
+
data: ZodUnknown;
|
|
3711
|
+
}, $strip>;
|
|
3712
|
+
}, $strip>, ZodObject<{
|
|
3713
|
+
method: ZodLiteral<"notifications/resources/updated">;
|
|
3714
|
+
params: ZodObject<{
|
|
3715
|
+
_meta: ZodOptional<ZodObject<{
|
|
3716
|
+
/**
|
|
3717
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3718
|
+
*/
|
|
3719
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3720
|
+
/**
|
|
3721
|
+
* If specified, this request is related to the provided task.
|
|
3722
|
+
*/
|
|
3723
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3724
|
+
taskId: ZodString;
|
|
3725
|
+
}, $strip>>;
|
|
3726
|
+
}, $loose>>;
|
|
3727
|
+
uri: ZodString;
|
|
3728
|
+
}, $strip>;
|
|
3729
|
+
}, $strip>, ZodObject<{
|
|
3730
|
+
method: ZodLiteral<"notifications/resources/list_changed">;
|
|
3731
|
+
params: ZodOptional<ZodObject<{
|
|
3732
|
+
_meta: ZodOptional<ZodObject<{
|
|
3733
|
+
/**
|
|
3734
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3735
|
+
*/
|
|
3736
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3737
|
+
/**
|
|
3738
|
+
* If specified, this request is related to the provided task.
|
|
3739
|
+
*/
|
|
3740
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3741
|
+
taskId: ZodString;
|
|
3742
|
+
}, $strip>>;
|
|
3743
|
+
}, $loose>>;
|
|
3744
|
+
}, $strip>>;
|
|
3745
|
+
}, $strip>, ZodObject<{
|
|
3746
|
+
method: ZodLiteral<"notifications/tools/list_changed">;
|
|
3747
|
+
params: ZodOptional<ZodObject<{
|
|
3748
|
+
_meta: ZodOptional<ZodObject<{
|
|
3749
|
+
/**
|
|
3750
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3751
|
+
*/
|
|
3752
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3753
|
+
/**
|
|
3754
|
+
* If specified, this request is related to the provided task.
|
|
3755
|
+
*/
|
|
3756
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3757
|
+
taskId: ZodString;
|
|
3758
|
+
}, $strip>>;
|
|
3759
|
+
}, $loose>>;
|
|
3760
|
+
}, $strip>>;
|
|
3761
|
+
}, $strip>, ZodObject<{
|
|
3762
|
+
method: ZodLiteral<"notifications/prompts/list_changed">;
|
|
3763
|
+
params: ZodOptional<ZodObject<{
|
|
3764
|
+
_meta: ZodOptional<ZodObject<{
|
|
3765
|
+
/**
|
|
3766
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3767
|
+
*/
|
|
3768
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3769
|
+
/**
|
|
3770
|
+
* If specified, this request is related to the provided task.
|
|
3771
|
+
*/
|
|
3772
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3773
|
+
taskId: ZodString;
|
|
3774
|
+
}, $strip>>;
|
|
3775
|
+
}, $loose>>;
|
|
3776
|
+
}, $strip>>;
|
|
3777
|
+
}, $strip>, ZodObject<{
|
|
3778
|
+
method: ZodLiteral<"notifications/tasks/status">;
|
|
3779
|
+
params: ZodObject<{
|
|
3780
|
+
_meta: ZodOptional<ZodObject<{
|
|
3781
|
+
/**
|
|
3782
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3783
|
+
*/
|
|
3784
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3785
|
+
/**
|
|
3786
|
+
* If specified, this request is related to the provided task.
|
|
3787
|
+
*/
|
|
3788
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3789
|
+
taskId: ZodString;
|
|
3790
|
+
}, $strip>>;
|
|
3791
|
+
}, $loose>>;
|
|
3792
|
+
taskId: ZodString;
|
|
3793
|
+
status: ZodEnum<{
|
|
3794
|
+
working: "working";
|
|
3795
|
+
input_required: "input_required";
|
|
3796
|
+
completed: "completed";
|
|
3797
|
+
failed: "failed";
|
|
3798
|
+
cancelled: "cancelled";
|
|
3799
|
+
}>;
|
|
3800
|
+
ttl: ZodUnion<readonly [ZodNumber, ZodNull]>;
|
|
3801
|
+
createdAt: ZodString;
|
|
3802
|
+
lastUpdatedAt: ZodString;
|
|
3803
|
+
pollInterval: ZodOptional<ZodNumber>;
|
|
3804
|
+
statusMessage: ZodOptional<ZodString>;
|
|
3805
|
+
}, $strip>;
|
|
3806
|
+
}, $strip>, ZodObject<{
|
|
3807
|
+
method: ZodLiteral<"notifications/elicitation/complete">;
|
|
3808
|
+
params: ZodObject<{
|
|
3809
|
+
_meta: ZodOptional<ZodObject<{
|
|
3810
|
+
/**
|
|
3811
|
+
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
3812
|
+
*/
|
|
3813
|
+
progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
|
|
3814
|
+
/**
|
|
3815
|
+
* If specified, this request is related to the provided task.
|
|
3816
|
+
*/
|
|
3817
|
+
"io.modelcontextprotocol/related-task": ZodOptional<ZodObject<{
|
|
3818
|
+
taskId: ZodString;
|
|
3819
|
+
}, $strip>>;
|
|
3820
|
+
}, $loose>>;
|
|
3821
|
+
elicitationId: ZodString;
|
|
3822
|
+
}, $strip>;
|
|
3823
|
+
}, $strip>]>;
|
|
3824
|
+
type Primitive = string | number | boolean | bigint | null | undefined;
|
|
3825
|
+
type Flatten<T> = T extends Primitive ? T : T extends Array<infer U> ? Array<Flatten<U>> : T extends Set<infer U> ? Set<Flatten<U>> : T extends Map<infer K, infer V> ? Map<Flatten<K>, Flatten<V>> : T extends object ? { [K in keyof T]: Flatten<T[K]> } : T;
|
|
3826
|
+
type Infer<Schema extends ZodType> = Flatten<output<Schema>>;
|
|
3827
|
+
/**
|
|
3828
|
+
* Headers that are compatible with both Node.js and the browser.
|
|
3829
|
+
*/
|
|
3830
|
+
type IsomorphicHeaders = Record<string, string | string[] | undefined>;
|
|
3831
|
+
/**
|
|
3832
|
+
* Information about the incoming request.
|
|
3833
|
+
*/
|
|
3834
|
+
interface RequestInfo {
|
|
3835
|
+
/**
|
|
3836
|
+
* The headers of the request.
|
|
3837
|
+
*/
|
|
3838
|
+
headers: IsomorphicHeaders;
|
|
3839
|
+
}
|
|
3840
|
+
type Request = Infer<typeof RequestSchema>;
|
|
3841
|
+
type RequestMeta = Infer<typeof RequestMetaSchema>;
|
|
3842
|
+
type Notification = Infer<typeof NotificationSchema>;
|
|
3843
|
+
type Result$1 = Infer<typeof ResultSchema>;
|
|
3844
|
+
type RequestId = Infer<typeof RequestIdSchema>;
|
|
3845
|
+
type Progress = Infer<typeof ProgressSchema>;
|
|
3846
|
+
type Task = Infer<typeof TaskSchema>;
|
|
3847
|
+
type TaskCreationParams = Infer<typeof TaskCreationParamsSchema>;
|
|
3848
|
+
type RelatedTaskMetadata = Infer<typeof RelatedTaskMetadataSchema>;
|
|
3849
|
+
type ToolAnnotations = Infer<typeof ToolAnnotationsSchema>;
|
|
3850
|
+
type CallToolResult = Infer<typeof CallToolResultSchema>;
|
|
3851
|
+
type ServerRequest = Infer<typeof ServerRequestSchema>;
|
|
3852
|
+
type ServerNotification = Infer<typeof ServerNotificationSchema>;
|
|
3853
|
+
//#endregion
|
|
3854
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts
|
|
3855
|
+
/**
|
|
3856
|
+
* Options for sending a JSON-RPC message.
|
|
3857
|
+
*/
|
|
3858
|
+
type TransportSendOptions = {
|
|
3859
|
+
/**
|
|
3860
|
+
* If present, `relatedRequestId` is used to indicate to the transport which incoming request to associate this outgoing message with.
|
|
3861
|
+
*/
|
|
3862
|
+
relatedRequestId?: RequestId;
|
|
3863
|
+
/**
|
|
3864
|
+
* The resumption token used to continue long-running requests that were interrupted.
|
|
3865
|
+
*
|
|
3866
|
+
* This allows clients to reconnect and continue from where they left off, if supported by the transport.
|
|
3867
|
+
*/
|
|
3868
|
+
resumptionToken?: string;
|
|
3869
|
+
/**
|
|
3870
|
+
* A callback that is invoked when the resumption token changes, if supported by the transport.
|
|
3871
|
+
*
|
|
3872
|
+
* This allows clients to persist the latest token for potential reconnection.
|
|
3873
|
+
*/
|
|
3874
|
+
onresumptiontoken?: (token: string) => void;
|
|
3875
|
+
};
|
|
3876
|
+
//#endregion
|
|
3877
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.d.ts
|
|
3878
|
+
/**
|
|
3879
|
+
* Task creation options.
|
|
3880
|
+
* @experimental
|
|
3881
|
+
*/
|
|
3882
|
+
interface CreateTaskOptions {
|
|
3883
|
+
/**
|
|
3884
|
+
* Time in milliseconds to keep task results available after completion.
|
|
3885
|
+
* If null, the task has unlimited lifetime until manually cleaned up.
|
|
3886
|
+
*/
|
|
3887
|
+
ttl?: number | null;
|
|
3888
|
+
/**
|
|
3889
|
+
* Time in milliseconds to wait between task status requests.
|
|
3890
|
+
*/
|
|
3891
|
+
pollInterval?: number;
|
|
3892
|
+
/**
|
|
3893
|
+
* Additional context to pass to the task store.
|
|
3894
|
+
*/
|
|
3895
|
+
context?: Record<string, unknown>;
|
|
3896
|
+
}
|
|
3897
|
+
//#endregion
|
|
3898
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.d.ts
|
|
3899
|
+
/**
|
|
3900
|
+
* Callback for progress notifications.
|
|
3901
|
+
*/
|
|
3902
|
+
type ProgressCallback = (progress: Progress) => void;
|
|
3903
|
+
/**
|
|
3904
|
+
* Options that can be given per request.
|
|
3905
|
+
*/
|
|
3906
|
+
type RequestOptions = {
|
|
3907
|
+
/**
|
|
3908
|
+
* If set, requests progress notifications from the remote end (if supported). When progress notifications are received, this callback will be invoked.
|
|
3909
|
+
*
|
|
3910
|
+
* For task-augmented requests: progress notifications continue after CreateTaskResult is returned and stop automatically when the task reaches a terminal status.
|
|
3911
|
+
*/
|
|
3912
|
+
onprogress?: ProgressCallback;
|
|
3913
|
+
/**
|
|
3914
|
+
* Can be used to cancel an in-flight request. This will cause an AbortError to be raised from request().
|
|
3915
|
+
*/
|
|
3916
|
+
signal?: AbortSignal;
|
|
3917
|
+
/**
|
|
3918
|
+
* A timeout (in milliseconds) for this request. If exceeded, an McpError with code `RequestTimeout` will be raised from request().
|
|
3919
|
+
*
|
|
3920
|
+
* If not specified, `DEFAULT_REQUEST_TIMEOUT_MSEC` will be used as the timeout.
|
|
3921
|
+
*/
|
|
3922
|
+
timeout?: number;
|
|
3923
|
+
/**
|
|
3924
|
+
* If true, receiving a progress notification will reset the request timeout.
|
|
3925
|
+
* This is useful for long-running operations that send periodic progress updates.
|
|
3926
|
+
* Default: false
|
|
3927
|
+
*/
|
|
3928
|
+
resetTimeoutOnProgress?: boolean;
|
|
3929
|
+
/**
|
|
3930
|
+
* Maximum total time (in milliseconds) to wait for a response.
|
|
3931
|
+
* If exceeded, an McpError with code `RequestTimeout` will be raised, regardless of progress notifications.
|
|
3932
|
+
* If not specified, there is no maximum total timeout.
|
|
3933
|
+
*/
|
|
3934
|
+
maxTotalTimeout?: number;
|
|
3935
|
+
/**
|
|
3936
|
+
* If provided, augments the request with task creation parameters to enable call-now, fetch-later execution patterns.
|
|
3937
|
+
*/
|
|
3938
|
+
task?: TaskCreationParams;
|
|
3939
|
+
/**
|
|
3940
|
+
* If provided, associates this request with a related task.
|
|
3941
|
+
*/
|
|
3942
|
+
relatedTask?: RelatedTaskMetadata;
|
|
3943
|
+
} & TransportSendOptions;
|
|
3944
|
+
/**
|
|
3945
|
+
* Options that can be given per request.
|
|
3946
|
+
*/
|
|
3947
|
+
type TaskRequestOptions = Omit<RequestOptions, 'relatedTask'>;
|
|
3948
|
+
/**
|
|
3949
|
+
* Request-scoped TaskStore interface.
|
|
3950
|
+
*/
|
|
3951
|
+
interface RequestTaskStore {
|
|
3952
|
+
/**
|
|
3953
|
+
* Creates a new task with the given creation parameters.
|
|
3954
|
+
* The implementation generates a unique taskId and createdAt timestamp.
|
|
3955
|
+
*
|
|
3956
|
+
* @param taskParams - The task creation parameters from the request
|
|
3957
|
+
* @returns The created task object
|
|
3958
|
+
*/
|
|
3959
|
+
createTask(taskParams: CreateTaskOptions): Promise<Task>;
|
|
3960
|
+
/**
|
|
3961
|
+
* Gets the current status of a task.
|
|
3962
|
+
*
|
|
3963
|
+
* @param taskId - The task identifier
|
|
3964
|
+
* @returns The task object
|
|
3965
|
+
* @throws If the task does not exist
|
|
3966
|
+
*/
|
|
3967
|
+
getTask(taskId: string): Promise<Task>;
|
|
3968
|
+
/**
|
|
3969
|
+
* Stores the result of a task and sets its final status.
|
|
3970
|
+
*
|
|
3971
|
+
* @param taskId - The task identifier
|
|
3972
|
+
* @param status - The final status: 'completed' for success, 'failed' for errors
|
|
3973
|
+
* @param result - The result to store
|
|
3974
|
+
*/
|
|
3975
|
+
storeTaskResult(taskId: string, status: 'completed' | 'failed', result: Result$1): Promise<void>;
|
|
3976
|
+
/**
|
|
3977
|
+
* Retrieves the stored result of a task.
|
|
3978
|
+
*
|
|
3979
|
+
* @param taskId - The task identifier
|
|
3980
|
+
* @returns The stored result
|
|
3981
|
+
*/
|
|
3982
|
+
getTaskResult(taskId: string): Promise<Result$1>;
|
|
3983
|
+
/**
|
|
3984
|
+
* Updates a task's status (e.g., to 'cancelled', 'failed', 'completed').
|
|
3985
|
+
*
|
|
3986
|
+
* @param taskId - The task identifier
|
|
3987
|
+
* @param status - The new status
|
|
3988
|
+
* @param statusMessage - Optional diagnostic message for failed tasks or other status information
|
|
3989
|
+
*/
|
|
3990
|
+
updateTaskStatus(taskId: string, status: Task['status'], statusMessage?: string): Promise<void>;
|
|
3991
|
+
/**
|
|
3992
|
+
* Lists tasks, optionally starting from a pagination cursor.
|
|
3993
|
+
*
|
|
3994
|
+
* @param cursor - Optional cursor for pagination
|
|
3995
|
+
* @returns An object containing the tasks array and an optional nextCursor
|
|
3996
|
+
*/
|
|
3997
|
+
listTasks(cursor?: string): Promise<{
|
|
3998
|
+
tasks: Task[];
|
|
3999
|
+
nextCursor?: string;
|
|
4000
|
+
}>;
|
|
4001
|
+
}
|
|
4002
|
+
/**
|
|
4003
|
+
* Extra data given to request handlers.
|
|
4004
|
+
*/
|
|
4005
|
+
type RequestHandlerExtra<SendRequestT extends Request, SendNotificationT extends Notification> = {
|
|
4006
|
+
/**
|
|
4007
|
+
* An abort signal used to communicate if the request was cancelled from the sender's side.
|
|
4008
|
+
*/
|
|
4009
|
+
signal: AbortSignal;
|
|
4010
|
+
/**
|
|
4011
|
+
* Information about a validated access token, provided to request handlers.
|
|
4012
|
+
*/
|
|
4013
|
+
authInfo?: AuthInfo;
|
|
4014
|
+
/**
|
|
4015
|
+
* The session ID from the transport, if available.
|
|
4016
|
+
*/
|
|
4017
|
+
sessionId?: string;
|
|
4018
|
+
/**
|
|
4019
|
+
* Metadata from the original request.
|
|
4020
|
+
*/
|
|
4021
|
+
_meta?: RequestMeta;
|
|
4022
|
+
/**
|
|
4023
|
+
* The JSON-RPC ID of the request being handled.
|
|
4024
|
+
* This can be useful for tracking or logging purposes.
|
|
4025
|
+
*/
|
|
4026
|
+
requestId: RequestId;
|
|
4027
|
+
taskId?: string;
|
|
4028
|
+
taskStore?: RequestTaskStore;
|
|
4029
|
+
taskRequestedTtl?: number | null;
|
|
4030
|
+
/**
|
|
4031
|
+
* The original HTTP request.
|
|
4032
|
+
*/
|
|
4033
|
+
requestInfo?: RequestInfo;
|
|
4034
|
+
/**
|
|
4035
|
+
* Sends a notification that relates to the current request being handled.
|
|
4036
|
+
*
|
|
4037
|
+
* This is used by certain transports to correctly associate related messages.
|
|
4038
|
+
*/
|
|
4039
|
+
sendNotification: (notification: SendNotificationT) => Promise<void>;
|
|
4040
|
+
/**
|
|
4041
|
+
* Sends a request that relates to the current request being handled.
|
|
4042
|
+
*
|
|
4043
|
+
* This is used by certain transports to correctly associate related messages.
|
|
4044
|
+
*/
|
|
4045
|
+
sendRequest: <U extends AnySchema>(request: SendRequestT, resultSchema: U, options?: TaskRequestOptions) => Promise<SchemaOutput<U>>;
|
|
4046
|
+
/**
|
|
4047
|
+
* Closes the SSE stream for this request, triggering client reconnection.
|
|
4048
|
+
* Only available when using StreamableHTTPServerTransport with eventStore configured.
|
|
4049
|
+
* Use this to implement polling behavior during long-running operations.
|
|
4050
|
+
*/
|
|
4051
|
+
closeSSEStream?: () => void;
|
|
4052
|
+
/**
|
|
4053
|
+
* Closes the standalone GET SSE stream, triggering client reconnection.
|
|
4054
|
+
* Only available when using StreamableHTTPServerTransport with eventStore configured.
|
|
4055
|
+
* Use this to implement polling behavior for server-initiated notifications.
|
|
4056
|
+
*/
|
|
4057
|
+
closeStandaloneSSEStream?: () => void;
|
|
4058
|
+
};
|
|
4059
|
+
//#endregion
|
|
4060
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts
|
|
4061
|
+
type BaseToolCallback<SendResultT extends Result$1, Extra extends RequestHandlerExtra<ServerRequest, ServerNotification>, Args extends undefined | ZodRawShapeCompat | AnySchema> = Args extends ZodRawShapeCompat ? (args: ShapeOutput<Args>, extra: Extra) => SendResultT | Promise<SendResultT> : Args extends AnySchema ? (args: SchemaOutput<Args>, extra: Extra) => SendResultT | Promise<SendResultT> : (extra: Extra) => SendResultT | Promise<SendResultT>;
|
|
4062
|
+
/**
|
|
4063
|
+
* Callback for a tool handler registered with Server.tool().
|
|
4064
|
+
*
|
|
4065
|
+
* Parameters will include tool arguments, if applicable, as well as other request handler context.
|
|
4066
|
+
*
|
|
4067
|
+
* The callback should return:
|
|
4068
|
+
* - `structuredContent` if the tool has an outputSchema defined
|
|
4069
|
+
* - `content` if the tool does not have an outputSchema
|
|
4070
|
+
* - Both fields are optional but typically one should be provided
|
|
4071
|
+
*/
|
|
4072
|
+
type ToolCallback<Args extends undefined | ZodRawShapeCompat | AnySchema = undefined> = BaseToolCallback<CallToolResult, RequestHandlerExtra<ServerRequest, ServerNotification>, Args>;
|
|
4073
|
+
//#endregion
|
|
4074
|
+
//#region src/core/plugin/mcp.d.ts
|
|
4075
|
+
/** @internal */
|
|
4076
|
+
type McpToolRegister = <OutputArgs extends ZodRawShapeCompat | AnySchema, InputArgs extends undefined | ZodRawShapeCompat | AnySchema = undefined>() => ({
|
|
4077
|
+
name: string;
|
|
4078
|
+
config: {
|
|
4079
|
+
title?: string;
|
|
4080
|
+
description?: string;
|
|
4081
|
+
inputSchema?: InputArgs;
|
|
4082
|
+
outputSchema?: OutputArgs;
|
|
4083
|
+
annotations?: ToolAnnotations;
|
|
4084
|
+
_meta?: Record<string, unknown>;
|
|
4085
|
+
};
|
|
4086
|
+
cb: NoInfer<ToolCallback<InputArgs>>;
|
|
4087
|
+
});
|
|
4088
|
+
declare function defineMcpToolRegister<OutputArgs extends ZodRawShapeCompat | AnySchema, InputArgs extends undefined | ZodRawShapeCompat | AnySchema = undefined>(name: string, config: {
|
|
4089
|
+
title?: string;
|
|
4090
|
+
description?: string;
|
|
4091
|
+
inputSchema?: InputArgs;
|
|
4092
|
+
outputSchema?: OutputArgs;
|
|
4093
|
+
annotations?: ToolAnnotations;
|
|
4094
|
+
_meta?: Record<string, unknown>;
|
|
4095
|
+
}, cb: ToolCallback<InputArgs>): () => ({
|
|
4096
|
+
name: string;
|
|
4097
|
+
config: {
|
|
4098
|
+
title?: string;
|
|
4099
|
+
description?: string;
|
|
4100
|
+
inputSchema?: InputArgs;
|
|
4101
|
+
outputSchema?: OutputArgs;
|
|
4102
|
+
annotations?: ToolAnnotations;
|
|
4103
|
+
_meta?: Record<string, unknown>;
|
|
4104
|
+
};
|
|
4105
|
+
cb: ToolCallback<InputArgs>;
|
|
4106
|
+
});
|
|
4107
|
+
//#endregion
|
|
4108
|
+
//#region src/core/plugin/index.d.ts
|
|
4109
|
+
interface DevpilotPluginContext {
|
|
4110
|
+
wsPort: number;
|
|
4111
|
+
}
|
|
4112
|
+
/**
|
|
4113
|
+
* Resolve the module path relative to the plugin to an absolute path
|
|
4114
|
+
* @param importMetaUrl - Pass in import.meta.url
|
|
4115
|
+
* @param relativePath - Path relative to the plugin
|
|
4116
|
+
* @example
|
|
4117
|
+
* ```ts
|
|
4118
|
+
* import { resolveClientModule } from 'unplugin-devpilot'
|
|
4119
|
+
*
|
|
4120
|
+
* export function myPlugin(): DevpilotPlugin {
|
|
4121
|
+
* return {
|
|
4122
|
+
* name: 'my-plugin',
|
|
4123
|
+
* clientModule: resolveClientModule(import.meta.url, './client.mjs'),
|
|
4124
|
+
* }
|
|
4125
|
+
* }
|
|
4126
|
+
* ```
|
|
4127
|
+
*/
|
|
4128
|
+
declare function resolveClientModule(importMetaUrl: string, relativePath: string): string;
|
|
4129
|
+
//#endregion
|
|
4130
|
+
export { defineMcpToolRegister as i, resolveClientModule as n, McpToolRegister as r, DevpilotPluginContext as t };
|