@redocly/config 0.0.0-beta-20240318165323

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE.md +7 -0
  3. package/README.md +3 -0
  4. package/README_INTERNAL.md +36 -0
  5. package/lib/.tsbuildinfo +1 -0
  6. package/lib/constants.d.ts +15 -0
  7. package/lib/constants.js +22 -0
  8. package/lib/constants.js.map +1 -0
  9. package/lib/default-theme-config-schema.d.ts +3483 -0
  10. package/lib/default-theme-config-schema.js +657 -0
  11. package/lib/default-theme-config-schema.js.map +1 -0
  12. package/lib/index.d.ts +5 -0
  13. package/lib/index.js +31 -0
  14. package/lib/index.js.map +1 -0
  15. package/lib/portal-shared-types.d.ts +250 -0
  16. package/lib/portal-shared-types.js +3 -0
  17. package/lib/portal-shared-types.js.map +1 -0
  18. package/lib/root-config-schema.d.ts +7876 -0
  19. package/lib/root-config-schema.js +344 -0
  20. package/lib/root-config-schema.js.map +1 -0
  21. package/lib/types.d.ts +42 -0
  22. package/lib/types.js +3 -0
  23. package/lib/types.js.map +1 -0
  24. package/lib-esm/.tsbuildinfo +1 -0
  25. package/lib-esm/constants.d.ts +15 -0
  26. package/lib-esm/constants.js +19 -0
  27. package/lib-esm/constants.js.map +1 -0
  28. package/lib-esm/default-theme-config-schema.d.ts +3483 -0
  29. package/lib-esm/default-theme-config-schema.js +654 -0
  30. package/lib-esm/default-theme-config-schema.js.map +1 -0
  31. package/lib-esm/index.d.ts +5 -0
  32. package/lib-esm/index.js +6 -0
  33. package/lib-esm/index.js.map +1 -0
  34. package/lib-esm/portal-shared-types.d.ts +250 -0
  35. package/lib-esm/portal-shared-types.js +2 -0
  36. package/lib-esm/portal-shared-types.js.map +1 -0
  37. package/lib-esm/root-config-schema.d.ts +7876 -0
  38. package/lib-esm/root-config-schema.js +341 -0
  39. package/lib-esm/root-config-schema.js.map +1 -0
  40. package/lib-esm/types.d.ts +42 -0
  41. package/lib-esm/types.js +2 -0
  42. package/lib-esm/types.js.map +1 -0
  43. package/package.json +20 -0
  44. package/src/constants.ts +17 -0
  45. package/src/default-theme-config-schema.ts +745 -0
  46. package/src/index.ts +13 -0
  47. package/src/portal-shared-types.ts +297 -0
  48. package/src/root-config-schema.ts +389 -0
  49. package/src/types.ts +84 -0
  50. package/tsconfig.build.json +12 -0
  51. package/tsconfig.json +10 -0
  52. package/tsconfig.lib-esm.json +15 -0
@@ -0,0 +1,745 @@
1
+ const logoConfigSchema = {
2
+ type: 'object',
3
+ properties: {
4
+ image: { type: 'string' },
5
+ srcSet: { type: 'string' },
6
+ altText: { type: 'string' },
7
+ link: { type: 'string' },
8
+ favicon: { type: 'string' },
9
+ },
10
+ additionalProperties: false,
11
+ } as const;
12
+
13
+ const hideConfigSchema = {
14
+ type: 'object',
15
+ properties: {
16
+ hide: { type: 'boolean' },
17
+ },
18
+ additionalProperties: false,
19
+ } as const;
20
+
21
+ const scriptConfigSchema = {
22
+ type: 'object',
23
+ properties: {
24
+ src: { type: 'string' },
25
+ async: { type: 'boolean' },
26
+ crossorigin: { type: 'string' },
27
+ defer: { type: 'boolean' },
28
+ fetchpriority: { type: 'string' },
29
+ integrity: { type: 'string' },
30
+ module: { type: 'boolean' },
31
+ nomodule: { type: 'boolean' },
32
+ nonce: { type: 'string' },
33
+ referrerpolicy: { type: 'string' },
34
+ type: { type: 'string' },
35
+ },
36
+ required: ['src'],
37
+ additionalProperties: true,
38
+ } as const;
39
+
40
+ const linksConfigSchema = {
41
+ type: 'object',
42
+ properties: {
43
+ href: { type: 'string' },
44
+ as: { type: 'string' },
45
+ crossorigin: { type: 'string' },
46
+ fetchpriority: { type: 'string' },
47
+ hreflang: { type: 'string' },
48
+ imagesizes: { type: 'string' },
49
+ imagesrcset: { type: 'string' },
50
+ integrity: { type: 'string' },
51
+ media: { type: 'string' },
52
+ prefetch: { type: 'string' },
53
+ referrerpolicy: { type: 'string' },
54
+ rel: { type: 'string' },
55
+ sizes: { type: 'string' },
56
+ title: { type: 'string' },
57
+ type: { type: 'string' },
58
+ },
59
+ required: ['href'],
60
+ additionalProperties: true,
61
+ } as const;
62
+
63
+ export const markdownConfigSchema = {
64
+ type: 'object',
65
+ properties: {
66
+ frontMatterKeysToResolve: {
67
+ type: 'array',
68
+ items: { type: 'string' },
69
+ default: ['image', 'links'],
70
+ },
71
+ partialsFolders: {
72
+ type: 'array',
73
+ items: { type: 'string' },
74
+ default: ['_partials'],
75
+ },
76
+ lastUpdatedBlock: {
77
+ type: 'object',
78
+ properties: {
79
+ format: {
80
+ type: 'string',
81
+ enum: ['timeago', 'iso', 'long', 'short'],
82
+ default: 'timeago',
83
+ },
84
+ locale: { type: 'string' },
85
+ ...hideConfigSchema.properties,
86
+ },
87
+ additionalProperties: false,
88
+ default: {},
89
+ },
90
+ toc: {
91
+ type: 'object',
92
+ properties: {
93
+ header: { type: 'string', default: 'On this page' },
94
+ depth: { type: 'integer', default: 3, minimum: 1 },
95
+ ...hideConfigSchema.properties,
96
+ },
97
+ additionalProperties: false,
98
+ default: {},
99
+ },
100
+ editPage: {
101
+ type: 'object',
102
+ properties: {
103
+ baseUrl: { type: 'string' },
104
+ ...hideConfigSchema.properties,
105
+ },
106
+ additionalProperties: false,
107
+ default: {},
108
+ },
109
+ },
110
+ additionalProperties: false,
111
+ default: {},
112
+ } as const;
113
+
114
+ export const amplitudeAnalyticsConfigSchema = {
115
+ type: 'object',
116
+ properties: {
117
+ includeInDevelopment: { type: 'boolean' },
118
+ apiKey: { type: 'string' },
119
+ head: { type: 'boolean' },
120
+ respectDNT: { type: 'boolean' },
121
+ exclude: { type: 'array', items: { type: 'string' } },
122
+ outboundClickEventName: { type: 'string' },
123
+ pageViewEventName: { type: 'string' },
124
+ amplitudeConfig: { type: 'object', additionalProperties: true },
125
+ },
126
+ additionalProperties: false,
127
+ required: ['apiKey'],
128
+ } as const;
129
+
130
+ export const fullstoryAnalyticsConfigSchema = {
131
+ type: 'object',
132
+ properties: {
133
+ includeInDevelopment: { type: 'boolean' },
134
+ orgId: { type: 'string' },
135
+ },
136
+ additionalProperties: false,
137
+ required: ['orgId'],
138
+ } as const;
139
+
140
+ export const heapAnalyticsConfigSchema = {
141
+ type: 'object',
142
+ properties: {
143
+ includeInDevelopment: { type: 'boolean' },
144
+ appId: { type: 'string' },
145
+ },
146
+ additionalProperties: false,
147
+ required: ['appId'],
148
+ } as const;
149
+
150
+ export const rudderstackAnalyticsConfigSchema = {
151
+ type: 'object',
152
+ properties: {
153
+ includeInDevelopment: { type: 'boolean' },
154
+ writeKey: { type: 'string', minLength: 10 },
155
+ trackPage: { type: 'boolean' },
156
+ dataPlaneUrl: { type: 'string' },
157
+ controlPlaneUrl: { type: 'string' },
158
+ sdkUrl: { type: 'string' },
159
+ loadOptions: { type: 'object', additionalProperties: true },
160
+ },
161
+ additionalProperties: false,
162
+ required: ['writeKey'],
163
+ } as const;
164
+
165
+ export const segmentAnalyticsConfigSchema = {
166
+ type: 'object',
167
+ properties: {
168
+ includeInDevelopment: { type: 'boolean' },
169
+ writeKey: { type: 'string', minLength: 10 },
170
+ trackPage: { type: 'boolean' },
171
+ includeTitleInPageCall: { type: 'boolean' },
172
+ host: { type: 'string' },
173
+ },
174
+ additionalProperties: false,
175
+ required: ['writeKey'],
176
+ } as const;
177
+
178
+ export const gtmAnalyticsConfigSchema = {
179
+ type: 'object',
180
+ properties: {
181
+ includeInDevelopment: { type: 'boolean' },
182
+ trackingId: { type: 'string' },
183
+ gtmAuth: { type: 'string' },
184
+ gtmPreview: { type: 'string' },
185
+ defaultDataLayer: {},
186
+ dataLayerName: { type: 'string' },
187
+ enableWebVitalsTracking: { type: 'boolean' },
188
+ selfHostedOrigin: { type: 'string' },
189
+ pageViewEventName: { type: 'string' },
190
+ },
191
+ additionalProperties: false,
192
+ required: ['trackingId'],
193
+ } as const;
194
+
195
+ export const productGoogleAnalyticsConfigSchema = {
196
+ type: 'object',
197
+ properties: {
198
+ includeInDevelopment: { type: 'boolean' },
199
+ trackingId: { type: 'string' },
200
+
201
+ conversionId: { type: 'string' },
202
+ floodlightId: { type: 'string' },
203
+ optimizeId: { type: 'string' },
204
+ exclude: { type: 'array', items: { type: 'string' } },
205
+ },
206
+ additionalProperties: false,
207
+ required: ['trackingId'],
208
+ } as const;
209
+
210
+ export const googleAnalyticsConfigSchema = {
211
+ type: 'object',
212
+ properties: {
213
+ includeInDevelopment: { type: 'boolean' },
214
+ trackingId: { type: 'string' },
215
+
216
+ conversionId: { type: 'string' },
217
+ floodlightId: { type: 'string' },
218
+
219
+ head: { type: 'boolean' },
220
+ respectDNT: { type: 'boolean' },
221
+ exclude: { type: 'array', items: { type: 'string' } },
222
+
223
+ optimizeId: { type: 'string' },
224
+ anonymizeIp: { type: 'boolean' },
225
+ cookieExpires: { type: 'number' },
226
+
227
+ // All enabled tracking configs
228
+ trackers: {
229
+ type: 'object',
230
+ additionalProperties: productGoogleAnalyticsConfigSchema,
231
+ },
232
+ },
233
+ additionalProperties: false,
234
+ required: ['trackingId'],
235
+ } as const;
236
+
237
+ const adobeAnalyticsConfigSchema = {
238
+ type: 'object',
239
+ properties: {
240
+ includeInDevelopment: { type: 'boolean' },
241
+ scriptUrl: { type: 'string' },
242
+ pageViewEventName: { type: 'string' },
243
+ },
244
+ additionalProperties: false,
245
+ required: ['scriptUrl'],
246
+ } as const;
247
+
248
+ const navItemSchema = {
249
+ type: 'object',
250
+ properties: {
251
+ page: { type: 'string' },
252
+ directory: { type: 'string' },
253
+ disconnect: { type: 'boolean', default: false },
254
+ group: { type: 'string' },
255
+ label: { type: 'string' },
256
+ href: { type: 'string' },
257
+ external: { type: 'boolean' },
258
+ labelTranslationKey: { type: 'string' },
259
+ groupTranslationKey: { type: 'string' },
260
+ icon: {
261
+ oneOf: [
262
+ { type: 'string' },
263
+ { type: 'object', properties: { srcSet: { type: 'string' } }, required: ['srcSet'] },
264
+ ],
265
+ },
266
+ separator: { type: 'string' },
267
+ separatorLine: { type: 'boolean' },
268
+ linePosition: {
269
+ type: 'string',
270
+ enum: ['top', 'bottom'],
271
+ default: 'top',
272
+ },
273
+ version: { type: 'string' },
274
+ menuStyle: { type: 'string', enum: ['drilldown'] },
275
+ expanded: { type: 'string', const: 'always' },
276
+ selectFirstItemOnExpand: { type: 'boolean' },
277
+ flatten: { type: 'boolean' },
278
+ linkedSidebars: {
279
+ type: 'array',
280
+ items: { type: 'string' },
281
+ },
282
+ // Allow users to eject the navbar and implement additional levels of nesting
283
+ items: { type: 'array', items: { type: 'object', additionalProperties: true } },
284
+ },
285
+ } as const;
286
+
287
+ const navItemsSchema = {
288
+ type: 'array',
289
+ items: {
290
+ ...navItemSchema,
291
+ properties: {
292
+ ...navItemSchema.properties,
293
+ items: { type: 'array', items: navItemSchema },
294
+ },
295
+ },
296
+ } as const;
297
+
298
+ export const productConfigSchema = {
299
+ type: 'object',
300
+ properties: {
301
+ name: { type: 'string' },
302
+ icon: { type: 'string' },
303
+ folder: { type: 'string' },
304
+ },
305
+ additionalProperties: false,
306
+ required: ['name', 'folder'],
307
+ } as const;
308
+
309
+ const suggestedPageSchema = {
310
+ type: 'object',
311
+ properties: {
312
+ page: { type: 'string' },
313
+ label: { type: 'string' },
314
+ labelTranslationKey: { type: 'string' },
315
+ },
316
+ required: ['page'],
317
+ } as const;
318
+
319
+ export const catalogFilterSchema = {
320
+ type: 'object',
321
+ additionalProperties: false,
322
+ required: ['title', 'property'],
323
+ properties: {
324
+ type: { type: 'string', enum: ['select', 'checkboxes', 'date-range'] },
325
+ title: { type: 'string' },
326
+ titleTranslationKey: { type: 'string' },
327
+ property: { type: 'string' },
328
+ parentFilter: { type: 'string' },
329
+ valuesMapping: { type: 'object', additionalProperties: { type: 'string' } },
330
+ missingCategoryName: { type: 'string' },
331
+ missingCategoryNameTranslationKey: { type: 'string' },
332
+ options: { type: 'array', items: { type: 'string' } },
333
+ },
334
+ } as const;
335
+
336
+ export const scorecardConfigSchema = {
337
+ type: 'object',
338
+ additionalProperties: true,
339
+ required: [],
340
+ properties: {
341
+ ignoreNonCompliant: { type: 'boolean', default: false },
342
+ teamMetadataProperty: {
343
+ type: 'object',
344
+ properties: {
345
+ property: { type: 'string' },
346
+ label: { type: 'string' },
347
+ default: { type: 'string' },
348
+ },
349
+ },
350
+ levels: {
351
+ type: 'array',
352
+ items: {
353
+ type: 'object',
354
+ required: ['name'],
355
+ properties: {
356
+ name: { type: 'string' },
357
+ color: { type: 'string' },
358
+ extends: { type: 'array', items: { type: 'string' } },
359
+ rules: {
360
+ type: 'object',
361
+ additionalProperties: {
362
+ oneOf: [{ type: 'string' }, { type: 'object' }],
363
+ },
364
+ },
365
+ },
366
+ additionalProperties: false,
367
+ },
368
+ },
369
+ targets: {
370
+ type: 'array',
371
+ items: {
372
+ type: 'object',
373
+ required: ['where'],
374
+ properties: {
375
+ minimumLevel: { type: 'string' },
376
+ where: {
377
+ type: 'object',
378
+ required: ['metadata'],
379
+ properties: {
380
+ metadata: { type: 'object', additionalProperties: { type: 'string' } },
381
+ },
382
+ additionalProperties: false,
383
+ },
384
+ },
385
+ additionalProperties: false,
386
+ },
387
+ },
388
+ },
389
+ } as const;
390
+
391
+ export const catalogSchema = {
392
+ type: 'object',
393
+ additionalProperties: true,
394
+ required: ['slug', 'items'],
395
+ properties: {
396
+ slug: { type: 'string' },
397
+ filters: { type: 'array', items: catalogFilterSchema },
398
+ groupByFirstFilter: { type: 'boolean' },
399
+ filterValuesCasing: {
400
+ type: 'string',
401
+ enum: ['sentence', 'original', 'lowercase', 'uppercase'],
402
+ },
403
+ items: navItemsSchema,
404
+ requiredPermission: { type: 'string' },
405
+ separateVersions: { type: 'boolean' },
406
+ title: { type: 'string' },
407
+ titleTranslationKey: { type: 'string' },
408
+ description: { type: 'string' },
409
+ descriptionTranslationKey: { type: 'string' },
410
+ },
411
+ } as const;
412
+
413
+ const catalogsConfigSchema = {
414
+ type: 'object',
415
+ patternProperties: {
416
+ '.*': catalogSchema,
417
+ },
418
+ } as const;
419
+
420
+ export const themeConfigSchema = {
421
+ type: 'object',
422
+ properties: {
423
+ imports: {
424
+ type: 'array',
425
+ items: { type: 'string' },
426
+ default: [],
427
+ },
428
+ logo: logoConfigSchema,
429
+ navbar: {
430
+ type: 'object',
431
+ properties: {
432
+ items: navItemsSchema,
433
+ ...hideConfigSchema.properties,
434
+ },
435
+ additionalProperties: false,
436
+ },
437
+ products: {
438
+ type: 'object',
439
+ additionalProperties: productConfigSchema,
440
+ },
441
+ footer: {
442
+ type: 'object',
443
+ properties: {
444
+ items: navItemsSchema,
445
+ copyrightText: { type: 'string' },
446
+ logo: hideConfigSchema,
447
+ ...hideConfigSchema.properties,
448
+ },
449
+ additionalProperties: false,
450
+ },
451
+ sidebar: {
452
+ type: 'object',
453
+ properties: {
454
+ separatorLine: { type: 'boolean' },
455
+ linePosition: {
456
+ type: 'string',
457
+ enum: ['top', 'bottom'],
458
+ default: 'bottom',
459
+ },
460
+ ...hideConfigSchema.properties,
461
+ },
462
+ additionalProperties: false,
463
+ },
464
+ scripts: {
465
+ type: 'object',
466
+ properties: {
467
+ head: { type: 'array', items: scriptConfigSchema },
468
+ body: { type: 'array', items: scriptConfigSchema },
469
+ },
470
+ additionalProperties: false,
471
+ },
472
+ links: { type: 'array', items: linksConfigSchema },
473
+ feedback: {
474
+ type: 'object',
475
+ properties: {
476
+ hide: {
477
+ type: 'boolean',
478
+ default: false,
479
+ },
480
+ type: {
481
+ type: 'string',
482
+ enum: ['rating', 'sentiment', 'comment', 'reasons', 'mood', 'scale'],
483
+ default: 'sentiment',
484
+ },
485
+ settings: {
486
+ type: 'object',
487
+ properties: {
488
+ label: { type: 'string' },
489
+ submitText: { type: 'string' },
490
+ buttonText: { type: 'string' },
491
+ component: {
492
+ type: 'string',
493
+ enum: ['radio', 'checkbox'],
494
+ default: 'checkbox',
495
+ },
496
+ items: { type: 'array', items: { type: 'string' }, minItems: 1 },
497
+ leftScaleLabel: { type: 'string' },
498
+ rightScaleLabel: { type: 'string' },
499
+ reasons: {
500
+ type: 'object',
501
+ properties: {
502
+ hide: {
503
+ type: 'boolean',
504
+ default: false,
505
+ },
506
+ component: {
507
+ type: 'string',
508
+ enum: ['radio', 'checkbox'],
509
+ default: 'checkbox',
510
+ },
511
+ label: { type: 'string' },
512
+ items: { type: 'array', items: { type: 'string' } },
513
+ },
514
+ additionalProperties: false,
515
+ },
516
+ comment: {
517
+ type: 'object',
518
+ properties: {
519
+ hide: {
520
+ type: 'boolean',
521
+ default: false,
522
+ },
523
+ label: { type: 'string' },
524
+ likeLabel: { type: 'string' },
525
+ dislikeLabel: { type: 'string' },
526
+ satisfiedLabel: { type: 'string' },
527
+ neutralLabel: { type: 'string' },
528
+ dissatisfiedLabel: { type: 'string' },
529
+ },
530
+ additionalProperties: false,
531
+ },
532
+ },
533
+ additionalProperties: false,
534
+ ...hideConfigSchema.properties,
535
+ },
536
+ },
537
+ additionalProperties: false,
538
+ default: {},
539
+ },
540
+ search: {
541
+ type: 'object',
542
+ properties: {
543
+ placement: {
544
+ type: 'string',
545
+ default: 'navbar',
546
+ },
547
+ shortcuts: {
548
+ type: 'array',
549
+ items: { type: 'string' },
550
+ default: ['/'],
551
+ },
552
+ suggestedPages: {
553
+ type: 'array',
554
+ items: suggestedPageSchema,
555
+ },
556
+ ...hideConfigSchema.properties,
557
+ },
558
+ additionalProperties: false,
559
+ default: {},
560
+ },
561
+ colorMode: {
562
+ type: 'object',
563
+ properties: {
564
+ ignoreDetection: { type: 'boolean' },
565
+ modes: {
566
+ type: 'array',
567
+ items: { type: 'string' },
568
+ default: ['light', 'dark'],
569
+ },
570
+ ...hideConfigSchema.properties,
571
+ },
572
+ additionalProperties: false,
573
+ default: {},
574
+ },
575
+ navigation: {
576
+ type: 'object',
577
+ properties: {
578
+ nextButton: {
579
+ type: 'object',
580
+ properties: {
581
+ text: { type: 'string', default: 'Next to {{label}}' },
582
+ ...hideConfigSchema.properties,
583
+ },
584
+ additionalProperties: false,
585
+ default: {},
586
+ },
587
+ previousButton: {
588
+ type: 'object',
589
+ properties: {
590
+ text: { type: 'string', default: 'Back to {{label}}' },
591
+ ...hideConfigSchema.properties,
592
+ },
593
+ additionalProperties: false,
594
+ default: {},
595
+ },
596
+ },
597
+ additionalProperties: false,
598
+ default: {},
599
+ },
600
+ codeSnippet: {
601
+ type: 'object',
602
+ properties: {
603
+ elementFormat: { type: 'string', default: 'icon' },
604
+ copy: {
605
+ type: 'object',
606
+ properties: {
607
+ ...hideConfigSchema.properties,
608
+ },
609
+ additionalProperties: false,
610
+ default: { hide: false },
611
+ },
612
+ report: {
613
+ type: 'object',
614
+ properties: {
615
+ tooltipText: { type: 'string' },
616
+ buttonText: { type: 'string' },
617
+ label: { type: 'string' },
618
+ ...hideConfigSchema.properties,
619
+ },
620
+ additionalProperties: false,
621
+ default: { hide: false },
622
+ },
623
+ expand: {
624
+ type: 'object',
625
+ properties: {
626
+ ...hideConfigSchema.properties,
627
+ },
628
+ additionalProperties: false,
629
+ default: { hide: false },
630
+ },
631
+ collapse: {
632
+ type: 'object',
633
+ properties: {
634
+ ...hideConfigSchema.properties,
635
+ },
636
+ additionalProperties: false,
637
+ default: { hide: false },
638
+ },
639
+ },
640
+ additionalProperties: false,
641
+ default: {},
642
+ },
643
+ markdown: markdownConfigSchema,
644
+ openapi: { type: 'object', additionalProperties: true }, // TODO: put the real schema here @Viacheslav
645
+ graphql: { type: 'object', additionalProperties: true },
646
+ analytics: {
647
+ type: 'object',
648
+ properties: {
649
+ adobe: adobeAnalyticsConfigSchema,
650
+ amplitude: amplitudeAnalyticsConfigSchema,
651
+ fullstory: fullstoryAnalyticsConfigSchema,
652
+ heap: heapAnalyticsConfigSchema,
653
+ rudderstack: rudderstackAnalyticsConfigSchema,
654
+ segment: segmentAnalyticsConfigSchema,
655
+ gtm: gtmAnalyticsConfigSchema,
656
+ ga: googleAnalyticsConfigSchema,
657
+ },
658
+ },
659
+ userMenu: {
660
+ type: 'object',
661
+ properties: {
662
+ items: {
663
+ type: 'array',
664
+ items: {
665
+ type: 'object',
666
+ properties: {
667
+ label: { type: 'string' },
668
+ external: { type: 'boolean' },
669
+ link: { type: 'string' },
670
+ separatorLine: { type: 'boolean' },
671
+ },
672
+ additionalProperties: true,
673
+ },
674
+ default: [],
675
+ },
676
+ ...hideConfigSchema.properties,
677
+ },
678
+ additionalProperties: false,
679
+ default: {},
680
+ },
681
+ versionPicker: {
682
+ type: 'object',
683
+ properties: {
684
+ hide: { type: 'boolean' },
685
+ showForUnversioned: {
686
+ type: 'boolean',
687
+ },
688
+ },
689
+ },
690
+ breadcrumbs: {
691
+ type: 'object',
692
+ properties: {
693
+ hide: { type: 'boolean' },
694
+ prefixItems: {
695
+ type: 'array',
696
+ items: {
697
+ type: 'object',
698
+ properties: {
699
+ label: { type: 'string' },
700
+ labelTranslationKey: { type: 'string' },
701
+ page: { type: 'string' },
702
+ },
703
+ additionalProperties: false,
704
+ default: {},
705
+ },
706
+ },
707
+ },
708
+ additionalProperties: false,
709
+ default: {},
710
+ },
711
+ catalog: catalogsConfigSchema,
712
+ scorecard: scorecardConfigSchema,
713
+ },
714
+ additionalProperties: true,
715
+ default: {},
716
+ } as const;
717
+
718
+ export const productThemeOverrideSchema = {
719
+ type: 'object',
720
+ properties: {
721
+ logo: themeConfigSchema.properties.logo,
722
+ navbar: themeConfigSchema.properties.navbar,
723
+ footer: themeConfigSchema.properties.footer,
724
+ sidebar: themeConfigSchema.properties.sidebar,
725
+ search: themeConfigSchema.properties.search,
726
+ codeSnippet: themeConfigSchema.properties.codeSnippet,
727
+ breadcrumbs: themeConfigSchema.properties.breadcrumbs,
728
+ analytics: {
729
+ type: 'object',
730
+ properties: {
731
+ ga: productGoogleAnalyticsConfigSchema,
732
+ },
733
+ },
734
+ },
735
+ additionalProperties: true,
736
+ default: {},
737
+ } as const;
738
+
739
+ export const productConfigOverrideSchema = {
740
+ type: 'object',
741
+ properties: {
742
+ theme: productThemeOverrideSchema,
743
+ },
744
+ additionalProperties: false,
745
+ } as const;