@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,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serializer for creating a scheduled job. Supports three scheduling methods:
|
|
3
|
+
* 1. scheduled_time: Schedule job at specific time 2. interval: Schedule job
|
|
4
|
+
* to repeat at intervals 3. cron: Schedule job with cron expression
|
|
5
|
+
*
|
|
6
|
+
* Request model (no read-only fields).
|
|
7
|
+
*/
|
|
8
|
+
export interface ScheduleCreateRequest {
|
|
9
|
+
/** Function path (e.g., 'myapp.tasks.my_task') */
|
|
10
|
+
func: string;
|
|
11
|
+
/** Function arguments */
|
|
12
|
+
args?: Array<string>;
|
|
13
|
+
/** Function keyword arguments */
|
|
14
|
+
kwargs?: Record<string, any>;
|
|
15
|
+
/** Queue name to schedule job in */
|
|
16
|
+
queue_name?: string;
|
|
17
|
+
/** Schedule job at specific time (ISO 8601) */
|
|
18
|
+
scheduled_time?: string | null;
|
|
19
|
+
/** Schedule job to repeat every N seconds */
|
|
20
|
+
interval?: number | null;
|
|
21
|
+
/** Cron expression (e.g., '0 0 * * *' for daily at midnight) */
|
|
22
|
+
cron?: string | null;
|
|
23
|
+
/** Job timeout in seconds */
|
|
24
|
+
timeout?: number | null;
|
|
25
|
+
/** Result TTL in seconds */
|
|
26
|
+
result_ttl?: number | null;
|
|
27
|
+
/** Number of times to repeat (None = infinite) */
|
|
28
|
+
repeat?: number | null;
|
|
29
|
+
/** Job description */
|
|
30
|
+
description?: string | null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Response serializer for schedule actions (create/delete).
|
|
35
|
+
*
|
|
36
|
+
* Response model (includes read-only fields).
|
|
37
|
+
*/
|
|
38
|
+
export interface ScheduleActionResponse {
|
|
39
|
+
/** Action success status */
|
|
40
|
+
success: boolean;
|
|
41
|
+
/** Action result message */
|
|
42
|
+
message: string;
|
|
43
|
+
/** Job ID (for create action) */
|
|
44
|
+
job_id?: string | null;
|
|
45
|
+
/** Action performed (create/delete/cancel) */
|
|
46
|
+
action: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Serializer for scheduled job information.
|
|
51
|
+
*
|
|
52
|
+
* Response model (includes read-only fields).
|
|
53
|
+
*/
|
|
54
|
+
export interface ScheduledJob {
|
|
55
|
+
/** Job ID */
|
|
56
|
+
id: string;
|
|
57
|
+
/** Function path */
|
|
58
|
+
func: string;
|
|
59
|
+
/** Function arguments */
|
|
60
|
+
args?: Array<string>;
|
|
61
|
+
/** Function keyword arguments */
|
|
62
|
+
kwargs?: Record<string, any>;
|
|
63
|
+
/** Queue name */
|
|
64
|
+
queue_name: string;
|
|
65
|
+
/** Next scheduled time */
|
|
66
|
+
scheduled_time?: string | null;
|
|
67
|
+
/** Repeat interval in seconds */
|
|
68
|
+
interval?: number | null;
|
|
69
|
+
/** Cron expression */
|
|
70
|
+
cron?: string | null;
|
|
71
|
+
/** Job timeout in seconds */
|
|
72
|
+
timeout?: number | null;
|
|
73
|
+
/** Result TTL in seconds */
|
|
74
|
+
result_ttl?: number | null;
|
|
75
|
+
/** Times to repeat (None = infinite) */
|
|
76
|
+
repeat?: number | null;
|
|
77
|
+
/** Job description */
|
|
78
|
+
description?: string | null;
|
|
79
|
+
/** Job creation time */
|
|
80
|
+
created_at?: string | null;
|
|
81
|
+
/** Job metadata */
|
|
82
|
+
meta?: Record<string, any>;
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for RQ Testing.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgRqTesting {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* List test scenarios
|
|
16
|
+
*
|
|
17
|
+
* Returns list of all available test scenarios with metadata.
|
|
18
|
+
*/
|
|
19
|
+
async list(): Promise<any> {
|
|
20
|
+
const response = await this.client.request('GET', "/cfg/rq/testing/");
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async cleanupDestroy(delete_demo_jobs_only?: boolean, queue?: string, registries?: string): Promise<Models.TestingActionResponse>;
|
|
25
|
+
async cleanupDestroy(params?: { delete_demo_jobs_only?: boolean; queue?: string; registries?: string }): Promise<Models.TestingActionResponse>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Cleanup test jobs
|
|
29
|
+
*
|
|
30
|
+
* Clean demo jobs from registries.
|
|
31
|
+
*/
|
|
32
|
+
async cleanupDestroy(...args: any[]): Promise<Models.TestingActionResponse> {
|
|
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 = { delete_demo_jobs_only: args[0], queue: args[1], registries: args[2] };
|
|
40
|
+
}
|
|
41
|
+
const response = await this.client.request('DELETE', "/cfg/rq/testing/cleanup/", { params });
|
|
42
|
+
return response;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async resultsRetrieve(queue?: string, scenario?: string): Promise<any>;
|
|
46
|
+
async resultsRetrieve(params?: { queue?: string; scenario?: string }): Promise<any>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get test results
|
|
50
|
+
*
|
|
51
|
+
* Get aggregated results of test jobs execution.
|
|
52
|
+
*/
|
|
53
|
+
async resultsRetrieve(...args: any[]): Promise<any> {
|
|
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 = { queue: args[0], scenario: args[1] };
|
|
61
|
+
}
|
|
62
|
+
const response = await this.client.request('GET', "/cfg/rq/testing/results/", { params });
|
|
63
|
+
return response;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Run demo task
|
|
68
|
+
*
|
|
69
|
+
* Enqueue a single demo task for testing.
|
|
70
|
+
*/
|
|
71
|
+
async runDemoCreate(data: Models.RunDemoRequestRequest): Promise<Models.TestingActionResponse> {
|
|
72
|
+
const response = await this.client.request('POST', "/cfg/rq/testing/run-demo/", { body: data });
|
|
73
|
+
return response;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Schedule demo tasks
|
|
78
|
+
*
|
|
79
|
+
* Register demo scheduled tasks using rq-scheduler.
|
|
80
|
+
*/
|
|
81
|
+
async scheduleDemoCreate(data: any): Promise<Models.TestingActionResponse> {
|
|
82
|
+
const response = await this.client.request('POST', "/cfg/rq/testing/schedule-demo/", { body: data });
|
|
83
|
+
return response;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Stress test
|
|
88
|
+
*
|
|
89
|
+
* Generate N jobs for load testing and performance benchmarking.
|
|
90
|
+
*/
|
|
91
|
+
async stressTestCreate(data: Models.StressTestRequestRequest): Promise<Models.TestingActionResponse> {
|
|
92
|
+
const response = await this.client.request('POST', "/cfg/rq/testing/stress-test/", { body: data });
|
|
93
|
+
return response;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as Enums from "../enums";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Serializer for testing action responses.
|
|
5
|
+
*
|
|
6
|
+
* Response model (includes read-only fields).
|
|
7
|
+
*/
|
|
8
|
+
export interface TestingActionResponse {
|
|
9
|
+
/** Action success status */
|
|
10
|
+
success: boolean;
|
|
11
|
+
/** Action message */
|
|
12
|
+
message: string;
|
|
13
|
+
/** Created job IDs */
|
|
14
|
+
job_ids?: Array<string>;
|
|
15
|
+
/** Number of items affected */
|
|
16
|
+
count?: number | null;
|
|
17
|
+
/** Additional metadata */
|
|
18
|
+
metadata?: Record<string, any>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Serializer for running demo tasks.
|
|
23
|
+
*
|
|
24
|
+
* Request model (no read-only fields).
|
|
25
|
+
*/
|
|
26
|
+
export interface RunDemoRequestRequest {
|
|
27
|
+
/** Demo scenario to run
|
|
28
|
+
|
|
29
|
+
* `success` - success
|
|
30
|
+
* `failure` - failure
|
|
31
|
+
* `slow` - slow
|
|
32
|
+
* `progress` - progress
|
|
33
|
+
* `retry` - retry
|
|
34
|
+
* `random` - random
|
|
35
|
+
* `memory` - memory
|
|
36
|
+
* `cpu` - cpu */
|
|
37
|
+
scenario: Enums.RunDemoRequestRequestScenario;
|
|
38
|
+
/** Queue name */
|
|
39
|
+
queue?: string;
|
|
40
|
+
/** Task arguments */
|
|
41
|
+
args?: Array<string>;
|
|
42
|
+
/** Task keyword arguments */
|
|
43
|
+
kwargs?: Record<string, any>;
|
|
44
|
+
/** Job timeout in seconds */
|
|
45
|
+
timeout?: number | null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Serializer for stress testing.
|
|
50
|
+
*
|
|
51
|
+
* Request model (no read-only fields).
|
|
52
|
+
*/
|
|
53
|
+
export interface StressTestRequestRequest {
|
|
54
|
+
/** Number of jobs to create */
|
|
55
|
+
num_jobs?: number;
|
|
56
|
+
/** Queue name */
|
|
57
|
+
queue?: string;
|
|
58
|
+
/** Task scenario
|
|
59
|
+
|
|
60
|
+
* `success` - success
|
|
61
|
+
* `failure` - failure
|
|
62
|
+
* `slow` - slow
|
|
63
|
+
* `random` - random */
|
|
64
|
+
scenario?: Enums.StressTestRequestRequestScenario;
|
|
65
|
+
/** Task duration in seconds */
|
|
66
|
+
duration?: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for RQ Workers.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgRqWorkers {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async list(queue?: string, state?: string): Promise<any>;
|
|
15
|
+
async list(params?: { queue?: string; state?: string }): Promise<any>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* List all workers
|
|
19
|
+
*
|
|
20
|
+
* Returns list of all RQ workers with their current state. Supports
|
|
21
|
+
* filtering by state and queue.
|
|
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], state: args[1] };
|
|
31
|
+
}
|
|
32
|
+
const response = await this.client.request('GET', "/cfg/rq/workers/", { params });
|
|
33
|
+
return response;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get worker statistics
|
|
38
|
+
*
|
|
39
|
+
* Returns aggregated statistics for all workers.
|
|
40
|
+
*/
|
|
41
|
+
async statsRetrieve(): Promise<Models.WorkerStats> {
|
|
42
|
+
const response = await this.client.request('GET', "/cfg/rq/workers/stats/");
|
|
43
|
+
return response;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aggregated worker statistics serializer. Provides overview of all workers
|
|
3
|
+
* across all queues.
|
|
4
|
+
*
|
|
5
|
+
* Response model (includes read-only fields).
|
|
6
|
+
*/
|
|
7
|
+
export interface WorkerStats {
|
|
8
|
+
/** Total number of workers */
|
|
9
|
+
total_workers: number;
|
|
10
|
+
/** Number of busy workers */
|
|
11
|
+
busy_workers?: number;
|
|
12
|
+
/** Number of idle workers */
|
|
13
|
+
idle_workers?: number;
|
|
14
|
+
/** Number of suspended workers */
|
|
15
|
+
suspended_workers?: number;
|
|
16
|
+
/** Total successful jobs (all workers) */
|
|
17
|
+
total_successful_jobs?: number;
|
|
18
|
+
/** Total failed jobs (all workers) */
|
|
19
|
+
total_failed_jobs?: number;
|
|
20
|
+
/** Total working time across all workers (seconds) */
|
|
21
|
+
total_working_time?: number;
|
|
22
|
+
/** List of individual workers */
|
|
23
|
+
workers?: Array<Worker>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Worker information serializer. Provides detailed information about an RQ
|
|
28
|
+
* worker.
|
|
29
|
+
*
|
|
30
|
+
* Response model (includes read-only fields).
|
|
31
|
+
*/
|
|
32
|
+
export interface Worker {
|
|
33
|
+
/** Worker name/ID */
|
|
34
|
+
name: string;
|
|
35
|
+
/** List of queue names */
|
|
36
|
+
queues?: Array<string>;
|
|
37
|
+
/** Worker state (idle/busy/suspended) */
|
|
38
|
+
state: string;
|
|
39
|
+
/** Current job ID if busy */
|
|
40
|
+
current_job?: string | null;
|
|
41
|
+
/** Worker start time */
|
|
42
|
+
birth: string;
|
|
43
|
+
/** Last heartbeat timestamp */
|
|
44
|
+
last_heartbeat: string;
|
|
45
|
+
/** Total successful jobs */
|
|
46
|
+
successful_job_count?: number;
|
|
47
|
+
/** Total failed jobs */
|
|
48
|
+
failed_job_count?: number;
|
|
49
|
+
/** Total working time in seconds */
|
|
50
|
+
total_working_time?: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -14,20 +14,26 @@ import { CfgDashboardSystem } from "./cfg__dashboard__dashboard_system";
|
|
|
14
14
|
import { CfgLeadSubmission } from "./cfg__leads__lead_submission";
|
|
15
15
|
import { CfgLogs } from "./cfg__newsletter__logs";
|
|
16
16
|
import { CfgNewsletters } from "./cfg__newsletter__newsletters";
|
|
17
|
+
import { CfgRqJobs } from "./cfg__rq__rq_jobs";
|
|
18
|
+
import { CfgRqMonitoring } from "./cfg__rq__rq_monitoring";
|
|
19
|
+
import { CfgRqQueues } from "./cfg__rq__rq_queues";
|
|
20
|
+
import { CfgRqRegistries } from "./cfg__rq__rq_registries";
|
|
21
|
+
import { CfgRqSchedules } from "./cfg__rq__rq_schedules";
|
|
22
|
+
import { CfgRqTesting } from "./cfg__rq__rq_testing";
|
|
23
|
+
import { CfgRqWorkers } from "./cfg__rq__rq_workers";
|
|
17
24
|
import { CfgSubscriptions } from "./cfg__newsletter__subscriptions";
|
|
18
25
|
import { CfgTesting } from "./cfg__newsletter__testing";
|
|
19
26
|
import { CfgUserProfile } from "./cfg__accounts__user_profile";
|
|
20
27
|
import { CfgAccounts } from "./cfg__accounts";
|
|
21
28
|
import { CfgCentrifugo } from "./cfg__centrifugo";
|
|
22
|
-
import { CfgDashboard } from "./cfg__dashboard";
|
|
23
29
|
import { CfgEndpoints } from "./cfg__endpoints";
|
|
30
|
+
import { CfgGrpcMonitoring } from "./cfg__grpc__grpc_monitoring";
|
|
24
31
|
import { CfgHealth } from "./cfg__health";
|
|
25
32
|
import { CfgKnowbase } from "./cfg__knowbase";
|
|
26
33
|
import { CfgLeads } from "./cfg__leads";
|
|
27
34
|
import { CfgNewsletter } from "./cfg__newsletter";
|
|
28
35
|
import { CfgPayments } from "./cfg__payments";
|
|
29
36
|
import { CfgSupport } from "./cfg__support";
|
|
30
|
-
import { CfgTasks } from "./cfg__tasks";
|
|
31
37
|
import { HttpClientAdapter, FetchAdapter } from "./http";
|
|
32
38
|
import { APIError, NetworkError } from "./errors";
|
|
33
39
|
import { APILogger, type LoggerConfig } from "./logger";
|
|
@@ -72,20 +78,26 @@ export class APIClient {
|
|
|
72
78
|
public cfg_lead_submission: CfgLeadSubmission;
|
|
73
79
|
public cfg_logs: CfgLogs;
|
|
74
80
|
public cfg_newsletters: CfgNewsletters;
|
|
81
|
+
public cfg_rq_jobs: CfgRqJobs;
|
|
82
|
+
public cfg_rq_monitoring: CfgRqMonitoring;
|
|
83
|
+
public cfg_rq_queues: CfgRqQueues;
|
|
84
|
+
public cfg_rq_registries: CfgRqRegistries;
|
|
85
|
+
public cfg_rq_schedules: CfgRqSchedules;
|
|
86
|
+
public cfg_rq_testing: CfgRqTesting;
|
|
87
|
+
public cfg_rq_workers: CfgRqWorkers;
|
|
75
88
|
public cfg_subscriptions: CfgSubscriptions;
|
|
76
89
|
public cfg_testing: CfgTesting;
|
|
77
90
|
public cfg_user_profile: CfgUserProfile;
|
|
78
91
|
public cfg_accounts: CfgAccounts;
|
|
79
92
|
public cfg_centrifugo: CfgCentrifugo;
|
|
80
|
-
public cfg_dashboard: CfgDashboard;
|
|
81
93
|
public cfg_endpoints: CfgEndpoints;
|
|
94
|
+
public cfg_grpc_monitoring: CfgGrpcMonitoring;
|
|
82
95
|
public cfg_health: CfgHealth;
|
|
83
96
|
public cfg_knowbase: CfgKnowbase;
|
|
84
97
|
public cfg_leads: CfgLeads;
|
|
85
98
|
public cfg_newsletter: CfgNewsletter;
|
|
86
99
|
public cfg_payments: CfgPayments;
|
|
87
100
|
public cfg_support: CfgSupport;
|
|
88
|
-
public cfg_tasks: CfgTasks;
|
|
89
101
|
|
|
90
102
|
constructor(
|
|
91
103
|
baseUrl: string,
|
|
@@ -125,20 +137,26 @@ export class APIClient {
|
|
|
125
137
|
this.cfg_lead_submission = new CfgLeadSubmission(this);
|
|
126
138
|
this.cfg_logs = new CfgLogs(this);
|
|
127
139
|
this.cfg_newsletters = new CfgNewsletters(this);
|
|
140
|
+
this.cfg_rq_jobs = new CfgRqJobs(this);
|
|
141
|
+
this.cfg_rq_monitoring = new CfgRqMonitoring(this);
|
|
142
|
+
this.cfg_rq_queues = new CfgRqQueues(this);
|
|
143
|
+
this.cfg_rq_registries = new CfgRqRegistries(this);
|
|
144
|
+
this.cfg_rq_schedules = new CfgRqSchedules(this);
|
|
145
|
+
this.cfg_rq_testing = new CfgRqTesting(this);
|
|
146
|
+
this.cfg_rq_workers = new CfgRqWorkers(this);
|
|
128
147
|
this.cfg_subscriptions = new CfgSubscriptions(this);
|
|
129
148
|
this.cfg_testing = new CfgTesting(this);
|
|
130
149
|
this.cfg_user_profile = new CfgUserProfile(this);
|
|
131
150
|
this.cfg_accounts = new CfgAccounts(this);
|
|
132
151
|
this.cfg_centrifugo = new CfgCentrifugo(this);
|
|
133
|
-
this.cfg_dashboard = new CfgDashboard(this);
|
|
134
152
|
this.cfg_endpoints = new CfgEndpoints(this);
|
|
153
|
+
this.cfg_grpc_monitoring = new CfgGrpcMonitoring(this);
|
|
135
154
|
this.cfg_health = new CfgHealth(this);
|
|
136
155
|
this.cfg_knowbase = new CfgKnowbase(this);
|
|
137
156
|
this.cfg_leads = new CfgLeads(this);
|
|
138
157
|
this.cfg_newsletter = new CfgNewsletter(this);
|
|
139
158
|
this.cfg_payments = new CfgPayments(this);
|
|
140
159
|
this.cfg_support = new CfgSupport(this);
|
|
141
|
-
this.cfg_tasks = new CfgTasks(this);
|
|
142
160
|
}
|
|
143
161
|
|
|
144
162
|
/**
|
|
@@ -403,6 +403,28 @@ export enum QuickActionColor {
|
|
|
403
403
|
SECONDARY = "secondary",
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
+
/**
|
|
407
|
+
* Demo scenario to run
|
|
408
|
+
* * `success` - success
|
|
409
|
+
* * `failure` - failure
|
|
410
|
+
* * `slow` - slow
|
|
411
|
+
* * `progress` - progress
|
|
412
|
+
* * `retry` - retry
|
|
413
|
+
* * `random` - random
|
|
414
|
+
* * `memory` - memory
|
|
415
|
+
* * `cpu` - cpu
|
|
416
|
+
*/
|
|
417
|
+
export enum RunDemoRequestRequestScenario {
|
|
418
|
+
SUCCESS = "success",
|
|
419
|
+
FAILURE = "failure",
|
|
420
|
+
SLOW = "slow",
|
|
421
|
+
PROGRESS = "progress",
|
|
422
|
+
RETRY = "retry",
|
|
423
|
+
RANDOM = "random",
|
|
424
|
+
MEMORY = "memory",
|
|
425
|
+
CPU = "cpu",
|
|
426
|
+
}
|
|
427
|
+
|
|
406
428
|
/**
|
|
407
429
|
* Change type
|
|
408
430
|
* * `positive` - positive
|
|
@@ -415,6 +437,20 @@ export enum StatCardChangeType {
|
|
|
415
437
|
NEUTRAL = "neutral",
|
|
416
438
|
}
|
|
417
439
|
|
|
440
|
+
/**
|
|
441
|
+
* Task scenario
|
|
442
|
+
* * `success` - success
|
|
443
|
+
* * `failure` - failure
|
|
444
|
+
* * `slow` - slow
|
|
445
|
+
* * `random` - random
|
|
446
|
+
*/
|
|
447
|
+
export enum StressTestRequestRequestScenario {
|
|
448
|
+
SUCCESS = "success",
|
|
449
|
+
FAILURE = "failure",
|
|
450
|
+
SLOW = "slow",
|
|
451
|
+
RANDOM = "random",
|
|
452
|
+
}
|
|
453
|
+
|
|
418
454
|
/**
|
|
419
455
|
* Overall system health status
|
|
420
456
|
* * `healthy` - healthy
|
|
@@ -443,66 +479,6 @@ export enum SystemHealthItemStatus {
|
|
|
443
479
|
UNKNOWN = "unknown",
|
|
444
480
|
}
|
|
445
481
|
|
|
446
|
-
/**
|
|
447
|
-
* Current task status
|
|
448
|
-
* * `deferred` - Deferred
|
|
449
|
-
* * `queued` - Queued
|
|
450
|
-
* * `in_progress` - In Progress
|
|
451
|
-
* * `success` - Success
|
|
452
|
-
* * `failed` - Failed
|
|
453
|
-
* * `expired` - Expired
|
|
454
|
-
* * `canceled` - Canceled
|
|
455
|
-
*/
|
|
456
|
-
export enum TaskLogStatus {
|
|
457
|
-
DEFERRED = "deferred",
|
|
458
|
-
QUEUED = "queued",
|
|
459
|
-
IN_PROGRESS = "in_progress",
|
|
460
|
-
SUCCESS = "success",
|
|
461
|
-
FAILED = "failed",
|
|
462
|
-
EXPIRED = "expired",
|
|
463
|
-
CANCELED = "canceled",
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* Current task status
|
|
468
|
-
* * `deferred` - Deferred
|
|
469
|
-
* * `queued` - Queued
|
|
470
|
-
* * `in_progress` - In Progress
|
|
471
|
-
* * `success` - Success
|
|
472
|
-
* * `failed` - Failed
|
|
473
|
-
* * `expired` - Expired
|
|
474
|
-
* * `canceled` - Canceled
|
|
475
|
-
*/
|
|
476
|
-
export enum TaskLogDetailStatus {
|
|
477
|
-
DEFERRED = "deferred",
|
|
478
|
-
QUEUED = "queued",
|
|
479
|
-
IN_PROGRESS = "in_progress",
|
|
480
|
-
SUCCESS = "success",
|
|
481
|
-
FAILED = "failed",
|
|
482
|
-
EXPIRED = "expired",
|
|
483
|
-
CANCELED = "canceled",
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* Current task status
|
|
488
|
-
* * `deferred` - Deferred
|
|
489
|
-
* * `queued` - Queued
|
|
490
|
-
* * `in_progress` - In Progress
|
|
491
|
-
* * `success` - Success
|
|
492
|
-
* * `failed` - Failed
|
|
493
|
-
* * `expired` - Expired
|
|
494
|
-
* * `canceled` - Canceled
|
|
495
|
-
*/
|
|
496
|
-
export enum TaskLogListStatus {
|
|
497
|
-
DEFERRED = "deferred",
|
|
498
|
-
QUEUED = "queued",
|
|
499
|
-
IN_PROGRESS = "in_progress",
|
|
500
|
-
SUCCESS = "success",
|
|
501
|
-
FAILED = "failed",
|
|
502
|
-
EXPIRED = "expired",
|
|
503
|
-
CANCELED = "canceled",
|
|
504
|
-
}
|
|
505
|
-
|
|
506
482
|
/**
|
|
507
483
|
* * `open` - Open
|
|
508
484
|
* * `waiting_for_user` - Waiting for User
|