@djangocfg/api 1.2.2 → 1.2.4
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 +2658 -1264
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2332 -496
- package/dist/index.d.ts +2332 -496
- package/dist/index.mjs +2633 -1259
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_monitoring.ts +179 -0
- package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_testing.ts +151 -0
- package/src/cfg/generated/_utils/fetchers/index.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_monitoring.ts +166 -0
- package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_testing.ts +162 -0
- package/src/cfg/generated/_utils/hooks/index.ts +2 -0
- package/src/cfg/generated/_utils/schemas/LoadTestRequestRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/LoadTestResponse.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/LoadTestStatus.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/MethodStat.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/MethodStats.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/NotificationStats.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/OverviewStats.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/RPCRequest.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/TestRPCRequestRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/TestRPCResponse.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/index.ts +11 -0
- package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/client.ts +136 -0
- package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/index.ts +2 -0
- package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/models.ts +144 -0
- package/src/cfg/generated/cfg__ipc__ipcrpc_testing/client.ts +96 -0
- package/src/cfg/generated/cfg__ipc__ipcrpc_testing/index.ts +2 -0
- package/src/cfg/generated/cfg__ipc__ipcrpc_testing/models.ts +88 -0
- package/src/cfg/generated/client.ts +6 -0
- package/src/cfg/generated/index.ts +10 -0
- package/src/cfg/generated/schema.ts +1352 -587
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for LoadTestRequestRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for load test request input.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for load test request input.
|
|
11
|
+
*/
|
|
12
|
+
export const LoadTestRequestRequestSchema = z.object({
|
|
13
|
+
method: z.string().min(1),
|
|
14
|
+
total_requests: z.int().min(1.0).max(10000.0),
|
|
15
|
+
concurrency: z.int().min(1.0).max(100.0),
|
|
16
|
+
params: z.string().optional(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type LoadTestRequestRequest = z.infer<typeof LoadTestRequestRequestSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for LoadTestResponse
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for load test response.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for load test response.
|
|
11
|
+
*/
|
|
12
|
+
export const LoadTestResponseSchema = z.object({
|
|
13
|
+
test_id: z.string(),
|
|
14
|
+
started: z.boolean(),
|
|
15
|
+
message: z.string(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type LoadTestResponse = z.infer<typeof LoadTestResponseSchema>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for LoadTestStatus
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for load test status.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for load test status.
|
|
11
|
+
*/
|
|
12
|
+
export const LoadTestStatusSchema = z.object({
|
|
13
|
+
test_id: z.string().nullable(),
|
|
14
|
+
running: z.boolean(),
|
|
15
|
+
progress: z.int(),
|
|
16
|
+
total: z.int(),
|
|
17
|
+
success_count: z.int(),
|
|
18
|
+
failed_count: z.int(),
|
|
19
|
+
avg_duration_ms: z.number(),
|
|
20
|
+
elapsed_time: z.number(),
|
|
21
|
+
rps: z.number(),
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Infer TypeScript type from Zod schema
|
|
26
|
+
*/
|
|
27
|
+
export type LoadTestStatus = z.infer<typeof LoadTestStatusSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for MethodStat
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for individual method statistics.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for individual method statistics.
|
|
11
|
+
*/
|
|
12
|
+
export const MethodStatSchema = z.object({
|
|
13
|
+
method: z.string(),
|
|
14
|
+
count: z.int(),
|
|
15
|
+
percentage: z.number(),
|
|
16
|
+
avg_time_ms: z.number().optional(),
|
|
17
|
+
avg_time: z.number().optional(),
|
|
18
|
+
success_rate: z.number().optional(),
|
|
19
|
+
last_called: z.string().nullable().optional(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type MethodStat = z.infer<typeof MethodStatSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for MethodStats
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for method statistics response.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { MethodStatSchema } from './MethodStat.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Serializer for method statistics response.
|
|
12
|
+
*/
|
|
13
|
+
export const MethodStatsSchema = z.object({
|
|
14
|
+
methods: z.array(MethodStatSchema),
|
|
15
|
+
count: z.int(),
|
|
16
|
+
total_calls: z.int(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type MethodStats = z.infer<typeof MethodStatsSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for NotificationStats
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for notification statistics.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for notification statistics.
|
|
11
|
+
*/
|
|
12
|
+
export const NotificationStatsSchema = z.object({
|
|
13
|
+
total_sent: z.int(),
|
|
14
|
+
delivery_rate: z.number(),
|
|
15
|
+
by_type: z.record(z.string(), z.any()).optional(),
|
|
16
|
+
recent: z.array(z.string()).optional(),
|
|
17
|
+
last_sent: z.string().nullable().optional(),
|
|
18
|
+
timestamp: z.string().optional(),
|
|
19
|
+
error: z.string().nullable().optional(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type NotificationStats = z.infer<typeof NotificationStatsSchema>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for OverviewStats
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for overview statistics.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for overview statistics.
|
|
11
|
+
*/
|
|
12
|
+
export const OverviewStatsSchema = z.object({
|
|
13
|
+
redis_connected: z.boolean().optional(),
|
|
14
|
+
total_requests_today: z.int(),
|
|
15
|
+
total_requests_hour: z.int().optional(),
|
|
16
|
+
active_methods: z.array(z.string()),
|
|
17
|
+
top_method: z.string().nullable().optional(),
|
|
18
|
+
method_counts: z.record(z.string(), z.any()).optional(),
|
|
19
|
+
avg_response_time_ms: z.number(),
|
|
20
|
+
success_rate: z.number(),
|
|
21
|
+
error_rate: z.number().optional(),
|
|
22
|
+
timestamp: z.string().optional(),
|
|
23
|
+
error: z.string().nullable().optional(),
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Infer TypeScript type from Zod schema
|
|
28
|
+
*/
|
|
29
|
+
export type OverviewStats = z.infer<typeof OverviewStatsSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RPCRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for individual RPC request.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for individual RPC request.
|
|
11
|
+
*/
|
|
12
|
+
export const RPCRequestSchema = z.object({
|
|
13
|
+
id: z.string().optional(),
|
|
14
|
+
request_id: z.string().optional(),
|
|
15
|
+
timestamp: z.string(),
|
|
16
|
+
method: z.string().nullable(),
|
|
17
|
+
params: z.record(z.string(), z.any()).nullable().optional(),
|
|
18
|
+
correlation_id: z.string().nullable().optional(),
|
|
19
|
+
source: z.string().nullable().optional(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type RPCRequest = z.infer<typeof RPCRequestSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RecentRequests
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for recent requests response.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { RPCRequestSchema } from './RPCRequest.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Serializer for recent requests response.
|
|
12
|
+
*/
|
|
13
|
+
export const RecentRequestsSchema = z.object({
|
|
14
|
+
requests: z.array(RPCRequestSchema),
|
|
15
|
+
count: z.int(),
|
|
16
|
+
total_available: z.int(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type RecentRequests = z.infer<typeof RecentRequestsSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for TestRPCRequestRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for test RPC request input.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for test RPC request input.
|
|
11
|
+
*/
|
|
12
|
+
export const TestRPCRequestRequestSchema = z.object({
|
|
13
|
+
method: z.string().min(1),
|
|
14
|
+
params: z.string(),
|
|
15
|
+
timeout: z.int().min(1.0).max(60.0).optional(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type TestRPCRequestRequest = z.infer<typeof TestRPCRequestRequestSchema>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for TestRPCResponse
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for test RPC response.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for test RPC response.
|
|
11
|
+
*/
|
|
12
|
+
export const TestRPCResponseSchema = z.object({
|
|
13
|
+
success: z.boolean(),
|
|
14
|
+
duration_ms: z.number(),
|
|
15
|
+
response: z.string().nullable().optional(),
|
|
16
|
+
error: z.string().nullable().optional(),
|
|
17
|
+
correlation_id: z.string(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type TestRPCResponse = z.infer<typeof TestRPCResponseSchema>
|
|
@@ -63,19 +63,26 @@ export * from './LeadSubmission.schema'
|
|
|
63
63
|
export * from './LeadSubmissionError.schema'
|
|
64
64
|
export * from './LeadSubmissionRequest.schema'
|
|
65
65
|
export * from './LeadSubmissionResponse.schema'
|
|
66
|
+
export * from './LoadTestRequestRequest.schema'
|
|
67
|
+
export * from './LoadTestResponse.schema'
|
|
68
|
+
export * from './LoadTestStatus.schema'
|
|
66
69
|
export * from './Message.schema'
|
|
67
70
|
export * from './MessageCreate.schema'
|
|
68
71
|
export * from './MessageCreateRequest.schema'
|
|
69
72
|
export * from './MessageRequest.schema'
|
|
73
|
+
export * from './MethodStat.schema'
|
|
74
|
+
export * from './MethodStats.schema'
|
|
70
75
|
export * from './Newsletter.schema'
|
|
71
76
|
export * from './NewsletterCampaign.schema'
|
|
72
77
|
export * from './NewsletterCampaignRequest.schema'
|
|
73
78
|
export * from './NewsletterSubscription.schema'
|
|
79
|
+
export * from './NotificationStats.schema'
|
|
74
80
|
export * from './OTPErrorResponse.schema'
|
|
75
81
|
export * from './OTPRequestRequest.schema'
|
|
76
82
|
export * from './OTPRequestResponse.schema'
|
|
77
83
|
export * from './OTPVerifyRequest.schema'
|
|
78
84
|
export * from './OTPVerifyResponse.schema'
|
|
85
|
+
export * from './OverviewStats.schema'
|
|
79
86
|
export * from './PaginatedArchiveItemChunkList.schema'
|
|
80
87
|
export * from './PaginatedArchiveItemList.schema'
|
|
81
88
|
export * from './PaginatedArchiveSearchResultList.schema'
|
|
@@ -114,6 +121,8 @@ export * from './QueueAction.schema'
|
|
|
114
121
|
export * from './QueueActionRequest.schema'
|
|
115
122
|
export * from './QueueStatus.schema'
|
|
116
123
|
export * from './QuickHealth.schema'
|
|
124
|
+
export * from './RPCRequest.schema'
|
|
125
|
+
export * from './RecentRequests.schema'
|
|
117
126
|
export * from './SendCampaignRequest.schema'
|
|
118
127
|
export * from './SendCampaignResponse.schema'
|
|
119
128
|
export * from './Sender.schema'
|
|
@@ -122,6 +131,8 @@ export * from './SubscribeResponse.schema'
|
|
|
122
131
|
export * from './SuccessResponse.schema'
|
|
123
132
|
export * from './TaskStatistics.schema'
|
|
124
133
|
export * from './TestEmailRequest.schema'
|
|
134
|
+
export * from './TestRPCRequestRequest.schema'
|
|
135
|
+
export * from './TestRPCResponse.schema'
|
|
125
136
|
export * from './Ticket.schema'
|
|
126
137
|
export * from './TicketRequest.schema'
|
|
127
138
|
export * from './TokenRefresh.schema'
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for IPC/RPC Monitoring.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgIpcrpcMonitoring {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get RPC health status
|
|
16
|
+
*
|
|
17
|
+
* Returns the current health status of the RPC monitoring system.
|
|
18
|
+
*/
|
|
19
|
+
async ipcAdminApiMonitorHealthRetrieve(): Promise<Models.HealthCheck> {
|
|
20
|
+
const response = await this.client.request('GET', "/cfg/ipc/admin/api/monitor/health/");
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get method statistics
|
|
26
|
+
*
|
|
27
|
+
* Returns statistics grouped by RPC method.
|
|
28
|
+
*/
|
|
29
|
+
async ipcAdminApiMonitorMethodsRetrieve(): Promise<Models.MethodStats> {
|
|
30
|
+
const response = await this.client.request('GET', "/cfg/ipc/admin/api/monitor/methods/");
|
|
31
|
+
return response;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get notification statistics
|
|
36
|
+
*
|
|
37
|
+
* Returns statistics about RPC notifications.
|
|
38
|
+
*/
|
|
39
|
+
async ipcAdminApiMonitorNotificationsRetrieve(): Promise<Models.NotificationStats> {
|
|
40
|
+
const response = await this.client.request('GET', "/cfg/ipc/admin/api/monitor/notifications/");
|
|
41
|
+
return response;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Get overview statistics
|
|
46
|
+
*
|
|
47
|
+
* Returns overview statistics for RPC monitoring.
|
|
48
|
+
*/
|
|
49
|
+
async ipcAdminApiMonitorOverviewRetrieve(): Promise<Models.OverviewStats> {
|
|
50
|
+
const response = await this.client.request('GET', "/cfg/ipc/admin/api/monitor/overview/");
|
|
51
|
+
return response;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async ipcAdminApiMonitorRequestsRetrieve(count?: number): Promise<Models.RecentRequests>;
|
|
55
|
+
async ipcAdminApiMonitorRequestsRetrieve(params?: { count?: number }): Promise<Models.RecentRequests>;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Get recent RPC requests
|
|
59
|
+
*
|
|
60
|
+
* Returns a list of recent RPC requests with their details.
|
|
61
|
+
*/
|
|
62
|
+
async ipcAdminApiMonitorRequestsRetrieve(...args: any[]): Promise<Models.RecentRequests> {
|
|
63
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
64
|
+
|
|
65
|
+
let params;
|
|
66
|
+
if (isParamsObject) {
|
|
67
|
+
params = args[0];
|
|
68
|
+
} else {
|
|
69
|
+
params = { count: args[0] };
|
|
70
|
+
}
|
|
71
|
+
const response = await this.client.request('GET', "/cfg/ipc/admin/api/monitor/requests/", { params });
|
|
72
|
+
return response;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Get RPC health status
|
|
77
|
+
*
|
|
78
|
+
* Returns the current health status of the RPC monitoring system.
|
|
79
|
+
*/
|
|
80
|
+
async ipcMonitorHealthRetrieve(): Promise<Models.HealthCheck> {
|
|
81
|
+
const response = await this.client.request('GET', "/cfg/ipc/monitor/health/");
|
|
82
|
+
return response;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Get method statistics
|
|
87
|
+
*
|
|
88
|
+
* Returns statistics grouped by RPC method.
|
|
89
|
+
*/
|
|
90
|
+
async ipcMonitorMethodsRetrieve(): Promise<Models.MethodStats> {
|
|
91
|
+
const response = await this.client.request('GET', "/cfg/ipc/monitor/methods/");
|
|
92
|
+
return response;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Get notification statistics
|
|
97
|
+
*
|
|
98
|
+
* Returns statistics about RPC notifications.
|
|
99
|
+
*/
|
|
100
|
+
async ipcMonitorNotificationsRetrieve(): Promise<Models.NotificationStats> {
|
|
101
|
+
const response = await this.client.request('GET', "/cfg/ipc/monitor/notifications/");
|
|
102
|
+
return response;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get overview statistics
|
|
107
|
+
*
|
|
108
|
+
* Returns overview statistics for RPC monitoring.
|
|
109
|
+
*/
|
|
110
|
+
async ipcMonitorOverviewRetrieve(): Promise<Models.OverviewStats> {
|
|
111
|
+
const response = await this.client.request('GET', "/cfg/ipc/monitor/overview/");
|
|
112
|
+
return response;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
async ipcMonitorRequestsRetrieve(count?: number): Promise<Models.RecentRequests>;
|
|
116
|
+
async ipcMonitorRequestsRetrieve(params?: { count?: number }): Promise<Models.RecentRequests>;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Get recent RPC requests
|
|
120
|
+
*
|
|
121
|
+
* Returns a list of recent RPC requests with their details.
|
|
122
|
+
*/
|
|
123
|
+
async ipcMonitorRequestsRetrieve(...args: any[]): Promise<Models.RecentRequests> {
|
|
124
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
125
|
+
|
|
126
|
+
let params;
|
|
127
|
+
if (isParamsObject) {
|
|
128
|
+
params = args[0];
|
|
129
|
+
} else {
|
|
130
|
+
params = { count: args[0] };
|
|
131
|
+
}
|
|
132
|
+
const response = await this.client.request('GET', "/cfg/ipc/monitor/requests/", { params });
|
|
133
|
+
return response;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serializer for health check response.
|
|
3
|
+
*
|
|
4
|
+
* Response model (includes read-only fields).
|
|
5
|
+
*/
|
|
6
|
+
export interface HealthCheck {
|
|
7
|
+
/** Overall health status: healthy, degraded, or unhealthy */
|
|
8
|
+
status: string;
|
|
9
|
+
/** Timestamp of the health check */
|
|
10
|
+
timestamp: string;
|
|
11
|
+
/** Service name */
|
|
12
|
+
service: string;
|
|
13
|
+
/** Django-CFG version */
|
|
14
|
+
version: string;
|
|
15
|
+
/** Detailed health checks for databases, cache, and system */
|
|
16
|
+
checks: Record<string, any>;
|
|
17
|
+
/** Environment information */
|
|
18
|
+
environment: Record<string, any>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Serializer for method statistics response.
|
|
23
|
+
*
|
|
24
|
+
* Response model (includes read-only fields).
|
|
25
|
+
*/
|
|
26
|
+
export interface MethodStats {
|
|
27
|
+
/** List of method statistics */
|
|
28
|
+
methods: Array<MethodStat>;
|
|
29
|
+
/** Total number of methods */
|
|
30
|
+
count: number;
|
|
31
|
+
/** Total calls across all methods */
|
|
32
|
+
total_calls: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Serializer for notification statistics.
|
|
37
|
+
*
|
|
38
|
+
* Response model (includes read-only fields).
|
|
39
|
+
*/
|
|
40
|
+
export interface NotificationStats {
|
|
41
|
+
/** Total notifications sent */
|
|
42
|
+
total_sent: number;
|
|
43
|
+
/** Delivery success rate percentage */
|
|
44
|
+
delivery_rate: number;
|
|
45
|
+
/** Breakdown by notification type */
|
|
46
|
+
by_type?: Record<string, any>;
|
|
47
|
+
/** Recent notifications */
|
|
48
|
+
recent?: Array<string>;
|
|
49
|
+
/** ISO timestamp of last notification */
|
|
50
|
+
last_sent?: string | null;
|
|
51
|
+
/** ISO timestamp of the stats */
|
|
52
|
+
timestamp?: string;
|
|
53
|
+
/** Error message if any */
|
|
54
|
+
error?: string | null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Serializer for overview statistics.
|
|
59
|
+
*
|
|
60
|
+
* Response model (includes read-only fields).
|
|
61
|
+
*/
|
|
62
|
+
export interface OverviewStats {
|
|
63
|
+
/** Whether Redis is connected */
|
|
64
|
+
redis_connected?: boolean;
|
|
65
|
+
/** Total requests processed today */
|
|
66
|
+
total_requests_today: number;
|
|
67
|
+
/** Total requests in the last hour */
|
|
68
|
+
total_requests_hour?: number;
|
|
69
|
+
/** List of active RPC methods */
|
|
70
|
+
active_methods: Array<string>;
|
|
71
|
+
/** Most frequently called method */
|
|
72
|
+
top_method?: string | null;
|
|
73
|
+
/** Count of requests per method */
|
|
74
|
+
method_counts?: Record<string, any>;
|
|
75
|
+
/** Average response time in milliseconds */
|
|
76
|
+
avg_response_time_ms: number;
|
|
77
|
+
/** Success rate percentage */
|
|
78
|
+
success_rate: number;
|
|
79
|
+
/** Error rate percentage */
|
|
80
|
+
error_rate?: number;
|
|
81
|
+
/** ISO timestamp of the stats */
|
|
82
|
+
timestamp?: string;
|
|
83
|
+
/** Error message if any */
|
|
84
|
+
error?: string | null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Serializer for recent requests response.
|
|
89
|
+
*
|
|
90
|
+
* Response model (includes read-only fields).
|
|
91
|
+
*/
|
|
92
|
+
export interface RecentRequests {
|
|
93
|
+
/** List of recent RPC requests */
|
|
94
|
+
requests: Array<RPCRequest>;
|
|
95
|
+
/** Number of requests returned */
|
|
96
|
+
count: number;
|
|
97
|
+
/** Total number of requests available */
|
|
98
|
+
total_available: number;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Serializer for individual method statistics.
|
|
103
|
+
*
|
|
104
|
+
* Response model (includes read-only fields).
|
|
105
|
+
*/
|
|
106
|
+
export interface MethodStat {
|
|
107
|
+
/** RPC method name */
|
|
108
|
+
method: string;
|
|
109
|
+
/** Number of calls */
|
|
110
|
+
count: number;
|
|
111
|
+
/** Percentage of total calls */
|
|
112
|
+
percentage: number;
|
|
113
|
+
/** Average execution time in milliseconds */
|
|
114
|
+
avg_time_ms?: number;
|
|
115
|
+
/** Average execution time (alternative field) */
|
|
116
|
+
avg_time?: number;
|
|
117
|
+
/** Success rate percentage */
|
|
118
|
+
success_rate?: number;
|
|
119
|
+
/** ISO timestamp of last call */
|
|
120
|
+
last_called?: string | null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Serializer for individual RPC request.
|
|
125
|
+
*
|
|
126
|
+
* Request model (no read-only fields).
|
|
127
|
+
*/
|
|
128
|
+
export interface RPCRequest {
|
|
129
|
+
/** Stream entry ID */
|
|
130
|
+
id?: string;
|
|
131
|
+
/** Unique request ID */
|
|
132
|
+
request_id?: string;
|
|
133
|
+
/** ISO timestamp of the request */
|
|
134
|
+
timestamp: string;
|
|
135
|
+
/** RPC method name */
|
|
136
|
+
method: string | null;
|
|
137
|
+
/** Request parameters */
|
|
138
|
+
params?: Record<string, any> | null;
|
|
139
|
+
/** Correlation ID for tracking */
|
|
140
|
+
correlation_id?: string | null;
|
|
141
|
+
/** Source of the request */
|
|
142
|
+
source?: string | null;
|
|
143
|
+
}
|
|
144
|
+
|