skill-creator 1.5.2 → 2.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.
- package/CHANGELOG.md +89 -0
- package/LICENSE +21 -0
- package/README.md +248 -345
- package/dist/cli.js +51209 -0
- package/dist/cli.js.map +7 -0
- package/dist/daemon.js +52243 -0
- package/dist/daemon.js.map +7 -0
- package/dist/package.json +5 -0
- package/dist/webui/_app/immutable/assets/0.0XN00VKF.css +2 -0
- package/dist/webui/_app/immutable/assets/ProviderView.DEH95hqa.css +1 -0
- package/dist/webui/_app/immutable/assets/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2 +0 -0
- package/dist/webui/_app/immutable/assets/inter-cyrillic-wght-normal.DqGufNeO.woff2 +0 -0
- package/dist/webui/_app/immutable/assets/inter-greek-ext-wght-normal.DlzME5K_.woff2 +0 -0
- package/dist/webui/_app/immutable/assets/inter-greek-wght-normal.CkhJZR-_.woff2 +0 -0
- package/dist/webui/_app/immutable/assets/inter-latin-ext-wght-normal.DO1Apj_S.woff2 +0 -0
- package/dist/webui/_app/immutable/assets/inter-latin-wght-normal.Dx4kXJAl.woff2 +0 -0
- package/dist/webui/_app/immutable/assets/inter-vietnamese-wght-normal.CBcvBZtf.woff2 +0 -0
- package/dist/webui/_app/immutable/assets/shell.U4CQV8re.css +1 -0
- package/dist/webui/_app/immutable/chunks/0umLG1IN.js +1 -0
- package/dist/webui/_app/immutable/chunks/B0pe_B_o.js +1 -0
- package/dist/webui/_app/immutable/chunks/BEPs9Z9s.js +1 -0
- package/dist/webui/_app/immutable/chunks/BEsyQXpe.js +1 -0
- package/dist/webui/_app/immutable/chunks/BIfnT_mK.js +1 -0
- package/dist/webui/_app/immutable/chunks/BQ8kO0xi.js +2 -0
- package/dist/webui/_app/immutable/chunks/BYNWtKcf.js +259 -0
- package/dist/webui/_app/immutable/chunks/BZ2Jwl6O.js +1 -0
- package/dist/webui/_app/immutable/chunks/Bg2k7op5.js +1 -0
- package/dist/webui/_app/immutable/chunks/Bjy-W4x2.js +81 -0
- package/dist/webui/_app/immutable/chunks/BkEnd9_Z.js +1 -0
- package/dist/webui/_app/immutable/chunks/BoMQFGOq.js +52 -0
- package/dist/webui/_app/immutable/chunks/Bs27XW8_.js +1 -0
- package/dist/webui/_app/immutable/chunks/C3mlWJXx.js +1 -0
- package/dist/webui/_app/immutable/chunks/CGrKeCdk.js +8 -0
- package/dist/webui/_app/immutable/chunks/CIFG41pU.js +1 -0
- package/dist/webui/_app/immutable/chunks/CNPsST_i.js +1 -0
- package/dist/webui/_app/immutable/chunks/COoMyR0G.js +1 -0
- package/dist/webui/_app/immutable/chunks/CQD9uzpA.js +1 -0
- package/dist/webui/_app/immutable/chunks/CeR4do8T.js +1 -0
- package/dist/webui/_app/immutable/chunks/Ckw1quWt.js +1 -0
- package/dist/webui/_app/immutable/chunks/CmCJ0SKP.js +3 -0
- package/dist/webui/_app/immutable/chunks/CqzSRtkf.js +1 -0
- package/dist/webui/_app/immutable/chunks/CsaIfA9E.js +1 -0
- package/dist/webui/_app/immutable/chunks/D-Jy42mM.js +1 -0
- package/dist/webui/_app/immutable/chunks/D-V0xBeS.js +1 -0
- package/dist/webui/_app/immutable/chunks/D8Der6oM.js +1 -0
- package/dist/webui/_app/immutable/chunks/DPrjly2t.js +1 -0
- package/dist/webui/_app/immutable/chunks/DZ_Kltd5.js +1 -0
- package/dist/webui/_app/immutable/chunks/DecrR9TK.js +1 -0
- package/dist/webui/_app/immutable/chunks/Dl8eQ129.js +5 -0
- package/dist/webui/_app/immutable/chunks/Dnkino9G.js +1 -0
- package/dist/webui/_app/immutable/chunks/FuwccWbx.js +1 -0
- package/dist/webui/_app/immutable/chunks/HclGiUj8.js +1 -0
- package/dist/webui/_app/immutable/chunks/J36u8XLO.js +1 -0
- package/dist/webui/_app/immutable/chunks/JcDjicYT.js +1 -0
- package/dist/webui/_app/immutable/chunks/O2CEZ91h.js +1 -0
- package/dist/webui/_app/immutable/chunks/UeEccMjN.js +1 -0
- package/dist/webui/_app/immutable/chunks/Y--VMh3y.js +1 -0
- package/dist/webui/_app/immutable/chunks/gkPAnPzC.js +3 -0
- package/dist/webui/_app/immutable/chunks/r1y9r7sj.js +2 -0
- package/dist/webui/_app/immutable/chunks/s48N5eaK.js +67 -0
- package/dist/webui/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/dist/webui/_app/immutable/entry/app.BisiObvX.js +2 -0
- package/dist/webui/_app/immutable/entry/start.uEYh5tXy.js +1 -0
- package/dist/webui/_app/immutable/nodes/0.C8yGM2gr.js +231 -0
- package/dist/webui/_app/immutable/nodes/1.BUJKZ337.js +1 -0
- package/dist/webui/_app/immutable/nodes/2.Db-aM2Oa.js +1 -0
- package/dist/webui/_app/immutable/nodes/3.DCVfhckZ.js +1 -0
- package/dist/webui/_app/version.json +1 -0
- package/dist/webui/icons/app-icon/darwin-dark.icns +0 -0
- package/dist/webui/icons/app-icon/darwin-light.icns +0 -0
- package/dist/webui/icons/app-icon/win32-dark.ico +0 -0
- package/dist/webui/icons/app-icon/win32-light.ico +0 -0
- package/dist/webui/icons/app-icon.icns +0 -0
- package/dist/webui/icons/app-icon.ico +0 -0
- package/dist/webui/icons/app-icon.json +84 -0
- package/dist/webui/icons/app-icon.png +0 -0
- package/dist/webui/icons/flat-symbol.png +0 -0
- package/dist/webui/icons/linux/128x128/app-icon.png +0 -0
- package/dist/webui/icons/linux/16x16/app-icon.png +0 -0
- package/dist/webui/icons/linux/256x256/app-icon.png +0 -0
- package/dist/webui/icons/linux/32x32/app-icon.png +0 -0
- package/dist/webui/icons/linux/48x48/app-icon.png +0 -0
- package/dist/webui/icons/linux/512x512/app-icon.png +0 -0
- package/dist/webui/icons/linux/64x64/app-icon.png +0 -0
- package/dist/webui/icons/monochrome-mini.png +0 -0
- package/dist/webui/index.html +62 -0
- package/dist/webui/robots.txt +3 -0
- package/package.json +99 -73
- package/dist/buildIndex-B_9ABRtx.mjs +0 -2
- package/dist/buildIndex-B_9ABRtx.mjs.map +0 -1
- package/dist/buildIndex-Cea97e0l.mjs +0 -1
- package/dist/cli.d.mts +0 -1016
- package/dist/cli.d.mts.map +0 -1
- package/dist/cli.mjs +0 -20
- package/dist/cli.mjs.map +0 -1
- package/dist/contentManager-CoVTiSDT.mjs +0 -13
- package/dist/contentManager-CoVTiSDT.mjs.map +0 -1
- package/dist/contentManager-CwquwC1s.mjs +0 -1
- package/dist/context7-BejCCqkm.mjs +0 -1
- package/dist/context7-BxMpyQiW.mjs +0 -2
- package/dist/context7-BxMpyQiW.mjs.map +0 -1
- package/dist/index.d.mts +0 -2158
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +0 -1
- package/dist/listContext7-DHj9AL-z.mjs +0 -2
- package/dist/listContext7-DHj9AL-z.mjs.map +0 -1
- package/dist/package-CFJazwTO.mjs +0 -2
- package/dist/package-CFJazwTO.mjs.map +0 -1
- package/dist/referenceSearchUtils-DZgupMZp.mjs +0 -2
- package/dist/referenceSearchUtils-DZgupMZp.mjs.map +0 -1
- package/dist/removeContext7-BZtL4_CJ.mjs +0 -3
- package/dist/removeContext7-BZtL4_CJ.mjs.map +0 -1
- package/dist/removeSkill-Bat_plVG.mjs +0 -5
- package/dist/removeSkill-Bat_plVG.mjs.map +0 -1
- package/dist/removeSkill-DjDZjhJU.mjs +0 -1
- package/dist/runScript-CSKqb831.mjs +0 -13
- package/dist/runScript-CSKqb831.mjs.map +0 -1
- package/dist/scopeSelection-BWteJQSv.mjs +0 -2
- package/dist/scopeSelection-BWteJQSv.mjs.map +0 -1
- package/dist/searchQuality-DVdHmamh.mjs +0 -2
- package/dist/searchQuality-DVdHmamh.mjs.map +0 -1
- package/dist/search_format-RyjXACJa.mjs +0 -5
- package/dist/search_format-RyjXACJa.mjs.map +0 -1
- package/dist/shared-DsVh4gOV.mjs +0 -2
- package/dist/shared-DsVh4gOV.mjs.map +0 -1
- package/dist/skillCreator-BomXoqdw.mjs +0 -2
- package/dist/skillCreator-BomXoqdw.mjs.map +0 -1
- package/dist/skillMdManager-DGBZ6M5J.mjs +0 -7
- package/dist/skillMdManager-DGBZ6M5J.mjs.map +0 -1
- package/dist/sqliteVectorSearchAdapter-56kZjbUT.mjs +0 -28
- package/dist/sqliteVectorSearchAdapter-56kZjbUT.mjs.map +0 -1
- package/dist/sqliteVectorSearchAdapter-DNkyKuZs.mjs +0 -1
- package/dist/unifiedSearch-CLdazMYU.mjs +0 -4
- package/dist/unifiedSearch-CLdazMYU.mjs.map +0 -1
- package/dist/unifiedSearch-DCFPrtzZ.mjs +0 -1
- package/templates/SKILL.md +0 -56
- package/templates/SKILL.zh-CN.md +0 -339
- package/templates/skill-creator.md +0 -130
- package/templates/skill-creator.zh-CN.md +0 -133
package/dist/index.d.mts
DELETED
|
@@ -1,2158 +0,0 @@
|
|
|
1
|
-
//#region src/core/searchAdapter.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Search Engine Adapter Interface
|
|
4
|
-
* Provides a unified interface for different search implementations
|
|
5
|
-
*/
|
|
6
|
-
interface SearchResult$2 {
|
|
7
|
-
id: string;
|
|
8
|
-
title: string;
|
|
9
|
-
content: string;
|
|
10
|
-
source: 'user' | 'context7';
|
|
11
|
-
file_path: string;
|
|
12
|
-
score: number;
|
|
13
|
-
metadata: Record<string, unknown>;
|
|
14
|
-
}
|
|
15
|
-
interface SearchOptions$1 {
|
|
16
|
-
topK?: number;
|
|
17
|
-
where?: Record<string, any>;
|
|
18
|
-
fuzzyThreshold?: number;
|
|
19
|
-
}
|
|
20
|
-
type SearchMode = 'auto' | 'fulltext' | 'fuzzy' | 'vector' | 'chroma';
|
|
21
|
-
type SearchBackendId = 'minisearch' | 'ufuzzy' | 'sqlite-vec';
|
|
22
|
-
interface SearchBackendInfo {
|
|
23
|
-
backendId: SearchBackendId;
|
|
24
|
-
mode: Exclude<SearchMode, 'chroma'>;
|
|
25
|
-
supportsPersistence: boolean;
|
|
26
|
-
supportsEmbeddings: boolean;
|
|
27
|
-
}
|
|
28
|
-
interface SearchIndexState {
|
|
29
|
-
backendId: SearchBackendId;
|
|
30
|
-
referencesHash?: string;
|
|
31
|
-
builtAt?: string;
|
|
32
|
-
documentCount?: number;
|
|
33
|
-
rulesetVersion?: string;
|
|
34
|
-
}
|
|
35
|
-
interface SearchEngine {
|
|
36
|
-
/**
|
|
37
|
-
* Initialize backend resources if needed
|
|
38
|
-
*/
|
|
39
|
-
initialize?(): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Build search index from files
|
|
42
|
-
*/
|
|
43
|
-
buildIndex(referencesDir: string): Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* Search for documents matching the query
|
|
46
|
-
*/
|
|
47
|
-
search(query: string, options?: SearchOptions$1): Promise<SearchResult$2[]>;
|
|
48
|
-
/**
|
|
49
|
-
* Return backend identity/capabilities
|
|
50
|
-
*/
|
|
51
|
-
getBackendInfo(): SearchBackendInfo;
|
|
52
|
-
/**
|
|
53
|
-
* Check if the search index is built and ready
|
|
54
|
-
*/
|
|
55
|
-
isBuilt(): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Get search engine statistics
|
|
58
|
-
*/
|
|
59
|
-
getStats(): Promise<{
|
|
60
|
-
totalDocuments: number;
|
|
61
|
-
}>;
|
|
62
|
-
/**
|
|
63
|
-
* Read index state metadata
|
|
64
|
-
*/
|
|
65
|
-
getIndexState?(): Promise<SearchIndexState>;
|
|
66
|
-
/**
|
|
67
|
-
* Clear the search index
|
|
68
|
-
*/
|
|
69
|
-
clearIndex(): void | Promise<void>;
|
|
70
|
-
}
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/standard-schema.d.cts
|
|
73
|
-
/** The Standard Schema interface. */
|
|
74
|
-
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
75
|
-
/** The Standard Schema properties. */
|
|
76
|
-
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
|
|
77
|
-
}
|
|
78
|
-
declare namespace StandardSchemaV1 {
|
|
79
|
-
/** The Standard Schema properties interface. */
|
|
80
|
-
interface Props<Input = unknown, Output = Input> {
|
|
81
|
-
/** The version number of the standard. */
|
|
82
|
-
readonly version: 1;
|
|
83
|
-
/** The vendor name of the schema library. */
|
|
84
|
-
readonly vendor: string;
|
|
85
|
-
/** Validates unknown input values. */
|
|
86
|
-
readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
|
|
87
|
-
/** Inferred types associated with the schema. */
|
|
88
|
-
readonly types?: Types<Input, Output> | undefined;
|
|
89
|
-
}
|
|
90
|
-
/** The result interface of the validate function. */
|
|
91
|
-
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
92
|
-
/** The result interface if validation succeeds. */
|
|
93
|
-
interface SuccessResult<Output> {
|
|
94
|
-
/** The typed output value. */
|
|
95
|
-
readonly value: Output;
|
|
96
|
-
/** The non-existent issues. */
|
|
97
|
-
readonly issues?: undefined;
|
|
98
|
-
}
|
|
99
|
-
/** The result interface if validation fails. */
|
|
100
|
-
interface FailureResult {
|
|
101
|
-
/** The issues of failed validation. */
|
|
102
|
-
readonly issues: ReadonlyArray<Issue>;
|
|
103
|
-
}
|
|
104
|
-
/** The issue interface of the failure output. */
|
|
105
|
-
interface Issue {
|
|
106
|
-
/** The error message of the issue. */
|
|
107
|
-
readonly message: string;
|
|
108
|
-
/** The path of the issue, if any. */
|
|
109
|
-
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
110
|
-
}
|
|
111
|
-
/** The path segment interface of the issue. */
|
|
112
|
-
interface PathSegment {
|
|
113
|
-
/** The key representing a path segment. */
|
|
114
|
-
readonly key: PropertyKey;
|
|
115
|
-
}
|
|
116
|
-
/** The Standard Schema types interface. */
|
|
117
|
-
interface Types<Input = unknown, Output = Input> {
|
|
118
|
-
/** The input type of the schema. */
|
|
119
|
-
readonly input: Input;
|
|
120
|
-
/** The output type of the schema. */
|
|
121
|
-
readonly output: Output;
|
|
122
|
-
}
|
|
123
|
-
/** Infers the input type of a Standard Schema. */
|
|
124
|
-
type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
125
|
-
/** Infers the output type of a Standard Schema. */
|
|
126
|
-
type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
127
|
-
}
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.d.cts
|
|
130
|
-
type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
|
|
131
|
-
type IsAny<T$1> = 0 extends 1 & T$1 ? true : false;
|
|
132
|
-
type Omit$1<T$1, K$1 extends keyof T$1> = Pick<T$1, Exclude<keyof T$1, K$1>>;
|
|
133
|
-
type MakePartial<T$1, K$1 extends keyof T$1> = Omit$1<T$1, K$1> & InexactPartial<Pick<T$1, K$1>>;
|
|
134
|
-
type NoUndefined<T$1> = T$1 extends undefined ? never : T$1;
|
|
135
|
-
type LoosePartial<T$1 extends object> = InexactPartial<T$1> & {
|
|
136
|
-
[k: string]: unknown;
|
|
137
|
-
};
|
|
138
|
-
type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
|
|
139
|
-
type InexactPartial<T$1> = { [P in keyof T$1]?: T$1[P] | undefined };
|
|
140
|
-
type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
141
|
-
readonly [Symbol.toStringTag]: string;
|
|
142
|
-
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
143
|
-
type MakeReadonly<T$1> = T$1 extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T$1 extends Set<infer V> ? ReadonlySet<V> : T$1 extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T$1 extends Array<infer V> ? ReadonlyArray<V> : T$1 extends BuiltIn ? T$1 : Readonly<T$1>;
|
|
144
|
-
type SomeObject = Record<PropertyKey, any>;
|
|
145
|
-
type Identity<T$1> = T$1;
|
|
146
|
-
type Flatten<T$1> = Identity<{ [k in keyof T$1]: T$1[k] }>;
|
|
147
|
-
type Prettify<T$1> = { [K in keyof T$1]: T$1[K] } & {};
|
|
148
|
-
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] }>;
|
|
149
|
-
type AnyFunc = (...args: any[]) => any;
|
|
150
|
-
type MaybeAsync<T$1> = T$1 | Promise<T$1>;
|
|
151
|
-
type EnumValue = string | number;
|
|
152
|
-
type EnumLike = Readonly<Record<string, EnumValue>>;
|
|
153
|
-
type ToEnum<T$1 extends EnumValue> = Flatten<{ [k in T$1]: k }>;
|
|
154
|
-
type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
155
|
-
type HasLength = {
|
|
156
|
-
length: number;
|
|
157
|
-
};
|
|
158
|
-
type Numeric = number | bigint | Date;
|
|
159
|
-
type PropValues = Record<string, Set<Primitive>>;
|
|
160
|
-
type PrimitiveSet = Set<Primitive>;
|
|
161
|
-
type EmptyToNever<T$1> = keyof T$1 extends never ? never : T$1;
|
|
162
|
-
declare abstract class Class {
|
|
163
|
-
constructor(..._args: any[]);
|
|
164
|
-
}
|
|
165
|
-
//#endregion
|
|
166
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.d.cts
|
|
167
|
-
declare const version: {
|
|
168
|
-
readonly major: 4;
|
|
169
|
-
readonly minor: 1;
|
|
170
|
-
readonly patch: number;
|
|
171
|
-
};
|
|
172
|
-
//#endregion
|
|
173
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.d.cts
|
|
174
|
-
interface ParseContext<T$1 extends $ZodIssueBase = never> {
|
|
175
|
-
/** Customize error messages. */
|
|
176
|
-
readonly error?: $ZodErrorMap<T$1>;
|
|
177
|
-
/** Include the `input` field in issue objects. Default `false`. */
|
|
178
|
-
readonly reportInput?: boolean;
|
|
179
|
-
/** Skip eval-based fast path. Default `false`. */
|
|
180
|
-
readonly jitless?: boolean;
|
|
181
|
-
}
|
|
182
|
-
/** @internal */
|
|
183
|
-
interface ParseContextInternal<T$1 extends $ZodIssueBase = never> extends ParseContext<T$1> {
|
|
184
|
-
readonly async?: boolean | undefined;
|
|
185
|
-
readonly direction?: "forward" | "backward";
|
|
186
|
-
readonly skipChecks?: boolean;
|
|
187
|
-
}
|
|
188
|
-
interface ParsePayload<T$1 = unknown> {
|
|
189
|
-
value: T$1;
|
|
190
|
-
issues: $ZodRawIssue[];
|
|
191
|
-
/** A may to mark a whole payload as aborted. Used in codecs/pipes. */
|
|
192
|
-
aborted?: boolean;
|
|
193
|
-
}
|
|
194
|
-
type CheckFn<T$1> = (input: ParsePayload<T$1>) => MaybeAsync<void>;
|
|
195
|
-
interface $ZodTypeDef {
|
|
196
|
-
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";
|
|
197
|
-
error?: $ZodErrorMap<never> | undefined;
|
|
198
|
-
checks?: $ZodCheck<never>[];
|
|
199
|
-
}
|
|
200
|
-
interface _$ZodTypeInternals {
|
|
201
|
-
/** The `@zod/core` version of this schema */
|
|
202
|
-
version: typeof version;
|
|
203
|
-
/** Schema definition. */
|
|
204
|
-
def: $ZodTypeDef;
|
|
205
|
-
/** @internal Randomly generated ID for this schema. */
|
|
206
|
-
/** @internal List of deferred initializers. */
|
|
207
|
-
deferred: AnyFunc[] | undefined;
|
|
208
|
-
/** @internal Parses input and runs all checks (refinements). */
|
|
209
|
-
run(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
|
|
210
|
-
/** @internal Parses input, doesn't run checks. */
|
|
211
|
-
parse(payload: ParsePayload<any>, ctx: ParseContextInternal): MaybeAsync<ParsePayload>;
|
|
212
|
-
/** @internal Stores identifiers for the set of traits implemented by this schema. */
|
|
213
|
-
traits: Set<string>;
|
|
214
|
-
/** @internal Indicates that a schema output type should be considered optional inside objects.
|
|
215
|
-
* @default Required
|
|
216
|
-
*/
|
|
217
|
-
/** @internal */
|
|
218
|
-
optin?: "optional" | undefined;
|
|
219
|
-
/** @internal */
|
|
220
|
-
optout?: "optional" | undefined;
|
|
221
|
-
/** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
|
|
222
|
-
*
|
|
223
|
-
* Defined on: enum, const, literal, null, undefined
|
|
224
|
-
* Passthrough: optional, nullable, branded, default, catch, pipe
|
|
225
|
-
* Todo: unions?
|
|
226
|
-
*/
|
|
227
|
-
values?: PrimitiveSet | undefined;
|
|
228
|
-
/** Default value bubbled up from */
|
|
229
|
-
/** @internal A set of literal discriminators used for the fast path in discriminated unions. */
|
|
230
|
-
propValues?: PropValues | undefined;
|
|
231
|
-
/** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
|
|
232
|
-
pattern: RegExp | undefined;
|
|
233
|
-
/** @internal The constructor function of this schema. */
|
|
234
|
-
constr: new (def: any) => $ZodType;
|
|
235
|
-
/** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
|
|
236
|
-
bag: Record<string, unknown>;
|
|
237
|
-
/** @internal The set of issues this schema might throw during type checking. */
|
|
238
|
-
isst: $ZodIssueBase;
|
|
239
|
-
/** An optional method used to override `toJSONSchema` logic. */
|
|
240
|
-
toJSONSchema?: () => unknown;
|
|
241
|
-
/** @internal The parent of this schema. Only set during certain clone operations. */
|
|
242
|
-
parent?: $ZodType | undefined;
|
|
243
|
-
}
|
|
244
|
-
/** @internal */
|
|
245
|
-
interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
|
|
246
|
-
/** @internal The inferred output type */
|
|
247
|
-
output: O;
|
|
248
|
-
/** @internal The inferred input type */
|
|
249
|
-
input: I;
|
|
250
|
-
}
|
|
251
|
-
type $ZodStandardSchema<T$1> = StandardSchemaV1.Props<input<T$1>, output<T$1>>;
|
|
252
|
-
type SomeType = {
|
|
253
|
-
_zod: _$ZodTypeInternals;
|
|
254
|
-
};
|
|
255
|
-
interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
|
|
256
|
-
_zod: Internals;
|
|
257
|
-
"~standard": $ZodStandardSchema<this>;
|
|
258
|
-
}
|
|
259
|
-
declare const $ZodType: $constructor<$ZodType>;
|
|
260
|
-
interface $ZodStringDef extends $ZodTypeDef {
|
|
261
|
-
type: "string";
|
|
262
|
-
coerce?: boolean;
|
|
263
|
-
checks?: $ZodCheck<string>[];
|
|
264
|
-
}
|
|
265
|
-
interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
|
|
266
|
-
def: $ZodStringDef;
|
|
267
|
-
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
268
|
-
pattern: RegExp;
|
|
269
|
-
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
270
|
-
isst: $ZodIssueInvalidType;
|
|
271
|
-
bag: LoosePartial<{
|
|
272
|
-
minimum: number;
|
|
273
|
-
maximum: number;
|
|
274
|
-
patterns: Set<RegExp>;
|
|
275
|
-
format: string;
|
|
276
|
-
contentEncoding: string;
|
|
277
|
-
}>;
|
|
278
|
-
}
|
|
279
|
-
interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, $ZodCheckStringFormatDef<Format> {}
|
|
280
|
-
interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, $ZodCheckStringFormatInternals {
|
|
281
|
-
def: $ZodStringFormatDef<Format>;
|
|
282
|
-
}
|
|
283
|
-
interface $ZodStringFormat<Format extends string = string> extends $ZodType {
|
|
284
|
-
_zod: $ZodStringFormatInternals<Format>;
|
|
285
|
-
}
|
|
286
|
-
declare const $ZodStringFormat: $constructor<$ZodStringFormat>;
|
|
287
|
-
interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {}
|
|
288
|
-
interface $ZodGUID extends $ZodType {
|
|
289
|
-
_zod: $ZodGUIDInternals;
|
|
290
|
-
}
|
|
291
|
-
declare const $ZodGUID: $constructor<$ZodGUID>;
|
|
292
|
-
interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
|
|
293
|
-
version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
|
|
294
|
-
}
|
|
295
|
-
interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
|
|
296
|
-
def: $ZodUUIDDef;
|
|
297
|
-
}
|
|
298
|
-
interface $ZodUUID extends $ZodType {
|
|
299
|
-
_zod: $ZodUUIDInternals;
|
|
300
|
-
}
|
|
301
|
-
declare const $ZodUUID: $constructor<$ZodUUID>;
|
|
302
|
-
interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {}
|
|
303
|
-
interface $ZodEmail extends $ZodType {
|
|
304
|
-
_zod: $ZodEmailInternals;
|
|
305
|
-
}
|
|
306
|
-
declare const $ZodEmail: $constructor<$ZodEmail>;
|
|
307
|
-
interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
|
|
308
|
-
hostname?: RegExp | undefined;
|
|
309
|
-
protocol?: RegExp | undefined;
|
|
310
|
-
normalize?: boolean | undefined;
|
|
311
|
-
}
|
|
312
|
-
interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
|
|
313
|
-
def: $ZodURLDef;
|
|
314
|
-
}
|
|
315
|
-
interface $ZodURL extends $ZodType {
|
|
316
|
-
_zod: $ZodURLInternals;
|
|
317
|
-
}
|
|
318
|
-
declare const $ZodURL: $constructor<$ZodURL>;
|
|
319
|
-
interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {}
|
|
320
|
-
interface $ZodEmoji extends $ZodType {
|
|
321
|
-
_zod: $ZodEmojiInternals;
|
|
322
|
-
}
|
|
323
|
-
declare const $ZodEmoji: $constructor<$ZodEmoji>;
|
|
324
|
-
interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {}
|
|
325
|
-
interface $ZodNanoID extends $ZodType {
|
|
326
|
-
_zod: $ZodNanoIDInternals;
|
|
327
|
-
}
|
|
328
|
-
declare const $ZodNanoID: $constructor<$ZodNanoID>;
|
|
329
|
-
interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
|
|
330
|
-
interface $ZodCUID extends $ZodType {
|
|
331
|
-
_zod: $ZodCUIDInternals;
|
|
332
|
-
}
|
|
333
|
-
declare const $ZodCUID: $constructor<$ZodCUID>;
|
|
334
|
-
interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
|
|
335
|
-
interface $ZodCUID2 extends $ZodType {
|
|
336
|
-
_zod: $ZodCUID2Internals;
|
|
337
|
-
}
|
|
338
|
-
declare const $ZodCUID2: $constructor<$ZodCUID2>;
|
|
339
|
-
interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {}
|
|
340
|
-
interface $ZodULID extends $ZodType {
|
|
341
|
-
_zod: $ZodULIDInternals;
|
|
342
|
-
}
|
|
343
|
-
declare const $ZodULID: $constructor<$ZodULID>;
|
|
344
|
-
interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {}
|
|
345
|
-
interface $ZodXID extends $ZodType {
|
|
346
|
-
_zod: $ZodXIDInternals;
|
|
347
|
-
}
|
|
348
|
-
declare const $ZodXID: $constructor<$ZodXID>;
|
|
349
|
-
interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {}
|
|
350
|
-
interface $ZodKSUID extends $ZodType {
|
|
351
|
-
_zod: $ZodKSUIDInternals;
|
|
352
|
-
}
|
|
353
|
-
declare const $ZodKSUID: $constructor<$ZodKSUID>;
|
|
354
|
-
interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
|
|
355
|
-
precision: number | null;
|
|
356
|
-
offset: boolean;
|
|
357
|
-
local: boolean;
|
|
358
|
-
}
|
|
359
|
-
interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
|
|
360
|
-
def: $ZodISODateTimeDef;
|
|
361
|
-
}
|
|
362
|
-
interface $ZodISODateTime extends $ZodType {
|
|
363
|
-
_zod: $ZodISODateTimeInternals;
|
|
364
|
-
}
|
|
365
|
-
declare const $ZodISODateTime: $constructor<$ZodISODateTime>;
|
|
366
|
-
interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {}
|
|
367
|
-
interface $ZodISODate extends $ZodType {
|
|
368
|
-
_zod: $ZodISODateInternals;
|
|
369
|
-
}
|
|
370
|
-
declare const $ZodISODate: $constructor<$ZodISODate>;
|
|
371
|
-
interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
|
|
372
|
-
precision?: number | null;
|
|
373
|
-
}
|
|
374
|
-
interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
|
|
375
|
-
def: $ZodISOTimeDef;
|
|
376
|
-
}
|
|
377
|
-
interface $ZodISOTime extends $ZodType {
|
|
378
|
-
_zod: $ZodISOTimeInternals;
|
|
379
|
-
}
|
|
380
|
-
declare const $ZodISOTime: $constructor<$ZodISOTime>;
|
|
381
|
-
interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {}
|
|
382
|
-
interface $ZodISODuration extends $ZodType {
|
|
383
|
-
_zod: $ZodISODurationInternals;
|
|
384
|
-
}
|
|
385
|
-
declare const $ZodISODuration: $constructor<$ZodISODuration>;
|
|
386
|
-
interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
|
|
387
|
-
version?: "v4";
|
|
388
|
-
}
|
|
389
|
-
interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
|
|
390
|
-
def: $ZodIPv4Def;
|
|
391
|
-
}
|
|
392
|
-
interface $ZodIPv4 extends $ZodType {
|
|
393
|
-
_zod: $ZodIPv4Internals;
|
|
394
|
-
}
|
|
395
|
-
declare const $ZodIPv4: $constructor<$ZodIPv4>;
|
|
396
|
-
interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
|
|
397
|
-
version?: "v6";
|
|
398
|
-
}
|
|
399
|
-
interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
|
|
400
|
-
def: $ZodIPv6Def;
|
|
401
|
-
}
|
|
402
|
-
interface $ZodIPv6 extends $ZodType {
|
|
403
|
-
_zod: $ZodIPv6Internals;
|
|
404
|
-
}
|
|
405
|
-
declare const $ZodIPv6: $constructor<$ZodIPv6>;
|
|
406
|
-
interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
|
|
407
|
-
version?: "v4";
|
|
408
|
-
}
|
|
409
|
-
interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
|
|
410
|
-
def: $ZodCIDRv4Def;
|
|
411
|
-
}
|
|
412
|
-
interface $ZodCIDRv4 extends $ZodType {
|
|
413
|
-
_zod: $ZodCIDRv4Internals;
|
|
414
|
-
}
|
|
415
|
-
declare const $ZodCIDRv4: $constructor<$ZodCIDRv4>;
|
|
416
|
-
interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
|
|
417
|
-
version?: "v6";
|
|
418
|
-
}
|
|
419
|
-
interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
|
|
420
|
-
def: $ZodCIDRv6Def;
|
|
421
|
-
}
|
|
422
|
-
interface $ZodCIDRv6 extends $ZodType {
|
|
423
|
-
_zod: $ZodCIDRv6Internals;
|
|
424
|
-
}
|
|
425
|
-
declare const $ZodCIDRv6: $constructor<$ZodCIDRv6>;
|
|
426
|
-
interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {}
|
|
427
|
-
interface $ZodBase64 extends $ZodType {
|
|
428
|
-
_zod: $ZodBase64Internals;
|
|
429
|
-
}
|
|
430
|
-
declare const $ZodBase64: $constructor<$ZodBase64>;
|
|
431
|
-
interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {}
|
|
432
|
-
interface $ZodBase64URL extends $ZodType {
|
|
433
|
-
_zod: $ZodBase64URLInternals;
|
|
434
|
-
}
|
|
435
|
-
declare const $ZodBase64URL: $constructor<$ZodBase64URL>;
|
|
436
|
-
interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {}
|
|
437
|
-
interface $ZodE164 extends $ZodType {
|
|
438
|
-
_zod: $ZodE164Internals;
|
|
439
|
-
}
|
|
440
|
-
declare const $ZodE164: $constructor<$ZodE164>;
|
|
441
|
-
interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
|
|
442
|
-
alg?: JWTAlgorithm | undefined;
|
|
443
|
-
}
|
|
444
|
-
interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
|
|
445
|
-
def: $ZodJWTDef;
|
|
446
|
-
}
|
|
447
|
-
interface $ZodJWT extends $ZodType {
|
|
448
|
-
_zod: $ZodJWTInternals;
|
|
449
|
-
}
|
|
450
|
-
declare const $ZodJWT: $constructor<$ZodJWT>;
|
|
451
|
-
interface $ZodNumberDef extends $ZodTypeDef {
|
|
452
|
-
type: "number";
|
|
453
|
-
coerce?: boolean;
|
|
454
|
-
}
|
|
455
|
-
interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
|
|
456
|
-
def: $ZodNumberDef;
|
|
457
|
-
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
458
|
-
pattern: RegExp;
|
|
459
|
-
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
460
|
-
isst: $ZodIssueInvalidType;
|
|
461
|
-
bag: LoosePartial<{
|
|
462
|
-
minimum: number;
|
|
463
|
-
maximum: number;
|
|
464
|
-
exclusiveMinimum: number;
|
|
465
|
-
exclusiveMaximum: number;
|
|
466
|
-
format: string;
|
|
467
|
-
pattern: RegExp;
|
|
468
|
-
}>;
|
|
469
|
-
}
|
|
470
|
-
interface $ZodArrayDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
471
|
-
type: "array";
|
|
472
|
-
element: T$1;
|
|
473
|
-
}
|
|
474
|
-
interface $ZodArrayInternals<T$1 extends SomeType = $ZodType> extends _$ZodTypeInternals {
|
|
475
|
-
def: $ZodArrayDef<T$1>;
|
|
476
|
-
isst: $ZodIssueInvalidType;
|
|
477
|
-
output: output<T$1>[];
|
|
478
|
-
input: input<T$1>[];
|
|
479
|
-
}
|
|
480
|
-
interface $ZodArray<T$1 extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T$1>> {}
|
|
481
|
-
declare const $ZodArray: $constructor<$ZodArray>;
|
|
482
|
-
type OptionalOutSchema = {
|
|
483
|
-
_zod: {
|
|
484
|
-
optout: "optional";
|
|
485
|
-
};
|
|
486
|
-
};
|
|
487
|
-
type OptionalInSchema = {
|
|
488
|
-
_zod: {
|
|
489
|
-
optin: "optional";
|
|
490
|
-
};
|
|
491
|
-
};
|
|
492
|
-
type $InferObjectOutput<T$1 extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T$1 ? IsAny<T$1[keyof T$1]> extends true ? Record<string, unknown> : Record<string, output<T$1[keyof T$1]>> : keyof (T$1 & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T$1 as T$1[k] extends OptionalOutSchema ? never : k]: T$1[k]["_zod"]["output"] } & { -readonly [k in keyof T$1 as T$1[k] extends OptionalOutSchema ? k : never]?: T$1[k]["_zod"]["output"] } & Extra>;
|
|
493
|
-
type $InferObjectInput<T$1 extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T$1 ? IsAny<T$1[keyof T$1]> extends true ? Record<string, unknown> : Record<string, input<T$1[keyof T$1]>> : keyof (T$1 & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T$1 as T$1[k] extends OptionalInSchema ? never : k]: T$1[k]["_zod"]["input"] } & { -readonly [k in keyof T$1 as T$1[k] extends OptionalInSchema ? k : never]?: T$1[k]["_zod"]["input"] } & Extra>;
|
|
494
|
-
type $ZodObjectConfig = {
|
|
495
|
-
out: Record<string, unknown>;
|
|
496
|
-
in: Record<string, unknown>;
|
|
497
|
-
};
|
|
498
|
-
type $loose = {
|
|
499
|
-
out: Record<string, unknown>;
|
|
500
|
-
in: Record<string, unknown>;
|
|
501
|
-
};
|
|
502
|
-
type $strict = {
|
|
503
|
-
out: {};
|
|
504
|
-
in: {};
|
|
505
|
-
};
|
|
506
|
-
type $strip = {
|
|
507
|
-
out: {};
|
|
508
|
-
in: {};
|
|
509
|
-
};
|
|
510
|
-
type $catchall<T$1 extends SomeType> = {
|
|
511
|
-
out: {
|
|
512
|
-
[k: string]: output<T$1>;
|
|
513
|
-
};
|
|
514
|
-
in: {
|
|
515
|
-
[k: string]: input<T$1>;
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
type $ZodShape = Readonly<{
|
|
519
|
-
[k: string]: $ZodType;
|
|
520
|
-
}>;
|
|
521
|
-
interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
|
|
522
|
-
type: "object";
|
|
523
|
-
shape: Shape;
|
|
524
|
-
catchall?: $ZodType | undefined;
|
|
525
|
-
}
|
|
526
|
-
interface $ZodObjectInternals< /** @ts-ignore Cast variance */
|
|
527
|
-
out Shape extends $ZodShape = $ZodShape, out Config$1 extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
|
|
528
|
-
def: $ZodObjectDef<Shape>;
|
|
529
|
-
config: Config$1;
|
|
530
|
-
isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
|
|
531
|
-
propValues: PropValues;
|
|
532
|
-
output: $InferObjectOutput<Shape, Config$1["out"]>;
|
|
533
|
-
input: $InferObjectInput<Shape, Config$1["in"]>;
|
|
534
|
-
optin?: "optional" | undefined;
|
|
535
|
-
optout?: "optional" | undefined;
|
|
536
|
-
}
|
|
537
|
-
type $ZodLooseShape = Record<string, any>;
|
|
538
|
-
interface $ZodObject< /** @ts-ignore Cast variance */
|
|
539
|
-
out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params$1 extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params$1>> {
|
|
540
|
-
"~standard": $ZodStandardSchema<this>;
|
|
541
|
-
}
|
|
542
|
-
declare const $ZodObject: $constructor<$ZodObject>;
|
|
543
|
-
type $InferUnionOutput<T$1 extends SomeType> = T$1 extends any ? output<T$1> : never;
|
|
544
|
-
type $InferUnionInput<T$1 extends SomeType> = T$1 extends any ? input<T$1> : never;
|
|
545
|
-
interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
|
|
546
|
-
type: "union";
|
|
547
|
-
options: Options;
|
|
548
|
-
}
|
|
549
|
-
type IsOptionalIn<T$1 extends SomeType> = T$1 extends OptionalInSchema ? true : false;
|
|
550
|
-
type IsOptionalOut<T$1 extends SomeType> = T$1 extends OptionalOutSchema ? true : false;
|
|
551
|
-
interface $ZodUnionInternals<T$1 extends readonly SomeType[] = readonly $ZodType[]> extends _$ZodTypeInternals {
|
|
552
|
-
def: $ZodUnionDef<T$1>;
|
|
553
|
-
isst: $ZodIssueInvalidUnion;
|
|
554
|
-
pattern: T$1[number]["_zod"]["pattern"];
|
|
555
|
-
values: T$1[number]["_zod"]["values"];
|
|
556
|
-
output: $InferUnionOutput<T$1[number]>;
|
|
557
|
-
input: $InferUnionInput<T$1[number]>;
|
|
558
|
-
optin: IsOptionalIn<T$1[number]> extends false ? "optional" | undefined : "optional";
|
|
559
|
-
optout: IsOptionalOut<T$1[number]> extends false ? "optional" | undefined : "optional";
|
|
560
|
-
}
|
|
561
|
-
interface $ZodUnion<T$1 extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodUnionInternals<T$1>> {
|
|
562
|
-
_zod: $ZodUnionInternals<T$1>;
|
|
563
|
-
}
|
|
564
|
-
declare const $ZodUnion: $constructor<$ZodUnion>;
|
|
565
|
-
interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
566
|
-
type: "intersection";
|
|
567
|
-
left: Left;
|
|
568
|
-
right: Right;
|
|
569
|
-
}
|
|
570
|
-
interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
|
|
571
|
-
def: $ZodIntersectionDef<A, B>;
|
|
572
|
-
isst: never;
|
|
573
|
-
optin: A["_zod"]["optin"] | B["_zod"]["optin"];
|
|
574
|
-
optout: A["_zod"]["optout"] | B["_zod"]["optout"];
|
|
575
|
-
output: output<A> & output<B>;
|
|
576
|
-
input: input<A> & input<B>;
|
|
577
|
-
}
|
|
578
|
-
interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
579
|
-
_zod: $ZodIntersectionInternals<A, B>;
|
|
580
|
-
}
|
|
581
|
-
declare const $ZodIntersection: $constructor<$ZodIntersection>;
|
|
582
|
-
type $ZodRecordKey = $ZodType<string | number | symbol, string | number | symbol>;
|
|
583
|
-
interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
584
|
-
type: "record";
|
|
585
|
-
keyType: Key;
|
|
586
|
-
valueType: Value;
|
|
587
|
-
}
|
|
588
|
-
type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<output<Key>, output<Value>>> : Record<output<Key>, output<Value>>;
|
|
589
|
-
type $InferZodRecordInput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<input<Key>, input<Value>>> : Record<input<Key>, input<Value>>;
|
|
590
|
-
interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
|
|
591
|
-
def: $ZodRecordDef<Key, Value>;
|
|
592
|
-
isst: $ZodIssueInvalidType | $ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
|
|
593
|
-
optin?: "optional" | undefined;
|
|
594
|
-
optout?: "optional" | undefined;
|
|
595
|
-
}
|
|
596
|
-
type $partial = {
|
|
597
|
-
"~~partial": true;
|
|
598
|
-
};
|
|
599
|
-
interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodType {
|
|
600
|
-
_zod: $ZodRecordInternals<Key, Value>;
|
|
601
|
-
}
|
|
602
|
-
declare const $ZodRecord: $constructor<$ZodRecord>;
|
|
603
|
-
type $InferEnumOutput<T$1 extends EnumLike> = T$1[keyof T$1] & {};
|
|
604
|
-
type $InferEnumInput<T$1 extends EnumLike> = T$1[keyof T$1] & {};
|
|
605
|
-
interface $ZodEnumDef<T$1 extends EnumLike = EnumLike> extends $ZodTypeDef {
|
|
606
|
-
type: "enum";
|
|
607
|
-
entries: T$1;
|
|
608
|
-
}
|
|
609
|
-
interface $ZodEnumInternals< /** @ts-ignore Cast variance */
|
|
610
|
-
out T$1 extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T$1>, $InferEnumInput<T$1>> {
|
|
611
|
-
def: $ZodEnumDef<T$1>;
|
|
612
|
-
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
613
|
-
values: PrimitiveSet;
|
|
614
|
-
/** @deprecated Internal API, use with caution (not deprecated) */
|
|
615
|
-
pattern: RegExp;
|
|
616
|
-
isst: $ZodIssueInvalidValue;
|
|
617
|
-
}
|
|
618
|
-
interface $ZodEnum<T$1 extends EnumLike = EnumLike> extends $ZodType {
|
|
619
|
-
_zod: $ZodEnumInternals<T$1>;
|
|
620
|
-
}
|
|
621
|
-
declare const $ZodEnum: $constructor<$ZodEnum>;
|
|
622
|
-
interface $ZodTransformDef extends $ZodTypeDef {
|
|
623
|
-
type: "transform";
|
|
624
|
-
transform: (input: unknown, payload: ParsePayload<unknown>) => MaybeAsync<unknown>;
|
|
625
|
-
}
|
|
626
|
-
interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
|
|
627
|
-
def: $ZodTransformDef;
|
|
628
|
-
isst: never;
|
|
629
|
-
}
|
|
630
|
-
interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
|
|
631
|
-
_zod: $ZodTransformInternals<O, I>;
|
|
632
|
-
}
|
|
633
|
-
declare const $ZodTransform: $constructor<$ZodTransform>;
|
|
634
|
-
interface $ZodOptionalDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
635
|
-
type: "optional";
|
|
636
|
-
innerType: T$1;
|
|
637
|
-
}
|
|
638
|
-
interface $ZodOptionalInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1> | undefined, input<T$1> | undefined> {
|
|
639
|
-
def: $ZodOptionalDef<T$1>;
|
|
640
|
-
optin: "optional";
|
|
641
|
-
optout: "optional";
|
|
642
|
-
isst: never;
|
|
643
|
-
values: T$1["_zod"]["values"];
|
|
644
|
-
pattern: T$1["_zod"]["pattern"];
|
|
645
|
-
}
|
|
646
|
-
interface $ZodOptional<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
647
|
-
_zod: $ZodOptionalInternals<T$1>;
|
|
648
|
-
}
|
|
649
|
-
declare const $ZodOptional: $constructor<$ZodOptional>;
|
|
650
|
-
interface $ZodNullableDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
651
|
-
type: "nullable";
|
|
652
|
-
innerType: T$1;
|
|
653
|
-
}
|
|
654
|
-
interface $ZodNullableInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1> | null, input<T$1> | null> {
|
|
655
|
-
def: $ZodNullableDef<T$1>;
|
|
656
|
-
optin: T$1["_zod"]["optin"];
|
|
657
|
-
optout: T$1["_zod"]["optout"];
|
|
658
|
-
isst: never;
|
|
659
|
-
values: T$1["_zod"]["values"];
|
|
660
|
-
pattern: T$1["_zod"]["pattern"];
|
|
661
|
-
}
|
|
662
|
-
interface $ZodNullable<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
663
|
-
_zod: $ZodNullableInternals<T$1>;
|
|
664
|
-
}
|
|
665
|
-
declare const $ZodNullable: $constructor<$ZodNullable>;
|
|
666
|
-
interface $ZodDefaultDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
667
|
-
type: "default";
|
|
668
|
-
innerType: T$1;
|
|
669
|
-
/** The default value. May be a getter. */
|
|
670
|
-
defaultValue: NoUndefined<output<T$1>>;
|
|
671
|
-
}
|
|
672
|
-
interface $ZodDefaultInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T$1>>, input<T$1> | undefined> {
|
|
673
|
-
def: $ZodDefaultDef<T$1>;
|
|
674
|
-
optin: "optional";
|
|
675
|
-
optout?: "optional" | undefined;
|
|
676
|
-
isst: never;
|
|
677
|
-
values: T$1["_zod"]["values"];
|
|
678
|
-
}
|
|
679
|
-
interface $ZodDefault<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
680
|
-
_zod: $ZodDefaultInternals<T$1>;
|
|
681
|
-
}
|
|
682
|
-
declare const $ZodDefault: $constructor<$ZodDefault>;
|
|
683
|
-
interface $ZodPrefaultDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
684
|
-
type: "prefault";
|
|
685
|
-
innerType: T$1;
|
|
686
|
-
/** The default value. May be a getter. */
|
|
687
|
-
defaultValue: input<T$1>;
|
|
688
|
-
}
|
|
689
|
-
interface $ZodPrefaultInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T$1>>, input<T$1> | undefined> {
|
|
690
|
-
def: $ZodPrefaultDef<T$1>;
|
|
691
|
-
optin: "optional";
|
|
692
|
-
optout?: "optional" | undefined;
|
|
693
|
-
isst: never;
|
|
694
|
-
values: T$1["_zod"]["values"];
|
|
695
|
-
}
|
|
696
|
-
interface $ZodPrefault<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
697
|
-
_zod: $ZodPrefaultInternals<T$1>;
|
|
698
|
-
}
|
|
699
|
-
declare const $ZodPrefault: $constructor<$ZodPrefault>;
|
|
700
|
-
interface $ZodNonOptionalDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
701
|
-
type: "nonoptional";
|
|
702
|
-
innerType: T$1;
|
|
703
|
-
}
|
|
704
|
-
interface $ZodNonOptionalInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T$1>>, NoUndefined<input<T$1>>> {
|
|
705
|
-
def: $ZodNonOptionalDef<T$1>;
|
|
706
|
-
isst: $ZodIssueInvalidType;
|
|
707
|
-
values: T$1["_zod"]["values"];
|
|
708
|
-
optin: "optional" | undefined;
|
|
709
|
-
optout: "optional" | undefined;
|
|
710
|
-
}
|
|
711
|
-
interface $ZodNonOptional<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
712
|
-
_zod: $ZodNonOptionalInternals<T$1>;
|
|
713
|
-
}
|
|
714
|
-
declare const $ZodNonOptional: $constructor<$ZodNonOptional>;
|
|
715
|
-
interface $ZodCatchCtx extends ParsePayload {
|
|
716
|
-
/** @deprecated Use `ctx.issues` */
|
|
717
|
-
error: {
|
|
718
|
-
issues: $ZodIssue[];
|
|
719
|
-
};
|
|
720
|
-
/** @deprecated Use `ctx.value` */
|
|
721
|
-
input: unknown;
|
|
722
|
-
}
|
|
723
|
-
interface $ZodCatchDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
724
|
-
type: "catch";
|
|
725
|
-
innerType: T$1;
|
|
726
|
-
catchValue: (ctx: $ZodCatchCtx) => unknown;
|
|
727
|
-
}
|
|
728
|
-
interface $ZodCatchInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1>, input<T$1>> {
|
|
729
|
-
def: $ZodCatchDef<T$1>;
|
|
730
|
-
optin: T$1["_zod"]["optin"];
|
|
731
|
-
optout: T$1["_zod"]["optout"];
|
|
732
|
-
isst: never;
|
|
733
|
-
values: T$1["_zod"]["values"];
|
|
734
|
-
}
|
|
735
|
-
interface $ZodCatch<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
736
|
-
_zod: $ZodCatchInternals<T$1>;
|
|
737
|
-
}
|
|
738
|
-
declare const $ZodCatch: $constructor<$ZodCatch>;
|
|
739
|
-
interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
740
|
-
type: "pipe";
|
|
741
|
-
in: A;
|
|
742
|
-
out: B;
|
|
743
|
-
/** Only defined inside $ZodCodec instances. */
|
|
744
|
-
transform?: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
|
|
745
|
-
/** Only defined inside $ZodCodec instances. */
|
|
746
|
-
reverseTransform?: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
|
|
747
|
-
}
|
|
748
|
-
interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
|
|
749
|
-
def: $ZodPipeDef<A, B>;
|
|
750
|
-
isst: never;
|
|
751
|
-
values: A["_zod"]["values"];
|
|
752
|
-
optin: A["_zod"]["optin"];
|
|
753
|
-
optout: B["_zod"]["optout"];
|
|
754
|
-
propValues: A["_zod"]["propValues"];
|
|
755
|
-
}
|
|
756
|
-
interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
757
|
-
_zod: $ZodPipeInternals<A, B>;
|
|
758
|
-
}
|
|
759
|
-
declare const $ZodPipe: $constructor<$ZodPipe>;
|
|
760
|
-
interface $ZodReadonlyDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
761
|
-
type: "readonly";
|
|
762
|
-
innerType: T$1;
|
|
763
|
-
}
|
|
764
|
-
interface $ZodReadonlyInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<MakeReadonly<output<T$1>>, MakeReadonly<input<T$1>>> {
|
|
765
|
-
def: $ZodReadonlyDef<T$1>;
|
|
766
|
-
optin: T$1["_zod"]["optin"];
|
|
767
|
-
optout: T$1["_zod"]["optout"];
|
|
768
|
-
isst: never;
|
|
769
|
-
propValues: T$1["_zod"]["propValues"];
|
|
770
|
-
values: T$1["_zod"]["values"];
|
|
771
|
-
}
|
|
772
|
-
interface $ZodReadonly<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
773
|
-
_zod: $ZodReadonlyInternals<T$1>;
|
|
774
|
-
}
|
|
775
|
-
declare const $ZodReadonly: $constructor<$ZodReadonly>;
|
|
776
|
-
interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
|
|
777
|
-
type: "custom";
|
|
778
|
-
check: "custom";
|
|
779
|
-
path?: PropertyKey[] | undefined;
|
|
780
|
-
error?: $ZodErrorMap | undefined;
|
|
781
|
-
params?: Record<string, any> | undefined;
|
|
782
|
-
fn: (arg: O) => unknown;
|
|
783
|
-
}
|
|
784
|
-
interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, $ZodCheckInternals<O> {
|
|
785
|
-
def: $ZodCustomDef;
|
|
786
|
-
issc: $ZodIssue;
|
|
787
|
-
isst: never;
|
|
788
|
-
bag: LoosePartial<{
|
|
789
|
-
Class: typeof Class;
|
|
790
|
-
}>;
|
|
791
|
-
}
|
|
792
|
-
interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
|
|
793
|
-
_zod: $ZodCustomInternals<O, I>;
|
|
794
|
-
}
|
|
795
|
-
declare const $ZodCustom: $constructor<$ZodCustom>;
|
|
796
|
-
//#endregion
|
|
797
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.d.cts
|
|
798
|
-
interface $ZodCheckDef {
|
|
799
|
-
check: string;
|
|
800
|
-
error?: $ZodErrorMap<never> | undefined;
|
|
801
|
-
/** If true, no later checks will be executed if this check fails. Default `false`. */
|
|
802
|
-
abort?: boolean | undefined;
|
|
803
|
-
/** If provided, this check will only be executed if the function returns `true`. Defaults to `payload => z.util.isAborted(payload)`. */
|
|
804
|
-
when?: ((payload: ParsePayload) => boolean) | undefined;
|
|
805
|
-
}
|
|
806
|
-
interface $ZodCheckInternals<T$1> {
|
|
807
|
-
def: $ZodCheckDef;
|
|
808
|
-
/** The set of issues this check might throw. */
|
|
809
|
-
issc?: $ZodIssueBase;
|
|
810
|
-
check(payload: ParsePayload<T$1>): MaybeAsync<void>;
|
|
811
|
-
onattach: ((schema: $ZodType) => void)[];
|
|
812
|
-
}
|
|
813
|
-
interface $ZodCheck<in T$1 = never> {
|
|
814
|
-
_zod: $ZodCheckInternals<T$1>;
|
|
815
|
-
}
|
|
816
|
-
declare const $ZodCheck: $constructor<$ZodCheck<any>>;
|
|
817
|
-
interface $ZodCheckLessThanDef extends $ZodCheckDef {
|
|
818
|
-
check: "less_than";
|
|
819
|
-
value: Numeric;
|
|
820
|
-
inclusive: boolean;
|
|
821
|
-
}
|
|
822
|
-
interface $ZodCheckLessThanInternals<T$1 extends Numeric = Numeric> extends $ZodCheckInternals<T$1> {
|
|
823
|
-
def: $ZodCheckLessThanDef;
|
|
824
|
-
issc: $ZodIssueTooBig<T$1>;
|
|
825
|
-
}
|
|
826
|
-
interface $ZodCheckLessThan<T$1 extends Numeric = Numeric> extends $ZodCheck<T$1> {
|
|
827
|
-
_zod: $ZodCheckLessThanInternals<T$1>;
|
|
828
|
-
}
|
|
829
|
-
declare const $ZodCheckLessThan: $constructor<$ZodCheckLessThan>;
|
|
830
|
-
interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
|
|
831
|
-
check: "greater_than";
|
|
832
|
-
value: Numeric;
|
|
833
|
-
inclusive: boolean;
|
|
834
|
-
}
|
|
835
|
-
interface $ZodCheckGreaterThanInternals<T$1 extends Numeric = Numeric> extends $ZodCheckInternals<T$1> {
|
|
836
|
-
def: $ZodCheckGreaterThanDef;
|
|
837
|
-
issc: $ZodIssueTooSmall<T$1>;
|
|
838
|
-
}
|
|
839
|
-
interface $ZodCheckGreaterThan<T$1 extends Numeric = Numeric> extends $ZodCheck<T$1> {
|
|
840
|
-
_zod: $ZodCheckGreaterThanInternals<T$1>;
|
|
841
|
-
}
|
|
842
|
-
declare const $ZodCheckGreaterThan: $constructor<$ZodCheckGreaterThan>;
|
|
843
|
-
interface $ZodCheckMultipleOfDef<T$1 extends number | bigint = number | bigint> extends $ZodCheckDef {
|
|
844
|
-
check: "multiple_of";
|
|
845
|
-
value: T$1;
|
|
846
|
-
}
|
|
847
|
-
interface $ZodCheckMultipleOfInternals<T$1 extends number | bigint = number | bigint> extends $ZodCheckInternals<T$1> {
|
|
848
|
-
def: $ZodCheckMultipleOfDef<T$1>;
|
|
849
|
-
issc: $ZodIssueNotMultipleOf;
|
|
850
|
-
}
|
|
851
|
-
interface $ZodCheckMultipleOf<T$1 extends number | bigint = number | bigint> extends $ZodCheck<T$1> {
|
|
852
|
-
_zod: $ZodCheckMultipleOfInternals<T$1>;
|
|
853
|
-
}
|
|
854
|
-
declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
|
|
855
|
-
type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
|
|
856
|
-
interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
|
|
857
|
-
check: "number_format";
|
|
858
|
-
format: $ZodNumberFormats;
|
|
859
|
-
}
|
|
860
|
-
interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
|
|
861
|
-
def: $ZodCheckNumberFormatDef;
|
|
862
|
-
issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
|
|
863
|
-
}
|
|
864
|
-
interface $ZodCheckNumberFormat extends $ZodCheck<number> {
|
|
865
|
-
_zod: $ZodCheckNumberFormatInternals;
|
|
866
|
-
}
|
|
867
|
-
declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
|
|
868
|
-
interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
|
|
869
|
-
check: "max_length";
|
|
870
|
-
maximum: number;
|
|
871
|
-
}
|
|
872
|
-
interface $ZodCheckMaxLengthInternals<T$1 extends HasLength = HasLength> extends $ZodCheckInternals<T$1> {
|
|
873
|
-
def: $ZodCheckMaxLengthDef;
|
|
874
|
-
issc: $ZodIssueTooBig<T$1>;
|
|
875
|
-
}
|
|
876
|
-
interface $ZodCheckMaxLength<T$1 extends HasLength = HasLength> extends $ZodCheck<T$1> {
|
|
877
|
-
_zod: $ZodCheckMaxLengthInternals<T$1>;
|
|
878
|
-
}
|
|
879
|
-
declare const $ZodCheckMaxLength: $constructor<$ZodCheckMaxLength>;
|
|
880
|
-
interface $ZodCheckMinLengthDef extends $ZodCheckDef {
|
|
881
|
-
check: "min_length";
|
|
882
|
-
minimum: number;
|
|
883
|
-
}
|
|
884
|
-
interface $ZodCheckMinLengthInternals<T$1 extends HasLength = HasLength> extends $ZodCheckInternals<T$1> {
|
|
885
|
-
def: $ZodCheckMinLengthDef;
|
|
886
|
-
issc: $ZodIssueTooSmall<T$1>;
|
|
887
|
-
}
|
|
888
|
-
interface $ZodCheckMinLength<T$1 extends HasLength = HasLength> extends $ZodCheck<T$1> {
|
|
889
|
-
_zod: $ZodCheckMinLengthInternals<T$1>;
|
|
890
|
-
}
|
|
891
|
-
declare const $ZodCheckMinLength: $constructor<$ZodCheckMinLength>;
|
|
892
|
-
interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
|
|
893
|
-
check: "length_equals";
|
|
894
|
-
length: number;
|
|
895
|
-
}
|
|
896
|
-
interface $ZodCheckLengthEqualsInternals<T$1 extends HasLength = HasLength> extends $ZodCheckInternals<T$1> {
|
|
897
|
-
def: $ZodCheckLengthEqualsDef;
|
|
898
|
-
issc: $ZodIssueTooBig<T$1> | $ZodIssueTooSmall<T$1>;
|
|
899
|
-
}
|
|
900
|
-
interface $ZodCheckLengthEquals<T$1 extends HasLength = HasLength> extends $ZodCheck<T$1> {
|
|
901
|
-
_zod: $ZodCheckLengthEqualsInternals<T$1>;
|
|
902
|
-
}
|
|
903
|
-
declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
|
|
904
|
-
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";
|
|
905
|
-
interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
|
|
906
|
-
check: "string_format";
|
|
907
|
-
format: Format;
|
|
908
|
-
pattern?: RegExp | undefined;
|
|
909
|
-
}
|
|
910
|
-
interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
|
|
911
|
-
def: $ZodCheckStringFormatDef;
|
|
912
|
-
issc: $ZodIssueInvalidStringFormat;
|
|
913
|
-
}
|
|
914
|
-
interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
|
|
915
|
-
format: "regex";
|
|
916
|
-
pattern: RegExp;
|
|
917
|
-
}
|
|
918
|
-
interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
|
|
919
|
-
def: $ZodCheckRegexDef;
|
|
920
|
-
issc: $ZodIssueInvalidStringFormat;
|
|
921
|
-
}
|
|
922
|
-
interface $ZodCheckRegex extends $ZodCheck<string> {
|
|
923
|
-
_zod: $ZodCheckRegexInternals;
|
|
924
|
-
}
|
|
925
|
-
declare const $ZodCheckRegex: $constructor<$ZodCheckRegex>;
|
|
926
|
-
interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {}
|
|
927
|
-
interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
|
|
928
|
-
def: $ZodCheckLowerCaseDef;
|
|
929
|
-
issc: $ZodIssueInvalidStringFormat;
|
|
930
|
-
}
|
|
931
|
-
interface $ZodCheckLowerCase extends $ZodCheck<string> {
|
|
932
|
-
_zod: $ZodCheckLowerCaseInternals;
|
|
933
|
-
}
|
|
934
|
-
declare const $ZodCheckLowerCase: $constructor<$ZodCheckLowerCase>;
|
|
935
|
-
interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {}
|
|
936
|
-
interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
|
|
937
|
-
def: $ZodCheckUpperCaseDef;
|
|
938
|
-
issc: $ZodIssueInvalidStringFormat;
|
|
939
|
-
}
|
|
940
|
-
interface $ZodCheckUpperCase extends $ZodCheck<string> {
|
|
941
|
-
_zod: $ZodCheckUpperCaseInternals;
|
|
942
|
-
}
|
|
943
|
-
declare const $ZodCheckUpperCase: $constructor<$ZodCheckUpperCase>;
|
|
944
|
-
interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
|
|
945
|
-
includes: string;
|
|
946
|
-
position?: number | undefined;
|
|
947
|
-
}
|
|
948
|
-
interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
|
|
949
|
-
def: $ZodCheckIncludesDef;
|
|
950
|
-
issc: $ZodIssueInvalidStringFormat;
|
|
951
|
-
}
|
|
952
|
-
interface $ZodCheckIncludes extends $ZodCheck<string> {
|
|
953
|
-
_zod: $ZodCheckIncludesInternals;
|
|
954
|
-
}
|
|
955
|
-
declare const $ZodCheckIncludes: $constructor<$ZodCheckIncludes>;
|
|
956
|
-
interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
|
|
957
|
-
prefix: string;
|
|
958
|
-
}
|
|
959
|
-
interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
|
|
960
|
-
def: $ZodCheckStartsWithDef;
|
|
961
|
-
issc: $ZodIssueInvalidStringFormat;
|
|
962
|
-
}
|
|
963
|
-
interface $ZodCheckStartsWith extends $ZodCheck<string> {
|
|
964
|
-
_zod: $ZodCheckStartsWithInternals;
|
|
965
|
-
}
|
|
966
|
-
declare const $ZodCheckStartsWith: $constructor<$ZodCheckStartsWith>;
|
|
967
|
-
interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
|
|
968
|
-
suffix: string;
|
|
969
|
-
}
|
|
970
|
-
interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
|
|
971
|
-
def: $ZodCheckEndsWithDef;
|
|
972
|
-
issc: $ZodIssueInvalidStringFormat;
|
|
973
|
-
}
|
|
974
|
-
interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
|
|
975
|
-
_zod: $ZodCheckEndsWithInternals;
|
|
976
|
-
}
|
|
977
|
-
declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
|
|
978
|
-
//#endregion
|
|
979
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.d.cts
|
|
980
|
-
interface $ZodIssueBase {
|
|
981
|
-
readonly code?: string;
|
|
982
|
-
readonly input?: unknown;
|
|
983
|
-
readonly path: PropertyKey[];
|
|
984
|
-
readonly message: string;
|
|
985
|
-
}
|
|
986
|
-
interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
|
|
987
|
-
readonly code: "invalid_type";
|
|
988
|
-
readonly expected: $ZodType["_zod"]["def"]["type"];
|
|
989
|
-
readonly input?: Input;
|
|
990
|
-
}
|
|
991
|
-
interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
|
|
992
|
-
readonly code: "too_big";
|
|
993
|
-
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
994
|
-
readonly maximum: number | bigint;
|
|
995
|
-
readonly inclusive?: boolean;
|
|
996
|
-
readonly exact?: boolean;
|
|
997
|
-
readonly input?: Input;
|
|
998
|
-
}
|
|
999
|
-
interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
|
|
1000
|
-
readonly code: "too_small";
|
|
1001
|
-
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
1002
|
-
readonly minimum: number | bigint;
|
|
1003
|
-
/** True if the allowable range includes the minimum */
|
|
1004
|
-
readonly inclusive?: boolean;
|
|
1005
|
-
/** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
|
|
1006
|
-
readonly exact?: boolean;
|
|
1007
|
-
readonly input?: Input;
|
|
1008
|
-
}
|
|
1009
|
-
interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
|
|
1010
|
-
readonly code: "invalid_format";
|
|
1011
|
-
readonly format: $ZodStringFormats | (string & {});
|
|
1012
|
-
readonly pattern?: string;
|
|
1013
|
-
readonly input?: string;
|
|
1014
|
-
}
|
|
1015
|
-
interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
|
|
1016
|
-
readonly code: "not_multiple_of";
|
|
1017
|
-
readonly divisor: number;
|
|
1018
|
-
readonly input?: Input;
|
|
1019
|
-
}
|
|
1020
|
-
interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
|
|
1021
|
-
readonly code: "unrecognized_keys";
|
|
1022
|
-
readonly keys: string[];
|
|
1023
|
-
readonly input?: Record<string, unknown>;
|
|
1024
|
-
}
|
|
1025
|
-
interface $ZodIssueInvalidUnion extends $ZodIssueBase {
|
|
1026
|
-
readonly code: "invalid_union";
|
|
1027
|
-
readonly errors: $ZodIssue[][];
|
|
1028
|
-
readonly input?: unknown;
|
|
1029
|
-
readonly discriminator?: string | undefined;
|
|
1030
|
-
}
|
|
1031
|
-
interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
|
|
1032
|
-
readonly code: "invalid_key";
|
|
1033
|
-
readonly origin: "map" | "record";
|
|
1034
|
-
readonly issues: $ZodIssue[];
|
|
1035
|
-
readonly input?: Input;
|
|
1036
|
-
}
|
|
1037
|
-
interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
|
|
1038
|
-
readonly code: "invalid_element";
|
|
1039
|
-
readonly origin: "map" | "set";
|
|
1040
|
-
readonly key: unknown;
|
|
1041
|
-
readonly issues: $ZodIssue[];
|
|
1042
|
-
readonly input?: Input;
|
|
1043
|
-
}
|
|
1044
|
-
interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
|
|
1045
|
-
readonly code: "invalid_value";
|
|
1046
|
-
readonly values: Primitive[];
|
|
1047
|
-
readonly input?: Input;
|
|
1048
|
-
}
|
|
1049
|
-
interface $ZodIssueCustom extends $ZodIssueBase {
|
|
1050
|
-
readonly code: "custom";
|
|
1051
|
-
readonly params?: Record<string, any> | undefined;
|
|
1052
|
-
readonly input?: unknown;
|
|
1053
|
-
}
|
|
1054
|
-
type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
|
|
1055
|
-
type $ZodInternalIssue<T$1 extends $ZodIssueBase = $ZodIssue> = T$1 extends any ? RawIssue$1<T$1> : never;
|
|
1056
|
-
type RawIssue$1<T$1 extends $ZodIssueBase> = T$1 extends any ? Flatten<MakePartial<T$1, "message" | "path"> & {
|
|
1057
|
-
/** The input data */
|
|
1058
|
-
readonly input: unknown;
|
|
1059
|
-
/** The schema or check that originated this issue. */
|
|
1060
|
-
readonly inst?: $ZodType | $ZodCheck;
|
|
1061
|
-
/** If `true`, Zod will continue executing checks/refinements after this issue. */
|
|
1062
|
-
readonly continue?: boolean | undefined;
|
|
1063
|
-
} & Record<string, unknown>> : never;
|
|
1064
|
-
type $ZodRawIssue<T$1 extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T$1>;
|
|
1065
|
-
interface $ZodErrorMap<T$1 extends $ZodIssueBase = $ZodIssue> {
|
|
1066
|
-
(issue: $ZodRawIssue<T$1>): {
|
|
1067
|
-
message: string;
|
|
1068
|
-
} | string | undefined | null;
|
|
1069
|
-
}
|
|
1070
|
-
interface $ZodError<T$1 = unknown> extends Error {
|
|
1071
|
-
type: T$1;
|
|
1072
|
-
issues: $ZodIssue[];
|
|
1073
|
-
_zod: {
|
|
1074
|
-
output: T$1;
|
|
1075
|
-
def: $ZodIssue[];
|
|
1076
|
-
};
|
|
1077
|
-
stack?: string;
|
|
1078
|
-
name: string;
|
|
1079
|
-
}
|
|
1080
|
-
declare const $ZodError: $constructor<$ZodError>;
|
|
1081
|
-
type $ZodFlattenedError<T$1, U = string> = _FlattenedError<T$1, U>;
|
|
1082
|
-
type _FlattenedError<T$1, U = string> = {
|
|
1083
|
-
formErrors: U[];
|
|
1084
|
-
fieldErrors: { [P in keyof T$1]?: U[] };
|
|
1085
|
-
};
|
|
1086
|
-
type _ZodFormattedError<T$1, U = string> = T$1 extends [any, ...any[]] ? { [K in keyof T$1]?: $ZodFormattedError<T$1[K], U> } : T$1 extends any[] ? {
|
|
1087
|
-
[k: number]: $ZodFormattedError<T$1[number], U>;
|
|
1088
|
-
} : T$1 extends object ? Flatten<{ [K in keyof T$1]?: $ZodFormattedError<T$1[K], U> }> : any;
|
|
1089
|
-
type $ZodFormattedError<T$1, U = string> = {
|
|
1090
|
-
_errors: U[];
|
|
1091
|
-
} & Flatten<_ZodFormattedError<T$1, U>>;
|
|
1092
|
-
//#endregion
|
|
1093
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.d.cts
|
|
1094
|
-
type ZodTrait = {
|
|
1095
|
-
_zod: {
|
|
1096
|
-
def: any;
|
|
1097
|
-
[k: string]: any;
|
|
1098
|
-
};
|
|
1099
|
-
};
|
|
1100
|
-
interface $constructor<T$1 extends ZodTrait, D = T$1["_zod"]["def"]> {
|
|
1101
|
-
new (def: D): T$1;
|
|
1102
|
-
init(inst: T$1, def: D): asserts inst is T$1;
|
|
1103
|
-
}
|
|
1104
|
-
declare function $constructor<T$1 extends ZodTrait, D = T$1["_zod"]["def"]>(name: string, initializer: (inst: T$1, def: D) => void, params?: {
|
|
1105
|
-
Parent?: typeof Class;
|
|
1106
|
-
}): $constructor<T$1, D>;
|
|
1107
|
-
declare const $brand: unique symbol;
|
|
1108
|
-
type $brand<T$1 extends string | number | symbol = string | number | symbol> = {
|
|
1109
|
-
[$brand]: { [k in T$1]: true };
|
|
1110
|
-
};
|
|
1111
|
-
type $ZodBranded<T$1 extends SomeType, Brand extends string | number | symbol> = T$1 & Record<"_zod", Record<"output", output<T$1> & $brand<Brand>>>;
|
|
1112
|
-
type input<T$1> = T$1 extends {
|
|
1113
|
-
_zod: {
|
|
1114
|
-
input: any;
|
|
1115
|
-
};
|
|
1116
|
-
} ? T$1["_zod"]["input"] : unknown;
|
|
1117
|
-
type output<T$1> = T$1 extends {
|
|
1118
|
-
_zod: {
|
|
1119
|
-
output: any;
|
|
1120
|
-
};
|
|
1121
|
-
} ? T$1["_zod"]["output"] : unknown;
|
|
1122
|
-
//#endregion
|
|
1123
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.d.cts
|
|
1124
|
-
declare const $output: unique symbol;
|
|
1125
|
-
type $output = typeof $output;
|
|
1126
|
-
declare const $input: unique symbol;
|
|
1127
|
-
type $input = typeof $input;
|
|
1128
|
-
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;
|
|
1129
|
-
type MetadataType = object | undefined;
|
|
1130
|
-
declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
|
|
1131
|
-
_meta: Meta;
|
|
1132
|
-
_schema: Schema;
|
|
1133
|
-
_map: WeakMap<Schema, $replace<Meta, Schema>>;
|
|
1134
|
-
_idmap: Map<string, Schema>;
|
|
1135
|
-
add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
|
|
1136
|
-
clear(): this;
|
|
1137
|
-
remove(schema: Schema): this;
|
|
1138
|
-
get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
|
|
1139
|
-
has(schema: Schema): boolean;
|
|
1140
|
-
}
|
|
1141
|
-
interface JSONSchemaMeta {
|
|
1142
|
-
id?: string | undefined;
|
|
1143
|
-
title?: string | undefined;
|
|
1144
|
-
description?: string | undefined;
|
|
1145
|
-
deprecated?: boolean | undefined;
|
|
1146
|
-
[k: string]: unknown;
|
|
1147
|
-
}
|
|
1148
|
-
interface GlobalMeta extends JSONSchemaMeta {}
|
|
1149
|
-
//#endregion
|
|
1150
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.d.cts
|
|
1151
|
-
type Params<T$1 extends $ZodType | $ZodCheck, IssueTypes extends $ZodIssueBase, OmitKeys extends keyof T$1["_zod"]["def"] = never> = Flatten<Partial<EmptyToNever<Omit<T$1["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
|
|
1152
|
-
error?: string | $ZodErrorMap<IssueTypes> | undefined;
|
|
1153
|
-
/** @deprecated This parameter is deprecated. Use `error` instead. */
|
|
1154
|
-
message?: string | undefined;
|
|
1155
|
-
})>>>;
|
|
1156
|
-
type TypeParams<T$1 extends $ZodType = $ZodType & {
|
|
1157
|
-
_isst: never;
|
|
1158
|
-
}, AlsoOmit extends Exclude<keyof T$1["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T$1, NonNullable<T$1["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
|
|
1159
|
-
type CheckParams<T$1 extends $ZodCheck = $ZodCheck,
|
|
1160
|
-
// & { _issc: never },
|
|
1161
|
-
AlsoOmit extends Exclude<keyof T$1["_zod"]["def"], "check" | "error"> = never> = Params<T$1, NonNullable<T$1["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
|
|
1162
|
-
type CheckStringFormatParams<T$1 extends $ZodStringFormat = $ZodStringFormat, AlsoOmit extends Exclude<keyof T$1["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T$1, NonNullable<T$1["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
|
|
1163
|
-
type CheckTypeParams<T$1 extends $ZodType & $ZodCheck = $ZodType & $ZodCheck, AlsoOmit extends Exclude<keyof T$1["_zod"]["def"], "type" | "checks" | "error" | "check"> = never> = Params<T$1, NonNullable<T$1["_zod"]["isst"] | T$1["_zod"]["issc"]>, "type" | "checks" | "error" | "check" | AlsoOmit>;
|
|
1164
|
-
type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
|
|
1165
|
-
type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">;
|
|
1166
|
-
type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
1167
|
-
type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
|
|
1168
|
-
type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
|
|
1169
|
-
type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
|
|
1170
|
-
type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
|
|
1171
|
-
type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
|
|
1172
|
-
type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
|
|
1173
|
-
type $ZodCheckXIDParams = CheckStringFormatParams<$ZodXID, "when">;
|
|
1174
|
-
type $ZodCheckKSUIDParams = CheckStringFormatParams<$ZodKSUID, "when">;
|
|
1175
|
-
type $ZodCheckIPv4Params = CheckStringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
|
|
1176
|
-
type $ZodCheckIPv6Params = CheckStringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
|
|
1177
|
-
type $ZodCheckCIDRv4Params = CheckStringFormatParams<$ZodCIDRv4, "pattern" | "when">;
|
|
1178
|
-
type $ZodCheckCIDRv6Params = CheckStringFormatParams<$ZodCIDRv6, "pattern" | "when">;
|
|
1179
|
-
type $ZodCheckBase64Params = CheckStringFormatParams<$ZodBase64, "pattern" | "when">;
|
|
1180
|
-
type $ZodCheckBase64URLParams = CheckStringFormatParams<$ZodBase64URL, "pattern" | "when">;
|
|
1181
|
-
type $ZodCheckE164Params = CheckStringFormatParams<$ZodE164, "when">;
|
|
1182
|
-
type $ZodCheckJWTParams = CheckStringFormatParams<$ZodJWT, "pattern" | "when">;
|
|
1183
|
-
type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "pattern" | "when">;
|
|
1184
|
-
type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
|
|
1185
|
-
type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
|
|
1186
|
-
type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
|
|
1187
|
-
type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
|
|
1188
|
-
type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
|
|
1189
|
-
type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
|
|
1190
|
-
type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
|
|
1191
|
-
type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
|
|
1192
|
-
type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
|
|
1193
|
-
type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
|
|
1194
|
-
type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
|
|
1195
|
-
type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
|
|
1196
|
-
type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
|
|
1197
|
-
type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
|
|
1198
|
-
type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
|
|
1199
|
-
type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
|
|
1200
|
-
type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
|
|
1201
|
-
type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
|
|
1202
|
-
type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
|
|
1203
|
-
type $ZodSuperRefineIssue<T$1 extends $ZodIssueBase = $ZodIssue> = T$1 extends any ? RawIssue<T$1> : never;
|
|
1204
|
-
type RawIssue<T$1 extends $ZodIssueBase> = T$1 extends any ? Flatten<MakePartial<T$1, "message" | "path"> & {
|
|
1205
|
-
/** The schema or check that originated this issue. */
|
|
1206
|
-
readonly inst?: $ZodType | $ZodCheck;
|
|
1207
|
-
/** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
|
|
1208
|
-
readonly continue?: boolean | undefined;
|
|
1209
|
-
} & Record<string, unknown>> : never;
|
|
1210
|
-
interface $RefinementCtx<T$1 = unknown> extends ParsePayload<T$1> {
|
|
1211
|
-
addIssue(arg: string | $ZodSuperRefineIssue): void;
|
|
1212
|
-
}
|
|
1213
|
-
//#endregion
|
|
1214
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.d.cts
|
|
1215
|
-
/** An Error-like class used to store Zod validation issues. */
|
|
1216
|
-
interface ZodError<T$1 = unknown> extends $ZodError<T$1> {
|
|
1217
|
-
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
1218
|
-
format(): $ZodFormattedError<T$1>;
|
|
1219
|
-
format<U>(mapper: (issue: $ZodIssue) => U): $ZodFormattedError<T$1, U>;
|
|
1220
|
-
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
1221
|
-
flatten(): $ZodFlattenedError<T$1>;
|
|
1222
|
-
flatten<U>(mapper: (issue: $ZodIssue) => U): $ZodFlattenedError<T$1, U>;
|
|
1223
|
-
/** @deprecated Push directly to `.issues` instead. */
|
|
1224
|
-
addIssue(issue: $ZodIssue): void;
|
|
1225
|
-
/** @deprecated Push directly to `.issues` instead. */
|
|
1226
|
-
addIssues(issues: $ZodIssue[]): void;
|
|
1227
|
-
/** @deprecated Check `err.issues.length === 0` instead. */
|
|
1228
|
-
isEmpty: boolean;
|
|
1229
|
-
}
|
|
1230
|
-
declare const ZodError: $constructor<ZodError>;
|
|
1231
|
-
//#endregion
|
|
1232
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.d.cts
|
|
1233
|
-
type ZodSafeParseResult<T$1> = ZodSafeParseSuccess<T$1> | ZodSafeParseError<T$1>;
|
|
1234
|
-
type ZodSafeParseSuccess<T$1> = {
|
|
1235
|
-
success: true;
|
|
1236
|
-
data: T$1;
|
|
1237
|
-
error?: never;
|
|
1238
|
-
};
|
|
1239
|
-
type ZodSafeParseError<T$1> = {
|
|
1240
|
-
success: false;
|
|
1241
|
-
data?: never;
|
|
1242
|
-
error: ZodError<T$1>;
|
|
1243
|
-
};
|
|
1244
|
-
//#endregion
|
|
1245
|
-
//#region node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.d.cts
|
|
1246
|
-
interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
|
|
1247
|
-
def: Internals["def"];
|
|
1248
|
-
type: Internals["def"]["type"];
|
|
1249
|
-
/** @deprecated Use `.def` instead. */
|
|
1250
|
-
_def: Internals["def"];
|
|
1251
|
-
/** @deprecated Use `z.output<typeof schema>` instead. */
|
|
1252
|
-
_output: Internals["output"];
|
|
1253
|
-
/** @deprecated Use `z.input<typeof schema>` instead. */
|
|
1254
|
-
_input: Internals["input"];
|
|
1255
|
-
check(...checks: (CheckFn<output<this>> | $ZodCheck<output<this>>)[]): this;
|
|
1256
|
-
clone(def?: Internals["def"], params?: {
|
|
1257
|
-
parent: boolean;
|
|
1258
|
-
}): this;
|
|
1259
|
-
register<R$1 extends $ZodRegistry>(registry: R$1, ...meta: this extends R$1["_schema"] ? undefined extends R$1["_meta"] ? [$replace<R$1["_meta"], this>?] : [$replace<R$1["_meta"], this>] : ["Incompatible schema"]): this;
|
|
1260
|
-
brand<T$1 extends PropertyKey = PropertyKey>(value?: T$1): PropertyKey extends T$1 ? this : $ZodBranded<this, T$1>;
|
|
1261
|
-
parse(data: unknown, params?: ParseContext<$ZodIssue>): output<this>;
|
|
1262
|
-
safeParse(data: unknown, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
|
|
1263
|
-
parseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
|
|
1264
|
-
safeParseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
|
|
1265
|
-
spa: (data: unknown, params?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<this>>>;
|
|
1266
|
-
encode(data: output<this>, params?: ParseContext<$ZodIssue>): input<this>;
|
|
1267
|
-
decode(data: input<this>, params?: ParseContext<$ZodIssue>): output<this>;
|
|
1268
|
-
encodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<input<this>>;
|
|
1269
|
-
decodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
|
|
1270
|
-
safeEncode(data: output<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<input<this>>;
|
|
1271
|
-
safeDecode(data: input<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
|
|
1272
|
-
safeEncodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<input<this>>>;
|
|
1273
|
-
safeDecodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
|
|
1274
|
-
refine(check: (arg: output<this>) => unknown | Promise<unknown>, params?: string | $ZodCustomParams): this;
|
|
1275
|
-
superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>): this;
|
|
1276
|
-
overwrite(fn: (x: output<this>) => output<this>): this;
|
|
1277
|
-
optional(): ZodOptional<this>;
|
|
1278
|
-
nonoptional(params?: string | $ZodNonOptionalParams): ZodNonOptional<this>;
|
|
1279
|
-
nullable(): ZodNullable<this>;
|
|
1280
|
-
nullish(): ZodOptional<ZodNullable<this>>;
|
|
1281
|
-
default(def: NoUndefined<output<this>>): ZodDefault<this>;
|
|
1282
|
-
default(def: () => NoUndefined<output<this>>): ZodDefault<this>;
|
|
1283
|
-
prefault(def: () => input<this>): ZodPrefault<this>;
|
|
1284
|
-
prefault(def: input<this>): ZodPrefault<this>;
|
|
1285
|
-
array(): ZodArray<this>;
|
|
1286
|
-
or<T$1 extends SomeType>(option: T$1): ZodUnion<[this, T$1]>;
|
|
1287
|
-
and<T$1 extends SomeType>(incoming: T$1): ZodIntersection<this, T$1>;
|
|
1288
|
-
transform<NewOut>(transform: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, output<this>>>;
|
|
1289
|
-
catch(def: output<this>): ZodCatch<this>;
|
|
1290
|
-
catch(def: (ctx: $ZodCatchCtx) => output<this>): ZodCatch<this>;
|
|
1291
|
-
pipe<T$1 extends $ZodType<any, output<this>>>(target: T$1 | $ZodType<any, output<this>>): ZodPipe<this, T$1>;
|
|
1292
|
-
readonly(): ZodReadonly<this>;
|
|
1293
|
-
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
|
|
1294
|
-
describe(description: string): this;
|
|
1295
|
-
description?: string;
|
|
1296
|
-
/** Returns the metadata associated with this instance in `z.globalRegistry` */
|
|
1297
|
-
meta(): $replace<GlobalMeta, this> | undefined;
|
|
1298
|
-
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
|
|
1299
|
-
meta(data: $replace<GlobalMeta, this>): this;
|
|
1300
|
-
/** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
|
|
1301
|
-
*
|
|
1302
|
-
* ```ts
|
|
1303
|
-
* const schema = z.string().optional();
|
|
1304
|
-
* const isOptional = schema.safeParse(undefined).success; // true
|
|
1305
|
-
* ```
|
|
1306
|
-
*/
|
|
1307
|
-
isOptional(): boolean;
|
|
1308
|
-
/**
|
|
1309
|
-
* @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
|
|
1310
|
-
*
|
|
1311
|
-
* ```ts
|
|
1312
|
-
* const schema = z.string().nullable();
|
|
1313
|
-
* const isNullable = schema.safeParse(null).success; // true
|
|
1314
|
-
* ```
|
|
1315
|
-
*/
|
|
1316
|
-
isNullable(): boolean;
|
|
1317
|
-
}
|
|
1318
|
-
interface _ZodType<out Internals extends $ZodTypeInternals = $ZodTypeInternals> extends ZodType<any, any, Internals> {}
|
|
1319
|
-
declare const ZodType: $constructor<ZodType>;
|
|
1320
|
-
interface _ZodString<T$1 extends $ZodStringInternals<unknown> = $ZodStringInternals<unknown>> extends _ZodType<T$1> {
|
|
1321
|
-
format: string | null;
|
|
1322
|
-
minLength: number | null;
|
|
1323
|
-
maxLength: number | null;
|
|
1324
|
-
regex(regex: RegExp, params?: string | $ZodCheckRegexParams): this;
|
|
1325
|
-
includes(value: string, params?: $ZodCheckIncludesParams): this;
|
|
1326
|
-
startsWith(value: string, params?: string | $ZodCheckStartsWithParams): this;
|
|
1327
|
-
endsWith(value: string, params?: string | $ZodCheckEndsWithParams): this;
|
|
1328
|
-
min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
|
|
1329
|
-
max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
|
|
1330
|
-
length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
|
|
1331
|
-
nonempty(params?: string | $ZodCheckMinLengthParams): this;
|
|
1332
|
-
lowercase(params?: string | $ZodCheckLowerCaseParams): this;
|
|
1333
|
-
uppercase(params?: string | $ZodCheckUpperCaseParams): this;
|
|
1334
|
-
trim(): this;
|
|
1335
|
-
normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
|
|
1336
|
-
toLowerCase(): this;
|
|
1337
|
-
toUpperCase(): this;
|
|
1338
|
-
}
|
|
1339
|
-
/** @internal */
|
|
1340
|
-
declare const _ZodString: $constructor<_ZodString>;
|
|
1341
|
-
interface ZodString extends _ZodString<$ZodStringInternals<string>> {
|
|
1342
|
-
/** @deprecated Use `z.email()` instead. */
|
|
1343
|
-
email(params?: string | $ZodCheckEmailParams): this;
|
|
1344
|
-
/** @deprecated Use `z.url()` instead. */
|
|
1345
|
-
url(params?: string | $ZodCheckURLParams): this;
|
|
1346
|
-
/** @deprecated Use `z.jwt()` instead. */
|
|
1347
|
-
jwt(params?: string | $ZodCheckJWTParams): this;
|
|
1348
|
-
/** @deprecated Use `z.emoji()` instead. */
|
|
1349
|
-
emoji(params?: string | $ZodCheckEmojiParams): this;
|
|
1350
|
-
/** @deprecated Use `z.guid()` instead. */
|
|
1351
|
-
guid(params?: string | $ZodCheckGUIDParams): this;
|
|
1352
|
-
/** @deprecated Use `z.uuid()` instead. */
|
|
1353
|
-
uuid(params?: string | $ZodCheckUUIDParams): this;
|
|
1354
|
-
/** @deprecated Use `z.uuid()` instead. */
|
|
1355
|
-
uuidv4(params?: string | $ZodCheckUUIDParams): this;
|
|
1356
|
-
/** @deprecated Use `z.uuid()` instead. */
|
|
1357
|
-
uuidv6(params?: string | $ZodCheckUUIDParams): this;
|
|
1358
|
-
/** @deprecated Use `z.uuid()` instead. */
|
|
1359
|
-
uuidv7(params?: string | $ZodCheckUUIDParams): this;
|
|
1360
|
-
/** @deprecated Use `z.nanoid()` instead. */
|
|
1361
|
-
nanoid(params?: string | $ZodCheckNanoIDParams): this;
|
|
1362
|
-
/** @deprecated Use `z.guid()` instead. */
|
|
1363
|
-
guid(params?: string | $ZodCheckGUIDParams): this;
|
|
1364
|
-
/** @deprecated Use `z.cuid()` instead. */
|
|
1365
|
-
cuid(params?: string | $ZodCheckCUIDParams): this;
|
|
1366
|
-
/** @deprecated Use `z.cuid2()` instead. */
|
|
1367
|
-
cuid2(params?: string | $ZodCheckCUID2Params): this;
|
|
1368
|
-
/** @deprecated Use `z.ulid()` instead. */
|
|
1369
|
-
ulid(params?: string | $ZodCheckULIDParams): this;
|
|
1370
|
-
/** @deprecated Use `z.base64()` instead. */
|
|
1371
|
-
base64(params?: string | $ZodCheckBase64Params): this;
|
|
1372
|
-
/** @deprecated Use `z.base64url()` instead. */
|
|
1373
|
-
base64url(params?: string | $ZodCheckBase64URLParams): this;
|
|
1374
|
-
/** @deprecated Use `z.xid()` instead. */
|
|
1375
|
-
xid(params?: string | $ZodCheckXIDParams): this;
|
|
1376
|
-
/** @deprecated Use `z.ksuid()` instead. */
|
|
1377
|
-
ksuid(params?: string | $ZodCheckKSUIDParams): this;
|
|
1378
|
-
/** @deprecated Use `z.ipv4()` instead. */
|
|
1379
|
-
ipv4(params?: string | $ZodCheckIPv4Params): this;
|
|
1380
|
-
/** @deprecated Use `z.ipv6()` instead. */
|
|
1381
|
-
ipv6(params?: string | $ZodCheckIPv6Params): this;
|
|
1382
|
-
/** @deprecated Use `z.cidrv4()` instead. */
|
|
1383
|
-
cidrv4(params?: string | $ZodCheckCIDRv4Params): this;
|
|
1384
|
-
/** @deprecated Use `z.cidrv6()` instead. */
|
|
1385
|
-
cidrv6(params?: string | $ZodCheckCIDRv6Params): this;
|
|
1386
|
-
/** @deprecated Use `z.e164()` instead. */
|
|
1387
|
-
e164(params?: string | $ZodCheckE164Params): this;
|
|
1388
|
-
/** @deprecated Use `z.iso.datetime()` instead. */
|
|
1389
|
-
datetime(params?: string | $ZodCheckISODateTimeParams): this;
|
|
1390
|
-
/** @deprecated Use `z.iso.date()` instead. */
|
|
1391
|
-
date(params?: string | $ZodCheckISODateParams): this;
|
|
1392
|
-
/** @deprecated Use `z.iso.time()` instead. */
|
|
1393
|
-
time(params?: string | $ZodCheckISOTimeParams): this;
|
|
1394
|
-
/** @deprecated Use `z.iso.duration()` instead. */
|
|
1395
|
-
duration(params?: string | $ZodCheckISODurationParams): this;
|
|
1396
|
-
}
|
|
1397
|
-
declare const ZodString: $constructor<ZodString>;
|
|
1398
|
-
interface _ZodNumber<Internals extends $ZodNumberInternals = $ZodNumberInternals> extends _ZodType<Internals> {
|
|
1399
|
-
gt(value: number, params?: string | $ZodCheckGreaterThanParams): this;
|
|
1400
|
-
/** Identical to .min() */
|
|
1401
|
-
gte(value: number, params?: string | $ZodCheckGreaterThanParams): this;
|
|
1402
|
-
min(value: number, params?: string | $ZodCheckGreaterThanParams): this;
|
|
1403
|
-
lt(value: number, params?: string | $ZodCheckLessThanParams): this;
|
|
1404
|
-
/** Identical to .max() */
|
|
1405
|
-
lte(value: number, params?: string | $ZodCheckLessThanParams): this;
|
|
1406
|
-
max(value: number, params?: string | $ZodCheckLessThanParams): this;
|
|
1407
|
-
/** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
|
|
1408
|
-
int(params?: string | $ZodCheckNumberFormatParams): this;
|
|
1409
|
-
/** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
|
|
1410
|
-
safe(params?: string | $ZodCheckNumberFormatParams): this;
|
|
1411
|
-
positive(params?: string | $ZodCheckGreaterThanParams): this;
|
|
1412
|
-
nonnegative(params?: string | $ZodCheckGreaterThanParams): this;
|
|
1413
|
-
negative(params?: string | $ZodCheckLessThanParams): this;
|
|
1414
|
-
nonpositive(params?: string | $ZodCheckLessThanParams): this;
|
|
1415
|
-
multipleOf(value: number, params?: string | $ZodCheckMultipleOfParams): this;
|
|
1416
|
-
/** @deprecated Use `.multipleOf()` instead. */
|
|
1417
|
-
step(value: number, params?: string | $ZodCheckMultipleOfParams): this;
|
|
1418
|
-
/** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
|
|
1419
|
-
finite(params?: unknown): this;
|
|
1420
|
-
minValue: number | null;
|
|
1421
|
-
maxValue: number | null;
|
|
1422
|
-
/** @deprecated Check the `format` property instead. */
|
|
1423
|
-
isInt: boolean;
|
|
1424
|
-
/** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
|
|
1425
|
-
isFinite: boolean;
|
|
1426
|
-
format: string | null;
|
|
1427
|
-
}
|
|
1428
|
-
interface ZodNumber extends _ZodNumber<$ZodNumberInternals<number>> {}
|
|
1429
|
-
declare const ZodNumber: $constructor<ZodNumber>;
|
|
1430
|
-
interface ZodArray<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T$1>>, $ZodArray<T$1> {
|
|
1431
|
-
element: T$1;
|
|
1432
|
-
min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
|
|
1433
|
-
nonempty(params?: string | $ZodCheckMinLengthParams): this;
|
|
1434
|
-
max(maxLength: number, params?: string | $ZodCheckMaxLengthParams): this;
|
|
1435
|
-
length(len: number, params?: string | $ZodCheckLengthEqualsParams): this;
|
|
1436
|
-
unwrap(): T$1;
|
|
1437
|
-
}
|
|
1438
|
-
declare const ZodArray: $constructor<ZodArray>;
|
|
1439
|
-
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] };
|
|
1440
|
-
interface ZodObject< /** @ts-ignore Cast variance */
|
|
1441
|
-
out Shape extends $ZodShape = $ZodLooseShape, out Config$1 extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape, Config$1>>, $ZodObject<Shape, Config$1> {
|
|
1442
|
-
shape: Shape;
|
|
1443
|
-
keyof(): ZodEnum<ToEnum<keyof Shape & string>>;
|
|
1444
|
-
/** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
|
|
1445
|
-
catchall<T$1 extends SomeType>(schema: T$1): ZodObject<Shape, $catchall<T$1>>;
|
|
1446
|
-
/** @deprecated Use `z.looseObject()` or `.loose()` instead. */
|
|
1447
|
-
passthrough(): ZodObject<Shape, $loose>;
|
|
1448
|
-
/** Consider `z.looseObject(A.shape)` instead */
|
|
1449
|
-
loose(): ZodObject<Shape, $loose>;
|
|
1450
|
-
/** Consider `z.strictObject(A.shape)` instead */
|
|
1451
|
-
strict(): ZodObject<Shape, $strict>;
|
|
1452
|
-
/** This is the default behavior. This method call is likely unnecessary. */
|
|
1453
|
-
strip(): ZodObject<Shape, $strip>;
|
|
1454
|
-
extend<U extends $ZodLooseShape>(shape: U): ZodObject<Extend<Shape, U>, Config$1>;
|
|
1455
|
-
safeExtend<U extends $ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, SomeType>>): ZodObject<Extend<Shape, U>, Config$1>;
|
|
1456
|
-
/**
|
|
1457
|
-
* @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
|
|
1458
|
-
*/
|
|
1459
|
-
merge<U extends ZodObject>(other: U): ZodObject<Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
|
|
1460
|
-
pick<M$1 extends Mask<keyof Shape>>(mask: M$1): ZodObject<Flatten<Pick<Shape, Extract<keyof Shape, keyof M$1>>>, Config$1>;
|
|
1461
|
-
omit<M$1 extends Mask<keyof Shape>>(mask: M$1): ZodObject<Flatten<Omit<Shape, Extract<keyof Shape, keyof M$1>>>, Config$1>;
|
|
1462
|
-
partial(): ZodObject<{ [k in keyof Shape]: ZodOptional<Shape[k]> }, Config$1>;
|
|
1463
|
-
partial<M$1 extends Mask<keyof Shape>>(mask: M$1): ZodObject<{ [k in keyof Shape]: k extends keyof M$1 ? ZodOptional<Shape[k]> : Shape[k] }, Config$1>;
|
|
1464
|
-
required(): ZodObject<{ [k in keyof Shape]: ZodNonOptional<Shape[k]> }, Config$1>;
|
|
1465
|
-
required<M$1 extends Mask<keyof Shape>>(mask: M$1): ZodObject<{ [k in keyof Shape]: k extends keyof M$1 ? ZodNonOptional<Shape[k]> : Shape[k] }, Config$1>;
|
|
1466
|
-
}
|
|
1467
|
-
declare const ZodObject: $constructor<ZodObject>;
|
|
1468
|
-
interface ZodUnion<T$1 extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T$1>>, $ZodUnion<T$1> {
|
|
1469
|
-
options: T$1;
|
|
1470
|
-
}
|
|
1471
|
-
declare const ZodUnion: $constructor<ZodUnion>;
|
|
1472
|
-
interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A, B>>, $ZodIntersection<A, B> {}
|
|
1473
|
-
declare const ZodIntersection: $constructor<ZodIntersection>;
|
|
1474
|
-
interface ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends _ZodType<$ZodRecordInternals<Key, Value>>, $ZodRecord<Key, Value> {
|
|
1475
|
-
keyType: Key;
|
|
1476
|
-
valueType: Value;
|
|
1477
|
-
}
|
|
1478
|
-
declare const ZodRecord: $constructor<ZodRecord>;
|
|
1479
|
-
interface ZodEnum< /** @ts-ignore Cast variance */
|
|
1480
|
-
out T$1 extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T$1>>, $ZodEnum<T$1> {
|
|
1481
|
-
enum: T$1;
|
|
1482
|
-
options: Array<T$1[keyof T$1]>;
|
|
1483
|
-
extract<const U extends readonly (keyof T$1)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Pick<T$1, U[number]>>>;
|
|
1484
|
-
exclude<const U extends readonly (keyof T$1)[]>(values: U, params?: string | $ZodEnumParams): ZodEnum<Flatten<Omit<T$1, U[number]>>>;
|
|
1485
|
-
}
|
|
1486
|
-
declare const ZodEnum: $constructor<ZodEnum>;
|
|
1487
|
-
interface ZodTransform<O = unknown, I = unknown> extends _ZodType<$ZodTransformInternals<O, I>>, $ZodTransform<O, I> {}
|
|
1488
|
-
declare const ZodTransform: $constructor<ZodTransform>;
|
|
1489
|
-
interface ZodOptional<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodOptionalInternals<T$1>>, $ZodOptional<T$1> {
|
|
1490
|
-
unwrap(): T$1;
|
|
1491
|
-
}
|
|
1492
|
-
declare const ZodOptional: $constructor<ZodOptional>;
|
|
1493
|
-
interface ZodNullable<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodNullableInternals<T$1>>, $ZodNullable<T$1> {
|
|
1494
|
-
unwrap(): T$1;
|
|
1495
|
-
}
|
|
1496
|
-
declare const ZodNullable: $constructor<ZodNullable>;
|
|
1497
|
-
interface ZodDefault<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodDefaultInternals<T$1>>, $ZodDefault<T$1> {
|
|
1498
|
-
unwrap(): T$1;
|
|
1499
|
-
/** @deprecated Use `.unwrap()` instead. */
|
|
1500
|
-
removeDefault(): T$1;
|
|
1501
|
-
}
|
|
1502
|
-
declare const ZodDefault: $constructor<ZodDefault>;
|
|
1503
|
-
interface ZodPrefault<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodPrefaultInternals<T$1>>, $ZodPrefault<T$1> {
|
|
1504
|
-
unwrap(): T$1;
|
|
1505
|
-
}
|
|
1506
|
-
declare const ZodPrefault: $constructor<ZodPrefault>;
|
|
1507
|
-
interface ZodNonOptional<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodNonOptionalInternals<T$1>>, $ZodNonOptional<T$1> {
|
|
1508
|
-
unwrap(): T$1;
|
|
1509
|
-
}
|
|
1510
|
-
declare const ZodNonOptional: $constructor<ZodNonOptional>;
|
|
1511
|
-
interface ZodCatch<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodCatchInternals<T$1>>, $ZodCatch<T$1> {
|
|
1512
|
-
unwrap(): T$1;
|
|
1513
|
-
/** @deprecated Use `.unwrap()` instead. */
|
|
1514
|
-
removeCatch(): T$1;
|
|
1515
|
-
}
|
|
1516
|
-
declare const ZodCatch: $constructor<ZodCatch>;
|
|
1517
|
-
interface ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A, B>>, $ZodPipe<A, B> {
|
|
1518
|
-
in: A;
|
|
1519
|
-
out: B;
|
|
1520
|
-
}
|
|
1521
|
-
declare const ZodPipe: $constructor<ZodPipe>;
|
|
1522
|
-
interface ZodReadonly<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodReadonlyInternals<T$1>>, $ZodReadonly<T$1> {
|
|
1523
|
-
unwrap(): T$1;
|
|
1524
|
-
}
|
|
1525
|
-
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
1526
|
-
//#endregion
|
|
1527
|
-
//#region src/utils/config.d.ts
|
|
1528
|
-
declare const SkillConfigSchema: ZodObject<{
|
|
1529
|
-
context7ProjectId: ZodOptional<ZodString>;
|
|
1530
|
-
context7Projects: ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
1531
|
-
downloadedAt: ZodString;
|
|
1532
|
-
filesCount: ZodNumber;
|
|
1533
|
-
}, $strip>>>;
|
|
1534
|
-
}, $strip>;
|
|
1535
|
-
type SkillConfig = input<typeof SkillConfigSchema>;
|
|
1536
|
-
declare class Config {
|
|
1537
|
-
static load(filePath: string): SkillConfig;
|
|
1538
|
-
static save(config: SkillConfig, filePath: string): void;
|
|
1539
|
-
static loadWithDefaults(filePath: string): SkillConfig;
|
|
1540
|
-
}
|
|
1541
|
-
//#endregion
|
|
1542
|
-
//#region src/types/index.d.ts
|
|
1543
|
-
interface SearchResult {
|
|
1544
|
-
id: string;
|
|
1545
|
-
title: string;
|
|
1546
|
-
content: string;
|
|
1547
|
-
score: number;
|
|
1548
|
-
source: 'user' | 'context7';
|
|
1549
|
-
file_path: string;
|
|
1550
|
-
metadata: Record<string, unknown>;
|
|
1551
|
-
}
|
|
1552
|
-
interface ContentStats {
|
|
1553
|
-
userFiles: number;
|
|
1554
|
-
context7Files: number;
|
|
1555
|
-
totalFiles: number;
|
|
1556
|
-
userDirExists: boolean;
|
|
1557
|
-
context7DirExists: boolean;
|
|
1558
|
-
}
|
|
1559
|
-
interface ContentItem {
|
|
1560
|
-
title: string;
|
|
1561
|
-
filename: string;
|
|
1562
|
-
source: 'user' | 'context7';
|
|
1563
|
-
path: string;
|
|
1564
|
-
size: number;
|
|
1565
|
-
modified: Date;
|
|
1566
|
-
}
|
|
1567
|
-
interface CreateSkillOptions {
|
|
1568
|
-
baseDir: string;
|
|
1569
|
-
skillDirname: string;
|
|
1570
|
-
skillName: string;
|
|
1571
|
-
skillDescription?: string;
|
|
1572
|
-
sourcePackageName?: string;
|
|
1573
|
-
sourcePackageVersionHint?: string;
|
|
1574
|
-
force?: boolean;
|
|
1575
|
-
}
|
|
1576
|
-
interface CreateSkillResult {
|
|
1577
|
-
created: boolean;
|
|
1578
|
-
skillPath?: string;
|
|
1579
|
-
message: string;
|
|
1580
|
-
}
|
|
1581
|
-
interface UpdateContext7Result {
|
|
1582
|
-
updated: boolean;
|
|
1583
|
-
skipped: boolean;
|
|
1584
|
-
filesCreated: number;
|
|
1585
|
-
message: string;
|
|
1586
|
-
}
|
|
1587
|
-
interface CommandIndexingResult {
|
|
1588
|
-
attempted: boolean;
|
|
1589
|
-
skipped: boolean;
|
|
1590
|
-
succeeded: boolean;
|
|
1591
|
-
totalDocuments: number;
|
|
1592
|
-
backendInfo?: SearchBackendInfo | null;
|
|
1593
|
-
error?: string;
|
|
1594
|
-
}
|
|
1595
|
-
interface DownloadContext7CommandResult {
|
|
1596
|
-
projectId: string;
|
|
1597
|
-
update: UpdateContext7Result;
|
|
1598
|
-
skillMdUpdated: boolean;
|
|
1599
|
-
context7Files: string[];
|
|
1600
|
-
indexing: CommandIndexingResult;
|
|
1601
|
-
}
|
|
1602
|
-
interface AddContentResult {
|
|
1603
|
-
added: boolean;
|
|
1604
|
-
updated: boolean;
|
|
1605
|
-
skipped: boolean;
|
|
1606
|
-
filePath?: string;
|
|
1607
|
-
message: string;
|
|
1608
|
-
similarFound: number;
|
|
1609
|
-
similarContent?: Array<{
|
|
1610
|
-
title: string;
|
|
1611
|
-
score: number;
|
|
1612
|
-
sourceRank?: 'primary' | 'secondary';
|
|
1613
|
-
source: string;
|
|
1614
|
-
preview: string;
|
|
1615
|
-
}>;
|
|
1616
|
-
existingFile?: {
|
|
1617
|
-
path: string;
|
|
1618
|
-
content: string;
|
|
1619
|
-
};
|
|
1620
|
-
}
|
|
1621
|
-
interface AddContentCommandResult extends AddContentResult {
|
|
1622
|
-
skillMdUpdated: boolean;
|
|
1623
|
-
userFiles: string[];
|
|
1624
|
-
}
|
|
1625
|
-
interface BuildIndexCommandResult {
|
|
1626
|
-
mode: Exclude<SearchMode, 'chroma'>;
|
|
1627
|
-
vectorEmbedder?: string;
|
|
1628
|
-
totalDocuments: number;
|
|
1629
|
-
backendInfo?: SearchBackendInfo | null;
|
|
1630
|
-
}
|
|
1631
|
-
interface PackageVersion {
|
|
1632
|
-
version: string;
|
|
1633
|
-
formatted: string;
|
|
1634
|
-
}
|
|
1635
|
-
interface Context7Library {
|
|
1636
|
-
context7_compatible_library_id: string;
|
|
1637
|
-
name: string;
|
|
1638
|
-
description: string;
|
|
1639
|
-
code_snippets: number;
|
|
1640
|
-
trust_score: number;
|
|
1641
|
-
versions?: string[];
|
|
1642
|
-
}
|
|
1643
|
-
interface Context7ResolvedLibrary {
|
|
1644
|
-
packageName: string;
|
|
1645
|
-
version?: string;
|
|
1646
|
-
query: string;
|
|
1647
|
-
bestMatch: {
|
|
1648
|
-
id: string;
|
|
1649
|
-
title: string;
|
|
1650
|
-
description: string;
|
|
1651
|
-
totalSnippets: number;
|
|
1652
|
-
trustScore: number;
|
|
1653
|
-
benchmarkScore: number;
|
|
1654
|
-
versions: string[];
|
|
1655
|
-
matchKind: 'package-path' | 'package-slug' | 'website' | 'other';
|
|
1656
|
-
versionMatched: boolean;
|
|
1657
|
-
selectionScore: number;
|
|
1658
|
-
};
|
|
1659
|
-
candidates: Array<{
|
|
1660
|
-
id: string;
|
|
1661
|
-
title: string;
|
|
1662
|
-
description: string;
|
|
1663
|
-
totalSnippets: number;
|
|
1664
|
-
trustScore: number;
|
|
1665
|
-
benchmarkScore: number;
|
|
1666
|
-
versions: string[];
|
|
1667
|
-
matchKind: 'package-path' | 'package-slug' | 'website' | 'other';
|
|
1668
|
-
versionMatched: boolean;
|
|
1669
|
-
selectionScore: number;
|
|
1670
|
-
}>;
|
|
1671
|
-
}
|
|
1672
|
-
//#endregion
|
|
1673
|
-
//#region src/core/skillCreator.d.ts
|
|
1674
|
-
declare class SkillCreator {
|
|
1675
|
-
private templateDir;
|
|
1676
|
-
constructor();
|
|
1677
|
-
createSkill(options: CreateSkillOptions): Promise<CreateSkillResult>;
|
|
1678
|
-
private createDirectoryStructure;
|
|
1679
|
-
private createSkillMdFromTemplate;
|
|
1680
|
-
private inferVersionHint;
|
|
1681
|
-
}
|
|
1682
|
-
//#endregion
|
|
1683
|
-
//#region src/core/fuzzySearchAdapter.d.ts
|
|
1684
|
-
/**
|
|
1685
|
-
* uFuzzy-based Search Engine Adapter
|
|
1686
|
-
* Clean implementation focused only on search functionality
|
|
1687
|
-
*/
|
|
1688
|
-
declare class FuzzySearchAdapter implements SearchEngine {
|
|
1689
|
-
private documents;
|
|
1690
|
-
private fuzzy;
|
|
1691
|
-
private lastSearchInfo;
|
|
1692
|
-
constructor();
|
|
1693
|
-
buildIndex(referencesDir: string): Promise<void>;
|
|
1694
|
-
search(query: string, options?: SearchOptions$1): Promise<SearchResult$2[]>;
|
|
1695
|
-
/**
|
|
1696
|
-
* Basic fuzzy search using uFuzzy
|
|
1697
|
-
*/
|
|
1698
|
-
private fuzzySearch;
|
|
1699
|
-
/**
|
|
1700
|
-
* Enhanced fuzzy search that returns both indices and detailed info
|
|
1701
|
-
*/
|
|
1702
|
-
private fuzzySearchWithInfo;
|
|
1703
|
-
isBuilt(): boolean;
|
|
1704
|
-
getStats(): Promise<{
|
|
1705
|
-
totalDocuments: number;
|
|
1706
|
-
}>;
|
|
1707
|
-
getBackendInfo(): SearchBackendInfo;
|
|
1708
|
-
getIndexState(): Promise<SearchIndexState>;
|
|
1709
|
-
searchByPriority(query: string, topK?: number): Promise<SearchResult$2[]>;
|
|
1710
|
-
clearIndex(): void;
|
|
1711
|
-
}
|
|
1712
|
-
//#endregion
|
|
1713
|
-
//#region src/core/miniSearchAdapter.d.ts
|
|
1714
|
-
interface MiniSearchAdapterOptions {
|
|
1715
|
-
skillDir: string;
|
|
1716
|
-
}
|
|
1717
|
-
declare class MiniSearchAdapter implements SearchEngine {
|
|
1718
|
-
private readonly options;
|
|
1719
|
-
private index;
|
|
1720
|
-
private documents;
|
|
1721
|
-
private indexState;
|
|
1722
|
-
constructor(options: MiniSearchAdapterOptions);
|
|
1723
|
-
initialize(): Promise<void>;
|
|
1724
|
-
buildIndex(referencesDir: string): Promise<void>;
|
|
1725
|
-
search(query: string, options?: SearchOptions$1): Promise<SearchResult$2[]>;
|
|
1726
|
-
getBackendInfo(): SearchBackendInfo;
|
|
1727
|
-
isBuilt(): boolean;
|
|
1728
|
-
getStats(): Promise<{
|
|
1729
|
-
totalDocuments: number;
|
|
1730
|
-
}>;
|
|
1731
|
-
getIndexState(): Promise<SearchIndexState>;
|
|
1732
|
-
clearIndex(): void;
|
|
1733
|
-
private createIndex;
|
|
1734
|
-
private getSearchDir;
|
|
1735
|
-
private ensureSearchDir;
|
|
1736
|
-
private getIndexFilePath;
|
|
1737
|
-
private getStateFilePath;
|
|
1738
|
-
private loadPersistedIndexIfAvailable;
|
|
1739
|
-
private persistIndex;
|
|
1740
|
-
private loadDocuments;
|
|
1741
|
-
private calculateReferencesHash;
|
|
1742
|
-
private rerankResults;
|
|
1743
|
-
private normalizeQueryTokens;
|
|
1744
|
-
private calculateCoverage;
|
|
1745
|
-
private calculatePathCoverage;
|
|
1746
|
-
private calculateTermDensity;
|
|
1747
|
-
private extractQueryPhrases;
|
|
1748
|
-
private calculatePhraseCoverage;
|
|
1749
|
-
private calculateProximityScore;
|
|
1750
|
-
private findSubstringPositions;
|
|
1751
|
-
private calibrateRawScore;
|
|
1752
|
-
private tokensLooselyMatch;
|
|
1753
|
-
}
|
|
1754
|
-
//#endregion
|
|
1755
|
-
//#region src/core/embeddingFunctions.d.ts
|
|
1756
|
-
interface EmbeddingFunction {
|
|
1757
|
-
generate(input: string[]): Promise<number[][]>;
|
|
1758
|
-
}
|
|
1759
|
-
//#endregion
|
|
1760
|
-
//#region src/core/sqliteVectorSearchAdapter.d.ts
|
|
1761
|
-
interface SqliteVectorSearchAdapterOptions {
|
|
1762
|
-
skillDir: string;
|
|
1763
|
-
embeddingDimensions?: number;
|
|
1764
|
-
embeddingFunction?: EmbeddingFunction;
|
|
1765
|
-
embedderMode?: string;
|
|
1766
|
-
candidateMultiplier?: number;
|
|
1767
|
-
minCandidateLimit?: number;
|
|
1768
|
-
}
|
|
1769
|
-
declare class SqliteVectorSearchAdapter implements SearchEngine {
|
|
1770
|
-
private readonly options;
|
|
1771
|
-
private db;
|
|
1772
|
-
private indexState;
|
|
1773
|
-
private embedder;
|
|
1774
|
-
constructor(options: SqliteVectorSearchAdapterOptions);
|
|
1775
|
-
initialize(): Promise<void>;
|
|
1776
|
-
buildIndex(referencesDir: string): Promise<void>;
|
|
1777
|
-
search(query: string, options?: SearchOptions$1): Promise<SearchResult$2[]>;
|
|
1778
|
-
getBackendInfo(): SearchBackendInfo;
|
|
1779
|
-
isBuilt(): boolean;
|
|
1780
|
-
getStats(): Promise<{
|
|
1781
|
-
totalDocuments: number;
|
|
1782
|
-
}>;
|
|
1783
|
-
getIndexState(): Promise<SearchIndexState>;
|
|
1784
|
-
clearIndex(): void;
|
|
1785
|
-
private getSearchDir;
|
|
1786
|
-
private getEmbeddingDimensions;
|
|
1787
|
-
private ensureSearchDir;
|
|
1788
|
-
private getDbPath;
|
|
1789
|
-
private getStateFilePath;
|
|
1790
|
-
private prepareSchema;
|
|
1791
|
-
private loadIndexState;
|
|
1792
|
-
private persistIndexState;
|
|
1793
|
-
private loadDocuments;
|
|
1794
|
-
private calculateReferencesHash;
|
|
1795
|
-
private loadRuntimeDependencies;
|
|
1796
|
-
static isRuntimeSupported(): Promise<boolean>;
|
|
1797
|
-
private ensureEmbedder;
|
|
1798
|
-
private rerankRows;
|
|
1799
|
-
private normalizeQueryTokens;
|
|
1800
|
-
private extractQueryPhrases;
|
|
1801
|
-
private calculateCoverage;
|
|
1802
|
-
private calculatePathCoverage;
|
|
1803
|
-
private calculatePhraseCoverage;
|
|
1804
|
-
private calculateProximityScore;
|
|
1805
|
-
private findSubstringPositions;
|
|
1806
|
-
private tokensLooselyMatch;
|
|
1807
|
-
private scoreTokenMatch;
|
|
1808
|
-
private normalizeDocumentContent;
|
|
1809
|
-
}
|
|
1810
|
-
//#endregion
|
|
1811
|
-
//#region src/search_format/types.d.ts
|
|
1812
|
-
/**
|
|
1813
|
-
* Enhanced search result with additional metadata for formatting
|
|
1814
|
-
*/
|
|
1815
|
-
interface FormattableSearchResult extends SearchResult$2 {
|
|
1816
|
-
/** Relative file path from skill root */
|
|
1817
|
-
relativePath?: string;
|
|
1818
|
-
/** Full content (for high-quality matches) */
|
|
1819
|
-
fullContent?: string;
|
|
1820
|
-
/** Preview content with line numbers (for medium-quality matches) */
|
|
1821
|
-
preview?: string;
|
|
1822
|
-
/** Display tier information */
|
|
1823
|
-
metadata: SearchResult$2['metadata'] & {
|
|
1824
|
-
displayTier?: 'full' | 'preview' | 'metadata-only';
|
|
1825
|
-
displayRank?: number;
|
|
1826
|
-
displayScore?: number;
|
|
1827
|
-
sourceRank?: 'primary' | 'secondary';
|
|
1828
|
-
maxScore?: number;
|
|
1829
|
-
averageScore?: number;
|
|
1830
|
-
qualityScore?: number;
|
|
1831
|
-
relativeScore?: number;
|
|
1832
|
-
queryCoverage?: number;
|
|
1833
|
-
matchRanges?: number[][];
|
|
1834
|
-
};
|
|
1835
|
-
}
|
|
1836
|
-
/**
|
|
1837
|
-
* Formatted search result ready for display
|
|
1838
|
-
*/
|
|
1839
|
-
interface FormattedResult {
|
|
1840
|
-
/** Original result */
|
|
1841
|
-
result: FormattableSearchResult;
|
|
1842
|
-
/** Formatted display content */
|
|
1843
|
-
content: string;
|
|
1844
|
-
/** Content type for styling */
|
|
1845
|
-
contentType: 'full-content' | 'preview' | 'metadata-only';
|
|
1846
|
-
/** Display priority */
|
|
1847
|
-
priority: number;
|
|
1848
|
-
}
|
|
1849
|
-
//#endregion
|
|
1850
|
-
//#region src/core/searchEngineFactory.d.ts
|
|
1851
|
-
interface SearchEngineOptions {
|
|
1852
|
-
/** Search mode */
|
|
1853
|
-
mode?: SearchMode;
|
|
1854
|
-
/** Skill directory for file operations */
|
|
1855
|
-
skillDir?: string;
|
|
1856
|
-
/** References directory containing documentation */
|
|
1857
|
-
referencesDir?: string;
|
|
1858
|
-
/** Skill configuration */
|
|
1859
|
-
config?: SkillConfig;
|
|
1860
|
-
/** Additional options for adapters */
|
|
1861
|
-
adapterOptions?: {
|
|
1862
|
-
/** Auto search quality threshold */
|
|
1863
|
-
qualityThreshold?: number;
|
|
1864
|
-
/** Explicit vector embedder mode */
|
|
1865
|
-
vectorEmbedder?: string;
|
|
1866
|
-
};
|
|
1867
|
-
}
|
|
1868
|
-
//#endregion
|
|
1869
|
-
//#region src/core/unifiedSearch.d.ts
|
|
1870
|
-
/**
|
|
1871
|
-
* Unified search options including formatting preferences
|
|
1872
|
-
*/
|
|
1873
|
-
interface UnifiedSearchOptions extends SearchEngineOptions {
|
|
1874
|
-
/** Output format: list, enhanced, or custom */
|
|
1875
|
-
format?: 'list' | 'enhanced' | string;
|
|
1876
|
-
/** Skill path for relative path calculation */
|
|
1877
|
-
skillPath?: string;
|
|
1878
|
-
/** Formatting options */
|
|
1879
|
-
formatting?: {
|
|
1880
|
-
maxPreviewLength?: number;
|
|
1881
|
-
showFullContentThreshold?: number;
|
|
1882
|
-
minScoreForPreview?: number;
|
|
1883
|
-
showLineNumbers?: boolean;
|
|
1884
|
-
};
|
|
1885
|
-
}
|
|
1886
|
-
/**
|
|
1887
|
-
* Unified Search Engine
|
|
1888
|
-
* Coordinates search adapters with formatters for complete search experience
|
|
1889
|
-
*/
|
|
1890
|
-
declare class UnifiedSearchEngine {
|
|
1891
|
-
private searchEngine;
|
|
1892
|
-
private formatter;
|
|
1893
|
-
private options;
|
|
1894
|
-
constructor(options: UnifiedSearchOptions);
|
|
1895
|
-
/**
|
|
1896
|
-
* Initialize the search engine
|
|
1897
|
-
*/
|
|
1898
|
-
initialize(): Promise<void>;
|
|
1899
|
-
/**
|
|
1900
|
-
* Build search index
|
|
1901
|
-
*/
|
|
1902
|
-
buildIndex(referencesDir: string): Promise<void>;
|
|
1903
|
-
/**
|
|
1904
|
-
* Search and optionally format results
|
|
1905
|
-
*/
|
|
1906
|
-
search(query: string, topK?: number, where?: Record<string, any>): Promise<SearchResult$2[]>;
|
|
1907
|
-
/**
|
|
1908
|
-
* Search and return formatted results
|
|
1909
|
-
*/
|
|
1910
|
-
searchAndFormat(query: string, topK?: number, where?: Record<string, any>): Promise<FormattedResult[]>;
|
|
1911
|
-
/**
|
|
1912
|
-
* Check if search index is built
|
|
1913
|
-
*/
|
|
1914
|
-
isBuilt(): Promise<boolean>;
|
|
1915
|
-
/**
|
|
1916
|
-
* Get search statistics
|
|
1917
|
-
*/
|
|
1918
|
-
getStats(): Promise<{
|
|
1919
|
-
totalDocuments: number;
|
|
1920
|
-
}>;
|
|
1921
|
-
getBackendInfo(): Promise<SearchBackendInfo | null>;
|
|
1922
|
-
getIndexState(): Promise<SearchIndexState | null>;
|
|
1923
|
-
/**
|
|
1924
|
-
* Clear search index
|
|
1925
|
-
*/
|
|
1926
|
-
clearIndex(): Promise<void>;
|
|
1927
|
-
/**
|
|
1928
|
-
* Ensure engine is initialized
|
|
1929
|
-
*/
|
|
1930
|
-
private ensureInitialized;
|
|
1931
|
-
}
|
|
1932
|
-
//#endregion
|
|
1933
|
-
//#region src/core/contentManager.d.ts
|
|
1934
|
-
interface ContentManagerOptions {
|
|
1935
|
-
searchEngine: {
|
|
1936
|
-
initialize?(): Promise<void>;
|
|
1937
|
-
buildIndex?(referencesDir: string): Promise<void>;
|
|
1938
|
-
clearIndex?(): Promise<void> | void;
|
|
1939
|
-
search(query: string, topK?: number, where?: any): Promise<any[]>;
|
|
1940
|
-
};
|
|
1941
|
-
referencesDir: string;
|
|
1942
|
-
fetchImpl?: typeof fetch;
|
|
1943
|
-
}
|
|
1944
|
-
declare class ContentManager {
|
|
1945
|
-
private options;
|
|
1946
|
-
private userDir;
|
|
1947
|
-
private context7BaseDir;
|
|
1948
|
-
constructor(options: ContentManagerOptions);
|
|
1949
|
-
/**
|
|
1950
|
-
* Get the directory path for a specific context7 project
|
|
1951
|
-
*/
|
|
1952
|
-
private getContext7ProjectDir;
|
|
1953
|
-
private encodeContext7ProjectId;
|
|
1954
|
-
private decodeContext7ProjectId;
|
|
1955
|
-
updateFromContext7(libraryId: string, force?: boolean): Promise<UpdateContext7Result>;
|
|
1956
|
-
addUserContent(options: {
|
|
1957
|
-
title: string;
|
|
1958
|
-
content: string;
|
|
1959
|
-
force?: boolean;
|
|
1960
|
-
forceAppend?: boolean;
|
|
1961
|
-
autoUpdate?: boolean;
|
|
1962
|
-
}): Promise<AddContentResult>;
|
|
1963
|
-
getContentStats(): ContentStats;
|
|
1964
|
-
listContent(source?: 'user' | 'context7'): ContentItem[];
|
|
1965
|
-
private downloadContext7Doc;
|
|
1966
|
-
private sliceDocument;
|
|
1967
|
-
private extractSections;
|
|
1968
|
-
private mergeShortSections;
|
|
1969
|
-
private isMajorSection;
|
|
1970
|
-
private createUniqueFileName;
|
|
1971
|
-
private extractHeadingLevel;
|
|
1972
|
-
private createUniqueFilePath;
|
|
1973
|
-
private findSimilarContent;
|
|
1974
|
-
private isContentEnhanced;
|
|
1975
|
-
private isContentDuplicate;
|
|
1976
|
-
private normalizeContentForComparison;
|
|
1977
|
-
private getSimilarityScore;
|
|
1978
|
-
private mergeSimilarResults;
|
|
1979
|
-
private findDirectUserMatches;
|
|
1980
|
-
private findUserFileByTitle;
|
|
1981
|
-
private findBestUserMergeTarget;
|
|
1982
|
-
private calculateTokenOverlap;
|
|
1983
|
-
private getSourcePriority;
|
|
1984
|
-
private clamp01;
|
|
1985
|
-
private summarizeSimilarContent;
|
|
1986
|
-
private resolveSearchResultFilePath;
|
|
1987
|
-
private getExpectedUserFilePath;
|
|
1988
|
-
private renderKnowledgeNote;
|
|
1989
|
-
private appendKnowledgeUpdate;
|
|
1990
|
-
private getNextKnowledgeUpdateIndex;
|
|
1991
|
-
private stripMatchingLeadingHeading;
|
|
1992
|
-
private writeUserContentFile;
|
|
1993
|
-
private getHashFilePath;
|
|
1994
|
-
private saveContentHash;
|
|
1995
|
-
private needsUpdate;
|
|
1996
|
-
private prepareSearchEngine;
|
|
1997
|
-
private invalidateSearchIndex;
|
|
1998
|
-
/**
|
|
1999
|
-
* List all context7 projects
|
|
2000
|
-
*/
|
|
2001
|
-
listContext7Projects(): Array<{
|
|
2002
|
-
projectId: string;
|
|
2003
|
-
filesCount: number;
|
|
2004
|
-
directory: string;
|
|
2005
|
-
}>;
|
|
2006
|
-
/**
|
|
2007
|
-
* Get files for a specific context7 project
|
|
2008
|
-
*/
|
|
2009
|
-
getContext7ProjectFiles(projectId: string): string[];
|
|
2010
|
-
/**
|
|
2011
|
-
* Remove a context7 project
|
|
2012
|
-
*/
|
|
2013
|
-
removeContext7Project(projectId: string): {
|
|
2014
|
-
success: boolean;
|
|
2015
|
-
message: string;
|
|
2016
|
-
};
|
|
2017
|
-
}
|
|
2018
|
-
//#endregion
|
|
2019
|
-
//#region src/utils/package.d.ts
|
|
2020
|
-
/**
|
|
2021
|
-
* Package utilities
|
|
2022
|
-
*/
|
|
2023
|
-
interface SearchResult$1 {
|
|
2024
|
-
name: string;
|
|
2025
|
-
description: string;
|
|
2026
|
-
version: string;
|
|
2027
|
-
date: string;
|
|
2028
|
-
publisher: string;
|
|
2029
|
-
score: number;
|
|
2030
|
-
homepage?: string;
|
|
2031
|
-
repository?: string;
|
|
2032
|
-
skill_dir_name?: string;
|
|
2033
|
-
}
|
|
2034
|
-
interface SearchOptions {
|
|
2035
|
-
limit?: number;
|
|
2036
|
-
minScore?: number;
|
|
2037
|
-
}
|
|
2038
|
-
declare class PackageUtils {
|
|
2039
|
-
private static getRegistryBaseUrl;
|
|
2040
|
-
private static getSearchBaseUrl;
|
|
2041
|
-
/**
|
|
2042
|
-
* Get package version from npm registry
|
|
2043
|
-
*/
|
|
2044
|
-
static getPackageVersion(packageName: string): Promise<string | null>;
|
|
2045
|
-
/**
|
|
2046
|
-
* Get full package info from npm registry for the latest version
|
|
2047
|
-
*/
|
|
2048
|
-
static getPackageInfo(packageName: string): Promise<{
|
|
2049
|
-
name: string;
|
|
2050
|
-
version: string;
|
|
2051
|
-
description: string;
|
|
2052
|
-
homepage?: string;
|
|
2053
|
-
repository?: {
|
|
2054
|
-
type: string;
|
|
2055
|
-
url: string;
|
|
2056
|
-
};
|
|
2057
|
-
[key: string]: any;
|
|
2058
|
-
} | null>;
|
|
2059
|
-
/**
|
|
2060
|
-
* Get full package info from npm registry for the latest version
|
|
2061
|
-
*/
|
|
2062
|
-
static getCurrentPackageInfo(): {
|
|
2063
|
-
name: string;
|
|
2064
|
-
version: string;
|
|
2065
|
-
description: string;
|
|
2066
|
-
homepage?: string;
|
|
2067
|
-
repository?: {
|
|
2068
|
-
type: string;
|
|
2069
|
-
url: string;
|
|
2070
|
-
};
|
|
2071
|
-
[key: string]: any;
|
|
2072
|
-
} | null;
|
|
2073
|
-
/**
|
|
2074
|
-
* Format version according to the skill directory naming rules.
|
|
2075
|
-
*/
|
|
2076
|
-
static formatVersion(version: string): string;
|
|
2077
|
-
/**
|
|
2078
|
-
* Create skill folder name according to spec
|
|
2079
|
-
*/
|
|
2080
|
-
static createSkillFolderName(packageName: string, version: string): string;
|
|
2081
|
-
/**
|
|
2082
|
-
* Normalize package name (remove @ prefix)
|
|
2083
|
-
*/
|
|
2084
|
-
static normalizePackageName(packageName: string): string;
|
|
2085
|
-
/**
|
|
2086
|
-
* Validate package name format
|
|
2087
|
-
*/
|
|
2088
|
-
static validatePackageName(packageName: string): boolean;
|
|
2089
|
-
/**
|
|
2090
|
-
* Search for packages on npm registry
|
|
2091
|
-
*/
|
|
2092
|
-
static searchPackages(keywords: string[], options?: SearchOptions): Promise<SearchResult$1[]>;
|
|
2093
|
-
/**
|
|
2094
|
-
* Find exact package match
|
|
2095
|
-
*/
|
|
2096
|
-
static findExactPackage(packageName: string): Promise<SearchResult$1 | null>;
|
|
2097
|
-
/**
|
|
2098
|
-
* Suggest packages based on keywords
|
|
2099
|
-
*/
|
|
2100
|
-
static suggestPackages(input: string, options?: SearchOptions): Promise<SearchResult$1[]>;
|
|
2101
|
-
/**
|
|
2102
|
-
* Select package from multiple options
|
|
2103
|
-
*/
|
|
2104
|
-
static selectPackage(input: string): Promise<{
|
|
2105
|
-
name: string;
|
|
2106
|
-
version: string;
|
|
2107
|
-
} | null>;
|
|
2108
|
-
}
|
|
2109
|
-
//#endregion
|
|
2110
|
-
//#region src/utils/context7.d.ts
|
|
2111
|
-
declare const Context7SearchCandidateSchema: ZodObject<{
|
|
2112
|
-
id: ZodString;
|
|
2113
|
-
title: ZodString;
|
|
2114
|
-
description: ZodDefault<ZodOptional<ZodString>>;
|
|
2115
|
-
branch: ZodOptional<ZodString>;
|
|
2116
|
-
lastUpdateDate: ZodOptional<ZodString>;
|
|
2117
|
-
state: ZodOptional<ZodString>;
|
|
2118
|
-
totalTokens: ZodDefault<ZodOptional<ZodNumber>>;
|
|
2119
|
-
totalSnippets: ZodDefault<ZodOptional<ZodNumber>>;
|
|
2120
|
-
stars: ZodDefault<ZodOptional<ZodNumber>>;
|
|
2121
|
-
trustScore: ZodDefault<ZodOptional<ZodNumber>>;
|
|
2122
|
-
benchmarkScore: ZodDefault<ZodOptional<ZodNumber>>;
|
|
2123
|
-
versions: ZodDefault<ZodOptional<ZodArray<ZodString>>>;
|
|
2124
|
-
}, $strip>;
|
|
2125
|
-
type Context7SearchCandidate = output<typeof Context7SearchCandidateSchema>;
|
|
2126
|
-
interface ResolvedContext7Candidate extends Context7SearchCandidate {
|
|
2127
|
-
matchKind: 'package-path' | 'package-slug' | 'website' | 'other';
|
|
2128
|
-
versionMatched: boolean;
|
|
2129
|
-
selectionScore: number;
|
|
2130
|
-
}
|
|
2131
|
-
interface ResolveContext7Result {
|
|
2132
|
-
packageName: string;
|
|
2133
|
-
version?: string;
|
|
2134
|
-
query: string;
|
|
2135
|
-
bestMatch: ResolvedContext7Candidate;
|
|
2136
|
-
candidates: ResolvedContext7Candidate[];
|
|
2137
|
-
}
|
|
2138
|
-
interface ResolveContext7Options {
|
|
2139
|
-
version?: string;
|
|
2140
|
-
limit?: number;
|
|
2141
|
-
fetchImpl?: typeof fetch;
|
|
2142
|
-
}
|
|
2143
|
-
declare class Context7Utils {
|
|
2144
|
-
static resolveLibrary(packageName: string, options?: ResolveContext7Options): Promise<ResolveContext7Result | null>;
|
|
2145
|
-
static createSearchQuery(packageName: string, version?: string): string;
|
|
2146
|
-
private static searchLibraries;
|
|
2147
|
-
private static getLibrarySearchNames;
|
|
2148
|
-
private static getPackageBaseName;
|
|
2149
|
-
private static tokenizeIdentifier;
|
|
2150
|
-
private static acceptBestMatch;
|
|
2151
|
-
private static annotateCandidate;
|
|
2152
|
-
private static classifyCandidate;
|
|
2153
|
-
private static matchesVersion;
|
|
2154
|
-
private static getCandidateMergeScore;
|
|
2155
|
-
}
|
|
2156
|
-
//#endregion
|
|
2157
|
-
export { type AddContentCommandResult, type AddContentResult, type BuildIndexCommandResult, type CommandIndexingResult, Config, type ContentItem, ContentManager, type ContentStats, type Context7Library, type Context7ResolvedLibrary, Context7Utils, type CreateSkillOptions, type CreateSkillResult, type DownloadContext7CommandResult, FuzzySearchAdapter, MiniSearchAdapter, PackageUtils, type PackageVersion, type SearchBackendInfo, type SearchEngine, type SearchIndexState, type SearchMode, type SearchResult, type SkillConfig, SkillCreator, SqliteVectorSearchAdapter, UnifiedSearchEngine, type UpdateContext7Result };
|
|
2158
|
-
//# sourceMappingURL=index.d.mts.map
|