@djangocfg/api 1.2.18 → 1.2.20
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 +13762 -11037
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5828 -2659
- package/dist/index.d.ts +5828 -2659
- package/dist/index.mjs +11188 -8496
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +122 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_jobs.ts +105 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_monitoring.ts +77 -0
- package/src/cfg/generated/_utils/fetchers/{cfg__dashboard.ts → cfg__rq__rq_queues.ts} +21 -20
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_registries.ts +132 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_schedules.ts +92 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_testing.ts +120 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_workers.ts +62 -0
- package/src/cfg/generated/_utils/fetchers/index.ts +8 -2
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +110 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_jobs.ts +106 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +65 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_queues.ts +82 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_registries.ts +132 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_schedules.ts +89 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_testing.ts +124 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +50 -0
- package/src/cfg/generated/_utils/hooks/index.ts +8 -2
- package/src/cfg/generated/_utils/schemas/JobActionResponse.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/JobDetail.schema.ts +40 -0
- package/src/cfg/generated/_utils/schemas/JobList.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/MethodList.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/MethodStatsSerializer.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/QueueDetail.schema.ts +34 -0
- package/src/cfg/generated/_utils/schemas/QueueStats.schema.ts +31 -0
- package/src/cfg/generated/_utils/schemas/RQConfig.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/RunDemoRequestRequest.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ScheduleActionResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ScheduleCreateRequest.schema.ts +39 -0
- package/src/cfg/generated/_utils/schemas/ScheduledJob.schema.ts +32 -0
- package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ServiceStatsSerializer.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/StressTestRequestRequest.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/TestScenario.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/TestingActionResponse.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/Worker.schema.ts +31 -0
- package/src/cfg/generated/_utils/schemas/WorkerStats.schema.ts +31 -0
- package/src/cfg/generated/_utils/schemas/index.ts +20 -10
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +129 -0
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +124 -0
- package/src/cfg/generated/cfg__rq__rq_jobs/client.ts +76 -0
- package/src/cfg/generated/cfg__rq__rq_jobs/models.ts +62 -0
- package/src/cfg/generated/cfg__rq__rq_monitoring/client.ts +45 -0
- package/src/cfg/generated/cfg__rq__rq_monitoring/index.ts +2 -0
- package/src/cfg/generated/cfg__rq__rq_monitoring/models.ts +39 -0
- package/src/cfg/generated/cfg__rq__rq_queues/client.ts +78 -0
- package/src/cfg/generated/cfg__rq__rq_queues/index.ts +2 -0
- package/src/cfg/generated/cfg__rq__rq_queues/models.ts +33 -0
- package/src/cfg/generated/cfg__rq__rq_registries/client.ts +161 -0
- package/src/cfg/generated/cfg__rq__rq_registries/index.ts +2 -0
- package/src/cfg/generated/cfg__rq__rq_registries/models.ts +17 -0
- package/src/cfg/generated/cfg__rq__rq_schedules/client.ts +91 -0
- package/src/cfg/generated/cfg__rq__rq_schedules/index.ts +2 -0
- package/src/cfg/generated/cfg__rq__rq_schedules/models.ts +84 -0
- package/src/cfg/generated/cfg__rq__rq_testing/client.ts +96 -0
- package/src/cfg/generated/cfg__rq__rq_testing/index.ts +2 -0
- package/src/cfg/generated/cfg__rq__rq_testing/models.ts +68 -0
- package/src/cfg/generated/cfg__rq__rq_workers/client.ts +46 -0
- package/src/cfg/generated/cfg__rq__rq_workers/index.ts +2 -0
- package/src/cfg/generated/cfg__rq__rq_workers/models.ts +52 -0
- package/src/cfg/generated/client.ts +24 -6
- package/src/cfg/generated/enums.ts +36 -60
- package/src/cfg/generated/index.ts +40 -10
- package/src/cfg/generated/schema.ts +6391 -4704
- package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +0 -123
- package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +0 -77
- package/src/cfg/generated/_utils/hooks/cfg__tasks.ts +0 -111
- package/src/cfg/generated/_utils/schemas/PaginatedTaskLogListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/TaskLog.schema.ts +0 -42
- package/src/cfg/generated/_utils/schemas/TaskLogDetail.schema.ts +0 -50
- package/src/cfg/generated/_utils/schemas/TaskLogList.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/TaskLogOverview.schema.ts +0 -43
- package/src/cfg/generated/_utils/schemas/TaskLogStats.schema.ts +0 -30
- package/src/cfg/generated/_utils/schemas/TaskLogTimeline.schema.ts +0 -28
- package/src/cfg/generated/_utils/schemas/TaskLogTimelineItem.schema.ts +0 -28
- package/src/cfg/generated/_utils/schemas/TasksByQueue.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/TasksByStatus.schema.ts +0 -24
- package/src/cfg/generated/cfg__dashboard/client.ts +0 -48
- package/src/cfg/generated/cfg__dashboard/models.ts +0 -0
- package/src/cfg/generated/cfg__tasks/client.ts +0 -104
- package/src/cfg/generated/cfg__tasks/models.ts +0 -285
- /package/src/cfg/generated/{cfg__dashboard → cfg__grpc__grpc_monitoring}/index.ts +0 -0
- /package/src/cfg/generated/{cfg__tasks → cfg__rq__rq_jobs}/index.ts +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RunDemoRequestRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for running demo tasks.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Serializer for running demo tasks.
|
|
12
|
+
*/
|
|
13
|
+
export const RunDemoRequestRequestSchema = z.object({
|
|
14
|
+
scenario: z.nativeEnum(Enums.RunDemoRequestRequestScenario),
|
|
15
|
+
queue: z.string().min(1).optional(),
|
|
16
|
+
args: z.array(z.string()).optional(),
|
|
17
|
+
kwargs: z.record(z.string(), z.any()).optional(),
|
|
18
|
+
timeout: z.int().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type RunDemoRequestRequest = z.infer<typeof RunDemoRequestRequestSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ScheduleActionResponse
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Response serializer for schedule actions (create/delete).
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Response serializer for schedule actions (create/delete).
|
|
11
|
+
*/
|
|
12
|
+
export const ScheduleActionResponseSchema = z.object({
|
|
13
|
+
success: z.boolean(),
|
|
14
|
+
message: z.string(),
|
|
15
|
+
job_id: z.string().nullable().optional(),
|
|
16
|
+
action: z.string(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type ScheduleActionResponse = z.infer<typeof ScheduleActionResponseSchema>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ScheduleCreateRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for creating a scheduled job.
|
|
6
|
+
|
|
7
|
+
Supports three scheduling methods:
|
|
8
|
+
1. scheduled_time: Schedule job at specific time
|
|
9
|
+
2. interval: Schedule job to repeat at intervals
|
|
10
|
+
3. cron: Schedule job with cron expression
|
|
11
|
+
* */
|
|
12
|
+
import { z } from 'zod'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Serializer for creating a scheduled job.
|
|
16
|
+
|
|
17
|
+
Supports three scheduling methods:
|
|
18
|
+
1. scheduled_time: Schedule job at specific time
|
|
19
|
+
2. interval: Schedule job to repeat at intervals
|
|
20
|
+
3. cron: Schedule job with cron expression
|
|
21
|
+
*/
|
|
22
|
+
export const ScheduleCreateRequestSchema = z.object({
|
|
23
|
+
func: z.string().min(1),
|
|
24
|
+
args: z.array(z.string()).optional(),
|
|
25
|
+
kwargs: z.record(z.string(), z.any()).optional(),
|
|
26
|
+
queue_name: z.string().min(1).optional(),
|
|
27
|
+
scheduled_time: z.iso.datetime().nullable().optional(),
|
|
28
|
+
interval: z.int().min(1.0).nullable().optional(),
|
|
29
|
+
cron: z.string().min(1).nullable().optional(),
|
|
30
|
+
timeout: z.int().nullable().optional(),
|
|
31
|
+
result_ttl: z.int().nullable().optional(),
|
|
32
|
+
repeat: z.int().nullable().optional(),
|
|
33
|
+
description: z.string().min(1).max(255).nullable().optional(),
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Infer TypeScript type from Zod schema
|
|
38
|
+
*/
|
|
39
|
+
export type ScheduleCreateRequest = z.infer<typeof ScheduleCreateRequestSchema>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ScheduledJob
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for scheduled job information.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for scheduled job information.
|
|
11
|
+
*/
|
|
12
|
+
export const ScheduledJobSchema = z.object({
|
|
13
|
+
id: z.string(),
|
|
14
|
+
func: z.string(),
|
|
15
|
+
args: z.array(z.string()).optional(),
|
|
16
|
+
kwargs: z.record(z.string(), z.any()).optional(),
|
|
17
|
+
queue_name: z.string(),
|
|
18
|
+
scheduled_time: z.iso.datetime().nullable().optional(),
|
|
19
|
+
interval: z.int().nullable().optional(),
|
|
20
|
+
cron: z.string().nullable().optional(),
|
|
21
|
+
timeout: z.int().nullable().optional(),
|
|
22
|
+
result_ttl: z.int().nullable().optional(),
|
|
23
|
+
repeat: z.int().nullable().optional(),
|
|
24
|
+
description: z.string().nullable().optional(),
|
|
25
|
+
created_at: z.iso.datetime().nullable().optional(),
|
|
26
|
+
meta: z.record(z.string(), z.any()).optional(),
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Infer TypeScript type from Zod schema
|
|
31
|
+
*/
|
|
32
|
+
export type ScheduledJob = z.infer<typeof ScheduledJobSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServiceList
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * List of gRPC services with statistics.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ServiceStatsSerializerSchema } from './ServiceStatsSerializer.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* List of gRPC services with statistics.
|
|
12
|
+
*/
|
|
13
|
+
export const ServiceListSchema = z.object({
|
|
14
|
+
services: z.array(ServiceStatsSerializerSchema),
|
|
15
|
+
total_services: z.int(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type ServiceList = z.infer<typeof ServiceListSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ServiceStatsSerializer
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Statistics for a single gRPC service.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Statistics for a single gRPC service.
|
|
11
|
+
*/
|
|
12
|
+
export const ServiceStatsSerializerSchema = 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 ServiceStatsSerializer = z.infer<typeof ServiceStatsSerializerSchema>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for StressTestRequestRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for stress testing.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Serializer for stress testing.
|
|
12
|
+
*/
|
|
13
|
+
export const StressTestRequestRequestSchema = z.object({
|
|
14
|
+
num_jobs: z.int().min(1.0).max(1000.0).optional(),
|
|
15
|
+
queue: z.string().min(1).optional(),
|
|
16
|
+
scenario: z.nativeEnum(Enums.StressTestRequestRequestScenario).optional(),
|
|
17
|
+
duration: z.int().min(1.0).max(60.0).optional(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type StressTestRequestRequest = z.infer<typeof StressTestRequestRequestSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for TestScenario
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for available test scenarios.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for available test scenarios.
|
|
11
|
+
*/
|
|
12
|
+
export const TestScenarioSchema = z.object({
|
|
13
|
+
id: z.string(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
description: z.string(),
|
|
16
|
+
task_func: z.string(),
|
|
17
|
+
default_args: z.array(z.string()).optional(),
|
|
18
|
+
default_kwargs: z.record(z.string(), z.any()).optional(),
|
|
19
|
+
estimated_duration: z.int().nullable().optional(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type TestScenario = z.infer<typeof TestScenarioSchema>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for TestingActionResponse
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for testing action responses.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for testing action responses.
|
|
11
|
+
*/
|
|
12
|
+
export const TestingActionResponseSchema = z.object({
|
|
13
|
+
success: z.boolean(),
|
|
14
|
+
message: z.string(),
|
|
15
|
+
job_ids: z.array(z.string()).optional(),
|
|
16
|
+
count: z.int().nullable().optional(),
|
|
17
|
+
metadata: z.record(z.string(), z.any()).optional(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type TestingActionResponse = z.infer<typeof TestingActionResponseSchema>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for Worker
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Worker information serializer.
|
|
6
|
+
|
|
7
|
+
Provides detailed information about an RQ worker.
|
|
8
|
+
* */
|
|
9
|
+
import { z } from 'zod'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Worker information serializer.
|
|
13
|
+
|
|
14
|
+
Provides detailed information about an RQ worker.
|
|
15
|
+
*/
|
|
16
|
+
export const WorkerSchema = z.object({
|
|
17
|
+
name: z.string(),
|
|
18
|
+
queues: z.array(z.string()).optional(),
|
|
19
|
+
state: z.string(),
|
|
20
|
+
current_job: z.string().nullable().optional(),
|
|
21
|
+
birth: z.iso.datetime(),
|
|
22
|
+
last_heartbeat: z.iso.datetime(),
|
|
23
|
+
successful_job_count: z.int().optional(),
|
|
24
|
+
failed_job_count: z.int().optional(),
|
|
25
|
+
total_working_time: z.number().optional(),
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Infer TypeScript type from Zod schema
|
|
30
|
+
*/
|
|
31
|
+
export type Worker = z.infer<typeof WorkerSchema>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for WorkerStats
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Aggregated worker statistics serializer.
|
|
6
|
+
|
|
7
|
+
Provides overview of all workers across all queues.
|
|
8
|
+
* */
|
|
9
|
+
import { z } from 'zod'
|
|
10
|
+
import { WorkerSchema } from './Worker.schema'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Aggregated worker statistics serializer.
|
|
14
|
+
|
|
15
|
+
Provides overview of all workers across all queues.
|
|
16
|
+
*/
|
|
17
|
+
export const WorkerStatsSchema = z.object({
|
|
18
|
+
total_workers: z.int(),
|
|
19
|
+
busy_workers: z.int().optional(),
|
|
20
|
+
idle_workers: z.int().optional(),
|
|
21
|
+
suspended_workers: z.int().optional(),
|
|
22
|
+
total_successful_jobs: z.int().optional(),
|
|
23
|
+
total_failed_jobs: z.int().optional(),
|
|
24
|
+
total_working_time: z.number().optional(),
|
|
25
|
+
workers: z.array(WorkerSchema).optional(),
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Infer TypeScript type from Zod schema
|
|
30
|
+
*/
|
|
31
|
+
export type WorkerStats = z.infer<typeof WorkerStatsSchema>
|
|
@@ -95,6 +95,9 @@ export * from './Endpoint.schema'
|
|
|
95
95
|
export * from './EndpointsStatus.schema'
|
|
96
96
|
export * from './ErrorResponse.schema'
|
|
97
97
|
export * from './HealthCheck.schema'
|
|
98
|
+
export * from './JobActionResponse.schema'
|
|
99
|
+
export * from './JobDetail.schema'
|
|
100
|
+
export * from './JobList.schema'
|
|
98
101
|
export * from './LeadSubmission.schema'
|
|
99
102
|
export * from './LeadSubmissionError.schema'
|
|
100
103
|
export * from './LeadSubmissionRequest.schema'
|
|
@@ -105,6 +108,8 @@ export * from './Message.schema'
|
|
|
105
108
|
export * from './MessageCreate.schema'
|
|
106
109
|
export * from './MessageCreateRequest.schema'
|
|
107
110
|
export * from './MessageRequest.schema'
|
|
111
|
+
export * from './MethodList.schema'
|
|
112
|
+
export * from './MethodStatsSerializer.schema'
|
|
108
113
|
export * from './Newsletter.schema'
|
|
109
114
|
export * from './NewsletterCampaign.schema'
|
|
110
115
|
export * from './NewsletterCampaignRequest.schema'
|
|
@@ -131,7 +136,6 @@ export * from './PaginatedNewsletterSubscriptionList.schema'
|
|
|
131
136
|
export * from './PaginatedPaymentListList.schema'
|
|
132
137
|
export * from './PaginatedPublicCategoryList.schema'
|
|
133
138
|
export * from './PaginatedPublicDocumentListList.schema'
|
|
134
|
-
export * from './PaginatedTaskLogListList.schema'
|
|
135
139
|
export * from './PaginatedTicketList.schema'
|
|
136
140
|
export * from './PatchedArchiveItemChunkRequest.schema'
|
|
137
141
|
export * from './PatchedArchiveItemRequest.schema'
|
|
@@ -152,30 +156,34 @@ export * from './PublicDocument.schema'
|
|
|
152
156
|
export * from './PublicDocumentList.schema'
|
|
153
157
|
export * from './PublishTestRequestRequest.schema'
|
|
154
158
|
export * from './PublishTestResponse.schema'
|
|
159
|
+
export * from './QueueDetail.schema'
|
|
160
|
+
export * from './QueueStats.schema'
|
|
155
161
|
export * from './QuickAction.schema'
|
|
156
162
|
export * from './QuickHealth.schema'
|
|
163
|
+
export * from './RQConfig.schema'
|
|
157
164
|
export * from './RecentPublishes.schema'
|
|
165
|
+
export * from './RecentRequests.schema'
|
|
158
166
|
export * from './RecentUser.schema'
|
|
167
|
+
export * from './RunDemoRequestRequest.schema'
|
|
168
|
+
export * from './ScheduleActionResponse.schema'
|
|
169
|
+
export * from './ScheduleCreateRequest.schema'
|
|
170
|
+
export * from './ScheduledJob.schema'
|
|
159
171
|
export * from './SendCampaignRequest.schema'
|
|
160
172
|
export * from './SendCampaignResponse.schema'
|
|
161
173
|
export * from './Sender.schema'
|
|
174
|
+
export * from './ServiceList.schema'
|
|
175
|
+
export * from './ServiceStatsSerializer.schema'
|
|
162
176
|
export * from './StatCard.schema'
|
|
177
|
+
export * from './StressTestRequestRequest.schema'
|
|
163
178
|
export * from './SubscribeRequest.schema'
|
|
164
179
|
export * from './SubscribeResponse.schema'
|
|
165
180
|
export * from './SuccessResponse.schema'
|
|
166
181
|
export * from './SystemHealth.schema'
|
|
167
182
|
export * from './SystemHealthItem.schema'
|
|
168
183
|
export * from './SystemMetrics.schema'
|
|
169
|
-
export * from './TaskLog.schema'
|
|
170
|
-
export * from './TaskLogDetail.schema'
|
|
171
|
-
export * from './TaskLogList.schema'
|
|
172
|
-
export * from './TaskLogOverview.schema'
|
|
173
|
-
export * from './TaskLogStats.schema'
|
|
174
|
-
export * from './TaskLogTimeline.schema'
|
|
175
|
-
export * from './TaskLogTimelineItem.schema'
|
|
176
|
-
export * from './TasksByQueue.schema'
|
|
177
|
-
export * from './TasksByStatus.schema'
|
|
178
184
|
export * from './TestEmailRequest.schema'
|
|
185
|
+
export * from './TestScenario.schema'
|
|
186
|
+
export * from './TestingActionResponse.schema'
|
|
179
187
|
export * from './Ticket.schema'
|
|
180
188
|
export * from './TicketRequest.schema'
|
|
181
189
|
export * from './TokenRefresh.schema'
|
|
@@ -190,3 +198,5 @@ export * from './UserProfileUpdateRequest.schema'
|
|
|
190
198
|
export * from './UserStatistics.schema'
|
|
191
199
|
export * from './VectorizationResult.schema'
|
|
192
200
|
export * from './VectorizationStatistics.schema'
|
|
201
|
+
export * from './Worker.schema'
|
|
202
|
+
export * from './WorkerStats.schema'
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Grpc Monitoring.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgGrpcMonitoring {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get gRPC health status
|
|
16
|
+
*
|
|
17
|
+
* Returns the current health status of the gRPC server.
|
|
18
|
+
*/
|
|
19
|
+
async grpcMonitorHealthRetrieve(): Promise<Models.HealthCheck> {
|
|
20
|
+
const response = await this.client.request('GET', "/cfg/grpc/monitor/health/");
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async grpcMonitorMethodsRetrieve(hours?: number, service?: string): Promise<Models.MethodList[]>;
|
|
25
|
+
async grpcMonitorMethodsRetrieve(params?: { hours?: number; service?: string }): Promise<Models.MethodList[]>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get method statistics
|
|
29
|
+
*
|
|
30
|
+
* Returns statistics grouped by method.
|
|
31
|
+
*/
|
|
32
|
+
async grpcMonitorMethodsRetrieve(...args: any[]): Promise<Models.MethodList[]> {
|
|
33
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
34
|
+
|
|
35
|
+
let params;
|
|
36
|
+
if (isParamsObject) {
|
|
37
|
+
params = args[0];
|
|
38
|
+
} else {
|
|
39
|
+
params = { hours: args[0], service: args[1] };
|
|
40
|
+
}
|
|
41
|
+
const response = await this.client.request('GET', "/cfg/grpc/monitor/methods/", { params });
|
|
42
|
+
return (response as any).results || [];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async grpcMonitorOverviewRetrieve(hours?: number): Promise<Models.OverviewStats>;
|
|
46
|
+
async grpcMonitorOverviewRetrieve(params?: { hours?: number }): Promise<Models.OverviewStats>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get overview statistics
|
|
50
|
+
*
|
|
51
|
+
* Returns overview statistics for gRPC requests.
|
|
52
|
+
*/
|
|
53
|
+
async grpcMonitorOverviewRetrieve(...args: any[]): Promise<Models.OverviewStats> {
|
|
54
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
55
|
+
|
|
56
|
+
let params;
|
|
57
|
+
if (isParamsObject) {
|
|
58
|
+
params = args[0];
|
|
59
|
+
} else {
|
|
60
|
+
params = { hours: args[0] };
|
|
61
|
+
}
|
|
62
|
+
const response = await this.client.request('GET', "/cfg/grpc/monitor/overview/", { params });
|
|
63
|
+
return response;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async grpcMonitorRequestsRetrieve(count?: number, method?: string, offset?: number, service?: string, status?: string): Promise<Models.RecentRequests>;
|
|
67
|
+
async grpcMonitorRequestsRetrieve(params?: { count?: number; method?: string; offset?: number; service?: string; status?: string }): Promise<Models.RecentRequests>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Get recent requests
|
|
71
|
+
*
|
|
72
|
+
* Returns a list of recent gRPC requests with their details.
|
|
73
|
+
*/
|
|
74
|
+
async grpcMonitorRequestsRetrieve(...args: any[]): Promise<Models.RecentRequests> {
|
|
75
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
76
|
+
|
|
77
|
+
let params;
|
|
78
|
+
if (isParamsObject) {
|
|
79
|
+
params = args[0];
|
|
80
|
+
} else {
|
|
81
|
+
params = { count: args[0], method: args[1], offset: args[2], service: args[3], status: args[4] };
|
|
82
|
+
}
|
|
83
|
+
const response = await this.client.request('GET', "/cfg/grpc/monitor/requests/", { params });
|
|
84
|
+
return response;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async grpcMonitorServicesRetrieve(hours?: number): Promise<Models.ServiceList[]>;
|
|
88
|
+
async grpcMonitorServicesRetrieve(params?: { hours?: number }): Promise<Models.ServiceList[]>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get service statistics
|
|
92
|
+
*
|
|
93
|
+
* Returns statistics grouped by service.
|
|
94
|
+
*/
|
|
95
|
+
async grpcMonitorServicesRetrieve(...args: any[]): Promise<Models.ServiceList[]> {
|
|
96
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
97
|
+
|
|
98
|
+
let params;
|
|
99
|
+
if (isParamsObject) {
|
|
100
|
+
params = args[0];
|
|
101
|
+
} else {
|
|
102
|
+
params = { hours: args[0] };
|
|
103
|
+
}
|
|
104
|
+
const response = await this.client.request('GET', "/cfg/grpc/monitor/services/", { params });
|
|
105
|
+
return (response as any).results || [];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async grpcMonitorTimelineRetrieve(hours?: number, interval?: string): Promise<any>;
|
|
109
|
+
async grpcMonitorTimelineRetrieve(params?: { hours?: number; interval?: string }): Promise<any>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Get request timeline
|
|
113
|
+
*
|
|
114
|
+
* Returns hourly or daily breakdown of request counts for charts.
|
|
115
|
+
*/
|
|
116
|
+
async grpcMonitorTimelineRetrieve(...args: any[]): Promise<any> {
|
|
117
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
118
|
+
|
|
119
|
+
let params;
|
|
120
|
+
if (isParamsObject) {
|
|
121
|
+
params = args[0];
|
|
122
|
+
} else {
|
|
123
|
+
params = { hours: args[0], interval: args[1] };
|
|
124
|
+
}
|
|
125
|
+
const response = await this.client.request('GET', "/cfg/grpc/monitor/timeline/", { params });
|
|
126
|
+
return response;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Health check response.
|
|
3
|
+
*
|
|
4
|
+
* Response model (includes read-only fields).
|
|
5
|
+
*/
|
|
6
|
+
export interface HealthCheck {
|
|
7
|
+
/** Health status: healthy or unhealthy */
|
|
8
|
+
status: string;
|
|
9
|
+
/** Configured wrapper URL */
|
|
10
|
+
wrapper_url: string;
|
|
11
|
+
/** Whether API key is configured */
|
|
12
|
+
has_api_key: boolean;
|
|
13
|
+
/** Current timestamp */
|
|
14
|
+
timestamp: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* List of gRPC methods with statistics.
|
|
19
|
+
*
|
|
20
|
+
* Response model (includes read-only fields).
|
|
21
|
+
*/
|
|
22
|
+
export interface MethodList {
|
|
23
|
+
/** Method statistics */
|
|
24
|
+
methods: Array<MethodStatsSerializer>;
|
|
25
|
+
/** Total number of methods */
|
|
26
|
+
total_methods: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Overview statistics for Centrifugo publishes.
|
|
31
|
+
*
|
|
32
|
+
* Response model (includes read-only fields).
|
|
33
|
+
*/
|
|
34
|
+
export interface OverviewStats {
|
|
35
|
+
/** Total publishes in period */
|
|
36
|
+
total: number;
|
|
37
|
+
/** Successful publishes */
|
|
38
|
+
successful: number;
|
|
39
|
+
/** Failed publishes */
|
|
40
|
+
failed: number;
|
|
41
|
+
/** Timeout publishes */
|
|
42
|
+
timeout: number;
|
|
43
|
+
/** Success rate percentage */
|
|
44
|
+
success_rate: number;
|
|
45
|
+
/** Average duration in milliseconds */
|
|
46
|
+
avg_duration_ms: number;
|
|
47
|
+
/** Average ACKs received */
|
|
48
|
+
avg_acks_received: number;
|
|
49
|
+
/** Statistics period in hours */
|
|
50
|
+
period_hours: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Recent gRPC requests list.
|
|
55
|
+
*
|
|
56
|
+
* Response model (includes read-only fields).
|
|
57
|
+
*/
|
|
58
|
+
export interface RecentRequests {
|
|
59
|
+
/** List of recent requests */
|
|
60
|
+
requests: Array<Record<string, any>>;
|
|
61
|
+
/** Number of requests returned */
|
|
62
|
+
count: number;
|
|
63
|
+
/** Total requests available */
|
|
64
|
+
total_available: number;
|
|
65
|
+
/** Current offset for pagination */
|
|
66
|
+
offset?: number;
|
|
67
|
+
/** Whether more results are available */
|
|
68
|
+
has_more?: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* List of gRPC services with statistics.
|
|
73
|
+
*
|
|
74
|
+
* Response model (includes read-only fields).
|
|
75
|
+
*/
|
|
76
|
+
export interface ServiceList {
|
|
77
|
+
/** Service statistics */
|
|
78
|
+
services: Array<ServiceStatsSerializer>;
|
|
79
|
+
/** Total number of services */
|
|
80
|
+
total_services: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Statistics for a single gRPC method.
|
|
85
|
+
*
|
|
86
|
+
* Response model (includes read-only fields).
|
|
87
|
+
*/
|
|
88
|
+
export interface MethodStatsSerializer {
|
|
89
|
+
/** Method name */
|
|
90
|
+
method_name: string;
|
|
91
|
+
/** Service name */
|
|
92
|
+
service_name: string;
|
|
93
|
+
/** Total requests */
|
|
94
|
+
total: number;
|
|
95
|
+
/** Successful requests */
|
|
96
|
+
successful: number;
|
|
97
|
+
/** Error requests */
|
|
98
|
+
errors: number;
|
|
99
|
+
/** Average duration */
|
|
100
|
+
avg_duration_ms: number;
|
|
101
|
+
/** Last activity timestamp */
|
|
102
|
+
last_activity_at: string | null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Statistics for a single gRPC service.
|
|
107
|
+
*
|
|
108
|
+
* Response model (includes read-only fields).
|
|
109
|
+
*/
|
|
110
|
+
export interface ServiceStatsSerializer {
|
|
111
|
+
/** Service name */
|
|
112
|
+
service_name: string;
|
|
113
|
+
/** Total requests */
|
|
114
|
+
total: number;
|
|
115
|
+
/** Successful requests */
|
|
116
|
+
successful: number;
|
|
117
|
+
/** Error requests */
|
|
118
|
+
errors: number;
|
|
119
|
+
/** Average duration */
|
|
120
|
+
avg_duration_ms: number;
|
|
121
|
+
/** Last activity timestamp */
|
|
122
|
+
last_activity_at: string | null;
|
|
123
|
+
}
|
|
124
|
+
|