openalmanac 0.2.56 → 0.2.57

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.
@@ -1,3 +1,17 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Local frontmatter validation. Mirrors the backend's `PagePublishFrontmatter`
4
+ * pydantic schema (see `backend/src/schemas/wiki_schemas.py` and
5
+ * `backend/src/schemas/infobox_schemas.py`) exactly — any drift here means
6
+ * agents pass local validation and still hit a 400 on publish.
7
+ *
8
+ * The hosted authoring reference is at
9
+ * https://www.openalmanac.org/infobox-schema.md
10
+ * which is generated against the same pydantic definitions.
11
+ *
12
+ * Rule of thumb when changing: if it's not enforced at publish time on the
13
+ * backend, it doesn't belong here. Nothing more, nothing less.
14
+ */
1
15
  export interface ValidationError {
2
16
  field: string;
3
17
  message: string;
@@ -6,6 +20,952 @@ interface ParsedArticle {
6
20
  frontmatter: Record<string, unknown>;
7
21
  content: string;
8
22
  }
23
+ export declare const sourceSchema: z.ZodObject<{
24
+ key: z.ZodString;
25
+ url: z.ZodString;
26
+ title: z.ZodString;
27
+ accessed_date: z.ZodUnion<[z.ZodDate, z.ZodString]>;
28
+ }, "strict", z.ZodTypeAny, {
29
+ url: string;
30
+ title: string;
31
+ key: string;
32
+ accessed_date: string | Date;
33
+ }, {
34
+ url: string;
35
+ title: string;
36
+ key: string;
37
+ accessed_date: string | Date;
38
+ }>;
39
+ export declare const infoboxSchema: z.ZodObject<{
40
+ header: z.ZodDefault<z.ZodObject<{
41
+ image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ subtitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ details: z.ZodDefault<z.ZodArray<z.ZodObject<{
44
+ key: z.ZodString;
45
+ value: z.ZodString;
46
+ }, "strict", z.ZodTypeAny, {
47
+ value: string;
48
+ key: string;
49
+ }, {
50
+ value: string;
51
+ key: string;
52
+ }>, "many">>;
53
+ links: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
54
+ }, "strict", z.ZodTypeAny, {
55
+ details: {
56
+ value: string;
57
+ key: string;
58
+ }[];
59
+ links: string[];
60
+ image_url?: string | null | undefined;
61
+ subtitle?: string | null | undefined;
62
+ }, {
63
+ image_url?: string | null | undefined;
64
+ subtitle?: string | null | undefined;
65
+ details?: {
66
+ value: string;
67
+ key: string;
68
+ }[] | undefined;
69
+ links?: string[] | undefined;
70
+ }>>;
71
+ sections: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
72
+ type: z.ZodLiteral<"timeline">;
73
+ title: z.ZodString;
74
+ items: z.ZodArray<z.ZodObject<{
75
+ primary: z.ZodString;
76
+ secondary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
77
+ period: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ description: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
80
+ link: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
+ }, "strict", z.ZodTypeAny, {
82
+ primary: string;
83
+ link?: string | null | undefined;
84
+ description?: string[] | null | undefined;
85
+ secondary?: string | null | undefined;
86
+ period?: string | null | undefined;
87
+ location?: string | null | undefined;
88
+ }, {
89
+ primary: string;
90
+ link?: string | null | undefined;
91
+ description?: string[] | null | undefined;
92
+ secondary?: string | null | undefined;
93
+ period?: string | null | undefined;
94
+ location?: string | null | undefined;
95
+ }>, "many">;
96
+ }, "strict", z.ZodTypeAny, {
97
+ title: string;
98
+ type: "timeline";
99
+ items: {
100
+ primary: string;
101
+ link?: string | null | undefined;
102
+ description?: string[] | null | undefined;
103
+ secondary?: string | null | undefined;
104
+ period?: string | null | undefined;
105
+ location?: string | null | undefined;
106
+ }[];
107
+ }, {
108
+ title: string;
109
+ type: "timeline";
110
+ items: {
111
+ primary: string;
112
+ link?: string | null | undefined;
113
+ description?: string[] | null | undefined;
114
+ secondary?: string | null | undefined;
115
+ period?: string | null | undefined;
116
+ location?: string | null | undefined;
117
+ }[];
118
+ }>, z.ZodObject<{
119
+ type: z.ZodLiteral<"list">;
120
+ title: z.ZodString;
121
+ items: z.ZodArray<z.ZodObject<{
122
+ title: z.ZodString;
123
+ subtitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
+ year: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ description: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
126
+ link: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
+ }, "strict", z.ZodTypeAny, {
128
+ title: string;
129
+ link?: string | null | undefined;
130
+ description?: string[] | null | undefined;
131
+ subtitle?: string | null | undefined;
132
+ year?: string | null | undefined;
133
+ }, {
134
+ title: string;
135
+ link?: string | null | undefined;
136
+ description?: string[] | null | undefined;
137
+ subtitle?: string | null | undefined;
138
+ year?: string | null | undefined;
139
+ }>, "many">;
140
+ }, "strict", z.ZodTypeAny, {
141
+ title: string;
142
+ type: "list";
143
+ items: {
144
+ title: string;
145
+ link?: string | null | undefined;
146
+ description?: string[] | null | undefined;
147
+ subtitle?: string | null | undefined;
148
+ year?: string | null | undefined;
149
+ }[];
150
+ }, {
151
+ title: string;
152
+ type: "list";
153
+ items: {
154
+ title: string;
155
+ link?: string | null | undefined;
156
+ description?: string[] | null | undefined;
157
+ subtitle?: string | null | undefined;
158
+ year?: string | null | undefined;
159
+ }[];
160
+ }>, z.ZodObject<{
161
+ type: z.ZodLiteral<"tags">;
162
+ title: z.ZodString;
163
+ items: z.ZodArray<z.ZodString, "many">;
164
+ }, "strict", z.ZodTypeAny, {
165
+ title: string;
166
+ type: "tags";
167
+ items: string[];
168
+ }, {
169
+ title: string;
170
+ type: "tags";
171
+ items: string[];
172
+ }>, z.ZodObject<{
173
+ type: z.ZodLiteral<"grid">;
174
+ title: z.ZodString;
175
+ items: z.ZodArray<z.ZodObject<{
176
+ title: z.ZodString;
177
+ image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
+ year: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
+ link: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
+ }, "strict", z.ZodTypeAny, {
183
+ title: string;
184
+ link?: string | null | undefined;
185
+ description?: string | null | undefined;
186
+ type?: string | null | undefined;
187
+ image_url?: string | null | undefined;
188
+ year?: string | null | undefined;
189
+ }, {
190
+ title: string;
191
+ link?: string | null | undefined;
192
+ description?: string | null | undefined;
193
+ type?: string | null | undefined;
194
+ image_url?: string | null | undefined;
195
+ year?: string | null | undefined;
196
+ }>, "many">;
197
+ }, "strict", z.ZodTypeAny, {
198
+ title: string;
199
+ type: "grid";
200
+ items: {
201
+ title: string;
202
+ link?: string | null | undefined;
203
+ description?: string | null | undefined;
204
+ type?: string | null | undefined;
205
+ image_url?: string | null | undefined;
206
+ year?: string | null | undefined;
207
+ }[];
208
+ }, {
209
+ title: string;
210
+ type: "grid";
211
+ items: {
212
+ title: string;
213
+ link?: string | null | undefined;
214
+ description?: string | null | undefined;
215
+ type?: string | null | undefined;
216
+ image_url?: string | null | undefined;
217
+ year?: string | null | undefined;
218
+ }[];
219
+ }>, z.ZodObject<{
220
+ type: z.ZodLiteral<"table">;
221
+ title: z.ZodString;
222
+ items: z.ZodObject<{
223
+ headers: z.ZodArray<z.ZodString, "many">;
224
+ rows: z.ZodArray<z.ZodObject<{
225
+ cells: z.ZodArray<z.ZodString, "many">;
226
+ }, "strict", z.ZodTypeAny, {
227
+ cells: string[];
228
+ }, {
229
+ cells: string[];
230
+ }>, "many">;
231
+ }, "strict", z.ZodTypeAny, {
232
+ headers: string[];
233
+ rows: {
234
+ cells: string[];
235
+ }[];
236
+ }, {
237
+ headers: string[];
238
+ rows: {
239
+ cells: string[];
240
+ }[];
241
+ }>;
242
+ }, "strict", z.ZodTypeAny, {
243
+ title: string;
244
+ type: "table";
245
+ items: {
246
+ headers: string[];
247
+ rows: {
248
+ cells: string[];
249
+ }[];
250
+ };
251
+ }, {
252
+ title: string;
253
+ type: "table";
254
+ items: {
255
+ headers: string[];
256
+ rows: {
257
+ cells: string[];
258
+ }[];
259
+ };
260
+ }>, z.ZodObject<{
261
+ type: z.ZodLiteral<"key_value">;
262
+ title: z.ZodString;
263
+ items: z.ZodArray<z.ZodObject<{
264
+ key: z.ZodString;
265
+ value: z.ZodString;
266
+ }, "strict", z.ZodTypeAny, {
267
+ value: string;
268
+ key: string;
269
+ }, {
270
+ value: string;
271
+ key: string;
272
+ }>, "many">;
273
+ }, "strict", z.ZodTypeAny, {
274
+ title: string;
275
+ type: "key_value";
276
+ items: {
277
+ value: string;
278
+ key: string;
279
+ }[];
280
+ }, {
281
+ title: string;
282
+ type: "key_value";
283
+ items: {
284
+ value: string;
285
+ key: string;
286
+ }[];
287
+ }>]>, "many">>;
288
+ }, "strict", z.ZodTypeAny, {
289
+ header: {
290
+ details: {
291
+ value: string;
292
+ key: string;
293
+ }[];
294
+ links: string[];
295
+ image_url?: string | null | undefined;
296
+ subtitle?: string | null | undefined;
297
+ };
298
+ sections: ({
299
+ title: string;
300
+ type: "timeline";
301
+ items: {
302
+ primary: string;
303
+ link?: string | null | undefined;
304
+ description?: string[] | null | undefined;
305
+ secondary?: string | null | undefined;
306
+ period?: string | null | undefined;
307
+ location?: string | null | undefined;
308
+ }[];
309
+ } | {
310
+ title: string;
311
+ type: "list";
312
+ items: {
313
+ title: string;
314
+ link?: string | null | undefined;
315
+ description?: string[] | null | undefined;
316
+ subtitle?: string | null | undefined;
317
+ year?: string | null | undefined;
318
+ }[];
319
+ } | {
320
+ title: string;
321
+ type: "tags";
322
+ items: string[];
323
+ } | {
324
+ title: string;
325
+ type: "grid";
326
+ items: {
327
+ title: string;
328
+ link?: string | null | undefined;
329
+ description?: string | null | undefined;
330
+ type?: string | null | undefined;
331
+ image_url?: string | null | undefined;
332
+ year?: string | null | undefined;
333
+ }[];
334
+ } | {
335
+ title: string;
336
+ type: "table";
337
+ items: {
338
+ headers: string[];
339
+ rows: {
340
+ cells: string[];
341
+ }[];
342
+ };
343
+ } | {
344
+ title: string;
345
+ type: "key_value";
346
+ items: {
347
+ value: string;
348
+ key: string;
349
+ }[];
350
+ })[];
351
+ }, {
352
+ header?: {
353
+ image_url?: string | null | undefined;
354
+ subtitle?: string | null | undefined;
355
+ details?: {
356
+ value: string;
357
+ key: string;
358
+ }[] | undefined;
359
+ links?: string[] | undefined;
360
+ } | undefined;
361
+ sections?: ({
362
+ title: string;
363
+ type: "timeline";
364
+ items: {
365
+ primary: string;
366
+ link?: string | null | undefined;
367
+ description?: string[] | null | undefined;
368
+ secondary?: string | null | undefined;
369
+ period?: string | null | undefined;
370
+ location?: string | null | undefined;
371
+ }[];
372
+ } | {
373
+ title: string;
374
+ type: "list";
375
+ items: {
376
+ title: string;
377
+ link?: string | null | undefined;
378
+ description?: string[] | null | undefined;
379
+ subtitle?: string | null | undefined;
380
+ year?: string | null | undefined;
381
+ }[];
382
+ } | {
383
+ title: string;
384
+ type: "tags";
385
+ items: string[];
386
+ } | {
387
+ title: string;
388
+ type: "grid";
389
+ items: {
390
+ title: string;
391
+ link?: string | null | undefined;
392
+ description?: string | null | undefined;
393
+ type?: string | null | undefined;
394
+ image_url?: string | null | undefined;
395
+ year?: string | null | undefined;
396
+ }[];
397
+ } | {
398
+ title: string;
399
+ type: "table";
400
+ items: {
401
+ headers: string[];
402
+ rows: {
403
+ cells: string[];
404
+ }[];
405
+ };
406
+ } | {
407
+ title: string;
408
+ type: "key_value";
409
+ items: {
410
+ value: string;
411
+ key: string;
412
+ }[];
413
+ })[] | undefined;
414
+ }>;
415
+ export declare const pagePublishFrontmatterSchema: z.ZodObject<{
416
+ title: z.ZodString;
417
+ topics: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
418
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
419
+ key: z.ZodString;
420
+ url: z.ZodString;
421
+ title: z.ZodString;
422
+ accessed_date: z.ZodUnion<[z.ZodDate, z.ZodString]>;
423
+ }, "strict", z.ZodTypeAny, {
424
+ url: string;
425
+ title: string;
426
+ key: string;
427
+ accessed_date: string | Date;
428
+ }, {
429
+ url: string;
430
+ title: string;
431
+ key: string;
432
+ accessed_date: string | Date;
433
+ }>, "many">>;
434
+ infobox: z.ZodOptional<z.ZodNullable<z.ZodObject<{
435
+ header: z.ZodDefault<z.ZodObject<{
436
+ image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
437
+ subtitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
438
+ details: z.ZodDefault<z.ZodArray<z.ZodObject<{
439
+ key: z.ZodString;
440
+ value: z.ZodString;
441
+ }, "strict", z.ZodTypeAny, {
442
+ value: string;
443
+ key: string;
444
+ }, {
445
+ value: string;
446
+ key: string;
447
+ }>, "many">>;
448
+ links: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
449
+ }, "strict", z.ZodTypeAny, {
450
+ details: {
451
+ value: string;
452
+ key: string;
453
+ }[];
454
+ links: string[];
455
+ image_url?: string | null | undefined;
456
+ subtitle?: string | null | undefined;
457
+ }, {
458
+ image_url?: string | null | undefined;
459
+ subtitle?: string | null | undefined;
460
+ details?: {
461
+ value: string;
462
+ key: string;
463
+ }[] | undefined;
464
+ links?: string[] | undefined;
465
+ }>>;
466
+ sections: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
467
+ type: z.ZodLiteral<"timeline">;
468
+ title: z.ZodString;
469
+ items: z.ZodArray<z.ZodObject<{
470
+ primary: z.ZodString;
471
+ secondary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
472
+ period: z.ZodOptional<z.ZodNullable<z.ZodString>>;
473
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
474
+ description: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
475
+ link: z.ZodOptional<z.ZodNullable<z.ZodString>>;
476
+ }, "strict", z.ZodTypeAny, {
477
+ primary: string;
478
+ link?: string | null | undefined;
479
+ description?: string[] | null | undefined;
480
+ secondary?: string | null | undefined;
481
+ period?: string | null | undefined;
482
+ location?: string | null | undefined;
483
+ }, {
484
+ primary: string;
485
+ link?: string | null | undefined;
486
+ description?: string[] | null | undefined;
487
+ secondary?: string | null | undefined;
488
+ period?: string | null | undefined;
489
+ location?: string | null | undefined;
490
+ }>, "many">;
491
+ }, "strict", z.ZodTypeAny, {
492
+ title: string;
493
+ type: "timeline";
494
+ items: {
495
+ primary: string;
496
+ link?: string | null | undefined;
497
+ description?: string[] | null | undefined;
498
+ secondary?: string | null | undefined;
499
+ period?: string | null | undefined;
500
+ location?: string | null | undefined;
501
+ }[];
502
+ }, {
503
+ title: string;
504
+ type: "timeline";
505
+ items: {
506
+ primary: string;
507
+ link?: string | null | undefined;
508
+ description?: string[] | null | undefined;
509
+ secondary?: string | null | undefined;
510
+ period?: string | null | undefined;
511
+ location?: string | null | undefined;
512
+ }[];
513
+ }>, z.ZodObject<{
514
+ type: z.ZodLiteral<"list">;
515
+ title: z.ZodString;
516
+ items: z.ZodArray<z.ZodObject<{
517
+ title: z.ZodString;
518
+ subtitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
519
+ year: z.ZodOptional<z.ZodNullable<z.ZodString>>;
520
+ description: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
521
+ link: z.ZodOptional<z.ZodNullable<z.ZodString>>;
522
+ }, "strict", z.ZodTypeAny, {
523
+ title: string;
524
+ link?: string | null | undefined;
525
+ description?: string[] | null | undefined;
526
+ subtitle?: string | null | undefined;
527
+ year?: string | null | undefined;
528
+ }, {
529
+ title: string;
530
+ link?: string | null | undefined;
531
+ description?: string[] | null | undefined;
532
+ subtitle?: string | null | undefined;
533
+ year?: string | null | undefined;
534
+ }>, "many">;
535
+ }, "strict", z.ZodTypeAny, {
536
+ title: string;
537
+ type: "list";
538
+ items: {
539
+ title: string;
540
+ link?: string | null | undefined;
541
+ description?: string[] | null | undefined;
542
+ subtitle?: string | null | undefined;
543
+ year?: string | null | undefined;
544
+ }[];
545
+ }, {
546
+ title: string;
547
+ type: "list";
548
+ items: {
549
+ title: string;
550
+ link?: string | null | undefined;
551
+ description?: string[] | null | undefined;
552
+ subtitle?: string | null | undefined;
553
+ year?: string | null | undefined;
554
+ }[];
555
+ }>, z.ZodObject<{
556
+ type: z.ZodLiteral<"tags">;
557
+ title: z.ZodString;
558
+ items: z.ZodArray<z.ZodString, "many">;
559
+ }, "strict", z.ZodTypeAny, {
560
+ title: string;
561
+ type: "tags";
562
+ items: string[];
563
+ }, {
564
+ title: string;
565
+ type: "tags";
566
+ items: string[];
567
+ }>, z.ZodObject<{
568
+ type: z.ZodLiteral<"grid">;
569
+ title: z.ZodString;
570
+ items: z.ZodArray<z.ZodObject<{
571
+ title: z.ZodString;
572
+ image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
573
+ year: z.ZodOptional<z.ZodNullable<z.ZodString>>;
574
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
575
+ link: z.ZodOptional<z.ZodNullable<z.ZodString>>;
576
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
577
+ }, "strict", z.ZodTypeAny, {
578
+ title: string;
579
+ link?: string | null | undefined;
580
+ description?: string | null | undefined;
581
+ type?: string | null | undefined;
582
+ image_url?: string | null | undefined;
583
+ year?: string | null | undefined;
584
+ }, {
585
+ title: string;
586
+ link?: string | null | undefined;
587
+ description?: string | null | undefined;
588
+ type?: string | null | undefined;
589
+ image_url?: string | null | undefined;
590
+ year?: string | null | undefined;
591
+ }>, "many">;
592
+ }, "strict", z.ZodTypeAny, {
593
+ title: string;
594
+ type: "grid";
595
+ items: {
596
+ title: string;
597
+ link?: string | null | undefined;
598
+ description?: string | null | undefined;
599
+ type?: string | null | undefined;
600
+ image_url?: string | null | undefined;
601
+ year?: string | null | undefined;
602
+ }[];
603
+ }, {
604
+ title: string;
605
+ type: "grid";
606
+ items: {
607
+ title: string;
608
+ link?: string | null | undefined;
609
+ description?: string | null | undefined;
610
+ type?: string | null | undefined;
611
+ image_url?: string | null | undefined;
612
+ year?: string | null | undefined;
613
+ }[];
614
+ }>, z.ZodObject<{
615
+ type: z.ZodLiteral<"table">;
616
+ title: z.ZodString;
617
+ items: z.ZodObject<{
618
+ headers: z.ZodArray<z.ZodString, "many">;
619
+ rows: z.ZodArray<z.ZodObject<{
620
+ cells: z.ZodArray<z.ZodString, "many">;
621
+ }, "strict", z.ZodTypeAny, {
622
+ cells: string[];
623
+ }, {
624
+ cells: string[];
625
+ }>, "many">;
626
+ }, "strict", z.ZodTypeAny, {
627
+ headers: string[];
628
+ rows: {
629
+ cells: string[];
630
+ }[];
631
+ }, {
632
+ headers: string[];
633
+ rows: {
634
+ cells: string[];
635
+ }[];
636
+ }>;
637
+ }, "strict", z.ZodTypeAny, {
638
+ title: string;
639
+ type: "table";
640
+ items: {
641
+ headers: string[];
642
+ rows: {
643
+ cells: string[];
644
+ }[];
645
+ };
646
+ }, {
647
+ title: string;
648
+ type: "table";
649
+ items: {
650
+ headers: string[];
651
+ rows: {
652
+ cells: string[];
653
+ }[];
654
+ };
655
+ }>, z.ZodObject<{
656
+ type: z.ZodLiteral<"key_value">;
657
+ title: z.ZodString;
658
+ items: z.ZodArray<z.ZodObject<{
659
+ key: z.ZodString;
660
+ value: z.ZodString;
661
+ }, "strict", z.ZodTypeAny, {
662
+ value: string;
663
+ key: string;
664
+ }, {
665
+ value: string;
666
+ key: string;
667
+ }>, "many">;
668
+ }, "strict", z.ZodTypeAny, {
669
+ title: string;
670
+ type: "key_value";
671
+ items: {
672
+ value: string;
673
+ key: string;
674
+ }[];
675
+ }, {
676
+ title: string;
677
+ type: "key_value";
678
+ items: {
679
+ value: string;
680
+ key: string;
681
+ }[];
682
+ }>]>, "many">>;
683
+ }, "strict", z.ZodTypeAny, {
684
+ header: {
685
+ details: {
686
+ value: string;
687
+ key: string;
688
+ }[];
689
+ links: string[];
690
+ image_url?: string | null | undefined;
691
+ subtitle?: string | null | undefined;
692
+ };
693
+ sections: ({
694
+ title: string;
695
+ type: "timeline";
696
+ items: {
697
+ primary: string;
698
+ link?: string | null | undefined;
699
+ description?: string[] | null | undefined;
700
+ secondary?: string | null | undefined;
701
+ period?: string | null | undefined;
702
+ location?: string | null | undefined;
703
+ }[];
704
+ } | {
705
+ title: string;
706
+ type: "list";
707
+ items: {
708
+ title: string;
709
+ link?: string | null | undefined;
710
+ description?: string[] | null | undefined;
711
+ subtitle?: string | null | undefined;
712
+ year?: string | null | undefined;
713
+ }[];
714
+ } | {
715
+ title: string;
716
+ type: "tags";
717
+ items: string[];
718
+ } | {
719
+ title: string;
720
+ type: "grid";
721
+ items: {
722
+ title: string;
723
+ link?: string | null | undefined;
724
+ description?: string | null | undefined;
725
+ type?: string | null | undefined;
726
+ image_url?: string | null | undefined;
727
+ year?: string | null | undefined;
728
+ }[];
729
+ } | {
730
+ title: string;
731
+ type: "table";
732
+ items: {
733
+ headers: string[];
734
+ rows: {
735
+ cells: string[];
736
+ }[];
737
+ };
738
+ } | {
739
+ title: string;
740
+ type: "key_value";
741
+ items: {
742
+ value: string;
743
+ key: string;
744
+ }[];
745
+ })[];
746
+ }, {
747
+ header?: {
748
+ image_url?: string | null | undefined;
749
+ subtitle?: string | null | undefined;
750
+ details?: {
751
+ value: string;
752
+ key: string;
753
+ }[] | undefined;
754
+ links?: string[] | undefined;
755
+ } | undefined;
756
+ sections?: ({
757
+ title: string;
758
+ type: "timeline";
759
+ items: {
760
+ primary: string;
761
+ link?: string | null | undefined;
762
+ description?: string[] | null | undefined;
763
+ secondary?: string | null | undefined;
764
+ period?: string | null | undefined;
765
+ location?: string | null | undefined;
766
+ }[];
767
+ } | {
768
+ title: string;
769
+ type: "list";
770
+ items: {
771
+ title: string;
772
+ link?: string | null | undefined;
773
+ description?: string[] | null | undefined;
774
+ subtitle?: string | null | undefined;
775
+ year?: string | null | undefined;
776
+ }[];
777
+ } | {
778
+ title: string;
779
+ type: "tags";
780
+ items: string[];
781
+ } | {
782
+ title: string;
783
+ type: "grid";
784
+ items: {
785
+ title: string;
786
+ link?: string | null | undefined;
787
+ description?: string | null | undefined;
788
+ type?: string | null | undefined;
789
+ image_url?: string | null | undefined;
790
+ year?: string | null | undefined;
791
+ }[];
792
+ } | {
793
+ title: string;
794
+ type: "table";
795
+ items: {
796
+ headers: string[];
797
+ rows: {
798
+ cells: string[];
799
+ }[];
800
+ };
801
+ } | {
802
+ title: string;
803
+ type: "key_value";
804
+ items: {
805
+ value: string;
806
+ key: string;
807
+ }[];
808
+ })[] | undefined;
809
+ }>>>;
810
+ wiki: z.ZodOptional<z.ZodNullable<z.ZodString>>;
811
+ edit_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
812
+ change_title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
813
+ change_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
814
+ }, "strict", z.ZodTypeAny, {
815
+ title: string;
816
+ topics: string[];
817
+ sources: {
818
+ url: string;
819
+ title: string;
820
+ key: string;
821
+ accessed_date: string | Date;
822
+ }[];
823
+ infobox?: {
824
+ header: {
825
+ details: {
826
+ value: string;
827
+ key: string;
828
+ }[];
829
+ links: string[];
830
+ image_url?: string | null | undefined;
831
+ subtitle?: string | null | undefined;
832
+ };
833
+ sections: ({
834
+ title: string;
835
+ type: "timeline";
836
+ items: {
837
+ primary: string;
838
+ link?: string | null | undefined;
839
+ description?: string[] | null | undefined;
840
+ secondary?: string | null | undefined;
841
+ period?: string | null | undefined;
842
+ location?: string | null | undefined;
843
+ }[];
844
+ } | {
845
+ title: string;
846
+ type: "list";
847
+ items: {
848
+ title: string;
849
+ link?: string | null | undefined;
850
+ description?: string[] | null | undefined;
851
+ subtitle?: string | null | undefined;
852
+ year?: string | null | undefined;
853
+ }[];
854
+ } | {
855
+ title: string;
856
+ type: "tags";
857
+ items: string[];
858
+ } | {
859
+ title: string;
860
+ type: "grid";
861
+ items: {
862
+ title: string;
863
+ link?: string | null | undefined;
864
+ description?: string | null | undefined;
865
+ type?: string | null | undefined;
866
+ image_url?: string | null | undefined;
867
+ year?: string | null | undefined;
868
+ }[];
869
+ } | {
870
+ title: string;
871
+ type: "table";
872
+ items: {
873
+ headers: string[];
874
+ rows: {
875
+ cells: string[];
876
+ }[];
877
+ };
878
+ } | {
879
+ title: string;
880
+ type: "key_value";
881
+ items: {
882
+ value: string;
883
+ key: string;
884
+ }[];
885
+ })[];
886
+ } | null | undefined;
887
+ wiki?: string | null | undefined;
888
+ edit_summary?: string | null | undefined;
889
+ change_title?: string | null | undefined;
890
+ change_description?: string | null | undefined;
891
+ }, {
892
+ title: string;
893
+ topics?: string[] | undefined;
894
+ sources?: {
895
+ url: string;
896
+ title: string;
897
+ key: string;
898
+ accessed_date: string | Date;
899
+ }[] | undefined;
900
+ infobox?: {
901
+ header?: {
902
+ image_url?: string | null | undefined;
903
+ subtitle?: string | null | undefined;
904
+ details?: {
905
+ value: string;
906
+ key: string;
907
+ }[] | undefined;
908
+ links?: string[] | undefined;
909
+ } | undefined;
910
+ sections?: ({
911
+ title: string;
912
+ type: "timeline";
913
+ items: {
914
+ primary: string;
915
+ link?: string | null | undefined;
916
+ description?: string[] | null | undefined;
917
+ secondary?: string | null | undefined;
918
+ period?: string | null | undefined;
919
+ location?: string | null | undefined;
920
+ }[];
921
+ } | {
922
+ title: string;
923
+ type: "list";
924
+ items: {
925
+ title: string;
926
+ link?: string | null | undefined;
927
+ description?: string[] | null | undefined;
928
+ subtitle?: string | null | undefined;
929
+ year?: string | null | undefined;
930
+ }[];
931
+ } | {
932
+ title: string;
933
+ type: "tags";
934
+ items: string[];
935
+ } | {
936
+ title: string;
937
+ type: "grid";
938
+ items: {
939
+ title: string;
940
+ link?: string | null | undefined;
941
+ description?: string | null | undefined;
942
+ type?: string | null | undefined;
943
+ image_url?: string | null | undefined;
944
+ year?: string | null | undefined;
945
+ }[];
946
+ } | {
947
+ title: string;
948
+ type: "table";
949
+ items: {
950
+ headers: string[];
951
+ rows: {
952
+ cells: string[];
953
+ }[];
954
+ };
955
+ } | {
956
+ title: string;
957
+ type: "key_value";
958
+ items: {
959
+ value: string;
960
+ key: string;
961
+ }[];
962
+ })[] | undefined;
963
+ } | null | undefined;
964
+ wiki?: string | null | undefined;
965
+ edit_summary?: string | null | undefined;
966
+ change_title?: string | null | undefined;
967
+ change_description?: string | null | undefined;
968
+ }>;
9
969
  export declare function parseFrontmatter(raw: string): ParsedArticle;
10
970
  export declare function validateArticle(raw: string): ValidationError[];
11
971
  export {};