@djangocfg/api 1.2.4 → 1.2.6

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 (125) hide show
  1. package/dist/index.cjs +7562 -3753
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +8096 -3976
  4. package/dist/index.d.ts +8096 -3976
  5. package/dist/index.mjs +7581 -3799
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/contexts/TasksContext.tsx +242 -0
  9. package/src/cfg/contexts/index.ts +3 -0
  10. package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -2
  11. package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -1
  12. package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -6
  13. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +62 -0
  14. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +211 -0
  15. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +150 -0
  16. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +152 -0
  17. package/src/cfg/generated/_utils/fetchers/cfg__dashboard.ts +150 -0
  18. package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +30 -1
  19. package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -2
  20. package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +57 -57
  21. package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -6
  22. package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -1
  23. package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -3
  24. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -1
  25. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -6
  26. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -1
  27. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -2
  28. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -3
  29. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -1
  30. package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +8 -8
  31. package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -12
  32. package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -10
  33. package/src/cfg/generated/_utils/fetchers/index.ts +5 -2
  34. package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +49 -0
  35. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +246 -0
  36. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +137 -0
  37. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +171 -0
  38. package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +137 -0
  39. package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +29 -0
  40. package/src/cfg/generated/_utils/hooks/index.ts +5 -2
  41. package/src/cfg/generated/_utils/schemas/ActivityEntry.schema.ts +25 -0
  42. package/src/cfg/generated/_utils/schemas/AppStatistics.schema.ts +20 -0
  43. package/src/cfg/generated/_utils/schemas/CentrifugoChannelInfo.schema.ts +19 -0
  44. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +19 -0
  45. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResponse.schema.ts +22 -0
  46. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResult.schema.ts +19 -0
  47. package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +22 -0
  48. package/src/cfg/generated/_utils/schemas/CentrifugoError.schema.ts +20 -0
  49. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +23 -0
  50. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResponse.schema.ts +22 -0
  51. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResult.schema.ts +22 -0
  52. package/src/cfg/generated/_utils/schemas/CentrifugoInfoResponse.schema.ts +22 -0
  53. package/src/cfg/generated/_utils/schemas/CentrifugoInfoResult.schema.ts +20 -0
  54. package/src/cfg/generated/_utils/schemas/CentrifugoMetrics.schema.ts +20 -0
  55. package/src/cfg/generated/_utils/schemas/CentrifugoNodeInfo.schema.ts +30 -0
  56. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +19 -0
  57. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResponse.schema.ts +22 -0
  58. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResult.schema.ts +19 -0
  59. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +19 -0
  60. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +22 -0
  61. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +20 -0
  62. package/src/cfg/generated/_utils/schemas/CentrifugoProcess.schema.ts +20 -0
  63. package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +23 -0
  64. package/src/cfg/generated/_utils/schemas/CentrifugoStreamPosition.schema.ts +20 -0
  65. package/src/cfg/generated/_utils/schemas/ChannelList.schema.ts +21 -0
  66. package/src/cfg/generated/_utils/schemas/ChannelStatsSerializer.schema.ts +25 -0
  67. package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +20 -0
  68. package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +21 -0
  69. package/src/cfg/generated/_utils/schemas/DashboardOverview.schema.ts +27 -0
  70. package/src/cfg/generated/_utils/schemas/HealthCheck.schema.ts +5 -7
  71. package/src/cfg/generated/_utils/schemas/ManualAckRequestRequest.schema.ts +20 -0
  72. package/src/cfg/generated/_utils/schemas/ManualAckResponse.schema.ts +21 -0
  73. package/src/cfg/generated/_utils/schemas/OverviewStats.schema.ts +9 -12
  74. package/src/cfg/generated/_utils/schemas/PublishTestRequestRequest.schema.ts +22 -0
  75. package/src/cfg/generated/_utils/schemas/PublishTestResponse.schema.ts +24 -0
  76. package/src/cfg/generated/_utils/schemas/QuickAction.schema.ts +29 -0
  77. package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +23 -0
  78. package/src/cfg/generated/_utils/schemas/StatCard.schema.ts +30 -0
  79. package/src/cfg/generated/_utils/schemas/SystemHealth.schema.ts +24 -0
  80. package/src/cfg/generated/_utils/schemas/SystemHealthItem.schema.ts +28 -0
  81. package/src/cfg/generated/_utils/schemas/SystemMetrics.schema.ts +25 -0
  82. package/src/cfg/generated/_utils/schemas/URLPattern.schema.ts +26 -0
  83. package/src/cfg/generated/_utils/schemas/URLsList.schema.ts +25 -0
  84. package/src/cfg/generated/_utils/schemas/UserStatistics.schema.ts +22 -0
  85. package/src/cfg/generated/_utils/schemas/index.ts +42 -10
  86. package/src/cfg/generated/cfg__centrifugo/client.ts +30 -0
  87. package/src/cfg/generated/cfg__centrifugo/models.ts +0 -0
  88. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/client.ts +136 -0
  89. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +256 -0
  90. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +160 -0
  91. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/index.ts +2 -0
  92. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +92 -0
  93. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +100 -0
  94. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/index.ts +2 -0
  95. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +88 -0
  96. package/src/cfg/generated/cfg__dashboard/client.ts +106 -0
  97. package/src/cfg/generated/cfg__dashboard/index.ts +2 -0
  98. package/src/cfg/generated/cfg__dashboard/models.ts +108 -0
  99. package/src/cfg/generated/cfg__endpoints/client.ts +16 -0
  100. package/src/cfg/generated/cfg__endpoints/models.ts +44 -0
  101. package/src/cfg/generated/cfg__health/models.ts +7 -11
  102. package/src/cfg/generated/client.ts +15 -6
  103. package/src/cfg/generated/enums.ts +56 -0
  104. package/src/cfg/generated/index.ts +32 -20
  105. package/src/cfg/generated/schema.ts +4840 -2127
  106. package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_monitoring.ts +0 -179
  107. package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_testing.ts +0 -151
  108. package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_monitoring.ts +0 -166
  109. package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_testing.ts +0 -162
  110. package/src/cfg/generated/_utils/schemas/LoadTestRequestRequest.schema.ts +0 -22
  111. package/src/cfg/generated/_utils/schemas/LoadTestResponse.schema.ts +0 -21
  112. package/src/cfg/generated/_utils/schemas/LoadTestStatus.schema.ts +0 -27
  113. package/src/cfg/generated/_utils/schemas/MethodStat.schema.ts +0 -25
  114. package/src/cfg/generated/_utils/schemas/MethodStats.schema.ts +0 -22
  115. package/src/cfg/generated/_utils/schemas/NotificationStats.schema.ts +0 -25
  116. package/src/cfg/generated/_utils/schemas/RPCRequest.schema.ts +0 -25
  117. package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +0 -22
  118. package/src/cfg/generated/_utils/schemas/TestRPCRequestRequest.schema.ts +0 -21
  119. package/src/cfg/generated/_utils/schemas/TestRPCResponse.schema.ts +0 -23
  120. package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/client.ts +0 -136
  121. package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/models.ts +0 -144
  122. package/src/cfg/generated/cfg__ipc__ipcrpc_testing/client.ts +0 -96
  123. package/src/cfg/generated/cfg__ipc__ipcrpc_testing/models.ts +0 -88
  124. /package/src/cfg/generated/{cfg__ipc__ipcrpc_monitoring → cfg__centrifugo}/index.ts +0 -0
  125. /package/src/cfg/generated/{cfg__ipc__ipcrpc_testing → cfg__centrifugo__centrifugo_admin_api}/index.ts +0 -0
@@ -0,0 +1,106 @@
1
+ import * as Models from "./models";
2
+
3
+
4
+ /**
5
+ * API endpoints for Dashboard.
6
+ */
7
+ export class CfgDashboard {
8
+ private client: any;
9
+
10
+ constructor(client: any) {
11
+ this.client = client;
12
+ }
13
+
14
+ /**
15
+ * Get quick actions
16
+ *
17
+ * Retrieve quick action buttons for dashboard
18
+ */
19
+ async apiActivityActionsList(): Promise<any> {
20
+ const response = await this.client.request('GET', "/cfg/dashboard/api/activity/actions/");
21
+ return response;
22
+ }
23
+
24
+ async apiActivityRecentList(limit?: number): Promise<any>;
25
+ async apiActivityRecentList(params?: { limit?: number }): Promise<any>;
26
+
27
+ /**
28
+ * Get recent activity
29
+ *
30
+ * Retrieve recent system activity entries
31
+ */
32
+ async apiActivityRecentList(...args: any[]): Promise<any> {
33
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
34
+
35
+ let params;
36
+ if (isParamsObject) {
37
+ params = args[0];
38
+ } else {
39
+ params = { limit: args[0] };
40
+ }
41
+ const response = await this.client.request('GET', "/cfg/dashboard/api/activity/recent/", { params });
42
+ return response;
43
+ }
44
+
45
+ /**
46
+ * Get dashboard overview
47
+ *
48
+ * Retrieve complete dashboard data including stats, health, actions, and
49
+ * metrics
50
+ */
51
+ async apiOverviewOverviewRetrieve(): Promise<Models.DashboardOverview> {
52
+ const response = await this.client.request('GET', "/cfg/dashboard/api/overview/overview/");
53
+ return response;
54
+ }
55
+
56
+ /**
57
+ * Get application statistics
58
+ *
59
+ * Retrieve statistics for all enabled django-cfg applications
60
+ */
61
+ async apiStatisticsAppsList(): Promise<any> {
62
+ const response = await this.client.request('GET', "/cfg/dashboard/api/statistics/apps/");
63
+ return response;
64
+ }
65
+
66
+ /**
67
+ * Get statistics cards
68
+ *
69
+ * Retrieve dashboard statistics cards with key metrics
70
+ */
71
+ async apiStatisticsCardsList(): Promise<any> {
72
+ const response = await this.client.request('GET', "/cfg/dashboard/api/statistics/cards/");
73
+ return response;
74
+ }
75
+
76
+ /**
77
+ * Get user statistics
78
+ *
79
+ * Retrieve user-related statistics
80
+ */
81
+ async apiStatisticsUsersRetrieve(): Promise<Models.UserStatistics> {
82
+ const response = await this.client.request('GET', "/cfg/dashboard/api/statistics/users/");
83
+ return response;
84
+ }
85
+
86
+ /**
87
+ * Get system health status
88
+ *
89
+ * Retrieve overall system health including all component checks
90
+ */
91
+ async apiSystemHealthRetrieve(): Promise<Models.SystemHealth> {
92
+ const response = await this.client.request('GET', "/cfg/dashboard/api/system/health/");
93
+ return response;
94
+ }
95
+
96
+ /**
97
+ * Get system metrics
98
+ *
99
+ * Retrieve system performance metrics (CPU, memory, disk, etc.)
100
+ */
101
+ async apiSystemMetricsRetrieve(): Promise<Models.SystemMetrics> {
102
+ const response = await this.client.request('GET', "/cfg/dashboard/api/system/metrics/");
103
+ return response;
104
+ }
105
+
106
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -0,0 +1,108 @@
1
+ import * as Enums from "../enums";
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
+ /**
43
+ * Serializer for overall system health status.
44
+ *
45
+ * Response model (includes read-only fields).
46
+ */
47
+ export interface SystemHealth {
48
+ /** Overall system health status
49
+
50
+ * `healthy` - healthy
51
+ * `warning` - warning
52
+ * `error` - error
53
+ * `unknown` - unknown */
54
+ overall_status: Enums.SystemHealthOverallStatus;
55
+ /** Overall health percentage */
56
+ overall_health_percentage: number;
57
+ /** Health status of individual components */
58
+ components: Array<SystemHealthItem>;
59
+ /** Check timestamp (ISO format) */
60
+ timestamp: string;
61
+ }
62
+
63
+ /**
64
+ * Serializer for system performance metrics.
65
+ *
66
+ * Response model (includes read-only fields).
67
+ */
68
+ export interface SystemMetrics {
69
+ /** CPU usage percentage */
70
+ cpu_usage: number;
71
+ /** Memory usage percentage */
72
+ memory_usage: number;
73
+ /** Disk usage percentage */
74
+ disk_usage: number;
75
+ /** Network incoming bandwidth */
76
+ network_in: string;
77
+ /** Network outgoing bandwidth */
78
+ network_out: string;
79
+ /** Average response time */
80
+ response_time: string;
81
+ /** System uptime */
82
+ uptime: string;
83
+ }
84
+
85
+ /**
86
+ * Serializer for system health status items. Maps to SystemHealthItem Pydantic
87
+ * model.
88
+ *
89
+ * Response model (includes read-only fields).
90
+ */
91
+ export interface SystemHealthItem {
92
+ /** Component name */
93
+ component: string;
94
+ /** Health status
95
+
96
+ * `healthy` - healthy
97
+ * `warning` - warning
98
+ * `error` - error
99
+ * `unknown` - unknown */
100
+ status: Enums.SystemHealthItemStatus;
101
+ /** Status description */
102
+ description: string;
103
+ /** Last check time (ISO format) */
104
+ last_check: string;
105
+ /** Health percentage (0-100) */
106
+ health_percentage?: number | null;
107
+ }
108
+
@@ -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
+
@@ -1,21 +1,17 @@
1
1
  /**
2
- * Serializer for health check response.
2
+ * Health check response.
3
3
  *
4
4
  * Response model (includes read-only fields).
5
5
  */
6
6
  export interface HealthCheck {
7
- /** Overall health status: healthy, degraded, or unhealthy */
7
+ /** Health status: healthy or unhealthy */
8
8
  status: string;
9
- /** Timestamp of the health check */
9
+ /** Configured wrapper URL */
10
+ wrapper_url: string;
11
+ /** Whether API key is configured */
12
+ has_api_key: boolean;
13
+ /** Current timestamp */
10
14
  timestamp: string;
11
- /** Service name */
12
- service: string;
13
- /** Django-CFG version */
14
- version: string;
15
- /** Detailed health checks for databases, cache, and system */
16
- checks: Record<string, any>;
17
- /** Environment information */
18
- environment: Record<string, any>;
19
15
  }
20
16
 
21
17
  /**
@@ -1,8 +1,9 @@
1
1
  import { CfgAuth } from "./cfg__accounts__auth";
2
2
  import { CfgBulkEmail } from "./cfg__newsletter__bulk_email";
3
3
  import { CfgCampaigns } from "./cfg__newsletter__campaigns";
4
- import { CfgIpcrpcMonitoring } from "./cfg__ipc__ipcrpc_monitoring";
5
- import { CfgIpcrpcTesting } from "./cfg__ipc__ipcrpc_testing";
4
+ import { CfgCentrifugoAdminApi } from "./cfg__centrifugo__centrifugo_admin_api";
5
+ import { CfgCentrifugoMonitoring } from "./cfg__centrifugo__centrifugo_monitoring";
6
+ import { CfgCentrifugoTesting } from "./cfg__centrifugo__centrifugo_testing";
6
7
  import { CfgLeadSubmission } from "./cfg__leads__lead_submission";
7
8
  import { CfgLogs } from "./cfg__newsletter__logs";
8
9
  import { CfgNewsletters } from "./cfg__newsletter__newsletters";
@@ -10,6 +11,8 @@ import { CfgSubscriptions } from "./cfg__newsletter__subscriptions";
10
11
  import { CfgTesting } from "./cfg__newsletter__testing";
11
12
  import { CfgUserProfile } from "./cfg__accounts__user_profile";
12
13
  import { CfgAccounts } from "./cfg__accounts";
14
+ import { CfgCentrifugo } from "./cfg__centrifugo";
15
+ import { CfgDashboard } from "./cfg__dashboard";
13
16
  import { CfgEndpoints } from "./cfg__endpoints";
14
17
  import { CfgHealth } from "./cfg__health";
15
18
  import { CfgKnowbase } from "./cfg__knowbase";
@@ -49,8 +52,9 @@ export class APIClient {
49
52
  public cfg_auth: CfgAuth;
50
53
  public cfg_bulk_email: CfgBulkEmail;
51
54
  public cfg_campaigns: CfgCampaigns;
52
- public cfg_ipcrpc_monitoring: CfgIpcrpcMonitoring;
53
- public cfg_ipcrpc_testing: CfgIpcrpcTesting;
55
+ public cfg_centrifugo_admin_api: CfgCentrifugoAdminApi;
56
+ public cfg_centrifugo_monitoring: CfgCentrifugoMonitoring;
57
+ public cfg_centrifugo_testing: CfgCentrifugoTesting;
54
58
  public cfg_lead_submission: CfgLeadSubmission;
55
59
  public cfg_logs: CfgLogs;
56
60
  public cfg_newsletters: CfgNewsletters;
@@ -58,6 +62,8 @@ export class APIClient {
58
62
  public cfg_testing: CfgTesting;
59
63
  public cfg_user_profile: CfgUserProfile;
60
64
  public cfg_accounts: CfgAccounts;
65
+ public cfg_centrifugo: CfgCentrifugo;
66
+ public cfg_dashboard: CfgDashboard;
61
67
  public cfg_endpoints: CfgEndpoints;
62
68
  public cfg_health: CfgHealth;
63
69
  public cfg_knowbase: CfgKnowbase;
@@ -92,8 +98,9 @@ export class APIClient {
92
98
  this.cfg_auth = new CfgAuth(this);
93
99
  this.cfg_bulk_email = new CfgBulkEmail(this);
94
100
  this.cfg_campaigns = new CfgCampaigns(this);
95
- this.cfg_ipcrpc_monitoring = new CfgIpcrpcMonitoring(this);
96
- this.cfg_ipcrpc_testing = new CfgIpcrpcTesting(this);
101
+ this.cfg_centrifugo_admin_api = new CfgCentrifugoAdminApi(this);
102
+ this.cfg_centrifugo_monitoring = new CfgCentrifugoMonitoring(this);
103
+ this.cfg_centrifugo_testing = new CfgCentrifugoTesting(this);
97
104
  this.cfg_lead_submission = new CfgLeadSubmission(this);
98
105
  this.cfg_logs = new CfgLogs(this);
99
106
  this.cfg_newsletters = new CfgNewsletters(this);
@@ -101,6 +108,8 @@ export class APIClient {
101
108
  this.cfg_testing = new CfgTesting(this);
102
109
  this.cfg_user_profile = new CfgUserProfile(this);
103
110
  this.cfg_accounts = new CfgAccounts(this);
111
+ this.cfg_centrifugo = new CfgCentrifugo(this);
112
+ this.cfg_dashboard = new CfgDashboard(this);
104
113
  this.cfg_endpoints = new CfgEndpoints(this);
105
114
  this.cfg_health = new CfgHealth(this);
106
115
  this.cfg_knowbase = new CfgKnowbase(this);
@@ -419,6 +419,62 @@ export enum QueueActionRequestAction {
419
419
  FLUSH = "flush",
420
420
  }
421
421
 
422
+ /**
423
+ * Button color theme
424
+ * * `primary` - primary
425
+ * * `success` - success
426
+ * * `warning` - warning
427
+ * * `danger` - danger
428
+ * * `secondary` - secondary
429
+ */
430
+ export enum QuickActionColor {
431
+ PRIMARY = "primary",
432
+ SUCCESS = "success",
433
+ WARNING = "warning",
434
+ DANGER = "danger",
435
+ SECONDARY = "secondary",
436
+ }
437
+
438
+ /**
439
+ * Change type
440
+ * * `positive` - positive
441
+ * * `negative` - negative
442
+ * * `neutral` - neutral
443
+ */
444
+ export enum StatCardChangeType {
445
+ POSITIVE = "positive",
446
+ NEGATIVE = "negative",
447
+ NEUTRAL = "neutral",
448
+ }
449
+
450
+ /**
451
+ * Overall system health status
452
+ * * `healthy` - healthy
453
+ * * `warning` - warning
454
+ * * `error` - error
455
+ * * `unknown` - unknown
456
+ */
457
+ export enum SystemHealthOverallStatus {
458
+ HEALTHY = "healthy",
459
+ WARNING = "warning",
460
+ ERROR = "error",
461
+ UNKNOWN = "unknown",
462
+ }
463
+
464
+ /**
465
+ * Health status
466
+ * * `healthy` - healthy
467
+ * * `warning` - warning
468
+ * * `error` - error
469
+ * * `unknown` - unknown
470
+ */
471
+ export enum SystemHealthItemStatus {
472
+ HEALTHY = "healthy",
473
+ WARNING = "warning",
474
+ ERROR = "error",
475
+ UNKNOWN = "unknown",
476
+ }
477
+
422
478
  /**
423
479
  * * `open` - Open
424
480
  * * `waiting_for_user` - Waiting for User
@@ -46,8 +46,9 @@ import { APILogger } from "./logger";
46
46
  import { CfgAuth } from "./cfg__accounts__auth/client";
47
47
  import { CfgBulkEmail } from "./cfg__newsletter__bulk_email/client";
48
48
  import { CfgCampaigns } from "./cfg__newsletter__campaigns/client";
49
- import { CfgIpcrpcMonitoring } from "./cfg__ipc__ipcrpc_monitoring/client";
50
- import { CfgIpcrpcTesting } from "./cfg__ipc__ipcrpc_testing/client";
49
+ import { CfgCentrifugoAdminApi } from "./cfg__centrifugo__centrifugo_admin_api/client";
50
+ import { CfgCentrifugoMonitoring } from "./cfg__centrifugo__centrifugo_monitoring/client";
51
+ import { CfgCentrifugoTesting } from "./cfg__centrifugo__centrifugo_testing/client";
51
52
  import { CfgLeadSubmission } from "./cfg__leads__lead_submission/client";
52
53
  import { CfgLogs } from "./cfg__newsletter__logs/client";
53
54
  import { CfgNewsletters } from "./cfg__newsletter__newsletters/client";
@@ -55,6 +56,8 @@ import { CfgSubscriptions } from "./cfg__newsletter__subscriptions/client";
55
56
  import { CfgTesting } from "./cfg__newsletter__testing/client";
56
57
  import { CfgUserProfile } from "./cfg__accounts__user_profile/client";
57
58
  import { CfgAccounts } from "./cfg__accounts/client";
59
+ import { CfgCentrifugo } from "./cfg__centrifugo/client";
60
+ import { CfgDashboard } from "./cfg__dashboard/client";
58
61
  import { CfgEndpoints } from "./cfg__endpoints/client";
59
62
  import { CfgHealth } from "./cfg__health/client";
60
63
  import { CfgKnowbase } from "./cfg__knowbase/client";
@@ -66,8 +69,9 @@ import { CfgTasks } from "./cfg__tasks/client";
66
69
  export * as CfgAuthTypes from "./cfg__accounts__auth/models";
67
70
  export * as CfgBulkEmailTypes from "./cfg__newsletter__bulk_email/models";
68
71
  export * as CfgCampaignsTypes from "./cfg__newsletter__campaigns/models";
69
- export * as CfgIpcrpcMonitoringTypes from "./cfg__ipc__ipcrpc_monitoring/models";
70
- export * as CfgIpcrpcTestingTypes from "./cfg__ipc__ipcrpc_testing/models";
72
+ export * as CfgCentrifugoAdminApiTypes from "./cfg__centrifugo__centrifugo_admin_api/models";
73
+ export * as CfgCentrifugoMonitoringTypes from "./cfg__centrifugo__centrifugo_monitoring/models";
74
+ export * as CfgCentrifugoTestingTypes from "./cfg__centrifugo__centrifugo_testing/models";
71
75
  export * as CfgLeadSubmissionTypes from "./cfg__leads__lead_submission/models";
72
76
  export * as CfgLogsTypes from "./cfg__newsletter__logs/models";
73
77
  export * as CfgNewslettersTypes from "./cfg__newsletter__newsletters/models";
@@ -75,6 +79,8 @@ export * as CfgSubscriptionsTypes from "./cfg__newsletter__subscriptions/models"
75
79
  export * as CfgTestingTypes from "./cfg__newsletter__testing/models";
76
80
  export * as CfgUserProfileTypes from "./cfg__accounts__user_profile/models";
77
81
  export * as CfgAccountsTypes from "./cfg__accounts/models";
82
+ export * as CfgCentrifugoTypes from "./cfg__centrifugo/models";
83
+ export * as CfgDashboardTypes from "./cfg__dashboard/models";
78
84
  export * as CfgEndpointsTypes from "./cfg__endpoints/models";
79
85
  export * as CfgHealthTypes from "./cfg__health/models";
80
86
  export * as CfgKnowbaseTypes from "./cfg__knowbase/models";
@@ -154,8 +160,9 @@ export class API {
154
160
  public cfg_auth!: CfgAuth;
155
161
  public cfg_bulk_email!: CfgBulkEmail;
156
162
  public cfg_campaigns!: CfgCampaigns;
157
- public cfg_ipcrpc_monitoring!: CfgIpcrpcMonitoring;
158
- public cfg_ipcrpc_testing!: CfgIpcrpcTesting;
163
+ public cfg_centrifugo_admin_api!: CfgCentrifugoAdminApi;
164
+ public cfg_centrifugo_monitoring!: CfgCentrifugoMonitoring;
165
+ public cfg_centrifugo_testing!: CfgCentrifugoTesting;
159
166
  public cfg_lead_submission!: CfgLeadSubmission;
160
167
  public cfg_logs!: CfgLogs;
161
168
  public cfg_newsletters!: CfgNewsletters;
@@ -163,6 +170,8 @@ export class API {
163
170
  public cfg_testing!: CfgTesting;
164
171
  public cfg_user_profile!: CfgUserProfile;
165
172
  public cfg_accounts!: CfgAccounts;
173
+ public cfg_centrifugo!: CfgCentrifugo;
174
+ public cfg_dashboard!: CfgDashboard;
166
175
  public cfg_endpoints!: CfgEndpoints;
167
176
  public cfg_health!: CfgHealth;
168
177
  public cfg_knowbase!: CfgKnowbase;
@@ -190,17 +199,16 @@ export class API {
190
199
  loggerConfig: this.options?.loggerConfig,
191
200
  });
192
201
 
193
- // Inject Authorization header if token exists
194
- if (this._token) {
195
- this._injectAuthHeader();
196
- }
202
+ // Always inject auth header wrapper (reads token dynamically from storage)
203
+ this._injectAuthHeader();
197
204
 
198
205
  // Initialize sub-clients from APIClient
199
206
  this.cfg_auth = this._client.cfg_auth;
200
207
  this.cfg_bulk_email = this._client.cfg_bulk_email;
201
208
  this.cfg_campaigns = this._client.cfg_campaigns;
202
- this.cfg_ipcrpc_monitoring = this._client.cfg_ipcrpc_monitoring;
203
- this.cfg_ipcrpc_testing = this._client.cfg_ipcrpc_testing;
209
+ this.cfg_centrifugo_admin_api = this._client.cfg_centrifugo_admin_api;
210
+ this.cfg_centrifugo_monitoring = this._client.cfg_centrifugo_monitoring;
211
+ this.cfg_centrifugo_testing = this._client.cfg_centrifugo_testing;
204
212
  this.cfg_lead_submission = this._client.cfg_lead_submission;
205
213
  this.cfg_logs = this._client.cfg_logs;
206
214
  this.cfg_newsletters = this._client.cfg_newsletters;
@@ -208,6 +216,8 @@ export class API {
208
216
  this.cfg_testing = this._client.cfg_testing;
209
217
  this.cfg_user_profile = this._client.cfg_user_profile;
210
218
  this.cfg_accounts = this._client.cfg_accounts;
219
+ this.cfg_centrifugo = this._client.cfg_centrifugo;
220
+ this.cfg_dashboard = this._client.cfg_dashboard;
211
221
  this.cfg_endpoints = this._client.cfg_endpoints;
212
222
  this.cfg_health = this._client.cfg_health;
213
223
  this.cfg_knowbase = this._client.cfg_knowbase;
@@ -229,17 +239,16 @@ export class API {
229
239
  loggerConfig: this.options?.loggerConfig,
230
240
  });
231
241
 
232
- // Inject Authorization header if token exists
233
- if (this._token) {
234
- this._injectAuthHeader();
235
- }
242
+ // Always inject auth header wrapper (reads token dynamically from storage)
243
+ this._injectAuthHeader();
236
244
 
237
245
  // Reinitialize sub-clients
238
246
  this.cfg_auth = this._client.cfg_auth;
239
247
  this.cfg_bulk_email = this._client.cfg_bulk_email;
240
248
  this.cfg_campaigns = this._client.cfg_campaigns;
241
- this.cfg_ipcrpc_monitoring = this._client.cfg_ipcrpc_monitoring;
242
- this.cfg_ipcrpc_testing = this._client.cfg_ipcrpc_testing;
249
+ this.cfg_centrifugo_admin_api = this._client.cfg_centrifugo_admin_api;
250
+ this.cfg_centrifugo_monitoring = this._client.cfg_centrifugo_monitoring;
251
+ this.cfg_centrifugo_testing = this._client.cfg_centrifugo_testing;
243
252
  this.cfg_lead_submission = this._client.cfg_lead_submission;
244
253
  this.cfg_logs = this._client.cfg_logs;
245
254
  this.cfg_newsletters = this._client.cfg_newsletters;
@@ -247,6 +256,8 @@ export class API {
247
256
  this.cfg_testing = this._client.cfg_testing;
248
257
  this.cfg_user_profile = this._client.cfg_user_profile;
249
258
  this.cfg_accounts = this._client.cfg_accounts;
259
+ this.cfg_centrifugo = this._client.cfg_centrifugo;
260
+ this.cfg_dashboard = this._client.cfg_dashboard;
250
261
  this.cfg_endpoints = this._client.cfg_endpoints;
251
262
  this.cfg_health = this._client.cfg_health;
252
263
  this.cfg_knowbase = this._client.cfg_knowbase;
@@ -265,12 +276,13 @@ export class API {
265
276
  path: string,
266
277
  options?: { params?: Record<string, any>; body?: any; formData?: FormData; headers?: Record<string, string> }
267
278
  ): Promise<T> => {
268
- // Merge Authorization header with existing headers
279
+ // Read token from storage dynamically (supports JWT injection after instantiation)
280
+ const token = this.getToken();
269
281
  const mergedOptions = {
270
282
  ...options,
271
283
  headers: {
272
284
  ...(options?.headers || {}),
273
- ...(this._token ? { 'Authorization': `Bearer ${this._token}` } : {}),
285
+ ...(token ? { 'Authorization': `Bearer ${token}` } : {}),
274
286
  },
275
287
  };
276
288