@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.
Files changed (91) hide show
  1. package/dist/index.cjs +13762 -11037
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +5828 -2659
  4. package/dist/index.d.ts +5828 -2659
  5. package/dist/index.mjs +11188 -8496
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +122 -0
  9. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_jobs.ts +105 -0
  10. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_monitoring.ts +77 -0
  11. package/src/cfg/generated/_utils/fetchers/{cfg__dashboard.ts → cfg__rq__rq_queues.ts} +21 -20
  12. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_registries.ts +132 -0
  13. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_schedules.ts +92 -0
  14. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_testing.ts +120 -0
  15. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_workers.ts +62 -0
  16. package/src/cfg/generated/_utils/fetchers/index.ts +8 -2
  17. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +110 -0
  18. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_jobs.ts +106 -0
  19. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +65 -0
  20. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_queues.ts +82 -0
  21. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_registries.ts +132 -0
  22. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_schedules.ts +89 -0
  23. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_testing.ts +124 -0
  24. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +50 -0
  25. package/src/cfg/generated/_utils/hooks/index.ts +8 -2
  26. package/src/cfg/generated/_utils/schemas/JobActionResponse.schema.ts +26 -0
  27. package/src/cfg/generated/_utils/schemas/JobDetail.schema.ts +40 -0
  28. package/src/cfg/generated/_utils/schemas/JobList.schema.ts +28 -0
  29. package/src/cfg/generated/_utils/schemas/MethodList.schema.ts +21 -0
  30. package/src/cfg/generated/_utils/schemas/MethodStatsSerializer.schema.ts +25 -0
  31. package/src/cfg/generated/_utils/schemas/QueueDetail.schema.ts +34 -0
  32. package/src/cfg/generated/_utils/schemas/QueueStats.schema.ts +31 -0
  33. package/src/cfg/generated/_utils/schemas/RQConfig.schema.ts +29 -0
  34. package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +23 -0
  35. package/src/cfg/generated/_utils/schemas/RunDemoRequestRequest.schema.ts +24 -0
  36. package/src/cfg/generated/_utils/schemas/ScheduleActionResponse.schema.ts +22 -0
  37. package/src/cfg/generated/_utils/schemas/ScheduleCreateRequest.schema.ts +39 -0
  38. package/src/cfg/generated/_utils/schemas/ScheduledJob.schema.ts +32 -0
  39. package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +21 -0
  40. package/src/cfg/generated/_utils/schemas/ServiceStatsSerializer.schema.ts +24 -0
  41. package/src/cfg/generated/_utils/schemas/StressTestRequestRequest.schema.ts +23 -0
  42. package/src/cfg/generated/_utils/schemas/TestScenario.schema.ts +25 -0
  43. package/src/cfg/generated/_utils/schemas/TestingActionResponse.schema.ts +23 -0
  44. package/src/cfg/generated/_utils/schemas/Worker.schema.ts +31 -0
  45. package/src/cfg/generated/_utils/schemas/WorkerStats.schema.ts +31 -0
  46. package/src/cfg/generated/_utils/schemas/index.ts +20 -10
  47. package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +129 -0
  48. package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +124 -0
  49. package/src/cfg/generated/cfg__rq__rq_jobs/client.ts +76 -0
  50. package/src/cfg/generated/cfg__rq__rq_jobs/models.ts +62 -0
  51. package/src/cfg/generated/cfg__rq__rq_monitoring/client.ts +45 -0
  52. package/src/cfg/generated/cfg__rq__rq_monitoring/index.ts +2 -0
  53. package/src/cfg/generated/cfg__rq__rq_monitoring/models.ts +39 -0
  54. package/src/cfg/generated/cfg__rq__rq_queues/client.ts +78 -0
  55. package/src/cfg/generated/cfg__rq__rq_queues/index.ts +2 -0
  56. package/src/cfg/generated/cfg__rq__rq_queues/models.ts +33 -0
  57. package/src/cfg/generated/cfg__rq__rq_registries/client.ts +161 -0
  58. package/src/cfg/generated/cfg__rq__rq_registries/index.ts +2 -0
  59. package/src/cfg/generated/cfg__rq__rq_registries/models.ts +17 -0
  60. package/src/cfg/generated/cfg__rq__rq_schedules/client.ts +91 -0
  61. package/src/cfg/generated/cfg__rq__rq_schedules/index.ts +2 -0
  62. package/src/cfg/generated/cfg__rq__rq_schedules/models.ts +84 -0
  63. package/src/cfg/generated/cfg__rq__rq_testing/client.ts +96 -0
  64. package/src/cfg/generated/cfg__rq__rq_testing/index.ts +2 -0
  65. package/src/cfg/generated/cfg__rq__rq_testing/models.ts +68 -0
  66. package/src/cfg/generated/cfg__rq__rq_workers/client.ts +46 -0
  67. package/src/cfg/generated/cfg__rq__rq_workers/index.ts +2 -0
  68. package/src/cfg/generated/cfg__rq__rq_workers/models.ts +52 -0
  69. package/src/cfg/generated/client.ts +24 -6
  70. package/src/cfg/generated/enums.ts +36 -60
  71. package/src/cfg/generated/index.ts +40 -10
  72. package/src/cfg/generated/schema.ts +6391 -4704
  73. package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +0 -123
  74. package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +0 -77
  75. package/src/cfg/generated/_utils/hooks/cfg__tasks.ts +0 -111
  76. package/src/cfg/generated/_utils/schemas/PaginatedTaskLogListList.schema.ts +0 -24
  77. package/src/cfg/generated/_utils/schemas/TaskLog.schema.ts +0 -42
  78. package/src/cfg/generated/_utils/schemas/TaskLogDetail.schema.ts +0 -50
  79. package/src/cfg/generated/_utils/schemas/TaskLogList.schema.ts +0 -35
  80. package/src/cfg/generated/_utils/schemas/TaskLogOverview.schema.ts +0 -43
  81. package/src/cfg/generated/_utils/schemas/TaskLogStats.schema.ts +0 -30
  82. package/src/cfg/generated/_utils/schemas/TaskLogTimeline.schema.ts +0 -28
  83. package/src/cfg/generated/_utils/schemas/TaskLogTimelineItem.schema.ts +0 -28
  84. package/src/cfg/generated/_utils/schemas/TasksByQueue.schema.ts +0 -24
  85. package/src/cfg/generated/_utils/schemas/TasksByStatus.schema.ts +0 -24
  86. package/src/cfg/generated/cfg__dashboard/client.ts +0 -48
  87. package/src/cfg/generated/cfg__dashboard/models.ts +0 -0
  88. package/src/cfg/generated/cfg__tasks/client.ts +0 -104
  89. package/src/cfg/generated/cfg__tasks/models.ts +0 -285
  90. /package/src/cfg/generated/{cfg__dashboard → cfg__grpc__grpc_monitoring}/index.ts +0 -0
  91. /package/src/cfg/generated/{cfg__tasks → cfg__rq__rq_jobs}/index.ts +0 -0
@@ -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
+
@@ -0,0 +1,45 @@
1
+ import * as Models from "./models";
2
+
3
+
4
+ /**
5
+ * API endpoints for RQ Monitoring.
6
+ */
7
+ export class CfgRqMonitoring {
8
+ private client: any;
9
+
10
+ constructor(client: any) {
11
+ this.client = client;
12
+ }
13
+
14
+ /**
15
+ * Get RQ configuration
16
+ *
17
+ * Returns current RQ configuration from django-cfg.
18
+ */
19
+ async rqMonitorConfigRetrieve(): Promise<Models.RQConfig> {
20
+ const response = await this.client.request('GET', "/cfg/rq/monitor/config/");
21
+ return response;
22
+ }
23
+
24
+ /**
25
+ * Health check
26
+ *
27
+ * Returns RQ cluster health status including worker count and queue
28
+ * status.
29
+ */
30
+ async rqMonitorHealthRetrieve(): Promise<Models.HealthCheck> {
31
+ const response = await this.client.request('GET', "/cfg/rq/monitor/health/");
32
+ return response;
33
+ }
34
+
35
+ /**
36
+ * Prometheus metrics
37
+ *
38
+ * Returns Prometheus metrics for RQ queues and workers.
39
+ */
40
+ async rqMonitorMetricsRetrieve(): Promise<any> {
41
+ const response = await this.client.request('GET', "/cfg/rq/monitor/metrics/");
42
+ return response;
43
+ }
44
+
45
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -0,0 +1,39 @@
1
+ /**
2
+ * RQ configuration serializer. Returns current RQ configuration from
3
+ * django-cfg.
4
+ *
5
+ * Response model (includes read-only fields).
6
+ */
7
+ export interface RQConfig {
8
+ /** RQ enabled status */
9
+ enabled: boolean;
10
+ /** Configured queues */
11
+ queues: Record<string, any>;
12
+ /** Async mode enabled */
13
+ async_mode?: boolean;
14
+ /** Show admin link */
15
+ show_admin_link?: boolean;
16
+ /** Prometheus metrics enabled */
17
+ prometheus_enabled?: boolean;
18
+ /** API token is configured */
19
+ api_token_configured?: boolean;
20
+ /** Scheduled tasks from django-cfg config */
21
+ schedules?: Array<string>;
22
+ }
23
+
24
+ /**
25
+ * Health check response.
26
+ *
27
+ * Response model (includes read-only fields).
28
+ */
29
+ export interface HealthCheck {
30
+ /** Health status: healthy or unhealthy */
31
+ status: string;
32
+ /** Configured wrapper URL */
33
+ wrapper_url: string;
34
+ /** Whether API key is configured */
35
+ has_api_key: boolean;
36
+ /** Current timestamp */
37
+ timestamp: string;
38
+ }
39
+
@@ -0,0 +1,78 @@
1
+ import * as Models from "./models";
2
+
3
+
4
+ /**
5
+ * API endpoints for RQ Queues.
6
+ */
7
+ export class CfgRqQueues {
8
+ private client: any;
9
+
10
+ constructor(client: any) {
11
+ this.client = client;
12
+ }
13
+
14
+ async list(name?: string): Promise<any>;
15
+ async list(params?: { name?: string }): Promise<any>;
16
+
17
+ /**
18
+ * List all queues
19
+ *
20
+ * Returns list of all configured RQ queues with statistics. Supports
21
+ * filtering by queue name.
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 = { name: args[0] };
31
+ }
32
+ const response = await this.client.request('GET', "/cfg/rq/queues/", { params });
33
+ return response;
34
+ }
35
+
36
+ /**
37
+ * Get queue details
38
+ *
39
+ * Returns detailed information about a specific queue.
40
+ */
41
+ async retrieve(id: string): Promise<Models.QueueDetail> {
42
+ const response = await this.client.request('GET', `/cfg/rq/queues/${id}/`);
43
+ return response;
44
+ }
45
+
46
+ /**
47
+ * Empty queue
48
+ *
49
+ * Removes all jobs from the specified queue.
50
+ */
51
+ async emptyCreate(id: string): Promise<any> {
52
+ const response = await this.client.request('POST', `/cfg/rq/queues/${id}/empty/`);
53
+ return response;
54
+ }
55
+
56
+ async jobsRetrieve(id: string, limit?: number, offset?: number): Promise<any>;
57
+ async jobsRetrieve(id: string, params?: { limit?: number; offset?: number }): Promise<any>;
58
+
59
+ /**
60
+ * Get queue jobs
61
+ *
62
+ * Returns list of job IDs in the queue.
63
+ */
64
+ async jobsRetrieve(...args: any[]): Promise<any> {
65
+ const id = args[0];
66
+ const isParamsObject = args.length === 2 && typeof args[1] === 'object' && args[1] !== null && !Array.isArray(args[1]);
67
+
68
+ let params;
69
+ if (isParamsObject) {
70
+ params = args[1];
71
+ } else {
72
+ params = { limit: args[1], offset: args[2] };
73
+ }
74
+ const response = await this.client.request('GET', `/cfg/rq/queues/${id}/jobs/`, { params });
75
+ return response;
76
+ }
77
+
78
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Detailed queue information serializer. Provides comprehensive queue
3
+ * statistics and metadata.
4
+ *
5
+ * Response model (includes read-only fields).
6
+ */
7
+ export interface QueueDetail {
8
+ /** Queue name */
9
+ name: string;
10
+ /** Total jobs in queue */
11
+ count: number;
12
+ /** Jobs waiting to be processed */
13
+ queued_jobs?: number;
14
+ /** Jobs currently being processed */
15
+ started_jobs?: number;
16
+ /** Completed jobs */
17
+ finished_jobs?: number;
18
+ /** Failed jobs */
19
+ failed_jobs?: number;
20
+ /** Deferred jobs */
21
+ deferred_jobs?: number;
22
+ /** Scheduled jobs */
23
+ scheduled_jobs?: number;
24
+ /** Number of workers for this queue */
25
+ workers?: number;
26
+ /** Timestamp of oldest job in queue */
27
+ oldest_job_timestamp?: string | null;
28
+ /** Redis connection parameters */
29
+ connection_kwargs?: Record<string, any>;
30
+ /** Queue is in async mode */
31
+ is_async?: boolean;
32
+ }
33
+
@@ -0,0 +1,161 @@
1
+ import * as Models from "./models";
2
+
3
+
4
+ /**
5
+ * API endpoints for RQ Registries.
6
+ */
7
+ export class CfgRqRegistries {
8
+ private client: any;
9
+
10
+ constructor(client: any) {
11
+ this.client = client;
12
+ }
13
+
14
+ async rqJobsRegistriesDeferredList(queue?: string): Promise<any>;
15
+ async rqJobsRegistriesDeferredList(params?: { queue?: string }): Promise<any>;
16
+
17
+ /**
18
+ * List deferred jobs
19
+ *
20
+ * Returns list of all deferred jobs from deferred job registry.
21
+ */
22
+ async rqJobsRegistriesDeferredList(...args: any[]): Promise<any> {
23
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
24
+
25
+ let params;
26
+ if (isParamsObject) {
27
+ params = args[0];
28
+ } else {
29
+ params = { queue: args[0] };
30
+ }
31
+ const response = await this.client.request('GET', "/cfg/rq/jobs/registries/deferred/", { params });
32
+ return response;
33
+ }
34
+
35
+ async rqJobsRegistriesFailedList(queue?: string): Promise<any>;
36
+ async rqJobsRegistriesFailedList(params?: { queue?: string }): Promise<any>;
37
+
38
+ /**
39
+ * List failed jobs
40
+ *
41
+ * Returns list of all failed jobs from failed job registry.
42
+ */
43
+ async rqJobsRegistriesFailedList(...args: any[]): Promise<any> {
44
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
45
+
46
+ let params;
47
+ if (isParamsObject) {
48
+ params = args[0];
49
+ } else {
50
+ params = { queue: args[0] };
51
+ }
52
+ const response = await this.client.request('GET', "/cfg/rq/jobs/registries/failed/", { params });
53
+ return response;
54
+ }
55
+
56
+ async rqJobsRegistriesFailedClearCreate(queue: string): Promise<Models.JobActionResponse>;
57
+ async rqJobsRegistriesFailedClearCreate(params: { queue: string }): Promise<Models.JobActionResponse>;
58
+
59
+ /**
60
+ * Clear failed jobs registry
61
+ *
62
+ * Removes all jobs from the failed job registry.
63
+ */
64
+ async rqJobsRegistriesFailedClearCreate(...args: any[]): Promise<Models.JobActionResponse> {
65
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
66
+
67
+ let params;
68
+ if (isParamsObject) {
69
+ params = args[0];
70
+ } else {
71
+ params = { queue: args[0] };
72
+ }
73
+ const response = await this.client.request('POST', "/cfg/rq/jobs/registries/failed/clear/", { params });
74
+ return response;
75
+ }
76
+
77
+ async rqJobsRegistriesFailedRequeueAllCreate(queue: string): Promise<Models.JobActionResponse>;
78
+ async rqJobsRegistriesFailedRequeueAllCreate(params: { queue: string }): Promise<Models.JobActionResponse>;
79
+
80
+ /**
81
+ * Requeue all failed jobs
82
+ *
83
+ * Requeues all failed jobs in the failed job registry.
84
+ */
85
+ async rqJobsRegistriesFailedRequeueAllCreate(...args: any[]): Promise<Models.JobActionResponse> {
86
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
87
+
88
+ let params;
89
+ if (isParamsObject) {
90
+ params = args[0];
91
+ } else {
92
+ params = { queue: args[0] };
93
+ }
94
+ const response = await this.client.request('POST', "/cfg/rq/jobs/registries/failed/requeue-all/", { params });
95
+ return response;
96
+ }
97
+
98
+ async rqJobsRegistriesFinishedList(queue?: string): Promise<any>;
99
+ async rqJobsRegistriesFinishedList(params?: { queue?: string }): Promise<any>;
100
+
101
+ /**
102
+ * List finished jobs
103
+ *
104
+ * Returns list of all finished jobs from finished job registry.
105
+ */
106
+ async rqJobsRegistriesFinishedList(...args: any[]): Promise<any> {
107
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
108
+
109
+ let params;
110
+ if (isParamsObject) {
111
+ params = args[0];
112
+ } else {
113
+ params = { queue: args[0] };
114
+ }
115
+ const response = await this.client.request('GET', "/cfg/rq/jobs/registries/finished/", { params });
116
+ return response;
117
+ }
118
+
119
+ async rqJobsRegistriesFinishedClearCreate(queue: string): Promise<Models.JobActionResponse>;
120
+ async rqJobsRegistriesFinishedClearCreate(params: { queue: string }): Promise<Models.JobActionResponse>;
121
+
122
+ /**
123
+ * Clear finished jobs registry
124
+ *
125
+ * Removes all jobs from the finished job registry.
126
+ */
127
+ async rqJobsRegistriesFinishedClearCreate(...args: any[]): Promise<Models.JobActionResponse> {
128
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
129
+
130
+ let params;
131
+ if (isParamsObject) {
132
+ params = args[0];
133
+ } else {
134
+ params = { queue: args[0] };
135
+ }
136
+ const response = await this.client.request('POST', "/cfg/rq/jobs/registries/finished/clear/", { params });
137
+ return response;
138
+ }
139
+
140
+ async rqJobsRegistriesStartedList(queue?: string): Promise<any>;
141
+ async rqJobsRegistriesStartedList(params?: { queue?: string }): Promise<any>;
142
+
143
+ /**
144
+ * List started jobs
145
+ *
146
+ * Returns list of all currently running jobs from started job registry.
147
+ */
148
+ async rqJobsRegistriesStartedList(...args: any[]): Promise<any> {
149
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
150
+
151
+ let params;
152
+ if (isParamsObject) {
153
+ params = args[0];
154
+ } else {
155
+ params = { queue: args[0] };
156
+ }
157
+ const response = await this.client.request('GET', "/cfg/rq/jobs/registries/started/", { params });
158
+ return response;
159
+ }
160
+
161
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Job action response serializer. Used for job management actions (requeue,
3
+ * delete, etc.).
4
+ *
5
+ * Response model (includes read-only fields).
6
+ */
7
+ export interface JobActionResponse {
8
+ /** Action success status */
9
+ success: boolean;
10
+ /** Action result message */
11
+ message: string;
12
+ /** Job ID */
13
+ job_id: string;
14
+ /** Action performed (requeue/delete/cancel) */
15
+ action: string;
16
+ }
17
+
@@ -0,0 +1,91 @@
1
+ import * as Models from "./models";
2
+
3
+
4
+ /**
5
+ * API endpoints for RQ Schedules.
6
+ */
7
+ export class CfgRqSchedules {
8
+ private client: any;
9
+
10
+ constructor(client: any) {
11
+ this.client = client;
12
+ }
13
+
14
+ async list(queue?: string): Promise<any>;
15
+ async list(params?: { queue?: string }): Promise<any>;
16
+
17
+ /**
18
+ * List scheduled jobs
19
+ *
20
+ * Returns list of all scheduled jobs across all queues.
21
+ */
22
+ async list(...args: any[]): Promise<any> {
23
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
24
+
25
+ let params;
26
+ if (isParamsObject) {
27
+ params = args[0];
28
+ } else {
29
+ params = { queue: args[0] };
30
+ }
31
+ const response = await this.client.request('GET', "/cfg/rq/schedules/", { params });
32
+ return response;
33
+ }
34
+
35
+ /**
36
+ * Create scheduled job
37
+ *
38
+ * Schedule a job to run at specific time, interval, or cron schedule.
39
+ */
40
+ async create(data: Models.ScheduleCreateRequest): Promise<Models.ScheduleActionResponse> {
41
+ const response = await this.client.request('POST', "/cfg/rq/schedules/", { body: data });
42
+ return response;
43
+ }
44
+
45
+ async retrieve(id: string, pk: string, queue?: string): Promise<Models.ScheduledJob>;
46
+ async retrieve(id: string, pk: string, params?: { queue?: string }): Promise<Models.ScheduledJob>;
47
+
48
+ /**
49
+ * Get scheduled job details
50
+ *
51
+ * Returns detailed information about a specific scheduled job.
52
+ */
53
+ async retrieve(...args: any[]): Promise<Models.ScheduledJob> {
54
+ const id = args[0];
55
+ const pk = args[1];
56
+ const isParamsObject = args.length === 3 && typeof args[2] === 'object' && args[2] !== null && !Array.isArray(args[2]);
57
+
58
+ let params;
59
+ if (isParamsObject) {
60
+ params = args[2];
61
+ } else {
62
+ params = { queue: args[2] };
63
+ }
64
+ const response = await this.client.request('GET', `/cfg/rq/schedules/${id}/`, { params });
65
+ return response;
66
+ }
67
+
68
+ async destroy(id: string, pk: string, queue?: string): Promise<Models.ScheduleActionResponse>;
69
+ async destroy(id: string, pk: string, params?: { queue?: string }): Promise<Models.ScheduleActionResponse>;
70
+
71
+ /**
72
+ * Cancel scheduled job
73
+ *
74
+ * Cancel a scheduled job by ID.
75
+ */
76
+ async destroy(...args: any[]): Promise<Models.ScheduleActionResponse> {
77
+ const id = args[0];
78
+ const pk = args[1];
79
+ const isParamsObject = args.length === 3 && typeof args[2] === 'object' && args[2] !== null && !Array.isArray(args[2]);
80
+
81
+ let params;
82
+ if (isParamsObject) {
83
+ params = args[2];
84
+ } else {
85
+ params = { queue: args[2] };
86
+ }
87
+ const response = await this.client.request('DELETE', `/cfg/rq/schedules/${id}/`, { params });
88
+ return response;
89
+ }
90
+
91
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";