@djangocfg/api 1.2.19 → 1.2.21

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.
Files changed (82) hide show
  1. package/dist/index.cjs +11846 -9936
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +5466 -3236
  4. package/dist/index.d.ts +5466 -3236
  5. package/dist/index.mjs +11859 -9975
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_jobs.ts +105 -0
  9. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_monitoring.ts +77 -0
  10. package/src/cfg/generated/_utils/fetchers/{cfg__dashboard.ts → cfg__rq__rq_queues.ts} +21 -20
  11. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_registries.ts +132 -0
  12. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_schedules.ts +92 -0
  13. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_testing.ts +120 -0
  14. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_workers.ts +62 -0
  15. package/src/cfg/generated/_utils/fetchers/index.ts +7 -2
  16. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_jobs.ts +106 -0
  17. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +65 -0
  18. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_queues.ts +82 -0
  19. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_registries.ts +132 -0
  20. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_schedules.ts +89 -0
  21. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_testing.ts +124 -0
  22. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +50 -0
  23. package/src/cfg/generated/_utils/hooks/index.ts +7 -2
  24. package/src/cfg/generated/_utils/schemas/JobActionResponse.schema.ts +26 -0
  25. package/src/cfg/generated/_utils/schemas/JobDetail.schema.ts +40 -0
  26. package/src/cfg/generated/_utils/schemas/JobList.schema.ts +28 -0
  27. package/src/cfg/generated/_utils/schemas/QueueDetail.schema.ts +34 -0
  28. package/src/cfg/generated/_utils/schemas/QueueStats.schema.ts +31 -0
  29. package/src/cfg/generated/_utils/schemas/RQConfig.schema.ts +29 -0
  30. package/src/cfg/generated/_utils/schemas/RunDemoRequestRequest.schema.ts +24 -0
  31. package/src/cfg/generated/_utils/schemas/ScheduleActionResponse.schema.ts +22 -0
  32. package/src/cfg/generated/_utils/schemas/ScheduleCreateRequest.schema.ts +39 -0
  33. package/src/cfg/generated/_utils/schemas/ScheduledJob.schema.ts +32 -0
  34. package/src/cfg/generated/_utils/schemas/StressTestRequestRequest.schema.ts +23 -0
  35. package/src/cfg/generated/_utils/schemas/TestScenario.schema.ts +25 -0
  36. package/src/cfg/generated/_utils/schemas/TestingActionResponse.schema.ts +23 -0
  37. package/src/cfg/generated/_utils/schemas/Worker.schema.ts +31 -0
  38. package/src/cfg/generated/_utils/schemas/WorkerStats.schema.ts +31 -0
  39. package/src/cfg/generated/_utils/schemas/index.ts +15 -10
  40. package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +3 -1
  41. package/src/cfg/generated/cfg__rq__rq_jobs/client.ts +76 -0
  42. package/src/cfg/generated/cfg__rq__rq_jobs/models.ts +62 -0
  43. package/src/cfg/generated/cfg__rq__rq_monitoring/client.ts +45 -0
  44. package/src/cfg/generated/cfg__rq__rq_monitoring/models.ts +39 -0
  45. package/src/cfg/generated/cfg__rq__rq_queues/client.ts +78 -0
  46. package/src/cfg/generated/cfg__rq__rq_queues/index.ts +2 -0
  47. package/src/cfg/generated/cfg__rq__rq_queues/models.ts +33 -0
  48. package/src/cfg/generated/cfg__rq__rq_registries/client.ts +161 -0
  49. package/src/cfg/generated/cfg__rq__rq_registries/index.ts +2 -0
  50. package/src/cfg/generated/cfg__rq__rq_registries/models.ts +17 -0
  51. package/src/cfg/generated/cfg__rq__rq_schedules/client.ts +91 -0
  52. package/src/cfg/generated/cfg__rq__rq_schedules/index.ts +2 -0
  53. package/src/cfg/generated/cfg__rq__rq_schedules/models.ts +84 -0
  54. package/src/cfg/generated/cfg__rq__rq_testing/client.ts +96 -0
  55. package/src/cfg/generated/cfg__rq__rq_testing/index.ts +2 -0
  56. package/src/cfg/generated/cfg__rq__rq_testing/models.ts +68 -0
  57. package/src/cfg/generated/cfg__rq__rq_workers/client.ts +46 -0
  58. package/src/cfg/generated/cfg__rq__rq_workers/index.ts +2 -0
  59. package/src/cfg/generated/cfg__rq__rq_workers/models.ts +52 -0
  60. package/src/cfg/generated/client.ts +21 -6
  61. package/src/cfg/generated/enums.ts +40 -60
  62. package/src/cfg/generated/index.ts +35 -10
  63. package/src/cfg/generated/schema.ts +6160 -5035
  64. package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +0 -123
  65. package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +0 -77
  66. package/src/cfg/generated/_utils/hooks/cfg__tasks.ts +0 -111
  67. package/src/cfg/generated/_utils/schemas/PaginatedTaskLogListList.schema.ts +0 -24
  68. package/src/cfg/generated/_utils/schemas/TaskLog.schema.ts +0 -42
  69. package/src/cfg/generated/_utils/schemas/TaskLogDetail.schema.ts +0 -50
  70. package/src/cfg/generated/_utils/schemas/TaskLogList.schema.ts +0 -35
  71. package/src/cfg/generated/_utils/schemas/TaskLogOverview.schema.ts +0 -43
  72. package/src/cfg/generated/_utils/schemas/TaskLogStats.schema.ts +0 -30
  73. package/src/cfg/generated/_utils/schemas/TaskLogTimeline.schema.ts +0 -28
  74. package/src/cfg/generated/_utils/schemas/TaskLogTimelineItem.schema.ts +0 -28
  75. package/src/cfg/generated/_utils/schemas/TasksByQueue.schema.ts +0 -24
  76. package/src/cfg/generated/_utils/schemas/TasksByStatus.schema.ts +0 -24
  77. package/src/cfg/generated/cfg__dashboard/client.ts +0 -48
  78. package/src/cfg/generated/cfg__dashboard/models.ts +0 -0
  79. package/src/cfg/generated/cfg__tasks/client.ts +0 -104
  80. package/src/cfg/generated/cfg__tasks/models.ts +0 -285
  81. /package/src/cfg/generated/{cfg__dashboard → cfg__rq__rq_jobs}/index.ts +0 -0
  82. /package/src/cfg/generated/{cfg__tasks → cfg__rq__rq_monitoring}/index.ts +0 -0
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Zod schema for JobActionResponse
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Job action response serializer.
6
+
7
+ Used for job management actions (requeue, delete, etc.).
8
+ * */
9
+ import { z } from 'zod'
10
+
11
+ /**
12
+ * Job action response serializer.
13
+
14
+ Used for job management actions (requeue, delete, etc.).
15
+ */
16
+ export const JobActionResponseSchema = z.object({
17
+ success: z.boolean(),
18
+ message: z.string(),
19
+ job_id: z.string(),
20
+ action: z.string(),
21
+ })
22
+
23
+ /**
24
+ * Infer TypeScript type from Zod schema
25
+ */
26
+ export type JobActionResponse = z.infer<typeof JobActionResponseSchema>
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Zod schema for JobDetail
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Detailed job information serializer.
6
+
7
+ Provides comprehensive job details including result and metadata.
8
+ * */
9
+ import { z } from 'zod'
10
+
11
+ /**
12
+ * Detailed job information serializer.
13
+
14
+ Provides comprehensive job details including result and metadata.
15
+ */
16
+ export const JobDetailSchema = z.object({
17
+ id: z.string(),
18
+ func_name: z.string(),
19
+ args: z.array(z.string()).optional(),
20
+ kwargs: z.record(z.string(), z.any()).optional(),
21
+ created_at: z.iso.datetime(),
22
+ enqueued_at: z.iso.datetime().nullable().optional(),
23
+ started_at: z.iso.datetime().nullable().optional(),
24
+ ended_at: z.iso.datetime().nullable().optional(),
25
+ status: z.string(),
26
+ queue: z.string(),
27
+ worker_name: z.string().nullable().optional(),
28
+ timeout: z.int().nullable().optional(),
29
+ result_ttl: z.int().nullable().optional(),
30
+ failure_ttl: z.int().nullable().optional(),
31
+ result: z.string().nullable().optional(),
32
+ exc_info: z.string().nullable().optional(),
33
+ meta: z.record(z.string(), z.any()).optional(),
34
+ dependency_ids: z.array(z.string()).optional(),
35
+ })
36
+
37
+ /**
38
+ * Infer TypeScript type from Zod schema
39
+ */
40
+ export type JobDetail = z.infer<typeof JobDetailSchema>
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Zod schema for JobList
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Job list item serializer.
6
+
7
+ Provides basic job information for list views.
8
+ * */
9
+ import { z } from 'zod'
10
+
11
+ /**
12
+ * Job list item serializer.
13
+
14
+ Provides basic job information for list views.
15
+ */
16
+ export const JobListSchema = z.object({
17
+ id: z.string(),
18
+ func_name: z.string(),
19
+ created_at: z.iso.datetime(),
20
+ status: z.string(),
21
+ queue: z.string(),
22
+ timeout: z.int().nullable().optional(),
23
+ })
24
+
25
+ /**
26
+ * Infer TypeScript type from Zod schema
27
+ */
28
+ export type JobList = z.infer<typeof JobListSchema>
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Zod schema for QueueDetail
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Detailed queue information serializer.
6
+
7
+ Provides comprehensive queue statistics and metadata.
8
+ * */
9
+ import { z } from 'zod'
10
+
11
+ /**
12
+ * Detailed queue information serializer.
13
+
14
+ Provides comprehensive queue statistics and metadata.
15
+ */
16
+ export const QueueDetailSchema = z.object({
17
+ name: z.string(),
18
+ count: z.int(),
19
+ queued_jobs: z.int().optional(),
20
+ started_jobs: z.int().optional(),
21
+ finished_jobs: z.int().optional(),
22
+ failed_jobs: z.int().optional(),
23
+ deferred_jobs: z.int().optional(),
24
+ scheduled_jobs: z.int().optional(),
25
+ workers: z.int().optional(),
26
+ oldest_job_timestamp: z.iso.datetime().nullable().optional(),
27
+ connection_kwargs: z.record(z.string(), z.any()).optional(),
28
+ is_async: z.boolean().optional(),
29
+ })
30
+
31
+ /**
32
+ * Infer TypeScript type from Zod schema
33
+ */
34
+ export type QueueDetail = z.infer<typeof QueueDetailSchema>
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Zod schema for QueueStats
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Queue statistics serializer.
6
+
7
+ Provides basic queue statistics.
8
+ * */
9
+ import { z } from 'zod'
10
+
11
+ /**
12
+ * Queue statistics serializer.
13
+
14
+ Provides basic queue statistics.
15
+ */
16
+ export const QueueStatsSchema = z.object({
17
+ name: z.string(),
18
+ count: z.int(),
19
+ queued_jobs: z.int().optional(),
20
+ started_jobs: z.int().optional(),
21
+ finished_jobs: z.int().optional(),
22
+ failed_jobs: z.int().optional(),
23
+ deferred_jobs: z.int().optional(),
24
+ scheduled_jobs: z.int().optional(),
25
+ workers: z.int().optional(),
26
+ })
27
+
28
+ /**
29
+ * Infer TypeScript type from Zod schema
30
+ */
31
+ export type QueueStats = z.infer<typeof QueueStatsSchema>
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Zod schema for RQConfig
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * RQ configuration serializer.
6
+
7
+ Returns current RQ configuration from django-cfg.
8
+ * */
9
+ import { z } from 'zod'
10
+
11
+ /**
12
+ * RQ configuration serializer.
13
+
14
+ Returns current RQ configuration from django-cfg.
15
+ */
16
+ export const RQConfigSchema = z.object({
17
+ enabled: z.boolean(),
18
+ queues: z.record(z.string(), z.any()),
19
+ async_mode: z.boolean().optional(),
20
+ show_admin_link: z.boolean().optional(),
21
+ prometheus_enabled: z.boolean().optional(),
22
+ api_token_configured: z.boolean().optional(),
23
+ schedules: z.array(z.string()).optional(),
24
+ })
25
+
26
+ /**
27
+ * Infer TypeScript type from Zod schema
28
+ */
29
+ export type RQConfig = z.infer<typeof RQConfigSchema>
@@ -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,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'
@@ -133,7 +136,6 @@ export * from './PaginatedNewsletterSubscriptionList.schema'
133
136
  export * from './PaginatedPaymentListList.schema'
134
137
  export * from './PaginatedPublicCategoryList.schema'
135
138
  export * from './PaginatedPublicDocumentListList.schema'
136
- export * from './PaginatedTaskLogListList.schema'
137
139
  export * from './PaginatedTicketList.schema'
138
140
  export * from './PatchedArchiveItemChunkRequest.schema'
139
141
  export * from './PatchedArchiveItemRequest.schema'
@@ -154,33 +156,34 @@ export * from './PublicDocument.schema'
154
156
  export * from './PublicDocumentList.schema'
155
157
  export * from './PublishTestRequestRequest.schema'
156
158
  export * from './PublishTestResponse.schema'
159
+ export * from './QueueDetail.schema'
160
+ export * from './QueueStats.schema'
157
161
  export * from './QuickAction.schema'
158
162
  export * from './QuickHealth.schema'
163
+ export * from './RQConfig.schema'
159
164
  export * from './RecentPublishes.schema'
160
165
  export * from './RecentRequests.schema'
161
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'
162
171
  export * from './SendCampaignRequest.schema'
163
172
  export * from './SendCampaignResponse.schema'
164
173
  export * from './Sender.schema'
165
174
  export * from './ServiceList.schema'
166
175
  export * from './ServiceStatsSerializer.schema'
167
176
  export * from './StatCard.schema'
177
+ export * from './StressTestRequestRequest.schema'
168
178
  export * from './SubscribeRequest.schema'
169
179
  export * from './SubscribeResponse.schema'
170
180
  export * from './SuccessResponse.schema'
171
181
  export * from './SystemHealth.schema'
172
182
  export * from './SystemHealthItem.schema'
173
183
  export * from './SystemMetrics.schema'
174
- export * from './TaskLog.schema'
175
- export * from './TaskLogDetail.schema'
176
- export * from './TaskLogList.schema'
177
- export * from './TaskLogOverview.schema'
178
- export * from './TaskLogStats.schema'
179
- export * from './TaskLogTimeline.schema'
180
- export * from './TaskLogTimelineItem.schema'
181
- export * from './TasksByQueue.schema'
182
- export * from './TasksByStatus.schema'
183
184
  export * from './TestEmailRequest.schema'
185
+ export * from './TestScenario.schema'
186
+ export * from './TestingActionResponse.schema'
184
187
  export * from './Ticket.schema'
185
188
  export * from './TicketRequest.schema'
186
189
  export * from './TokenRefresh.schema'
@@ -195,3 +198,5 @@ export * from './UserProfileUpdateRequest.schema'
195
198
  export * from './UserStatistics.schema'
196
199
  export * from './VectorizationResult.schema'
197
200
  export * from './VectorizationStatistics.schema'
201
+ export * from './Worker.schema'
202
+ export * from './WorkerStats.schema'
@@ -89,7 +89,9 @@ export interface QuickAction {
89
89
  * `success` - success
90
90
  * `warning` - warning
91
91
  * `danger` - danger
92
- * `secondary` - secondary */
92
+ * `secondary` - secondary
93
+ * `info` - info
94
+ * `default` - default */
93
95
  color?: Enums.QuickActionColor;
94
96
  /** Action category */
95
97
  category?: string;
@@ -0,0 +1,76 @@
1
+ import * as Models from "./models";
2
+
3
+
4
+ /**
5
+ * API endpoints for RQ Jobs.
6
+ */
7
+ export class CfgRqJobs {
8
+ private client: any;
9
+
10
+ constructor(client: any) {
11
+ this.client = client;
12
+ }
13
+
14
+ async list(queue?: string, status?: string): Promise<any>;
15
+ async list(params?: { queue?: string; status?: string }): Promise<any>;
16
+
17
+ /**
18
+ * List all jobs
19
+ *
20
+ * Returns all jobs across all registries (queued, started, finished,
21
+ * failed, deferred, scheduled).
22
+ */
23
+ async list(...args: any[]): Promise<any> {
24
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
25
+
26
+ let params;
27
+ if (isParamsObject) {
28
+ params = args[0];
29
+ } else {
30
+ params = { queue: args[0], status: args[1] };
31
+ }
32
+ const response = await this.client.request('GET', "/cfg/rq/jobs/", { params });
33
+ return response;
34
+ }
35
+
36
+ /**
37
+ * Get job details
38
+ *
39
+ * Returns detailed information about a specific job.
40
+ */
41
+ async retrieve(id: string): Promise<Models.JobDetail> {
42
+ const response = await this.client.request('GET', `/cfg/rq/jobs/${id}/`);
43
+ return response;
44
+ }
45
+
46
+ /**
47
+ * Delete job
48
+ *
49
+ * Deletes a job from the queue.
50
+ */
51
+ async destroy(id: string): Promise<Models.JobActionResponse> {
52
+ const response = await this.client.request('DELETE', `/cfg/rq/jobs/${id}/`);
53
+ return response;
54
+ }
55
+
56
+ /**
57
+ * Cancel job
58
+ *
59
+ * Cancels a job (if it's queued or started).
60
+ */
61
+ async cancelCreate(id: string): Promise<Models.JobActionResponse> {
62
+ const response = await this.client.request('POST', `/cfg/rq/jobs/${id}/cancel/`);
63
+ return response;
64
+ }
65
+
66
+ /**
67
+ * Requeue job
68
+ *
69
+ * Requeues a failed job.
70
+ */
71
+ async requeueCreate(id: string): Promise<Models.JobActionResponse> {
72
+ const response = await this.client.request('POST', `/cfg/rq/jobs/${id}/requeue/`);
73
+ return response;
74
+ }
75
+
76
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Detailed job information serializer. Provides comprehensive job details
3
+ * including result and metadata.
4
+ *
5
+ * Response model (includes read-only fields).
6
+ */
7
+ export interface JobDetail {
8
+ /** Job ID */
9
+ id: string;
10
+ /** Function name */
11
+ func_name: string;
12
+ /** Function arguments */
13
+ args?: Array<string>;
14
+ /** Function keyword arguments */
15
+ kwargs?: Record<string, any>;
16
+ /** Job creation time */
17
+ created_at: string;
18
+ /** Job enqueue time */
19
+ enqueued_at?: string | null;
20
+ /** Job start time */
21
+ started_at?: string | null;
22
+ /** Job end time */
23
+ ended_at?: string | null;
24
+ /** Job status (queued/started/finished/failed) */
25
+ status: string;
26
+ /** Queue name */
27
+ queue: string;
28
+ /** Worker name if started */
29
+ worker_name?: string | null;
30
+ /** Job timeout in seconds */
31
+ timeout?: number | null;
32
+ /** Result TTL in seconds */
33
+ result_ttl?: number | null;
34
+ /** Failure TTL in seconds */
35
+ failure_ttl?: number | null;
36
+ /** Job result if finished */
37
+ result?: string | null;
38
+ /** Exception info if failed */
39
+ exc_info?: string | null;
40
+ /** Job metadata */
41
+ meta?: Record<string, any>;
42
+ /** List of dependency job IDs */
43
+ dependency_ids?: Array<string>;
44
+ }
45
+
46
+ /**
47
+ * Job action response serializer. Used for job management actions (requeue,
48
+ * delete, etc.).
49
+ *
50
+ * Response model (includes read-only fields).
51
+ */
52
+ export interface JobActionResponse {
53
+ /** Action success status */
54
+ success: boolean;
55
+ /** Action result message */
56
+ message: string;
57
+ /** Job ID */
58
+ job_id: string;
59
+ /** Action performed (requeue/delete/cancel) */
60
+ action: string;
61
+ }
62
+