@redocly/config 0.50.1 → 0.52.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/asyncapi-config-schema.d.ts +10 -27
- package/lib/common.d.ts +120 -120
- package/lib/constants/identity-provider-slug.d.ts +2 -1
- package/lib/constants/shared.d.ts +1 -0
- package/lib/default-theme-config-schema.d.ts +520 -621
- package/lib/entities-catalog-config-schema.d.ts +60 -72
- package/lib/entities-catalog-entity-file-schema.d.ts +74 -67
- package/lib/ex-theme-config-schemas.d.ts +266 -354
- package/lib/feedback-config-schema.d.ts +9 -29
- package/lib/graphql-config-schema.d.ts +11 -28
- package/lib/index.d.ts +2 -2
- package/lib/index.js +1 -1
- package/lib/product-override-schema.d.ts +4203 -4461
- package/lib/redoc-config-schema.d.ts +14 -33
- package/lib/reference-docs-config-schema.d.ts +14 -10
- package/lib/reunite-config-schema.d.ts +11 -12
- package/lib/root-config-schema.d.ts +22685 -17296
- package/lib/scorecards-config-schema.d.ts +168 -108
- package/lib/types/config-types.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/json-schema-types.d.ts +69 -0
- package/lib/types/portal-shared-types.d.ts +3 -0
- package/lib-esm/asyncapi-config-schema.d.ts +10 -27
- package/lib-esm/common.d.ts +120 -120
- package/lib-esm/constants/identity-provider-slug.d.ts +2 -1
- package/lib-esm/constants/shared.d.ts +1 -0
- package/lib-esm/default-theme-config-schema.d.ts +520 -621
- package/lib-esm/entities-catalog-config-schema.d.ts +60 -72
- package/lib-esm/entities-catalog-entity-file-schema.d.ts +74 -67
- package/lib-esm/ex-theme-config-schemas.d.ts +266 -354
- package/lib-esm/feedback-config-schema.d.ts +9 -29
- package/lib-esm/graphql-config-schema.d.ts +11 -28
- package/lib-esm/index.d.ts +2 -2
- package/lib-esm/index.js +1 -1
- package/lib-esm/product-override-schema.d.ts +4203 -4461
- package/lib-esm/redoc-config-schema.d.ts +14 -33
- package/lib-esm/reference-docs-config-schema.d.ts +14 -10
- package/lib-esm/reunite-config-schema.d.ts +11 -12
- package/lib-esm/root-config-schema.d.ts +22685 -17296
- package/lib-esm/scorecards-config-schema.d.ts +168 -108
- package/lib-esm/types/config-types.d.ts +2 -1
- package/lib-esm/types/index.d.ts +1 -0
- package/lib-esm/types/json-schema-types.d.ts +69 -0
- package/lib-esm/types/portal-shared-types.d.ts +3 -0
- package/package.json +2 -2
- package/lib/remove-property-recursively.d.ts +0 -5
- package/lib-esm/remove-property-recursively.d.ts +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FromSchema } from 'json-schema-to-ts';
|
|
2
2
|
import type { themeConfigSchema } from '../default-theme-config-schema.js';
|
|
3
3
|
import type { productConfigOverrideSchema } from '../product-override-schema.js';
|
|
4
|
-
import type { apiConfigSchema, apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema, apigeeEdgeAdapterConfigSchema, apigeeXAdapterConfigSchema, authProviderConfigSchema, devOnboardingAdapterConfigSchema, graviteeAdapterConfigSchema, l10nConfigSchema, oidcIssuerMetadataSchema, oidcProviderConfigSchema, rbacConfigSchema, rbacScopeItemsSchema, redirectConfigSchema, redirectsConfigSchema, rootRedoclyConfigSchema, bannerConfigSchema, bannersConfigSchema, saml2ProviderConfigSchema, seoConfigSchema, ssoDirectConfigSchema } from '../root-config-schema.js';
|
|
4
|
+
import type { apiConfigSchema, apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema, apigeeEdgeAdapterConfigSchema, apigeeXAdapterConfigSchema, authProviderConfigSchema, devOnboardingAdapterConfigSchema, graviteeAdapterConfigSchema, l10nConfigSchema, oidcIssuerMetadataSchema, oidcProviderConfigSchema, rbacConfigSchema, rbacScopeItemsSchema, redirectConfigSchema, redirectsConfigSchema, rootRedoclyConfigSchema, skillsConfigSchema, bannerConfigSchema, bannersConfigSchema, saml2ProviderConfigSchema, seoConfigSchema, ssoDirectConfigSchema } from '../root-config-schema.js';
|
|
5
5
|
import type { RedocConfigTypes } from './redoc-types.js';
|
|
6
6
|
import type { GraphQLConfigTypes } from './graphql-types.js';
|
|
7
7
|
import type { productConfigSchema, productGoogleAnalyticsConfigSchema, markdownConfigSchema, amplitudeAnalyticsConfigSchema, rudderstackAnalyticsConfigSchema, segmentAnalyticsConfigSchema, gtmAnalyticsConfigSchema, googleAnalyticsConfigSchema, scorecardConfigSchema, catalogFilterSchema, catalogSchema, searchFacetsConfigSchema } from '../ex-theme-config-schemas.js';
|
|
@@ -32,6 +32,7 @@ export type ReuniteConfig = FromSchema<typeof reuniteConfigSchema>;
|
|
|
32
32
|
export type ScorecardConfig = FromSchema<typeof scorecardConfigSchema>;
|
|
33
33
|
export type ScorecardsConfig = FromSchema<typeof scorecardsConfigSchema>;
|
|
34
34
|
export type SearchFacetsConfig = FromSchema<typeof searchFacetsConfigSchema>;
|
|
35
|
+
export type SkillsConfig = FromSchema<typeof skillsConfigSchema>;
|
|
35
36
|
type RootRedoclyConfig = FromSchema<typeof rootRedoclyConfigSchema>;
|
|
36
37
|
export type RedoclyConfig = Omit<RootRedoclyConfig, 'theme' | 'apis' | 'rbac' | 'requiresLogin' | 'sso' | 'idps' | 'residency' | 'logoutReturnUrl'> & {
|
|
37
38
|
/**
|
package/lib-esm/types/index.d.ts
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This type is a subset of JSON Schema that aligns with [json-schema-adapter](https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/types/json-schema-adapter.ts)
|
|
3
|
+
* which translates JSON Schema to the Redocly CLI's internal NodeType tree format.
|
|
4
|
+
*
|
|
5
|
+
* */
|
|
6
|
+
export type RedoclyConfigJSONSchema = Base & (SchemaObject | SchemaArray | SchemaString | SchemaNumber | SchemaBoolean | SchemaOneOf);
|
|
7
|
+
type Base = {
|
|
8
|
+
$id?: string;
|
|
9
|
+
type?: Type;
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Redocly extension: link to the option's documentation page. */
|
|
12
|
+
documentationLink?: string;
|
|
13
|
+
/** Redocly extension: overrides the generated `NodeType` name. */
|
|
14
|
+
nodeTypeName?: string;
|
|
15
|
+
/** @deprecated Not supported by the `NodeType` adapter; avoid in new schemas. */
|
|
16
|
+
not?: any;
|
|
17
|
+
};
|
|
18
|
+
type Type = 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean';
|
|
19
|
+
type SchemaObject = {
|
|
20
|
+
type: 'object';
|
|
21
|
+
properties?: Record<string, RedoclyConfigJSONSchema>;
|
|
22
|
+
additionalProperties?: boolean | RedoclyConfigJSONSchema;
|
|
23
|
+
unevaluatedProperties?: boolean | RedoclyConfigJSONSchema;
|
|
24
|
+
patternProperties?: Record<string, RedoclyConfigJSONSchema>;
|
|
25
|
+
required?: readonly string[];
|
|
26
|
+
} & SchemaOneOfFragment;
|
|
27
|
+
type SchemaArray = {
|
|
28
|
+
type: 'array';
|
|
29
|
+
items?: RedoclyConfigJSONSchema;
|
|
30
|
+
minItems?: number;
|
|
31
|
+
/** @deprecated Not supported by the `NodeType` adapter; avoid in new schemas. */
|
|
32
|
+
uniqueItems?: boolean;
|
|
33
|
+
};
|
|
34
|
+
type SchemaString = {
|
|
35
|
+
type: 'string';
|
|
36
|
+
pattern?: string;
|
|
37
|
+
minLength?: number;
|
|
38
|
+
maxLength?: number;
|
|
39
|
+
format?: 'uri' | 'email' | 'date-time';
|
|
40
|
+
enum?: readonly (string | number | boolean | null)[];
|
|
41
|
+
const?: string | number | boolean | null;
|
|
42
|
+
};
|
|
43
|
+
type SchemaNumber = {
|
|
44
|
+
type: 'number' | 'integer';
|
|
45
|
+
minimum?: number;
|
|
46
|
+
};
|
|
47
|
+
type SchemaBoolean = {
|
|
48
|
+
type: 'boolean';
|
|
49
|
+
};
|
|
50
|
+
/** A standalone `oneOf` schema whose branches are full schemas. */
|
|
51
|
+
type SchemaOneOf = {
|
|
52
|
+
oneOf: readonly RedoclyConfigJSONSchema[];
|
|
53
|
+
discriminator?: {
|
|
54
|
+
propertyName: string;
|
|
55
|
+
mapping?: Record<string, RedoclyConfigJSONSchema>;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/** A `oneOf` inside an object schema; branches only narrow `required`. */
|
|
59
|
+
type SchemaOneOfFragment = {
|
|
60
|
+
oneOf?: readonly SchemaObjectFragment[];
|
|
61
|
+
discriminator?: {
|
|
62
|
+
propertyName: string;
|
|
63
|
+
mapping?: Record<string, RedoclyConfigJSONSchema>;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
type SchemaObjectFragment = {
|
|
67
|
+
required: readonly string[];
|
|
68
|
+
};
|
|
69
|
+
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Node } from '@markdoc/markdoc/dist/src/types';
|
|
2
|
+
import type { FromSchema } from 'json-schema-to-ts';
|
|
2
3
|
import type { LayoutVariant, REDOCLY_ROUTE_RBAC, REDOCLY_TEAMS_RBAC } from '../constants/shared.js';
|
|
3
4
|
import type { ProductConfig, ProductGoogleAnalyticsConfig, RbacScopeItems, RedoclyConfig, SeoConfig, BannerConfig } from './config-types.js';
|
|
4
5
|
import type { CatalogEntityConfig } from './catalog-entity-types.js';
|
|
6
|
+
import type { searchConfigSchema } from '../ex-theme-config-schemas.js';
|
|
5
7
|
export * from './code-walkthrough-types.js';
|
|
6
8
|
export type UiAccessibleConfig = Pick<RedoclyConfig, 'logo' | 'navbar' | 'products' | 'footer' | 'sidebar' | 'scripts' | 'links' | 'feedback' | 'search' | 'aiAssistant' | 'colorMode' | 'palette' | 'navigation' | 'codeSnippet' | 'markdown' | 'openapi' | 'graphql' | 'analytics' | 'userMenu' | 'versionPicker' | 'breadcrumbs' | 'catalog' | 'scorecard' | 'scorecards' | 'scorecardClassic' | 'entitiesCatalog' | 'mcp'> & {
|
|
7
9
|
auth?: {
|
|
@@ -334,3 +336,4 @@ export type ProductUiConfig = ProductConfig & {
|
|
|
334
336
|
};
|
|
335
337
|
configOverride?: ProductThemeOverrideConfig;
|
|
336
338
|
};
|
|
339
|
+
export type SearchEngineType = NonNullable<FromSchema<typeof searchConfigSchema>['engine']>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@markdoc/markdoc": "0.5.2",
|
|
23
23
|
"esbuild": "0.28.1",
|
|
24
|
-
"@redocly/openapi-core": "2.
|
|
24
|
+
"@redocly/openapi-core": "2.39.0",
|
|
25
25
|
"@types/node": "24.1.0",
|
|
26
26
|
"@types/react": "^19.2.7",
|
|
27
27
|
"@vitest/coverage-v8": "4.1.8",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
type Removed<T, Drop> = T extends Record<string, any> ? T extends ArrayLike<any> ? Array<Removed<T[number], Drop>> : {
|
|
2
|
-
[K in Exclude<keyof T, Drop>]: Removed<T[K], Drop>;
|
|
3
|
-
} : T;
|
|
4
|
-
export declare function removePropertyRecursively<TObject extends object, TProp extends string>(object: TObject, propToRemove: TProp, parentKey?: string): Removed<TObject, TProp>;
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
type Removed<T, Drop> = T extends Record<string, any> ? T extends ArrayLike<any> ? Array<Removed<T[number], Drop>> : {
|
|
2
|
-
[K in Exclude<keyof T, Drop>]: Removed<T[K], Drop>;
|
|
3
|
-
} : T;
|
|
4
|
-
export declare function removePropertyRecursively<TObject extends object, TProp extends string>(object: TObject, propToRemove: TProp, parentKey?: string): Removed<TObject, TProp>;
|
|
5
|
-
export {};
|