@djangocfg/api 1.2.17 → 1.2.19
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 +2841 -1242
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2704 -432
- package/dist/index.d.ts +2704 -432
- package/dist/index.mjs +2717 -1130
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard.ts +89 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +122 -0
- package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +9 -7
- package/src/cfg/generated/_utils/fetchers/index.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +77 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +110 -0
- package/src/cfg/generated/_utils/hooks/cfg__tasks.ts +9 -7
- package/src/cfg/generated/_utils/hooks/index.ts +2 -0
- package/src/cfg/generated/_utils/schemas/DashboardOverview.schema.ts +16 -8
- 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/RecentRequests.schema.ts +23 -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/TaskLogOverview.schema.ts +43 -0
- package/src/cfg/generated/_utils/schemas/TaskLogTimeline.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/TaskLogTimelineItem.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/TasksByQueue.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/TasksByStatus.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/index.ts +10 -0
- package/src/cfg/generated/cfg__dashboard/client.ts +48 -0
- package/src/cfg/generated/cfg__dashboard/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard/models.ts +0 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +179 -9
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +129 -0
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/index.ts +2 -0
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +124 -0
- package/src/cfg/generated/cfg__support/client.ts +30 -12
- package/src/cfg/generated/cfg__tasks/client.ts +38 -31
- package/src/cfg/generated/cfg__tasks/models.ts +82 -0
- package/src/cfg/generated/client.ts +6 -0
- package/src/cfg/generated/index.ts +10 -0
- package/src/cfg/generated/schema.ts +1292 -121
|
@@ -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
|
+
|
|
@@ -15,7 +15,9 @@ export class CfgSupport {
|
|
|
15
15
|
async ticketsList(params?: { page?: number; page_size?: number }): Promise<Models.PaginatedTicketList>;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* ViewSet for managing support tickets.
|
|
18
|
+
* ViewSet for managing support tickets. Requires authenticated user (JWT
|
|
19
|
+
* or Session). Staff users can see all tickets, regular users see only
|
|
20
|
+
* their own.
|
|
19
21
|
*/
|
|
20
22
|
async ticketsList(...args: any[]): Promise<Models.PaginatedTicketList> {
|
|
21
23
|
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
@@ -31,7 +33,9 @@ export class CfgSupport {
|
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
/**
|
|
34
|
-
* ViewSet for managing support tickets.
|
|
36
|
+
* ViewSet for managing support tickets. Requires authenticated user (JWT
|
|
37
|
+
* or Session). Staff users can see all tickets, regular users see only
|
|
38
|
+
* their own.
|
|
35
39
|
*/
|
|
36
40
|
async ticketsCreate(data: Models.TicketRequest): Promise<Models.Ticket> {
|
|
37
41
|
const response = await this.client.request('POST', "/cfg/support/tickets/", { body: data });
|
|
@@ -42,7 +46,8 @@ export class CfgSupport {
|
|
|
42
46
|
async ticketsMessagesList(ticket_uuid: string, params?: { page?: number; page_size?: number }): Promise<Models.PaginatedMessageList>;
|
|
43
47
|
|
|
44
48
|
/**
|
|
45
|
-
* ViewSet for managing support messages.
|
|
49
|
+
* ViewSet for managing support messages. Requires authenticated user (JWT
|
|
50
|
+
* or Session). Users can only access messages for their own tickets.
|
|
46
51
|
*/
|
|
47
52
|
async ticketsMessagesList(...args: any[]): Promise<Models.PaginatedMessageList> {
|
|
48
53
|
const ticket_uuid = args[0];
|
|
@@ -59,7 +64,8 @@ export class CfgSupport {
|
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
/**
|
|
62
|
-
* ViewSet for managing support messages.
|
|
67
|
+
* ViewSet for managing support messages. Requires authenticated user (JWT
|
|
68
|
+
* or Session). Users can only access messages for their own tickets.
|
|
63
69
|
*/
|
|
64
70
|
async ticketsMessagesCreate(ticket_uuid: string, data: Models.MessageCreateRequest): Promise<Models.MessageCreate> {
|
|
65
71
|
const response = await this.client.request('POST', `/cfg/support/tickets/${ticket_uuid}/messages/`, { body: data });
|
|
@@ -67,7 +73,8 @@ export class CfgSupport {
|
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
/**
|
|
70
|
-
* ViewSet for managing support messages.
|
|
76
|
+
* ViewSet for managing support messages. Requires authenticated user (JWT
|
|
77
|
+
* or Session). Users can only access messages for their own tickets.
|
|
71
78
|
*/
|
|
72
79
|
async ticketsMessagesRetrieve(ticket_uuid: string, uuid: string): Promise<Models.Message> {
|
|
73
80
|
const response = await this.client.request('GET', `/cfg/support/tickets/${ticket_uuid}/messages/${uuid}/`);
|
|
@@ -75,7 +82,8 @@ export class CfgSupport {
|
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
/**
|
|
78
|
-
* ViewSet for managing support messages.
|
|
85
|
+
* ViewSet for managing support messages. Requires authenticated user (JWT
|
|
86
|
+
* or Session). Users can only access messages for their own tickets.
|
|
79
87
|
*/
|
|
80
88
|
async ticketsMessagesUpdate(ticket_uuid: string, uuid: string, data: Models.MessageRequest): Promise<Models.Message> {
|
|
81
89
|
const response = await this.client.request('PUT', `/cfg/support/tickets/${ticket_uuid}/messages/${uuid}/`, { body: data });
|
|
@@ -83,7 +91,8 @@ export class CfgSupport {
|
|
|
83
91
|
}
|
|
84
92
|
|
|
85
93
|
/**
|
|
86
|
-
* ViewSet for managing support messages.
|
|
94
|
+
* ViewSet for managing support messages. Requires authenticated user (JWT
|
|
95
|
+
* or Session). Users can only access messages for their own tickets.
|
|
87
96
|
*/
|
|
88
97
|
async ticketsMessagesPartialUpdate(ticket_uuid: string, uuid: string, data?: Models.PatchedMessageRequest): Promise<Models.Message> {
|
|
89
98
|
const response = await this.client.request('PATCH', `/cfg/support/tickets/${ticket_uuid}/messages/${uuid}/`, { body: data });
|
|
@@ -91,7 +100,8 @@ export class CfgSupport {
|
|
|
91
100
|
}
|
|
92
101
|
|
|
93
102
|
/**
|
|
94
|
-
* ViewSet for managing support messages.
|
|
103
|
+
* ViewSet for managing support messages. Requires authenticated user (JWT
|
|
104
|
+
* or Session). Users can only access messages for their own tickets.
|
|
95
105
|
*/
|
|
96
106
|
async ticketsMessagesDestroy(ticket_uuid: string, uuid: string): Promise<void> {
|
|
97
107
|
const response = await this.client.request('DELETE', `/cfg/support/tickets/${ticket_uuid}/messages/${uuid}/`);
|
|
@@ -99,7 +109,9 @@ export class CfgSupport {
|
|
|
99
109
|
}
|
|
100
110
|
|
|
101
111
|
/**
|
|
102
|
-
* ViewSet for managing support tickets.
|
|
112
|
+
* ViewSet for managing support tickets. Requires authenticated user (JWT
|
|
113
|
+
* or Session). Staff users can see all tickets, regular users see only
|
|
114
|
+
* their own.
|
|
103
115
|
*/
|
|
104
116
|
async ticketsRetrieve(uuid: string): Promise<Models.Ticket> {
|
|
105
117
|
const response = await this.client.request('GET', `/cfg/support/tickets/${uuid}/`);
|
|
@@ -107,7 +119,9 @@ export class CfgSupport {
|
|
|
107
119
|
}
|
|
108
120
|
|
|
109
121
|
/**
|
|
110
|
-
* ViewSet for managing support tickets.
|
|
122
|
+
* ViewSet for managing support tickets. Requires authenticated user (JWT
|
|
123
|
+
* or Session). Staff users can see all tickets, regular users see only
|
|
124
|
+
* their own.
|
|
111
125
|
*/
|
|
112
126
|
async ticketsUpdate(uuid: string, data: Models.TicketRequest): Promise<Models.Ticket> {
|
|
113
127
|
const response = await this.client.request('PUT', `/cfg/support/tickets/${uuid}/`, { body: data });
|
|
@@ -115,7 +129,9 @@ export class CfgSupport {
|
|
|
115
129
|
}
|
|
116
130
|
|
|
117
131
|
/**
|
|
118
|
-
* ViewSet for managing support tickets.
|
|
132
|
+
* ViewSet for managing support tickets. Requires authenticated user (JWT
|
|
133
|
+
* or Session). Staff users can see all tickets, regular users see only
|
|
134
|
+
* their own.
|
|
119
135
|
*/
|
|
120
136
|
async ticketsPartialUpdate(uuid: string, data?: Models.PatchedTicketRequest): Promise<Models.Ticket> {
|
|
121
137
|
const response = await this.client.request('PATCH', `/cfg/support/tickets/${uuid}/`, { body: data });
|
|
@@ -123,7 +139,9 @@ export class CfgSupport {
|
|
|
123
139
|
}
|
|
124
140
|
|
|
125
141
|
/**
|
|
126
|
-
* ViewSet for managing support tickets.
|
|
142
|
+
* ViewSet for managing support tickets. Requires authenticated user (JWT
|
|
143
|
+
* or Session). Staff users can see all tickets, regular users see only
|
|
144
|
+
* their own.
|
|
127
145
|
*/
|
|
128
146
|
async ticketsDestroy(uuid: string): Promise<void> {
|
|
129
147
|
const response = await this.client.request('DELETE', `/cfg/support/tickets/${uuid}/`);
|
|
@@ -15,12 +15,18 @@ export class CfgTasks {
|
|
|
15
15
|
async logsList(params?: { created_after?: string; created_before?: string; duration_max?: number; duration_min?: number; end_time?: string; enqueue_after?: string; enqueue_before?: string; finish_after?: string; finish_before?: string; has_error?: boolean; is_completed?: boolean; is_failed?: boolean; is_successful?: boolean; job_id?: string; job_retries_max?: number; job_retries_min?: number; ordering?: string; page?: number; page_size?: number; queue_name?: string; queue_name_in?: any[]; search?: string; start_after?: string; start_before?: string; start_time?: string; status?: string; status_in?: any[]; success?: boolean; task?: string; task_name?: string; task_name_exact?: string; worker?: string; worker_id?: string }): Promise<Models.PaginatedTaskLogListList>;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* ViewSet for TaskLog monitoring. Provides read-only access to
|
|
19
|
-
* execution logs with filtering, searching, and statistics.
|
|
20
|
-
* /api/tasks/logs/ - List all task logs GET
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* /api/tasks/logs/
|
|
18
|
+
* Complete ViewSet for TaskLog monitoring. Provides read-only access to
|
|
19
|
+
* task execution logs with filtering, searching, and statistics.
|
|
20
|
+
* Endpoints: GET /api/tasks/logs/ - List all task logs GET
|
|
21
|
+
* /api/tasks/logs/{id}/ - Get task log details GET
|
|
22
|
+
* /api/tasks/logs/{id}/related/ - Get related task logs GET
|
|
23
|
+
* /api/tasks/logs/stats/ - Get aggregated statistics GET
|
|
24
|
+
* /api/tasks/logs/timeline/ - Get task execution timeline GET
|
|
25
|
+
* /api/tasks/logs/overview/ - Get summary overview Mixins: -
|
|
26
|
+
* TaskLogStatsMixin: Aggregated statistics - TaskLogTimelineMixin:
|
|
27
|
+
* Time-series data - TaskLogOverviewMixin: High-level summary -
|
|
28
|
+
* TaskLogRelatedMixin: Related task lookup - TaskLogBaseViewSet: Base CRUD
|
|
29
|
+
* operations
|
|
24
30
|
*/
|
|
25
31
|
async logsList(...args: any[]): Promise<Models.PaginatedTaskLogListList> {
|
|
26
32
|
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
@@ -36,12 +42,18 @@ export class CfgTasks {
|
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
|
-
* ViewSet for TaskLog monitoring. Provides read-only access to
|
|
40
|
-
* execution logs with filtering, searching, and statistics.
|
|
41
|
-
* /api/tasks/logs/ - List all task logs GET
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* /api/tasks/logs/
|
|
45
|
+
* Complete ViewSet for TaskLog monitoring. Provides read-only access to
|
|
46
|
+
* task execution logs with filtering, searching, and statistics.
|
|
47
|
+
* Endpoints: GET /api/tasks/logs/ - List all task logs GET
|
|
48
|
+
* /api/tasks/logs/{id}/ - Get task log details GET
|
|
49
|
+
* /api/tasks/logs/{id}/related/ - Get related task logs GET
|
|
50
|
+
* /api/tasks/logs/stats/ - Get aggregated statistics GET
|
|
51
|
+
* /api/tasks/logs/timeline/ - Get task execution timeline GET
|
|
52
|
+
* /api/tasks/logs/overview/ - Get summary overview Mixins: -
|
|
53
|
+
* TaskLogStatsMixin: Aggregated statistics - TaskLogTimelineMixin:
|
|
54
|
+
* Time-series data - TaskLogOverviewMixin: High-level summary -
|
|
55
|
+
* TaskLogRelatedMixin: Related task lookup - TaskLogBaseViewSet: Base CRUD
|
|
56
|
+
* operations
|
|
45
57
|
*/
|
|
46
58
|
async logsRetrieve(id: number): Promise<Models.TaskLogDetail> {
|
|
47
59
|
const response = await this.client.request('GET', `/cfg/tasks/logs/${id}/`);
|
|
@@ -50,7 +62,8 @@ export class CfgTasks {
|
|
|
50
62
|
|
|
51
63
|
/**
|
|
52
64
|
* Get related task logs (same job_id or task_name). Returns tasks that
|
|
53
|
-
* share the same job_id or are retries of the same task.
|
|
65
|
+
* share the same job_id or are retries of the same task. Returns: Array of
|
|
66
|
+
* related TaskLog objects (up to 10 most recent)
|
|
54
67
|
*/
|
|
55
68
|
async logsRelatedRetrieve(id: number): Promise<Models.TaskLog> {
|
|
56
69
|
const response = await this.client.request('GET', `/cfg/tasks/logs/${id}/related/`);
|
|
@@ -58,23 +71,20 @@ export class CfgTasks {
|
|
|
58
71
|
}
|
|
59
72
|
|
|
60
73
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* "tasks_by_status": { "completed": 1450, "failed": 45, "in_progress": 5 }
|
|
65
|
-
* }
|
|
74
|
+
* Task System Overview
|
|
75
|
+
*
|
|
76
|
+
* Get high-level summary statistics for the entire task system
|
|
66
77
|
*/
|
|
67
|
-
async logsOverviewRetrieve(): Promise<Models.
|
|
78
|
+
async logsOverviewRetrieve(): Promise<Models.TaskLogOverview> {
|
|
68
79
|
const response = await this.client.request('GET', "/cfg/tasks/logs/overview/");
|
|
69
80
|
return response;
|
|
70
81
|
}
|
|
71
82
|
|
|
72
83
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* "avg_duration_seconds": 1.25, "period_hours": 24 }
|
|
84
|
+
* Task Execution Statistics
|
|
85
|
+
*
|
|
86
|
+
* Get aggregated statistics about task execution (success/failure rates,
|
|
87
|
+
* duration)
|
|
78
88
|
*/
|
|
79
89
|
async logsStatsRetrieve(): Promise<Models.TaskLogStats> {
|
|
80
90
|
const response = await this.client.request('GET', "/cfg/tasks/logs/stats/");
|
|
@@ -82,14 +92,11 @@ export class CfgTasks {
|
|
|
82
92
|
}
|
|
83
93
|
|
|
84
94
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* (str): Filter by specific task name Returns: [ { "timestamp":
|
|
89
|
-
* "2025-10-30T10:00:00Z", "total": 15, "successful": 14, "failed": 1,
|
|
90
|
-
* "avg_duration_ms": 1200 }, ... ]
|
|
95
|
+
* Task Execution Timeline
|
|
96
|
+
*
|
|
97
|
+
* Get time-series data of task executions grouped by time intervals
|
|
91
98
|
*/
|
|
92
|
-
async logsTimelineRetrieve(): Promise<Models.
|
|
99
|
+
async logsTimelineRetrieve(): Promise<Models.TaskLogTimeline> {
|
|
93
100
|
const response = await this.client.request('GET', "/cfg/tasks/logs/timeline/");
|
|
94
101
|
return response;
|
|
95
102
|
}
|
|
@@ -137,6 +137,28 @@ export interface TaskLog {
|
|
|
137
137
|
is_failed: boolean;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Overview of task system with proper structure. Provides high-level
|
|
142
|
+
* statistics about the entire task system: - Total tasks count (all-time) -
|
|
143
|
+
* Active queues list - Recent failures (last 24h) - Tasks distribution by
|
|
144
|
+
* queue (as array) - Tasks distribution by status (as array) Used by
|
|
145
|
+
* /cfg/tasks/logs/overview/ endpoint.
|
|
146
|
+
*
|
|
147
|
+
* Response model (includes read-only fields).
|
|
148
|
+
*/
|
|
149
|
+
export interface TaskLogOverview {
|
|
150
|
+
/** Total number of tasks all-time */
|
|
151
|
+
total_tasks: number;
|
|
152
|
+
/** List of active queue names */
|
|
153
|
+
active_queues: Array<string>;
|
|
154
|
+
/** Failed tasks in last 24 hours */
|
|
155
|
+
recent_failures: number;
|
|
156
|
+
/** Tasks grouped by queue name */
|
|
157
|
+
tasks_by_queue: Array<TasksByQueue>;
|
|
158
|
+
/** Tasks grouped by status */
|
|
159
|
+
tasks_by_status: Array<TasksByStatus>;
|
|
160
|
+
}
|
|
161
|
+
|
|
140
162
|
/**
|
|
141
163
|
* Statistics serializer for task metrics. Not tied to a model - used for
|
|
142
164
|
* aggregated data.
|
|
@@ -162,6 +184,21 @@ export interface TaskLogStats {
|
|
|
162
184
|
period_hours?: number;
|
|
163
185
|
}
|
|
164
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Timeline response wrapper. Returns timeline data as array of time-bucketed
|
|
189
|
+
* statistics. Used by /cfg/tasks/logs/timeline/ endpoint.
|
|
190
|
+
*
|
|
191
|
+
* Response model (includes read-only fields).
|
|
192
|
+
*/
|
|
193
|
+
export interface TaskLogTimeline {
|
|
194
|
+
/** Time period covered in hours */
|
|
195
|
+
period_hours: number;
|
|
196
|
+
/** Time bucket interval (hour/day) */
|
|
197
|
+
interval: string;
|
|
198
|
+
/** Timeline data points */
|
|
199
|
+
data: Array<TaskLogTimelineItem>;
|
|
200
|
+
}
|
|
201
|
+
|
|
165
202
|
/**
|
|
166
203
|
* Compact serializer for list views. Minimal fields for performance, matching
|
|
167
204
|
* ReArq Job list format.
|
|
@@ -201,3 +238,48 @@ export interface TaskLogList {
|
|
|
201
238
|
finish_time: string | null;
|
|
202
239
|
}
|
|
203
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Tasks count by queue. Used in overview endpoint for tasks_by_queue list.
|
|
243
|
+
*
|
|
244
|
+
* Response model (includes read-only fields).
|
|
245
|
+
*/
|
|
246
|
+
export interface TasksByQueue {
|
|
247
|
+
/** Queue name */
|
|
248
|
+
queue_name: string;
|
|
249
|
+
/** Number of tasks in this queue */
|
|
250
|
+
count: number;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Tasks count by status. Used in overview endpoint for tasks_by_status list.
|
|
255
|
+
*
|
|
256
|
+
* Response model (includes read-only fields).
|
|
257
|
+
*/
|
|
258
|
+
export interface TasksByStatus {
|
|
259
|
+
/** Task status */
|
|
260
|
+
status: string;
|
|
261
|
+
/** Number of tasks with this status */
|
|
262
|
+
count: number;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Single timeline data point. Represents aggregated task statistics for a
|
|
267
|
+
* specific time period.
|
|
268
|
+
*
|
|
269
|
+
* Response model (includes read-only fields).
|
|
270
|
+
*/
|
|
271
|
+
export interface TaskLogTimelineItem {
|
|
272
|
+
/** Time bucket start */
|
|
273
|
+
timestamp: string;
|
|
274
|
+
/** Total tasks in this period */
|
|
275
|
+
total: number;
|
|
276
|
+
/** Successful tasks */
|
|
277
|
+
successful: number;
|
|
278
|
+
/** Failed tasks */
|
|
279
|
+
failed: number;
|
|
280
|
+
/** Tasks currently in progress */
|
|
281
|
+
in_progress?: number;
|
|
282
|
+
/** Average duration in milliseconds */
|
|
283
|
+
avg_duration_ms?: number;
|
|
284
|
+
}
|
|
285
|
+
|
|
@@ -19,7 +19,9 @@ import { CfgTesting } from "./cfg__newsletter__testing";
|
|
|
19
19
|
import { CfgUserProfile } from "./cfg__accounts__user_profile";
|
|
20
20
|
import { CfgAccounts } from "./cfg__accounts";
|
|
21
21
|
import { CfgCentrifugo } from "./cfg__centrifugo";
|
|
22
|
+
import { CfgDashboard } from "./cfg__dashboard";
|
|
22
23
|
import { CfgEndpoints } from "./cfg__endpoints";
|
|
24
|
+
import { CfgGrpcMonitoring } from "./cfg__grpc__grpc_monitoring";
|
|
23
25
|
import { CfgHealth } from "./cfg__health";
|
|
24
26
|
import { CfgKnowbase } from "./cfg__knowbase";
|
|
25
27
|
import { CfgLeads } from "./cfg__leads";
|
|
@@ -76,7 +78,9 @@ export class APIClient {
|
|
|
76
78
|
public cfg_user_profile: CfgUserProfile;
|
|
77
79
|
public cfg_accounts: CfgAccounts;
|
|
78
80
|
public cfg_centrifugo: CfgCentrifugo;
|
|
81
|
+
public cfg_dashboard: CfgDashboard;
|
|
79
82
|
public cfg_endpoints: CfgEndpoints;
|
|
83
|
+
public cfg_grpc_monitoring: CfgGrpcMonitoring;
|
|
80
84
|
public cfg_health: CfgHealth;
|
|
81
85
|
public cfg_knowbase: CfgKnowbase;
|
|
82
86
|
public cfg_leads: CfgLeads;
|
|
@@ -128,7 +132,9 @@ export class APIClient {
|
|
|
128
132
|
this.cfg_user_profile = new CfgUserProfile(this);
|
|
129
133
|
this.cfg_accounts = new CfgAccounts(this);
|
|
130
134
|
this.cfg_centrifugo = new CfgCentrifugo(this);
|
|
135
|
+
this.cfg_dashboard = new CfgDashboard(this);
|
|
131
136
|
this.cfg_endpoints = new CfgEndpoints(this);
|
|
137
|
+
this.cfg_grpc_monitoring = new CfgGrpcMonitoring(this);
|
|
132
138
|
this.cfg_health = new CfgHealth(this);
|
|
133
139
|
this.cfg_knowbase = new CfgKnowbase(this);
|
|
134
140
|
this.cfg_leads = new CfgLeads(this);
|
|
@@ -64,7 +64,9 @@ import { CfgTesting } from "./cfg__newsletter__testing/client";
|
|
|
64
64
|
import { CfgUserProfile } from "./cfg__accounts__user_profile/client";
|
|
65
65
|
import { CfgAccounts } from "./cfg__accounts/client";
|
|
66
66
|
import { CfgCentrifugo } from "./cfg__centrifugo/client";
|
|
67
|
+
import { CfgDashboard } from "./cfg__dashboard/client";
|
|
67
68
|
import { CfgEndpoints } from "./cfg__endpoints/client";
|
|
69
|
+
import { CfgGrpcMonitoring } from "./cfg__grpc__grpc_monitoring/client";
|
|
68
70
|
import { CfgHealth } from "./cfg__health/client";
|
|
69
71
|
import { CfgKnowbase } from "./cfg__knowbase/client";
|
|
70
72
|
import { CfgLeads } from "./cfg__leads/client";
|
|
@@ -93,7 +95,9 @@ export * as CfgTestingTypes from "./cfg__newsletter__testing/models";
|
|
|
93
95
|
export * as CfgUserProfileTypes from "./cfg__accounts__user_profile/models";
|
|
94
96
|
export * as CfgAccountsTypes from "./cfg__accounts/models";
|
|
95
97
|
export * as CfgCentrifugoTypes from "./cfg__centrifugo/models";
|
|
98
|
+
export * as CfgDashboardTypes from "./cfg__dashboard/models";
|
|
96
99
|
export * as CfgEndpointsTypes from "./cfg__endpoints/models";
|
|
100
|
+
export * as CfgGrpcMonitoringTypes from "./cfg__grpc__grpc_monitoring/models";
|
|
97
101
|
export * as CfgHealthTypes from "./cfg__health/models";
|
|
98
102
|
export * as CfgKnowbaseTypes from "./cfg__knowbase/models";
|
|
99
103
|
export * as CfgLeadsTypes from "./cfg__leads/models";
|
|
@@ -190,7 +194,9 @@ export class API {
|
|
|
190
194
|
public cfg_user_profile!: CfgUserProfile;
|
|
191
195
|
public cfg_accounts!: CfgAccounts;
|
|
192
196
|
public cfg_centrifugo!: CfgCentrifugo;
|
|
197
|
+
public cfg_dashboard!: CfgDashboard;
|
|
193
198
|
public cfg_endpoints!: CfgEndpoints;
|
|
199
|
+
public cfg_grpc_monitoring!: CfgGrpcMonitoring;
|
|
194
200
|
public cfg_health!: CfgHealth;
|
|
195
201
|
public cfg_knowbase!: CfgKnowbase;
|
|
196
202
|
public cfg_leads!: CfgLeads;
|
|
@@ -242,7 +248,9 @@ export class API {
|
|
|
242
248
|
this.cfg_user_profile = this._client.cfg_user_profile;
|
|
243
249
|
this.cfg_accounts = this._client.cfg_accounts;
|
|
244
250
|
this.cfg_centrifugo = this._client.cfg_centrifugo;
|
|
251
|
+
this.cfg_dashboard = this._client.cfg_dashboard;
|
|
245
252
|
this.cfg_endpoints = this._client.cfg_endpoints;
|
|
253
|
+
this.cfg_grpc_monitoring = this._client.cfg_grpc_monitoring;
|
|
246
254
|
this.cfg_health = this._client.cfg_health;
|
|
247
255
|
this.cfg_knowbase = this._client.cfg_knowbase;
|
|
248
256
|
this.cfg_leads = this._client.cfg_leads;
|
|
@@ -288,7 +296,9 @@ export class API {
|
|
|
288
296
|
this.cfg_user_profile = this._client.cfg_user_profile;
|
|
289
297
|
this.cfg_accounts = this._client.cfg_accounts;
|
|
290
298
|
this.cfg_centrifugo = this._client.cfg_centrifugo;
|
|
299
|
+
this.cfg_dashboard = this._client.cfg_dashboard;
|
|
291
300
|
this.cfg_endpoints = this._client.cfg_endpoints;
|
|
301
|
+
this.cfg_grpc_monitoring = this._client.cfg_grpc_monitoring;
|
|
292
302
|
this.cfg_health = this._client.cfg_health;
|
|
293
303
|
this.cfg_knowbase = this._client.cfg_knowbase;
|
|
294
304
|
this.cfg_leads = this._client.cfg_leads;
|