@redocly/config 0.26.1 → 0.26.3-rc.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 (41) hide show
  1. package/lib/common.d.ts +160 -0
  2. package/lib/common.js +40 -0
  3. package/lib/default-theme-config-schema.d.ts +657 -4260
  4. package/lib/default-theme-config-schema.js +3 -2
  5. package/lib/entities-catalog-config-schema.d.ts +718 -0
  6. package/lib/entities-catalog-config-schema.js +84 -0
  7. package/lib/ex-theme-config-schemas.d.ts +147 -12
  8. package/lib/ex-theme-config-schemas.js +4 -12
  9. package/lib/graphql-config-schema.d.ts +9 -0
  10. package/lib/graphql-config-schema.js +9 -0
  11. package/lib/product-override-schema.d.ts +168 -24
  12. package/lib/root-config-schema.d.ts +30277 -25599
  13. package/lib/root-config-schema.js +12 -73
  14. package/lib/types/catalog-entity-types.d.ts +29 -0
  15. package/lib/types/catalog-entity-types.js +3 -0
  16. package/lib/types/code-walkthrough-types.d.ts +0 -1
  17. package/lib/types/config-types.d.ts +2 -0
  18. package/lib/types/index.d.ts +1 -0
  19. package/lib/types/index.js +1 -0
  20. package/lib/types/portal-shared-types.d.ts +12 -1
  21. package/lib-esm/common.d.ts +160 -0
  22. package/lib-esm/common.js +37 -0
  23. package/lib-esm/default-theme-config-schema.d.ts +657 -4260
  24. package/lib-esm/default-theme-config-schema.js +2 -1
  25. package/lib-esm/entities-catalog-config-schema.d.ts +718 -0
  26. package/lib-esm/entities-catalog-config-schema.js +81 -0
  27. package/lib-esm/ex-theme-config-schemas.d.ts +147 -12
  28. package/lib-esm/ex-theme-config-schemas.js +4 -12
  29. package/lib-esm/graphql-config-schema.d.ts +9 -0
  30. package/lib-esm/graphql-config-schema.js +9 -0
  31. package/lib-esm/product-override-schema.d.ts +168 -24
  32. package/lib-esm/root-config-schema.d.ts +37428 -32290
  33. package/lib-esm/root-config-schema.js +12 -73
  34. package/lib-esm/types/catalog-entity-types.d.ts +29 -0
  35. package/lib-esm/types/catalog-entity-types.js +2 -0
  36. package/lib-esm/types/code-walkthrough-types.d.ts +0 -1
  37. package/lib-esm/types/config-types.d.ts +2 -0
  38. package/lib-esm/types/index.d.ts +1 -0
  39. package/lib-esm/types/index.js +1 -0
  40. package/lib-esm/types/portal-shared-types.d.ts +12 -1
  41. package/package.json +2 -2
@@ -8,6 +8,8 @@ const graphql_config_schema_1 = require("./graphql-config-schema");
8
8
  const remove_property_recursively_1 = require("./remove-property-recursively");
9
9
  const reunite_config_schema_1 = require("./reunite-config-schema");
10
10
  const ex_theme_config_schemas_1 = require("./ex-theme-config-schemas");
11
+ const entities_catalog_config_schema_1 = require("./entities-catalog-config-schema");
12
+ const common_1 = require("./common");
11
13
  exports.oidcIssuerMetadataSchema = {
12
14
  type: 'object',
13
15
  properties: {
@@ -95,20 +97,9 @@ exports.redirectsConfigSchema = {
95
97
  additionalProperties: exports.redirectConfigSchema,
96
98
  default: {},
97
99
  };
98
- const rulesSchema = {
99
- type: 'object',
100
- additionalProperties: {
101
- oneOf: [{ type: 'string' }, { type: 'object' }],
102
- },
103
- };
104
100
  exports.apiConfigSchema = {
105
101
  type: 'object',
106
- properties: {
107
- root: { type: 'string' },
108
- output: { type: 'string', pattern: '(.ya?ml|.json)$' },
109
- rbac: { type: 'object', additionalProperties: true },
110
- openapi: ex_theme_config_schemas_1.openapiConfigSchema,
111
- graphql: graphql_config_schema_1.graphqlConfigSchema,
102
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({ root: { type: 'string' }, output: { type: 'string', pattern: '(.ya?ml|.json)$' }, rbac: { type: 'object', additionalProperties: true }, openapi: ex_theme_config_schemas_1.openapiConfigSchema, graphql: graphql_config_schema_1.graphqlConfigSchema,
112
103
  /**
113
104
  * @deprecated left for backwards compatibility
114
105
  */
@@ -119,14 +110,7 @@ exports.apiConfigSchema = {
119
110
  graphql: graphql_config_schema_1.graphqlConfigSchema,
120
111
  },
121
112
  additionalProperties: false,
122
- },
123
- title: { type: 'string' },
124
- metadata: { type: 'object', additionalProperties: true },
125
- rules: rulesSchema,
126
- decorators: { type: 'object', additionalProperties: true },
127
- preprocessors: { type: 'object', additionalProperties: true },
128
- extends: { type: 'array', items: { type: 'string' } },
129
- },
113
+ }, title: { type: 'string' }, metadata: { type: 'object', additionalProperties: true } }, common_1.ruleSchemas), common_1.preprocessorSchemas), common_1.decoratorsSchemas), { extends: { type: 'array', items: { type: 'string' } } }),
130
114
  required: ['root'],
131
115
  };
132
116
  const metadataConfigSchema = {
@@ -394,28 +378,20 @@ const responseHeaderSchema = {
394
378
  };
395
379
  exports.redoclyConfigSchema = {
396
380
  type: 'object',
397
- properties: {
381
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({
398
382
  /**
399
383
  * @deprecated Should use `plugins` instead
400
384
  */
401
385
  imports: {
402
386
  type: 'array',
403
387
  items: { type: 'string' },
404
- },
405
- licenseKey: { type: 'string' },
406
- redirects: exports.redirectsConfigSchema,
407
- seo: exports.seoConfigSchema,
408
- rbac: exports.rbacConfigSchema,
409
- apiFunctions: exports.apiFunctionsConfigSchema,
410
- requiresLogin: { type: 'boolean' },
411
- responseHeaders: {
388
+ }, licenseKey: { type: 'string' }, redirects: exports.redirectsConfigSchema, seo: exports.seoConfigSchema, rbac: exports.rbacConfigSchema, apiFunctions: exports.apiFunctionsConfigSchema, requiresLogin: { type: 'boolean' }, responseHeaders: {
412
389
  type: 'object',
413
390
  additionalProperties: {
414
391
  type: 'array',
415
392
  items: responseHeaderSchema,
416
393
  },
417
- },
418
- mockServer: {
394
+ }, mockServer: {
419
395
  type: 'object',
420
396
  properties: {
421
397
  off: { type: 'boolean', default: false },
@@ -424,57 +400,20 @@ exports.redoclyConfigSchema = {
424
400
  errorIfForcedExampleNotFound: { type: 'boolean', default: false },
425
401
  description: { type: 'string' },
426
402
  },
427
- },
428
- apis: {
403
+ }, apis: {
429
404
  type: 'object',
430
405
  additionalProperties: exports.apiConfigSchema,
431
- },
432
- extends: { type: 'array', items: { type: 'string' } },
433
- rules: rulesSchema,
434
- decorators: { type: 'object', additionalProperties: true },
435
- preprocessors: { type: 'object', additionalProperties: true },
436
- ssoDirect: exports.ssoDirectConfigSchema,
437
- sso: exports.ssoConfigSchema,
438
- residency: { type: 'string' },
439
- developerOnboarding: devOnboardingConfigSchema,
440
- removeAttribution: { type: 'boolean' },
441
- i18n: exports.l10nConfigSchema, // deprecated
442
- l10n: exports.l10nConfigSchema,
443
- metadata: metadataConfigSchema,
444
- metadataGlobs: metadataGlobsConfigSchema,
445
- ignore: { type: 'array', items: { type: 'string' } },
406
+ }, extends: { type: 'array', items: { type: 'string' } } }, common_1.ruleSchemas), common_1.decoratorsSchemas), common_1.preprocessorSchemas), { ssoDirect: exports.ssoDirectConfigSchema, sso: exports.ssoConfigSchema, residency: { type: 'string' }, developerOnboarding: devOnboardingConfigSchema, removeAttribution: { type: 'boolean' }, i18n: exports.l10nConfigSchema, l10n: exports.l10nConfigSchema, metadata: metadataConfigSchema, metadataGlobs: metadataGlobsConfigSchema, ignore: { type: 'array', items: { type: 'string' } },
446
407
  /**
447
408
  * @deprecated properties moved to the root of the config
448
409
  */
449
- theme: default_theme_config_schema_1.themeConfigSchema,
450
- reunite: reunite_config_schema_1.reuniteConfigSchema,
410
+ theme: default_theme_config_schema_1.themeConfigSchema, reunite: reunite_config_schema_1.reuniteConfigSchema,
451
411
  // Ex theme properties
452
- logo: ex_theme_config_schemas_1.logoConfigSchema,
453
- navbar: ex_theme_config_schemas_1.navbarConfigSchema,
454
- products: ex_theme_config_schemas_1.productsConfigSchema,
455
- footer: ex_theme_config_schemas_1.footerConfigSchema,
456
- sidebar: ex_theme_config_schemas_1.sidebarConfigSchema,
457
- scripts: ex_theme_config_schemas_1.scriptsConfigSchema,
458
- links: ex_theme_config_schemas_1.linksConfigSchema,
459
- feedback: feedback_config_schema_1.feedbackConfigSchema,
460
- search: ex_theme_config_schemas_1.searchConfigSchema,
461
- colorMode: ex_theme_config_schemas_1.colorModeConfigSchema,
462
- navigation: ex_theme_config_schemas_1.navigationConfigSchema,
463
- codeSnippet: ex_theme_config_schemas_1.codeSnippetConfigSchema,
464
- markdown: ex_theme_config_schemas_1.markdownConfigSchema,
465
- openapi: ex_theme_config_schemas_1.openapiConfigSchema,
466
- graphql: graphql_config_schema_1.graphqlConfigSchema,
467
- analytics: ex_theme_config_schemas_1.analyticsConfigSchema,
468
- userMenu: ex_theme_config_schemas_1.userMenuConfigSchema,
469
- versionPicker: ex_theme_config_schemas_1.versionPickerConfigSchema,
470
- breadcrumbs: ex_theme_config_schemas_1.breadcrumbsConfigSchema,
412
+ logo: ex_theme_config_schemas_1.logoConfigSchema, navbar: ex_theme_config_schemas_1.navbarConfigSchema, products: ex_theme_config_schemas_1.productsConfigSchema, footer: ex_theme_config_schemas_1.footerConfigSchema, sidebar: ex_theme_config_schemas_1.sidebarConfigSchema, scripts: ex_theme_config_schemas_1.scriptsConfigSchema, links: ex_theme_config_schemas_1.linksConfigSchema, feedback: feedback_config_schema_1.feedbackConfigSchema, search: ex_theme_config_schemas_1.searchConfigSchema, colorMode: ex_theme_config_schemas_1.colorModeConfigSchema, navigation: ex_theme_config_schemas_1.navigationConfigSchema, codeSnippet: ex_theme_config_schemas_1.codeSnippetConfigSchema, markdown: ex_theme_config_schemas_1.markdownConfigSchema, openapi: ex_theme_config_schemas_1.openapiConfigSchema, graphql: graphql_config_schema_1.graphqlConfigSchema, analytics: ex_theme_config_schemas_1.analyticsConfigSchema, userMenu: ex_theme_config_schemas_1.userMenuConfigSchema, versionPicker: ex_theme_config_schemas_1.versionPickerConfigSchema, breadcrumbs: ex_theme_config_schemas_1.breadcrumbsConfigSchema,
471
413
  /**
472
414
  * @deprecated Should use `catalogClassic` instead
473
415
  */
474
- catalog: ex_theme_config_schemas_1.catalogsConfigSchema,
475
- catalogClassic: ex_theme_config_schemas_1.catalogsConfigSchema,
476
- scorecard: ex_theme_config_schemas_1.scorecardConfigSchema,
477
- },
416
+ catalog: ex_theme_config_schemas_1.catalogsConfigSchema, entitiesCatalog: entities_catalog_config_schema_1.entitiesCatalogConfigSchema, catalogClassic: ex_theme_config_schemas_1.catalogsConfigSchema, scorecard: ex_theme_config_schemas_1.scorecardConfigSchema }),
478
417
  default: { redirects: {}, seo: exports.seoConfigSchema.default },
479
418
  additionalProperties: true,
480
419
  };
@@ -0,0 +1,29 @@
1
+ export type CatalogConfigEntityExclude = {
2
+ key: string;
3
+ };
4
+ export type CatalogConfigEntityInclude = {
5
+ type: string;
6
+ };
7
+ export type CatalogConfigEntityFilter = {
8
+ title: string;
9
+ titleTranslationKey?: string;
10
+ parentFilter?: string;
11
+ valuesMapping?: Record<string, string>;
12
+ missingCategoryName?: string;
13
+ missingCategoryNameTranslationKey?: string;
14
+ property: string;
15
+ type?: 'select' | 'checkboxes' | 'date-range';
16
+ options?: string[];
17
+ hide?: boolean;
18
+ label?: string;
19
+ };
20
+ export type CatalogEntityConfig = {
21
+ slug?: string;
22
+ hide?: boolean;
23
+ excludes?: CatalogConfigEntityExclude[];
24
+ includes?: CatalogConfigEntityInclude[];
25
+ filters?: CatalogConfigEntityFilter[];
26
+ titleTranslationKey?: string;
27
+ descriptionTranslationKey?: string;
28
+ catalogSwitcherLabelTranslationKey?: string;
29
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=catalog-entity-types.js.map
@@ -1,7 +1,6 @@
1
1
  export type CodeWalkthroughStepAttr = {
2
2
  id: string;
3
3
  title?: string;
4
- stepKey: number;
5
4
  };
6
5
  export type FilesetsMarkdocAttr = WithConditions<{
7
6
  files?: string[];
@@ -7,6 +7,7 @@ import type { GraphQLConfigTypes } from './graphql-types';
7
7
  import type { productConfigSchema, productGoogleAnalyticsConfigSchema, markdownConfigSchema, amplitudeAnalyticsConfigSchema, rudderstackAnalyticsConfigSchema, segmentAnalyticsConfigSchema, gtmAnalyticsConfigSchema, googleAnalyticsConfigSchema, scorecardConfigSchema, catalogFilterSchema, catalogSchema, searchFacetsConfigSchema } from '../ex-theme-config-schemas';
8
8
  import type { reuniteConfigSchema } from '../reunite-config-schema';
9
9
  import type { optionalEmailSettings, reasonsSettings } from '../feedback-config-schema';
10
+ import type { entitiesCatalogConfigSchema } from '../entities-catalog-config-schema';
10
11
  /**
11
12
  * @deprecated left for backwards compatibility. To be removed in Realm 1.0
12
13
  */
@@ -24,6 +25,7 @@ export type SegmentAnalyticsConfig = FromSchema<typeof segmentAnalyticsConfigSch
24
25
  export type GtmAnalyticsConfig = FromSchema<typeof gtmAnalyticsConfigSchema>;
25
26
  export type GoogleAnalyticsConfig = FromSchema<typeof googleAnalyticsConfigSchema>;
26
27
  export type CatalogConfig = FromSchema<typeof catalogSchema>;
28
+ export type EntitiesCatalogConfig = FromSchema<typeof entitiesCatalogConfigSchema>;
27
29
  export type CatalogFilterConfig = FromSchema<typeof catalogFilterSchema>;
28
30
  export type ReuniteConfig = FromSchema<typeof reuniteConfigSchema>;
29
31
  export type ScorecardConfig = FromSchema<typeof scorecardConfigSchema>;
@@ -1,3 +1,4 @@
1
1
  export * from './api-functions-types';
2
2
  export * from './config-types';
3
3
  export * from './portal-shared-types';
4
+ export * from './catalog-entity-types';
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./api-functions-types"), exports);
18
18
  __exportStar(require("./config-types"), exports);
19
19
  __exportStar(require("./portal-shared-types"), exports);
20
+ __exportStar(require("./catalog-entity-types"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -160,7 +160,18 @@ export type PageProps = {
160
160
  seo?: SeoConfig;
161
161
  frontmatter?: Omit<PageProps, 'frontmatter'> & {
162
162
  settings?: any;
163
- } & Partial<UiAccessibleConfig>;
163
+ } & Partial<UiAccessibleConfig> & {
164
+ navigation?: {
165
+ nextButton?: {
166
+ link?: string;
167
+ label?: string;
168
+ };
169
+ previousButton?: {
170
+ link?: string;
171
+ label?: string;
172
+ };
173
+ };
174
+ };
164
175
  disableAutoScroll?: boolean;
165
176
  lastModified?: string | null;
166
177
  [k: string]: unknown;
@@ -0,0 +1,160 @@
1
+ export declare const rulesSchema: {
2
+ readonly type: "object";
3
+ readonly additionalProperties: {
4
+ readonly oneOf: readonly [{
5
+ readonly type: "string";
6
+ }, {
7
+ readonly type: "object";
8
+ }];
9
+ };
10
+ };
11
+ export declare const ruleSchemas: {
12
+ readonly rules: {
13
+ readonly type: "object";
14
+ readonly additionalProperties: {
15
+ readonly oneOf: readonly [{
16
+ readonly type: "string";
17
+ }, {
18
+ readonly type: "object";
19
+ }];
20
+ };
21
+ };
22
+ readonly oas2Rules: {
23
+ readonly type: "object";
24
+ readonly additionalProperties: {
25
+ readonly oneOf: readonly [{
26
+ readonly type: "string";
27
+ }, {
28
+ readonly type: "object";
29
+ }];
30
+ };
31
+ };
32
+ readonly oas3_0Rules: {
33
+ readonly type: "object";
34
+ readonly additionalProperties: {
35
+ readonly oneOf: readonly [{
36
+ readonly type: "string";
37
+ }, {
38
+ readonly type: "object";
39
+ }];
40
+ };
41
+ };
42
+ readonly oas3_1Rules: {
43
+ readonly type: "object";
44
+ readonly additionalProperties: {
45
+ readonly oneOf: readonly [{
46
+ readonly type: "string";
47
+ }, {
48
+ readonly type: "object";
49
+ }];
50
+ };
51
+ };
52
+ readonly async2Rules: {
53
+ readonly type: "object";
54
+ readonly additionalProperties: {
55
+ readonly oneOf: readonly [{
56
+ readonly type: "string";
57
+ }, {
58
+ readonly type: "object";
59
+ }];
60
+ };
61
+ };
62
+ readonly async3Rules: {
63
+ readonly type: "object";
64
+ readonly additionalProperties: {
65
+ readonly oneOf: readonly [{
66
+ readonly type: "string";
67
+ }, {
68
+ readonly type: "object";
69
+ }];
70
+ };
71
+ };
72
+ readonly arazzo1Rules: {
73
+ readonly type: "object";
74
+ readonly additionalProperties: {
75
+ readonly oneOf: readonly [{
76
+ readonly type: "string";
77
+ }, {
78
+ readonly type: "object";
79
+ }];
80
+ };
81
+ };
82
+ readonly overlay1Rules: {
83
+ readonly type: "object";
84
+ readonly additionalProperties: {
85
+ readonly oneOf: readonly [{
86
+ readonly type: "string";
87
+ }, {
88
+ readonly type: "object";
89
+ }];
90
+ };
91
+ };
92
+ };
93
+ export declare const preprocessorSchemas: {
94
+ readonly preprocessors: {
95
+ readonly type: "object";
96
+ readonly additionalProperties: true;
97
+ };
98
+ readonly oas2Preprocessors: {
99
+ readonly type: "object";
100
+ readonly additionalProperties: true;
101
+ };
102
+ readonly oas3_0Preprocessors: {
103
+ readonly type: "object";
104
+ readonly additionalProperties: true;
105
+ };
106
+ readonly oas3_1Preprocessors: {
107
+ readonly type: "object";
108
+ readonly additionalProperties: true;
109
+ };
110
+ readonly async2Preprocessors: {
111
+ readonly type: "object";
112
+ readonly additionalProperties: true;
113
+ };
114
+ readonly async3Preprocessors: {
115
+ readonly type: "object";
116
+ readonly additionalProperties: true;
117
+ };
118
+ readonly arazzo1Preprocessors: {
119
+ readonly type: "object";
120
+ readonly additionalProperties: true;
121
+ };
122
+ readonly overlay1Preprocessors: {
123
+ readonly type: "object";
124
+ readonly additionalProperties: true;
125
+ };
126
+ };
127
+ export declare const decoratorsSchemas: {
128
+ readonly decorators: {
129
+ readonly type: "object";
130
+ readonly additionalProperties: true;
131
+ };
132
+ readonly oas2Decorators: {
133
+ readonly type: "object";
134
+ readonly additionalProperties: true;
135
+ };
136
+ readonly oas3_0Decorators: {
137
+ readonly type: "object";
138
+ readonly additionalProperties: true;
139
+ };
140
+ readonly oas3_1Decorators: {
141
+ readonly type: "object";
142
+ readonly additionalProperties: true;
143
+ };
144
+ readonly async2Decorators: {
145
+ readonly type: "object";
146
+ readonly additionalProperties: true;
147
+ };
148
+ readonly async3Decorators: {
149
+ readonly type: "object";
150
+ readonly additionalProperties: true;
151
+ };
152
+ readonly arazzo1Decorators: {
153
+ readonly type: "object";
154
+ readonly additionalProperties: true;
155
+ };
156
+ readonly overlay1Decorators: {
157
+ readonly type: "object";
158
+ readonly additionalProperties: true;
159
+ };
160
+ };
@@ -0,0 +1,37 @@
1
+ export const rulesSchema = {
2
+ type: 'object',
3
+ additionalProperties: {
4
+ oneOf: [{ type: 'string' }, { type: 'object' }],
5
+ },
6
+ };
7
+ export const ruleSchemas = {
8
+ rules: rulesSchema,
9
+ oas2Rules: rulesSchema,
10
+ oas3_0Rules: rulesSchema,
11
+ oas3_1Rules: rulesSchema,
12
+ async2Rules: rulesSchema,
13
+ async3Rules: rulesSchema,
14
+ arazzo1Rules: rulesSchema,
15
+ overlay1Rules: rulesSchema,
16
+ };
17
+ export const preprocessorSchemas = {
18
+ preprocessors: { type: 'object', additionalProperties: true },
19
+ oas2Preprocessors: { type: 'object', additionalProperties: true },
20
+ oas3_0Preprocessors: { type: 'object', additionalProperties: true },
21
+ oas3_1Preprocessors: { type: 'object', additionalProperties: true },
22
+ async2Preprocessors: { type: 'object', additionalProperties: true },
23
+ async3Preprocessors: { type: 'object', additionalProperties: true },
24
+ arazzo1Preprocessors: { type: 'object', additionalProperties: true },
25
+ overlay1Preprocessors: { type: 'object', additionalProperties: true },
26
+ };
27
+ export const decoratorsSchemas = {
28
+ decorators: { type: 'object', additionalProperties: true },
29
+ oas2Decorators: { type: 'object', additionalProperties: true },
30
+ oas3_0Decorators: { type: 'object', additionalProperties: true },
31
+ oas3_1Decorators: { type: 'object', additionalProperties: true },
32
+ async2Decorators: { type: 'object', additionalProperties: true },
33
+ async3Decorators: { type: 'object', additionalProperties: true },
34
+ arazzo1Decorators: { type: 'object', additionalProperties: true },
35
+ overlay1Decorators: { type: 'object', additionalProperties: true },
36
+ };
37
+ //# sourceMappingURL=common.js.map