@longzai-intelligence-tenant/elysia-in-memory-plugin 0.0.1

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,3138 @@
1
+ import { Result as Result$1 } from "@longzai-intelligence/shared-kernel";
2
+ import { DomainError } from "@longzai-intelligence/error";
3
+ import Elysia from "elysia";
4
+
5
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema.d.cts
6
+ type _JSONSchema = boolean | JSONSchema;
7
+ type JSONSchema = {
8
+ [k: string]: unknown;
9
+ $schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
10
+ $id?: string;
11
+ $anchor?: string;
12
+ $ref?: string;
13
+ $dynamicRef?: string;
14
+ $dynamicAnchor?: string;
15
+ $vocabulary?: Record<string, boolean>;
16
+ $comment?: string;
17
+ $defs?: Record<string, JSONSchema>;
18
+ type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
19
+ additionalItems?: _JSONSchema;
20
+ unevaluatedItems?: _JSONSchema;
21
+ prefixItems?: _JSONSchema[];
22
+ items?: _JSONSchema | _JSONSchema[];
23
+ contains?: _JSONSchema;
24
+ additionalProperties?: _JSONSchema;
25
+ unevaluatedProperties?: _JSONSchema;
26
+ properties?: Record<string, _JSONSchema>;
27
+ patternProperties?: Record<string, _JSONSchema>;
28
+ dependentSchemas?: Record<string, _JSONSchema>;
29
+ propertyNames?: _JSONSchema;
30
+ if?: _JSONSchema;
31
+ then?: _JSONSchema;
32
+ else?: _JSONSchema;
33
+ allOf?: JSONSchema[];
34
+ anyOf?: JSONSchema[];
35
+ oneOf?: JSONSchema[];
36
+ not?: _JSONSchema;
37
+ multipleOf?: number;
38
+ maximum?: number;
39
+ exclusiveMaximum?: number | boolean;
40
+ minimum?: number;
41
+ exclusiveMinimum?: number | boolean;
42
+ maxLength?: number;
43
+ minLength?: number;
44
+ pattern?: string;
45
+ maxItems?: number;
46
+ minItems?: number;
47
+ uniqueItems?: boolean;
48
+ maxContains?: number;
49
+ minContains?: number;
50
+ maxProperties?: number;
51
+ minProperties?: number;
52
+ required?: string[];
53
+ dependentRequired?: Record<string, string[]>;
54
+ enum?: Array<string | number | boolean | null>;
55
+ const?: string | number | boolean | null;
56
+ id?: string;
57
+ title?: string;
58
+ description?: string;
59
+ default?: unknown;
60
+ deprecated?: boolean;
61
+ readOnly?: boolean;
62
+ writeOnly?: boolean;
63
+ nullable?: boolean;
64
+ examples?: unknown[];
65
+ format?: string;
66
+ contentMediaType?: string;
67
+ contentEncoding?: string;
68
+ contentSchema?: JSONSchema;
69
+ _prefault?: unknown;
70
+ };
71
+ type BaseSchema = JSONSchema;
72
+ //#endregion
73
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/standard-schema.d.cts
74
+ /** The Standard interface. */
75
+ interface StandardTypedV1<Input = unknown, Output = Input> {
76
+ /** The Standard properties. */
77
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
78
+ }
79
+ declare namespace StandardTypedV1 {
80
+ /** The Standard properties interface. */
81
+ interface Props<Input = unknown, Output = Input> {
82
+ /** The version number of the standard. */
83
+ readonly version: 1;
84
+ /** The vendor name of the schema library. */
85
+ readonly vendor: string;
86
+ /** Inferred types associated with the schema. */
87
+ readonly types?: Types<Input, Output> | undefined;
88
+ }
89
+ /** The Standard types interface. */
90
+ interface Types<Input = unknown, Output = Input> {
91
+ /** The input type of the schema. */
92
+ readonly input: Input;
93
+ /** The output type of the schema. */
94
+ readonly output: Output;
95
+ }
96
+ /** Infers the input type of a Standard. */
97
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
98
+ /** Infers the output type of a Standard. */
99
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
100
+ }
101
+ /** The Standard Schema interface. */
102
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
103
+ /** The Standard Schema properties. */
104
+ readonly "~standard": StandardSchemaV1.Props<Input, Output>;
105
+ }
106
+ declare namespace StandardSchemaV1 {
107
+ /** The Standard Schema properties interface. */
108
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
109
+ /** Validates unknown input values. */
110
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
111
+ }
112
+ /** The result interface of the validate function. */
113
+ type Result<Output> = SuccessResult<Output> | FailureResult;
114
+ /** The result interface if validation succeeds. */
115
+ interface SuccessResult<Output> {
116
+ /** The typed output value. */
117
+ readonly value: Output;
118
+ /** The absence of issues indicates success. */
119
+ readonly issues?: undefined;
120
+ }
121
+ interface Options {
122
+ /** Implicit support for additional vendor-specific parameters, if needed. */
123
+ readonly libraryOptions?: Record<string, unknown> | undefined;
124
+ }
125
+ /** The result interface if validation fails. */
126
+ interface FailureResult {
127
+ /** The issues of failed validation. */
128
+ readonly issues: ReadonlyArray<Issue>;
129
+ }
130
+ /** The issue interface of the failure output. */
131
+ interface Issue {
132
+ /** The error message of the issue. */
133
+ readonly message: string;
134
+ /** The path of the issue, if any. */
135
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
136
+ }
137
+ /** The path segment interface of the issue. */
138
+ interface PathSegment {
139
+ /** The key representing a path segment. */
140
+ readonly key: PropertyKey;
141
+ }
142
+ /** The Standard types interface. */
143
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
144
+ /** Infers the input type of a Standard. */
145
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
146
+ /** Infers the output type of a Standard. */
147
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
148
+ }
149
+ /** The Standard JSON Schema interface. */
150
+ interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
151
+ /** The Standard JSON Schema properties. */
152
+ readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
153
+ }
154
+ declare namespace StandardJSONSchemaV1 {
155
+ /** The Standard JSON Schema properties interface. */
156
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
157
+ /** Methods for generating the input/output JSON Schema. */
158
+ readonly jsonSchema: Converter;
159
+ }
160
+ /** The Standard JSON Schema converter interface. */
161
+ interface Converter {
162
+ /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
163
+ readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
164
+ /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
165
+ readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
166
+ }
167
+ /** The target version of the generated JSON Schema.
168
+ *
169
+ * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use.
170
+ *
171
+ * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
172
+ *
173
+ * All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
174
+ */
175
+ type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
176
+ /** The options for the input/output methods. */
177
+ interface Options {
178
+ /** 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. */
179
+ readonly target: Target;
180
+ /** Implicit support for additional vendor-specific parameters, if needed. */
181
+ readonly libraryOptions?: Record<string, unknown> | undefined;
182
+ }
183
+ /** The Standard types interface. */
184
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
185
+ /** Infers the input type of a Standard. */
186
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
187
+ /** Infers the output type of a Standard. */
188
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
189
+ }
190
+ interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
191
+ //#endregion
192
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/registries.d.cts
193
+ declare const $output: unique symbol;
194
+ type $output = typeof $output;
195
+ declare const $input: unique symbol;
196
+ type $input = typeof $input;
197
+ 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;
198
+ type MetadataType = object | undefined;
199
+ declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
200
+ _meta: Meta;
201
+ _schema: Schema;
202
+ _map: WeakMap<Schema, $replace<Meta, Schema>>;
203
+ _idmap: Map<string, Schema>;
204
+ add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
205
+ clear(): this;
206
+ remove(schema: Schema): this;
207
+ get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
208
+ has(schema: Schema): boolean;
209
+ }
210
+ interface JSONSchemaMeta {
211
+ id?: string | undefined;
212
+ title?: string | undefined;
213
+ description?: string | undefined;
214
+ deprecated?: boolean | undefined;
215
+ [k: string]: unknown;
216
+ }
217
+ interface GlobalMeta extends JSONSchemaMeta {}
218
+ //#endregion
219
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.d.cts
220
+ type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
221
+ interface JSONSchemaGeneratorParams {
222
+ processors: Record<string, Processor>;
223
+ /** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
224
+ * @default globalRegistry */
225
+ metadata?: $ZodRegistry<Record<string, any>>;
226
+ /** The JSON Schema version to target.
227
+ * - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
228
+ * - `"draft-07"` — JSON Schema Draft 7
229
+ * - `"draft-04"` — JSON Schema Draft 4
230
+ * - `"openapi-3.0"` — OpenAPI 3.0 Schema Object */
231
+ target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
232
+ /** How to handle unrepresentable types.
233
+ * - `"throw"` — Default. Unrepresentable types throw an error
234
+ * - `"any"` — Unrepresentable types become `{}` */
235
+ unrepresentable?: "throw" | "any";
236
+ /** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
237
+ override?: (ctx: {
238
+ zodSchema: $ZodTypes;
239
+ jsonSchema: BaseSchema;
240
+ path: (string | number)[];
241
+ }) => void;
242
+ /** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, defaults, coerced primitives, etc.
243
+ * - `"output"` — Default. Convert the output schema.
244
+ * - `"input"` — Convert the input schema. */
245
+ io?: "input" | "output";
246
+ cycles?: "ref" | "throw";
247
+ reused?: "ref" | "inline";
248
+ external?: {
249
+ registry: $ZodRegistry<{
250
+ id?: string | undefined;
251
+ }>;
252
+ uri?: ((id: string) => string) | undefined;
253
+ defs: Record<string, BaseSchema>;
254
+ } | undefined;
255
+ }
256
+ /**
257
+ * Parameters for the toJSONSchema function.
258
+ */
259
+ type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
260
+ interface ProcessParams {
261
+ schemaPath: $ZodType[];
262
+ path: (string | number)[];
263
+ }
264
+ interface Seen {
265
+ /** JSON Schema result for this Zod schema */
266
+ schema: BaseSchema;
267
+ /** A cached version of the schema that doesn't get overwritten during ref resolution */
268
+ def?: BaseSchema;
269
+ defId?: string | undefined;
270
+ /** Number of times this schema was encountered during traversal */
271
+ count: number;
272
+ /** Cycle path */
273
+ cycle?: (string | number)[] | undefined;
274
+ isParent?: boolean | undefined;
275
+ /** Schema to inherit JSON Schema properties from (set by processor for wrappers) */
276
+ ref?: $ZodType | null;
277
+ /** JSON Schema property path for this schema */
278
+ path?: (string | number)[] | undefined;
279
+ }
280
+ interface ToJSONSchemaContext {
281
+ processors: Record<string, Processor>;
282
+ metadataRegistry: $ZodRegistry<Record<string, any>>;
283
+ target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
284
+ unrepresentable: "throw" | "any";
285
+ override: (ctx: {
286
+ zodSchema: $ZodType;
287
+ jsonSchema: BaseSchema;
288
+ path: (string | number)[];
289
+ }) => void;
290
+ io: "input" | "output";
291
+ counter: number;
292
+ seen: Map<$ZodType, Seen>;
293
+ cycles: "ref" | "throw";
294
+ reused: "ref" | "inline";
295
+ external?: {
296
+ registry: $ZodRegistry<{
297
+ id?: string | undefined;
298
+ }>;
299
+ uri?: ((id: string) => string) | undefined;
300
+ defs: Record<string, BaseSchema>;
301
+ } | undefined;
302
+ }
303
+ type ZodStandardSchemaWithJSON$1<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
304
+ interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
305
+ "~standard": ZodStandardSchemaWithJSON$1<T>;
306
+ }
307
+ //#endregion
308
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/util.d.cts
309
+ type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
310
+ 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 & {});
311
+ type IsAny<T> = 0 extends 1 & T ? true : false;
312
+ type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
313
+ type MakePartial<T, K extends keyof T> = Omit$1<T, K> & InexactPartial<Pick<T, K>>;
314
+ type NoUndefined<T> = T extends undefined ? never : T;
315
+ type LoosePartial<T extends object> = InexactPartial<T> & {
316
+ [k: string]: unknown;
317
+ };
318
+ type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
319
+ type Writeable<T> = { -readonly [P in keyof T]: T[P] } & {};
320
+ type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined };
321
+ type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
322
+ readonly [Symbol.toStringTag]: string;
323
+ } | Date | Error | Generator | Promise<unknown> | RegExp;
324
+ 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>;
325
+ type SomeObject = Record<PropertyKey, any>;
326
+ type Identity<T> = T;
327
+ type Flatten<T> = Identity<{ [k in keyof T]: T[k] }>;
328
+ type Prettify<T> = { [K in keyof T]: T[K] } & {};
329
+ 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] }>;
330
+ type TupleItems = ReadonlyArray<SomeType>;
331
+ type AnyFunc = (...args: any[]) => any;
332
+ type MaybeAsync<T> = T | Promise<T>;
333
+ type EnumValue = string | number;
334
+ type EnumLike = Readonly<Record<string, EnumValue>>;
335
+ type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k }>;
336
+ type Literal = string | number | bigint | boolean | null | undefined;
337
+ type Primitive = string | number | symbol | bigint | boolean | null | undefined;
338
+ type HasLength = {
339
+ length: number;
340
+ };
341
+ type Numeric = number | bigint | Date;
342
+ type PropValues = Record<string, Set<Primitive>>;
343
+ type PrimitiveSet = Set<Primitive>;
344
+ type EmptyToNever<T> = keyof T extends never ? never : T;
345
+ declare abstract class Class {
346
+ constructor(..._args: any[]);
347
+ }
348
+ //#endregion
349
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/versions.d.cts
350
+ declare const version: {
351
+ readonly major: 4;
352
+ readonly minor: 4;
353
+ readonly patch: number;
354
+ };
355
+ //#endregion
356
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/schemas.d.cts
357
+ interface ParseContext<T extends $ZodIssueBase = never> {
358
+ /** Customize error messages. */
359
+ readonly error?: $ZodErrorMap<T>;
360
+ /** Include the `input` field in issue objects. Default `false`. */
361
+ readonly reportInput?: boolean;
362
+ /** Skip eval-based fast path. Default `false`. */
363
+ readonly jitless?: boolean;
364
+ }
365
+ /** @internal */
366
+ interface ParseContextInternal<T extends $ZodIssueBase = never> extends ParseContext<T> {
367
+ readonly async?: boolean | undefined;
368
+ readonly direction?: "forward" | "backward";
369
+ readonly skipChecks?: boolean;
370
+ }
371
+ interface ParsePayload<T = unknown> {
372
+ value: T;
373
+ issues: $ZodRawIssue[];
374
+ /** A way to mark a whole payload as aborted. Used in codecs/pipes. */
375
+ aborted?: boolean;
376
+ /** @internal Marks a value as a fallback that an outer wrapper (e.g.
377
+ * $ZodOptional) may override with its own interpretation when input was
378
+ * undefined. Set by $ZodCatch when catchValue substitutes and by every
379
+ * $ZodTransform invocation. */
380
+ fallback?: boolean | undefined;
381
+ }
382
+ type CheckFn<T> = (input: ParsePayload<T>) => MaybeAsync<void>;
383
+ interface $ZodTypeDef {
384
+ 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";
385
+ error?: $ZodErrorMap<never> | undefined;
386
+ checks?: $ZodCheck<never>[];
387
+ }
388
+ interface _$ZodTypeInternals {
389
+ /** The `@zod/core` version of this schema */
390
+ version: typeof version;
391
+ /** Schema definition. */
392
+ def: $ZodTypeDef;
393
+ /** @internal Randomly generated ID for this schema. */
394
+ /** @internal List of deferred initializers. */
395
+ deferred: AnyFunc[] | undefined;
396
+ /** @internal Parses input and runs all checks (refinements). */
397
+ run(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
398
+ /** @internal Parses input, doesn't run checks. */
399
+ parse(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
400
+ /** @internal Stores identifiers for the set of traits implemented by this schema. */
401
+ traits: Set<string>;
402
+ /** @internal Indicates that a schema output type should be considered optional inside objects.
403
+ * @default Required
404
+ */
405
+ /** @internal */
406
+ optin?: "optional" | undefined;
407
+ /** @internal */
408
+ optout?: "optional" | undefined;
409
+ /** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
410
+ *
411
+ * Defined on: enum, const, literal, null, undefined
412
+ * Passthrough: optional, nullable, branded, default, catch, pipe
413
+ * Todo: unions?
414
+ */
415
+ values?: PrimitiveSet | undefined;
416
+ /** Default value bubbled up from */
417
+ /** @internal A set of literal discriminators used for the fast path in discriminated unions. */
418
+ propValues?: PropValues | undefined;
419
+ /** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
420
+ pattern: RegExp | undefined;
421
+ /** @internal The constructor function of this schema. */
422
+ constr: new (def: any) => $ZodType;
423
+ /** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
424
+ bag: Record<string, unknown>;
425
+ /** @internal The set of issues this schema might throw during type checking. */
426
+ isst: $ZodIssueBase;
427
+ /** @internal Subject to change, not a public API. */
428
+ processJSONSchema?: ((ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void) | undefined;
429
+ /** An optional method used to override `toJSONSchema` logic. */
430
+ toJSONSchema?: () => unknown;
431
+ /** @internal The parent of this schema. Only set during certain clone operations. */
432
+ parent?: $ZodType | undefined;
433
+ }
434
+ /** @internal */
435
+ interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
436
+ /** @internal The inferred output type */
437
+ output: O;
438
+ /** @internal The inferred input type */
439
+ input: I;
440
+ }
441
+ type $ZodStandardSchema<T> = StandardSchemaV1.Props<input<T>, output<T>>;
442
+ type SomeType = {
443
+ _zod: _$ZodTypeInternals;
444
+ };
445
+ interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
446
+ _zod: Internals;
447
+ "~standard": $ZodStandardSchema<this>;
448
+ }
449
+ interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T["output"], T["input"], T> {}
450
+ declare const $ZodType: $constructor<$ZodType>;
451
+ interface $ZodStringDef extends $ZodTypeDef {
452
+ type: "string";
453
+ coerce?: boolean;
454
+ checks?: $ZodCheck<string>[];
455
+ }
456
+ interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
457
+ def: $ZodStringDef;
458
+ /** @deprecated Internal API, use with caution (not deprecated) */
459
+ pattern: RegExp;
460
+ /** @deprecated Internal API, use with caution (not deprecated) */
461
+ isst: $ZodIssueInvalidType;
462
+ bag: LoosePartial<{
463
+ minimum: number;
464
+ maximum: number;
465
+ patterns: Set<RegExp>;
466
+ format: string;
467
+ contentEncoding: string;
468
+ }>;
469
+ }
470
+ interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {}
471
+ declare const $ZodString: $constructor<$ZodString>;
472
+ interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, $ZodCheckStringFormatDef<Format> {}
473
+ interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, $ZodCheckStringFormatInternals {
474
+ def: $ZodStringFormatDef<Format>;
475
+ }
476
+ interface $ZodStringFormat<Format extends string = string> extends $ZodType {
477
+ _zod: $ZodStringFormatInternals<Format>;
478
+ }
479
+ declare const $ZodStringFormat: $constructor<$ZodStringFormat>;
480
+ interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {}
481
+ interface $ZodGUID extends $ZodType {
482
+ _zod: $ZodGUIDInternals;
483
+ }
484
+ declare const $ZodGUID: $constructor<$ZodGUID>;
485
+ interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
486
+ version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
487
+ }
488
+ interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
489
+ def: $ZodUUIDDef;
490
+ }
491
+ interface $ZodUUID extends $ZodType {
492
+ _zod: $ZodUUIDInternals;
493
+ }
494
+ declare const $ZodUUID: $constructor<$ZodUUID>;
495
+ interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {}
496
+ interface $ZodEmail extends $ZodType {
497
+ _zod: $ZodEmailInternals;
498
+ }
499
+ declare const $ZodEmail: $constructor<$ZodEmail>;
500
+ interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
501
+ hostname?: RegExp | undefined;
502
+ protocol?: RegExp | undefined;
503
+ normalize?: boolean | undefined;
504
+ }
505
+ interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
506
+ def: $ZodURLDef;
507
+ }
508
+ interface $ZodURL extends $ZodType {
509
+ _zod: $ZodURLInternals;
510
+ }
511
+ declare const $ZodURL: $constructor<$ZodURL>;
512
+ interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {}
513
+ interface $ZodEmoji extends $ZodType {
514
+ _zod: $ZodEmojiInternals;
515
+ }
516
+ declare const $ZodEmoji: $constructor<$ZodEmoji>;
517
+ interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {}
518
+ interface $ZodNanoID extends $ZodType {
519
+ _zod: $ZodNanoIDInternals;
520
+ }
521
+ declare const $ZodNanoID: $constructor<$ZodNanoID>;
522
+ /**
523
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
524
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
525
+ * See https://github.com/paralleldrive/cuid.
526
+ */
527
+ interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
528
+ /**
529
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
530
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
531
+ * See https://github.com/paralleldrive/cuid.
532
+ */
533
+ interface $ZodCUID extends $ZodType {
534
+ _zod: $ZodCUIDInternals;
535
+ }
536
+ /**
537
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
538
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
539
+ * See https://github.com/paralleldrive/cuid.
540
+ */
541
+ declare const $ZodCUID: $constructor<$ZodCUID>;
542
+ interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
543
+ interface $ZodCUID2 extends $ZodType {
544
+ _zod: $ZodCUID2Internals;
545
+ }
546
+ declare const $ZodCUID2: $constructor<$ZodCUID2>;
547
+ interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {}
548
+ interface $ZodULID extends $ZodType {
549
+ _zod: $ZodULIDInternals;
550
+ }
551
+ declare const $ZodULID: $constructor<$ZodULID>;
552
+ interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {}
553
+ interface $ZodXID extends $ZodType {
554
+ _zod: $ZodXIDInternals;
555
+ }
556
+ declare const $ZodXID: $constructor<$ZodXID>;
557
+ interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {}
558
+ interface $ZodKSUID extends $ZodType {
559
+ _zod: $ZodKSUIDInternals;
560
+ }
561
+ declare const $ZodKSUID: $constructor<$ZodKSUID>;
562
+ interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
563
+ precision: number | null;
564
+ offset: boolean;
565
+ local: boolean;
566
+ }
567
+ interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
568
+ def: $ZodISODateTimeDef;
569
+ }
570
+ interface $ZodISODateTime extends $ZodType {
571
+ _zod: $ZodISODateTimeInternals;
572
+ }
573
+ declare const $ZodISODateTime: $constructor<$ZodISODateTime>;
574
+ interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {}
575
+ interface $ZodISODate extends $ZodType {
576
+ _zod: $ZodISODateInternals;
577
+ }
578
+ declare const $ZodISODate: $constructor<$ZodISODate>;
579
+ interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
580
+ precision?: number | null;
581
+ }
582
+ interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
583
+ def: $ZodISOTimeDef;
584
+ }
585
+ interface $ZodISOTime extends $ZodType {
586
+ _zod: $ZodISOTimeInternals;
587
+ }
588
+ declare const $ZodISOTime: $constructor<$ZodISOTime>;
589
+ interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {}
590
+ interface $ZodISODuration extends $ZodType {
591
+ _zod: $ZodISODurationInternals;
592
+ }
593
+ declare const $ZodISODuration: $constructor<$ZodISODuration>;
594
+ interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
595
+ version?: "v4";
596
+ }
597
+ interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
598
+ def: $ZodIPv4Def;
599
+ }
600
+ interface $ZodIPv4 extends $ZodType {
601
+ _zod: $ZodIPv4Internals;
602
+ }
603
+ declare const $ZodIPv4: $constructor<$ZodIPv4>;
604
+ interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
605
+ version?: "v6";
606
+ }
607
+ interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
608
+ def: $ZodIPv6Def;
609
+ }
610
+ interface $ZodIPv6 extends $ZodType {
611
+ _zod: $ZodIPv6Internals;
612
+ }
613
+ declare const $ZodIPv6: $constructor<$ZodIPv6>;
614
+ interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
615
+ version?: "v4";
616
+ }
617
+ interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
618
+ def: $ZodCIDRv4Def;
619
+ }
620
+ interface $ZodCIDRv4 extends $ZodType {
621
+ _zod: $ZodCIDRv4Internals;
622
+ }
623
+ declare const $ZodCIDRv4: $constructor<$ZodCIDRv4>;
624
+ interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
625
+ version?: "v6";
626
+ }
627
+ interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
628
+ def: $ZodCIDRv6Def;
629
+ }
630
+ interface $ZodCIDRv6 extends $ZodType {
631
+ _zod: $ZodCIDRv6Internals;
632
+ }
633
+ declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>;
634
+ interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {}
635
+ interface $ZodBase64 extends $ZodType {
636
+ _zod: $ZodBase64Internals;
637
+ }
638
+ declare const $ZodBase64: $constructor<$ZodBase64>;
639
+ interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {}
640
+ interface $ZodBase64URL extends $ZodType {
641
+ _zod: $ZodBase64URLInternals;
642
+ }
643
+ declare const $ZodBase64URL: $constructor<$ZodBase64URL>;
644
+ interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {}
645
+ interface $ZodE164 extends $ZodType {
646
+ _zod: $ZodE164Internals;
647
+ }
648
+ declare const $ZodE164: $constructor<$ZodE164>;
649
+ interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
650
+ alg?: JWTAlgorithm | undefined;
651
+ }
652
+ interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
653
+ def: $ZodJWTDef;
654
+ }
655
+ interface $ZodJWT extends $ZodType {
656
+ _zod: $ZodJWTInternals;
657
+ }
658
+ declare const $ZodJWT: $constructor<$ZodJWT>;
659
+ interface $ZodNumberDef extends $ZodTypeDef {
660
+ type: "number";
661
+ coerce?: boolean;
662
+ }
663
+ interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
664
+ def: $ZodNumberDef;
665
+ /** @deprecated Internal API, use with caution (not deprecated) */
666
+ pattern: RegExp;
667
+ /** @deprecated Internal API, use with caution (not deprecated) */
668
+ isst: $ZodIssueInvalidType;
669
+ bag: LoosePartial<{
670
+ minimum: number;
671
+ maximum: number;
672
+ exclusiveMinimum: number;
673
+ exclusiveMaximum: number;
674
+ format: string;
675
+ pattern: RegExp;
676
+ }>;
677
+ }
678
+ interface $ZodNumber<Input = unknown> extends $ZodType {
679
+ _zod: $ZodNumberInternals<Input>;
680
+ }
681
+ declare const $ZodNumber: $constructor<$ZodNumber>;
682
+ interface $ZodBooleanDef extends $ZodTypeDef {
683
+ type: "boolean";
684
+ coerce?: boolean;
685
+ checks?: $ZodCheck<boolean>[];
686
+ }
687
+ interface $ZodBooleanInternals<T = unknown> extends $ZodTypeInternals<boolean, T> {
688
+ pattern: RegExp;
689
+ def: $ZodBooleanDef;
690
+ isst: $ZodIssueInvalidType;
691
+ }
692
+ interface $ZodBoolean<T = unknown> extends $ZodType {
693
+ _zod: $ZodBooleanInternals<T>;
694
+ }
695
+ declare const $ZodBoolean: $constructor<$ZodBoolean>;
696
+ interface $ZodBigIntDef extends $ZodTypeDef {
697
+ type: "bigint";
698
+ coerce?: boolean;
699
+ }
700
+ interface $ZodBigIntInternals<T = unknown> extends $ZodTypeInternals<bigint, T> {
701
+ pattern: RegExp;
702
+ /** @internal Internal API, use with caution */
703
+ def: $ZodBigIntDef;
704
+ isst: $ZodIssueInvalidType;
705
+ bag: LoosePartial<{
706
+ minimum: bigint;
707
+ maximum: bigint;
708
+ format: string;
709
+ }>;
710
+ }
711
+ interface $ZodBigInt<T = unknown> extends $ZodType {
712
+ _zod: $ZodBigIntInternals<T>;
713
+ }
714
+ declare const $ZodBigInt: $constructor<$ZodBigInt>;
715
+ interface $ZodSymbolDef extends $ZodTypeDef {
716
+ type: "symbol";
717
+ }
718
+ interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
719
+ def: $ZodSymbolDef;
720
+ isst: $ZodIssueInvalidType;
721
+ }
722
+ interface $ZodSymbol extends $ZodType {
723
+ _zod: $ZodSymbolInternals;
724
+ }
725
+ declare const $ZodSymbol: $constructor<$ZodSymbol>;
726
+ interface $ZodUndefinedDef extends $ZodTypeDef {
727
+ type: "undefined";
728
+ }
729
+ interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
730
+ pattern: RegExp;
731
+ def: $ZodUndefinedDef;
732
+ values: PrimitiveSet;
733
+ isst: $ZodIssueInvalidType;
734
+ }
735
+ interface $ZodUndefined extends $ZodType {
736
+ _zod: $ZodUndefinedInternals;
737
+ }
738
+ declare const $ZodUndefined: $constructor<$ZodUndefined>;
739
+ interface $ZodNullDef extends $ZodTypeDef {
740
+ type: "null";
741
+ }
742
+ interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
743
+ pattern: RegExp;
744
+ def: $ZodNullDef;
745
+ values: PrimitiveSet;
746
+ isst: $ZodIssueInvalidType;
747
+ }
748
+ interface $ZodNull extends $ZodType {
749
+ _zod: $ZodNullInternals;
750
+ }
751
+ declare const $ZodNull: $constructor<$ZodNull>;
752
+ interface $ZodAnyDef extends $ZodTypeDef {
753
+ type: "any";
754
+ }
755
+ interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
756
+ def: $ZodAnyDef;
757
+ isst: never;
758
+ }
759
+ interface $ZodAny extends $ZodType {
760
+ _zod: $ZodAnyInternals;
761
+ }
762
+ declare const $ZodAny: $constructor<$ZodAny>;
763
+ interface $ZodUnknownDef extends $ZodTypeDef {
764
+ type: "unknown";
765
+ }
766
+ interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
767
+ def: $ZodUnknownDef;
768
+ isst: never;
769
+ }
770
+ interface $ZodUnknown extends $ZodType {
771
+ _zod: $ZodUnknownInternals;
772
+ }
773
+ declare const $ZodUnknown: $constructor<$ZodUnknown>;
774
+ interface $ZodNeverDef extends $ZodTypeDef {
775
+ type: "never";
776
+ }
777
+ interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
778
+ def: $ZodNeverDef;
779
+ isst: $ZodIssueInvalidType;
780
+ }
781
+ interface $ZodNever extends $ZodType {
782
+ _zod: $ZodNeverInternals;
783
+ }
784
+ declare const $ZodNever: $constructor<$ZodNever>;
785
+ interface $ZodVoidDef extends $ZodTypeDef {
786
+ type: "void";
787
+ }
788
+ interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
789
+ def: $ZodVoidDef;
790
+ isst: $ZodIssueInvalidType;
791
+ }
792
+ interface $ZodVoid extends $ZodType {
793
+ _zod: $ZodVoidInternals;
794
+ }
795
+ declare const $ZodVoid: $constructor<$ZodVoid>;
796
+ interface $ZodDateDef extends $ZodTypeDef {
797
+ type: "date";
798
+ coerce?: boolean;
799
+ }
800
+ interface $ZodDateInternals<T = unknown> extends $ZodTypeInternals<Date, T> {
801
+ def: $ZodDateDef;
802
+ isst: $ZodIssueInvalidType;
803
+ bag: LoosePartial<{
804
+ minimum: Date;
805
+ maximum: Date;
806
+ format: string;
807
+ }>;
808
+ }
809
+ interface $ZodDate<T = unknown> extends $ZodType {
810
+ _zod: $ZodDateInternals<T>;
811
+ }
812
+ declare const $ZodDate: $constructor<$ZodDate>;
813
+ interface $ZodArrayDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
814
+ type: "array";
815
+ element: T;
816
+ }
817
+ interface $ZodArrayInternals<T extends SomeType = $ZodType> extends _$ZodTypeInternals {
818
+ def: $ZodArrayDef<T>;
819
+ isst: $ZodIssueInvalidType;
820
+ output: output<T>[];
821
+ input: input<T>[];
822
+ }
823
+ interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {}
824
+ declare const $ZodArray: $constructor<$ZodArray>;
825
+ type OptionalOutSchema = {
826
+ _zod: {
827
+ optout: "optional";
828
+ };
829
+ };
830
+ type OptionalInSchema = {
831
+ _zod: {
832
+ optin: "optional";
833
+ };
834
+ };
835
+ 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>;
836
+ 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>;
837
+ type $ZodObjectConfig = {
838
+ out: Record<string, unknown>;
839
+ in: Record<string, unknown>;
840
+ };
841
+ type $loose = {
842
+ out: Record<string, unknown>;
843
+ in: Record<string, unknown>;
844
+ };
845
+ type $strict = {
846
+ out: {};
847
+ in: {};
848
+ };
849
+ type $strip = {
850
+ out: {};
851
+ in: {};
852
+ };
853
+ type $catchall<T extends SomeType> = {
854
+ out: {
855
+ [k: string]: output<T>;
856
+ };
857
+ in: {
858
+ [k: string]: input<T>;
859
+ };
860
+ };
861
+ type $ZodShape = Readonly<{
862
+ [k: string]: $ZodType;
863
+ }>;
864
+ interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
865
+ type: "object";
866
+ shape: Shape;
867
+ catchall?: $ZodType | undefined;
868
+ }
869
+ interface $ZodObjectInternals< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
870
+ def: $ZodObjectDef<Shape>;
871
+ config: Config;
872
+ isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
873
+ propValues: PropValues;
874
+ output: $InferObjectOutput<Shape, Config["out"]>;
875
+ input: $InferObjectInput<Shape, Config["in"]>;
876
+ optin?: "optional" | undefined;
877
+ optout?: "optional" | undefined;
878
+ }
879
+ type $ZodLooseShape = Record<string, any>;
880
+ 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>> {}
881
+ declare const $ZodObject: $constructor<$ZodObject>;
882
+ type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
883
+ type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
884
+ interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
885
+ type: "union";
886
+ options: Options;
887
+ inclusive?: boolean;
888
+ }
889
+ type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
890
+ type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
891
+ interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends _$ZodTypeInternals {
892
+ def: $ZodUnionDef<T>;
893
+ isst: $ZodIssueInvalidUnion;
894
+ pattern: T[number]["_zod"]["pattern"];
895
+ values: T[number]["_zod"]["values"];
896
+ output: $InferUnionOutput<T[number]>;
897
+ input: $InferUnionInput<T[number]>;
898
+ optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
899
+ optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
900
+ }
901
+ interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodUnionInternals<T>> {
902
+ _zod: $ZodUnionInternals<T>;
903
+ }
904
+ declare const $ZodUnion: $constructor<$ZodUnion>;
905
+ interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
906
+ type: "intersection";
907
+ left: Left;
908
+ right: Right;
909
+ }
910
+ interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
911
+ def: $ZodIntersectionDef<A, B>;
912
+ isst: never;
913
+ optin: A["_zod"]["optin"] | B["_zod"]["optin"];
914
+ optout: A["_zod"]["optout"] | B["_zod"]["optout"];
915
+ output: output<A> & output<B>;
916
+ input: input<A> & input<B>;
917
+ }
918
+ interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
919
+ _zod: $ZodIntersectionInternals<A, B>;
920
+ }
921
+ declare const $ZodIntersection: $constructor<$ZodIntersection>;
922
+ interface $ZodTupleDef<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
923
+ type: "tuple";
924
+ items: T;
925
+ rest: Rest;
926
+ }
927
+ type $InferTupleInputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleInputTypeWithOptionals<T>, ...(Rest extends SomeType ? input<Rest>[] : [])];
928
+ type TupleInputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: input<T[k]> };
929
+ 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> : [];
930
+ type $InferTupleOutputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleOutputTypeWithOptionals<T>, ...(Rest extends SomeType ? output<Rest>[] : [])];
931
+ type TupleOutputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: output<T[k]> };
932
+ 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> : [];
933
+ interface $ZodTupleInternals<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends _$ZodTypeInternals {
934
+ def: $ZodTupleDef<T, Rest>;
935
+ isst: $ZodIssueInvalidType | $ZodIssueTooBig<unknown[]> | $ZodIssueTooSmall<unknown[]>;
936
+ output: $InferTupleOutputType<T, Rest>;
937
+ input: $InferTupleInputType<T, Rest>;
938
+ }
939
+ interface $ZodTuple<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodType {
940
+ _zod: $ZodTupleInternals<T, Rest>;
941
+ }
942
+ declare const $ZodTuple: $constructor<$ZodTuple>;
943
+ type $ZodRecordKey = $ZodType<string | number | symbol, unknown>;
944
+ interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
945
+ type: "record";
946
+ keyType: Key;
947
+ valueType: Value;
948
+ /** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
949
+ mode?: "strict" | "loose";
950
+ }
951
+ type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<output<Key>, output<Value>>> : Record<output<Key>, output<Value>>;
952
+ 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>>;
953
+ interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
954
+ def: $ZodRecordDef<Key, Value>;
955
+ isst: $ZodIssueInvalidType | $ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
956
+ optin?: "optional" | undefined;
957
+ optout?: "optional" | undefined;
958
+ }
959
+ type $partial = {
960
+ "~~partial": true;
961
+ };
962
+ interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodType {
963
+ _zod: $ZodRecordInternals<Key, Value>;
964
+ }
965
+ declare const $ZodRecord: $constructor<$ZodRecord>;
966
+ interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
967
+ type: "map";
968
+ keyType: Key;
969
+ valueType: Value;
970
+ }
971
+ interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key>, output<Value>>, Map<input<Key>, input<Value>>> {
972
+ def: $ZodMapDef<Key, Value>;
973
+ isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement<unknown>;
974
+ optin?: "optional" | undefined;
975
+ optout?: "optional" | undefined;
976
+ }
977
+ interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
978
+ _zod: $ZodMapInternals<Key, Value>;
979
+ }
980
+ declare const $ZodMap: $constructor<$ZodMap>;
981
+ interface $ZodSetDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
982
+ type: "set";
983
+ valueType: T;
984
+ }
985
+ interface $ZodSetInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T>>, Set<input<T>>> {
986
+ def: $ZodSetDef<T>;
987
+ isst: $ZodIssueInvalidType;
988
+ optin?: "optional" | undefined;
989
+ optout?: "optional" | undefined;
990
+ }
991
+ interface $ZodSet<T extends SomeType = $ZodType> extends $ZodType {
992
+ _zod: $ZodSetInternals<T>;
993
+ }
994
+ declare const $ZodSet: $constructor<$ZodSet>;
995
+ type $InferEnumOutput<T extends EnumLike> = T[keyof T] & {};
996
+ type $InferEnumInput<T extends EnumLike> = T[keyof T] & {};
997
+ interface $ZodEnumDef<T extends EnumLike = EnumLike> extends $ZodTypeDef {
998
+ type: "enum";
999
+ entries: T;
1000
+ }
1001
+ interface $ZodEnumInternals< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
1002
+ def: $ZodEnumDef<T>;
1003
+ /** @deprecated Internal API, use with caution (not deprecated) */
1004
+ values: PrimitiveSet;
1005
+ /** @deprecated Internal API, use with caution (not deprecated) */
1006
+ pattern: RegExp;
1007
+ isst: $ZodIssueInvalidValue;
1008
+ }
1009
+ interface $ZodEnum<T extends EnumLike = EnumLike> extends $ZodType {
1010
+ _zod: $ZodEnumInternals<T>;
1011
+ }
1012
+ declare const $ZodEnum: $constructor<$ZodEnum>;
1013
+ interface $ZodLiteralDef<T extends Literal> extends $ZodTypeDef {
1014
+ type: "literal";
1015
+ values: T[];
1016
+ }
1017
+ interface $ZodLiteralInternals<T extends Literal = Literal> extends $ZodTypeInternals<T, T> {
1018
+ def: $ZodLiteralDef<T>;
1019
+ values: Set<T>;
1020
+ pattern: RegExp;
1021
+ isst: $ZodIssueInvalidValue;
1022
+ }
1023
+ interface $ZodLiteral<T extends Literal = Literal> extends $ZodType {
1024
+ _zod: $ZodLiteralInternals<T>;
1025
+ }
1026
+ declare const $ZodLiteral: $constructor<$ZodLiteral>;
1027
+ type _File = typeof globalThis extends {
1028
+ File: infer F extends new (...args: any[]) => any;
1029
+ } ? InstanceType<F> : {};
1030
+ /** Do not reference this directly. */
1031
+ interface File extends _File {
1032
+ readonly type: string;
1033
+ readonly size: number;
1034
+ }
1035
+ interface $ZodFileDef extends $ZodTypeDef {
1036
+ type: "file";
1037
+ }
1038
+ interface $ZodFileInternals extends $ZodTypeInternals<File, File> {
1039
+ def: $ZodFileDef;
1040
+ isst: $ZodIssueInvalidType;
1041
+ bag: LoosePartial<{
1042
+ minimum: number;
1043
+ maximum: number;
1044
+ mime: MimeTypes[];
1045
+ }>;
1046
+ }
1047
+ interface $ZodFile extends $ZodType {
1048
+ _zod: $ZodFileInternals;
1049
+ }
1050
+ declare const $ZodFile: $constructor<$ZodFile>;
1051
+ interface $ZodTransformDef extends $ZodTypeDef {
1052
+ type: "transform";
1053
+ transform: (input: unknown, payload: ParsePayload<unknown>) => MaybeAsync<unknown>;
1054
+ }
1055
+ interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
1056
+ def: $ZodTransformDef;
1057
+ isst: never;
1058
+ }
1059
+ interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
1060
+ _zod: $ZodTransformInternals<O, I>;
1061
+ }
1062
+ declare const $ZodTransform: $constructor<$ZodTransform>;
1063
+ interface $ZodOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1064
+ type: "optional";
1065
+ innerType: T;
1066
+ }
1067
+ interface $ZodOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | undefined, input<T> | undefined> {
1068
+ def: $ZodOptionalDef<T>;
1069
+ optin: "optional";
1070
+ optout: "optional";
1071
+ isst: never;
1072
+ values: T["_zod"]["values"];
1073
+ pattern: T["_zod"]["pattern"];
1074
+ }
1075
+ interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
1076
+ _zod: $ZodOptionalInternals<T>;
1077
+ }
1078
+ declare const $ZodOptional: $constructor<$ZodOptional>;
1079
+ interface $ZodExactOptionalDef<T extends SomeType = $ZodType> extends $ZodOptionalDef<T> {}
1080
+ interface $ZodExactOptionalInternals<T extends SomeType = $ZodType> extends $ZodOptionalInternals<T> {
1081
+ def: $ZodExactOptionalDef<T>;
1082
+ output: output<T>;
1083
+ input: input<T>;
1084
+ }
1085
+ interface $ZodExactOptional<T extends SomeType = $ZodType> extends $ZodType {
1086
+ _zod: $ZodExactOptionalInternals<T>;
1087
+ }
1088
+ declare const $ZodExactOptional: $constructor<$ZodExactOptional>;
1089
+ interface $ZodNullableDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1090
+ type: "nullable";
1091
+ innerType: T;
1092
+ }
1093
+ interface $ZodNullableInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T> | null, input<T> | null> {
1094
+ def: $ZodNullableDef<T>;
1095
+ optin: T["_zod"]["optin"];
1096
+ optout: T["_zod"]["optout"];
1097
+ isst: never;
1098
+ values: T["_zod"]["values"];
1099
+ pattern: T["_zod"]["pattern"];
1100
+ }
1101
+ interface $ZodNullable<T extends SomeType = $ZodType> extends $ZodType {
1102
+ _zod: $ZodNullableInternals<T>;
1103
+ }
1104
+ declare const $ZodNullable: $constructor<$ZodNullable>;
1105
+ interface $ZodDefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1106
+ type: "default";
1107
+ innerType: T;
1108
+ /** The default value. May be a getter. */
1109
+ defaultValue: NoUndefined<output<T>>;
1110
+ }
1111
+ interface $ZodDefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
1112
+ def: $ZodDefaultDef<T>;
1113
+ optin: "optional";
1114
+ optout?: "optional" | undefined;
1115
+ isst: never;
1116
+ values: T["_zod"]["values"];
1117
+ }
1118
+ interface $ZodDefault<T extends SomeType = $ZodType> extends $ZodType {
1119
+ _zod: $ZodDefaultInternals<T>;
1120
+ }
1121
+ declare const $ZodDefault: $constructor<$ZodDefault>;
1122
+ interface $ZodPrefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1123
+ type: "prefault";
1124
+ innerType: T;
1125
+ /** The default value. May be a getter. */
1126
+ defaultValue: input<T>;
1127
+ }
1128
+ interface $ZodPrefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, input<T> | undefined> {
1129
+ def: $ZodPrefaultDef<T>;
1130
+ optin: "optional";
1131
+ optout?: "optional" | undefined;
1132
+ isst: never;
1133
+ values: T["_zod"]["values"];
1134
+ }
1135
+ interface $ZodPrefault<T extends SomeType = $ZodType> extends $ZodType {
1136
+ _zod: $ZodPrefaultInternals<T>;
1137
+ }
1138
+ declare const $ZodPrefault: $constructor<$ZodPrefault>;
1139
+ interface $ZodNonOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1140
+ type: "nonoptional";
1141
+ innerType: T;
1142
+ }
1143
+ interface $ZodNonOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T>>, NoUndefined<input<T>>> {
1144
+ def: $ZodNonOptionalDef<T>;
1145
+ isst: $ZodIssueInvalidType;
1146
+ values: T["_zod"]["values"];
1147
+ optin: "optional" | undefined;
1148
+ optout: "optional" | undefined;
1149
+ }
1150
+ interface $ZodNonOptional<T extends SomeType = $ZodType> extends $ZodType {
1151
+ _zod: $ZodNonOptionalInternals<T>;
1152
+ }
1153
+ declare const $ZodNonOptional: $constructor<$ZodNonOptional>;
1154
+ interface $ZodSuccessDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1155
+ type: "success";
1156
+ innerType: T;
1157
+ }
1158
+ interface $ZodSuccessInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input<T>> {
1159
+ def: $ZodSuccessDef<T>;
1160
+ isst: never;
1161
+ optin: T["_zod"]["optin"];
1162
+ optout: "optional" | undefined;
1163
+ }
1164
+ interface $ZodSuccess<T extends SomeType = $ZodType> extends $ZodType {
1165
+ _zod: $ZodSuccessInternals<T>;
1166
+ }
1167
+ declare const $ZodSuccess: $constructor<$ZodSuccess>;
1168
+ interface $ZodCatchCtx extends ParsePayload {
1169
+ /** @deprecated Use `ctx.issues` */
1170
+ error: {
1171
+ issues: $ZodIssue[];
1172
+ };
1173
+ /** @deprecated Use `ctx.value` */
1174
+ input: unknown;
1175
+ }
1176
+ interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1177
+ type: "catch";
1178
+ innerType: T;
1179
+ catchValue: (ctx: $ZodCatchCtx) => unknown;
1180
+ }
1181
+ interface $ZodCatchInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1182
+ def: $ZodCatchDef<T>;
1183
+ optin: T["_zod"]["optin"];
1184
+ optout: T["_zod"]["optout"];
1185
+ isst: never;
1186
+ values: T["_zod"]["values"];
1187
+ }
1188
+ interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
1189
+ _zod: $ZodCatchInternals<T>;
1190
+ }
1191
+ declare const $ZodCatch: $constructor<$ZodCatch>;
1192
+ interface $ZodNaNDef extends $ZodTypeDef {
1193
+ type: "nan";
1194
+ }
1195
+ interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
1196
+ def: $ZodNaNDef;
1197
+ isst: $ZodIssueInvalidType;
1198
+ }
1199
+ interface $ZodNaN extends $ZodType {
1200
+ _zod: $ZodNaNInternals;
1201
+ }
1202
+ declare const $ZodNaN: $constructor<$ZodNaN>;
1203
+ interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
1204
+ type: "pipe";
1205
+ in: A;
1206
+ out: B;
1207
+ /** Only defined inside $ZodCodec instances. */
1208
+ transform?: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
1209
+ /** Only defined inside $ZodCodec instances. */
1210
+ reverseTransform?: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
1211
+ }
1212
+ interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
1213
+ def: $ZodPipeDef<A, B>;
1214
+ isst: never;
1215
+ values: A["_zod"]["values"];
1216
+ optin: A["_zod"]["optin"];
1217
+ optout: B["_zod"]["optout"];
1218
+ propValues: A["_zod"]["propValues"];
1219
+ }
1220
+ interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
1221
+ _zod: $ZodPipeInternals<A, B>;
1222
+ }
1223
+ declare const $ZodPipe: $constructor<$ZodPipe>;
1224
+ interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1225
+ type: "readonly";
1226
+ innerType: T;
1227
+ }
1228
+ interface $ZodReadonlyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<MakeReadonly<output<T>>, MakeReadonly<input<T>>> {
1229
+ def: $ZodReadonlyDef<T>;
1230
+ optin: T["_zod"]["optin"];
1231
+ optout: T["_zod"]["optout"];
1232
+ isst: never;
1233
+ propValues: T["_zod"]["propValues"];
1234
+ values: T["_zod"]["values"];
1235
+ }
1236
+ interface $ZodReadonly<T extends SomeType = $ZodType> extends $ZodType {
1237
+ _zod: $ZodReadonlyInternals<T>;
1238
+ }
1239
+ declare const $ZodReadonly: $constructor<$ZodReadonly>;
1240
+ interface $ZodTemplateLiteralDef extends $ZodTypeDef {
1241
+ type: "template_literal";
1242
+ parts: $ZodTemplateLiteralPart[];
1243
+ format?: string | undefined;
1244
+ }
1245
+ interface $ZodTemplateLiteralInternals<Template extends string = string> extends $ZodTypeInternals<Template, Template> {
1246
+ pattern: RegExp;
1247
+ def: $ZodTemplateLiteralDef;
1248
+ isst: $ZodIssueInvalidType;
1249
+ }
1250
+ interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
1251
+ _zod: $ZodTemplateLiteralInternals<Template>;
1252
+ }
1253
+ type LiteralPart = Exclude<Literal, symbol>;
1254
+ interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
1255
+ pattern: RegExp;
1256
+ }
1257
+ interface SchemaPart extends $ZodType {
1258
+ _zod: SchemaPartInternals;
1259
+ }
1260
+ type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
1261
+ declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
1262
+ type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
1263
+ type $ZodFunctionIn = $ZodFunctionArgs;
1264
+ type $ZodFunctionOut = $ZodType;
1265
+ type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input<Returns>;
1266
+ type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => MaybeAsync<input<Returns>>;
1267
+ type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => output<Returns>;
1268
+ type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => Promise<output<Returns>>;
1269
+ interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
1270
+ type: "function";
1271
+ input: In;
1272
+ output: Out;
1273
+ }
1274
+ interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
1275
+ def: $ZodFunctionDef<Args, Returns>;
1276
+ isst: $ZodIssueInvalidType;
1277
+ }
1278
+ interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodType<any, any, $ZodFunctionInternals<Args, Returns>> {
1279
+ /** @deprecated */
1280
+ _def: $ZodFunctionDef<Args, Returns>;
1281
+ _input: $InferInnerFunctionType<Args, Returns>;
1282
+ _output: $InferOuterFunctionType<Args, Returns>;
1283
+ implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
1284
+ implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
1285
+ input<const Items extends TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest): $ZodFunction<$ZodTuple<Items, Rest>, Returns>;
1286
+ input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
1287
+ input(...args: any[]): $ZodFunction<any, Returns>;
1288
+ output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
1289
+ }
1290
+ declare const $ZodFunction: $constructor<$ZodFunction>;
1291
+ interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1292
+ type: "promise";
1293
+ innerType: T;
1294
+ }
1295
+ interface $ZodPromiseInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T>>, MaybeAsync<input<T>>> {
1296
+ def: $ZodPromiseDef<T>;
1297
+ isst: never;
1298
+ }
1299
+ interface $ZodPromise<T extends SomeType = $ZodType> extends $ZodType {
1300
+ _zod: $ZodPromiseInternals<T>;
1301
+ }
1302
+ declare const $ZodPromise: $constructor<$ZodPromise>;
1303
+ interface $ZodLazyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1304
+ type: "lazy";
1305
+ getter: () => T;
1306
+ }
1307
+ interface $ZodLazyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<output<T>, input<T>> {
1308
+ def: $ZodLazyDef<T>;
1309
+ isst: never;
1310
+ /** Auto-cached way to retrieve the inner schema */
1311
+ innerType: T;
1312
+ pattern: T["_zod"]["pattern"];
1313
+ propValues: T["_zod"]["propValues"];
1314
+ optin: T["_zod"]["optin"];
1315
+ optout: T["_zod"]["optout"];
1316
+ }
1317
+ interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
1318
+ _zod: $ZodLazyInternals<T>;
1319
+ }
1320
+ declare const $ZodLazy: $constructor<$ZodLazy>;
1321
+ interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
1322
+ type: "custom";
1323
+ check: "custom";
1324
+ path?: PropertyKey[] | undefined;
1325
+ error?: $ZodErrorMap | undefined;
1326
+ params?: Record<string, any> | undefined;
1327
+ fn: (arg: O) => unknown;
1328
+ }
1329
+ interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, $ZodCheckInternals<O> {
1330
+ def: $ZodCustomDef;
1331
+ issc: $ZodIssue;
1332
+ isst: never;
1333
+ bag: LoosePartial<{
1334
+ Class: typeof Class;
1335
+ }>;
1336
+ }
1337
+ interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
1338
+ _zod: $ZodCustomInternals<O, I>;
1339
+ }
1340
+ declare const $ZodCustom: $constructor<$ZodCustom>;
1341
+ 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;
1342
+ //#endregion
1343
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/checks.d.cts
1344
+ interface $ZodCheckDef {
1345
+ check: string;
1346
+ error?: $ZodErrorMap<never> | undefined;
1347
+ /** If true, no later checks will be executed if this check fails. Default `false`. */
1348
+ abort?: boolean | undefined;
1349
+ /** If provided, the check runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
1350
+ when?: ((payload: ParsePayload) => boolean) | undefined;
1351
+ }
1352
+ interface $ZodCheckInternals<T> {
1353
+ def: $ZodCheckDef;
1354
+ /** The set of issues this check might throw. */
1355
+ issc?: $ZodIssueBase;
1356
+ check(payload: ParsePayload<T>): MaybeAsync<void>;
1357
+ onattach: ((schema: $ZodType) => void)[];
1358
+ }
1359
+ interface $ZodCheck<in T = never> {
1360
+ _zod: $ZodCheckInternals<T>;
1361
+ }
1362
+ declare const $ZodCheck: $constructor<$ZodCheck<any>>;
1363
+ interface $ZodCheckLessThanDef extends $ZodCheckDef {
1364
+ check: "less_than";
1365
+ value: Numeric;
1366
+ inclusive: boolean;
1367
+ }
1368
+ interface $ZodCheckLessThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
1369
+ def: $ZodCheckLessThanDef;
1370
+ issc: $ZodIssueTooBig<T>;
1371
+ }
1372
+ interface $ZodCheckLessThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
1373
+ _zod: $ZodCheckLessThanInternals<T>;
1374
+ }
1375
+ declare const $ZodCheckLessThan: $constructor<$ZodCheckLessThan>;
1376
+ interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
1377
+ check: "greater_than";
1378
+ value: Numeric;
1379
+ inclusive: boolean;
1380
+ }
1381
+ interface $ZodCheckGreaterThanInternals<T extends Numeric = Numeric> extends $ZodCheckInternals<T> {
1382
+ def: $ZodCheckGreaterThanDef;
1383
+ issc: $ZodIssueTooSmall<T>;
1384
+ }
1385
+ interface $ZodCheckGreaterThan<T extends Numeric = Numeric> extends $ZodCheck<T> {
1386
+ _zod: $ZodCheckGreaterThanInternals<T>;
1387
+ }
1388
+ declare const $ZodCheckGreaterThan: $constructor<$ZodCheckGreaterThan>;
1389
+ interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
1390
+ check: "multiple_of";
1391
+ value: T;
1392
+ }
1393
+ interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint> extends $ZodCheckInternals<T> {
1394
+ def: $ZodCheckMultipleOfDef<T>;
1395
+ issc: $ZodIssueNotMultipleOf;
1396
+ }
1397
+ interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
1398
+ _zod: $ZodCheckMultipleOfInternals<T>;
1399
+ }
1400
+ declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
1401
+ type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
1402
+ interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
1403
+ check: "number_format";
1404
+ format: $ZodNumberFormats;
1405
+ }
1406
+ interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
1407
+ def: $ZodCheckNumberFormatDef;
1408
+ issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
1409
+ }
1410
+ interface $ZodCheckNumberFormat extends $ZodCheck<number> {
1411
+ _zod: $ZodCheckNumberFormatInternals;
1412
+ }
1413
+ declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
1414
+ interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
1415
+ check: "max_length";
1416
+ maximum: number;
1417
+ }
1418
+ interface $ZodCheckMaxLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1419
+ def: $ZodCheckMaxLengthDef;
1420
+ issc: $ZodIssueTooBig<T>;
1421
+ }
1422
+ interface $ZodCheckMaxLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
1423
+ _zod: $ZodCheckMaxLengthInternals<T>;
1424
+ }
1425
+ declare const $ZodCheckMaxLength: $constructor<$ZodCheckMaxLength>;
1426
+ interface $ZodCheckMinLengthDef extends $ZodCheckDef {
1427
+ check: "min_length";
1428
+ minimum: number;
1429
+ }
1430
+ interface $ZodCheckMinLengthInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1431
+ def: $ZodCheckMinLengthDef;
1432
+ issc: $ZodIssueTooSmall<T>;
1433
+ }
1434
+ interface $ZodCheckMinLength<T extends HasLength = HasLength> extends $ZodCheck<T> {
1435
+ _zod: $ZodCheckMinLengthInternals<T>;
1436
+ }
1437
+ declare const $ZodCheckMinLength: $constructor<$ZodCheckMinLength>;
1438
+ interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
1439
+ check: "length_equals";
1440
+ length: number;
1441
+ }
1442
+ interface $ZodCheckLengthEqualsInternals<T extends HasLength = HasLength> extends $ZodCheckInternals<T> {
1443
+ def: $ZodCheckLengthEqualsDef;
1444
+ issc: $ZodIssueTooBig<T> | $ZodIssueTooSmall<T>;
1445
+ }
1446
+ interface $ZodCheckLengthEquals<T extends HasLength = HasLength> extends $ZodCheck<T> {
1447
+ _zod: $ZodCheckLengthEqualsInternals<T>;
1448
+ }
1449
+ declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
1450
+ 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";
1451
+ interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
1452
+ check: "string_format";
1453
+ format: Format;
1454
+ pattern?: RegExp | undefined;
1455
+ }
1456
+ interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
1457
+ def: $ZodCheckStringFormatDef;
1458
+ issc: $ZodIssueInvalidStringFormat;
1459
+ }
1460
+ interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
1461
+ format: "regex";
1462
+ pattern: RegExp;
1463
+ }
1464
+ interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
1465
+ def: $ZodCheckRegexDef;
1466
+ issc: $ZodIssueInvalidStringFormat;
1467
+ }
1468
+ interface $ZodCheckRegex extends $ZodCheck<string> {
1469
+ _zod: $ZodCheckRegexInternals;
1470
+ }
1471
+ declare const $ZodCheckRegex: $constructor<$ZodCheckRegex>;
1472
+ interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {}
1473
+ interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
1474
+ def: $ZodCheckLowerCaseDef;
1475
+ issc: $ZodIssueInvalidStringFormat;
1476
+ }
1477
+ interface $ZodCheckLowerCase extends $ZodCheck<string> {
1478
+ _zod: $ZodCheckLowerCaseInternals;
1479
+ }
1480
+ declare const $ZodCheckLowerCase: $constructor<$ZodCheckLowerCase>;
1481
+ interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {}
1482
+ interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
1483
+ def: $ZodCheckUpperCaseDef;
1484
+ issc: $ZodIssueInvalidStringFormat;
1485
+ }
1486
+ interface $ZodCheckUpperCase extends $ZodCheck<string> {
1487
+ _zod: $ZodCheckUpperCaseInternals;
1488
+ }
1489
+ declare const $ZodCheckUpperCase: $constructor<$ZodCheckUpperCase>;
1490
+ interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
1491
+ includes: string;
1492
+ position?: number | undefined;
1493
+ }
1494
+ interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
1495
+ def: $ZodCheckIncludesDef;
1496
+ issc: $ZodIssueInvalidStringFormat;
1497
+ }
1498
+ interface $ZodCheckIncludes extends $ZodCheck<string> {
1499
+ _zod: $ZodCheckIncludesInternals;
1500
+ }
1501
+ declare const $ZodCheckIncludes: $constructor<$ZodCheckIncludes>;
1502
+ interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
1503
+ prefix: string;
1504
+ }
1505
+ interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
1506
+ def: $ZodCheckStartsWithDef;
1507
+ issc: $ZodIssueInvalidStringFormat;
1508
+ }
1509
+ interface $ZodCheckStartsWith extends $ZodCheck<string> {
1510
+ _zod: $ZodCheckStartsWithInternals;
1511
+ }
1512
+ declare const $ZodCheckStartsWith: $constructor<$ZodCheckStartsWith>;
1513
+ interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
1514
+ suffix: string;
1515
+ }
1516
+ interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
1517
+ def: $ZodCheckEndsWithDef;
1518
+ issc: $ZodIssueInvalidStringFormat;
1519
+ }
1520
+ interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
1521
+ _zod: $ZodCheckEndsWithInternals;
1522
+ }
1523
+ declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
1524
+ //#endregion
1525
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/errors.d.cts
1526
+ interface $ZodIssueBase {
1527
+ readonly code?: string;
1528
+ readonly input?: unknown;
1529
+ readonly path: PropertyKey[];
1530
+ readonly message: string;
1531
+ }
1532
+ type $ZodInvalidTypeExpected = "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "undefined" | "null" | "never" | "void" | "date" | "array" | "object" | "tuple" | "record" | "map" | "set" | "file" | "nonoptional" | "nan" | "function" | (string & {});
1533
+ interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
1534
+ readonly code: "invalid_type";
1535
+ readonly expected: $ZodInvalidTypeExpected;
1536
+ readonly input?: Input;
1537
+ }
1538
+ interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
1539
+ readonly code: "too_big";
1540
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
1541
+ readonly maximum: number | bigint;
1542
+ readonly inclusive?: boolean;
1543
+ readonly exact?: boolean;
1544
+ readonly input?: Input;
1545
+ }
1546
+ interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
1547
+ readonly code: "too_small";
1548
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
1549
+ readonly minimum: number | bigint;
1550
+ /** True if the allowable range includes the minimum */
1551
+ readonly inclusive?: boolean;
1552
+ /** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
1553
+ readonly exact?: boolean;
1554
+ readonly input?: Input;
1555
+ }
1556
+ interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
1557
+ readonly code: "invalid_format";
1558
+ readonly format: $ZodStringFormats | (string & {});
1559
+ readonly pattern?: string;
1560
+ readonly input?: string;
1561
+ }
1562
+ interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
1563
+ readonly code: "not_multiple_of";
1564
+ readonly divisor: number;
1565
+ readonly input?: Input;
1566
+ }
1567
+ interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
1568
+ readonly code: "unrecognized_keys";
1569
+ readonly keys: string[];
1570
+ readonly input?: Record<string, unknown>;
1571
+ }
1572
+ interface $ZodIssueInvalidUnionNoMatch extends $ZodIssueBase {
1573
+ readonly code: "invalid_union";
1574
+ readonly errors: $ZodIssue[][];
1575
+ readonly input?: unknown;
1576
+ readonly discriminator?: string | undefined;
1577
+ readonly options?: Primitive[];
1578
+ readonly inclusive?: true;
1579
+ }
1580
+ interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
1581
+ readonly code: "invalid_union";
1582
+ readonly errors: [];
1583
+ readonly input?: unknown;
1584
+ readonly discriminator?: string | undefined;
1585
+ readonly inclusive: false;
1586
+ }
1587
+ type $ZodIssueInvalidUnion = $ZodIssueInvalidUnionNoMatch | $ZodIssueInvalidUnionMultipleMatch;
1588
+ interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
1589
+ readonly code: "invalid_key";
1590
+ readonly origin: "map" | "record";
1591
+ readonly issues: $ZodIssue[];
1592
+ readonly input?: Input;
1593
+ }
1594
+ interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
1595
+ readonly code: "invalid_element";
1596
+ readonly origin: "map" | "set";
1597
+ readonly key: unknown;
1598
+ readonly issues: $ZodIssue[];
1599
+ readonly input?: Input;
1600
+ }
1601
+ interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
1602
+ readonly code: "invalid_value";
1603
+ readonly values: Primitive[];
1604
+ readonly input?: Input;
1605
+ }
1606
+ interface $ZodIssueCustom extends $ZodIssueBase {
1607
+ readonly code: "custom";
1608
+ readonly params?: Record<string, any> | undefined;
1609
+ readonly input?: unknown;
1610
+ }
1611
+ type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
1612
+ type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
1613
+ type RawIssue$1<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1614
+ /** The input data */readonly input: unknown; /** The schema or check that originated this issue. */
1615
+ readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will continue executing checks/refinements after this issue. */
1616
+ readonly continue?: boolean | undefined;
1617
+ } & Record<string, unknown>> : never;
1618
+ type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;
1619
+ interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {
1620
+ (issue: $ZodRawIssue<T>): {
1621
+ message: string;
1622
+ } | string | undefined | null;
1623
+ }
1624
+ interface $ZodError<T = unknown> extends Error {
1625
+ type: T;
1626
+ issues: $ZodIssue[];
1627
+ _zod: {
1628
+ output: T;
1629
+ def: $ZodIssue[];
1630
+ };
1631
+ stack?: string;
1632
+ name: string;
1633
+ }
1634
+ declare const $ZodError: $constructor<$ZodError>;
1635
+ type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
1636
+ type _FlattenedError<T, U = string> = {
1637
+ formErrors: U[];
1638
+ fieldErrors: { [P in keyof T]?: U[] };
1639
+ };
1640
+ type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U> } : T extends any[] ? {
1641
+ [k: number]: $ZodFormattedError<T[number], U>;
1642
+ } : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U> }> : any;
1643
+ type $ZodFormattedError<T, U = string> = {
1644
+ _errors: U[];
1645
+ } & Flatten<_ZodFormattedError<T, U>>;
1646
+ //#endregion
1647
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/core.d.cts
1648
+ type ZodTrait = {
1649
+ _zod: {
1650
+ def: any;
1651
+ [k: string]: any;
1652
+ };
1653
+ };
1654
+ interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
1655
+ new (def: D): T;
1656
+ init(inst: T, def: D): asserts inst is T;
1657
+ }
1658
+ declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
1659
+ Parent?: typeof Class;
1660
+ }): $constructor<T, D>;
1661
+ declare const $brand: unique symbol;
1662
+ type $brand<T extends string | number | symbol = string | number | symbol> = {
1663
+ [$brand]: { [k in T]: true };
1664
+ };
1665
+ type $ZodBranded<T extends SomeType, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T & (Dir extends "inout" ? {
1666
+ _zod: {
1667
+ input: input<T> & $brand<Brand>;
1668
+ output: output<T> & $brand<Brand>;
1669
+ };
1670
+ } : Dir extends "in" ? {
1671
+ _zod: {
1672
+ input: input<T> & $brand<Brand>;
1673
+ };
1674
+ } : {
1675
+ _zod: {
1676
+ output: output<T> & $brand<Brand>;
1677
+ };
1678
+ });
1679
+ type input<T> = T extends {
1680
+ _zod: {
1681
+ input: any;
1682
+ };
1683
+ } ? T["_zod"]["input"] : unknown;
1684
+ type output<T> = T extends {
1685
+ _zod: {
1686
+ output: any;
1687
+ };
1688
+ } ? T["_zod"]["output"] : unknown;
1689
+ //#endregion
1690
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/api.d.cts
1691
+ 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] ? {} : {
1692
+ error?: string | $ZodErrorMap<IssueTypes> | undefined; /** @deprecated This parameter is deprecated. Use `error` instead. */
1693
+ message?: string | undefined;
1694
+ })>>>;
1695
+ type TypeParams<T extends $ZodType = $ZodType & {
1696
+ _isst: never;
1697
+ }, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
1698
+ type CheckParams<T extends $ZodCheck = $ZodCheck, // & { _issc: never },
1699
+ AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
1700
+ 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>;
1701
+ 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>;
1702
+ type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
1703
+ type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">;
1704
+ type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
1705
+ type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
1706
+ type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
1707
+ type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
1708
+ /**
1709
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
1710
+ * (timestamps embedded in the id). Use {@link _cuid2} instead.
1711
+ * See https://github.com/paralleldrive/cuid.
1712
+ */
1713
+ type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
1714
+ type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
1715
+ type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
1716
+ type $ZodCheckXIDParams = CheckStringFormatParams<$ZodXID, "when">;
1717
+ type $ZodCheckKSUIDParams = CheckStringFormatParams<$ZodKSUID, "when">;
1718
+ type $ZodCheckIPv4Params = CheckStringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
1719
+ type $ZodCheckIPv6Params = CheckStringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
1720
+ type $ZodCheckCIDRv4Params = CheckStringFormatParams<$ZodCIDRv4, "pattern" | "when">;
1721
+ type $ZodCheckCIDRv6Params = CheckStringFormatParams<$ZodCIDRv6, "pattern" | "when">;
1722
+ type $ZodCheckBase64Params = CheckStringFormatParams<$ZodBase64, "pattern" | "when">;
1723
+ type $ZodCheckBase64URLParams = CheckStringFormatParams<$ZodBase64URL, "pattern" | "when">;
1724
+ type $ZodCheckE164Params = CheckStringFormatParams<$ZodE164, "when">;
1725
+ type $ZodCheckJWTParams = CheckStringFormatParams<$ZodJWT, "pattern" | "when">;
1726
+ type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "pattern" | "when">;
1727
+ type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
1728
+ type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
1729
+ type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
1730
+ type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
1731
+ type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
1732
+ type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
1733
+ type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
1734
+ type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
1735
+ type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
1736
+ type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
1737
+ type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
1738
+ type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
1739
+ type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
1740
+ type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
1741
+ type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
1742
+ type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
1743
+ type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
1744
+ type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
1745
+ type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
1746
+ type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
1747
+ type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1748
+ /** The schema or check that originated this issue. */readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
1749
+ readonly continue?: boolean | undefined;
1750
+ } & Record<string, unknown>> : never;
1751
+ interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
1752
+ addIssue(arg: string | $ZodSuperRefineIssue): void;
1753
+ }
1754
+ interface $ZodSuperRefineParams {
1755
+ /** If provided, the refinement runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
1756
+ when?: ((payload: ParsePayload) => boolean) | undefined;
1757
+ }
1758
+ //#endregion
1759
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/errors.d.cts
1760
+ /** An Error-like class used to store Zod validation issues. */
1761
+ interface ZodError<T = unknown> extends $ZodError<T> {
1762
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
1763
+ format(): $ZodFormattedError<T>;
1764
+ format<U>(mapper: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
1765
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
1766
+ flatten(): $ZodFlattenedError<T>;
1767
+ flatten<U>(mapper: (issue: $ZodIssue) => U): $ZodFlattenedError<T, U>;
1768
+ /** @deprecated Push directly to `.issues` instead. */
1769
+ addIssue(issue: $ZodIssue): void;
1770
+ /** @deprecated Push directly to `.issues` instead. */
1771
+ addIssues(issues: $ZodIssue[]): void;
1772
+ /** @deprecated Check `err.issues.length === 0` instead. */
1773
+ isEmpty: boolean;
1774
+ }
1775
+ declare const ZodError: $constructor<ZodError>;
1776
+ //#endregion
1777
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/parse.d.cts
1778
+ type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
1779
+ type ZodSafeParseSuccess<T> = {
1780
+ success: true;
1781
+ data: T;
1782
+ error?: never;
1783
+ };
1784
+ type ZodSafeParseError<T> = {
1785
+ success: false;
1786
+ data?: never;
1787
+ error: ZodError<T>;
1788
+ };
1789
+ //#endregion
1790
+ //#region ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/schemas.d.cts
1791
+ type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
1792
+ interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
1793
+ def: Internals["def"];
1794
+ type: Internals["def"]["type"];
1795
+ /** @deprecated Use `.def` instead. */
1796
+ _def: Internals["def"];
1797
+ /** @deprecated Use `z.output<typeof schema>` instead. */
1798
+ _output: Internals["output"];
1799
+ /** @deprecated Use `z.input<typeof schema>` instead. */
1800
+ _input: Internals["input"];
1801
+ "~standard": ZodStandardSchemaWithJSON<this>;
1802
+ /** Converts this schema to a JSON Schema representation. */
1803
+ toJSONSchema(params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<this>;
1804
+ check(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
1805
+ with(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
1806
+ clone(def?: Internals["def"], params?: {
1807
+ parent: boolean;
1808
+ }): this;
1809
+ 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;
1810
+ brand<T extends PropertyKey = PropertyKey, Dir extends "in" | "out" | "inout" = "out">(value?: T): PropertyKey extends T ? this : $ZodBranded<this, T, Dir>;
1811
+ parse(data: unknown, params?: ParseContext<$ZodIssue>): output<this>;
1812
+ safeParse(data: unknown, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
1813
+ parseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
1814
+ safeParseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
1815
+ spa: (data: unknown, params?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<this>>>;
1816
+ encode(data: output<this>, params?: ParseContext<$ZodIssue>): input<this>;
1817
+ decode(data: input<this>, params?: ParseContext<$ZodIssue>): output<this>;
1818
+ encodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<input<this>>;
1819
+ decodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
1820
+ safeEncode(data: output<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<input<this>>;
1821
+ safeDecode(data: input<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
1822
+ safeEncodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<input<this>>>;
1823
+ safeDecodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
1824
+ 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;
1825
+ superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>, params?: $ZodSuperRefineParams): this;
1826
+ overwrite(fn: (x: output<this>) => output<this>): this;
1827
+ optional(): ZodOptional<this>;
1828
+ exactOptional(): ZodExactOptional<this>;
1829
+ nonoptional(params?: string | $ZodNonOptionalParams): ZodNonOptional<this>;
1830
+ nullable(): ZodNullable<this>;
1831
+ nullish(): ZodOptional<ZodNullable<this>>;
1832
+ default(def: NoUndefined<output<this>>): ZodDefault<this>;
1833
+ default(def: () => NoUndefined<output<this>>): ZodDefault<this>;
1834
+ prefault(def: () => input<this>): ZodPrefault<this>;
1835
+ prefault(def: input<this>): ZodPrefault<this>;
1836
+ array(): ZodArray<this>;
1837
+ or<T extends SomeType>(option: T): ZodUnion<[this, T]>;
1838
+ and<T extends SomeType>(incoming: T): ZodIntersection<this, T>;
1839
+ transform<NewOut>(transform: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, output<this>>>;
1840
+ catch(def: output<this>): ZodCatch<this>;
1841
+ catch(def: (ctx: $ZodCatchCtx) => output<this>): ZodCatch<this>;
1842
+ pipe<T extends $ZodType<any, output<this>>>(target: T | $ZodType<any, output<this>>): ZodPipe<this, T>;
1843
+ readonly(): ZodReadonly<this>;
1844
+ /** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
1845
+ describe(description: string): this;
1846
+ description?: string;
1847
+ /** Returns the metadata associated with this instance in `z.globalRegistry` */
1848
+ meta(): $replace<GlobalMeta, this> | undefined;
1849
+ /** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
1850
+ meta(data: $replace<GlobalMeta, this>): this;
1851
+ /** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
1852
+ *
1853
+ * ```ts
1854
+ * const schema = z.string().optional();
1855
+ * const isOptional = schema.safeParse(undefined).success; // true
1856
+ * ```
1857
+ */
1858
+ isOptional(): boolean;
1859
+ /**
1860
+ * @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
1861
+ *
1862
+ * ```ts
1863
+ * const schema = z.string().nullable();
1864
+ * const isNullable = schema.safeParse(null).success; // true
1865
+ * ```
1866
+ */
1867
+ isNullable(): boolean;
1868
+ apply<T>(fn: (schema: this) => T): T;
1869
+ }
1870
+ interface _ZodType<out Internals extends $ZodTypeInternals = $ZodTypeInternals> extends ZodType<any, any, Internals> {}
1871
+ declare const ZodType: $constructor<ZodType>;
1872
+ interface _ZodString<T extends $ZodStringInternals<unknown> = $ZodStringInternals<unknown>> extends _ZodType<T> {
1873
+ format: string | null;
1874
+ minLength: number | null;
1875
+ maxLength: number | null;
1876
+ regex(regex: RegExp, params?: string | $ZodCheckRegexParams): this;
1877
+ includes(value: string, params?: string | $ZodCheckIncludesParams): this;
1878
+ startsWith(value: string, params?: string | $ZodCheckStartsWithParams): this;
1879
+ endsWith(value: string, params?: string | $ZodCheckEndsWithParams): this;
1880
+ min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
1881
+ max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
1882
+ length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
1883
+ nonempty(params?: string | $ZodCheckMinLengthParams): this;
1884
+ lowercase(params?: string | $ZodCheckLowerCaseParams): this;
1885
+ uppercase(params?: string | $ZodCheckUpperCaseParams): this;
1886
+ trim(): this;
1887
+ normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
1888
+ toLowerCase(): this;
1889
+ toUpperCase(): this;
1890
+ slugify(): this;
1891
+ }
1892
+ /** @internal */
1893
+ declare const _ZodString: $constructor<_ZodString>;
1894
+ interface ZodString extends _ZodString<$ZodStringInternals<string>> {
1895
+ /** @deprecated Use `z.email()` instead. */
1896
+ email(params?: string | $ZodCheckEmailParams): this;
1897
+ /** @deprecated Use `z.url()` instead. */
1898
+ url(params?: string | $ZodCheckURLParams): this;
1899
+ /** @deprecated Use `z.jwt()` instead. */
1900
+ jwt(params?: string | $ZodCheckJWTParams): this;
1901
+ /** @deprecated Use `z.emoji()` instead. */
1902
+ emoji(params?: string | $ZodCheckEmojiParams): this;
1903
+ /** @deprecated Use `z.guid()` instead. */
1904
+ guid(params?: string | $ZodCheckGUIDParams): this;
1905
+ /** @deprecated Use `z.uuid()` instead. */
1906
+ uuid(params?: string | $ZodCheckUUIDParams): this;
1907
+ /** @deprecated Use `z.uuid()` instead. */
1908
+ uuidv4(params?: string | $ZodCheckUUIDParams): this;
1909
+ /** @deprecated Use `z.uuid()` instead. */
1910
+ uuidv6(params?: string | $ZodCheckUUIDParams): this;
1911
+ /** @deprecated Use `z.uuid()` instead. */
1912
+ uuidv7(params?: string | $ZodCheckUUIDParams): this;
1913
+ /** @deprecated Use `z.nanoid()` instead. */
1914
+ nanoid(params?: string | $ZodCheckNanoIDParams): this;
1915
+ /** @deprecated Use `z.guid()` instead. */
1916
+ guid(params?: string | $ZodCheckGUIDParams): this;
1917
+ /**
1918
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
1919
+ * (timestamps embedded in the id). Use `z.cuid2()` instead.
1920
+ * See https://github.com/paralleldrive/cuid.
1921
+ */
1922
+ cuid(params?: string | $ZodCheckCUIDParams): this;
1923
+ /** @deprecated Use `z.cuid2()` instead. */
1924
+ cuid2(params?: string | $ZodCheckCUID2Params): this;
1925
+ /** @deprecated Use `z.ulid()` instead. */
1926
+ ulid(params?: string | $ZodCheckULIDParams): this;
1927
+ /** @deprecated Use `z.base64()` instead. */
1928
+ base64(params?: string | $ZodCheckBase64Params): this;
1929
+ /** @deprecated Use `z.base64url()` instead. */
1930
+ base64url(params?: string | $ZodCheckBase64URLParams): this;
1931
+ /** @deprecated Use `z.xid()` instead. */
1932
+ xid(params?: string | $ZodCheckXIDParams): this;
1933
+ /** @deprecated Use `z.ksuid()` instead. */
1934
+ ksuid(params?: string | $ZodCheckKSUIDParams): this;
1935
+ /** @deprecated Use `z.ipv4()` instead. */
1936
+ ipv4(params?: string | $ZodCheckIPv4Params): this;
1937
+ /** @deprecated Use `z.ipv6()` instead. */
1938
+ ipv6(params?: string | $ZodCheckIPv6Params): this;
1939
+ /** @deprecated Use `z.cidrv4()` instead. */
1940
+ cidrv4(params?: string | $ZodCheckCIDRv4Params): this;
1941
+ /** @deprecated Use `z.cidrv6()` instead. */
1942
+ cidrv6(params?: string | $ZodCheckCIDRv6Params): this;
1943
+ /** @deprecated Use `z.e164()` instead. */
1944
+ e164(params?: string | $ZodCheckE164Params): this;
1945
+ /** @deprecated Use `z.iso.datetime()` instead. */
1946
+ datetime(params?: string | $ZodCheckISODateTimeParams): this;
1947
+ /** @deprecated Use `z.iso.date()` instead. */
1948
+ date(params?: string | $ZodCheckISODateParams): this;
1949
+ /** @deprecated Use `z.iso.time()` instead. */
1950
+ time(params?: string | $ZodCheckISOTimeParams): this;
1951
+ /** @deprecated Use `z.iso.duration()` instead. */
1952
+ duration(params?: string | $ZodCheckISODurationParams): this;
1953
+ }
1954
+ declare const ZodString: $constructor<ZodString>;
1955
+ interface _ZodNumber<Internals extends $ZodNumberInternals = $ZodNumberInternals> extends _ZodType<Internals> {
1956
+ gt(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1957
+ /** Identical to .min() */
1958
+ gte(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1959
+ min(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1960
+ lt(value: number, params?: string | $ZodCheckLessThanParams): this;
1961
+ /** Identical to .max() */
1962
+ lte(value: number, params?: string | $ZodCheckLessThanParams): this;
1963
+ max(value: number, params?: string | $ZodCheckLessThanParams): this;
1964
+ /** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
1965
+ int(params?: string | $ZodCheckNumberFormatParams): this;
1966
+ /** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
1967
+ safe(params?: string | $ZodCheckNumberFormatParams): this;
1968
+ positive(params?: string | $ZodCheckGreaterThanParams): this;
1969
+ nonnegative(params?: string | $ZodCheckGreaterThanParams): this;
1970
+ negative(params?: string | $ZodCheckLessThanParams): this;
1971
+ nonpositive(params?: string | $ZodCheckLessThanParams): this;
1972
+ multipleOf(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1973
+ /** @deprecated Use `.multipleOf()` instead. */
1974
+ step(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1975
+ /** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
1976
+ finite(params?: unknown): this;
1977
+ minValue: number | null;
1978
+ maxValue: number | null;
1979
+ /** @deprecated Check the `format` property instead. */
1980
+ isInt: boolean;
1981
+ /** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
1982
+ isFinite: boolean;
1983
+ format: string | null;
1984
+ }
1985
+ interface ZodNumber extends _ZodNumber<$ZodNumberInternals<number>> {}
1986
+ declare const ZodNumber: $constructor<ZodNumber>;
1987
+ interface _ZodBoolean<T extends $ZodBooleanInternals = $ZodBooleanInternals> extends _ZodType<T> {}
1988
+ interface ZodBoolean extends _ZodBoolean<$ZodBooleanInternals<boolean>> {}
1989
+ declare const ZodBoolean: $constructor<ZodBoolean>;
1990
+ interface ZodUnknown extends _ZodType<$ZodUnknownInternals> {}
1991
+ declare const ZodUnknown: $constructor<ZodUnknown>;
1992
+ interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T>>, $ZodArray<T> {
1993
+ element: T;
1994
+ min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
1995
+ nonempty(params?: string | $ZodCheckMinLengthParams): this;
1996
+ max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
1997
+ length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
1998
+ unwrap(): T;
1999
+ "~standard": ZodStandardSchemaWithJSON<this>;
2000
+ }
2001
+ declare const ZodArray: $constructor<ZodArray>;
2002
+ 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] };
2003
+ interface ZodObject< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodLooseShape, out Config extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape, Config>>, $ZodObject<Shape, Config> {
2004
+ "~standard": ZodStandardSchemaWithJSON<this>;
2005
+ shape: Shape;
2006
+ keyof(): ZodEnum<ToEnum<keyof Shape & string>>;
2007
+ /** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
2008
+ catchall<T extends SomeType>(schema: T): ZodObject<Shape, $catchall<T>>;
2009
+ /** @deprecated Use `z.looseObject()` or `.loose()` instead. */
2010
+ passthrough(): ZodObject<Shape, $loose>;
2011
+ /** Consider `z.looseObject(A.shape)` instead */
2012
+ loose(): ZodObject<Shape, $loose>;
2013
+ /** Consider `z.strictObject(A.shape)` instead */
2014
+ strict(): ZodObject<Shape, $strict>;
2015
+ /** This is the default behavior. This method call is likely unnecessary. */
2016
+ strip(): ZodObject<Shape, $strip>;
2017
+ extend<U extends $ZodLooseShape>(shape: U): ZodObject<Extend<Shape, Writeable<U>>, Config>;
2018
+ safeExtend<U extends $ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, SomeType>>): ZodObject<Extend<Shape, Writeable<U>>, Config>;
2019
+ /**
2020
+ * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
2021
+ */
2022
+ merge<U extends ZodObject>(other: U): ZodObject<Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
2023
+ 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>;
2024
+ 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>;
2025
+ partial(): ZodObject<{ -readonly [k in keyof Shape]: ZodOptional<Shape[k]> }, Config>;
2026
+ partial<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ -readonly [k in keyof Shape]: k extends keyof M ? ZodOptional<Shape[k]> : Shape[k] }, Config>;
2027
+ required(): ZodObject<{ -readonly [k in keyof Shape]: ZodNonOptional<Shape[k]> }, Config>;
2028
+ required<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ -readonly [k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k] }, Config>;
2029
+ }
2030
+ declare const ZodObject: $constructor<ZodObject>;
2031
+ interface ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T>>, $ZodUnion<T> {
2032
+ "~standard": ZodStandardSchemaWithJSON<this>;
2033
+ options: T;
2034
+ }
2035
+ declare const ZodUnion: $constructor<ZodUnion>;
2036
+ interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A, B>>, $ZodIntersection<A, B> {
2037
+ "~standard": ZodStandardSchemaWithJSON<this>;
2038
+ }
2039
+ declare const ZodIntersection: $constructor<ZodIntersection>;
2040
+ interface ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends _ZodType<$ZodRecordInternals<Key, Value>>, $ZodRecord<Key, Value> {
2041
+ "~standard": ZodStandardSchemaWithJSON<this>;
2042
+ keyType: Key;
2043
+ valueType: Value;
2044
+ }
2045
+ declare const ZodRecord: $constructor<ZodRecord>;
2046
+ interface ZodEnum< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
2047
+ "~standard": ZodStandardSchemaWithJSON<this>;
2048
+ enum: T;
2049
+ options: Array<T[keyof T]>;
2050
+ extract<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Pick<T, U[number]>>>;
2051
+ exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Omit<T, U[number]>>>;
2052
+ }
2053
+ declare const ZodEnum: $constructor<ZodEnum>;
2054
+ interface ZodTransform<O = unknown, I = unknown> extends _ZodType<$ZodTransformInternals<O, I>>, $ZodTransform<O, I> {
2055
+ "~standard": ZodStandardSchemaWithJSON<this>;
2056
+ }
2057
+ declare const ZodTransform: $constructor<ZodTransform>;
2058
+ interface ZodOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodOptionalInternals<T>>, $ZodOptional<T> {
2059
+ "~standard": ZodStandardSchemaWithJSON<this>;
2060
+ unwrap(): T;
2061
+ }
2062
+ declare const ZodOptional: $constructor<ZodOptional>;
2063
+ interface ZodExactOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodExactOptionalInternals<T>>, $ZodExactOptional<T> {
2064
+ "~standard": ZodStandardSchemaWithJSON<this>;
2065
+ unwrap(): T;
2066
+ }
2067
+ declare const ZodExactOptional: $constructor<ZodExactOptional>;
2068
+ interface ZodNullable<T extends SomeType = $ZodType> extends _ZodType<$ZodNullableInternals<T>>, $ZodNullable<T> {
2069
+ "~standard": ZodStandardSchemaWithJSON<this>;
2070
+ unwrap(): T;
2071
+ }
2072
+ declare const ZodNullable: $constructor<ZodNullable>;
2073
+ interface ZodDefault<T extends SomeType = $ZodType> extends _ZodType<$ZodDefaultInternals<T>>, $ZodDefault<T> {
2074
+ "~standard": ZodStandardSchemaWithJSON<this>;
2075
+ unwrap(): T;
2076
+ /** @deprecated Use `.unwrap()` instead. */
2077
+ removeDefault(): T;
2078
+ }
2079
+ declare const ZodDefault: $constructor<ZodDefault>;
2080
+ interface ZodPrefault<T extends SomeType = $ZodType> extends _ZodType<$ZodPrefaultInternals<T>>, $ZodPrefault<T> {
2081
+ "~standard": ZodStandardSchemaWithJSON<this>;
2082
+ unwrap(): T;
2083
+ }
2084
+ declare const ZodPrefault: $constructor<ZodPrefault>;
2085
+ interface ZodNonOptional<T extends SomeType = $ZodType> extends _ZodType<$ZodNonOptionalInternals<T>>, $ZodNonOptional<T> {
2086
+ "~standard": ZodStandardSchemaWithJSON<this>;
2087
+ unwrap(): T;
2088
+ }
2089
+ declare const ZodNonOptional: $constructor<ZodNonOptional>;
2090
+ interface ZodCatch<T extends SomeType = $ZodType> extends _ZodType<$ZodCatchInternals<T>>, $ZodCatch<T> {
2091
+ "~standard": ZodStandardSchemaWithJSON<this>;
2092
+ unwrap(): T;
2093
+ /** @deprecated Use `.unwrap()` instead. */
2094
+ removeCatch(): T;
2095
+ }
2096
+ declare const ZodCatch: $constructor<ZodCatch>;
2097
+ interface ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A, B>>, $ZodPipe<A, B> {
2098
+ "~standard": ZodStandardSchemaWithJSON<this>;
2099
+ in: A;
2100
+ out: B;
2101
+ }
2102
+ declare const ZodPipe: $constructor<ZodPipe>;
2103
+ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadonlyInternals<T>>, $ZodReadonly<T> {
2104
+ "~standard": ZodStandardSchemaWithJSON<this>;
2105
+ unwrap(): T;
2106
+ }
2107
+ declare const ZodReadonly: $constructor<ZodReadonly>;
2108
+ //#endregion
2109
+ //#region ../../domains/tenant/contract/dist/index.d.ts
2110
+ declare const TenantResponseSchema: ZodObject<{
2111
+ id: ZodString;
2112
+ name: ZodString;
2113
+ slug: ZodString;
2114
+ status: ZodEnum<{
2115
+ active: "active";
2116
+ suspended: "suspended";
2117
+ inactive: "inactive";
2118
+ }>;
2119
+ plan: ZodNullable<ZodString>;
2120
+ ownerId: ZodString;
2121
+ maxMembers: ZodNumber;
2122
+ settings: ZodRecord<ZodString, ZodUnknown>;
2123
+ createdAt: ZodString;
2124
+ updatedAt: ZodString;
2125
+ }, $strip>;
2126
+ declare const TenantListItemSchema: ZodObject<{
2127
+ id: ZodString;
2128
+ name: ZodString;
2129
+ slug: ZodString;
2130
+ status: ZodEnum<{
2131
+ active: "active";
2132
+ suspended: "suspended";
2133
+ inactive: "inactive";
2134
+ }>;
2135
+ plan: ZodNullable<ZodString>;
2136
+ ownerId: ZodString;
2137
+ createdAt: ZodString;
2138
+ }, $strip>;
2139
+ declare const CreateTenantInputSchema: ZodObject<{
2140
+ name: ZodString;
2141
+ slug: ZodString;
2142
+ plan: ZodOptional<ZodNullable<ZodString>>;
2143
+ ownerId: ZodString;
2144
+ maxMembers: ZodOptional<ZodNumber>;
2145
+ settings: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2146
+ }, $strip>;
2147
+ declare const UpdateTenantInputSchema: ZodObject<{
2148
+ name: ZodOptional<ZodString>;
2149
+ plan: ZodOptional<ZodNullable<ZodString>>;
2150
+ maxMembers: ZodOptional<ZodNumber>;
2151
+ settings: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2152
+ }, $strip>; //#endregion
2153
+ //#region src/types/tenant-dto.types.d.ts
2154
+ type TenantResponseDTO = output<typeof TenantResponseSchema>;
2155
+ type TenantListItemDTO = output<typeof TenantListItemSchema>;
2156
+ type CreateTenantInputDTO = output<typeof CreateTenantInputSchema>;
2157
+ type UpdateTenantInputDTO = output<typeof UpdateTenantInputSchema>; //#endregion
2158
+ //#region src/types/tenant.types.d.ts
2159
+ type TenantListParams = {
2160
+ page?: number;
2161
+ pageSize?: number;
2162
+ status?: "active" | "suspended" | "inactive";
2163
+ search?: string;
2164
+ };
2165
+ type PaginatedResult<T> = {
2166
+ items: T[];
2167
+ total: number;
2168
+ page: number;
2169
+ pageSize: number;
2170
+ totalPages: number;
2171
+ }; //#endregion
2172
+ //#region src/ports/tenant.port.d.ts
2173
+ /**
2174
+ * 租户端口接口
2175
+ *
2176
+ * 定义租户域所有应用操作的契约。
2177
+ * 所有方法返回 Result<DTO, DomainError> 类型,支持类型安全的错误处理。
2178
+ */
2179
+ type TenantPort = {
2180
+ /**
2181
+ * 根据 ID 获取租户
2182
+ *
2183
+ * @param id - 租户 ID
2184
+ * @returns 租户 DTO,不存在时返回 null
2185
+ */
2186
+ findById(id: string): Promise<Result$1<TenantResponseDTO | null, DomainError>>;
2187
+ /**
2188
+ * 根据 slug 获取租户
2189
+ *
2190
+ * @param slug - 租户标识
2191
+ * @returns 租户 DTO,不存在时返回 null
2192
+ */
2193
+ findBySlug(slug: string): Promise<Result$1<TenantResponseDTO | null, DomainError>>;
2194
+ /**
2195
+ * 根据所有者 ID 获取租户列表
2196
+ *
2197
+ * @param ownerId - 所有者 ID
2198
+ * @returns 租户 DTO 列表
2199
+ */
2200
+ findByOwnerId(ownerId: string): Promise<Result$1<TenantResponseDTO[], DomainError>>;
2201
+ /**
2202
+ * 获取租户列表(分页)
2203
+ *
2204
+ * @param params - 查询参数
2205
+ * @returns 分页租户列表
2206
+ */
2207
+ findAll(params?: {
2208
+ page?: number;
2209
+ pageSize?: number;
2210
+ status?: string;
2211
+ search?: string;
2212
+ }): Promise<Result$1<PaginatedResult<TenantListItemDTO>, DomainError>>;
2213
+ /**
2214
+ * 创建租户
2215
+ *
2216
+ * @param input - 创建参数
2217
+ * @returns 创建的租户 DTO
2218
+ */
2219
+ create(input: CreateTenantInputDTO): Promise<Result$1<TenantResponseDTO, DomainError>>;
2220
+ /**
2221
+ * 更新租户
2222
+ *
2223
+ * @param id - 租户 ID
2224
+ * @param input - 更新参数
2225
+ * @returns 更新后的租户 DTO
2226
+ */
2227
+ update(id: string, input: UpdateTenantInputDTO): Promise<Result$1<TenantResponseDTO, DomainError>>;
2228
+ /**
2229
+ * 删除租户
2230
+ *
2231
+ * @param id - 租户 ID
2232
+ * @returns 是否删除成功
2233
+ */
2234
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2235
+ };
2236
+ /**
2237
+ * 租户端口 DI 令牌
2238
+ */
2239
+ //#endregion
2240
+ //#region src/types/tenant-context.types.d.ts
2241
+ type TenantInfo = {
2242
+ tenantId: string;
2243
+ tenantName: string | null;
2244
+ tenantSlug: string | null;
2245
+ status: "active" | "suspended" | "inactive";
2246
+ };
2247
+ type TenantValidationResult = {
2248
+ valid: boolean;
2249
+ tenant: TenantInfo | null;
2250
+ reason?: string;
2251
+ }; //#endregion
2252
+ //#region src/ports/tenant-context.port.d.ts
2253
+ type TenantContextPort = {
2254
+ getCurrentTenant(): TenantInfo | null;
2255
+ setTenant(tenant: TenantInfo): void;
2256
+ validateTenant(tenantId: string): Promise<TenantValidationResult>;
2257
+ clearTenant(): void;
2258
+ }; //#endregion
2259
+ //#region src/ports/tenant-resolver.port.d.ts
2260
+ type TenantResolverPort = {
2261
+ resolveFromHeader(headers: Record<string, string>): Promise<TenantInfo | null>;
2262
+ resolveFromSubdomain(host: string): Promise<TenantInfo | null>;
2263
+ resolveFromToken(token: string): Promise<TenantInfo | null>;
2264
+ }; //#endregion
2265
+ //#region src/schemas/tenant-context.schema.d.ts
2266
+ //#endregion
2267
+ //#region src/in-memory-tenant.adapter.d.ts
2268
+ /**
2269
+ * 内存租户端口适配器
2270
+ *
2271
+ * 实现 TenantPort 接口,使用内存 Map 存储数据。
2272
+ * 所有方法返回 Result<DTO, DomainError> 类型。
2273
+ */
2274
+ declare class InMemoryTenantAdapter implements TenantPort {
2275
+ private readonly store;
2276
+ private readonly slugIndex;
2277
+ /**
2278
+ * 根据 ID 获取租户
2279
+ *
2280
+ * @param id - 租户 ID
2281
+ * @returns 租户 DTO,不存在时返回 null
2282
+ */
2283
+ findById(id: string): Promise<Result$1<TenantResponseDTO | null, DomainError>>;
2284
+ /**
2285
+ * 根据 slug 获取租户
2286
+ *
2287
+ * @param slug - 租户标识
2288
+ * @returns 租户 DTO,不存在时返回 null
2289
+ */
2290
+ findBySlug(slug: string): Promise<Result$1<TenantResponseDTO | null, DomainError>>;
2291
+ /**
2292
+ * 根据所有者 ID 获取租户列表
2293
+ *
2294
+ * @param ownerId - 所有者 ID
2295
+ * @returns 租户 DTO 列表
2296
+ */
2297
+ findByOwnerId(ownerId: string): Promise<Result$1<TenantResponseDTO[], DomainError>>;
2298
+ /**
2299
+ * 获取租户列表(分页)
2300
+ *
2301
+ * @param params - 查询参数
2302
+ * @returns 分页租户列表
2303
+ */
2304
+ findAll(params?: TenantListParams): Promise<Result$1<PaginatedResult<TenantListItemDTO>, DomainError>>;
2305
+ /**
2306
+ * 创建租户
2307
+ *
2308
+ * @param input - 创建参数
2309
+ * @returns 创建的租户 DTO
2310
+ */
2311
+ create(input: CreateTenantInputDTO): Promise<Result$1<TenantResponseDTO, DomainError>>;
2312
+ /**
2313
+ * 更新租户
2314
+ *
2315
+ * @param id - 租户 ID
2316
+ * @param input - 更新参数
2317
+ * @returns 更新后的租户 DTO
2318
+ */
2319
+ update(id: string, input: UpdateTenantInputDTO): Promise<Result$1<TenantResponseDTO, DomainError>>;
2320
+ /**
2321
+ * 删除租户
2322
+ *
2323
+ * @param id - 租户 ID
2324
+ * @returns 是否删除成功
2325
+ */
2326
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2327
+ }
2328
+ //#endregion
2329
+ //#region src/in-memory-tenant-context.adapter.d.ts
2330
+ /**
2331
+ * 内存租户上下文适配器
2332
+ *
2333
+ * 实现 TenantContextPort 接口,使用内存存储当前租户信息。
2334
+ */
2335
+ declare class InMemoryTenantContextAdapter implements TenantContextPort {
2336
+ private currentTenant;
2337
+ /**
2338
+ * 获取当前租户
2339
+ *
2340
+ * @returns 当前租户信息,不存在时返回 null
2341
+ */
2342
+ getCurrentTenant(): TenantInfo | null;
2343
+ /**
2344
+ * 设置当前租户
2345
+ *
2346
+ * @param tenant - 租户信息
2347
+ */
2348
+ setTenant(tenant: TenantInfo): void;
2349
+ /**
2350
+ * 验证租户
2351
+ *
2352
+ * @param tenantId - 租户 ID
2353
+ * @returns 验证结果
2354
+ */
2355
+ validateTenant(tenantId: string): Promise<TenantValidationResult>;
2356
+ /**
2357
+ * 清除当前租户
2358
+ */
2359
+ clearTenant(): void;
2360
+ }
2361
+ //#endregion
2362
+ //#region src/in-memory-tenant-resolver.adapter.d.ts
2363
+ /**
2364
+ * 内存租户解析器适配器
2365
+ *
2366
+ * 实现 TenantResolverPort 接口,支持从请求头、子域名、令牌解析租户信息。
2367
+ */
2368
+ declare class InMemoryTenantResolverAdapter implements TenantResolverPort {
2369
+ private readonly tenantStore;
2370
+ private readonly slugIndex;
2371
+ /**
2372
+ * 注册租户信息
2373
+ *
2374
+ * @param tenant - 租户信息
2375
+ */
2376
+ registerTenant(tenant: TenantInfo): void;
2377
+ /**
2378
+ * 从请求头解析租户
2379
+ *
2380
+ * @param headers - 请求头
2381
+ * @returns 租户信息,不存在时返回 null
2382
+ */
2383
+ resolveFromHeader(headers: Record<string, string>): Promise<TenantInfo | null>;
2384
+ /**
2385
+ * 从子域名解析租户
2386
+ *
2387
+ * @param host - 主机名
2388
+ * @returns 租户信息,不存在时返回 null
2389
+ */
2390
+ resolveFromSubdomain(host: string): Promise<TenantInfo | null>;
2391
+ /**
2392
+ * 从令牌解析租户
2393
+ *
2394
+ * @param token - 令牌
2395
+ * @returns 租户信息,不存在时返回 null
2396
+ */
2397
+ resolveFromToken(token: string): Promise<TenantInfo | null>;
2398
+ }
2399
+ //#endregion
2400
+ //#region ../../domains/membership/contract/dist/index.d.ts
2401
+ declare const MemberResponseSchema: ZodObject<{
2402
+ id: ZodString;
2403
+ tenantId: ZodString;
2404
+ userId: ZodString;
2405
+ role: ZodEnum<{
2406
+ owner: "owner";
2407
+ admin: "admin";
2408
+ member: "member";
2409
+ viewer: "viewer";
2410
+ }>;
2411
+ joinedAt: ZodString;
2412
+ status: ZodEnum<{
2413
+ active: "active";
2414
+ inactive: "inactive";
2415
+ }>;
2416
+ }, $strip>;
2417
+ declare const AddMemberInputSchema: ZodObject<{
2418
+ userId: ZodString;
2419
+ role: ZodEnum<{
2420
+ owner: "owner";
2421
+ admin: "admin";
2422
+ member: "member";
2423
+ viewer: "viewer";
2424
+ }>;
2425
+ }, $strip>;
2426
+ declare const ChangeMemberRoleInputSchema: ZodObject<{
2427
+ role: ZodEnum<{
2428
+ owner: "owner";
2429
+ admin: "admin";
2430
+ member: "member";
2431
+ viewer: "viewer";
2432
+ }>;
2433
+ }, $strip>; //#endregion
2434
+ //#region src/types/member-dto.types.d.ts
2435
+ type MemberResponseDTO = output<typeof MemberResponseSchema>;
2436
+ type AddMemberInputDTO = output<typeof AddMemberInputSchema>;
2437
+ type ChangeMemberRoleInputDTO = output<typeof ChangeMemberRoleInputSchema>; //#endregion
2438
+ //#region src/ports/member.port.d.ts
2439
+ /**
2440
+ * 成员端口接口
2441
+ *
2442
+ * 定义成员域所有应用操作的契约。
2443
+ * 所有方法返回 Result<DTO, DomainError> 类型,支持类型安全的错误处理。
2444
+ */
2445
+ type MemberPort = {
2446
+ /**
2447
+ * 根据 ID 获取成员
2448
+ *
2449
+ * @param id - 成员 ID
2450
+ * @returns 成员 DTO,不存在时返回 null
2451
+ */
2452
+ findById(id: string): Promise<Result$1<MemberResponseDTO | null, DomainError>>;
2453
+ /**
2454
+ * 根据租户 ID 获取成员列表
2455
+ *
2456
+ * @param tenantId - 租户 ID
2457
+ * @returns 成员 DTO 列表
2458
+ */
2459
+ findByTenantId(tenantId: string): Promise<Result$1<MemberResponseDTO[], DomainError>>;
2460
+ /**
2461
+ * 根据用户 ID 获取成员列表
2462
+ *
2463
+ * @param userId - 用户 ID
2464
+ * @returns 成员 DTO 列表
2465
+ */
2466
+ findByUserId(userId: string): Promise<Result$1<MemberResponseDTO[], DomainError>>;
2467
+ /**
2468
+ * 根据租户和用户查找成员
2469
+ *
2470
+ * @param tenantId - 租户 ID
2471
+ * @param userId - 用户 ID
2472
+ * @returns 成员 DTO,不存在时返回 null
2473
+ */
2474
+ findByTenantAndUser(tenantId: string, userId: string): Promise<Result$1<MemberResponseDTO | null, DomainError>>;
2475
+ /**
2476
+ * 添加成员
2477
+ *
2478
+ * @param input - 添加成员参数
2479
+ * @returns 创建的成员 DTO
2480
+ */
2481
+ add(input: AddMemberInputDTO): Promise<Result$1<MemberResponseDTO, DomainError>>;
2482
+ /**
2483
+ * 变更成员角色
2484
+ *
2485
+ * @param id - 成员 ID
2486
+ * @param input - 变更角色参数
2487
+ * @returns 更新后的成员 DTO
2488
+ */
2489
+ changeRole(id: string, input: ChangeMemberRoleInputDTO): Promise<Result$1<MemberResponseDTO, DomainError>>;
2490
+ /**
2491
+ * 删除成员
2492
+ *
2493
+ * @param id - 成员 ID
2494
+ * @returns 是否删除成功
2495
+ */
2496
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2497
+ };
2498
+ /**
2499
+ * 成员端口 DI 令牌
2500
+ */
2501
+ declare const InvitationResponseSchema: ZodObject<{
2502
+ id: ZodString;
2503
+ tenantId: ZodString;
2504
+ inviteCode: ZodString;
2505
+ email: ZodString;
2506
+ role: ZodEnum<{
2507
+ owner: "owner";
2508
+ admin: "admin";
2509
+ member: "member";
2510
+ viewer: "viewer";
2511
+ }>;
2512
+ expiresAt: ZodString;
2513
+ status: ZodEnum<{
2514
+ pending: "pending";
2515
+ accepted: "accepted";
2516
+ expired: "expired";
2517
+ cancelled: "cancelled";
2518
+ }>;
2519
+ usedBy: ZodNullable<ZodString>;
2520
+ usedAt: ZodNullable<ZodString>;
2521
+ }, $strip>;
2522
+ declare const CreateInvitationInputSchema: ZodObject<{
2523
+ email: ZodString;
2524
+ role: ZodEnum<{
2525
+ owner: "owner";
2526
+ admin: "admin";
2527
+ member: "member";
2528
+ viewer: "viewer";
2529
+ }>;
2530
+ expiresInHours: ZodOptional<ZodNumber>;
2531
+ }, $strip>;
2532
+ declare const AcceptInvitationInputSchema: ZodObject<{
2533
+ inviteCode: ZodString;
2534
+ }, $strip>; //#endregion
2535
+ //#region src/types/invitation-dto.types.d.ts
2536
+ type InvitationResponseDTO = output<typeof InvitationResponseSchema>;
2537
+ type CreateInvitationInputDTO = output<typeof CreateInvitationInputSchema>;
2538
+ type AcceptInvitationInputDTO = output<typeof AcceptInvitationInputSchema>; //#endregion
2539
+ //#region src/ports/invitation.port.d.ts
2540
+ /**
2541
+ * 邀请端口接口
2542
+ *
2543
+ * 定义邀请域所有应用操作的契约。
2544
+ * 所有方法返回 Result<DTO, DomainError> 类型,支持类型安全的错误处理。
2545
+ */
2546
+ type InvitationPort = {
2547
+ /**
2548
+ * 根据 ID 获取邀请
2549
+ *
2550
+ * @param id - 邀请 ID
2551
+ * @returns 邀请 DTO,不存在时返回 null
2552
+ */
2553
+ findById(id: string): Promise<Result$1<InvitationResponseDTO | null, DomainError>>;
2554
+ /**
2555
+ * 根据租户 ID 获取邀请列表
2556
+ *
2557
+ * @param tenantId - 租户 ID
2558
+ * @returns 邀请 DTO 列表
2559
+ */
2560
+ findByTenantId(tenantId: string): Promise<Result$1<InvitationResponseDTO[], DomainError>>;
2561
+ /**
2562
+ * 根据邀请码获取邀请
2563
+ *
2564
+ * @param code - 邀请码
2565
+ * @returns 邀请 DTO,不存在时返回 null
2566
+ */
2567
+ findByCode(code: string): Promise<Result$1<InvitationResponseDTO | null, DomainError>>;
2568
+ /**
2569
+ * 创建邀请
2570
+ *
2571
+ * @param input - 创建邀请参数
2572
+ * @returns 创建的邀请 DTO
2573
+ */
2574
+ create(input: CreateInvitationInputDTO): Promise<Result$1<InvitationResponseDTO, DomainError>>;
2575
+ /**
2576
+ * 接受邀请
2577
+ *
2578
+ * @param input - 接受邀请参数
2579
+ * @returns 更新后的邀请 DTO
2580
+ */
2581
+ accept(input: AcceptInvitationInputDTO): Promise<Result$1<InvitationResponseDTO, DomainError>>;
2582
+ /**
2583
+ * 删除邀请
2584
+ *
2585
+ * @param id - 邀请 ID
2586
+ * @returns 是否删除成功
2587
+ */
2588
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2589
+ };
2590
+ /**
2591
+ * 邀请端口 DI 令牌
2592
+ */
2593
+ //#endregion
2594
+ //#region src/in-memory-member.adapter.d.ts
2595
+ /**
2596
+ * 内存成员端口适配器
2597
+ *
2598
+ * 实现 MemberPort 接口,使用内存 Map 存储数据。
2599
+ * 所有方法返回 Result<DTO, DomainError> 类型。
2600
+ */
2601
+ declare class InMemoryMemberAdapter implements MemberPort {
2602
+ private readonly store;
2603
+ /**
2604
+ * 根据 ID 获取成员
2605
+ *
2606
+ * @param id - 成员 ID
2607
+ * @returns 成员 DTO,不存在时返回 null
2608
+ */
2609
+ findById(id: string): Promise<Result$1<MemberResponseDTO | null, DomainError>>;
2610
+ /**
2611
+ * 根据租户 ID 获取成员列表
2612
+ *
2613
+ * @param tenantId - 租户 ID
2614
+ * @returns 成员 DTO 列表
2615
+ */
2616
+ findByTenantId(tenantId: string): Promise<Result$1<MemberResponseDTO[], DomainError>>;
2617
+ /**
2618
+ * 根据用户 ID 获取成员列表
2619
+ *
2620
+ * @param userId - 用户 ID
2621
+ * @returns 成员 DTO 列表
2622
+ */
2623
+ findByUserId(userId: string): Promise<Result$1<MemberResponseDTO[], DomainError>>;
2624
+ /**
2625
+ * 根据租户和用户查找成员
2626
+ *
2627
+ * @param tenantId - 租户 ID
2628
+ * @param userId - 用户 ID
2629
+ * @returns 成员 DTO,不存在时返回 null
2630
+ */
2631
+ findByTenantAndUser(tenantId: string, userId: string): Promise<Result$1<MemberResponseDTO | null, DomainError>>;
2632
+ /**
2633
+ * 添加成员
2634
+ *
2635
+ * @param input - 添加成员参数
2636
+ * @returns 创建的成员 DTO
2637
+ */
2638
+ add(input: AddMemberInputDTO): Promise<Result$1<MemberResponseDTO, DomainError>>;
2639
+ /**
2640
+ * 变更成员角色
2641
+ *
2642
+ * @param id - 成员 ID
2643
+ * @param input - 变更角色参数
2644
+ * @returns 更新后的成员 DTO
2645
+ */
2646
+ changeRole(id: string, input: ChangeMemberRoleInputDTO): Promise<Result$1<MemberResponseDTO, DomainError>>;
2647
+ /**
2648
+ * 删除成员
2649
+ *
2650
+ * @param id - 成员 ID
2651
+ * @returns 是否删除成功
2652
+ */
2653
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2654
+ }
2655
+ //#endregion
2656
+ //#region src/in-memory-invitation.adapter.d.ts
2657
+ /**
2658
+ * 内存邀请端口适配器
2659
+ *
2660
+ * 实现 InvitationPort 接口,使用内存 Map 存储数据。
2661
+ * 所有方法返回 Result<DTO, DomainError> 类型。
2662
+ */
2663
+ declare class InMemoryInvitationAdapter implements InvitationPort {
2664
+ private readonly store;
2665
+ private readonly codeIndex;
2666
+ /**
2667
+ * 根据 ID 获取邀请
2668
+ *
2669
+ * @param id - 邀请 ID
2670
+ * @returns 邀请 DTO,不存在时返回 null
2671
+ */
2672
+ findById(id: string): Promise<Result$1<InvitationResponseDTO | null, DomainError>>;
2673
+ /**
2674
+ * 根据租户 ID 获取邀请列表
2675
+ *
2676
+ * @param tenantId - 租户 ID
2677
+ * @returns 邀请 DTO 列表
2678
+ */
2679
+ findByTenantId(tenantId: string): Promise<Result$1<InvitationResponseDTO[], DomainError>>;
2680
+ /**
2681
+ * 根据邀请码获取邀请
2682
+ *
2683
+ * @param code - 邀请码
2684
+ * @returns 邀请 DTO,不存在时返回 null
2685
+ */
2686
+ findByCode(code: string): Promise<Result$1<InvitationResponseDTO | null, DomainError>>;
2687
+ /**
2688
+ * 创建邀请
2689
+ *
2690
+ * @param input - 创建邀请参数
2691
+ * @returns 创建的邀请 DTO
2692
+ */
2693
+ create(input: CreateInvitationInputDTO): Promise<Result$1<InvitationResponseDTO, DomainError>>;
2694
+ /**
2695
+ * 接受邀请
2696
+ *
2697
+ * @param input - 接受邀请参数
2698
+ * @returns 更新后的邀请 DTO
2699
+ */
2700
+ accept(input: AcceptInvitationInputDTO): Promise<Result$1<InvitationResponseDTO, DomainError>>;
2701
+ /**
2702
+ * 删除邀请
2703
+ *
2704
+ * @param id - 邀请 ID
2705
+ * @returns 是否删除成功
2706
+ */
2707
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2708
+ }
2709
+ //#endregion
2710
+ //#region ../../domains/subscription/contract/dist/index.d.ts
2711
+ declare const PlanResponseSchema: ZodObject<{
2712
+ id: ZodString;
2713
+ name: ZodString;
2714
+ description: ZodNullable<ZodString>;
2715
+ features: ZodArray<ZodString>;
2716
+ limits: ZodRecord<ZodString, ZodNumber>;
2717
+ price: ZodNumber;
2718
+ billingCycle: ZodEnum<{
2719
+ monthly: "monthly";
2720
+ yearly: "yearly";
2721
+ lifetime: "lifetime";
2722
+ }>;
2723
+ status: ZodEnum<{
2724
+ active: "active";
2725
+ archived: "archived";
2726
+ }>;
2727
+ }, $strip>;
2728
+ declare const CreatePlanInputSchema: ZodObject<{
2729
+ name: ZodString;
2730
+ description: ZodOptional<ZodNullable<ZodString>>;
2731
+ features: ZodArray<ZodString>;
2732
+ limits: ZodRecord<ZodString, ZodNumber>;
2733
+ price: ZodNumber;
2734
+ billingCycle: ZodEnum<{
2735
+ monthly: "monthly";
2736
+ yearly: "yearly";
2737
+ lifetime: "lifetime";
2738
+ }>;
2739
+ }, $strip>; //#endregion
2740
+ //#region src/types/plan-dto.types.d.ts
2741
+ type PlanResponseDTO = output<typeof PlanResponseSchema>;
2742
+ type CreatePlanInputDTO = output<typeof CreatePlanInputSchema>; //#endregion
2743
+ //#region src/ports/plan.port.d.ts
2744
+ /**
2745
+ * 计划端口接口
2746
+ *
2747
+ * 定义计划域所有应用操作的契约。
2748
+ * 所有方法返回 Result<DTO, DomainError> 类型,支持类型安全的错误处理。
2749
+ */
2750
+ type PlanPort = {
2751
+ /**
2752
+ * 根据 ID 获取计划
2753
+ *
2754
+ * @param id - 计划 ID
2755
+ * @returns 计划 DTO,不存在时返回 null
2756
+ */
2757
+ findById(id: string): Promise<Result$1<PlanResponseDTO | null, DomainError>>;
2758
+ /**
2759
+ * 获取所有计划
2760
+ *
2761
+ * @returns 计划 DTO 列表
2762
+ */
2763
+ findAll(): Promise<Result$1<PlanResponseDTO[], DomainError>>;
2764
+ /**
2765
+ * 创建计划
2766
+ *
2767
+ * @param input - 创建计划参数
2768
+ * @returns 创建的计划 DTO
2769
+ */
2770
+ create(input: CreatePlanInputDTO): Promise<Result$1<PlanResponseDTO, DomainError>>;
2771
+ /**
2772
+ * 删除计划
2773
+ *
2774
+ * @param id - 计划 ID
2775
+ * @returns 是否删除成功
2776
+ */
2777
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2778
+ };
2779
+ /**
2780
+ * 计划端口 DI 令牌
2781
+ */
2782
+ declare const SubscriptionResponseSchema: ZodObject<{
2783
+ id: ZodString;
2784
+ tenantId: ZodString;
2785
+ planId: ZodString;
2786
+ status: ZodEnum<{
2787
+ active: "active";
2788
+ expired: "expired";
2789
+ cancelled: "cancelled";
2790
+ trial: "trial";
2791
+ }>;
2792
+ startDate: ZodString;
2793
+ endDate: ZodNullable<ZodString>;
2794
+ trialEndAt: ZodNullable<ZodString>;
2795
+ }, $strip>;
2796
+ declare const SubscribeInputSchema: ZodObject<{
2797
+ planId: ZodString;
2798
+ trialDays: ZodOptional<ZodNumber>;
2799
+ }, $strip>; //#endregion
2800
+ //#region src/types/subscription-dto.types.d.ts
2801
+ type SubscriptionResponseDTO = output<typeof SubscriptionResponseSchema>;
2802
+ type SubscribeInputDTO = output<typeof SubscribeInputSchema>; //#endregion
2803
+ //#region src/ports/subscription.port.d.ts
2804
+ /**
2805
+ * 订阅端口接口
2806
+ *
2807
+ * 定义订阅域所有应用操作的契约。
2808
+ * 所有方法返回 Result<DTO, DomainError> 类型,支持类型安全的错误处理。
2809
+ */
2810
+ type SubscriptionPort = {
2811
+ /**
2812
+ * 根据 ID 获取订阅
2813
+ *
2814
+ * @param id - 订阅 ID
2815
+ * @returns 订阅 DTO,不存在时返回 null
2816
+ */
2817
+ findById(id: string): Promise<Result$1<SubscriptionResponseDTO | null, DomainError>>;
2818
+ /**
2819
+ * 根据租户 ID 获取订阅
2820
+ *
2821
+ * @param tenantId - 租户 ID
2822
+ * @returns 订阅 DTO,不存在时返回 null
2823
+ */
2824
+ findByTenantId(tenantId: string): Promise<Result$1<SubscriptionResponseDTO | null, DomainError>>;
2825
+ /**
2826
+ * 订阅计划
2827
+ *
2828
+ * @param input - 订阅参数
2829
+ * @returns 创建的订阅 DTO
2830
+ */
2831
+ subscribe(input: SubscribeInputDTO): Promise<Result$1<SubscriptionResponseDTO, DomainError>>;
2832
+ /**
2833
+ * 删除订阅
2834
+ *
2835
+ * @param id - 订阅 ID
2836
+ * @returns 是否删除成功
2837
+ */
2838
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2839
+ };
2840
+ /**
2841
+ * 订阅端口 DI 令牌
2842
+ */
2843
+ //#endregion
2844
+ //#region src/in-memory-subscription.adapter.d.ts
2845
+ /**
2846
+ * 内存订阅端口适配器
2847
+ *
2848
+ * 实现 SubscriptionPort 接口,使用内存 Map 存储数据。
2849
+ * 所有方法返回 Result<DTO, DomainError> 类型。
2850
+ */
2851
+ declare class InMemorySubscriptionAdapter implements SubscriptionPort {
2852
+ private readonly store;
2853
+ private readonly tenantIndex;
2854
+ /**
2855
+ * 根据 ID 获取订阅
2856
+ *
2857
+ * @param id - 订阅 ID
2858
+ * @returns 订阅 DTO,不存在时返回 null
2859
+ */
2860
+ findById(id: string): Promise<Result$1<SubscriptionResponseDTO | null, DomainError>>;
2861
+ /**
2862
+ * 根据租户 ID 获取订阅
2863
+ *
2864
+ * @param tenantId - 租户 ID
2865
+ * @returns 订阅 DTO,不存在时返回 null
2866
+ */
2867
+ findByTenantId(tenantId: string): Promise<Result$1<SubscriptionResponseDTO | null, DomainError>>;
2868
+ /**
2869
+ * 订阅计划
2870
+ *
2871
+ * @param input - 订阅参数
2872
+ * @returns 创建的订阅 DTO
2873
+ */
2874
+ subscribe(input: SubscribeInputDTO): Promise<Result$1<SubscriptionResponseDTO, DomainError>>;
2875
+ /**
2876
+ * 删除订阅
2877
+ *
2878
+ * @param id - 订阅 ID
2879
+ * @returns 是否删除成功
2880
+ */
2881
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2882
+ }
2883
+ //#endregion
2884
+ //#region src/in-memory-plan.adapter.d.ts
2885
+ /**
2886
+ * 内存计划端口适配器
2887
+ *
2888
+ * 实现 PlanPort 接口,使用内存 Map 存储数据。
2889
+ * 所有方法返回 Result<DTO, DomainError> 类型。
2890
+ */
2891
+ declare class InMemoryPlanAdapter implements PlanPort {
2892
+ private readonly store;
2893
+ /**
2894
+ * 根据 ID 获取计划
2895
+ *
2896
+ * @param id - 计划 ID
2897
+ * @returns 计划 DTO,不存在时返回 null
2898
+ */
2899
+ findById(id: string): Promise<Result$1<PlanResponseDTO | null, DomainError>>;
2900
+ /**
2901
+ * 获取所有计划
2902
+ *
2903
+ * @returns 计划 DTO 列表
2904
+ */
2905
+ findAll(): Promise<Result$1<PlanResponseDTO[], DomainError>>;
2906
+ /**
2907
+ * 创建计划
2908
+ *
2909
+ * @param input - 创建计划参数
2910
+ * @returns 创建的计划 DTO
2911
+ */
2912
+ create(input: CreatePlanInputDTO): Promise<Result$1<PlanResponseDTO, DomainError>>;
2913
+ /**
2914
+ * 删除计划
2915
+ *
2916
+ * @param id - 计划 ID
2917
+ * @returns 是否删除成功
2918
+ */
2919
+ delete(id: string): Promise<Result$1<void, DomainError>>;
2920
+ }
2921
+ //#endregion
2922
+ //#region ../../domains/quota/contract/dist/index.d.ts
2923
+ declare const QuotaResponseSchema: ZodObject<{
2924
+ id: ZodString;
2925
+ tenantId: ZodString;
2926
+ resourceType: ZodEnum<{
2927
+ members: "members";
2928
+ projects: "projects";
2929
+ storage: "storage";
2930
+ api_calls: "api_calls";
2931
+ }>;
2932
+ limit: ZodNumber;
2933
+ used: ZodNumber;
2934
+ period: ZodEnum<{
2935
+ monthly: "monthly";
2936
+ yearly: "yearly";
2937
+ total: "total";
2938
+ }>;
2939
+ }, $strip>;
2940
+ declare const QuotaCheckResultSchema: ZodObject<{
2941
+ allowed: ZodBoolean;
2942
+ resourceType: ZodEnum<{
2943
+ members: "members";
2944
+ projects: "projects";
2945
+ storage: "storage";
2946
+ api_calls: "api_calls";
2947
+ }>;
2948
+ current: ZodNumber;
2949
+ limit: ZodNumber;
2950
+ }, $strip>;
2951
+ declare const AdjustQuotaInputSchema: ZodObject<{
2952
+ resourceType: ZodEnum<{
2953
+ members: "members";
2954
+ projects: "projects";
2955
+ storage: "storage";
2956
+ api_calls: "api_calls";
2957
+ }>;
2958
+ limit: ZodNumber;
2959
+ }, $strip>; //#endregion
2960
+ //#region src/types/quota-dto.types.d.ts
2961
+ type QuotaResponseDTO = output<typeof QuotaResponseSchema>;
2962
+ type QuotaCheckResultDTO = output<typeof QuotaCheckResultSchema>;
2963
+ type AdjustQuotaInputDTO = output<typeof AdjustQuotaInputSchema>; //#endregion
2964
+ //#region src/ports/quota.port.d.ts
2965
+ /**
2966
+ * 配额端口接口
2967
+ *
2968
+ * 定义配额域所有应用操作的契约。
2969
+ * 所有方法返回 Result<DTO, DomainError> 类型,支持类型安全的错误处理。
2970
+ */
2971
+ type QuotaPort = {
2972
+ /**
2973
+ * 根据 ID 获取配额
2974
+ *
2975
+ * @param id - 配额 ID
2976
+ * @returns 配额 DTO,不存在时返回 null
2977
+ */
2978
+ findById(id: string): Promise<Result$1<QuotaResponseDTO | null, DomainError>>;
2979
+ /**
2980
+ * 根据租户 ID 获取配额列表
2981
+ *
2982
+ * @param tenantId - 租户 ID
2983
+ * @returns 配额 DTO 列表
2984
+ */
2985
+ findByTenantId(tenantId: string): Promise<Result$1<QuotaResponseDTO[], DomainError>>;
2986
+ /**
2987
+ * 根据租户和资源类型查找配额
2988
+ *
2989
+ * @param tenantId - 租户 ID
2990
+ * @param resourceType - 资源类型
2991
+ * @returns 配额 DTO,不存在时返回 null
2992
+ */
2993
+ findByTenantAndType(tenantId: string, resourceType: 'members' | 'projects' | 'storage' | 'api_calls'): Promise<Result$1<QuotaResponseDTO | null, DomainError>>;
2994
+ /**
2995
+ * 检查配额
2996
+ *
2997
+ * @param tenantId - 租户 ID
2998
+ * @param resourceType - 资源类型
2999
+ * @returns 配额检查结果 DTO
3000
+ */
3001
+ check(tenantId: string, resourceType: 'members' | 'projects' | 'storage' | 'api_calls'): Promise<Result$1<QuotaCheckResultDTO, DomainError>>;
3002
+ /**
3003
+ * 调整配额
3004
+ *
3005
+ * @param input - 调整配额参数
3006
+ * @returns 更新后的配额 DTO
3007
+ */
3008
+ adjust(input: AdjustQuotaInputDTO): Promise<Result$1<QuotaResponseDTO, DomainError>>;
3009
+ /**
3010
+ * 删除配额
3011
+ *
3012
+ * @param id - 配额 ID
3013
+ * @returns 是否删除成功
3014
+ */
3015
+ delete(id: string): Promise<Result$1<void, DomainError>>;
3016
+ };
3017
+ /**
3018
+ * 配额端口 DI 令牌
3019
+ */
3020
+ //#endregion
3021
+ //#region src/in-memory-quota.adapter.d.ts
3022
+ /**
3023
+ * 内存配额端口适配器
3024
+ *
3025
+ * 实现 QuotaPort 接口,使用内存 Map 存储数据。
3026
+ * 所有方法返回 Result<DTO, DomainError> 类型。
3027
+ */
3028
+ declare class InMemoryQuotaAdapter implements QuotaPort {
3029
+ private readonly store;
3030
+ /**
3031
+ * 根据 ID 获取配额
3032
+ *
3033
+ * @param id - 配额 ID
3034
+ * @returns 配额 DTO,不存在时返回 null
3035
+ */
3036
+ findById(id: string): Promise<Result$1<QuotaResponseDTO | null, DomainError>>;
3037
+ /**
3038
+ * 根据租户 ID 获取配额列表
3039
+ *
3040
+ * @param tenantId - 租户 ID
3041
+ * @returns 配额 DTO 列表
3042
+ */
3043
+ findByTenantId(tenantId: string): Promise<Result$1<QuotaResponseDTO[], DomainError>>;
3044
+ /**
3045
+ * 根据租户和资源类型查找配额
3046
+ *
3047
+ * @param tenantId - 租户 ID
3048
+ * @param resourceType - 资源类型
3049
+ * @returns 配额 DTO,不存在时返回 null
3050
+ */
3051
+ findByTenantAndType(tenantId: string, resourceType: 'members' | 'projects' | 'storage' | 'api_calls'): Promise<Result$1<QuotaResponseDTO | null, DomainError>>;
3052
+ /**
3053
+ * 检查配额
3054
+ *
3055
+ * @param tenantId - 租户 ID
3056
+ * @param resourceType - 资源类型
3057
+ * @returns 配额检查结果 DTO
3058
+ */
3059
+ check(tenantId: string, resourceType: 'members' | 'projects' | 'storage' | 'api_calls'): Promise<Result$1<QuotaCheckResultDTO, DomainError>>;
3060
+ /**
3061
+ * 调整配额
3062
+ *
3063
+ * @param input - 调整配额参数
3064
+ * @returns 更新后的配额 DTO
3065
+ */
3066
+ adjust(input: AdjustQuotaInputDTO): Promise<Result$1<QuotaResponseDTO, DomainError>>;
3067
+ /**
3068
+ * 删除配额
3069
+ *
3070
+ * @param id - 配额 ID
3071
+ * @returns 是否删除成功
3072
+ */
3073
+ delete(id: string): Promise<Result$1<void, DomainError>>;
3074
+ }
3075
+ //#endregion
3076
+ //#region src/create-memory-preset.d.ts
3077
+ /**
3078
+ * 内存适配器预设
3079
+ *
3080
+ * 创建所有内存适配器实例,返回 Port 实现集合。
3081
+ * 适用于开发和测试环境。
3082
+ */
3083
+ type MemoryPreset = {
3084
+ /** 租户域端口 */tenantPort: InMemoryTenantAdapter; /** 租户上下文端口 */
3085
+ tenantContextPort: InMemoryTenantContextAdapter; /** 租户解析器端口 */
3086
+ tenantResolverPort: InMemoryTenantResolverAdapter; /** 成员端口 */
3087
+ memberPort: InMemoryMemberAdapter; /** 邀请端口 */
3088
+ invitationPort: InMemoryInvitationAdapter; /** 计划端口 */
3089
+ planPort: InMemoryPlanAdapter; /** 订阅端口 */
3090
+ subscriptionPort: InMemorySubscriptionAdapter; /** 配额端口 */
3091
+ quotaPort: InMemoryQuotaAdapter;
3092
+ };
3093
+ /**
3094
+ * 创建内存适配器预设
3095
+ *
3096
+ * @returns 内存适配器预设实例
3097
+ */
3098
+ declare function createMemoryPreset(): MemoryPreset;
3099
+ //#endregion
3100
+ //#region src/create-elysia-preset.d.ts
3101
+ /**
3102
+ * 创建 In-Memory 租户 Elysia 预设
3103
+ *
3104
+ * 开箱即用的内存版租户服务,无需任何配置。
3105
+ * 适用于开发和测试环境。
3106
+ *
3107
+ * @returns Elysia 插件函数
3108
+ */
3109
+ declare function createTenantPreset(): (app: Elysia) => Elysia<"", {
3110
+ decorator: {};
3111
+ store: {};
3112
+ derive: {};
3113
+ resolve: {};
3114
+ }, {
3115
+ typebox: {};
3116
+ error: {};
3117
+ }, {
3118
+ schema: {};
3119
+ standaloneSchema: {};
3120
+ macro: {};
3121
+ macroFn: {};
3122
+ parser: {};
3123
+ response: {};
3124
+ }, {}, {
3125
+ derive: {};
3126
+ resolve: {};
3127
+ schema: {};
3128
+ standaloneSchema: {};
3129
+ response: {};
3130
+ }, {
3131
+ derive: {};
3132
+ resolve: {};
3133
+ schema: {};
3134
+ standaloneSchema: {};
3135
+ response: {};
3136
+ }>;
3137
+ //#endregion
3138
+ export { InMemoryInvitationAdapter, InMemoryMemberAdapter, InMemoryPlanAdapter, InMemoryQuotaAdapter, InMemorySubscriptionAdapter, InMemoryTenantAdapter, InMemoryTenantContextAdapter, InMemoryTenantResolverAdapter, type MemoryPreset, createMemoryPreset, createTenantPreset };