@fanvue/builder-sdk 0.3.0

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