@djangocfg/api 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/index.cjs +3023 -1755
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +2542 -908
  4. package/dist/index.d.ts +2542 -908
  5. package/dist/index.mjs +2959 -1707
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -3
  9. package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -2
  10. package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -7
  11. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +2 -3
  12. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +12 -13
  13. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +8 -9
  14. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +8 -9
  15. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_activity.ts +61 -0
  16. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_api_zones.ts +62 -0
  17. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_charts.ts +90 -0
  18. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts +92 -0
  19. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_overview.ts +48 -0
  20. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_statistics.ts +76 -0
  21. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_system.ts +63 -0
  22. package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +3 -4
  23. package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -3
  24. package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +57 -58
  25. package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -7
  26. package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -2
  27. package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -4
  28. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -2
  29. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -7
  30. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -2
  31. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -3
  32. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -4
  33. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -2
  34. package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +8 -9
  35. package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -13
  36. package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -11
  37. package/src/cfg/generated/_utils/fetchers/index.ts +7 -1
  38. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +49 -0
  39. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +50 -0
  40. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +78 -0
  41. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_commands.ts +84 -0
  42. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +36 -0
  43. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +64 -0
  44. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +51 -0
  45. package/src/cfg/generated/_utils/hooks/index.ts +7 -1
  46. package/src/cfg/generated/_utils/schemas/APIZone.schema.ts +27 -0
  47. package/src/cfg/generated/_utils/schemas/APIZonesSummary.schema.ts +21 -0
  48. package/src/cfg/generated/_utils/schemas/ActivityTrackerDay.schema.ts +23 -0
  49. package/src/cfg/generated/_utils/schemas/ChartData.schema.ts +21 -0
  50. package/src/cfg/generated/_utils/schemas/ChartDataset.schema.ts +24 -0
  51. package/src/cfg/generated/_utils/schemas/Command.schema.ts +25 -0
  52. package/src/cfg/generated/_utils/schemas/CommandExecuteRequestRequest.schema.ts +21 -0
  53. package/src/cfg/generated/_utils/schemas/CommandHelpResponse.schema.ts +25 -0
  54. package/src/cfg/generated/_utils/schemas/CommandsSummary.schema.ts +25 -0
  55. package/src/cfg/generated/_utils/schemas/RecentUser.schema.ts +26 -0
  56. package/src/cfg/generated/_utils/schemas/index.ts +10 -0
  57. package/src/cfg/generated/cfg__dashboard__dashboard_activity/client.ts +45 -0
  58. package/src/cfg/generated/cfg__dashboard__dashboard_activity/models.ts +0 -0
  59. package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/client.ts +34 -0
  60. package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/index.ts +2 -0
  61. package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/models.ts +27 -0
  62. package/src/cfg/generated/cfg__dashboard__dashboard_charts/client.ts +98 -0
  63. package/src/cfg/generated/cfg__dashboard__dashboard_charts/index.ts +2 -0
  64. package/src/cfg/generated/cfg__dashboard__dashboard_charts/models.ts +24 -0
  65. package/src/cfg/generated/cfg__dashboard__dashboard_commands/client.ts +55 -0
  66. package/src/cfg/generated/cfg__dashboard__dashboard_commands/index.ts +2 -0
  67. package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +58 -0
  68. package/src/cfg/generated/cfg__dashboard__dashboard_overview/client.ts +25 -0
  69. package/src/cfg/generated/cfg__dashboard__dashboard_overview/index.ts +2 -0
  70. package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +23 -0
  71. package/src/cfg/generated/cfg__dashboard__dashboard_statistics/client.ts +44 -0
  72. package/src/cfg/generated/cfg__dashboard__dashboard_statistics/index.ts +2 -0
  73. package/src/cfg/generated/cfg__dashboard__dashboard_statistics/models.ts +16 -0
  74. package/src/cfg/generated/cfg__dashboard__dashboard_system/client.ts +34 -0
  75. package/src/cfg/generated/cfg__dashboard__dashboard_system/index.ts +2 -0
  76. package/src/cfg/generated/{cfg__dashboard → cfg__dashboard__dashboard_system}/models.ts +0 -39
  77. package/src/cfg/generated/client.ts +32 -12
  78. package/src/cfg/generated/http.ts +8 -3
  79. package/src/cfg/generated/index.ts +35 -5
  80. package/src/cfg/generated/schema.ts +776 -22
  81. package/src/cfg/generated/_utils/fetchers/cfg__dashboard.ts +0 -150
  82. package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +0 -137
  83. package/src/cfg/generated/cfg__dashboard/client.ts +0 -106
  84. /package/src/cfg/generated/{cfg__dashboard → cfg__dashboard__dashboard_activity}/index.ts +0 -0
@@ -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,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -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,55 @@
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 command help
26
+ *
27
+ * Get detailed help text for a specific Django management command
28
+ */
29
+ async dashboardApiCommandsHelpRetrieve(id: string): Promise<Models.CommandHelpResponse> {
30
+ const response = await this.client.request('GET', `/cfg/dashboard/api/commands/${id}/help/`);
31
+ return response;
32
+ }
33
+
34
+ /**
35
+ * Execute command
36
+ *
37
+ * Execute a Django management command and stream output in Server-Sent
38
+ * Events format
39
+ */
40
+ async dashboardApiCommandsExecuteCreate(data: Models.CommandExecuteRequestRequest): Promise<any> {
41
+ const response = await this.client.request('POST', "/cfg/dashboard/api/commands/execute/", { body: data });
42
+ return response;
43
+ }
44
+
45
+ /**
46
+ * Get commands summary
47
+ *
48
+ * Retrieve commands summary with statistics and categorization
49
+ */
50
+ async dashboardApiCommandsSummaryRetrieve(): Promise<Models.CommandsSummary> {
51
+ const response = await this.client.request('GET', "/cfg/dashboard/api/commands/summary/");
52
+ return response;
53
+ }
54
+
55
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Response serializer for command help.
3
+ *
4
+ * Response model (includes read-only fields).
5
+ */
6
+ export interface CommandHelpResponse {
7
+ status: string;
8
+ command: string;
9
+ app?: string;
10
+ help_text?: string;
11
+ is_allowed?: boolean;
12
+ risk_level?: string;
13
+ error?: string;
14
+ }
15
+
16
+ /**
17
+ * Request serializer for command execution.
18
+ *
19
+ * Request model (no read-only fields).
20
+ */
21
+ export interface CommandExecuteRequestRequest {
22
+ /** Name of the Django management command */
23
+ command: string;
24
+ /** Positional arguments for the command */
25
+ args?: Array<string>;
26
+ /** Named options for the command (e.g., {'verbosity': '2'}) */
27
+ options?: Record<string, any>;
28
+ }
29
+
30
+ /**
31
+ * Commands summary serializer.
32
+ *
33
+ * Response model (includes read-only fields).
34
+ */
35
+ export interface CommandsSummary {
36
+ total_commands: number;
37
+ core_commands: number;
38
+ custom_commands: number;
39
+ categories: Array<string>;
40
+ commands: Array<Command>;
41
+ categorized: Record<string, any>;
42
+ }
43
+
44
+ /**
45
+ * Django management command serializer.
46
+ *
47
+ * Response model (includes read-only fields).
48
+ */
49
+ export interface Command {
50
+ name: string;
51
+ app: string;
52
+ help: string;
53
+ is_core: boolean;
54
+ is_custom: boolean;
55
+ is_allowed?: boolean;
56
+ risk_level?: string;
57
+ }
58
+
@@ -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,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -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,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -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,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -1,44 +1,5 @@
1
1
  import * as Enums from "../enums";
2
2
 
3
- /**
4
- * Main serializer for dashboard overview endpoint. Uses DictField to avoid
5
- * allOf generation in OpenAPI.
6
- *
7
- * Response model (includes read-only fields).
8
- */
9
- export interface DashboardOverview {
10
- /** Dashboard statistics cards */
11
- stat_cards: Array<Record<string, any>>;
12
- /** System health status */
13
- system_health: Array<Record<string, any>>;
14
- /** Quick action buttons */
15
- quick_actions: Array<Record<string, any>>;
16
- /** Recent activity entries */
17
- recent_activity: Array<Record<string, any>>;
18
- /** System performance metrics */
19
- system_metrics: Record<string, any>;
20
- /** User statistics */
21
- user_statistics: Record<string, any>;
22
- /** Data timestamp (ISO format) */
23
- timestamp: string;
24
- }
25
-
26
- /**
27
- * Serializer for user statistics.
28
- *
29
- * Response model (includes read-only fields).
30
- */
31
- export interface UserStatistics {
32
- /** Total number of users */
33
- total_users: number;
34
- /** Active users (last 30 days) */
35
- active_users: number;
36
- /** New users (last 7 days) */
37
- new_users: number;
38
- /** Number of superusers */
39
- superusers: number;
40
- }
41
-
42
3
  /**
43
4
  * Serializer for overall system health status.
44
5
  *
@@ -4,6 +4,13 @@ import { CfgCampaigns } from "./cfg__newsletter__campaigns";
4
4
  import { CfgCentrifugoAdminApi } from "./cfg__centrifugo__centrifugo_admin_api";
5
5
  import { CfgCentrifugoMonitoring } from "./cfg__centrifugo__centrifugo_monitoring";
6
6
  import { CfgCentrifugoTesting } from "./cfg__centrifugo__centrifugo_testing";
7
+ import { CfgDashboardApiZones } from "./cfg__dashboard__dashboard_api_zones";
8
+ import { CfgDashboardActivity } from "./cfg__dashboard__dashboard_activity";
9
+ import { CfgDashboardCharts } from "./cfg__dashboard__dashboard_charts";
10
+ import { CfgDashboardCommands } from "./cfg__dashboard__dashboard_commands";
11
+ import { CfgDashboardOverview } from "./cfg__dashboard__dashboard_overview";
12
+ import { CfgDashboardStatistics } from "./cfg__dashboard__dashboard_statistics";
13
+ import { CfgDashboardSystem } from "./cfg__dashboard__dashboard_system";
7
14
  import { CfgLeadSubmission } from "./cfg__leads__lead_submission";
8
15
  import { CfgLogs } from "./cfg__newsletter__logs";
9
16
  import { CfgNewsletters } from "./cfg__newsletter__newsletters";
@@ -12,7 +19,6 @@ import { CfgTesting } from "./cfg__newsletter__testing";
12
19
  import { CfgUserProfile } from "./cfg__accounts__user_profile";
13
20
  import { CfgAccounts } from "./cfg__accounts";
14
21
  import { CfgCentrifugo } from "./cfg__centrifugo";
15
- import { CfgDashboard } from "./cfg__dashboard";
16
22
  import { CfgEndpoints } from "./cfg__endpoints";
17
23
  import { CfgHealth } from "./cfg__health";
18
24
  import { CfgKnowbase } from "./cfg__knowbase";
@@ -55,6 +61,13 @@ export class APIClient {
55
61
  public cfg_centrifugo_admin_api: CfgCentrifugoAdminApi;
56
62
  public cfg_centrifugo_monitoring: CfgCentrifugoMonitoring;
57
63
  public cfg_centrifugo_testing: CfgCentrifugoTesting;
64
+ public cfg_dashboard_api_zones: CfgDashboardApiZones;
65
+ public cfg_dashboard_activity: CfgDashboardActivity;
66
+ public cfg_dashboard_charts: CfgDashboardCharts;
67
+ public cfg_dashboard_commands: CfgDashboardCommands;
68
+ public cfg_dashboard_overview: CfgDashboardOverview;
69
+ public cfg_dashboard_statistics: CfgDashboardStatistics;
70
+ public cfg_dashboard_system: CfgDashboardSystem;
58
71
  public cfg_lead_submission: CfgLeadSubmission;
59
72
  public cfg_logs: CfgLogs;
60
73
  public cfg_newsletters: CfgNewsletters;
@@ -63,7 +76,6 @@ export class APIClient {
63
76
  public cfg_user_profile: CfgUserProfile;
64
77
  public cfg_accounts: CfgAccounts;
65
78
  public cfg_centrifugo: CfgCentrifugo;
66
- public cfg_dashboard: CfgDashboard;
67
79
  public cfg_endpoints: CfgEndpoints;
68
80
  public cfg_health: CfgHealth;
69
81
  public cfg_knowbase: CfgKnowbase;
@@ -101,6 +113,13 @@ export class APIClient {
101
113
  this.cfg_centrifugo_admin_api = new CfgCentrifugoAdminApi(this);
102
114
  this.cfg_centrifugo_monitoring = new CfgCentrifugoMonitoring(this);
103
115
  this.cfg_centrifugo_testing = new CfgCentrifugoTesting(this);
116
+ this.cfg_dashboard_api_zones = new CfgDashboardApiZones(this);
117
+ this.cfg_dashboard_activity = new CfgDashboardActivity(this);
118
+ this.cfg_dashboard_charts = new CfgDashboardCharts(this);
119
+ this.cfg_dashboard_commands = new CfgDashboardCommands(this);
120
+ this.cfg_dashboard_overview = new CfgDashboardOverview(this);
121
+ this.cfg_dashboard_statistics = new CfgDashboardStatistics(this);
122
+ this.cfg_dashboard_system = new CfgDashboardSystem(this);
104
123
  this.cfg_lead_submission = new CfgLeadSubmission(this);
105
124
  this.cfg_logs = new CfgLogs(this);
106
125
  this.cfg_newsletters = new CfgNewsletters(this);
@@ -109,7 +128,6 @@ export class APIClient {
109
128
  this.cfg_user_profile = new CfgUserProfile(this);
110
129
  this.cfg_accounts = new CfgAccounts(this);
111
130
  this.cfg_centrifugo = new CfgCentrifugo(this);
112
- this.cfg_dashboard = new CfgDashboard(this);
113
131
  this.cfg_endpoints = new CfgEndpoints(this);
114
132
  this.cfg_health = new CfgHealth(this);
115
133
  this.cfg_knowbase = new CfgKnowbase(this);
@@ -185,7 +203,9 @@ export class APIClient {
185
203
  headers?: Record<string, string>;
186
204
  }
187
205
  ): Promise<T> {
188
- const url = new URL(path, this.baseUrl);
206
+ // Build URL - handle both absolute and relative paths
207
+ // When baseUrl is empty (static builds), path is used as-is (relative to current origin)
208
+ const url = this.baseUrl ? `${this.baseUrl}${path}` : path;
189
209
  const startTime = Date.now();
190
210
 
191
211
  // Build headers - start with custom headers from options
@@ -205,7 +225,7 @@ export class APIClient {
205
225
  if (this.logger) {
206
226
  this.logger.logRequest({
207
227
  method,
208
- url: url.toString(),
228
+ url: url,
209
229
  headers,
210
230
  body: options?.formData || options?.body,
211
231
  timestamp: startTime,
@@ -216,7 +236,7 @@ export class APIClient {
216
236
  // Make request via HTTP adapter
217
237
  const response = await this.httpClient.request<T>({
218
238
  method,
219
- url: url.toString(),
239
+ url: url,
220
240
  headers,
221
241
  params: options?.params,
222
242
  body: options?.body,
@@ -231,7 +251,7 @@ export class APIClient {
231
251
  response.status,
232
252
  response.statusText,
233
253
  response.data,
234
- url.toString()
254
+ url
235
255
  );
236
256
 
237
257
  // Log error
@@ -239,7 +259,7 @@ export class APIClient {
239
259
  this.logger.logError(
240
260
  {
241
261
  method,
242
- url: url.toString(),
262
+ url: url,
243
263
  headers,
244
264
  body: options?.formData || options?.body,
245
265
  timestamp: startTime,
@@ -261,7 +281,7 @@ export class APIClient {
261
281
  this.logger.logResponse(
262
282
  {
263
283
  method,
264
- url: url.toString(),
284
+ url: url,
265
285
  headers,
266
286
  body: options?.formData || options?.body,
267
287
  timestamp: startTime,
@@ -287,15 +307,15 @@ export class APIClient {
287
307
 
288
308
  // Wrap other errors as NetworkError
289
309
  const networkError = error instanceof Error
290
- ? new NetworkError(error.message, url.toString(), error)
291
- : new NetworkError('Unknown error', url.toString());
310
+ ? new NetworkError(error.message, url, error)
311
+ : new NetworkError('Unknown error', url);
292
312
 
293
313
  // Log network error
294
314
  if (this.logger) {
295
315
  this.logger.logError(
296
316
  {
297
317
  method,
298
- url: url.toString(),
318
+ url: url,
299
319
  headers,
300
320
  body: options?.formData || options?.body,
301
321
  timestamp: startTime,
@@ -39,13 +39,18 @@ export class FetchAdapter implements HttpClientAdapter {
39
39
  const { method, url, headers, body, params, formData } = request;
40
40
 
41
41
  // Build URL with query params
42
- const finalUrl = new URL(url);
42
+ let finalUrl = url;
43
43
  if (params) {
44
+ const searchParams = new URLSearchParams();
44
45
  Object.entries(params).forEach(([key, value]) => {
45
46
  if (value !== null && value !== undefined) {
46
- finalUrl.searchParams.append(key, String(value));
47
+ searchParams.append(key, String(value));
47
48
  }
48
49
  });
50
+ const queryString = searchParams.toString();
51
+ if (queryString) {
52
+ finalUrl = url.includes('?') ? `${url}&${queryString}` : `${url}?${queryString}`;
53
+ }
49
54
  }
50
55
 
51
56
  // Build headers
@@ -65,7 +70,7 @@ export class FetchAdapter implements HttpClientAdapter {
65
70
  }
66
71
 
67
72
  // Make request
68
- const response = await fetch(finalUrl.toString(), {
73
+ const response = await fetch(finalUrl, {
69
74
  method,
70
75
  headers: finalHeaders,
71
76
  body: requestBody,