2022-06-08 15:31:34 +02:00
import { FromSchema } from 'json-schema-to-ts' ;
import { parametersSchema } from './parameters-schema' ;
import { variantSchema } from './variant-schema' ;
import { overrideSchema } from './override-schema' ;
2022-06-23 08:10:20 +02:00
import { featureStrategySchema } from './feature-strategy-schema' ;
2022-06-08 15:31:34 +02:00
import { featureSchema } from './feature-schema' ;
import { constraintSchema } from './constraint-schema' ;
import { environmentSchema } from './environment-schema' ;
2023-01-11 09:53:43 +01:00
import { featureEnvironmentSchema } from './feature-environment-schema' ;
2023-01-27 13:13:41 +01:00
import { projectStatsSchema } from './project-stats-schema' ;
2023-04-28 13:59:04 +02:00
import { createFeatureStrategySchema } from './create-feature-strategy-schema' ;
import { projectEnvironmentSchema } from './project-environment-schema' ;
2022-06-08 15:31:34 +02:00
export const healthOverviewSchema = {
$id : '#/components/schemas/healthOverviewSchema' ,
type : 'object' ,
additionalProperties : false ,
required : [ 'version' , 'name' ] ,
properties : {
version : {
type : 'number' ,
} ,
name : {
type : 'string' ,
} ,
description : {
type : 'string' ,
2023-02-14 11:25:13 +01:00
nullable : true ,
2022-06-08 15:31:34 +02:00
} ,
2023-03-17 13:41:59 +01:00
defaultStickiness : {
type : 'string' ,
example : 'userId' ,
description :
'A default stickiness for the project affecting the default stickiness value for variants and Gradual Rollout strategy' ,
} ,
2023-03-16 15:29:52 +01:00
mode : {
type : 'string' ,
enum : [ 'open' , 'protected' ] ,
example : 'open' ,
description :
2023-03-23 14:13:34 +01:00
"The project's [collaboration mode](https://docs.getunleash.io/reference/project-collaboration-mode). Determines whether non-project members can submit change requests or not." ,
2023-03-16 15:29:52 +01:00
} ,
2022-06-08 15:31:34 +02:00
members : {
type : 'number' ,
} ,
health : {
type : 'number' ,
} ,
environments : {
type : 'array' ,
items : {
2023-04-28 13:59:04 +02:00
$ref : '#/components/schemas/projectEnvironmentSchema' ,
2022-06-08 15:31:34 +02:00
} ,
} ,
features : {
type : 'array' ,
items : {
$ref : '#/components/schemas/featureSchema' ,
} ,
} ,
updatedAt : {
type : 'string' ,
format : 'date-time' ,
nullable : true ,
} ,
2022-11-30 12:41:53 +01:00
favorite : {
type : 'boolean' ,
} ,
2023-02-14 11:25:13 +01:00
stats : {
$ref : '#/components/schemas/projectStatsSchema' ,
description : 'Project statistics' ,
} ,
2022-06-08 15:31:34 +02:00
} ,
components : {
schemas : {
environmentSchema ,
2023-04-28 13:59:04 +02:00
projectEnvironmentSchema ,
createFeatureStrategySchema ,
constraintSchema ,
2022-06-08 15:31:34 +02:00
featureSchema ,
2023-01-11 09:53:43 +01:00
featureEnvironmentSchema ,
2022-06-08 15:31:34 +02:00
overrideSchema ,
parametersSchema ,
2022-06-23 08:10:20 +02:00
featureStrategySchema ,
2022-06-08 15:31:34 +02:00
variantSchema ,
2023-01-27 13:13:41 +01:00
projectStatsSchema ,
2022-06-08 15:31:34 +02:00
} ,
} ,
} as const ;
export type HealthOverviewSchema = FromSchema < typeof healthOverviewSchema > ;