@redocly/config 0.0.0-beta-20240318165323

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 (52) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE.md +7 -0
  3. package/README.md +3 -0
  4. package/README_INTERNAL.md +36 -0
  5. package/lib/.tsbuildinfo +1 -0
  6. package/lib/constants.d.ts +15 -0
  7. package/lib/constants.js +22 -0
  8. package/lib/constants.js.map +1 -0
  9. package/lib/default-theme-config-schema.d.ts +3483 -0
  10. package/lib/default-theme-config-schema.js +657 -0
  11. package/lib/default-theme-config-schema.js.map +1 -0
  12. package/lib/index.d.ts +5 -0
  13. package/lib/index.js +31 -0
  14. package/lib/index.js.map +1 -0
  15. package/lib/portal-shared-types.d.ts +250 -0
  16. package/lib/portal-shared-types.js +3 -0
  17. package/lib/portal-shared-types.js.map +1 -0
  18. package/lib/root-config-schema.d.ts +7876 -0
  19. package/lib/root-config-schema.js +344 -0
  20. package/lib/root-config-schema.js.map +1 -0
  21. package/lib/types.d.ts +42 -0
  22. package/lib/types.js +3 -0
  23. package/lib/types.js.map +1 -0
  24. package/lib-esm/.tsbuildinfo +1 -0
  25. package/lib-esm/constants.d.ts +15 -0
  26. package/lib-esm/constants.js +19 -0
  27. package/lib-esm/constants.js.map +1 -0
  28. package/lib-esm/default-theme-config-schema.d.ts +3483 -0
  29. package/lib-esm/default-theme-config-schema.js +654 -0
  30. package/lib-esm/default-theme-config-schema.js.map +1 -0
  31. package/lib-esm/index.d.ts +5 -0
  32. package/lib-esm/index.js +6 -0
  33. package/lib-esm/index.js.map +1 -0
  34. package/lib-esm/portal-shared-types.d.ts +250 -0
  35. package/lib-esm/portal-shared-types.js +2 -0
  36. package/lib-esm/portal-shared-types.js.map +1 -0
  37. package/lib-esm/root-config-schema.d.ts +7876 -0
  38. package/lib-esm/root-config-schema.js +341 -0
  39. package/lib-esm/root-config-schema.js.map +1 -0
  40. package/lib-esm/types.d.ts +42 -0
  41. package/lib-esm/types.js +2 -0
  42. package/lib-esm/types.js.map +1 -0
  43. package/package.json +20 -0
  44. package/src/constants.ts +17 -0
  45. package/src/default-theme-config-schema.ts +745 -0
  46. package/src/index.ts +13 -0
  47. package/src/portal-shared-types.ts +297 -0
  48. package/src/root-config-schema.ts +389 -0
  49. package/src/types.ts +84 -0
  50. package/tsconfig.build.json +12 -0
  51. package/tsconfig.json +10 -0
  52. package/tsconfig.lib-esm.json +15 -0
@@ -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';
@@ -0,0 +1,6 @@
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';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,sCAAsC,EACtC,gBAAgB,EAChB,aAAa,EACb,kBAAkB,GACnB,MAAM,aAAa,CAAC"}
@@ -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?: BreadcrumbItem;
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 BreadcrumbItem = {
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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=portal-shared-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal-shared-types.js","sourceRoot":"","sources":["../src/portal-shared-types.ts"],"names":[],"mappings":""}