2022-06-08 14:57:39 +02:00
|
|
|
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
import { versionSchema } from './version-schema';
|
|
|
|
|
|
|
|
export const uiConfigSchema = {
|
|
|
|
$id: '#/components/schemas/uiConfigSchema',
|
|
|
|
type: 'object',
|
|
|
|
additionalProperties: false,
|
2022-06-30 14:21:40 +02:00
|
|
|
required: ['version', 'unleashUrl', 'baseUriPath', 'versionInfo'],
|
2022-06-08 14:57:39 +02:00
|
|
|
properties: {
|
|
|
|
slogan: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
version: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
2022-06-21 09:34:07 +02:00
|
|
|
environment: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
2022-06-08 14:57:39 +02:00
|
|
|
unleashUrl: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
baseUriPath: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
disablePasswordAuth: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
2022-08-09 15:58:27 +02:00
|
|
|
emailEnabled: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
2022-06-08 14:57:39 +02:00
|
|
|
segmentValuesLimit: {
|
|
|
|
type: 'number',
|
|
|
|
},
|
|
|
|
strategySegmentsLimit: {
|
|
|
|
type: 'number',
|
|
|
|
},
|
|
|
|
flags: {
|
|
|
|
type: 'object',
|
|
|
|
additionalProperties: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
links: {
|
|
|
|
type: 'array',
|
|
|
|
items: {
|
|
|
|
type: 'object',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
authenticationType: {
|
|
|
|
type: 'string',
|
|
|
|
enum: [
|
|
|
|
'open-source',
|
|
|
|
'demo',
|
|
|
|
'enterprise',
|
|
|
|
'hosted',
|
|
|
|
'custom',
|
|
|
|
'none',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
versionInfo: {
|
|
|
|
$ref: '#/components/schemas/versionSchema',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
schemas: {
|
|
|
|
versionSchema,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type UiConfigSchema = FromSchema<typeof uiConfigSchema>;
|