@djangocfg/api 1.2.16 → 1.2.18
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 +1893 -1113
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1616 -289
- package/dist/index.d.ts +1616 -289
- package/dist/index.mjs +1826 -1051
- 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__tasks.ts +9 -7
- package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +77 -0
- package/src/cfg/generated/_utils/hooks/cfg__tasks.ts +9 -7
- package/src/cfg/generated/_utils/hooks/index.ts +1 -0
- package/src/cfg/generated/_utils/schemas/DashboardOverview.schema.ts +16 -8
- 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 +5 -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__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 +3 -0
- package/src/cfg/generated/index.ts +5 -0
- package/src/cfg/generated/schema.ts +656 -49
|
@@ -1,23 +1,193 @@
|
|
|
1
|
+
import * as Enums from "../enums";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
|
-
* Main serializer for dashboard overview endpoint. Uses
|
|
3
|
-
*
|
|
4
|
+
* Main serializer for dashboard overview endpoint. Uses typed serializers for
|
|
5
|
+
* proper OpenAPI schema generation.
|
|
4
6
|
*
|
|
5
7
|
* Response model (includes read-only fields).
|
|
6
8
|
*/
|
|
7
9
|
export interface DashboardOverview {
|
|
8
10
|
/** Dashboard statistics cards */
|
|
9
|
-
stat_cards: Array<
|
|
10
|
-
|
|
11
|
-
system_health: Array<Record<string, any>>;
|
|
11
|
+
stat_cards: Array<StatCard>;
|
|
12
|
+
system_health: Record<string, any>;
|
|
12
13
|
/** Quick action buttons */
|
|
13
|
-
quick_actions: Array<
|
|
14
|
+
quick_actions: Array<QuickAction>;
|
|
14
15
|
/** Recent activity entries */
|
|
15
|
-
recent_activity: Array<
|
|
16
|
-
/** System performance metrics */
|
|
16
|
+
recent_activity: Array<ActivityEntry>;
|
|
17
17
|
system_metrics: Record<string, any>;
|
|
18
|
-
/** User statistics */
|
|
19
18
|
user_statistics: Record<string, any>;
|
|
19
|
+
/** Application statistics */
|
|
20
|
+
app_statistics?: Array<AppStatistics>;
|
|
20
21
|
/** Data timestamp (ISO format) */
|
|
21
22
|
timestamp: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Serializer for dashboard statistics cards. Maps to StatCard Pydantic model.
|
|
27
|
+
*
|
|
28
|
+
* Response model (includes read-only fields).
|
|
29
|
+
*/
|
|
30
|
+
export interface StatCard {
|
|
31
|
+
/** Card title */
|
|
32
|
+
title: string;
|
|
33
|
+
/** Main value to display */
|
|
34
|
+
value: string;
|
|
35
|
+
/** Material icon name */
|
|
36
|
+
icon: string;
|
|
37
|
+
/** Change indicator (e.g., '+12%') */
|
|
38
|
+
change?: string | null;
|
|
39
|
+
/** Change type
|
|
40
|
+
|
|
41
|
+
* `positive` - positive
|
|
42
|
+
* `negative` - negative
|
|
43
|
+
* `neutral` - neutral */
|
|
44
|
+
change_type?: Enums.StatCardChangeType;
|
|
45
|
+
/** Additional description */
|
|
46
|
+
description?: string | null;
|
|
47
|
+
/** Card color theme */
|
|
48
|
+
color?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Serializer for overall system health status.
|
|
53
|
+
*
|
|
54
|
+
* Response model (includes read-only fields).
|
|
55
|
+
*/
|
|
56
|
+
export interface SystemHealth {
|
|
57
|
+
/** Overall system health status
|
|
58
|
+
|
|
59
|
+
* `healthy` - healthy
|
|
60
|
+
* `warning` - warning
|
|
61
|
+
* `error` - error
|
|
62
|
+
* `unknown` - unknown */
|
|
63
|
+
overall_status: Enums.SystemHealthOverallStatus;
|
|
64
|
+
/** Overall health percentage */
|
|
65
|
+
overall_health_percentage: number;
|
|
66
|
+
/** Health status of individual components */
|
|
67
|
+
components: Array<SystemHealthItem>;
|
|
68
|
+
/** Check timestamp (ISO format) */
|
|
69
|
+
timestamp: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Serializer for quick action buttons. Maps to QuickAction Pydantic model.
|
|
74
|
+
*
|
|
75
|
+
* Response model (includes read-only fields).
|
|
76
|
+
*/
|
|
77
|
+
export interface QuickAction {
|
|
78
|
+
/** Action title */
|
|
79
|
+
title: string;
|
|
80
|
+
/** Action description */
|
|
81
|
+
description: string;
|
|
82
|
+
/** Material icon name */
|
|
83
|
+
icon: string;
|
|
84
|
+
/** Action URL */
|
|
85
|
+
link: string;
|
|
86
|
+
/** Button color theme
|
|
87
|
+
|
|
88
|
+
* `primary` - primary
|
|
89
|
+
* `success` - success
|
|
90
|
+
* `warning` - warning
|
|
91
|
+
* `danger` - danger
|
|
92
|
+
* `secondary` - secondary */
|
|
93
|
+
color?: Enums.QuickActionColor;
|
|
94
|
+
/** Action category */
|
|
95
|
+
category?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Serializer for recent activity entries.
|
|
100
|
+
*
|
|
101
|
+
* Response model (includes read-only fields).
|
|
102
|
+
*/
|
|
103
|
+
export interface ActivityEntry {
|
|
104
|
+
/** Activity ID */
|
|
105
|
+
id: number;
|
|
106
|
+
/** User who performed the action */
|
|
107
|
+
user: string;
|
|
108
|
+
/** Action type (created, updated, deleted, etc.) */
|
|
109
|
+
action: string;
|
|
110
|
+
/** Resource affected */
|
|
111
|
+
resource: string;
|
|
112
|
+
/** Activity timestamp (ISO format) */
|
|
113
|
+
timestamp: string;
|
|
114
|
+
/** Material icon name */
|
|
115
|
+
icon: string;
|
|
116
|
+
/** Icon color */
|
|
117
|
+
color: string;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Serializer for system performance metrics.
|
|
122
|
+
*
|
|
123
|
+
* Response model (includes read-only fields).
|
|
124
|
+
*/
|
|
125
|
+
export interface SystemMetrics {
|
|
126
|
+
/** CPU usage percentage */
|
|
127
|
+
cpu_usage: number;
|
|
128
|
+
/** Memory usage percentage */
|
|
129
|
+
memory_usage: number;
|
|
130
|
+
/** Disk usage percentage */
|
|
131
|
+
disk_usage: number;
|
|
132
|
+
/** Network incoming bandwidth */
|
|
133
|
+
network_in: string;
|
|
134
|
+
/** Network outgoing bandwidth */
|
|
135
|
+
network_out: string;
|
|
136
|
+
/** Average response time */
|
|
137
|
+
response_time: string;
|
|
138
|
+
/** System uptime */
|
|
139
|
+
uptime: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Serializer for user statistics.
|
|
144
|
+
*
|
|
145
|
+
* Response model (includes read-only fields).
|
|
146
|
+
*/
|
|
147
|
+
export interface UserStatistics {
|
|
148
|
+
/** Total number of users */
|
|
149
|
+
total_users: number;
|
|
150
|
+
/** Active users (last 30 days) */
|
|
151
|
+
active_users: number;
|
|
152
|
+
/** New users (last 7 days) */
|
|
153
|
+
new_users: number;
|
|
154
|
+
/** Number of superusers */
|
|
155
|
+
superusers: number;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Serializer for application-specific statistics.
|
|
160
|
+
*
|
|
161
|
+
* Response model (includes read-only fields).
|
|
162
|
+
*/
|
|
163
|
+
export interface AppStatistics {
|
|
164
|
+
/** Application name */
|
|
165
|
+
app_name: string;
|
|
166
|
+
/** Application statistics */
|
|
167
|
+
statistics: Record<string, any>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Serializer for system health status items. Maps to SystemHealthItem Pydantic
|
|
172
|
+
* model.
|
|
173
|
+
*
|
|
174
|
+
* Response model (includes read-only fields).
|
|
175
|
+
*/
|
|
176
|
+
export interface SystemHealthItem {
|
|
177
|
+
/** Component name */
|
|
178
|
+
component: string;
|
|
179
|
+
/** Health status
|
|
180
|
+
|
|
181
|
+
* `healthy` - healthy
|
|
182
|
+
* `warning` - warning
|
|
183
|
+
* `error` - error
|
|
184
|
+
* `unknown` - unknown */
|
|
185
|
+
status: Enums.SystemHealthItemStatus;
|
|
186
|
+
/** Status description */
|
|
187
|
+
description: string;
|
|
188
|
+
/** Last check time (ISO format) */
|
|
189
|
+
last_check: string;
|
|
190
|
+
/** Health percentage (0-100) */
|
|
191
|
+
health_percentage?: number | null;
|
|
192
|
+
}
|
|
193
|
+
|
|
@@ -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,6 +19,7 @@ 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";
|
|
23
24
|
import { CfgHealth } from "./cfg__health";
|
|
24
25
|
import { CfgKnowbase } from "./cfg__knowbase";
|
|
@@ -76,6 +77,7 @@ export class APIClient {
|
|
|
76
77
|
public cfg_user_profile: CfgUserProfile;
|
|
77
78
|
public cfg_accounts: CfgAccounts;
|
|
78
79
|
public cfg_centrifugo: CfgCentrifugo;
|
|
80
|
+
public cfg_dashboard: CfgDashboard;
|
|
79
81
|
public cfg_endpoints: CfgEndpoints;
|
|
80
82
|
public cfg_health: CfgHealth;
|
|
81
83
|
public cfg_knowbase: CfgKnowbase;
|
|
@@ -128,6 +130,7 @@ export class APIClient {
|
|
|
128
130
|
this.cfg_user_profile = new CfgUserProfile(this);
|
|
129
131
|
this.cfg_accounts = new CfgAccounts(this);
|
|
130
132
|
this.cfg_centrifugo = new CfgCentrifugo(this);
|
|
133
|
+
this.cfg_dashboard = new CfgDashboard(this);
|
|
131
134
|
this.cfg_endpoints = new CfgEndpoints(this);
|
|
132
135
|
this.cfg_health = new CfgHealth(this);
|
|
133
136
|
this.cfg_knowbase = new CfgKnowbase(this);
|
|
@@ -64,6 +64,7 @@ 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";
|
|
68
69
|
import { CfgHealth } from "./cfg__health/client";
|
|
69
70
|
import { CfgKnowbase } from "./cfg__knowbase/client";
|
|
@@ -93,6 +94,7 @@ export * as CfgTestingTypes from "./cfg__newsletter__testing/models";
|
|
|
93
94
|
export * as CfgUserProfileTypes from "./cfg__accounts__user_profile/models";
|
|
94
95
|
export * as CfgAccountsTypes from "./cfg__accounts/models";
|
|
95
96
|
export * as CfgCentrifugoTypes from "./cfg__centrifugo/models";
|
|
97
|
+
export * as CfgDashboardTypes from "./cfg__dashboard/models";
|
|
96
98
|
export * as CfgEndpointsTypes from "./cfg__endpoints/models";
|
|
97
99
|
export * as CfgHealthTypes from "./cfg__health/models";
|
|
98
100
|
export * as CfgKnowbaseTypes from "./cfg__knowbase/models";
|
|
@@ -190,6 +192,7 @@ export class API {
|
|
|
190
192
|
public cfg_user_profile!: CfgUserProfile;
|
|
191
193
|
public cfg_accounts!: CfgAccounts;
|
|
192
194
|
public cfg_centrifugo!: CfgCentrifugo;
|
|
195
|
+
public cfg_dashboard!: CfgDashboard;
|
|
193
196
|
public cfg_endpoints!: CfgEndpoints;
|
|
194
197
|
public cfg_health!: CfgHealth;
|
|
195
198
|
public cfg_knowbase!: CfgKnowbase;
|
|
@@ -242,6 +245,7 @@ export class API {
|
|
|
242
245
|
this.cfg_user_profile = this._client.cfg_user_profile;
|
|
243
246
|
this.cfg_accounts = this._client.cfg_accounts;
|
|
244
247
|
this.cfg_centrifugo = this._client.cfg_centrifugo;
|
|
248
|
+
this.cfg_dashboard = this._client.cfg_dashboard;
|
|
245
249
|
this.cfg_endpoints = this._client.cfg_endpoints;
|
|
246
250
|
this.cfg_health = this._client.cfg_health;
|
|
247
251
|
this.cfg_knowbase = this._client.cfg_knowbase;
|
|
@@ -288,6 +292,7 @@ export class API {
|
|
|
288
292
|
this.cfg_user_profile = this._client.cfg_user_profile;
|
|
289
293
|
this.cfg_accounts = this._client.cfg_accounts;
|
|
290
294
|
this.cfg_centrifugo = this._client.cfg_centrifugo;
|
|
295
|
+
this.cfg_dashboard = this._client.cfg_dashboard;
|
|
291
296
|
this.cfg_endpoints = this._client.cfg_endpoints;
|
|
292
297
|
this.cfg_health = this._client.cfg_health;
|
|
293
298
|
this.cfg_knowbase = this._client.cfg_knowbase;
|