/**
* Schema for the health check data of the upsilon api gateway
*/
export class UpsilonHealthCheck extends Schema.Class<UpsilonHealthCheck>('schema:upsilon:health_check')({
is_proxy_available: Schema.optional(Schema.NullishOr(Schema.Boolean)),
is_healthy: Schema.Boolean.pipe(
Schema.propertySignature,
Schema.withConstructorDefault(() => false),
),
status: Schema.Literal('ok', 'error', 'warning').pipe(
Schema.propertySignature,
Schema.withConstructorDefault(() => 'error' as const),
),
debug_info: Schema.optionalWith(
Schema.Record({
key: Schema.String,
value: Schema.Any,
}),
{
default: () => [],
nullable: true,
exact: true,
},
),
checks: Schema.optionalWith(
Schema.Array(
Schema.Struct({
name: Schema.String,
is_cached: Schema.Boolean,
status: Schema.Literal('ok', 'error', 'warning'),
}),
),
{
default: () => [],
nullable: true,
exact: true,
},
),
}) {}
/**
* Schema for the health check data of the upsilon api gateway
*/
export class UpsilonHealthCheck extends Schema.Class<UpsilonHealthCheck>('schema:upsilon:health_check')({
is_proxy_available: Schema.optional(Schema.NullishOr(Schema.Boolean)),
is_healthy: Schema.Boolean.pipe(
Schema.propertySignature,
Schema.withConstructorDefault(() => false),
),
status: Schema.Literal('ok', 'error', 'warning').pipe(
Schema.propertySignature,
Schema.withConstructorDefault(() => 'error' as const),
),
debug_info: Schema.optionalWith(
Schema.Record({
key: Schema.String,
value: Schema.Any,
}),
{
default: () => [],
nullable: true,
exact: true,
},
),
checks: Schema.optionalWith(
Schema.Array(
Schema.Struct({
name: Schema.String,
is_cached: Schema.Boolean,
status: Schema.Literal('ok', 'error', 'warning'),
}),
),
{
default: () => [],
nullable: true,
exact: true,
},
),
}) {}