2022-04-25 14:17:59 +02:00
|
|
|
import { createSchemaObject, CreateSchemaType } from '../types';
|
2022-05-04 15:16:18 +02:00
|
|
|
import { featureSchema } from './feature-schema';
|
2022-04-25 14:17:59 +02:00
|
|
|
|
2022-05-04 15:16:18 +02:00
|
|
|
const schema = {
|
2022-04-25 14:17:59 +02:00
|
|
|
type: 'object',
|
2022-04-29 08:09:27 +02:00
|
|
|
additionalProperties: false,
|
2022-04-25 14:17:59 +02:00
|
|
|
required: ['version', 'features'],
|
|
|
|
properties: {
|
|
|
|
version: {
|
|
|
|
type: 'integer',
|
|
|
|
},
|
|
|
|
features: {
|
|
|
|
type: 'array',
|
2022-05-04 15:16:18 +02:00
|
|
|
items: featureSchema,
|
2022-04-25 14:17:59 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type FeaturesSchema = CreateSchemaType<typeof schema>;
|
|
|
|
|
|
|
|
export const featuresSchema = createSchemaObject(schema);
|