@redocly/config 0.47.0 → 0.48.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.
Files changed (80) hide show
  1. package/lib/index.d.ts +9 -9
  2. package/lib/index.js +1 -41
  3. package/lib/package.json +3 -0
  4. package/lib/root-config-schema.d.ts +16 -1
  5. package/lib/types/api-functions-types.d.ts +2 -2
  6. package/lib/types/asyncapi-types.d.ts +1 -1
  7. package/lib/types/catalog-entity-types.d.ts +2 -2
  8. package/lib/types/config-types.d.ts +10 -10
  9. package/lib/types/graphql-types.d.ts +1 -1
  10. package/lib/types/index.d.ts +4 -4
  11. package/lib/types/portal-shared-types.d.ts +4 -4
  12. package/lib/types/redoc-types.d.ts +1 -1
  13. package/lib-esm/index.d.ts +9 -9
  14. package/lib-esm/index.js +1 -10
  15. package/lib-esm/root-config-schema.d.ts +16 -1
  16. package/lib-esm/types/api-functions-types.d.ts +2 -2
  17. package/lib-esm/types/asyncapi-types.d.ts +1 -1
  18. package/lib-esm/types/catalog-entity-types.d.ts +2 -2
  19. package/lib-esm/types/config-types.d.ts +10 -10
  20. package/lib-esm/types/graphql-types.d.ts +1 -1
  21. package/lib-esm/types/index.d.ts +4 -4
  22. package/lib-esm/types/portal-shared-types.d.ts +4 -4
  23. package/lib-esm/types/redoc-types.d.ts +1 -1
  24. package/package.json +19 -4
  25. package/lib/asyncapi-config-schema.js +0 -53
  26. package/lib/common.js +0 -103
  27. package/lib/constants/config.js +0 -17
  28. package/lib/constants/entities.js +0 -58
  29. package/lib/constants/enum.js +0 -6
  30. package/lib/constants/shared.js +0 -22
  31. package/lib/default-theme-config-schema.js +0 -57
  32. package/lib/entities-catalog-config-schema.js +0 -186
  33. package/lib/entities-catalog-entity-file-schema.js +0 -283
  34. package/lib/ex-theme-config-schemas.js +0 -687
  35. package/lib/feedback-config-schema.js +0 -88
  36. package/lib/graphql-config-schema.js +0 -157
  37. package/lib/product-override-schema.js +0 -44
  38. package/lib/redoc-config-schema.js +0 -120
  39. package/lib/reference-docs-config-schema.js +0 -518
  40. package/lib/remove-property-recursively.js +0 -28
  41. package/lib/reunite-config-schema.js +0 -103
  42. package/lib/root-config-schema.js +0 -587
  43. package/lib/scorecards-config-schema.js +0 -242
  44. package/lib/types/api-functions-types.js +0 -3
  45. package/lib/types/asyncapi-types.js +0 -3
  46. package/lib/types/catalog-entity-types.js +0 -3
  47. package/lib/types/code-walkthrough-types.js +0 -3
  48. package/lib/types/config-types.js +0 -3
  49. package/lib/types/graphql-types.js +0 -3
  50. package/lib/types/index.js +0 -21
  51. package/lib/types/portal-shared-types.js +0 -18
  52. package/lib/types/redoc-types.js +0 -3
  53. package/lib-esm/asyncapi-config-schema.js +0 -50
  54. package/lib-esm/common.js +0 -100
  55. package/lib-esm/constants/config.js +0 -14
  56. package/lib-esm/constants/entities.js +0 -55
  57. package/lib-esm/constants/enum.js +0 -2
  58. package/lib-esm/constants/shared.js +0 -19
  59. package/lib-esm/default-theme-config-schema.js +0 -54
  60. package/lib-esm/entities-catalog-config-schema.js +0 -183
  61. package/lib-esm/entities-catalog-entity-file-schema.js +0 -280
  62. package/lib-esm/ex-theme-config-schemas.js +0 -684
  63. package/lib-esm/feedback-config-schema.js +0 -85
  64. package/lib-esm/graphql-config-schema.js +0 -154
  65. package/lib-esm/product-override-schema.js +0 -41
  66. package/lib-esm/redoc-config-schema.js +0 -117
  67. package/lib-esm/reference-docs-config-schema.js +0 -515
  68. package/lib-esm/remove-property-recursively.js +0 -25
  69. package/lib-esm/reunite-config-schema.js +0 -100
  70. package/lib-esm/root-config-schema.js +0 -584
  71. package/lib-esm/scorecards-config-schema.js +0 -239
  72. package/lib-esm/types/api-functions-types.js +0 -2
  73. package/lib-esm/types/asyncapi-types.js +0 -2
  74. package/lib-esm/types/catalog-entity-types.js +0 -2
  75. package/lib-esm/types/code-walkthrough-types.js +0 -2
  76. package/lib-esm/types/config-types.js +0 -2
  77. package/lib-esm/types/graphql-types.js +0 -2
  78. package/lib-esm/types/index.js +0 -5
  79. package/lib-esm/types/portal-shared-types.js +0 -2
  80. package/lib-esm/types/redoc-types.js +0 -2
@@ -1,687 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scorecardConfigSchema = exports.catalogsConfigSchema = exports.catalogSchema = exports.catalogFilterSchema = exports.breadcrumbsConfigSchema = exports.versionPickerConfigSchema = exports.userMenuConfigSchema = exports.analyticsConfigSchema = exports.googleAnalyticsConfigSchema = exports.productGoogleAnalyticsConfigSchema = exports.gtmAnalyticsConfigSchema = exports.segmentAnalyticsConfigSchema = exports.rudderstackAnalyticsConfigSchema = exports.heapAnalyticsConfigSchema = exports.fullstoryAnalyticsConfigSchema = exports.amplitudeAnalyticsConfigSchema = exports.asyncapiConfigSchema = exports.openapiConfigSchema = exports.markdownConfigSchema = exports.codeSnippetConfigSchema = exports.navigationConfigSchema = exports.paletteConfigSchema = exports.colorModeConfigSchema = exports.aiAssistantSchema = exports.searchConfigSchema = exports.linksConfigSchema = exports.scriptsConfigSchema = exports.sidebarConfigSchema = exports.footerConfigSchema = exports.productsConfigSchema = exports.navbarConfigSchema = exports.logoConfigSchema = exports.searchFiltersConfigSchema = exports.searchFacetsConfigSchema = exports.aiSearchConfigSchema = exports.productConfigSchema = exports.navItemsSchema = void 0;
4
- const redoc_config_schema_1 = require("./redoc-config-schema");
5
- const reference_docs_config_schema_1 = require("./reference-docs-config-schema");
6
- const common_1 = require("./common");
7
- const config_1 = require("./constants/config");
8
- const hideConfigSchema = {
9
- type: 'object',
10
- properties: {
11
- hide: { type: 'boolean' },
12
- },
13
- additionalProperties: false,
14
- };
15
- const scriptConfigSchema = {
16
- type: 'object',
17
- properties: {
18
- src: { type: 'string' },
19
- async: { type: 'boolean' },
20
- crossorigin: { type: 'string' },
21
- defer: { type: 'boolean' },
22
- fetchpriority: { type: 'string' },
23
- integrity: { type: 'string' },
24
- module: { type: 'boolean' },
25
- nomodule: { type: 'boolean' },
26
- nonce: { type: 'string' },
27
- referrerpolicy: { type: 'string' },
28
- type: { type: 'string' },
29
- },
30
- required: ['src'],
31
- additionalProperties: true,
32
- };
33
- const navItemSchema = {
34
- type: 'object',
35
- properties: {
36
- page: { type: 'string' },
37
- directory: { type: 'string' },
38
- disconnect: { type: 'boolean', default: false },
39
- group: { type: 'string' },
40
- label: { type: 'string' },
41
- href: { type: 'string' },
42
- external: { type: 'boolean' },
43
- labelTranslationKey: { type: 'string' },
44
- groupTranslationKey: { type: 'string' },
45
- icon: {
46
- oneOf: [
47
- { type: 'string' },
48
- { type: 'object', properties: { srcSet: { type: 'string' } }, required: ['srcSet'] },
49
- ],
50
- },
51
- separator: { type: 'string' },
52
- separatorLine: { type: 'boolean' },
53
- linePosition: {
54
- type: 'string',
55
- enum: ['top', 'bottom'],
56
- default: 'top',
57
- },
58
- version: { type: 'string' },
59
- menuStyle: { type: 'string', enum: ['drilldown'] },
60
- expanded: { type: 'string', const: 'always' },
61
- selectFirstItemOnExpand: { type: 'boolean' },
62
- flatten: { type: 'boolean' },
63
- linkedSidebars: {
64
- type: 'array',
65
- items: { type: 'string' },
66
- },
67
- // Allow users to eject the navbar and implement additional levels of nesting
68
- items: { type: 'array', items: { type: 'object', additionalProperties: true } },
69
- rbac: {
70
- type: 'object',
71
- additionalProperties: { type: 'string' },
72
- },
73
- additionalProps: { type: 'object', additionalProperties: true },
74
- },
75
- };
76
- exports.navItemsSchema = {
77
- type: 'array',
78
- items: Object.assign(Object.assign({}, navItemSchema), { properties: Object.assign(Object.assign({}, navItemSchema.properties), { items: { type: 'array', items: navItemSchema } }) }),
79
- };
80
- exports.productConfigSchema = {
81
- type: 'object',
82
- properties: {
83
- name: { type: 'string' },
84
- icon: { type: 'string' },
85
- folder: { type: 'string' },
86
- },
87
- additionalProperties: false,
88
- required: ['name', 'folder'],
89
- };
90
- /**
91
- * @deprecated Use `aiAssistant` configuration instead of `search.ai`
92
- */
93
- exports.aiSearchConfigSchema = {
94
- type: 'object',
95
- properties: {
96
- hide: {
97
- type: 'boolean',
98
- default: false,
99
- },
100
- suggestions: {
101
- default: [],
102
- type: 'array',
103
- items: {
104
- type: 'string',
105
- },
106
- },
107
- prompt: {
108
- type: 'string',
109
- },
110
- },
111
- additionalProperties: false,
112
- };
113
- exports.searchFacetsConfigSchema = {
114
- type: 'array',
115
- items: {
116
- type: 'object',
117
- required: ['name', 'field', 'type'],
118
- properties: {
119
- name: { type: 'string' },
120
- field: { type: 'string' },
121
- type: {
122
- type: 'string',
123
- enum: ['multi-select', 'select', 'tags'],
124
- },
125
- },
126
- additionalProperties: false,
127
- },
128
- };
129
- exports.searchFiltersConfigSchema = {
130
- type: 'object',
131
- properties: Object.assign({ facets: exports.searchFacetsConfigSchema }, hideConfigSchema.properties),
132
- additionalProperties: false,
133
- };
134
- const searchSuggestedPageSchema = {
135
- type: 'object',
136
- properties: {
137
- page: { type: 'string' },
138
- label: { type: 'string' },
139
- labelTranslationKey: { type: 'string' },
140
- },
141
- required: ['page'],
142
- };
143
- exports.logoConfigSchema = {
144
- type: 'object',
145
- properties: {
146
- image: { type: 'string' },
147
- srcSet: { type: 'string' },
148
- altText: { type: 'string' },
149
- link: { type: 'string' },
150
- favicon: { type: 'string' },
151
- },
152
- additionalProperties: false,
153
- };
154
- exports.navbarConfigSchema = {
155
- type: 'object',
156
- properties: Object.assign({ items: exports.navItemsSchema }, hideConfigSchema.properties),
157
- additionalProperties: false,
158
- };
159
- exports.productsConfigSchema = {
160
- type: 'object',
161
- additionalProperties: exports.productConfigSchema,
162
- };
163
- exports.footerConfigSchema = {
164
- type: 'object',
165
- properties: Object.assign({ items: exports.navItemsSchema, copyrightText: { type: 'string' }, logo: hideConfigSchema }, hideConfigSchema.properties),
166
- additionalProperties: false,
167
- };
168
- exports.sidebarConfigSchema = {
169
- type: 'object',
170
- properties: Object.assign({ separatorLine: { type: 'boolean' }, linePosition: {
171
- type: 'string',
172
- enum: ['top', 'bottom'],
173
- default: 'bottom',
174
- } }, hideConfigSchema.properties),
175
- additionalProperties: false,
176
- };
177
- exports.scriptsConfigSchema = {
178
- type: 'object',
179
- properties: {
180
- head: { type: 'array', items: scriptConfigSchema },
181
- body: { type: 'array', items: scriptConfigSchema },
182
- },
183
- additionalProperties: false,
184
- };
185
- exports.linksConfigSchema = {
186
- type: 'array',
187
- items: {
188
- type: 'object',
189
- properties: {
190
- href: { type: 'string' },
191
- as: { type: 'string' },
192
- crossorigin: { type: 'string' },
193
- fetchpriority: { type: 'string' },
194
- hreflang: { type: 'string' },
195
- imagesizes: { type: 'string' },
196
- imagesrcset: { type: 'string' },
197
- integrity: { type: 'string' },
198
- media: { type: 'string' },
199
- prefetch: { type: 'string' },
200
- referrerpolicy: { type: 'string' },
201
- rel: { type: 'string' },
202
- sizes: { type: 'string' },
203
- title: { type: 'string' },
204
- type: { type: 'string' },
205
- },
206
- required: ['href'],
207
- additionalProperties: true,
208
- },
209
- };
210
- exports.searchConfigSchema = {
211
- type: 'object',
212
- properties: Object.assign({ engine: {
213
- type: 'string',
214
- enum: ['flexsearch', 'typesense'],
215
- default: 'flexsearch',
216
- }, ai: exports.aiSearchConfigSchema, filters: exports.searchFiltersConfigSchema, placement: {
217
- type: 'string',
218
- default: 'navbar',
219
- }, shortcuts: {
220
- type: 'array',
221
- items: { type: 'string' },
222
- default: ['⌘+K,ctrl+K'],
223
- }, suggestedPages: {
224
- type: 'array',
225
- items: searchSuggestedPageSchema,
226
- } }, hideConfigSchema.properties),
227
- additionalProperties: false,
228
- };
229
- exports.aiAssistantSchema = {
230
- type: 'object',
231
- properties: {
232
- hide: {
233
- type: 'boolean',
234
- // set default to false when removing search.ai backwards compatibility
235
- },
236
- suggestions: {
237
- default: [],
238
- type: 'array',
239
- items: {
240
- type: 'string',
241
- },
242
- },
243
- prompt: {
244
- type: 'string',
245
- },
246
- trigger: {
247
- type: 'object',
248
- properties: {
249
- hide: {
250
- type: 'boolean',
251
- default: false,
252
- },
253
- inputType: {
254
- type: 'string',
255
- enum: ['button', 'icon'],
256
- default: 'button',
257
- },
258
- inputIcon: {
259
- type: 'string',
260
- enum: ['chat', 'sparkles', 'redocly'],
261
- default: 'sparkles',
262
- },
263
- },
264
- additionalProperties: false,
265
- },
266
- },
267
- additionalProperties: false,
268
- };
269
- exports.colorModeConfigSchema = {
270
- type: 'object',
271
- properties: Object.assign({ ignoreDetection: { type: 'boolean' }, modes: {
272
- type: 'array',
273
- items: { type: 'string' },
274
- default: ['light', 'dark'],
275
- } }, hideConfigSchema.properties),
276
- additionalProperties: false,
277
- };
278
- exports.paletteConfigSchema = {
279
- type: 'string',
280
- enum: ['slate', 'pink', 'coral', 'amber', 'jade', 'cyan', 'ocean', 'indigo', 'iris'],
281
- };
282
- const navigationActionsConfigSchema = {
283
- type: 'object',
284
- properties: Object.assign(Object.assign({}, hideConfigSchema.properties), { items: {
285
- type: 'array',
286
- items: {
287
- type: 'string',
288
- enum: ['copy', 'view', 'chatgpt', 'claude', 'docs-mcp-cursor', 'docs-mcp-vscode'],
289
- },
290
- default: ['copy', 'view', 'chatgpt', 'claude', 'docs-mcp-cursor', 'docs-mcp-vscode'],
291
- } }),
292
- additionalProperties: false,
293
- };
294
- exports.navigationConfigSchema = {
295
- type: 'object',
296
- properties: {
297
- nextButton: {
298
- type: 'object',
299
- properties: Object.assign({ text: { type: 'string' } }, hideConfigSchema.properties),
300
- additionalProperties: false,
301
- default: {},
302
- },
303
- previousButton: {
304
- type: 'object',
305
- properties: Object.assign({ text: { type: 'string' } }, hideConfigSchema.properties),
306
- additionalProperties: false,
307
- default: {},
308
- },
309
- actions: navigationActionsConfigSchema,
310
- },
311
- additionalProperties: false,
312
- };
313
- exports.codeSnippetConfigSchema = {
314
- type: 'object',
315
- properties: {
316
- elementFormat: { type: 'string', default: 'icon' },
317
- copy: {
318
- type: 'object',
319
- properties: Object.assign({}, hideConfigSchema.properties),
320
- additionalProperties: false,
321
- default: { hide: false },
322
- },
323
- report: {
324
- type: 'object',
325
- properties: Object.assign({ tooltipText: { type: 'string' }, buttonText: { type: 'string' }, label: { type: 'string' } }, hideConfigSchema.properties),
326
- additionalProperties: false,
327
- default: { hide: false },
328
- },
329
- expand: {
330
- type: 'object',
331
- properties: Object.assign({}, hideConfigSchema.properties),
332
- additionalProperties: false,
333
- default: { hide: false },
334
- },
335
- collapse: {
336
- type: 'object',
337
- properties: Object.assign({}, hideConfigSchema.properties),
338
- additionalProperties: false,
339
- default: { hide: false },
340
- },
341
- },
342
- additionalProperties: false,
343
- };
344
- exports.markdownConfigSchema = {
345
- type: 'object',
346
- properties: {
347
- frontMatterKeysToResolve: {
348
- type: 'array',
349
- items: { type: 'string' },
350
- default: ['image', 'links'],
351
- },
352
- partialsFolders: {
353
- type: 'array',
354
- items: { type: 'string' },
355
- default: ['**/_partials/**'],
356
- },
357
- lastUpdatedBlock: {
358
- type: 'object',
359
- properties: Object.assign({ format: {
360
- type: 'string',
361
- enum: ['timeago', 'iso', 'long', 'short'],
362
- default: 'timeago',
363
- }, locale: { type: 'string' } }, hideConfigSchema.properties),
364
- additionalProperties: false,
365
- default: {},
366
- },
367
- toc: {
368
- type: 'object',
369
- properties: Object.assign({ header: { type: 'string', default: 'On this page' }, depth: { type: 'integer', default: 3, minimum: 1 } }, hideConfigSchema.properties),
370
- additionalProperties: false,
371
- default: {},
372
- },
373
- editPage: {
374
- type: 'object',
375
- properties: Object.assign({ baseUrl: { type: 'string' } }, hideConfigSchema.properties),
376
- additionalProperties: false,
377
- default: {},
378
- },
379
- },
380
- additionalProperties: false,
381
- default: {},
382
- };
383
- exports.openapiConfigSchema = Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema), { properties: Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema.properties), reference_docs_config_schema_1.deprecatedRefDocsSchema.properties) });
384
- exports.asyncapiConfigSchema = Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema), { properties: Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema.properties), reference_docs_config_schema_1.deprecatedRefDocsSchema.properties) });
385
- const adobeAnalyticsConfigSchema = {
386
- type: 'object',
387
- properties: {
388
- includeInDevelopment: { type: 'boolean' },
389
- scriptUrl: { type: 'string' },
390
- pageViewEventName: { type: 'string' },
391
- },
392
- additionalProperties: false,
393
- required: ['scriptUrl'],
394
- };
395
- exports.amplitudeAnalyticsConfigSchema = {
396
- type: 'object',
397
- properties: {
398
- includeInDevelopment: { type: 'boolean' },
399
- apiKey: { type: 'string' },
400
- head: { type: 'boolean' },
401
- respectDNT: { type: 'boolean' },
402
- exclude: { type: 'array', items: { type: 'string' } },
403
- outboundClickEventName: { type: 'string' },
404
- pageViewEventName: { type: 'string' },
405
- amplitudeConfig: { type: 'object', additionalProperties: true },
406
- },
407
- additionalProperties: false,
408
- required: ['apiKey'],
409
- };
410
- exports.fullstoryAnalyticsConfigSchema = {
411
- type: 'object',
412
- properties: {
413
- includeInDevelopment: { type: 'boolean' },
414
- orgId: { type: 'string' },
415
- },
416
- additionalProperties: false,
417
- required: ['orgId'],
418
- };
419
- exports.heapAnalyticsConfigSchema = {
420
- type: 'object',
421
- properties: {
422
- includeInDevelopment: { type: 'boolean' },
423
- appId: { type: 'string' },
424
- },
425
- additionalProperties: false,
426
- required: ['appId'],
427
- };
428
- exports.rudderstackAnalyticsConfigSchema = {
429
- type: 'object',
430
- properties: {
431
- includeInDevelopment: { type: 'boolean' },
432
- writeKey: { type: 'string', minLength: 10 },
433
- trackPage: { type: 'boolean' },
434
- dataPlaneUrl: { type: 'string' },
435
- controlPlaneUrl: { type: 'string' },
436
- sdkUrl: { type: 'string' },
437
- loadOptions: { type: 'object', additionalProperties: true },
438
- },
439
- additionalProperties: false,
440
- required: ['writeKey'],
441
- };
442
- exports.segmentAnalyticsConfigSchema = {
443
- type: 'object',
444
- properties: {
445
- includeInDevelopment: { type: 'boolean' },
446
- writeKey: { type: 'string', minLength: 10 },
447
- trackPage: { type: 'boolean' },
448
- includeTitleInPageCall: { type: 'boolean' },
449
- host: { type: 'string' },
450
- },
451
- additionalProperties: false,
452
- required: ['writeKey'],
453
- };
454
- exports.gtmAnalyticsConfigSchema = {
455
- type: 'object',
456
- properties: {
457
- includeInDevelopment: { type: 'boolean' },
458
- trackingId: { type: 'string' },
459
- gtmAuth: { type: 'string' },
460
- gtmPreview: { type: 'string' },
461
- defaultDataLayer: {},
462
- dataLayerName: { type: 'string' },
463
- enableWebVitalsTracking: { type: 'boolean' },
464
- selfHostedOrigin: { type: 'string' },
465
- pageViewEventName: { type: 'string' },
466
- },
467
- additionalProperties: false,
468
- required: ['trackingId'],
469
- };
470
- exports.productGoogleAnalyticsConfigSchema = {
471
- type: 'object',
472
- properties: {
473
- includeInDevelopment: { type: 'boolean' },
474
- trackingId: { type: 'string' },
475
- conversionId: { type: 'string' },
476
- floodlightId: { type: 'string' },
477
- optimizeId: { type: 'string' },
478
- exclude: { type: 'array', items: { type: 'string' } },
479
- },
480
- additionalProperties: false,
481
- required: ['trackingId'],
482
- };
483
- exports.googleAnalyticsConfigSchema = {
484
- type: 'object',
485
- properties: {
486
- includeInDevelopment: { type: 'boolean' },
487
- trackingId: { type: 'string' },
488
- conversionId: { type: 'string' },
489
- floodlightId: { type: 'string' },
490
- head: { type: 'boolean' },
491
- respectDNT: { type: 'boolean' },
492
- exclude: { type: 'array', items: { type: 'string' } },
493
- optimizeId: { type: 'string' },
494
- anonymizeIp: { type: 'boolean' },
495
- cookieExpires: { type: 'number' },
496
- // All enabled tracking configs
497
- trackers: {
498
- type: 'object',
499
- additionalProperties: exports.productGoogleAnalyticsConfigSchema,
500
- },
501
- },
502
- additionalProperties: false,
503
- required: ['trackingId'],
504
- };
505
- exports.analyticsConfigSchema = {
506
- type: 'object',
507
- properties: {
508
- adobe: adobeAnalyticsConfigSchema,
509
- amplitude: exports.amplitudeAnalyticsConfigSchema,
510
- fullstory: exports.fullstoryAnalyticsConfigSchema,
511
- heap: exports.heapAnalyticsConfigSchema,
512
- rudderstack: exports.rudderstackAnalyticsConfigSchema,
513
- segment: exports.segmentAnalyticsConfigSchema,
514
- gtm: exports.gtmAnalyticsConfigSchema,
515
- ga: exports.googleAnalyticsConfigSchema,
516
- },
517
- };
518
- exports.userMenuConfigSchema = {
519
- type: 'object',
520
- properties: Object.assign({ items: {
521
- type: 'array',
522
- items: {
523
- type: 'object',
524
- properties: {
525
- label: { type: 'string' },
526
- external: { type: 'boolean' },
527
- link: { type: 'string' },
528
- separatorLine: { type: 'boolean' },
529
- },
530
- additionalProperties: true,
531
- },
532
- default: [],
533
- }, hideLoginButton: { type: 'boolean' } }, hideConfigSchema.properties),
534
- additionalProperties: false,
535
- };
536
- exports.versionPickerConfigSchema = {
537
- type: 'object',
538
- properties: {
539
- hide: { type: 'boolean' },
540
- showForUnversioned: {
541
- type: 'boolean',
542
- },
543
- },
544
- };
545
- exports.breadcrumbsConfigSchema = {
546
- type: 'object',
547
- properties: {
548
- hide: { type: 'boolean' },
549
- prefixItems: {
550
- type: 'array',
551
- items: {
552
- type: 'object',
553
- properties: {
554
- label: { type: 'string' },
555
- labelTranslationKey: { type: 'string' },
556
- page: { type: 'string' },
557
- icon: { type: 'string' },
558
- },
559
- additionalProperties: false,
560
- default: {},
561
- },
562
- },
563
- },
564
- additionalProperties: false,
565
- };
566
- exports.catalogFilterSchema = {
567
- type: 'object',
568
- additionalProperties: false,
569
- required: ['title', 'property'],
570
- properties: {
571
- type: {
572
- type: 'string',
573
- enum: ['select', 'checkboxes', 'date-range'],
574
- default: 'checkboxes',
575
- },
576
- title: { type: 'string' },
577
- titleTranslationKey: { type: 'string' },
578
- property: { type: 'string' },
579
- parentFilter: { type: 'string' },
580
- valuesMapping: { type: 'object', additionalProperties: { type: 'string' } },
581
- missingCategoryName: { type: 'string' },
582
- missingCategoryNameTranslationKey: { type: 'string' },
583
- options: { type: 'array', items: { type: 'string' } },
584
- },
585
- };
586
- exports.catalogSchema = {
587
- type: 'object',
588
- additionalProperties: true,
589
- required: ['slug', 'items'],
590
- properties: {
591
- show: { type: 'boolean' },
592
- slug: { type: 'string' },
593
- filters: { type: 'array', items: exports.catalogFilterSchema },
594
- groupByFirstFilter: { type: 'boolean' },
595
- filterValuesCasing: {
596
- type: 'string',
597
- enum: ['sentence', 'original', 'lowercase', 'uppercase'],
598
- },
599
- items: exports.navItemsSchema,
600
- requiredPermission: { type: 'string' },
601
- separateVersions: { type: 'boolean' },
602
- title: { type: 'string' },
603
- titleTranslationKey: { type: 'string' },
604
- description: { type: 'string' },
605
- descriptionTranslationKey: { type: 'string' },
606
- },
607
- };
608
- exports.catalogsConfigSchema = {
609
- type: 'object',
610
- patternProperties: {
611
- '.*': exports.catalogSchema,
612
- },
613
- };
614
- exports.scorecardConfigSchema = {
615
- nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.ScorecardClassic,
616
- description: 'Add and create sets of rules and test your API description files against them. With these rules you can maintain quality across your existing APIs and ensure that newly-added or updated APIs match your criteria. An API scorecard can include multiple sets of rules, corresponding to different quality levels.',
617
- documentationLink: 'https://redocly.com/docs/realm/config/scorecard-classic',
618
- type: 'object',
619
- additionalProperties: true,
620
- required: [],
621
- properties: {
622
- /**
623
- * @deprecated Should use `reunite.ignoreLint` instead
624
- */
625
- ignoreNonCompliant: { type: 'boolean', default: false },
626
- teamMetadataProperty: {
627
- nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.ScorecardClassicTeamMetadataProperty,
628
- description: 'Provide custom team label and team metadata property.',
629
- documentationLink: 'https://redocly.com/docs/realm/config/scorecard-classic#team-metadata-object',
630
- type: 'object',
631
- properties: {
632
- property: { type: 'string' },
633
- label: { type: 'string' },
634
- default: { type: 'string' },
635
- },
636
- },
637
- levels: {
638
- nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.ScorecardClassicLevelList,
639
- description: 'List of levels to score against.',
640
- type: 'array',
641
- items: {
642
- nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.ScorecardClassicLevel,
643
- documentationLink: 'https://redocly.com/docs/realm/config/scorecard-classic#level-object',
644
- type: 'object',
645
- required: ['name'],
646
- properties: Object.assign({ name: { type: 'string' }, color: { type: 'string' } }, common_1.configGovernanceSchema),
647
- additionalProperties: false,
648
- },
649
- },
650
- targets: {
651
- nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.ScorecardClassicTargetList,
652
- description: 'Provide custom `minimumLevel` for specific targets.',
653
- type: 'array',
654
- items: {
655
- nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.ScorecardClassicTarget,
656
- type: 'object',
657
- required: ['where'],
658
- properties: {
659
- minimumLevel: { type: 'string' },
660
- rules: { type: 'object', additionalProperties: true },
661
- where: {
662
- nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.ScorecardClassicTargetWhere,
663
- description: 'Specify which API descriptions to apply the `minimumLevel` to based on the metadata.',
664
- documentationLink: 'https://redocly.com/docs/realm/config/scorecard-classic#where-object',
665
- type: 'object',
666
- required: ['metadata'],
667
- properties: {
668
- metadata: {
669
- nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.ScorecardClassicTargetWhereMetadata,
670
- type: 'object',
671
- additionalProperties: { type: 'string' },
672
- },
673
- },
674
- additionalProperties: false,
675
- },
676
- },
677
- additionalProperties: false,
678
- },
679
- },
680
- ignore: {
681
- type: 'array',
682
- items: { type: 'string' },
683
- },
684
- fromProjectUrl: { type: 'string', format: 'uri' },
685
- },
686
- };
687
- //# sourceMappingURL=ex-theme-config-schemas.js.map