@redocly/config 0.1.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/CHANGELOG.md +7 -0
- package/README.md +3 -0
- package/README_INTERNAL.md +36 -0
- package/lib/.tsbuildinfo +1 -0
- package/lib/constants.d.ts +15 -0
- package/lib/constants.js +22 -0
- package/lib/constants.js.map +1 -0
- package/lib/default-theme-config-schema.d.ts +3227 -0
- package/lib/default-theme-config-schema.js +649 -0
- package/lib/default-theme-config-schema.js.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +31 -0
- package/lib/index.js.map +1 -0
- package/lib/portal-shared-types.d.ts +250 -0
- package/lib/portal-shared-types.js +3 -0
- package/lib/portal-shared-types.js.map +1 -0
- package/lib/root-config-schema.d.ts +7603 -0
- package/lib/root-config-schema.js +344 -0
- package/lib/root-config-schema.js.map +1 -0
- package/lib/types.d.ts +42 -0
- package/lib/types.js +3 -0
- package/lib/types.js.map +1 -0
- package/package.json +19 -0
- package/src/constants.ts +17 -0
- package/src/default-theme-config-schema.ts +739 -0
- package/src/index.ts +13 -0
- package/src/portal-shared-types.ts +297 -0
- package/src/root-config-schema.ts +389 -0
- package/src/types.ts +84 -0
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +10 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { rbacConfigSchema, rootRedoclyConfigSchema } from './root-config-schema';
|
|
2
|
+
export { productThemeOverrideSchema, productConfigOverrideSchema, } from './default-theme-config-schema';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './portal-shared-types';
|
|
5
|
+
export { ApigeeDevOnboardingIntegrationAuthType, AuthProviderType, LayoutVariant, REDOCLY_TEAMS_RBAC, } from './constants';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.REDOCLY_TEAMS_RBAC = exports.LayoutVariant = exports.AuthProviderType = exports.ApigeeDevOnboardingIntegrationAuthType = exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = exports.rootRedoclyConfigSchema = exports.rbacConfigSchema = void 0;
|
|
18
|
+
var root_config_schema_1 = require("./root-config-schema");
|
|
19
|
+
Object.defineProperty(exports, "rbacConfigSchema", { enumerable: true, get: function () { return root_config_schema_1.rbacConfigSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "rootRedoclyConfigSchema", { enumerable: true, get: function () { return root_config_schema_1.rootRedoclyConfigSchema; } });
|
|
21
|
+
var default_theme_config_schema_1 = require("./default-theme-config-schema");
|
|
22
|
+
Object.defineProperty(exports, "productThemeOverrideSchema", { enumerable: true, get: function () { return default_theme_config_schema_1.productThemeOverrideSchema; } });
|
|
23
|
+
Object.defineProperty(exports, "productConfigOverrideSchema", { enumerable: true, get: function () { return default_theme_config_schema_1.productConfigOverrideSchema; } });
|
|
24
|
+
__exportStar(require("./types"), exports);
|
|
25
|
+
__exportStar(require("./portal-shared-types"), exports);
|
|
26
|
+
var constants_1 = require("./constants");
|
|
27
|
+
Object.defineProperty(exports, "ApigeeDevOnboardingIntegrationAuthType", { enumerable: true, get: function () { return constants_1.ApigeeDevOnboardingIntegrationAuthType; } });
|
|
28
|
+
Object.defineProperty(exports, "AuthProviderType", { enumerable: true, get: function () { return constants_1.AuthProviderType; } });
|
|
29
|
+
Object.defineProperty(exports, "LayoutVariant", { enumerable: true, get: function () { return constants_1.LayoutVariant; } });
|
|
30
|
+
Object.defineProperty(exports, "REDOCLY_TEAMS_RBAC", { enumerable: true, get: function () { return constants_1.REDOCLY_TEAMS_RBAC; } });
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2DAAiF;AAAxE,sHAAA,gBAAgB,OAAA;AAAE,6HAAA,uBAAuB,OAAA;AAClD,6EAGuC;AAFrC,yIAAA,0BAA0B,OAAA;AAC1B,0IAAA,2BAA2B,OAAA;AAE7B,0CAAwB;AACxB,wDAAsC;AACtC,yCAKqB;AAJnB,mIAAA,sCAAsC,OAAA;AACtC,6GAAA,gBAAgB,OAAA;AAChB,0GAAA,aAAa,OAAA;AACb,+GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import type { Node } from '@markdoc/markdoc/dist/src/types';
|
|
2
|
+
import type { LayoutVariant, REDOCLY_TEAMS_RBAC } from './constants';
|
|
3
|
+
import type { ProductConfig, ProductGoogleAnalyticsConfig, RbacScopeItems, SeoConfig, ThemeConfig } from './types';
|
|
4
|
+
export type ThemeUIConfig = ThemeConfig & {
|
|
5
|
+
auth?: {
|
|
6
|
+
idpsInfo?: {
|
|
7
|
+
idpId: string;
|
|
8
|
+
type: string;
|
|
9
|
+
title: string | undefined;
|
|
10
|
+
}[];
|
|
11
|
+
devLogin?: boolean;
|
|
12
|
+
loginUrls?: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
search?: {
|
|
15
|
+
shortcuts?: string[];
|
|
16
|
+
suggestedPages?: any[];
|
|
17
|
+
};
|
|
18
|
+
breadcrumbs?: {
|
|
19
|
+
prefixItems?: ResolvedNavLinkItem[];
|
|
20
|
+
};
|
|
21
|
+
products?: {
|
|
22
|
+
[key: string]: ProductUiConfig;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type ResolvedNavLinkItem = {
|
|
26
|
+
type: 'link';
|
|
27
|
+
fsPath?: string;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
link: string;
|
|
30
|
+
label: string;
|
|
31
|
+
labelTranslationKey?: string;
|
|
32
|
+
items?: ResolvedNavItem[];
|
|
33
|
+
sidebar?: ResolvedNavItem[];
|
|
34
|
+
external?: boolean;
|
|
35
|
+
target?: '_self' | '_blank';
|
|
36
|
+
version?: string;
|
|
37
|
+
isDefault?: boolean;
|
|
38
|
+
versionFolderId?: string;
|
|
39
|
+
httpVerb?: string;
|
|
40
|
+
separatorLine?: boolean;
|
|
41
|
+
routeSlug?: string;
|
|
42
|
+
active?: boolean;
|
|
43
|
+
icon?: string;
|
|
44
|
+
srcSet?: string;
|
|
45
|
+
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;
|
|
46
|
+
linkedSidebars?: string[];
|
|
47
|
+
languageInsensitive?: boolean;
|
|
48
|
+
};
|
|
49
|
+
export type ResolvedNavGroupItem = {
|
|
50
|
+
type: 'group';
|
|
51
|
+
fsPath?: string;
|
|
52
|
+
metadata?: Record<string, unknown>;
|
|
53
|
+
link?: string;
|
|
54
|
+
label?: string;
|
|
55
|
+
labelTranslationKey?: string;
|
|
56
|
+
items?: ResolvedNavItem[];
|
|
57
|
+
sidebar?: ResolvedNavItem[];
|
|
58
|
+
external?: boolean;
|
|
59
|
+
target?: '_self' | '_blank';
|
|
60
|
+
expanded?: string;
|
|
61
|
+
selectFirstItemOnExpand?: boolean;
|
|
62
|
+
version?: string;
|
|
63
|
+
isDefault?: boolean;
|
|
64
|
+
versionFolderId?: string;
|
|
65
|
+
menuStyle?: MenuStyle;
|
|
66
|
+
separatorLine?: boolean;
|
|
67
|
+
routeSlug?: string;
|
|
68
|
+
active?: boolean;
|
|
69
|
+
icon?: string;
|
|
70
|
+
srcSet?: string;
|
|
71
|
+
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;
|
|
72
|
+
linkedSidebars?: string[];
|
|
73
|
+
languageInsensitive?: boolean;
|
|
74
|
+
};
|
|
75
|
+
export type ResolvedNavItem = ResolvedNavLinkItem | ResolvedNavGroupItem | {
|
|
76
|
+
type: 'separator';
|
|
77
|
+
fsPath?: never;
|
|
78
|
+
metadata?: Record<string, unknown>;
|
|
79
|
+
label?: string;
|
|
80
|
+
labelTranslationKey?: string;
|
|
81
|
+
routeSlug?: never;
|
|
82
|
+
version?: string;
|
|
83
|
+
isDefault?: boolean;
|
|
84
|
+
versionFolderId?: string;
|
|
85
|
+
separatorLine?: boolean;
|
|
86
|
+
linePosition?: 'top' | 'bottom';
|
|
87
|
+
link?: undefined;
|
|
88
|
+
items?: ResolvedNavItem[];
|
|
89
|
+
sidebar?: ResolvedNavItem[];
|
|
90
|
+
linkedSidebars?: string[];
|
|
91
|
+
icon?: string;
|
|
92
|
+
srcSet?: string;
|
|
93
|
+
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;
|
|
94
|
+
languageInsensitive?: boolean;
|
|
95
|
+
} | {
|
|
96
|
+
type: 'error';
|
|
97
|
+
fsPath?: never;
|
|
98
|
+
version?: string;
|
|
99
|
+
isDefault?: boolean;
|
|
100
|
+
versionFolderId?: string;
|
|
101
|
+
metadata?: Record<string, unknown>;
|
|
102
|
+
routeSlug?: never;
|
|
103
|
+
label: string;
|
|
104
|
+
labelTranslationKey?: string;
|
|
105
|
+
link?: undefined;
|
|
106
|
+
items?: ResolvedNavItem[];
|
|
107
|
+
sidebar?: ResolvedNavItem[];
|
|
108
|
+
linkedSidebars?: string[];
|
|
109
|
+
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;
|
|
110
|
+
icon?: string;
|
|
111
|
+
srcSet?: string;
|
|
112
|
+
languageInsensitive?: boolean;
|
|
113
|
+
};
|
|
114
|
+
export type ResolvedNavItemWithLink = (ResolvedNavLinkItem | ResolvedNavGroupItem) & {
|
|
115
|
+
link: string;
|
|
116
|
+
};
|
|
117
|
+
export type ResolvedSidebar = {
|
|
118
|
+
relatedNavbarItem?: Breadcrumb;
|
|
119
|
+
items: ResolvedNavItem[];
|
|
120
|
+
};
|
|
121
|
+
export interface PageProps {
|
|
122
|
+
metadata?: Record<string, unknown>;
|
|
123
|
+
seo?: SeoConfig;
|
|
124
|
+
frontmatter?: Omit<PageProps, 'frontmatter'> & {
|
|
125
|
+
theme?: any;
|
|
126
|
+
settings?: any;
|
|
127
|
+
};
|
|
128
|
+
disableAutoScroll?: boolean;
|
|
129
|
+
lastModified?: string | null;
|
|
130
|
+
[k: string]: unknown;
|
|
131
|
+
dynamicMarkdocComponents?: string[];
|
|
132
|
+
markdown?: MdOptions;
|
|
133
|
+
openapiOptions?: OpenAPIOptions;
|
|
134
|
+
definitionId?: string;
|
|
135
|
+
variables?: {
|
|
136
|
+
lang?: string;
|
|
137
|
+
rbac?: {
|
|
138
|
+
teams: string[];
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
export interface MdOptions {
|
|
143
|
+
partials: Record<string, Node>;
|
|
144
|
+
variables?: Record<string, any>;
|
|
145
|
+
}
|
|
146
|
+
export interface PageStaticData {
|
|
147
|
+
props?: PageProps;
|
|
148
|
+
[k: string]: unknown;
|
|
149
|
+
}
|
|
150
|
+
export type UserData = {
|
|
151
|
+
isAuthenticated: boolean;
|
|
152
|
+
name: string;
|
|
153
|
+
picture: string;
|
|
154
|
+
logoutDisabled?: boolean;
|
|
155
|
+
};
|
|
156
|
+
export interface PageData {
|
|
157
|
+
templateId: string;
|
|
158
|
+
redirectTo?: string;
|
|
159
|
+
sharedDataIds: Record<string, string>;
|
|
160
|
+
props: PageProps;
|
|
161
|
+
versions?: Version[];
|
|
162
|
+
userData: UserData;
|
|
163
|
+
}
|
|
164
|
+
export type NavItem = {
|
|
165
|
+
page?: string;
|
|
166
|
+
directory?: string;
|
|
167
|
+
group?: string;
|
|
168
|
+
groupTranslationKey?: string;
|
|
169
|
+
label?: string;
|
|
170
|
+
labelTranslationKey?: string;
|
|
171
|
+
href?: string;
|
|
172
|
+
items?: NavItem[];
|
|
173
|
+
separator?: string;
|
|
174
|
+
separatorTranslationKey?: string;
|
|
175
|
+
separatorLine?: boolean;
|
|
176
|
+
linePosition?: 'top' | 'bottom';
|
|
177
|
+
version?: string;
|
|
178
|
+
menuStyle?: MenuStyle;
|
|
179
|
+
external?: boolean;
|
|
180
|
+
target?: '_self' | '_blank';
|
|
181
|
+
expanded?: boolean | 'always';
|
|
182
|
+
selectFirstItemOnExpand?: boolean;
|
|
183
|
+
flatten?: boolean;
|
|
184
|
+
icon?: string | {
|
|
185
|
+
srcSet: string;
|
|
186
|
+
};
|
|
187
|
+
rbac?: RbacScopeItems;
|
|
188
|
+
linkedSidebars?: string[];
|
|
189
|
+
$ref?: string;
|
|
190
|
+
disconnect?: boolean;
|
|
191
|
+
};
|
|
192
|
+
export interface LogoConfig {
|
|
193
|
+
image?: string;
|
|
194
|
+
srcSet?: string;
|
|
195
|
+
altText?: string;
|
|
196
|
+
link?: string;
|
|
197
|
+
favicon?: string;
|
|
198
|
+
}
|
|
199
|
+
export type Version = {
|
|
200
|
+
version: string;
|
|
201
|
+
label: string;
|
|
202
|
+
link: string;
|
|
203
|
+
default: boolean;
|
|
204
|
+
active: boolean;
|
|
205
|
+
notExists?: boolean;
|
|
206
|
+
folderId: string;
|
|
207
|
+
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;
|
|
208
|
+
};
|
|
209
|
+
export type VersionConfigItem = {
|
|
210
|
+
version: string;
|
|
211
|
+
name?: string;
|
|
212
|
+
};
|
|
213
|
+
export type VersionsConfigType = {
|
|
214
|
+
versions: VersionConfigItem[];
|
|
215
|
+
default?: string;
|
|
216
|
+
};
|
|
217
|
+
export type VersionedFolderConfig = {
|
|
218
|
+
versionedFiles: Map<string, Set<string>>;
|
|
219
|
+
defaultVersion?: string;
|
|
220
|
+
versions: VersionConfigItem[];
|
|
221
|
+
hasVersionsConfig?: boolean;
|
|
222
|
+
};
|
|
223
|
+
export type NavGroup = ResolvedNavItem[] | undefined | string | boolean | number;
|
|
224
|
+
export type NavGroupRecord = Record<string, NavGroup>;
|
|
225
|
+
export type ResolvedConfigLinks = NavGroup | NavGroupRecord;
|
|
226
|
+
export type RawNavConfigItem = NavItem | NavItem[] | string | undefined | boolean | number;
|
|
227
|
+
export type RawNavConfig = RawNavConfigItem | Record<string, RawNavConfigItem>;
|
|
228
|
+
export type OpenAPIOptions = {
|
|
229
|
+
showRightPanelToggle?: boolean;
|
|
230
|
+
layout?: LayoutVariant;
|
|
231
|
+
collapsedSidebar?: boolean;
|
|
232
|
+
};
|
|
233
|
+
export type MenuStyle = 'drilldown';
|
|
234
|
+
export type Breadcrumb = {
|
|
235
|
+
label: string;
|
|
236
|
+
link?: string;
|
|
237
|
+
};
|
|
238
|
+
export type ProductThemeOverrideConfig = Pick<ThemeUIConfig, 'logo' | 'navbar' | 'footer' | 'sidebar' | 'search' | 'codeSnippet' | 'breadcrumbs'> & {
|
|
239
|
+
analytics?: {
|
|
240
|
+
ga?: ProductGoogleAnalyticsConfig;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
export type ProductUiConfig = ProductConfig & {
|
|
244
|
+
slug: string;
|
|
245
|
+
link: string;
|
|
246
|
+
[REDOCLY_TEAMS_RBAC]?: {
|
|
247
|
+
[key: string]: string;
|
|
248
|
+
};
|
|
249
|
+
themeOverride?: ProductThemeOverrideConfig;
|
|
250
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-shared-types.js","sourceRoot":"","sources":["../src/portal-shared-types.ts"],"names":[],"mappings":""}
|