@djangocfg/api 1.2.21 → 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 +11030 -6472
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10395 -4022
- package/dist/index.d.ts +10395 -4022
- package/dist/index.mjs +11117 -6580
- 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__dashboard__dashboard_config.ts +48 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_charts.ts +138 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_configuration.ts +63 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +11 -11
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +77 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_testing.ts +79 -0
- package/src/cfg/generated/_utils/fetchers/index.ts +5 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +3 -3
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +36 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +126 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +51 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +9 -9
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +65 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_testing.ts +71 -0
- package/src/cfg/generated/_utils/hooks/index.ts +5 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/CentrifugoConfig.schema.ts +23 -0
- 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/ConfigData.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/ConfigMeta.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/ConfigValidation.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/DRFConfig.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/DashboardCharts.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/DatabaseConfig.schema.ts +31 -0
- package/src/cfg/generated/_utils/schemas/DjangoConfig.schema.ts +86 -0
- package/src/cfg/generated/_utils/schemas/DjangoRQConfig.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/EmailConfig.schema.ts +28 -0
- 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/GRPCCallRequestRequest.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/GRPCCallResponse.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/GRPCConfig.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/GRPCConfigDashboard.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/GRPCExampleSerializer.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/GRPCExamplesList.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/GRPCFeaturesSerializer.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/GRPCFrameworkConfigSerializer.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/GRPCHealthCheck.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/GRPCInterceptorInfoSerializer.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/GRPCServerConfigSerializer.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/GRPCServerInfo.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/GRPCServiceInfoSerializer.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/GRPCStatsSerializer.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/GRPCTestLog.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/JWTConfig.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/MethodInfoSerializer.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/MethodSummarySerializer.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/MonitoringServiceStatsSerializer.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaymentsConfig.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/PaymentsNowPayments.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/RecentErrorSerializer.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/RecentRequest.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/RedisQueueConfig.schema.ts +29 -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/ServiceDetail.schema.ts +31 -0
- package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/ServiceMethods.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ServiceStatsSerializer.schema.ts +8 -8
- package/src/cfg/generated/_utils/schemas/SpectacularConfig.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/index.ts +56 -2
- 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/client.ts +25 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_config/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_config/models.ts +240 -0
- 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/client.ts +35 -0
- package/src/cfg/generated/cfg__grpc__grpc_configuration/index.ts +2 -0
- package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +128 -0
- 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/client.ts +55 -0
- package/src/cfg/generated/cfg__grpc__grpc_services/index.ts +2 -0
- package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +138 -0
- package/src/cfg/generated/cfg__grpc__grpc_testing/client.ts +67 -0
- package/src/cfg/generated/cfg__grpc__grpc_testing/index.ts +2 -0
- package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +106 -0
- package/src/cfg/generated/cfg__payments/client.ts +1 -1
- package/src/cfg/generated/client.ts +15 -0
- package/src/cfg/generated/index.ts +25 -0
- package/src/cfg/generated/schema.ts +8264 -4968
- package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +0 -23
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for MethodSummarySerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Summary information for a method.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { MethodStatsSerializerSchema } from './MethodStatsSerializer.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Summary information for a method.
|
|
12
|
+
*/
|
|
13
|
+
export const MethodSummarySerializerSchema = z.object({
|
|
14
|
+
name: z.string(),
|
|
15
|
+
full_name: z.string(),
|
|
16
|
+
service_name: z.string(),
|
|
17
|
+
request_type: z.string().optional(),
|
|
18
|
+
response_type: z.string().optional(),
|
|
19
|
+
stats: MethodStatsSerializerSchema,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type MethodSummarySerializer = z.infer<typeof MethodSummarySerializerSchema>
|
|
@@ -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,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for PaymentsConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Payments configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { PaymentsNowPaymentsSchema } from './PaymentsNowPayments.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Payments configuration.
|
|
12
|
+
*/
|
|
13
|
+
export const PaymentsConfigSchema = z.object({
|
|
14
|
+
enabled: z.boolean().nullable().optional(),
|
|
15
|
+
nowpayments: PaymentsNowPaymentsSchema.nullable().optional(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type PaymentsConfig = z.infer<typeof PaymentsConfigSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for PaymentsNowPayments
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * NowPayments configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* NowPayments configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const PaymentsNowPaymentsSchema = z.object({
|
|
13
|
+
api_key: z.string().nullable().optional(),
|
|
14
|
+
ipn_secret: z.string().nullable().optional(),
|
|
15
|
+
sandbox: z.boolean().nullable().optional(),
|
|
16
|
+
enabled: z.boolean().nullable().optional(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type PaymentsNowPayments = z.infer<typeof PaymentsNowPaymentsSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RecentErrorSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Recent error information.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Recent error information.
|
|
11
|
+
*/
|
|
12
|
+
export const RecentErrorSerializerSchema = z.object({
|
|
13
|
+
method: z.string(),
|
|
14
|
+
error_message: z.string(),
|
|
15
|
+
grpc_status_code: z.string(),
|
|
16
|
+
occurred_at: z.string(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type RecentErrorSerializer = z.infer<typeof RecentErrorSerializerSchema>
|
|
@@ -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,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RedisQueueConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Redis Queue configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Redis Queue configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const RedisQueueConfigSchema = z.object({
|
|
13
|
+
url: z.string().nullable().optional(),
|
|
14
|
+
host: z.string().nullable().optional(),
|
|
15
|
+
port: z.int().nullable().optional(),
|
|
16
|
+
db: z.int().nullable().optional(),
|
|
17
|
+
username: z.string().nullable().optional(),
|
|
18
|
+
password: z.string().nullable().optional(),
|
|
19
|
+
default_timeout: z.int().nullable().optional(),
|
|
20
|
+
default_result_ttl: z.int().nullable().optional(),
|
|
21
|
+
sentinels: z.array(z.string()).nullable().optional(),
|
|
22
|
+
master_name: z.string().nullable().optional(),
|
|
23
|
+
socket_timeout: z.int().nullable().optional(),
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Infer TypeScript type from Zod schema
|
|
28
|
+
*/
|
|
29
|
+
export type RedisQueueConfig = z.infer<typeof RedisQueueConfigSchema>
|
|
@@ -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>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServiceDetail
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Detailed information about a service.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { MethodInfoSerializerSchema } from './MethodInfoSerializer.schema'
|
|
9
|
+
import { RecentErrorSerializerSchema } from './RecentErrorSerializer.schema'
|
|
10
|
+
import { ServiceStatsSerializerSchema } from './ServiceStatsSerializer.schema'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Detailed information about a service.
|
|
14
|
+
*/
|
|
15
|
+
export const ServiceDetailSchema = z.object({
|
|
16
|
+
name: z.string(),
|
|
17
|
+
full_name: z.string(),
|
|
18
|
+
package: z.string(),
|
|
19
|
+
description: z.string().optional(),
|
|
20
|
+
file_path: z.string().optional(),
|
|
21
|
+
class_name: z.string(),
|
|
22
|
+
base_class: z.string().optional(),
|
|
23
|
+
methods: z.array(MethodInfoSerializerSchema).optional(),
|
|
24
|
+
stats: ServiceStatsSerializerSchema,
|
|
25
|
+
recent_errors: z.array(RecentErrorSerializerSchema).optional(),
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Infer TypeScript type from Zod schema
|
|
30
|
+
*/
|
|
31
|
+
export type ServiceDetail = z.infer<typeof ServiceDetailSchema>
|
|
@@ -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
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServiceMethods
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * List of methods for a service.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { MethodSummarySerializerSchema } from './MethodSummarySerializer.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* List of methods for a service.
|
|
12
|
+
*/
|
|
13
|
+
export const ServiceMethodsSchema = z.object({
|
|
14
|
+
service_name: z.string(),
|
|
15
|
+
methods: z.array(MethodSummarySerializerSchema).optional(),
|
|
16
|
+
total_methods: z.int(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type ServiceMethods = z.infer<typeof ServiceMethodsSchema>
|
|
@@ -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
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for SpectacularConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * DRF Spectacular configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* DRF Spectacular configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const SpectacularConfigSchema = z.object({
|
|
13
|
+
title: z.string().nullable().optional(),
|
|
14
|
+
description: z.string().nullable().optional(),
|
|
15
|
+
version: z.string().nullable().optional(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type SpectacularConfig = z.infer<typeof SpectacularConfigSchema>
|