@pas7/llm-seo 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +164 -0
- package/dist/adapters/index.d.ts +3 -0
- package/dist/adapters/index.js +673 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/next/index.d.ts +292 -0
- package/dist/adapters/next/index.js +673 -0
- package/dist/adapters/next/index.js.map +1 -0
- package/dist/cli/bin.d.ts +1 -0
- package/dist/cli/bin.js +2232 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/config.schema-DCnBx3Gm.d.ts +824 -0
- package/dist/core/index.d.ts +752 -0
- package/dist/core/index.js +1330 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1909 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.schema-B_z3rxRV.d.ts +384 -0
- package/dist/schema/index.d.ts +72 -0
- package/dist/schema/index.js +422 -0
- package/dist/schema/index.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Manifest schema for site pages.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Schema for ManifestItem - a single page entry in a manifest.
|
|
9
|
+
*/
|
|
10
|
+
declare const ManifestItemSchema: z.ZodObject<{
|
|
11
|
+
/** URL path slug - required */
|
|
12
|
+
slug: z.ZodString;
|
|
13
|
+
/** Available locales for this page */
|
|
14
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
+
/** Publication date (ISO 8601) */
|
|
16
|
+
publishedAt: z.ZodOptional<z.ZodString>;
|
|
17
|
+
/** Last update date (ISO 8601) */
|
|
18
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
19
|
+
/** Override canonical URL */
|
|
20
|
+
canonicalOverride: z.ZodOptional<z.ZodString>;
|
|
21
|
+
/** Priority for citations (0-100) */
|
|
22
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
/** Title for display */
|
|
24
|
+
title: z.ZodOptional<z.ZodString>;
|
|
25
|
+
/** Description for display */
|
|
26
|
+
description: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
slug: string;
|
|
29
|
+
locales?: string[] | undefined;
|
|
30
|
+
publishedAt?: string | undefined;
|
|
31
|
+
updatedAt?: string | undefined;
|
|
32
|
+
canonicalOverride?: string | undefined;
|
|
33
|
+
priority?: number | undefined;
|
|
34
|
+
title?: string | undefined;
|
|
35
|
+
description?: string | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
slug: string;
|
|
38
|
+
locales?: string[] | undefined;
|
|
39
|
+
publishedAt?: string | undefined;
|
|
40
|
+
updatedAt?: string | undefined;
|
|
41
|
+
canonicalOverride?: string | undefined;
|
|
42
|
+
priority?: number | undefined;
|
|
43
|
+
title?: string | undefined;
|
|
44
|
+
description?: string | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Type for ManifestItem.
|
|
48
|
+
*/
|
|
49
|
+
type ManifestItem = z.infer<typeof ManifestItemSchema>;
|
|
50
|
+
/**
|
|
51
|
+
* Schema for ManifestSource - external manifest reference.
|
|
52
|
+
*/
|
|
53
|
+
declare const ManifestSourceSchema: z.ZodObject<{
|
|
54
|
+
/** Source type */
|
|
55
|
+
type: z.ZodEnum<["file", "url", "module"]>;
|
|
56
|
+
/** Source location */
|
|
57
|
+
source: z.ZodString;
|
|
58
|
+
/** Optional transform function */
|
|
59
|
+
transform: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
type: "file" | "url" | "module";
|
|
62
|
+
source: string;
|
|
63
|
+
transform?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
type: "file" | "url" | "module";
|
|
66
|
+
source: string;
|
|
67
|
+
transform?: string | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Type for ManifestSource.
|
|
71
|
+
*/
|
|
72
|
+
type ManifestSource = z.infer<typeof ManifestSourceSchema>;
|
|
73
|
+
/**
|
|
74
|
+
* Schema for manifest value - can be array of items or source reference.
|
|
75
|
+
*/
|
|
76
|
+
declare const ManifestValueSchema: z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
77
|
+
/** URL path slug - required */
|
|
78
|
+
slug: z.ZodString;
|
|
79
|
+
/** Available locales for this page */
|
|
80
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
81
|
+
/** Publication date (ISO 8601) */
|
|
82
|
+
publishedAt: z.ZodOptional<z.ZodString>;
|
|
83
|
+
/** Last update date (ISO 8601) */
|
|
84
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
85
|
+
/** Override canonical URL */
|
|
86
|
+
canonicalOverride: z.ZodOptional<z.ZodString>;
|
|
87
|
+
/** Priority for citations (0-100) */
|
|
88
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
/** Title for display */
|
|
90
|
+
title: z.ZodOptional<z.ZodString>;
|
|
91
|
+
/** Description for display */
|
|
92
|
+
description: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
slug: string;
|
|
95
|
+
locales?: string[] | undefined;
|
|
96
|
+
publishedAt?: string | undefined;
|
|
97
|
+
updatedAt?: string | undefined;
|
|
98
|
+
canonicalOverride?: string | undefined;
|
|
99
|
+
priority?: number | undefined;
|
|
100
|
+
title?: string | undefined;
|
|
101
|
+
description?: string | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
slug: string;
|
|
104
|
+
locales?: string[] | undefined;
|
|
105
|
+
publishedAt?: string | undefined;
|
|
106
|
+
updatedAt?: string | undefined;
|
|
107
|
+
canonicalOverride?: string | undefined;
|
|
108
|
+
priority?: number | undefined;
|
|
109
|
+
title?: string | undefined;
|
|
110
|
+
description?: string | undefined;
|
|
111
|
+
}>, "many">, z.ZodObject<{
|
|
112
|
+
/** Source type */
|
|
113
|
+
type: z.ZodEnum<["file", "url", "module"]>;
|
|
114
|
+
/** Source location */
|
|
115
|
+
source: z.ZodString;
|
|
116
|
+
/** Optional transform function */
|
|
117
|
+
transform: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
type: "file" | "url" | "module";
|
|
120
|
+
source: string;
|
|
121
|
+
transform?: string | undefined;
|
|
122
|
+
}, {
|
|
123
|
+
type: "file" | "url" | "module";
|
|
124
|
+
source: string;
|
|
125
|
+
transform?: string | undefined;
|
|
126
|
+
}>]>;
|
|
127
|
+
/**
|
|
128
|
+
* Type for manifest value.
|
|
129
|
+
*/
|
|
130
|
+
type ManifestValue = z.infer<typeof ManifestValueSchema>;
|
|
131
|
+
/**
|
|
132
|
+
* Schema for manifests configuration.
|
|
133
|
+
*/
|
|
134
|
+
declare const ManifestsConfigSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
135
|
+
/** URL path slug - required */
|
|
136
|
+
slug: z.ZodString;
|
|
137
|
+
/** Available locales for this page */
|
|
138
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
139
|
+
/** Publication date (ISO 8601) */
|
|
140
|
+
publishedAt: z.ZodOptional<z.ZodString>;
|
|
141
|
+
/** Last update date (ISO 8601) */
|
|
142
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
143
|
+
/** Override canonical URL */
|
|
144
|
+
canonicalOverride: z.ZodOptional<z.ZodString>;
|
|
145
|
+
/** Priority for citations (0-100) */
|
|
146
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
147
|
+
/** Title for display */
|
|
148
|
+
title: z.ZodOptional<z.ZodString>;
|
|
149
|
+
/** Description for display */
|
|
150
|
+
description: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
slug: string;
|
|
153
|
+
locales?: string[] | undefined;
|
|
154
|
+
publishedAt?: string | undefined;
|
|
155
|
+
updatedAt?: string | undefined;
|
|
156
|
+
canonicalOverride?: string | undefined;
|
|
157
|
+
priority?: number | undefined;
|
|
158
|
+
title?: string | undefined;
|
|
159
|
+
description?: string | undefined;
|
|
160
|
+
}, {
|
|
161
|
+
slug: string;
|
|
162
|
+
locales?: string[] | undefined;
|
|
163
|
+
publishedAt?: string | undefined;
|
|
164
|
+
updatedAt?: string | undefined;
|
|
165
|
+
canonicalOverride?: string | undefined;
|
|
166
|
+
priority?: number | undefined;
|
|
167
|
+
title?: string | undefined;
|
|
168
|
+
description?: string | undefined;
|
|
169
|
+
}>, "many">, z.ZodObject<{
|
|
170
|
+
/** Source type */
|
|
171
|
+
type: z.ZodEnum<["file", "url", "module"]>;
|
|
172
|
+
/** Source location */
|
|
173
|
+
source: z.ZodString;
|
|
174
|
+
/** Optional transform function */
|
|
175
|
+
transform: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
type: "file" | "url" | "module";
|
|
178
|
+
source: string;
|
|
179
|
+
transform?: string | undefined;
|
|
180
|
+
}, {
|
|
181
|
+
type: "file" | "url" | "module";
|
|
182
|
+
source: string;
|
|
183
|
+
transform?: string | undefined;
|
|
184
|
+
}>]>>;
|
|
185
|
+
/**
|
|
186
|
+
* Type for manifests configuration.
|
|
187
|
+
*/
|
|
188
|
+
type ManifestsConfig = z.infer<typeof ManifestsConfigSchema>;
|
|
189
|
+
/**
|
|
190
|
+
* Schema for optional section in llms.txt.
|
|
191
|
+
*/
|
|
192
|
+
declare const OptionalSectionSchema: z.ZodObject<{
|
|
193
|
+
/** Section title */
|
|
194
|
+
title: z.ZodString;
|
|
195
|
+
/** Section content */
|
|
196
|
+
content: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
title: string;
|
|
199
|
+
content?: string | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
title: string;
|
|
202
|
+
content?: string | undefined;
|
|
203
|
+
}>;
|
|
204
|
+
/**
|
|
205
|
+
* Type for optional section.
|
|
206
|
+
*/
|
|
207
|
+
type OptionalSection = z.infer<typeof OptionalSectionSchema>;
|
|
208
|
+
/**
|
|
209
|
+
* Schema for a page manifest entry (legacy).
|
|
210
|
+
*/
|
|
211
|
+
declare const PageManifestSchema: z.ZodObject<{
|
|
212
|
+
/** Page path (e.g., /about) */
|
|
213
|
+
path: z.ZodString;
|
|
214
|
+
/** Page title */
|
|
215
|
+
title: z.ZodOptional<z.ZodString>;
|
|
216
|
+
/** Page description */
|
|
217
|
+
description: z.ZodOptional<z.ZodString>;
|
|
218
|
+
/** Page content for llms-full.txt */
|
|
219
|
+
content: z.ZodOptional<z.ZodString>;
|
|
220
|
+
/** Whether page is optional (included only in full) */
|
|
221
|
+
optional: z.ZodDefault<z.ZodBoolean>;
|
|
222
|
+
/** Last modified timestamp (ISO 8601) */
|
|
223
|
+
lastModified: z.ZodOptional<z.ZodString>;
|
|
224
|
+
}, "strip", z.ZodTypeAny, {
|
|
225
|
+
path: string;
|
|
226
|
+
optional: boolean;
|
|
227
|
+
title?: string | undefined;
|
|
228
|
+
description?: string | undefined;
|
|
229
|
+
content?: string | undefined;
|
|
230
|
+
lastModified?: string | undefined;
|
|
231
|
+
}, {
|
|
232
|
+
path: string;
|
|
233
|
+
title?: string | undefined;
|
|
234
|
+
description?: string | undefined;
|
|
235
|
+
content?: string | undefined;
|
|
236
|
+
optional?: boolean | undefined;
|
|
237
|
+
lastModified?: string | undefined;
|
|
238
|
+
}>;
|
|
239
|
+
/**
|
|
240
|
+
* Type for page manifest.
|
|
241
|
+
*/
|
|
242
|
+
type PageManifest = z.infer<typeof PageManifestSchema>;
|
|
243
|
+
/**
|
|
244
|
+
* Schema for site manifest.
|
|
245
|
+
*/
|
|
246
|
+
declare const SiteManifestSchema: z.ZodObject<{
|
|
247
|
+
/** Site base URL */
|
|
248
|
+
baseUrl: z.ZodString;
|
|
249
|
+
/** Site title */
|
|
250
|
+
title: z.ZodString;
|
|
251
|
+
/** Site description */
|
|
252
|
+
description: z.ZodOptional<z.ZodString>;
|
|
253
|
+
/** List of pages */
|
|
254
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
255
|
+
/** Page path (e.g., /about) */
|
|
256
|
+
path: z.ZodString;
|
|
257
|
+
/** Page title */
|
|
258
|
+
title: z.ZodOptional<z.ZodString>;
|
|
259
|
+
/** Page description */
|
|
260
|
+
description: z.ZodOptional<z.ZodString>;
|
|
261
|
+
/** Page content for llms-full.txt */
|
|
262
|
+
content: z.ZodOptional<z.ZodString>;
|
|
263
|
+
/** Whether page is optional (included only in full) */
|
|
264
|
+
optional: z.ZodDefault<z.ZodBoolean>;
|
|
265
|
+
/** Last modified timestamp (ISO 8601) */
|
|
266
|
+
lastModified: z.ZodOptional<z.ZodString>;
|
|
267
|
+
}, "strip", z.ZodTypeAny, {
|
|
268
|
+
path: string;
|
|
269
|
+
optional: boolean;
|
|
270
|
+
title?: string | undefined;
|
|
271
|
+
description?: string | undefined;
|
|
272
|
+
content?: string | undefined;
|
|
273
|
+
lastModified?: string | undefined;
|
|
274
|
+
}, {
|
|
275
|
+
path: string;
|
|
276
|
+
title?: string | undefined;
|
|
277
|
+
description?: string | undefined;
|
|
278
|
+
content?: string | undefined;
|
|
279
|
+
optional?: boolean | undefined;
|
|
280
|
+
lastModified?: string | undefined;
|
|
281
|
+
}>, "many">;
|
|
282
|
+
/** Optional sections for llms.txt */
|
|
283
|
+
optionalSections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
284
|
+
/** Section title */
|
|
285
|
+
title: z.ZodString;
|
|
286
|
+
/** Section content */
|
|
287
|
+
content: z.ZodOptional<z.ZodString>;
|
|
288
|
+
}, "strip", z.ZodTypeAny, {
|
|
289
|
+
title: string;
|
|
290
|
+
content?: string | undefined;
|
|
291
|
+
}, {
|
|
292
|
+
title: string;
|
|
293
|
+
content?: string | undefined;
|
|
294
|
+
}>, "many">>;
|
|
295
|
+
/** Site version */
|
|
296
|
+
version: z.ZodOptional<z.ZodString>;
|
|
297
|
+
/** Generation timestamp (ISO 8601) */
|
|
298
|
+
generatedAt: z.ZodOptional<z.ZodString>;
|
|
299
|
+
}, "strip", z.ZodTypeAny, {
|
|
300
|
+
baseUrl: string;
|
|
301
|
+
title: string;
|
|
302
|
+
pages: {
|
|
303
|
+
path: string;
|
|
304
|
+
optional: boolean;
|
|
305
|
+
title?: string | undefined;
|
|
306
|
+
description?: string | undefined;
|
|
307
|
+
content?: string | undefined;
|
|
308
|
+
lastModified?: string | undefined;
|
|
309
|
+
}[];
|
|
310
|
+
description?: string | undefined;
|
|
311
|
+
optionalSections?: {
|
|
312
|
+
title: string;
|
|
313
|
+
content?: string | undefined;
|
|
314
|
+
}[] | undefined;
|
|
315
|
+
version?: string | undefined;
|
|
316
|
+
generatedAt?: string | undefined;
|
|
317
|
+
}, {
|
|
318
|
+
baseUrl: string;
|
|
319
|
+
title: string;
|
|
320
|
+
pages: {
|
|
321
|
+
path: string;
|
|
322
|
+
title?: string | undefined;
|
|
323
|
+
description?: string | undefined;
|
|
324
|
+
content?: string | undefined;
|
|
325
|
+
optional?: boolean | undefined;
|
|
326
|
+
lastModified?: string | undefined;
|
|
327
|
+
}[];
|
|
328
|
+
description?: string | undefined;
|
|
329
|
+
optionalSections?: {
|
|
330
|
+
title: string;
|
|
331
|
+
content?: string | undefined;
|
|
332
|
+
}[] | undefined;
|
|
333
|
+
version?: string | undefined;
|
|
334
|
+
generatedAt?: string | undefined;
|
|
335
|
+
}>;
|
|
336
|
+
/**
|
|
337
|
+
* Type for site manifest.
|
|
338
|
+
*/
|
|
339
|
+
type SiteManifest = z.infer<typeof SiteManifestSchema>;
|
|
340
|
+
/**
|
|
341
|
+
* Schema for build manifest (Next.js compatible).
|
|
342
|
+
*/
|
|
343
|
+
declare const BuildManifestSchema: z.ZodObject<{
|
|
344
|
+
/** Build ID */
|
|
345
|
+
buildId: z.ZodString;
|
|
346
|
+
/** List of static pages */
|
|
347
|
+
pages: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
|
|
348
|
+
/** Dynamic routes */
|
|
349
|
+
dynamicRoutes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
350
|
+
routeRegex: z.ZodString;
|
|
351
|
+
dataRoute: z.ZodString;
|
|
352
|
+
dataRouteRegex: z.ZodString;
|
|
353
|
+
}, "strip", z.ZodTypeAny, {
|
|
354
|
+
routeRegex: string;
|
|
355
|
+
dataRoute: string;
|
|
356
|
+
dataRouteRegex: string;
|
|
357
|
+
}, {
|
|
358
|
+
routeRegex: string;
|
|
359
|
+
dataRoute: string;
|
|
360
|
+
dataRouteRegex: string;
|
|
361
|
+
}>>>;
|
|
362
|
+
}, "strip", z.ZodTypeAny, {
|
|
363
|
+
pages: Record<string, string[]>;
|
|
364
|
+
buildId: string;
|
|
365
|
+
dynamicRoutes?: Record<string, {
|
|
366
|
+
routeRegex: string;
|
|
367
|
+
dataRoute: string;
|
|
368
|
+
dataRouteRegex: string;
|
|
369
|
+
}> | undefined;
|
|
370
|
+
}, {
|
|
371
|
+
pages: Record<string, string[]>;
|
|
372
|
+
buildId: string;
|
|
373
|
+
dynamicRoutes?: Record<string, {
|
|
374
|
+
routeRegex: string;
|
|
375
|
+
dataRoute: string;
|
|
376
|
+
dataRouteRegex: string;
|
|
377
|
+
}> | undefined;
|
|
378
|
+
}>;
|
|
379
|
+
/**
|
|
380
|
+
* Type for build manifest.
|
|
381
|
+
*/
|
|
382
|
+
type BuildManifest = z.infer<typeof BuildManifestSchema>;
|
|
383
|
+
|
|
384
|
+
export { type BuildManifest as B, type ManifestItem as M, type OptionalSection as O, type PageManifest as P, type SiteManifest as S, BuildManifestSchema as a, OptionalSectionSchema as b, PageManifestSchema as c, SiteManifestSchema as d, ManifestItemSchema as e, type ManifestSource as f, ManifestSourceSchema as g, type ManifestValue as h, ManifestValueSchema as i, type ManifestsConfig as j, ManifestsConfigSchema as k };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { L as LlmsSeoConfig } from '../config.schema-DCnBx3Gm.js';
|
|
2
|
+
export { B as BookingConfig, e as BookingConfigSchema, f as BrandConfig, g as BrandConfigSchema, C as CheckConfig, a as CheckConfigSchema, b as Config, c as ConfigSchema, h as ContactConfig, i as ContactConfigSchema, j as FormatConfig, k as FormatConfigSchema, F as FullConfig, d as FullConfigSchema, l as LlmsSeoConfigSchema, m as LocaleConfig, n as LocaleConfigSchema, M as MachineHintsConfig, o as MachineHintsConfigSchema, O as OutputConfig, p as OutputConfigSchema, q as OutputPathsConfig, r as OutputPathsConfigSchema, P as PolicyConfig, s as PolicyConfigSchema, R as RestrictedClaimsConfig, t as RestrictedClaimsConfigSchema, S as SectionsConfig, u as SectionsConfigSchema, v as SiteConfig, w as SiteConfigSchema, x as SocialConfig, y as SocialConfigSchema } from '../config.schema-DCnBx3Gm.js';
|
|
3
|
+
export { B as BuildManifest, a as BuildManifestSchema, M as ManifestItem, e as ManifestItemSchema, f as ManifestSource, g as ManifestSourceSchema, h as ManifestValue, i as ManifestValueSchema, j as ManifestsConfig, k as ManifestsConfigSchema, O as OptionalSection, b as OptionalSectionSchema, P as PageManifest, c as PageManifestSchema, S as SiteManifest, d as SiteManifestSchema } from '../manifest.schema-B_z3rxRV.js';
|
|
4
|
+
import { ZodType } from 'zod';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Validation utilities using Zod schemas.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Result of a validation operation.
|
|
12
|
+
*/
|
|
13
|
+
interface ValidationResult<T> {
|
|
14
|
+
/** Whether validation passed */
|
|
15
|
+
success: boolean;
|
|
16
|
+
/** Validated data (only present if success is true) */
|
|
17
|
+
data?: T;
|
|
18
|
+
/** Validation issues (errors and warnings) */
|
|
19
|
+
issues?: ValidationIssue[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Represents a single validation issue (error or warning).
|
|
23
|
+
*/
|
|
24
|
+
interface ValidationIssue {
|
|
25
|
+
/** Path to the invalid field */
|
|
26
|
+
path: string;
|
|
27
|
+
/** Error code */
|
|
28
|
+
code: string;
|
|
29
|
+
/** Human-readable error message */
|
|
30
|
+
message: string;
|
|
31
|
+
/** Issue severity */
|
|
32
|
+
severity: 'error' | 'warning';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Legacy ValidationError type for backwards compatibility.
|
|
36
|
+
*/
|
|
37
|
+
type ValidationError = Omit<ValidationIssue, 'severity'>;
|
|
38
|
+
/**
|
|
39
|
+
* Validates data against a Zod schema.
|
|
40
|
+
* @param schema - The Zod schema to validate against
|
|
41
|
+
* @param data - The data to validate
|
|
42
|
+
* @returns Validation result
|
|
43
|
+
*/
|
|
44
|
+
declare function validate<T>(schema: ZodType<T>, data: unknown): ValidationResult<T>;
|
|
45
|
+
/**
|
|
46
|
+
* Validates and throws on error.
|
|
47
|
+
* @param schema - The Zod schema to validate against
|
|
48
|
+
* @param data - The data to validate
|
|
49
|
+
* @returns Validated data
|
|
50
|
+
* @throws Error if validation fails
|
|
51
|
+
*/
|
|
52
|
+
declare function validateOrThrow<T>(schema: ZodType<T>, data: unknown): T;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a human-readable error message from validation issues.
|
|
55
|
+
* @param issues - Array of validation issues
|
|
56
|
+
* @returns Formatted error message
|
|
57
|
+
*/
|
|
58
|
+
declare function formatValidationErrors(issues: readonly ValidationIssue[]): string;
|
|
59
|
+
/**
|
|
60
|
+
* Validates the full LlmsSeoConfig with custom validation rules.
|
|
61
|
+
* @param data - The configuration data to validate
|
|
62
|
+
* @returns Validation result with all issues
|
|
63
|
+
*/
|
|
64
|
+
declare function validateLlmsSeoConfig(data: unknown): ValidationResult<LlmsSeoConfig>;
|
|
65
|
+
/**
|
|
66
|
+
* Normalizes hub paths in the configuration.
|
|
67
|
+
* @param hubs - Array of hub paths
|
|
68
|
+
* @returns Normalized hub paths
|
|
69
|
+
*/
|
|
70
|
+
declare function normalizeHubPaths(hubs: string[]): string[];
|
|
71
|
+
|
|
72
|
+
export { LlmsSeoConfig, type ValidationError, type ValidationIssue, type ValidationResult, formatValidationErrors, normalizeHubPaths, validate, validateLlmsSeoConfig, validateOrThrow };
|