@redocly/config 0.6.0 → 0.6.2
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 +300 -1
- package/lib/default-theme-config-schema.js +2 -1
- package/lib/feedback-config-schema.d.ts +102 -0
- package/lib/feedback-config-schema.js +71 -0
- package/lib/graphql-config-schema.d.ts +303 -0
- package/lib/graphql-config-schema.js +129 -0
- package/lib/graphql-types.d.ts +9 -0
- package/lib/graphql-types.js +3 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/redoc-config-schema.js +2 -67
- package/lib/root-config-schema.d.ts +3587 -1837
- package/lib/root-config-schema.js +11 -7
- package/lib/types.d.ts +2 -0
- package/lib-esm/default-theme-config-schema.d.ts +300 -1
- package/lib-esm/default-theme-config-schema.js +2 -1
- package/lib-esm/feedback-config-schema.d.ts +102 -0
- package/lib-esm/feedback-config-schema.js +68 -0
- package/lib-esm/graphql-config-schema.d.ts +303 -0
- package/lib-esm/graphql-config-schema.js +126 -0
- package/lib-esm/graphql-types.d.ts +9 -0
- package/lib-esm/graphql-types.js +2 -0
- package/lib-esm/index.d.ts +1 -1
- package/lib-esm/index.js +1 -1
- package/lib-esm/redoc-config-schema.js +2 -67
- package/lib-esm/root-config-schema.d.ts +3587 -1837
- package/lib-esm/root-config-schema.js +11 -7
- package/lib-esm/types.d.ts +2 -0
- package/package.json +3 -2
- package/CHANGELOG.md +0 -74
- package/README_INTERNAL.md +0 -36
- package/lib/.tsbuildinfo +0 -1
- package/lib/constants.js.map +0 -1
- package/lib/default-theme-config-schema.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/portal-shared-types.js.map +0 -1
- package/lib/redoc-config-schema.js.map +0 -1
- package/lib/redoc-types.js.map +0 -1
- package/lib/remove-property-recursively.js.map +0 -1
- package/lib/reunite-config-schema.js.map +0 -1
- package/lib/root-config-schema.js.map +0 -1
- package/lib/types.js.map +0 -1
- package/lib-esm/.tsbuildinfo +0 -1
- package/lib-esm/constants.js.map +0 -1
- package/lib-esm/default-theme-config-schema.js.map +0 -1
- package/lib-esm/index.js.map +0 -1
- package/lib-esm/portal-shared-types.js.map +0 -1
- package/lib-esm/redoc-config-schema.js.map +0 -1
- package/lib-esm/redoc-types.js.map +0 -1
- package/lib-esm/remove-property-recursively.js.map +0 -1
- package/lib-esm/reunite-config-schema.js.map +0 -1
- package/lib-esm/root-config-schema.js.map +0 -1
- package/lib-esm/types.js.map +0 -1
- package/src/constants.ts +0 -18
- package/src/default-theme-config-schema.ts +0 -757
- package/src/index.ts +0 -14
- package/src/portal-shared-types.ts +0 -330
- package/src/redoc-config-schema.ts +0 -183
- package/src/redoc-types.ts +0 -80
- package/src/remove-property-recursively.ts +0 -39
- package/src/reunite-config-schema.ts +0 -7
- package/src/root-config-schema.ts +0 -404
- package/src/types.ts +0 -86
- package/tsconfig.build.json +0 -12
- package/tsconfig.json +0 -10
- package/tsconfig.lib-esm.json +0 -15
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DEFAULT_TEAM_CLAIM_NAME,
|
|
3
|
-
AuthProviderType,
|
|
4
|
-
ApigeeDevOnboardingIntegrationAuthType,
|
|
5
|
-
} from './constants';
|
|
6
|
-
import { themeConfigSchema } from './default-theme-config-schema';
|
|
7
|
-
import { removePropertyRecursively } from './remove-property-recursively';
|
|
8
|
-
import { reuniteConfigSchema } from './reunite-config-schema';
|
|
9
|
-
|
|
10
|
-
export const oidcIssuerMetadataSchema = {
|
|
11
|
-
type: 'object',
|
|
12
|
-
properties: {
|
|
13
|
-
end_session_endpoint: { type: 'string' },
|
|
14
|
-
token_endpoint: { type: 'string' },
|
|
15
|
-
authorization_endpoint: { type: 'string' },
|
|
16
|
-
jwks_uri: { type: 'string' },
|
|
17
|
-
},
|
|
18
|
-
required: ['token_endpoint', 'authorization_endpoint'],
|
|
19
|
-
additionalProperties: true,
|
|
20
|
-
} as const;
|
|
21
|
-
|
|
22
|
-
export const oidcProviderConfigSchema = {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
type: { type: 'string', const: AuthProviderType.OIDC },
|
|
26
|
-
title: { type: 'string' },
|
|
27
|
-
pkce: { type: 'boolean', default: false },
|
|
28
|
-
configurationUrl: { type: 'string', minLength: 1 },
|
|
29
|
-
configuration: oidcIssuerMetadataSchema,
|
|
30
|
-
clientId: { type: 'string', minLength: 1 },
|
|
31
|
-
clientSecret: { type: 'string', minLength: 0 },
|
|
32
|
-
teamsClaimName: { type: 'string' },
|
|
33
|
-
teamsClaimMap: { type: 'object', additionalProperties: { type: 'string' } },
|
|
34
|
-
defaultTeams: { type: 'array', items: { type: 'string' } },
|
|
35
|
-
scopes: { type: 'array', items: { type: 'string' } },
|
|
36
|
-
tokenExpirationTime: { type: 'number' },
|
|
37
|
-
authorizationRequestCustomParams: { type: 'object', additionalProperties: { type: 'string' } },
|
|
38
|
-
tokenRequestCustomParams: { type: 'object', additionalProperties: { type: 'string' } },
|
|
39
|
-
audience: { type: 'array', items: { type: 'string' } },
|
|
40
|
-
},
|
|
41
|
-
required: ['type', 'clientId'],
|
|
42
|
-
oneOf: [{ required: ['configurationUrl'] }, { required: ['configuration'] }],
|
|
43
|
-
additionalProperties: false,
|
|
44
|
-
} as const;
|
|
45
|
-
|
|
46
|
-
export const saml2ProviderConfigSchema = {
|
|
47
|
-
type: 'object',
|
|
48
|
-
properties: {
|
|
49
|
-
type: { type: 'string', const: AuthProviderType.SAML2 },
|
|
50
|
-
title: { type: 'string' },
|
|
51
|
-
issuerId: { type: 'string' },
|
|
52
|
-
entityId: { type: 'string' },
|
|
53
|
-
ssoUrl: { type: 'string' },
|
|
54
|
-
x509PublicCert: { type: 'string' },
|
|
55
|
-
teamsAttributeName: { type: 'string', default: DEFAULT_TEAM_CLAIM_NAME },
|
|
56
|
-
teamsAttributeMap: { type: 'object', additionalProperties: { type: 'string' } },
|
|
57
|
-
defaultTeams: { type: 'array', items: { type: 'string' } },
|
|
58
|
-
},
|
|
59
|
-
additionalProperties: false,
|
|
60
|
-
required: ['type', 'issuerId', 'ssoUrl', 'x509PublicCert'],
|
|
61
|
-
} as const;
|
|
62
|
-
|
|
63
|
-
export const basicAuthProviderConfigSchema = {
|
|
64
|
-
type: 'object',
|
|
65
|
-
properties: {
|
|
66
|
-
type: { type: 'string', const: AuthProviderType.BASIC },
|
|
67
|
-
title: { type: 'string' },
|
|
68
|
-
credentials: {
|
|
69
|
-
type: 'array',
|
|
70
|
-
items: {
|
|
71
|
-
type: 'object',
|
|
72
|
-
properties: {
|
|
73
|
-
username: { type: 'string' },
|
|
74
|
-
password: { type: 'string' },
|
|
75
|
-
passwordHash: { type: 'string' },
|
|
76
|
-
teams: { type: 'array', items: { type: 'string' } },
|
|
77
|
-
},
|
|
78
|
-
required: ['username'],
|
|
79
|
-
additionalProperties: false,
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
required: ['type', 'credentials'],
|
|
84
|
-
additionalProperties: false,
|
|
85
|
-
} as const;
|
|
86
|
-
|
|
87
|
-
export const authProviderConfigSchema = {
|
|
88
|
-
oneOf: [oidcProviderConfigSchema, saml2ProviderConfigSchema, basicAuthProviderConfigSchema],
|
|
89
|
-
discriminator: { propertyName: 'type' },
|
|
90
|
-
} as const;
|
|
91
|
-
|
|
92
|
-
export const ssoOnPremConfigSchema = {
|
|
93
|
-
type: 'object',
|
|
94
|
-
additionalProperties: authProviderConfigSchema,
|
|
95
|
-
} as const;
|
|
96
|
-
|
|
97
|
-
export const ssoConfigSchema = {
|
|
98
|
-
oneOf: [
|
|
99
|
-
{
|
|
100
|
-
type: 'array',
|
|
101
|
-
items: {
|
|
102
|
-
type: 'string',
|
|
103
|
-
enum: ['REDOCLY', 'CORPORATE', 'GUEST'],
|
|
104
|
-
},
|
|
105
|
-
uniqueItems: true,
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
type: 'string',
|
|
109
|
-
enum: ['REDOCLY', 'CORPORATE', 'GUEST'],
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
} as const;
|
|
113
|
-
|
|
114
|
-
export const redirectConfigSchema = {
|
|
115
|
-
type: 'object',
|
|
116
|
-
properties: {
|
|
117
|
-
to: { type: 'string' },
|
|
118
|
-
type: { type: 'number', default: 301 },
|
|
119
|
-
},
|
|
120
|
-
additionalProperties: false,
|
|
121
|
-
} as const;
|
|
122
|
-
|
|
123
|
-
export const redirectsConfigSchema = {
|
|
124
|
-
type: 'object',
|
|
125
|
-
additionalProperties: redirectConfigSchema,
|
|
126
|
-
default: {},
|
|
127
|
-
} as const;
|
|
128
|
-
|
|
129
|
-
export const apiConfigSchema = {
|
|
130
|
-
type: 'object',
|
|
131
|
-
properties: {
|
|
132
|
-
root: { type: 'string' },
|
|
133
|
-
output: { type: 'string', pattern: '(.ya?ml|.json)$' },
|
|
134
|
-
rbac: { type: 'object', additionalProperties: true },
|
|
135
|
-
theme: {
|
|
136
|
-
type: 'object',
|
|
137
|
-
properties: {
|
|
138
|
-
openapi: themeConfigSchema.properties.openapi,
|
|
139
|
-
graphql: themeConfigSchema.properties.graphql,
|
|
140
|
-
},
|
|
141
|
-
additionalProperties: false,
|
|
142
|
-
},
|
|
143
|
-
title: { type: 'string' },
|
|
144
|
-
metadata: { type: 'object', additionalProperties: true },
|
|
145
|
-
rules: { type: 'object', additionalProperties: true },
|
|
146
|
-
decorators: { type: 'object', additionalProperties: true },
|
|
147
|
-
preprocessors: { type: 'object', additionalProperties: true },
|
|
148
|
-
},
|
|
149
|
-
required: ['root'],
|
|
150
|
-
} as const;
|
|
151
|
-
|
|
152
|
-
const metadataConfigSchema = {
|
|
153
|
-
type: 'object',
|
|
154
|
-
additionalProperties: true,
|
|
155
|
-
} as const;
|
|
156
|
-
|
|
157
|
-
export const seoConfigSchema = {
|
|
158
|
-
type: 'object',
|
|
159
|
-
properties: {
|
|
160
|
-
title: { type: 'string' },
|
|
161
|
-
description: { type: 'string' },
|
|
162
|
-
siteUrl: { type: 'string' },
|
|
163
|
-
image: { type: 'string' },
|
|
164
|
-
keywords: {
|
|
165
|
-
oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }],
|
|
166
|
-
},
|
|
167
|
-
lang: { type: 'string' },
|
|
168
|
-
jsonLd: { type: 'object' },
|
|
169
|
-
meta: {
|
|
170
|
-
type: 'array',
|
|
171
|
-
items: {
|
|
172
|
-
type: 'object',
|
|
173
|
-
properties: {
|
|
174
|
-
name: { type: 'string' },
|
|
175
|
-
content: { type: 'string' },
|
|
176
|
-
},
|
|
177
|
-
required: ['name', 'content'],
|
|
178
|
-
additionalProperties: false,
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
additionalProperties: false,
|
|
183
|
-
} as const;
|
|
184
|
-
|
|
185
|
-
export const rbacScopeItemsSchema = {
|
|
186
|
-
type: 'object',
|
|
187
|
-
additionalProperties: { type: 'string' },
|
|
188
|
-
} as const;
|
|
189
|
-
|
|
190
|
-
export const rbacConfigSchema = {
|
|
191
|
-
type: 'object',
|
|
192
|
-
properties: {
|
|
193
|
-
teamNamePatterns: { type: 'array', items: { type: 'string' } },
|
|
194
|
-
teamFolders: { type: 'array', items: { type: 'string' } },
|
|
195
|
-
teamFoldersBaseRoles: rbacScopeItemsSchema,
|
|
196
|
-
cms: rbacScopeItemsSchema, // deprecated in favor of reunite
|
|
197
|
-
reunite: rbacScopeItemsSchema,
|
|
198
|
-
content: {
|
|
199
|
-
type: 'object',
|
|
200
|
-
properties: {
|
|
201
|
-
'**': rbacScopeItemsSchema,
|
|
202
|
-
},
|
|
203
|
-
additionalProperties: rbacScopeItemsSchema,
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
additionalProperties: rbacScopeItemsSchema,
|
|
207
|
-
} as const;
|
|
208
|
-
|
|
209
|
-
export const graviteeAdapterConfigSchema = {
|
|
210
|
-
type: 'object',
|
|
211
|
-
properties: {
|
|
212
|
-
type: { type: 'string', const: 'GRAVITEE' },
|
|
213
|
-
apiBaseUrl: { type: 'string' },
|
|
214
|
-
env: { type: 'string' },
|
|
215
|
-
allowApiProductsOutsideCatalog: { type: 'boolean', default: false },
|
|
216
|
-
stage: { type: 'string', default: 'non-production' },
|
|
217
|
-
|
|
218
|
-
auth: { type: 'object', properties: { static: { type: 'string' } } },
|
|
219
|
-
},
|
|
220
|
-
additionalProperties: false,
|
|
221
|
-
required: ['type', 'apiBaseUrl'],
|
|
222
|
-
} as const;
|
|
223
|
-
|
|
224
|
-
export const apigeeAdapterAuthOauth2Schema = {
|
|
225
|
-
type: 'object',
|
|
226
|
-
properties: {
|
|
227
|
-
type: { type: 'string', const: ApigeeDevOnboardingIntegrationAuthType.OAUTH2 },
|
|
228
|
-
tokenEndpoint: { type: 'string' },
|
|
229
|
-
clientId: { type: 'string' },
|
|
230
|
-
clientSecret: { type: 'string' },
|
|
231
|
-
},
|
|
232
|
-
additionalProperties: false,
|
|
233
|
-
required: ['type', 'tokenEndpoint', 'clientId', 'clientSecret'],
|
|
234
|
-
} as const;
|
|
235
|
-
|
|
236
|
-
export const apigeeAdapterAuthServiceAccountSchema = {
|
|
237
|
-
type: 'object',
|
|
238
|
-
properties: {
|
|
239
|
-
type: { type: 'string', const: ApigeeDevOnboardingIntegrationAuthType.SERVICE_ACCOUNT },
|
|
240
|
-
serviceAccountEmail: { type: 'string' },
|
|
241
|
-
serviceAccountPrivateKey: { type: 'string' },
|
|
242
|
-
},
|
|
243
|
-
additionalProperties: false,
|
|
244
|
-
required: ['type', 'serviceAccountEmail', 'serviceAccountPrivateKey'],
|
|
245
|
-
} as const;
|
|
246
|
-
|
|
247
|
-
export const apigeeXAdapterConfigSchema = {
|
|
248
|
-
type: 'object',
|
|
249
|
-
properties: {
|
|
250
|
-
type: { type: 'string', const: 'APIGEE_X' },
|
|
251
|
-
apiUrl: { type: 'string' },
|
|
252
|
-
stage: { type: 'string', default: 'non-production' },
|
|
253
|
-
organizationName: { type: 'string' },
|
|
254
|
-
ignoreApiProducts: { type: 'array', items: { type: 'string' } },
|
|
255
|
-
allowApiProductsOutsideCatalog: { type: 'boolean', default: false },
|
|
256
|
-
auth: {
|
|
257
|
-
type: 'object',
|
|
258
|
-
oneOf: [apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema],
|
|
259
|
-
discriminator: { propertyName: 'type' },
|
|
260
|
-
},
|
|
261
|
-
},
|
|
262
|
-
additionalProperties: false,
|
|
263
|
-
required: ['type', 'organizationName', 'auth'],
|
|
264
|
-
} as const;
|
|
265
|
-
|
|
266
|
-
export const apigeeEdgeAdapterConfigSchema = {
|
|
267
|
-
...apigeeXAdapterConfigSchema,
|
|
268
|
-
properties: {
|
|
269
|
-
...apigeeXAdapterConfigSchema.properties,
|
|
270
|
-
type: { type: 'string', const: 'APIGEE_EDGE' },
|
|
271
|
-
},
|
|
272
|
-
} as const;
|
|
273
|
-
|
|
274
|
-
export const devOnboardingAdapterConfigSchema = {
|
|
275
|
-
type: 'object',
|
|
276
|
-
oneOf: [apigeeXAdapterConfigSchema, apigeeEdgeAdapterConfigSchema, graviteeAdapterConfigSchema],
|
|
277
|
-
discriminator: { propertyName: 'type' },
|
|
278
|
-
} as const;
|
|
279
|
-
|
|
280
|
-
const devOnboardingConfigSchema = {
|
|
281
|
-
type: 'object',
|
|
282
|
-
required: ['adapters'],
|
|
283
|
-
additionalProperties: false,
|
|
284
|
-
properties: {
|
|
285
|
-
adapters: {
|
|
286
|
-
type: 'array',
|
|
287
|
-
items: devOnboardingAdapterConfigSchema,
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
} as const;
|
|
291
|
-
|
|
292
|
-
export const i18ConfigSchema = {
|
|
293
|
-
type: 'object',
|
|
294
|
-
properties: {
|
|
295
|
-
defaultLocale: {
|
|
296
|
-
type: 'string',
|
|
297
|
-
},
|
|
298
|
-
locales: {
|
|
299
|
-
type: 'array',
|
|
300
|
-
items: {
|
|
301
|
-
type: 'object',
|
|
302
|
-
properties: {
|
|
303
|
-
code: {
|
|
304
|
-
type: 'string',
|
|
305
|
-
},
|
|
306
|
-
name: {
|
|
307
|
-
type: 'string',
|
|
308
|
-
},
|
|
309
|
-
},
|
|
310
|
-
required: ['code'],
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
},
|
|
314
|
-
additionalProperties: false,
|
|
315
|
-
required: ['defaultLocale'],
|
|
316
|
-
} as const;
|
|
317
|
-
|
|
318
|
-
const responseHeaderSchema = {
|
|
319
|
-
type: 'object',
|
|
320
|
-
properties: {
|
|
321
|
-
name: { type: 'string' },
|
|
322
|
-
value: { type: 'string' },
|
|
323
|
-
},
|
|
324
|
-
additionalProperties: false,
|
|
325
|
-
required: ['name', 'value'],
|
|
326
|
-
} as const;
|
|
327
|
-
|
|
328
|
-
export const redoclyConfigSchema = {
|
|
329
|
-
type: 'object',
|
|
330
|
-
properties: {
|
|
331
|
-
licenseKey: { type: 'string' },
|
|
332
|
-
redirects: redirectsConfigSchema,
|
|
333
|
-
seo: seoConfigSchema,
|
|
334
|
-
rbac: rbacConfigSchema,
|
|
335
|
-
responseHeaders: {
|
|
336
|
-
type: 'object',
|
|
337
|
-
additionalProperties: {
|
|
338
|
-
type: 'array',
|
|
339
|
-
items: responseHeaderSchema,
|
|
340
|
-
},
|
|
341
|
-
},
|
|
342
|
-
mockServer: {
|
|
343
|
-
type: 'object',
|
|
344
|
-
properties: {
|
|
345
|
-
off: { type: 'boolean', default: false },
|
|
346
|
-
position: { type: 'string', enum: ['first', 'last', 'replace', 'off'], default: 'first' },
|
|
347
|
-
strictExamples: { type: 'boolean', default: false },
|
|
348
|
-
errorIfForcedExampleNotFound: { type: 'boolean', default: false },
|
|
349
|
-
description: { type: 'string' },
|
|
350
|
-
},
|
|
351
|
-
},
|
|
352
|
-
apis: {
|
|
353
|
-
type: 'object',
|
|
354
|
-
additionalProperties: apiConfigSchema,
|
|
355
|
-
},
|
|
356
|
-
rules: {
|
|
357
|
-
type: 'object',
|
|
358
|
-
additionalProperties: {
|
|
359
|
-
oneOf: [{ type: 'string' }, { type: 'object' }],
|
|
360
|
-
},
|
|
361
|
-
},
|
|
362
|
-
ssoOnPrem: ssoOnPremConfigSchema,
|
|
363
|
-
sso: ssoConfigSchema,
|
|
364
|
-
residency: { type: 'string' },
|
|
365
|
-
developerOnboarding: devOnboardingConfigSchema,
|
|
366
|
-
removeAttribution: { type: 'boolean' },
|
|
367
|
-
i18n: i18ConfigSchema,
|
|
368
|
-
metadata: metadataConfigSchema,
|
|
369
|
-
ignore: {
|
|
370
|
-
type: 'array',
|
|
371
|
-
items: {
|
|
372
|
-
type: 'string',
|
|
373
|
-
},
|
|
374
|
-
},
|
|
375
|
-
theme: themeConfigSchema,
|
|
376
|
-
reunite: reuniteConfigSchema,
|
|
377
|
-
},
|
|
378
|
-
default: { redirects: {} },
|
|
379
|
-
additionalProperties: true,
|
|
380
|
-
} as const;
|
|
381
|
-
|
|
382
|
-
const environmentSchema = {
|
|
383
|
-
// We don't want to populate the env override with defaults
|
|
384
|
-
// Because during merge, defaults can override values from the root config
|
|
385
|
-
...removePropertyRecursively(redoclyConfigSchema, 'default'),
|
|
386
|
-
additionalProperties: false,
|
|
387
|
-
} as const;
|
|
388
|
-
|
|
389
|
-
export const rootRedoclyConfigSchema = {
|
|
390
|
-
...redoclyConfigSchema,
|
|
391
|
-
properties: {
|
|
392
|
-
plugins: {
|
|
393
|
-
type: 'array',
|
|
394
|
-
items: { type: 'string' },
|
|
395
|
-
},
|
|
396
|
-
...redoclyConfigSchema.properties,
|
|
397
|
-
env: {
|
|
398
|
-
type: 'object',
|
|
399
|
-
additionalProperties: environmentSchema, // TODO: if we want full validation we need to override apis, theme and the root
|
|
400
|
-
},
|
|
401
|
-
},
|
|
402
|
-
default: {},
|
|
403
|
-
additionalProperties: false,
|
|
404
|
-
} as const;
|
package/src/types.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { FromSchema } from 'json-schema-to-ts';
|
|
2
|
-
import type {
|
|
3
|
-
amplitudeAnalyticsConfigSchema,
|
|
4
|
-
catalogFilterSchema,
|
|
5
|
-
catalogSchema,
|
|
6
|
-
googleAnalyticsConfigSchema,
|
|
7
|
-
gtmAnalyticsConfigSchema,
|
|
8
|
-
markdownConfigSchema,
|
|
9
|
-
productConfigSchema,
|
|
10
|
-
productGoogleAnalyticsConfigSchema,
|
|
11
|
-
rudderstackAnalyticsConfigSchema,
|
|
12
|
-
scorecardConfigSchema,
|
|
13
|
-
segmentAnalyticsConfigSchema,
|
|
14
|
-
themeConfigSchema,
|
|
15
|
-
} from './default-theme-config-schema';
|
|
16
|
-
import type {
|
|
17
|
-
apiConfigSchema,
|
|
18
|
-
apigeeAdapterAuthOauth2Schema,
|
|
19
|
-
apigeeAdapterAuthServiceAccountSchema,
|
|
20
|
-
apigeeEdgeAdapterConfigSchema,
|
|
21
|
-
apigeeXAdapterConfigSchema,
|
|
22
|
-
authProviderConfigSchema,
|
|
23
|
-
basicAuthProviderConfigSchema,
|
|
24
|
-
devOnboardingAdapterConfigSchema,
|
|
25
|
-
graviteeAdapterConfigSchema,
|
|
26
|
-
i18ConfigSchema,
|
|
27
|
-
oidcIssuerMetadataSchema,
|
|
28
|
-
oidcProviderConfigSchema,
|
|
29
|
-
rbacConfigSchema,
|
|
30
|
-
rbacScopeItemsSchema,
|
|
31
|
-
redirectConfigSchema,
|
|
32
|
-
redirectsConfigSchema,
|
|
33
|
-
rootRedoclyConfigSchema,
|
|
34
|
-
saml2ProviderConfigSchema,
|
|
35
|
-
seoConfigSchema,
|
|
36
|
-
ssoOnPremConfigSchema,
|
|
37
|
-
} from './root-config-schema';
|
|
38
|
-
import type { RedocConfigTypes } from './redoc-types';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Theme
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
export type ThemeConfig = FromSchema<typeof themeConfigSchema>;
|
|
45
|
-
export type RedocConfig = RedocConfigTypes;
|
|
46
|
-
export type ProductConfig = FromSchema<typeof productConfigSchema>;
|
|
47
|
-
export type ProductGoogleAnalyticsConfig = FromSchema<typeof productGoogleAnalyticsConfigSchema>;
|
|
48
|
-
export type MarkdownConfig = FromSchema<typeof markdownConfigSchema>;
|
|
49
|
-
export type AmplitudeAnalyticsConfig = FromSchema<typeof amplitudeAnalyticsConfigSchema>;
|
|
50
|
-
export type RudderstackAnalyticsConfig = FromSchema<typeof rudderstackAnalyticsConfigSchema>;
|
|
51
|
-
export type SegmentAnalyticsConfig = FromSchema<typeof segmentAnalyticsConfigSchema>;
|
|
52
|
-
export type GtmAnalyticsConfig = FromSchema<typeof gtmAnalyticsConfigSchema>;
|
|
53
|
-
export type GoogleAnalyticsConfig = FromSchema<typeof googleAnalyticsConfigSchema>;
|
|
54
|
-
export type CatalogConfig = FromSchema<typeof catalogSchema>;
|
|
55
|
-
export type CatalogFilterConfig = FromSchema<typeof catalogFilterSchema>;
|
|
56
|
-
export type ScorecardConfig = FromSchema<typeof scorecardConfigSchema>;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Root
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
export type RedoclyConfig<T = ThemeConfig> = FromSchema<typeof rootRedoclyConfigSchema> & {
|
|
63
|
-
theme?: T;
|
|
64
|
-
};
|
|
65
|
-
export type RedirectConfig = FromSchema<typeof redirectConfigSchema>;
|
|
66
|
-
export type RedirectsConfig = FromSchema<typeof redirectsConfigSchema>;
|
|
67
|
-
export type AuthProviderConfig = FromSchema<typeof authProviderConfigSchema>;
|
|
68
|
-
export type BasicAuthProviderConfig = FromSchema<typeof basicAuthProviderConfigSchema>;
|
|
69
|
-
export type OidcProviderConfig = FromSchema<typeof oidcProviderConfigSchema>;
|
|
70
|
-
export type Saml2ProviderConfig = FromSchema<typeof saml2ProviderConfigSchema>;
|
|
71
|
-
export type SeoConfig = FromSchema<typeof seoConfigSchema>;
|
|
72
|
-
export type RbacConfig = FromSchema<typeof rbacConfigSchema>;
|
|
73
|
-
export type RbacScopeItems = FromSchema<typeof rbacScopeItemsSchema>;
|
|
74
|
-
export type OidcIssuerMetadata = FromSchema<typeof oidcIssuerMetadataSchema>;
|
|
75
|
-
export type DevOnboardingAdapterConfig = FromSchema<typeof devOnboardingAdapterConfigSchema>;
|
|
76
|
-
export type GraviteeAdapterConfig = FromSchema<typeof graviteeAdapterConfigSchema>;
|
|
77
|
-
export type ApigeeAdapterConfig = FromSchema<
|
|
78
|
-
typeof apigeeXAdapterConfigSchema | typeof apigeeEdgeAdapterConfigSchema
|
|
79
|
-
>;
|
|
80
|
-
export type ApigeeAdapterAuthOauth2 = FromSchema<typeof apigeeAdapterAuthOauth2Schema>;
|
|
81
|
-
export type ApigeeAdapterAuthServiceAccount = FromSchema<
|
|
82
|
-
typeof apigeeAdapterAuthServiceAccountSchema
|
|
83
|
-
>;
|
|
84
|
-
export type SsoConfig = FromSchema<typeof ssoOnPremConfigSchema>;
|
|
85
|
-
export type I18nConfig = FromSchema<typeof i18ConfigSchema>;
|
|
86
|
-
export type ApiConfig = FromSchema<typeof apiConfigSchema>;
|
package/tsconfig.build.json
DELETED
package/tsconfig.json
DELETED
package/tsconfig.lib-esm.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"baseUrl": ".",
|
|
5
|
-
"rootDir": "src",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"noEmit": false,
|
|
8
|
-
"module": "ESNext",
|
|
9
|
-
"outDir": "lib-esm",
|
|
10
|
-
"composite": true,
|
|
11
|
-
"tsBuildInfoFile": "lib-esm/.tsbuildinfo",
|
|
12
|
-
"moduleResolution": "node"
|
|
13
|
-
},
|
|
14
|
-
"include": ["src"]
|
|
15
|
-
}
|
/package/{LICENSE.md → LICENSE}
RENAMED
|
File without changes
|