@djangocfg/api 1.2.5 → 1.2.7
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 +4630 -1605
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5103 -1773
- package/dist/index.d.ts +5103 -1773
- package/dist/index.mjs +4481 -1486
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/TasksContext.tsx +242 -0
- package/src/cfg/contexts/index.ts +3 -0
- package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -7
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +61 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +12 -13
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +25 -26
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +8 -9
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_activity.ts +61 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_api_zones.ts +62 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_charts.ts +90 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts +62 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_overview.ts +48 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_statistics.ts +76 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_system.ts +63 -0
- package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +30 -2
- package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +57 -58
- package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -7
- package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -4
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -7
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -4
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +8 -9
- package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -13
- package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -11
- package/src/cfg/generated/_utils/fetchers/index.ts +8 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +49 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +20 -20
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +49 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +50 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +78 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_commands.ts +50 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +36 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +64 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +51 -0
- package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +29 -0
- package/src/cfg/generated/_utils/hooks/index.ts +8 -0
- package/src/cfg/generated/_utils/schemas/APIZone.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/APIZonesSummary.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ActivityEntry.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ActivityTrackerDay.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/AppStatistics.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ChannelStatsSerializer.schema.ts +1 -0
- package/src/cfg/generated/_utils/schemas/ChartData.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ChartDataset.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/Command.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/CommandsSummary.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/DashboardOverview.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/ManualAckResponse.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PublishTestResponse.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/QuickAction.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/RecentUser.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/StatCard.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/SystemHealth.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/SystemHealthItem.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/SystemMetrics.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/URLPattern.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/URLsList.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/UserStatistics.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/index.ts +19 -0
- package/src/cfg/generated/cfg__centrifugo/client.ts +30 -0
- package/src/cfg/generated/cfg__centrifugo/index.ts +2 -0
- package/src/cfg/generated/cfg__centrifugo/models.ts +0 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +6 -6
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +32 -32
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +18 -12
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +2 -2
- package/src/cfg/generated/cfg__dashboard__dashboard_activity/client.ts +45 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_activity/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_activity/models.ts +0 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/client.ts +34 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/models.ts +27 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_charts/client.ts +98 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_charts/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_charts/models.ts +24 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/client.ts +34 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +27 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/client.ts +25 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +23 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_statistics/client.ts +44 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_statistics/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_statistics/models.ts +16 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_system/client.ts +34 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_system/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_system/models.ts +69 -0
- package/src/cfg/generated/cfg__endpoints/client.ts +16 -0
- package/src/cfg/generated/cfg__endpoints/models.ts +44 -0
- package/src/cfg/generated/client.ts +35 -9
- package/src/cfg/generated/enums.ts +56 -0
- package/src/cfg/generated/http.ts +8 -3
- package/src/cfg/generated/index.ts +47 -10
- package/src/cfg/generated/schema.ts +2120 -135
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Dashboard - API Zones.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgDashboardApiZones {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get all API zones
|
|
16
|
+
*
|
|
17
|
+
* Retrieve all OpenAPI zones/groups with their configuration
|
|
18
|
+
*/
|
|
19
|
+
async list(): Promise<any> {
|
|
20
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/zones/");
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get zones summary
|
|
26
|
+
*
|
|
27
|
+
* Retrieve zones summary with statistics
|
|
28
|
+
*/
|
|
29
|
+
async summaryRetrieve(): Promise<Models.APIZonesSummary> {
|
|
30
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/zones/summary/");
|
|
31
|
+
return response;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API zones summary serializer.
|
|
3
|
+
*
|
|
4
|
+
* Response model (includes read-only fields).
|
|
5
|
+
*/
|
|
6
|
+
export interface APIZonesSummary {
|
|
7
|
+
zones: Array<APIZone>;
|
|
8
|
+
summary: Record<string, any>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* OpenAPI zone/group serializer.
|
|
13
|
+
*
|
|
14
|
+
* Response model (includes read-only fields).
|
|
15
|
+
*/
|
|
16
|
+
export interface APIZone {
|
|
17
|
+
name: string;
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
app_count: number;
|
|
21
|
+
endpoint_count: number;
|
|
22
|
+
status: string;
|
|
23
|
+
schema_url: string;
|
|
24
|
+
api_url: string;
|
|
25
|
+
apps: Array<string>;
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Dashboard - Charts.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgDashboardCharts {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async dashboardApiChartsActivityRetrieve(days?: number): Promise<Models.ChartData>;
|
|
15
|
+
async dashboardApiChartsActivityRetrieve(params?: { days?: number }): Promise<Models.ChartData>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get user activity chart
|
|
19
|
+
*
|
|
20
|
+
* Retrieve user activity data for chart visualization
|
|
21
|
+
*/
|
|
22
|
+
async dashboardApiChartsActivityRetrieve(...args: any[]): Promise<Models.ChartData> {
|
|
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 = { days: args[0] };
|
|
30
|
+
}
|
|
31
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/charts/activity/", { params });
|
|
32
|
+
return response;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async dashboardApiChartsRecentUsersList(limit?: number): Promise<any>;
|
|
36
|
+
async dashboardApiChartsRecentUsersList(params?: { limit?: number }): Promise<any>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get recent users
|
|
40
|
+
*
|
|
41
|
+
* Retrieve list of recently registered users
|
|
42
|
+
*/
|
|
43
|
+
async dashboardApiChartsRecentUsersList(...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 = { limit: args[0] };
|
|
51
|
+
}
|
|
52
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/charts/recent-users/", { params });
|
|
53
|
+
return response;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async dashboardApiChartsRegistrationsRetrieve(days?: number): Promise<Models.ChartData>;
|
|
57
|
+
async dashboardApiChartsRegistrationsRetrieve(params?: { days?: number }): Promise<Models.ChartData>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Get user registration chart
|
|
61
|
+
*
|
|
62
|
+
* Retrieve user registration data for chart visualization
|
|
63
|
+
*/
|
|
64
|
+
async dashboardApiChartsRegistrationsRetrieve(...args: any[]): Promise<Models.ChartData> {
|
|
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 = { days: args[0] };
|
|
72
|
+
}
|
|
73
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/charts/registrations/", { params });
|
|
74
|
+
return response;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async dashboardApiChartsTrackerList(weeks?: number): Promise<any>;
|
|
78
|
+
async dashboardApiChartsTrackerList(params?: { weeks?: number }): Promise<any>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get activity tracker
|
|
82
|
+
*
|
|
83
|
+
* Retrieve activity tracker data (GitHub-style contribution graph)
|
|
84
|
+
*/
|
|
85
|
+
async dashboardApiChartsTrackerList(...args: any[]): Promise<any> {
|
|
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 = { weeks: args[0] };
|
|
93
|
+
}
|
|
94
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/charts/tracker/", { params });
|
|
95
|
+
return response;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart.js data structure serializer.
|
|
3
|
+
*
|
|
4
|
+
* Response model (includes read-only fields).
|
|
5
|
+
*/
|
|
6
|
+
export interface ChartData {
|
|
7
|
+
labels: Array<string>;
|
|
8
|
+
datasets: Array<ChartDataset>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Chart.js dataset serializer.
|
|
13
|
+
*
|
|
14
|
+
* Response model (includes read-only fields).
|
|
15
|
+
*/
|
|
16
|
+
export interface ChartDataset {
|
|
17
|
+
label: string;
|
|
18
|
+
data: Array<number>;
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
borderColor: string;
|
|
21
|
+
tension: number;
|
|
22
|
+
fill?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Dashboard - Commands.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgDashboardCommands {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get all commands
|
|
16
|
+
*
|
|
17
|
+
* Retrieve all available Django management commands
|
|
18
|
+
*/
|
|
19
|
+
async dashboardApiCommandsList(): Promise<any> {
|
|
20
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/commands/");
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get commands summary
|
|
26
|
+
*
|
|
27
|
+
* Retrieve commands summary with statistics and categorization
|
|
28
|
+
*/
|
|
29
|
+
async dashboardApiCommandsSummaryRetrieve(): Promise<Models.CommandsSummary> {
|
|
30
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/commands/summary/");
|
|
31
|
+
return response;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands summary serializer.
|
|
3
|
+
*
|
|
4
|
+
* Response model (includes read-only fields).
|
|
5
|
+
*/
|
|
6
|
+
export interface CommandsSummary {
|
|
7
|
+
total_commands: number;
|
|
8
|
+
core_commands: number;
|
|
9
|
+
custom_commands: number;
|
|
10
|
+
categories: Array<string>;
|
|
11
|
+
commands: Array<Command>;
|
|
12
|
+
categorized: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Django management command serializer.
|
|
17
|
+
*
|
|
18
|
+
* Response model (includes read-only fields).
|
|
19
|
+
*/
|
|
20
|
+
export interface Command {
|
|
21
|
+
name: string;
|
|
22
|
+
app: string;
|
|
23
|
+
help: string;
|
|
24
|
+
is_core: boolean;
|
|
25
|
+
is_custom: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Dashboard - Overview.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgDashboardOverview {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get dashboard overview
|
|
16
|
+
*
|
|
17
|
+
* Retrieve complete dashboard data including stats, health, actions, and
|
|
18
|
+
* metrics
|
|
19
|
+
*/
|
|
20
|
+
async dashboardApiOverviewOverviewRetrieve(): Promise<Models.DashboardOverview> {
|
|
21
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/overview/overview/");
|
|
22
|
+
return response;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main serializer for dashboard overview endpoint. Uses DictField to avoid
|
|
3
|
+
* allOf generation in OpenAPI.
|
|
4
|
+
*
|
|
5
|
+
* Response model (includes read-only fields).
|
|
6
|
+
*/
|
|
7
|
+
export interface DashboardOverview {
|
|
8
|
+
/** Dashboard statistics cards */
|
|
9
|
+
stat_cards: Array<Record<string, any>>;
|
|
10
|
+
/** System health status */
|
|
11
|
+
system_health: Array<Record<string, any>>;
|
|
12
|
+
/** Quick action buttons */
|
|
13
|
+
quick_actions: Array<Record<string, any>>;
|
|
14
|
+
/** Recent activity entries */
|
|
15
|
+
recent_activity: Array<Record<string, any>>;
|
|
16
|
+
/** System performance metrics */
|
|
17
|
+
system_metrics: Record<string, any>;
|
|
18
|
+
/** User statistics */
|
|
19
|
+
user_statistics: Record<string, any>;
|
|
20
|
+
/** Data timestamp (ISO format) */
|
|
21
|
+
timestamp: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Dashboard - Statistics.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgDashboardStatistics {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get application statistics
|
|
16
|
+
*
|
|
17
|
+
* Retrieve statistics for all enabled django-cfg applications
|
|
18
|
+
*/
|
|
19
|
+
async dashboardApiStatisticsAppsList(): Promise<any> {
|
|
20
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/statistics/apps/");
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get statistics cards
|
|
26
|
+
*
|
|
27
|
+
* Retrieve dashboard statistics cards with key metrics
|
|
28
|
+
*/
|
|
29
|
+
async dashboardApiStatisticsCardsList(): Promise<any> {
|
|
30
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/statistics/cards/");
|
|
31
|
+
return response;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get user statistics
|
|
36
|
+
*
|
|
37
|
+
* Retrieve user-related statistics
|
|
38
|
+
*/
|
|
39
|
+
async dashboardApiStatisticsUsersRetrieve(): Promise<Models.UserStatistics> {
|
|
40
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/statistics/users/");
|
|
41
|
+
return response;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serializer for user statistics.
|
|
3
|
+
*
|
|
4
|
+
* Response model (includes read-only fields).
|
|
5
|
+
*/
|
|
6
|
+
export interface UserStatistics {
|
|
7
|
+
/** Total number of users */
|
|
8
|
+
total_users: number;
|
|
9
|
+
/** Active users (last 30 days) */
|
|
10
|
+
active_users: number;
|
|
11
|
+
/** New users (last 7 days) */
|
|
12
|
+
new_users: number;
|
|
13
|
+
/** Number of superusers */
|
|
14
|
+
superusers: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Dashboard - System.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgDashboardSystem {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get system health status
|
|
16
|
+
*
|
|
17
|
+
* Retrieve overall system health including all component checks
|
|
18
|
+
*/
|
|
19
|
+
async dashboardApiSystemHealthRetrieve(): Promise<Models.SystemHealth> {
|
|
20
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/system/health/");
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get system metrics
|
|
26
|
+
*
|
|
27
|
+
* Retrieve system performance metrics (CPU, memory, disk, etc.)
|
|
28
|
+
*/
|
|
29
|
+
async dashboardApiSystemMetricsRetrieve(): Promise<Models.SystemMetrics> {
|
|
30
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/system/metrics/");
|
|
31
|
+
return response;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as Enums from "../enums";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Serializer for overall system health status.
|
|
5
|
+
*
|
|
6
|
+
* Response model (includes read-only fields).
|
|
7
|
+
*/
|
|
8
|
+
export interface SystemHealth {
|
|
9
|
+
/** Overall system health status
|
|
10
|
+
|
|
11
|
+
* `healthy` - healthy
|
|
12
|
+
* `warning` - warning
|
|
13
|
+
* `error` - error
|
|
14
|
+
* `unknown` - unknown */
|
|
15
|
+
overall_status: Enums.SystemHealthOverallStatus;
|
|
16
|
+
/** Overall health percentage */
|
|
17
|
+
overall_health_percentage: number;
|
|
18
|
+
/** Health status of individual components */
|
|
19
|
+
components: Array<SystemHealthItem>;
|
|
20
|
+
/** Check timestamp (ISO format) */
|
|
21
|
+
timestamp: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Serializer for system performance metrics.
|
|
26
|
+
*
|
|
27
|
+
* Response model (includes read-only fields).
|
|
28
|
+
*/
|
|
29
|
+
export interface SystemMetrics {
|
|
30
|
+
/** CPU usage percentage */
|
|
31
|
+
cpu_usage: number;
|
|
32
|
+
/** Memory usage percentage */
|
|
33
|
+
memory_usage: number;
|
|
34
|
+
/** Disk usage percentage */
|
|
35
|
+
disk_usage: number;
|
|
36
|
+
/** Network incoming bandwidth */
|
|
37
|
+
network_in: string;
|
|
38
|
+
/** Network outgoing bandwidth */
|
|
39
|
+
network_out: string;
|
|
40
|
+
/** Average response time */
|
|
41
|
+
response_time: string;
|
|
42
|
+
/** System uptime */
|
|
43
|
+
uptime: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Serializer for system health status items. Maps to SystemHealthItem Pydantic
|
|
48
|
+
* model.
|
|
49
|
+
*
|
|
50
|
+
* Response model (includes read-only fields).
|
|
51
|
+
*/
|
|
52
|
+
export interface SystemHealthItem {
|
|
53
|
+
/** Component name */
|
|
54
|
+
component: string;
|
|
55
|
+
/** Health status
|
|
56
|
+
|
|
57
|
+
* `healthy` - healthy
|
|
58
|
+
* `warning` - warning
|
|
59
|
+
* `error` - error
|
|
60
|
+
* `unknown` - unknown */
|
|
61
|
+
status: Enums.SystemHealthItemStatus;
|
|
62
|
+
/** Status description */
|
|
63
|
+
description: string;
|
|
64
|
+
/** Last check time (ISO format) */
|
|
65
|
+
last_check: string;
|
|
66
|
+
/** Health percentage (0-100) */
|
|
67
|
+
health_percentage?: number | null;
|
|
68
|
+
}
|
|
69
|
+
|
|
@@ -19,4 +19,20 @@ export class CfgEndpoints {
|
|
|
19
19
|
return response;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Return all registered URLs.
|
|
24
|
+
*/
|
|
25
|
+
async urlsRetrieve(): Promise<Models.URLsList[]> {
|
|
26
|
+
const response = await this.client.request('GET', "/cfg/endpoints/urls/");
|
|
27
|
+
return (response as any).results || [];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Return compact URL list.
|
|
32
|
+
*/
|
|
33
|
+
async urlsCompactRetrieve(): Promise<any> {
|
|
34
|
+
const response = await this.client.request('GET', "/cfg/endpoints/urls/compact/");
|
|
35
|
+
return response;
|
|
36
|
+
}
|
|
37
|
+
|
|
22
38
|
}
|
|
@@ -24,6 +24,26 @@ export interface EndpointsStatus {
|
|
|
24
24
|
endpoints: Array<Endpoint>;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Serializer for URLs list response.
|
|
29
|
+
*
|
|
30
|
+
* Response model (includes read-only fields).
|
|
31
|
+
*/
|
|
32
|
+
export interface URLsList {
|
|
33
|
+
/** Status: success or error */
|
|
34
|
+
status: string;
|
|
35
|
+
/** Service name */
|
|
36
|
+
service: string;
|
|
37
|
+
/** Django-CFG version */
|
|
38
|
+
version: string;
|
|
39
|
+
/** Base URL of the service */
|
|
40
|
+
base_url: string;
|
|
41
|
+
/** Total number of registered URLs */
|
|
42
|
+
total_urls: number;
|
|
43
|
+
/** List of all registered URL patterns */
|
|
44
|
+
urls: Array<URLPattern>;
|
|
45
|
+
}
|
|
46
|
+
|
|
27
47
|
/**
|
|
28
48
|
* Serializer for single endpoint status.
|
|
29
49
|
*
|
|
@@ -66,3 +86,27 @@ export interface Endpoint {
|
|
|
66
86
|
rate_limited?: boolean;
|
|
67
87
|
}
|
|
68
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Serializer for single URL pattern.
|
|
91
|
+
*
|
|
92
|
+
* Response model (includes read-only fields).
|
|
93
|
+
*/
|
|
94
|
+
export interface URLPattern {
|
|
95
|
+
/** URL pattern (e.g., ^api/users/(?P<pk>[^/.]+)/$) */
|
|
96
|
+
pattern: string;
|
|
97
|
+
/** URL name (if defined) */
|
|
98
|
+
name?: string | null;
|
|
99
|
+
/** Full URL name with namespace (e.g., admin:index) */
|
|
100
|
+
full_name?: string | null;
|
|
101
|
+
/** URL namespace */
|
|
102
|
+
namespace?: string | null;
|
|
103
|
+
/** View function/class name */
|
|
104
|
+
view?: string | null;
|
|
105
|
+
/** View class name (for CBV/ViewSets) */
|
|
106
|
+
view_class?: string | null;
|
|
107
|
+
/** Allowed HTTP methods */
|
|
108
|
+
methods?: Array<string>;
|
|
109
|
+
/** View module path */
|
|
110
|
+
module?: string | null;
|
|
111
|
+
}
|
|
112
|
+
|