@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,7 +1,10 @@
|
|
|
1
1
|
import { DEFAULT_TEAM_CLAIM_NAME, AuthProviderType, ApigeeDevOnboardingIntegrationAuthType, } from './constants';
|
|
2
2
|
import { themeConfigSchema } from './default-theme-config-schema';
|
|
3
|
+
import { feedbackConfigSchema } from './feedback-config-schema';
|
|
4
|
+
import { graphqlConfigSchema } from './graphql-config-schema';
|
|
3
5
|
import { removePropertyRecursively } from './remove-property-recursively';
|
|
4
6
|
import { reuniteConfigSchema } from './reunite-config-schema';
|
|
7
|
+
import { analyticsConfigSchema, breadcrumbsConfigSchema, catalogsConfigSchema, codeSnippetConfigSchema, colorModeConfigSchema, footerConfigSchema, linksConfigSchema, logoConfigSchema, markdownConfigSchema, navbarConfigSchema, navigationConfigSchema, openapiConfigSchema, productsConfigSchema, scorecardConfigSchema, scriptsConfigSchema, searchConfigSchema, sidebarConfigSchema, userMenuConfigSchema, versionPickerConfigSchema, } from './ex-theme-config-schemas';
|
|
5
8
|
export const oidcIssuerMetadataSchema = {
|
|
6
9
|
type: 'object',
|
|
7
10
|
properties: {
|
|
@@ -101,11 +104,16 @@ export const apiConfigSchema = {
|
|
|
101
104
|
root: { type: 'string' },
|
|
102
105
|
output: { type: 'string', pattern: '(.ya?ml|.json)$' },
|
|
103
106
|
rbac: { type: 'object', additionalProperties: true },
|
|
107
|
+
openapi: openapiConfigSchema,
|
|
108
|
+
graphql: graphqlConfigSchema,
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated left for backwards compatibility
|
|
111
|
+
*/
|
|
104
112
|
theme: {
|
|
105
113
|
type: 'object',
|
|
106
114
|
properties: {
|
|
107
|
-
openapi:
|
|
108
|
-
graphql:
|
|
115
|
+
openapi: openapiConfigSchema,
|
|
116
|
+
graphql: graphqlConfigSchema,
|
|
109
117
|
},
|
|
110
118
|
additionalProperties: false,
|
|
111
119
|
},
|
|
@@ -253,7 +261,7 @@ const devOnboardingConfigSchema = {
|
|
|
253
261
|
},
|
|
254
262
|
},
|
|
255
263
|
};
|
|
256
|
-
export const
|
|
264
|
+
export const l10nConfigSchema = {
|
|
257
265
|
type: 'object',
|
|
258
266
|
properties: {
|
|
259
267
|
defaultLocale: {
|
|
@@ -290,6 +298,13 @@ const responseHeaderSchema = {
|
|
|
290
298
|
export const redoclyConfigSchema = {
|
|
291
299
|
type: 'object',
|
|
292
300
|
properties: {
|
|
301
|
+
/**
|
|
302
|
+
* @deprecated Should use `plugins` instead
|
|
303
|
+
*/
|
|
304
|
+
imports: {
|
|
305
|
+
type: 'array',
|
|
306
|
+
items: { type: 'string' },
|
|
307
|
+
},
|
|
293
308
|
licenseKey: { type: 'string' },
|
|
294
309
|
redirects: redirectsConfigSchema,
|
|
295
310
|
seo: seoConfigSchema,
|
|
@@ -324,7 +339,8 @@ export const redoclyConfigSchema = {
|
|
|
324
339
|
residency: { type: 'string' },
|
|
325
340
|
developerOnboarding: devOnboardingConfigSchema,
|
|
326
341
|
removeAttribution: { type: 'boolean' },
|
|
327
|
-
i18n:
|
|
342
|
+
i18n: l10nConfigSchema,
|
|
343
|
+
l10n: l10nConfigSchema,
|
|
328
344
|
metadata: metadataConfigSchema,
|
|
329
345
|
ignore: {
|
|
330
346
|
type: 'array',
|
|
@@ -332,8 +348,33 @@ export const redoclyConfigSchema = {
|
|
|
332
348
|
type: 'string',
|
|
333
349
|
},
|
|
334
350
|
},
|
|
351
|
+
/**
|
|
352
|
+
* @deprecated properties moved to the root of the config
|
|
353
|
+
*/
|
|
335
354
|
theme: themeConfigSchema,
|
|
336
355
|
reunite: reuniteConfigSchema,
|
|
356
|
+
// Ex theme properties
|
|
357
|
+
logo: logoConfigSchema,
|
|
358
|
+
navbar: navbarConfigSchema,
|
|
359
|
+
products: productsConfigSchema,
|
|
360
|
+
footer: footerConfigSchema,
|
|
361
|
+
sidebar: sidebarConfigSchema,
|
|
362
|
+
scripts: scriptsConfigSchema,
|
|
363
|
+
links: linksConfigSchema,
|
|
364
|
+
feedback: feedbackConfigSchema,
|
|
365
|
+
search: searchConfigSchema,
|
|
366
|
+
colorMode: colorModeConfigSchema,
|
|
367
|
+
navigation: navigationConfigSchema,
|
|
368
|
+
codeSnippet: codeSnippetConfigSchema,
|
|
369
|
+
markdown: markdownConfigSchema,
|
|
370
|
+
openapi: openapiConfigSchema,
|
|
371
|
+
graphql: graphqlConfigSchema,
|
|
372
|
+
analytics: analyticsConfigSchema,
|
|
373
|
+
userMenu: userMenuConfigSchema,
|
|
374
|
+
versionPicker: versionPickerConfigSchema,
|
|
375
|
+
breadcrumbs: breadcrumbsConfigSchema,
|
|
376
|
+
catalog: catalogsConfigSchema,
|
|
377
|
+
scorecard: scorecardConfigSchema,
|
|
337
378
|
},
|
|
338
379
|
default: { redirects: {} },
|
|
339
380
|
additionalProperties: true,
|
package/lib-esm/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 {};
|