@redocly/config 0.8.2 → 0.10.0
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/lib/default-theme-config-schema.d.ts +7589 -7601
- package/lib/default-theme-config-schema.js +33 -629
- package/lib/ex-theme-config-schemas.d.ts +3866 -0
- package/lib/ex-theme-config-schemas.js +556 -0
- package/lib/feedback-config-schema.d.ts +0 -2
- package/lib/feedback-config-schema.js +0 -2
- package/lib/graphql-config-schema.d.ts +0 -2
- package/lib/portal-shared-types.d.ts +11 -12
- package/lib/redoc-config-schema.d.ts +0 -2
- package/lib/root-config-schema.d.ts +34397 -16995
- package/lib/root-config-schema.js +46 -5
- package/lib/types.d.ts +14 -9
- package/lib-esm/default-theme-config-schema.d.ts +7589 -7601
- package/lib-esm/default-theme-config-schema.js +27 -623
- package/lib-esm/ex-theme-config-schemas.d.ts +3866 -0
- package/lib-esm/ex-theme-config-schemas.js +553 -0
- package/lib-esm/feedback-config-schema.d.ts +0 -2
- package/lib-esm/feedback-config-schema.js +0 -2
- package/lib-esm/graphql-config-schema.d.ts +0 -2
- package/lib-esm/portal-shared-types.d.ts +11 -12
- package/lib-esm/redoc-config-schema.d.ts +0 -2
- package/lib-esm/root-config-schema.d.ts +34397 -16995
- package/lib-esm/root-config-schema.js +45 -4
- package/lib-esm/types.d.ts +14 -9
- package/package.json +1 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rootRedoclyConfigSchema = exports.redoclyConfigSchema = exports.
|
|
3
|
+
exports.rootRedoclyConfigSchema = exports.redoclyConfigSchema = exports.l10nConfigSchema = exports.devOnboardingAdapterConfigSchema = exports.apigeeEdgeAdapterConfigSchema = exports.apigeeXAdapterConfigSchema = exports.apigeeAdapterAuthServiceAccountSchema = exports.apigeeAdapterAuthOauth2Schema = exports.graviteeAdapterConfigSchema = exports.graviteeAdapterAuthIdpSchema = exports.graviteeAdapterAuthStaticSchema = exports.rbacConfigSchema = exports.rbacScopeItemsSchema = exports.seoConfigSchema = exports.apiConfigSchema = exports.redirectsConfigSchema = exports.redirectConfigSchema = exports.ssoConfigSchema = exports.ssoOnPremConfigSchema = exports.authProviderConfigSchema = exports.saml2ProviderConfigSchema = exports.oidcProviderConfigSchema = exports.oidcIssuerMetadataSchema = void 0;
|
|
4
4
|
const constants_1 = require("./constants");
|
|
5
5
|
const default_theme_config_schema_1 = require("./default-theme-config-schema");
|
|
6
|
+
const feedback_config_schema_1 = require("./feedback-config-schema");
|
|
7
|
+
const graphql_config_schema_1 = require("./graphql-config-schema");
|
|
6
8
|
const remove_property_recursively_1 = require("./remove-property-recursively");
|
|
7
9
|
const reunite_config_schema_1 = require("./reunite-config-schema");
|
|
10
|
+
const ex_theme_config_schemas_1 = require("./ex-theme-config-schemas");
|
|
8
11
|
exports.oidcIssuerMetadataSchema = {
|
|
9
12
|
type: 'object',
|
|
10
13
|
properties: {
|
|
@@ -104,11 +107,16 @@ exports.apiConfigSchema = {
|
|
|
104
107
|
root: { type: 'string' },
|
|
105
108
|
output: { type: 'string', pattern: '(.ya?ml|.json)$' },
|
|
106
109
|
rbac: { type: 'object', additionalProperties: true },
|
|
110
|
+
openapi: ex_theme_config_schemas_1.openapiConfigSchema,
|
|
111
|
+
graphql: graphql_config_schema_1.graphqlConfigSchema,
|
|
112
|
+
/**
|
|
113
|
+
* @deprecated left for backwards compatibility
|
|
114
|
+
*/
|
|
107
115
|
theme: {
|
|
108
116
|
type: 'object',
|
|
109
117
|
properties: {
|
|
110
|
-
openapi:
|
|
111
|
-
graphql:
|
|
118
|
+
openapi: ex_theme_config_schemas_1.openapiConfigSchema,
|
|
119
|
+
graphql: graphql_config_schema_1.graphqlConfigSchema,
|
|
112
120
|
},
|
|
113
121
|
additionalProperties: false,
|
|
114
122
|
},
|
|
@@ -256,7 +264,7 @@ const devOnboardingConfigSchema = {
|
|
|
256
264
|
},
|
|
257
265
|
},
|
|
258
266
|
};
|
|
259
|
-
exports.
|
|
267
|
+
exports.l10nConfigSchema = {
|
|
260
268
|
type: 'object',
|
|
261
269
|
properties: {
|
|
262
270
|
defaultLocale: {
|
|
@@ -293,6 +301,13 @@ const responseHeaderSchema = {
|
|
|
293
301
|
exports.redoclyConfigSchema = {
|
|
294
302
|
type: 'object',
|
|
295
303
|
properties: {
|
|
304
|
+
/**
|
|
305
|
+
* @deprecated Should use `plugins` instead
|
|
306
|
+
*/
|
|
307
|
+
imports: {
|
|
308
|
+
type: 'array',
|
|
309
|
+
items: { type: 'string' },
|
|
310
|
+
},
|
|
296
311
|
licenseKey: { type: 'string' },
|
|
297
312
|
redirects: exports.redirectsConfigSchema,
|
|
298
313
|
seo: exports.seoConfigSchema,
|
|
@@ -327,7 +342,8 @@ exports.redoclyConfigSchema = {
|
|
|
327
342
|
residency: { type: 'string' },
|
|
328
343
|
developerOnboarding: devOnboardingConfigSchema,
|
|
329
344
|
removeAttribution: { type: 'boolean' },
|
|
330
|
-
i18n: exports.
|
|
345
|
+
i18n: exports.l10nConfigSchema,
|
|
346
|
+
l10n: exports.l10nConfigSchema,
|
|
331
347
|
metadata: metadataConfigSchema,
|
|
332
348
|
ignore: {
|
|
333
349
|
type: 'array',
|
|
@@ -335,8 +351,33 @@ exports.redoclyConfigSchema = {
|
|
|
335
351
|
type: 'string',
|
|
336
352
|
},
|
|
337
353
|
},
|
|
354
|
+
/**
|
|
355
|
+
* @deprecated properties moved to the root of the config
|
|
356
|
+
*/
|
|
338
357
|
theme: default_theme_config_schema_1.themeConfigSchema,
|
|
339
358
|
reunite: reunite_config_schema_1.reuniteConfigSchema,
|
|
359
|
+
// Ex theme properties
|
|
360
|
+
logo: ex_theme_config_schemas_1.logoConfigSchema,
|
|
361
|
+
navbar: ex_theme_config_schemas_1.navbarConfigSchema,
|
|
362
|
+
products: ex_theme_config_schemas_1.productsConfigSchema,
|
|
363
|
+
footer: ex_theme_config_schemas_1.footerConfigSchema,
|
|
364
|
+
sidebar: ex_theme_config_schemas_1.sidebarConfigSchema,
|
|
365
|
+
scripts: ex_theme_config_schemas_1.scriptsConfigSchema,
|
|
366
|
+
links: ex_theme_config_schemas_1.linksConfigSchema,
|
|
367
|
+
feedback: feedback_config_schema_1.feedbackConfigSchema,
|
|
368
|
+
search: ex_theme_config_schemas_1.searchConfigSchema,
|
|
369
|
+
colorMode: ex_theme_config_schemas_1.colorModeConfigSchema,
|
|
370
|
+
navigation: ex_theme_config_schemas_1.navigationConfigSchema,
|
|
371
|
+
codeSnippet: ex_theme_config_schemas_1.codeSnippetConfigSchema,
|
|
372
|
+
markdown: ex_theme_config_schemas_1.markdownConfigSchema,
|
|
373
|
+
openapi: ex_theme_config_schemas_1.openapiConfigSchema,
|
|
374
|
+
graphql: graphql_config_schema_1.graphqlConfigSchema,
|
|
375
|
+
analytics: ex_theme_config_schemas_1.analyticsConfigSchema,
|
|
376
|
+
userMenu: ex_theme_config_schemas_1.userMenuConfigSchema,
|
|
377
|
+
versionPicker: ex_theme_config_schemas_1.versionPickerConfigSchema,
|
|
378
|
+
breadcrumbs: ex_theme_config_schemas_1.breadcrumbsConfigSchema,
|
|
379
|
+
catalog: ex_theme_config_schemas_1.catalogsConfigSchema,
|
|
380
|
+
scorecard: ex_theme_config_schemas_1.scorecardConfigSchema,
|
|
340
381
|
},
|
|
341
382
|
default: { redirects: {} },
|
|
342
383
|
additionalProperties: true,
|
package/lib/types.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { FromSchema } from 'json-schema-to-ts';
|
|
2
|
-
import type {
|
|
3
|
-
import type { apiConfigSchema, apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema, apigeeEdgeAdapterConfigSchema, apigeeXAdapterConfigSchema, authProviderConfigSchema, devOnboardingAdapterConfigSchema, graviteeAdapterConfigSchema,
|
|
2
|
+
import type { productConfigOverrideSchema, themeConfigSchema } from './default-theme-config-schema';
|
|
3
|
+
import type { apiConfigSchema, apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema, apigeeEdgeAdapterConfigSchema, apigeeXAdapterConfigSchema, authProviderConfigSchema, devOnboardingAdapterConfigSchema, graviteeAdapterConfigSchema, l10nConfigSchema, oidcIssuerMetadataSchema, oidcProviderConfigSchema, rbacConfigSchema, rbacScopeItemsSchema, redirectConfigSchema, redirectsConfigSchema, rootRedoclyConfigSchema, saml2ProviderConfigSchema, seoConfigSchema, ssoOnPremConfigSchema } from './root-config-schema';
|
|
4
4
|
import type { RedocConfigTypes } from './redoc-types';
|
|
5
5
|
import type { GraphQLConfigTypes } from './graphql-types';
|
|
6
|
+
import type { productConfigSchema, productGoogleAnalyticsConfigSchema, markdownConfigSchema, amplitudeAnalyticsConfigSchema, rudderstackAnalyticsConfigSchema, segmentAnalyticsConfigSchema, gtmAnalyticsConfigSchema, googleAnalyticsConfigSchema, scorecardConfigSchema, catalogFilterSchema, catalogSchema } from './ex-theme-config-schemas';
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* @deprecated left for backwards compatibility. To be removed in Realm 1.0
|
|
8
9
|
*/
|
|
9
10
|
export type ThemeConfig = Omit<FromSchema<typeof themeConfigSchema>, 'openapi'> & {
|
|
10
11
|
openapi?: RedocConfigTypes;
|
|
@@ -22,11 +23,11 @@ export type GoogleAnalyticsConfig = FromSchema<typeof googleAnalyticsConfigSchem
|
|
|
22
23
|
export type CatalogConfig = FromSchema<typeof catalogSchema>;
|
|
23
24
|
export type CatalogFilterConfig = FromSchema<typeof catalogFilterSchema>;
|
|
24
25
|
export type ScorecardConfig = FromSchema<typeof scorecardConfigSchema>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
theme?:
|
|
26
|
+
export type RedoclyConfig = Omit<FromSchema<typeof rootRedoclyConfigSchema>, 'theme' | 'apis'> & {
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated properties moved to the root of the config
|
|
29
|
+
*/
|
|
30
|
+
theme?: any;
|
|
30
31
|
apis?: Record<string, ApiConfig>;
|
|
31
32
|
};
|
|
32
33
|
export type RedirectConfig = FromSchema<typeof redirectConfigSchema>;
|
|
@@ -44,12 +45,16 @@ export type ApigeeAdapterConfig = FromSchema<typeof apigeeXAdapterConfigSchema |
|
|
|
44
45
|
export type ApigeeAdapterAuthOauth2 = FromSchema<typeof apigeeAdapterAuthOauth2Schema>;
|
|
45
46
|
export type ApigeeAdapterAuthServiceAccount = FromSchema<typeof apigeeAdapterAuthServiceAccountSchema>;
|
|
46
47
|
export type SsoConfig = FromSchema<typeof ssoOnPremConfigSchema>;
|
|
47
|
-
export type
|
|
48
|
+
export type L10nConfig = FromSchema<typeof l10nConfigSchema>;
|
|
48
49
|
type BasicApiConfig = FromSchema<typeof apiConfigSchema>;
|
|
49
50
|
export type ApiConfig = BasicApiConfig & {
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated left for backwards compatibility
|
|
53
|
+
*/
|
|
50
54
|
theme?: {
|
|
51
55
|
openapi?: RedocConfig;
|
|
52
56
|
graphql?: GraphQLConfig;
|
|
53
57
|
};
|
|
54
58
|
};
|
|
59
|
+
export type ProductConfigOverride = FromSchema<typeof productConfigOverrideSchema>;
|
|
55
60
|
export {};
|