@djangocfg/api 1.2.21 → 1.2.22
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 +5029 -2249
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4267 -278
- package/dist/index.d.ts +4267 -278
- package/dist/index.mjs +4672 -1905
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_config.ts +48 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_configuration.ts +63 -0
- 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 +4 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +36 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +51 -0
- 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 +4 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoConfig.schema.ts +23 -0
- 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/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 +19 -0
- package/src/cfg/generated/_utils/schemas/EmailConfig.schema.ts +28 -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/GRPCInterceptorInfoSerializer.schema.ts +20 -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/GRPCTestLogSerializer.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/GRPCTestLogs.schema.ts +23 -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/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/RedisQueueConfig.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/ServiceDetail.schema.ts +31 -0
- package/src/cfg/generated/_utils/schemas/ServiceMethods.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/SpectacularConfig.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/index.ts +34 -0
- 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 +215 -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_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 +68 -0
- package/src/cfg/generated/cfg__grpc__grpc_testing/index.ts +2 -0
- package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +122 -0
- package/src/cfg/generated/client.ts +12 -0
- package/src/cfg/generated/index.ts +20 -0
- package/src/cfg/generated/schema.ts +7133 -5116
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for DatabaseConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Database configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Database configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const DatabaseConfigSchema = z.object({
|
|
13
|
+
engine: z.string(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
user: z.string().nullable().optional(),
|
|
16
|
+
password: z.string().nullable().optional(),
|
|
17
|
+
host: z.string().nullable().optional(),
|
|
18
|
+
port: z.int().nullable().optional(),
|
|
19
|
+
connect_timeout: z.int().nullable().optional(),
|
|
20
|
+
sslmode: z.string().nullable().optional(),
|
|
21
|
+
options: z.record(z.string(), z.any()).nullable().optional(),
|
|
22
|
+
apps: z.array(z.string()).nullable().optional(),
|
|
23
|
+
operations: z.array(z.string()).nullable().optional(),
|
|
24
|
+
migrate_to: z.string().nullable().optional(),
|
|
25
|
+
routing_description: z.string().nullable().optional(),
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Infer TypeScript type from Zod schema
|
|
30
|
+
*/
|
|
31
|
+
export type DatabaseConfig = z.infer<typeof DatabaseConfigSchema>
|
|
@@ -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,19 @@
|
|
|
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
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Django-RQ configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const DjangoRQConfigSchema = z.object({
|
|
13
|
+
queues: z.record(z.string(), z.any()).nullable().optional(),
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Infer TypeScript type from Zod schema
|
|
18
|
+
*/
|
|
19
|
+
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,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,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,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.string().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.string().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 GRPCTestLogSerializer
|
|
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 GRPCTestLogSerializerSchema = 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.string().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 GRPCTestLogSerializer = z.infer<typeof GRPCTestLogSerializerSchema>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCTestLogs
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * List of test logs response.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { GRPCTestLogSerializerSchema } from './GRPCTestLogSerializer.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* List of test logs response.
|
|
12
|
+
*/
|
|
13
|
+
export const GRPCTestLogsSchema = z.object({
|
|
14
|
+
logs: z.array(GRPCTestLogSerializerSchema).optional(),
|
|
15
|
+
count: z.int(),
|
|
16
|
+
total_available: z.int(),
|
|
17
|
+
has_more: z.boolean().optional(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type GRPCTestLogs = z.infer<typeof GRPCTestLogsSchema>
|
|
@@ -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>
|
|
@@ -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,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>
|