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