@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,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for DjangoConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Typed serializer for user's DjangoConfig settings.
|
|
6
|
+
|
|
7
|
+
Reflects the actual structure of DjangoConfig model.
|
|
8
|
+
All passwords and sensitive data are sanitized before reaching this serializer.
|
|
9
|
+
* */
|
|
10
|
+
import { z } from 'zod'
|
|
11
|
+
import { CentrifugoConfigSchema } from './CentrifugoConfig.schema'
|
|
12
|
+
import { ConfigMetaSchema } from './ConfigMeta.schema'
|
|
13
|
+
import { DRFConfigSchema } from './DRFConfig.schema'
|
|
14
|
+
import { DjangoRQConfigSchema } from './DjangoRQConfig.schema'
|
|
15
|
+
import { EmailConfigSchema } from './EmailConfig.schema'
|
|
16
|
+
import { GRPCConfigDashboardSchema } from './GRPCConfigDashboard.schema'
|
|
17
|
+
import { JWTConfigSchema } from './JWTConfig.schema'
|
|
18
|
+
import { PaymentsConfigSchema } from './PaymentsConfig.schema'
|
|
19
|
+
import { SpectacularConfigSchema } from './SpectacularConfig.schema'
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Typed serializer for user's DjangoConfig settings.
|
|
23
|
+
|
|
24
|
+
Reflects the actual structure of DjangoConfig model.
|
|
25
|
+
All passwords and sensitive data are sanitized before reaching this serializer.
|
|
26
|
+
*/
|
|
27
|
+
export const DjangoConfigSchema = z.object({
|
|
28
|
+
env_mode: z.string().nullable().optional(),
|
|
29
|
+
project_name: z.string().nullable().optional(),
|
|
30
|
+
project_logo: z.string().nullable().optional(),
|
|
31
|
+
project_version: z.string().nullable().optional(),
|
|
32
|
+
project_description: z.string().nullable().optional(),
|
|
33
|
+
startup_info_mode: z.string().nullable().optional(),
|
|
34
|
+
enable_support: z.boolean().nullable().optional(),
|
|
35
|
+
enable_accounts: z.boolean().nullable().optional(),
|
|
36
|
+
enable_newsletter: z.boolean().nullable().optional(),
|
|
37
|
+
enable_leads: z.boolean().nullable().optional(),
|
|
38
|
+
enable_knowbase: z.boolean().nullable().optional(),
|
|
39
|
+
enable_agents: z.boolean().nullable().optional(),
|
|
40
|
+
enable_maintenance: z.boolean().nullable().optional(),
|
|
41
|
+
enable_frontend: z.boolean().nullable().optional(),
|
|
42
|
+
enable_drf_tailwind: z.boolean().nullable().optional(),
|
|
43
|
+
site_url: z.string().nullable().optional(),
|
|
44
|
+
api_url: z.string().nullable().optional(),
|
|
45
|
+
debug: z.boolean().nullable().optional(),
|
|
46
|
+
debug_warnings: z.boolean().nullable().optional(),
|
|
47
|
+
root_urlconf: z.string().nullable().optional(),
|
|
48
|
+
wsgi_application: z.string().nullable().optional(),
|
|
49
|
+
auth_user_model: z.string().nullable().optional(),
|
|
50
|
+
project_apps: z.array(z.string()).nullable().optional(),
|
|
51
|
+
databases: z.record(z.string(), z.any()).nullable().optional(),
|
|
52
|
+
redis_url: z.string().nullable().optional(),
|
|
53
|
+
cache_default: z.string().nullable().optional(),
|
|
54
|
+
cache_sessions: z.string().nullable().optional(),
|
|
55
|
+
security_domains: z.array(z.string()).nullable().optional(),
|
|
56
|
+
ssl_redirect: z.boolean().nullable().optional(),
|
|
57
|
+
cors_allow_headers: z.array(z.string()).nullable().optional(),
|
|
58
|
+
email: EmailConfigSchema.nullable().optional(),
|
|
59
|
+
payments: PaymentsConfigSchema.nullable().optional(),
|
|
60
|
+
grpc: GRPCConfigDashboardSchema.nullable().optional(),
|
|
61
|
+
centrifugo: CentrifugoConfigSchema.nullable().optional(),
|
|
62
|
+
django_rq: DjangoRQConfigSchema.nullable().optional(),
|
|
63
|
+
drf: DRFConfigSchema.nullable().optional(),
|
|
64
|
+
spectacular: SpectacularConfigSchema.nullable().optional(),
|
|
65
|
+
jwt: JWTConfigSchema.nullable().optional(),
|
|
66
|
+
telegram: z.record(z.string(), z.any()).nullable().optional(),
|
|
67
|
+
ngrok: z.record(z.string(), z.any()).nullable().optional(),
|
|
68
|
+
axes: z.record(z.string(), z.any()).nullable().optional(),
|
|
69
|
+
crypto_fields: z.record(z.string(), z.any()).nullable().optional(),
|
|
70
|
+
unfold: z.string().nullable().optional(),
|
|
71
|
+
tailwind_app_name: z.string().nullable().optional(),
|
|
72
|
+
tailwind_version: z.int().nullable().optional(),
|
|
73
|
+
limits: z.record(z.string(), z.any()).nullable().optional(),
|
|
74
|
+
api_keys: z.record(z.string(), z.any()).nullable().optional(),
|
|
75
|
+
custom_middleware: z.array(z.string()).nullable().optional(),
|
|
76
|
+
nextjs_admin: z.record(z.string(), z.any()).nullable().optional(),
|
|
77
|
+
admin_emails: z.array(z.string()).nullable().optional(),
|
|
78
|
+
constance: z.record(z.string(), z.any()).nullable().optional(),
|
|
79
|
+
openapi_client: z.record(z.string(), z.any()).nullable().optional(),
|
|
80
|
+
_meta: ConfigMetaSchema.nullable().optional(),
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Infer TypeScript type from Zod schema
|
|
85
|
+
*/
|
|
86
|
+
export type DjangoConfig = z.infer<typeof DjangoConfigSchema>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for DjangoRQConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Django-RQ configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { RedisQueueConfigSchema } from './RedisQueueConfig.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Django-RQ configuration.
|
|
12
|
+
*/
|
|
13
|
+
export const DjangoRQConfigSchema = z.object({
|
|
14
|
+
enabled: z.boolean().nullable().optional(),
|
|
15
|
+
queues: z.array(RedisQueueConfigSchema).nullable().optional(),
|
|
16
|
+
show_admin_link: z.boolean().nullable().optional(),
|
|
17
|
+
exception_handlers: z.array(z.string()).nullable().optional(),
|
|
18
|
+
api_token: z.string().nullable().optional(),
|
|
19
|
+
prometheus_enabled: z.boolean().nullable().optional(),
|
|
20
|
+
schedules: z.array(z.record(z.string(), z.any())).nullable().optional(),
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Infer TypeScript type from Zod schema
|
|
25
|
+
*/
|
|
26
|
+
export type DjangoRQConfig = z.infer<typeof DjangoRQConfigSchema>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for EmailConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Email configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Email configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const EmailConfigSchema = z.object({
|
|
13
|
+
backend: z.string().nullable().optional(),
|
|
14
|
+
host: z.string().nullable().optional(),
|
|
15
|
+
port: z.int().nullable().optional(),
|
|
16
|
+
username: z.string().nullable().optional(),
|
|
17
|
+
password: z.string().nullable().optional(),
|
|
18
|
+
use_tls: z.boolean().nullable().optional(),
|
|
19
|
+
use_ssl: z.boolean().nullable().optional(),
|
|
20
|
+
ssl_verify: z.boolean().nullable().optional(),
|
|
21
|
+
timeout: z.int().nullable().optional(),
|
|
22
|
+
default_from: z.string().nullable().optional(),
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Infer TypeScript type from Zod schema
|
|
27
|
+
*/
|
|
28
|
+
export type EmailConfig = z.infer<typeof EmailConfigSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ErrorDistributionChart
|
|
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 ErrorDistributionChartSchema = 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 ErrorDistributionChart = z.infer<typeof ErrorDistributionChartSchema>
|
|
@@ -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 GRPCCallRequestRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Request to call a gRPC method (for future implementation).
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Request to call a gRPC method (for future implementation).
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCCallRequestRequestSchema = z.object({
|
|
13
|
+
service: z.string(),
|
|
14
|
+
method: z.string(),
|
|
15
|
+
payload: z.record(z.string(), z.any()),
|
|
16
|
+
metadata: z.record(z.string(), z.any()).optional(),
|
|
17
|
+
timeout_ms: z.int().optional(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type GRPCCallRequestRequest = z.infer<typeof GRPCCallRequestRequestSchema>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCCallResponse
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Response from calling a gRPC method.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Response from calling a gRPC method.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCCallResponseSchema = z.object({
|
|
13
|
+
success: z.boolean(),
|
|
14
|
+
request_id: z.string(),
|
|
15
|
+
service: z.string(),
|
|
16
|
+
method: z.string(),
|
|
17
|
+
status: z.string(),
|
|
18
|
+
grpc_status_code: z.string(),
|
|
19
|
+
duration_ms: z.int(),
|
|
20
|
+
response: z.string().nullable().optional(),
|
|
21
|
+
error: z.string().nullable().optional(),
|
|
22
|
+
metadata: z.record(z.string(), z.any()).optional(),
|
|
23
|
+
timestamp: z.string(),
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Infer TypeScript type from Zod schema
|
|
28
|
+
*/
|
|
29
|
+
export type GRPCCallResponse = z.infer<typeof GRPCCallResponseSchema>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Complete gRPC configuration response.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { GRPCFeaturesSerializerSchema } from './GRPCFeaturesSerializer.schema'
|
|
9
|
+
import { GRPCFrameworkConfigSerializerSchema } from './GRPCFrameworkConfigSerializer.schema'
|
|
10
|
+
import { GRPCServerConfigSerializerSchema } from './GRPCServerConfigSerializer.schema'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Complete gRPC configuration response.
|
|
14
|
+
*/
|
|
15
|
+
export const GRPCConfigSchema = z.object({
|
|
16
|
+
server: GRPCServerConfigSerializerSchema,
|
|
17
|
+
framework: GRPCFrameworkConfigSerializerSchema,
|
|
18
|
+
features: GRPCFeaturesSerializerSchema,
|
|
19
|
+
registered_services: z.int(),
|
|
20
|
+
total_methods: z.int(),
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Infer TypeScript type from Zod schema
|
|
25
|
+
*/
|
|
26
|
+
export type GRPCConfig = z.infer<typeof GRPCConfigSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCConfigDashboard
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * gRPC configuration for dashboard.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* gRPC configuration for dashboard.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCConfigDashboardSchema = z.object({
|
|
13
|
+
enabled: z.boolean().nullable().optional(),
|
|
14
|
+
host: z.string().nullable().optional(),
|
|
15
|
+
port: z.int().nullable().optional(),
|
|
16
|
+
max_workers: z.int().nullable().optional(),
|
|
17
|
+
reflection: z.boolean().nullable().optional(),
|
|
18
|
+
health_check: z.boolean().nullable().optional(),
|
|
19
|
+
interceptors: z.array(z.string()).nullable().optional(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type GRPCConfigDashboard = z.infer<typeof GRPCConfigDashboardSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCExampleSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Example payload for a gRPC method.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Example payload for a gRPC method.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCExampleSerializerSchema = z.object({
|
|
13
|
+
service: z.string(),
|
|
14
|
+
method: z.string(),
|
|
15
|
+
description: z.string(),
|
|
16
|
+
payload_example: z.record(z.string(), z.any()),
|
|
17
|
+
expected_response: z.record(z.string(), z.any()),
|
|
18
|
+
metadata_example: z.record(z.string(), z.any()).optional(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type GRPCExampleSerializer = z.infer<typeof GRPCExampleSerializerSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCExamplesList
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * List of examples response.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { GRPCExampleSerializerSchema } from './GRPCExampleSerializer.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* List of examples response.
|
|
12
|
+
*/
|
|
13
|
+
export const GRPCExamplesListSchema = z.object({
|
|
14
|
+
examples: z.array(GRPCExampleSerializerSchema).optional(),
|
|
15
|
+
total_examples: z.int(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type GRPCExamplesList = z.infer<typeof GRPCExamplesListSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCFeaturesSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * gRPC features configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* gRPC features configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCFeaturesSerializerSchema = z.object({
|
|
13
|
+
jwt_auth: z.boolean(),
|
|
14
|
+
request_logging: z.boolean(),
|
|
15
|
+
metrics: z.boolean(),
|
|
16
|
+
reflection: z.boolean(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type GRPCFeaturesSerializer = z.infer<typeof GRPCFeaturesSerializerSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCFrameworkConfigSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * gRPC framework configuration details.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* gRPC framework configuration details.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCFrameworkConfigSerializerSchema = z.object({
|
|
13
|
+
enabled: z.boolean(),
|
|
14
|
+
auto_discover: z.boolean(),
|
|
15
|
+
services_path: z.string(),
|
|
16
|
+
interceptors: z.array(z.string()).optional(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type GRPCFrameworkConfigSerializer = z.infer<typeof GRPCFrameworkConfigSerializerSchema>
|
|
@@ -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,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCInterceptorInfoSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Information about an interceptor.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Information about an interceptor.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCInterceptorInfoSerializerSchema = z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
enabled: z.boolean(),
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Infer TypeScript type from Zod schema
|
|
19
|
+
*/
|
|
20
|
+
export type GRPCInterceptorInfoSerializer = z.infer<typeof GRPCInterceptorInfoSerializerSchema>
|
|
@@ -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>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCServerConfigSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * gRPC server configuration details.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* gRPC server configuration details.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCServerConfigSerializerSchema = z.object({
|
|
13
|
+
host: z.string(),
|
|
14
|
+
port: z.int(),
|
|
15
|
+
enabled: z.boolean(),
|
|
16
|
+
max_workers: z.int(),
|
|
17
|
+
max_concurrent_rpcs: z.int().nullable().optional(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type GRPCServerConfigSerializer = z.infer<typeof GRPCServerConfigSerializerSchema>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCServerInfo
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Complete gRPC server information response.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { GRPCInterceptorInfoSerializerSchema } from './GRPCInterceptorInfoSerializer.schema'
|
|
9
|
+
import { GRPCServiceInfoSerializerSchema } from './GRPCServiceInfoSerializer.schema'
|
|
10
|
+
import { GRPCStatsSerializerSchema } from './GRPCStatsSerializer.schema'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Complete gRPC server information response.
|
|
14
|
+
*/
|
|
15
|
+
export const GRPCServerInfoSchema = z.object({
|
|
16
|
+
server_status: z.string(),
|
|
17
|
+
address: z.string(),
|
|
18
|
+
started_at: z.string().nullable().optional(),
|
|
19
|
+
uptime_seconds: z.int().nullable().optional(),
|
|
20
|
+
services: z.array(GRPCServiceInfoSerializerSchema).optional(),
|
|
21
|
+
interceptors: z.array(GRPCInterceptorInfoSerializerSchema).optional(),
|
|
22
|
+
stats: GRPCStatsSerializerSchema,
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Infer TypeScript type from Zod schema
|
|
27
|
+
*/
|
|
28
|
+
export type GRPCServerInfo = z.infer<typeof GRPCServerInfoSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCServiceInfoSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Information about a single gRPC service.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Information about a single gRPC service.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCServiceInfoSerializerSchema = z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
methods: z.array(z.string()).optional(),
|
|
15
|
+
full_name: z.string(),
|
|
16
|
+
description: z.string().optional(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type GRPCServiceInfoSerializer = z.infer<typeof GRPCServiceInfoSerializerSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCStatsSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Runtime statistics summary.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Runtime statistics summary.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCStatsSerializerSchema = z.object({
|
|
13
|
+
total_requests: z.int(),
|
|
14
|
+
success_rate: z.number(),
|
|
15
|
+
avg_duration_ms: z.number(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type GRPCStatsSerializer = z.infer<typeof GRPCStatsSerializerSchema>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCTestLog
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Single test log entry.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Single test log entry.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCTestLogSchema = z.object({
|
|
13
|
+
request_id: z.string(),
|
|
14
|
+
service: z.string(),
|
|
15
|
+
method: z.string(),
|
|
16
|
+
status: z.string(),
|
|
17
|
+
grpc_status_code: z.string().nullable().optional(),
|
|
18
|
+
error_message: z.string().nullable().optional(),
|
|
19
|
+
duration_ms: z.int().nullable().optional(),
|
|
20
|
+
created_at: z.string(),
|
|
21
|
+
user: z.string().nullable().optional(),
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Infer TypeScript type from Zod schema
|
|
26
|
+
*/
|
|
27
|
+
export type GRPCTestLog = z.infer<typeof GRPCTestLogSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for JWTConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * JWT configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* JWT configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const JWTConfigSchema = z.object({
|
|
13
|
+
access_token_lifetime: z.int().nullable().optional(),
|
|
14
|
+
refresh_token_lifetime: z.int().nullable().optional(),
|
|
15
|
+
algorithm: z.string().nullable().optional(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type JWTConfig = z.infer<typeof JWTConfigSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for MethodInfoSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Information about a service method.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Information about a service method.
|
|
11
|
+
*/
|
|
12
|
+
export const MethodInfoSerializerSchema = z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
full_name: z.string(),
|
|
15
|
+
request_type: z.string().optional(),
|
|
16
|
+
response_type: z.string().optional(),
|
|
17
|
+
streaming: z.boolean().optional(),
|
|
18
|
+
auth_required: z.boolean().optional(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type MethodInfoSerializer = z.infer<typeof MethodInfoSerializerSchema>
|