@djangocfg/api 1.2.22 → 1.2.23
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/dist/index.cjs +4228 -2450
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3122 -738
- package/dist/index.d.ts +3122 -738
- package/dist/index.mjs +4140 -2370
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +3 -3
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_charts.ts +138 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +11 -11
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_testing.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +3 -3
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +126 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +9 -9
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_testing.ts +4 -4
- package/src/cfg/generated/_utils/hooks/index.ts +1 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/{OverviewStats.schema.ts → CentrifugoOverviewStats.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/DashboardCharts.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/DjangoRQConfig.schema.ts +8 -1
- package/src/cfg/generated/_utils/schemas/ErrorDistributionChart.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ErrorDistributionChartSerializer.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ErrorDistributionDataPoint.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/GRPCHealthCheck.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/GRPCServerConfigSerializer.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/GRPCServerInfo.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/{GRPCTestLogSerializer.schema.ts → GRPCTestLog.schema.ts} +4 -4
- package/src/cfg/generated/_utils/schemas/MonitoringServiceStatsSerializer.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/RecentRequest.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/RequestVolumeChart.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/RequestVolumeChartSerializer.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/RequestVolumeDataPoint.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/ResponseTimeChart.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ResponseTimeChartSerializer.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ResponseTimeDataPoint.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ServerLifecycleChart.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ServerLifecycleEvent.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ServerUptimeChart.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ServerUptimeChartSerializer.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ServerUptimeDataPoint.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ServiceActivityChart.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ServiceActivityChartSerializer.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ServiceActivityDataPoint.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/ServiceStatsSerializer.schema.ts +8 -8
- package/src/cfg/generated/_utils/schemas/index.ts +24 -4
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +5 -5
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +4 -4
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +1 -1
- package/src/cfg/generated/cfg__dashboard__dashboard_config/models.ts +26 -1
- package/src/cfg/generated/cfg__endpoints/client.ts +1 -1
- package/src/cfg/generated/cfg__grpc__grpc_charts/client.ts +162 -0
- package/src/cfg/generated/cfg__grpc__grpc_charts/index.ts +2 -0
- package/src/cfg/generated/cfg__grpc__grpc_charts/models.ts +335 -0
- package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +2 -2
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +12 -11
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +45 -31
- package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +11 -11
- package/src/cfg/generated/cfg__grpc__grpc_testing/client.ts +9 -10
- package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +22 -38
- package/src/cfg/generated/cfg__payments/client.ts +1 -1
- package/src/cfg/generated/client.ts +3 -0
- package/src/cfg/generated/index.ts +5 -0
- package/src/cfg/generated/schema.ts +1621 -342
- package/src/cfg/generated/_utils/schemas/GRPCTestLogs.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +0 -23
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ErrorDistributionChartSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Error distribution chart data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ErrorDistributionDataPointSchema } from './ErrorDistributionDataPoint.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Error distribution chart data.
|
|
12
|
+
*/
|
|
13
|
+
export const ErrorDistributionChartSerializerSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
error_types: z.array(ErrorDistributionDataPointSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
total_errors: z.int(),
|
|
18
|
+
most_common_error: z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type ErrorDistributionChartSerializer = z.infer<typeof ErrorDistributionChartSerializerSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ErrorDistributionDataPoint
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Error distribution data point.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Error distribution data point.
|
|
11
|
+
*/
|
|
12
|
+
export const ErrorDistributionDataPointSchema = z.object({
|
|
13
|
+
error_code: z.string(),
|
|
14
|
+
count: z.int(),
|
|
15
|
+
percentage: z.number(),
|
|
16
|
+
service_name: z.string().nullable().optional(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type ErrorDistributionDataPoint = z.infer<typeof ErrorDistributionDataPointSchema>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCHealthCheck
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * gRPC health check response.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* gRPC health check response.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCHealthCheckSchema = z.object({
|
|
13
|
+
status: z.string(),
|
|
14
|
+
server_host: z.string(),
|
|
15
|
+
server_port: z.int(),
|
|
16
|
+
enabled: z.boolean(),
|
|
17
|
+
timestamp: z.string(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type GRPCHealthCheck = z.infer<typeof GRPCHealthCheckSchema>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCOverviewStats
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Overview statistics for gRPC requests.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Overview statistics for gRPC requests.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCOverviewStatsSchema = z.object({
|
|
13
|
+
total: z.int(),
|
|
14
|
+
successful: z.int(),
|
|
15
|
+
errors: z.int(),
|
|
16
|
+
cancelled: z.int(),
|
|
17
|
+
timeout: z.int(),
|
|
18
|
+
success_rate: z.number(),
|
|
19
|
+
avg_duration_ms: z.number(),
|
|
20
|
+
p95_duration_ms: z.number(),
|
|
21
|
+
period_hours: z.int(),
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Infer TypeScript type from Zod schema
|
|
26
|
+
*/
|
|
27
|
+
export type GRPCOverviewStats = z.infer<typeof GRPCOverviewStatsSchema>
|
|
@@ -16,7 +16,7 @@ export const GRPCServerInfoSchema = z.object({
|
|
|
16
16
|
server_status: z.string(),
|
|
17
17
|
address: z.string(),
|
|
18
18
|
started_at: z.string().nullable().optional(),
|
|
19
|
-
uptime_seconds: z.
|
|
19
|
+
uptime_seconds: z.int().nullable().optional(),
|
|
20
20
|
services: z.array(GRPCServiceInfoSerializerSchema).optional(),
|
|
21
21
|
interceptors: z.array(GRPCInterceptorInfoSerializerSchema).optional(),
|
|
22
22
|
stats: GRPCStatsSerializerSchema,
|
package/src/cfg/generated/_utils/schemas/{GRPCTestLogSerializer.schema.ts → GRPCTestLog.schema.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Zod schema for
|
|
2
|
+
* Zod schema for GRPCTestLog
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Single test log entry.
|
|
@@ -9,14 +9,14 @@ import { z } from 'zod'
|
|
|
9
9
|
/**
|
|
10
10
|
* Single test log entry.
|
|
11
11
|
*/
|
|
12
|
-
export const
|
|
12
|
+
export const GRPCTestLogSchema = z.object({
|
|
13
13
|
request_id: z.string(),
|
|
14
14
|
service: z.string(),
|
|
15
15
|
method: z.string(),
|
|
16
16
|
status: z.string(),
|
|
17
17
|
grpc_status_code: z.string().nullable().optional(),
|
|
18
18
|
error_message: z.string().nullable().optional(),
|
|
19
|
-
duration_ms: z.
|
|
19
|
+
duration_ms: z.int().nullable().optional(),
|
|
20
20
|
created_at: z.string(),
|
|
21
21
|
user: z.string().nullable().optional(),
|
|
22
22
|
})
|
|
@@ -24,4 +24,4 @@ export const GRPCTestLogSerializerSchema = z.object({
|
|
|
24
24
|
/**
|
|
25
25
|
* Infer TypeScript type from Zod schema
|
|
26
26
|
*/
|
|
27
|
-
export type
|
|
27
|
+
export type GRPCTestLog = z.infer<typeof GRPCTestLogSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for MonitoringServiceStatsSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Statistics for a single gRPC service (monitoring endpoint).
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Statistics for a single gRPC service (monitoring endpoint).
|
|
11
|
+
*/
|
|
12
|
+
export const MonitoringServiceStatsSerializerSchema = z.object({
|
|
13
|
+
service_name: z.string(),
|
|
14
|
+
total: z.int(),
|
|
15
|
+
successful: z.int(),
|
|
16
|
+
errors: z.int(),
|
|
17
|
+
avg_duration_ms: z.number(),
|
|
18
|
+
last_activity_at: z.string().nullable(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type MonitoringServiceStatsSerializer = z.infer<typeof MonitoringServiceStatsSerializerSchema>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RecentRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Recent request information.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Recent request information.
|
|
11
|
+
*/
|
|
12
|
+
export const RecentRequestSchema = z.object({
|
|
13
|
+
id: z.int(),
|
|
14
|
+
request_id: z.string(),
|
|
15
|
+
service_name: z.string(),
|
|
16
|
+
method_name: z.string(),
|
|
17
|
+
status: z.string(),
|
|
18
|
+
duration_ms: z.int().optional(),
|
|
19
|
+
grpc_status_code: z.string().optional(),
|
|
20
|
+
error_message: z.string().optional(),
|
|
21
|
+
created_at: z.string(),
|
|
22
|
+
client_ip: z.string().optional(),
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Infer TypeScript type from Zod schema
|
|
27
|
+
*/
|
|
28
|
+
export type RecentRequest = z.infer<typeof RecentRequestSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RequestVolumeChart
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Request volume over time chart data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { RequestVolumeDataPointSchema } from './RequestVolumeDataPoint.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Request volume over time chart data.
|
|
12
|
+
*/
|
|
13
|
+
export const RequestVolumeChartSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
data_points: z.array(RequestVolumeDataPointSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
granularity: z.string(),
|
|
18
|
+
total_requests: z.int(),
|
|
19
|
+
avg_success_rate: z.number(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type RequestVolumeChart = z.infer<typeof RequestVolumeChartSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RequestVolumeChartSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Request volume over time chart data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { RequestVolumeDataPointSchema } from './RequestVolumeDataPoint.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Request volume over time chart data.
|
|
12
|
+
*/
|
|
13
|
+
export const RequestVolumeChartSerializerSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
data_points: z.array(RequestVolumeDataPointSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
granularity: z.string(),
|
|
18
|
+
total_requests: z.int(),
|
|
19
|
+
avg_success_rate: z.number(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type RequestVolumeChartSerializer = z.infer<typeof RequestVolumeChartSerializerSchema>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RequestVolumeDataPoint
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Request volume data point.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Request volume data point.
|
|
11
|
+
*/
|
|
12
|
+
export const RequestVolumeDataPointSchema = z.object({
|
|
13
|
+
timestamp: z.string(),
|
|
14
|
+
total_requests: z.int(),
|
|
15
|
+
successful_requests: z.int(),
|
|
16
|
+
failed_requests: z.int(),
|
|
17
|
+
success_rate: z.number(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type RequestVolumeDataPoint = z.infer<typeof RequestVolumeDataPointSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ResponseTimeChart
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Response time over time chart data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ResponseTimeDataPointSchema } from './ResponseTimeDataPoint.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Response time over time chart data.
|
|
12
|
+
*/
|
|
13
|
+
export const ResponseTimeChartSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
data_points: z.array(ResponseTimeDataPointSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
granularity: z.string(),
|
|
18
|
+
overall_avg_ms: z.number(),
|
|
19
|
+
overall_p95_ms: z.number(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type ResponseTimeChart = z.infer<typeof ResponseTimeChartSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ResponseTimeChartSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Response time over time chart data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ResponseTimeDataPointSchema } from './ResponseTimeDataPoint.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Response time over time chart data.
|
|
12
|
+
*/
|
|
13
|
+
export const ResponseTimeChartSerializerSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
data_points: z.array(ResponseTimeDataPointSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
granularity: z.string(),
|
|
18
|
+
overall_avg_ms: z.number(),
|
|
19
|
+
overall_p95_ms: z.number(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type ResponseTimeChartSerializer = z.infer<typeof ResponseTimeChartSerializerSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ResponseTimeDataPoint
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Response time statistics data point.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Response time statistics data point.
|
|
11
|
+
*/
|
|
12
|
+
export const ResponseTimeDataPointSchema = z.object({
|
|
13
|
+
timestamp: z.string(),
|
|
14
|
+
avg_duration_ms: z.number(),
|
|
15
|
+
p50_duration_ms: z.number(),
|
|
16
|
+
p95_duration_ms: z.number(),
|
|
17
|
+
p99_duration_ms: z.number(),
|
|
18
|
+
min_duration_ms: z.number(),
|
|
19
|
+
max_duration_ms: z.number(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type ResponseTimeDataPoint = z.infer<typeof ResponseTimeDataPointSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServerLifecycleChart
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Server lifecycle events timeline.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ServerLifecycleEventSchema } from './ServerLifecycleEvent.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Server lifecycle events timeline.
|
|
12
|
+
*/
|
|
13
|
+
export const ServerLifecycleChartSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
events: z.array(ServerLifecycleEventSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
total_events: z.int(),
|
|
18
|
+
restart_count: z.int(),
|
|
19
|
+
error_count: z.int(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type ServerLifecycleChart = z.infer<typeof ServerLifecycleChartSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServerLifecycleEvent
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Server lifecycle event.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Server lifecycle event.
|
|
11
|
+
*/
|
|
12
|
+
export const ServerLifecycleEventSchema = z.object({
|
|
13
|
+
timestamp: z.string(),
|
|
14
|
+
event_type: z.string(),
|
|
15
|
+
server_address: z.string(),
|
|
16
|
+
server_pid: z.int(),
|
|
17
|
+
uptime_seconds: z.int().nullable().optional(),
|
|
18
|
+
error_message: z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type ServerLifecycleEvent = z.infer<typeof ServerLifecycleEventSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServerUptimeChart
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Server uptime over time chart data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ServerUptimeDataPointSchema } from './ServerUptimeDataPoint.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Server uptime over time chart data.
|
|
12
|
+
*/
|
|
13
|
+
export const ServerUptimeChartSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
data_points: z.array(ServerUptimeDataPointSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
granularity: z.string(),
|
|
18
|
+
total_servers: z.int(),
|
|
19
|
+
currently_running: z.int(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type ServerUptimeChart = z.infer<typeof ServerUptimeChartSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServerUptimeChartSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Server uptime over time chart data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ServerUptimeDataPointSchema } from './ServerUptimeDataPoint.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Server uptime over time chart data.
|
|
12
|
+
*/
|
|
13
|
+
export const ServerUptimeChartSerializerSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
data_points: z.array(ServerUptimeDataPointSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
granularity: z.string(),
|
|
18
|
+
total_servers: z.int(),
|
|
19
|
+
currently_running: z.int(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type ServerUptimeChartSerializer = z.infer<typeof ServerUptimeChartSerializerSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServerUptimeDataPoint
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Server uptime data point.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Server uptime data point.
|
|
11
|
+
*/
|
|
12
|
+
export const ServerUptimeDataPointSchema = z.object({
|
|
13
|
+
timestamp: z.string(),
|
|
14
|
+
server_count: z.int(),
|
|
15
|
+
servers: z.array(z.string()).optional(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type ServerUptimeDataPoint = z.infer<typeof ServerUptimeDataPointSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServiceActivityChart
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Service activity comparison chart data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ServiceActivityDataPointSchema } from './ServiceActivityDataPoint.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Service activity comparison chart data.
|
|
12
|
+
*/
|
|
13
|
+
export const ServiceActivityChartSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
services: z.array(ServiceActivityDataPointSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
total_services: z.int(),
|
|
18
|
+
most_active_service: z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type ServiceActivityChart = z.infer<typeof ServiceActivityChartSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServiceActivityChartSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Service activity comparison chart data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ServiceActivityDataPointSchema } from './ServiceActivityDataPoint.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Service activity comparison chart data.
|
|
12
|
+
*/
|
|
13
|
+
export const ServiceActivityChartSerializerSchema = z.object({
|
|
14
|
+
title: z.string().optional(),
|
|
15
|
+
services: z.array(ServiceActivityDataPointSchema).optional(),
|
|
16
|
+
period_hours: z.int(),
|
|
17
|
+
total_services: z.int(),
|
|
18
|
+
most_active_service: z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type ServiceActivityChartSerializer = z.infer<typeof ServiceActivityChartSerializerSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServiceActivityDataPoint
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Service activity data point.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Service activity data point.
|
|
11
|
+
*/
|
|
12
|
+
export const ServiceActivityDataPointSchema = z.object({
|
|
13
|
+
service_name: z.string(),
|
|
14
|
+
request_count: z.int(),
|
|
15
|
+
success_rate: z.number(),
|
|
16
|
+
avg_duration_ms: z.number(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type ServiceActivityDataPoint = z.infer<typeof ServiceActivityDataPointSchema>
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* * List of gRPC services with statistics.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
|
-
import {
|
|
8
|
+
import { MonitoringServiceStatsSerializerSchema } from './MonitoringServiceStatsSerializer.schema'
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* List of gRPC services with statistics.
|
|
12
12
|
*/
|
|
13
13
|
export const ServiceListSchema = z.object({
|
|
14
|
-
services: z.array(
|
|
14
|
+
services: z.array(MonitoringServiceStatsSerializerSchema),
|
|
15
15
|
total_services: z.int(),
|
|
16
16
|
})
|
|
17
17
|
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
* Zod schema for ServiceStatsSerializer
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
|
-
* *
|
|
5
|
+
* * Service statistics.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Service statistics.
|
|
11
11
|
*/
|
|
12
12
|
export const ServiceStatsSerializerSchema = z.object({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
avg_duration_ms: z.number(),
|
|
18
|
-
|
|
13
|
+
total_requests: z.int().optional(),
|
|
14
|
+
successful: z.int().optional(),
|
|
15
|
+
errors: z.int().optional(),
|
|
16
|
+
success_rate: z.number().optional(),
|
|
17
|
+
avg_duration_ms: z.number().optional(),
|
|
18
|
+
last_24h_requests: z.int().optional(),
|
|
19
19
|
})
|
|
20
20
|
|
|
21
21
|
/**
|