@mintlify/validation 0.1.956 → 0.1.958

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/dist/index.d.ts CHANGED
@@ -43,3 +43,4 @@ export * from './openapi/v2/isOpenAPIV3orV31Document.js';
43
43
  export * from './editor-navigation/index.js';
44
44
  export * from './resolve-refs.js';
45
45
  export * from './verification.js';
46
+ export * from './page-metadata.js';
package/dist/index.js CHANGED
@@ -99,3 +99,4 @@ export * from './openapi/v2/isOpenAPIV3orV31Document.js';
99
99
  export * from './editor-navigation/index.js';
100
100
  export * from './resolve-refs.js';
101
101
  export * from './verification.js';
102
+ export * from './page-metadata.js';
@@ -0,0 +1,646 @@
1
+ import { z } from 'zod';
2
+ export declare const pageMetadataPersonSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"user">;
4
+ id: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ type: "user";
7
+ id: string;
8
+ }, {
9
+ type: "user";
10
+ id: string;
11
+ }>;
12
+ export declare const pageMetadataContributorSchema: z.ZodUnion<[z.ZodObject<{
13
+ type: z.ZodLiteral<"user">;
14
+ id: z.ZodString;
15
+ }, "strip", z.ZodTypeAny, {
16
+ type: "user";
17
+ id: string;
18
+ }, {
19
+ type: "user";
20
+ id: string;
21
+ }>, z.ZodObject<{
22
+ type: z.ZodLiteral<"agent">;
23
+ id: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ type: "agent";
26
+ id: string;
27
+ }, {
28
+ type: "agent";
29
+ id: string;
30
+ }>]>;
31
+ export declare const pageMetadataPropertySchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
32
+ name: z.ZodString;
33
+ type: z.ZodLiteral<"text">;
34
+ value: z.ZodOptional<z.ZodString>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ type: "text";
37
+ name: string;
38
+ value?: string | undefined;
39
+ }, {
40
+ type: "text";
41
+ name: string;
42
+ value?: string | undefined;
43
+ }>, z.ZodObject<{
44
+ name: z.ZodString;
45
+ type: z.ZodLiteral<"number">;
46
+ value: z.ZodOptional<z.ZodNumber>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ type: "number";
49
+ name: string;
50
+ value?: number | undefined;
51
+ }, {
52
+ type: "number";
53
+ name: string;
54
+ value?: number | undefined;
55
+ }>, z.ZodObject<{
56
+ name: z.ZodString;
57
+ type: z.ZodLiteral<"date">;
58
+ value: z.ZodOptional<z.ZodString>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ type: "date";
61
+ name: string;
62
+ value?: string | undefined;
63
+ }, {
64
+ type: "date";
65
+ name: string;
66
+ value?: string | undefined;
67
+ }>, z.ZodObject<{
68
+ name: z.ZodString;
69
+ type: z.ZodLiteral<"person">;
70
+ value: z.ZodOptional<z.ZodObject<{
71
+ type: z.ZodLiteral<"user">;
72
+ id: z.ZodString;
73
+ }, "strip", z.ZodTypeAny, {
74
+ type: "user";
75
+ id: string;
76
+ }, {
77
+ type: "user";
78
+ id: string;
79
+ }>>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ type: "person";
82
+ name: string;
83
+ value?: {
84
+ type: "user";
85
+ id: string;
86
+ } | undefined;
87
+ }, {
88
+ type: "person";
89
+ name: string;
90
+ value?: {
91
+ type: "user";
92
+ id: string;
93
+ } | undefined;
94
+ }>, z.ZodObject<{
95
+ name: z.ZodString;
96
+ type: z.ZodLiteral<"url">;
97
+ value: z.ZodOptional<z.ZodString>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ type: "url";
100
+ name: string;
101
+ value?: string | undefined;
102
+ }, {
103
+ type: "url";
104
+ name: string;
105
+ value?: string | undefined;
106
+ }>, z.ZodObject<{
107
+ name: z.ZodString;
108
+ type: z.ZodLiteral<"checkbox">;
109
+ value: z.ZodOptional<z.ZodBoolean>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ type: "checkbox";
112
+ name: string;
113
+ value?: boolean | undefined;
114
+ }, {
115
+ type: "checkbox";
116
+ name: string;
117
+ value?: boolean | undefined;
118
+ }>, z.ZodObject<{
119
+ name: z.ZodString;
120
+ type: z.ZodLiteral<"select">;
121
+ options: z.ZodArray<z.ZodString, "many">;
122
+ value: z.ZodOptional<z.ZodString>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ options: string[];
125
+ type: "select";
126
+ name: string;
127
+ value?: string | undefined;
128
+ }, {
129
+ options: string[];
130
+ type: "select";
131
+ name: string;
132
+ value?: string | undefined;
133
+ }>, z.ZodObject<{
134
+ name: z.ZodString;
135
+ type: z.ZodLiteral<"multi_select">;
136
+ options: z.ZodArray<z.ZodString, "many">;
137
+ value: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ options: string[];
140
+ type: "multi_select";
141
+ name: string;
142
+ value?: string[] | undefined;
143
+ }, {
144
+ options: string[];
145
+ type: "multi_select";
146
+ name: string;
147
+ value?: string[] | undefined;
148
+ }>]>, {
149
+ type: "text";
150
+ name: string;
151
+ value?: string | undefined;
152
+ } | {
153
+ type: "number";
154
+ name: string;
155
+ value?: number | undefined;
156
+ } | {
157
+ type: "date";
158
+ name: string;
159
+ value?: string | undefined;
160
+ } | {
161
+ type: "person";
162
+ name: string;
163
+ value?: {
164
+ type: "user";
165
+ id: string;
166
+ } | undefined;
167
+ } | {
168
+ type: "url";
169
+ name: string;
170
+ value?: string | undefined;
171
+ } | {
172
+ type: "checkbox";
173
+ name: string;
174
+ value?: boolean | undefined;
175
+ } | {
176
+ options: string[];
177
+ type: "select";
178
+ name: string;
179
+ value?: string | undefined;
180
+ } | {
181
+ options: string[];
182
+ type: "multi_select";
183
+ name: string;
184
+ value?: string[] | undefined;
185
+ }, {
186
+ type: "text";
187
+ name: string;
188
+ value?: string | undefined;
189
+ } | {
190
+ type: "number";
191
+ name: string;
192
+ value?: number | undefined;
193
+ } | {
194
+ type: "date";
195
+ name: string;
196
+ value?: string | undefined;
197
+ } | {
198
+ type: "person";
199
+ name: string;
200
+ value?: {
201
+ type: "user";
202
+ id: string;
203
+ } | undefined;
204
+ } | {
205
+ type: "url";
206
+ name: string;
207
+ value?: string | undefined;
208
+ } | {
209
+ type: "checkbox";
210
+ name: string;
211
+ value?: boolean | undefined;
212
+ } | {
213
+ options: string[];
214
+ type: "select";
215
+ name: string;
216
+ value?: string | undefined;
217
+ } | {
218
+ options: string[];
219
+ type: "multi_select";
220
+ name: string;
221
+ value?: string[] | undefined;
222
+ }>;
223
+ export declare const pageMetadataFields: {
224
+ owner: z.ZodObject<{
225
+ type: z.ZodLiteral<"user">;
226
+ id: z.ZodString;
227
+ }, "strip", z.ZodTypeAny, {
228
+ type: "user";
229
+ id: string;
230
+ }, {
231
+ type: "user";
232
+ id: string;
233
+ }>;
234
+ reviewers: z.ZodArray<z.ZodObject<{
235
+ type: z.ZodLiteral<"user">;
236
+ id: z.ZodString;
237
+ }, "strip", z.ZodTypeAny, {
238
+ type: "user";
239
+ id: string;
240
+ }, {
241
+ type: "user";
242
+ id: string;
243
+ }>, "many">;
244
+ contributors: z.ZodArray<z.ZodUnion<[z.ZodObject<{
245
+ type: z.ZodLiteral<"user">;
246
+ id: z.ZodString;
247
+ }, "strip", z.ZodTypeAny, {
248
+ type: "user";
249
+ id: string;
250
+ }, {
251
+ type: "user";
252
+ id: string;
253
+ }>, z.ZodObject<{
254
+ type: z.ZodLiteral<"agent">;
255
+ id: z.ZodString;
256
+ }, "strip", z.ZodTypeAny, {
257
+ type: "agent";
258
+ id: string;
259
+ }, {
260
+ type: "agent";
261
+ id: string;
262
+ }>]>, "many">;
263
+ tags: z.ZodArray<z.ZodString, "many">;
264
+ relatedPages: z.ZodArray<z.ZodObject<{
265
+ pageId: z.ZodString;
266
+ }, "strip", z.ZodTypeAny, {
267
+ pageId: string;
268
+ }, {
269
+ pageId: string;
270
+ }>, "many">;
271
+ resources: z.ZodArray<z.ZodObject<{
272
+ title: z.ZodString;
273
+ url: z.ZodString;
274
+ }, "strip", z.ZodTypeAny, {
275
+ url: string;
276
+ title: string;
277
+ }, {
278
+ url: string;
279
+ title: string;
280
+ }>, "many">;
281
+ };
282
+ export declare const pageMetadataDisplaySchema: z.ZodObject<{
283
+ owner: z.ZodCatch<z.ZodOptional<z.ZodObject<{
284
+ type: z.ZodLiteral<"user">;
285
+ id: z.ZodString;
286
+ }, "strip", z.ZodTypeAny, {
287
+ type: "user";
288
+ id: string;
289
+ }, {
290
+ type: "user";
291
+ id: string;
292
+ }>>>;
293
+ reviewers: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
294
+ type: z.ZodLiteral<"user">;
295
+ id: z.ZodString;
296
+ }, "strip", z.ZodTypeAny, {
297
+ type: "user";
298
+ id: string;
299
+ }, {
300
+ type: "user";
301
+ id: string;
302
+ }>, "many">>>;
303
+ contributors: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
304
+ type: z.ZodLiteral<"user">;
305
+ id: z.ZodString;
306
+ }, "strip", z.ZodTypeAny, {
307
+ type: "user";
308
+ id: string;
309
+ }, {
310
+ type: "user";
311
+ id: string;
312
+ }>, z.ZodObject<{
313
+ type: z.ZodLiteral<"agent">;
314
+ id: z.ZodString;
315
+ }, "strip", z.ZodTypeAny, {
316
+ type: "agent";
317
+ id: string;
318
+ }, {
319
+ type: "agent";
320
+ id: string;
321
+ }>]>, "many">>>;
322
+ tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
323
+ relatedPages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
324
+ pageId: z.ZodString;
325
+ }, "strip", z.ZodTypeAny, {
326
+ pageId: string;
327
+ }, {
328
+ pageId: string;
329
+ }>, "many">>>;
330
+ resources: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
331
+ title: z.ZodString;
332
+ url: z.ZodString;
333
+ }, "strip", z.ZodTypeAny, {
334
+ url: string;
335
+ title: string;
336
+ }, {
337
+ url: string;
338
+ title: string;
339
+ }>, "many">>>;
340
+ properties: z.ZodCatch<z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodCatch<z.ZodOptional<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
341
+ name: z.ZodString;
342
+ type: z.ZodLiteral<"text">;
343
+ value: z.ZodOptional<z.ZodString>;
344
+ }, "strip", z.ZodTypeAny, {
345
+ type: "text";
346
+ name: string;
347
+ value?: string | undefined;
348
+ }, {
349
+ type: "text";
350
+ name: string;
351
+ value?: string | undefined;
352
+ }>, z.ZodObject<{
353
+ name: z.ZodString;
354
+ type: z.ZodLiteral<"number">;
355
+ value: z.ZodOptional<z.ZodNumber>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ type: "number";
358
+ name: string;
359
+ value?: number | undefined;
360
+ }, {
361
+ type: "number";
362
+ name: string;
363
+ value?: number | undefined;
364
+ }>, z.ZodObject<{
365
+ name: z.ZodString;
366
+ type: z.ZodLiteral<"date">;
367
+ value: z.ZodOptional<z.ZodString>;
368
+ }, "strip", z.ZodTypeAny, {
369
+ type: "date";
370
+ name: string;
371
+ value?: string | undefined;
372
+ }, {
373
+ type: "date";
374
+ name: string;
375
+ value?: string | undefined;
376
+ }>, z.ZodObject<{
377
+ name: z.ZodString;
378
+ type: z.ZodLiteral<"person">;
379
+ value: z.ZodOptional<z.ZodObject<{
380
+ type: z.ZodLiteral<"user">;
381
+ id: z.ZodString;
382
+ }, "strip", z.ZodTypeAny, {
383
+ type: "user";
384
+ id: string;
385
+ }, {
386
+ type: "user";
387
+ id: string;
388
+ }>>;
389
+ }, "strip", z.ZodTypeAny, {
390
+ type: "person";
391
+ name: string;
392
+ value?: {
393
+ type: "user";
394
+ id: string;
395
+ } | undefined;
396
+ }, {
397
+ type: "person";
398
+ name: string;
399
+ value?: {
400
+ type: "user";
401
+ id: string;
402
+ } | undefined;
403
+ }>, z.ZodObject<{
404
+ name: z.ZodString;
405
+ type: z.ZodLiteral<"url">;
406
+ value: z.ZodOptional<z.ZodString>;
407
+ }, "strip", z.ZodTypeAny, {
408
+ type: "url";
409
+ name: string;
410
+ value?: string | undefined;
411
+ }, {
412
+ type: "url";
413
+ name: string;
414
+ value?: string | undefined;
415
+ }>, z.ZodObject<{
416
+ name: z.ZodString;
417
+ type: z.ZodLiteral<"checkbox">;
418
+ value: z.ZodOptional<z.ZodBoolean>;
419
+ }, "strip", z.ZodTypeAny, {
420
+ type: "checkbox";
421
+ name: string;
422
+ value?: boolean | undefined;
423
+ }, {
424
+ type: "checkbox";
425
+ name: string;
426
+ value?: boolean | undefined;
427
+ }>, z.ZodObject<{
428
+ name: z.ZodString;
429
+ type: z.ZodLiteral<"select">;
430
+ options: z.ZodArray<z.ZodString, "many">;
431
+ value: z.ZodOptional<z.ZodString>;
432
+ }, "strip", z.ZodTypeAny, {
433
+ options: string[];
434
+ type: "select";
435
+ name: string;
436
+ value?: string | undefined;
437
+ }, {
438
+ options: string[];
439
+ type: "select";
440
+ name: string;
441
+ value?: string | undefined;
442
+ }>, z.ZodObject<{
443
+ name: z.ZodString;
444
+ type: z.ZodLiteral<"multi_select">;
445
+ options: z.ZodArray<z.ZodString, "many">;
446
+ value: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
447
+ }, "strip", z.ZodTypeAny, {
448
+ options: string[];
449
+ type: "multi_select";
450
+ name: string;
451
+ value?: string[] | undefined;
452
+ }, {
453
+ options: string[];
454
+ type: "multi_select";
455
+ name: string;
456
+ value?: string[] | undefined;
457
+ }>]>, {
458
+ type: "text";
459
+ name: string;
460
+ value?: string | undefined;
461
+ } | {
462
+ type: "number";
463
+ name: string;
464
+ value?: number | undefined;
465
+ } | {
466
+ type: "date";
467
+ name: string;
468
+ value?: string | undefined;
469
+ } | {
470
+ type: "person";
471
+ name: string;
472
+ value?: {
473
+ type: "user";
474
+ id: string;
475
+ } | undefined;
476
+ } | {
477
+ type: "url";
478
+ name: string;
479
+ value?: string | undefined;
480
+ } | {
481
+ type: "checkbox";
482
+ name: string;
483
+ value?: boolean | undefined;
484
+ } | {
485
+ options: string[];
486
+ type: "select";
487
+ name: string;
488
+ value?: string | undefined;
489
+ } | {
490
+ options: string[];
491
+ type: "multi_select";
492
+ name: string;
493
+ value?: string[] | undefined;
494
+ }, {
495
+ type: "text";
496
+ name: string;
497
+ value?: string | undefined;
498
+ } | {
499
+ type: "number";
500
+ name: string;
501
+ value?: number | undefined;
502
+ } | {
503
+ type: "date";
504
+ name: string;
505
+ value?: string | undefined;
506
+ } | {
507
+ type: "person";
508
+ name: string;
509
+ value?: {
510
+ type: "user";
511
+ id: string;
512
+ } | undefined;
513
+ } | {
514
+ type: "url";
515
+ name: string;
516
+ value?: string | undefined;
517
+ } | {
518
+ type: "checkbox";
519
+ name: string;
520
+ value?: boolean | undefined;
521
+ } | {
522
+ options: string[];
523
+ type: "select";
524
+ name: string;
525
+ value?: string | undefined;
526
+ } | {
527
+ options: string[];
528
+ type: "multi_select";
529
+ name: string;
530
+ value?: string[] | undefined;
531
+ }>>>>, {
532
+ [k: string]: {
533
+ type: "text";
534
+ name: string;
535
+ value?: string | undefined;
536
+ } | {
537
+ type: "number";
538
+ name: string;
539
+ value?: number | undefined;
540
+ } | {
541
+ type: "date";
542
+ name: string;
543
+ value?: string | undefined;
544
+ } | {
545
+ type: "person";
546
+ name: string;
547
+ value?: {
548
+ type: "user";
549
+ id: string;
550
+ } | undefined;
551
+ } | {
552
+ type: "url";
553
+ name: string;
554
+ value?: string | undefined;
555
+ } | {
556
+ type: "checkbox";
557
+ name: string;
558
+ value?: boolean | undefined;
559
+ } | {
560
+ options: string[];
561
+ type: "select";
562
+ name: string;
563
+ value?: string | undefined;
564
+ } | {
565
+ options: string[];
566
+ type: "multi_select";
567
+ name: string;
568
+ value?: string[] | undefined;
569
+ };
570
+ }, Record<string, unknown>>>>;
571
+ }, "strip", z.ZodTypeAny, {
572
+ properties?: {
573
+ [k: string]: {
574
+ type: "text";
575
+ name: string;
576
+ value?: string | undefined;
577
+ } | {
578
+ type: "number";
579
+ name: string;
580
+ value?: number | undefined;
581
+ } | {
582
+ type: "date";
583
+ name: string;
584
+ value?: string | undefined;
585
+ } | {
586
+ type: "person";
587
+ name: string;
588
+ value?: {
589
+ type: "user";
590
+ id: string;
591
+ } | undefined;
592
+ } | {
593
+ type: "url";
594
+ name: string;
595
+ value?: string | undefined;
596
+ } | {
597
+ type: "checkbox";
598
+ name: string;
599
+ value?: boolean | undefined;
600
+ } | {
601
+ options: string[];
602
+ type: "select";
603
+ name: string;
604
+ value?: string | undefined;
605
+ } | {
606
+ options: string[];
607
+ type: "multi_select";
608
+ name: string;
609
+ value?: string[] | undefined;
610
+ };
611
+ } | undefined;
612
+ tags?: string[] | undefined;
613
+ relatedPages?: {
614
+ pageId: string;
615
+ }[] | undefined;
616
+ owner?: {
617
+ type: "user";
618
+ id: string;
619
+ } | undefined;
620
+ reviewers?: {
621
+ type: "user";
622
+ id: string;
623
+ }[] | undefined;
624
+ contributors?: ({
625
+ type: "user";
626
+ id: string;
627
+ } | {
628
+ type: "agent";
629
+ id: string;
630
+ })[] | undefined;
631
+ resources?: {
632
+ url: string;
633
+ title: string;
634
+ }[] | undefined;
635
+ }, {
636
+ properties?: unknown;
637
+ tags?: unknown;
638
+ relatedPages?: unknown;
639
+ owner?: unknown;
640
+ reviewers?: unknown;
641
+ contributors?: unknown;
642
+ resources?: unknown;
643
+ }>;
644
+ export type PageMetadata = z.infer<typeof pageMetadataDisplaySchema>;
645
+ export type PageMetadataProperty = z.infer<typeof pageMetadataPropertySchema>;
646
+ export declare function parsePageMetadata(value: unknown): PageMetadata;