@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
|
@@ -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";
|
|
@@ -11,6 +18,7 @@ import { CfgSubscriptions } from "./cfg__newsletter__subscriptions";
|
|
|
11
18
|
import { CfgTesting } from "./cfg__newsletter__testing";
|
|
12
19
|
import { CfgUserProfile } from "./cfg__accounts__user_profile";
|
|
13
20
|
import { CfgAccounts } from "./cfg__accounts";
|
|
21
|
+
import { CfgCentrifugo } from "./cfg__centrifugo";
|
|
14
22
|
import { CfgEndpoints } from "./cfg__endpoints";
|
|
15
23
|
import { CfgHealth } from "./cfg__health";
|
|
16
24
|
import { CfgKnowbase } from "./cfg__knowbase";
|
|
@@ -53,6 +61,13 @@ export class APIClient {
|
|
|
53
61
|
public cfg_centrifugo_admin_api: CfgCentrifugoAdminApi;
|
|
54
62
|
public cfg_centrifugo_monitoring: CfgCentrifugoMonitoring;
|
|
55
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;
|
|
56
71
|
public cfg_lead_submission: CfgLeadSubmission;
|
|
57
72
|
public cfg_logs: CfgLogs;
|
|
58
73
|
public cfg_newsletters: CfgNewsletters;
|
|
@@ -60,6 +75,7 @@ export class APIClient {
|
|
|
60
75
|
public cfg_testing: CfgTesting;
|
|
61
76
|
public cfg_user_profile: CfgUserProfile;
|
|
62
77
|
public cfg_accounts: CfgAccounts;
|
|
78
|
+
public cfg_centrifugo: CfgCentrifugo;
|
|
63
79
|
public cfg_endpoints: CfgEndpoints;
|
|
64
80
|
public cfg_health: CfgHealth;
|
|
65
81
|
public cfg_knowbase: CfgKnowbase;
|
|
@@ -97,6 +113,13 @@ export class APIClient {
|
|
|
97
113
|
this.cfg_centrifugo_admin_api = new CfgCentrifugoAdminApi(this);
|
|
98
114
|
this.cfg_centrifugo_monitoring = new CfgCentrifugoMonitoring(this);
|
|
99
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);
|
|
100
123
|
this.cfg_lead_submission = new CfgLeadSubmission(this);
|
|
101
124
|
this.cfg_logs = new CfgLogs(this);
|
|
102
125
|
this.cfg_newsletters = new CfgNewsletters(this);
|
|
@@ -104,6 +127,7 @@ export class APIClient {
|
|
|
104
127
|
this.cfg_testing = new CfgTesting(this);
|
|
105
128
|
this.cfg_user_profile = new CfgUserProfile(this);
|
|
106
129
|
this.cfg_accounts = new CfgAccounts(this);
|
|
130
|
+
this.cfg_centrifugo = new CfgCentrifugo(this);
|
|
107
131
|
this.cfg_endpoints = new CfgEndpoints(this);
|
|
108
132
|
this.cfg_health = new CfgHealth(this);
|
|
109
133
|
this.cfg_knowbase = new CfgKnowbase(this);
|
|
@@ -179,7 +203,9 @@ export class APIClient {
|
|
|
179
203
|
headers?: Record<string, string>;
|
|
180
204
|
}
|
|
181
205
|
): Promise<T> {
|
|
182
|
-
|
|
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;
|
|
183
209
|
const startTime = Date.now();
|
|
184
210
|
|
|
185
211
|
// Build headers - start with custom headers from options
|
|
@@ -199,7 +225,7 @@ export class APIClient {
|
|
|
199
225
|
if (this.logger) {
|
|
200
226
|
this.logger.logRequest({
|
|
201
227
|
method,
|
|
202
|
-
url: url
|
|
228
|
+
url: url,
|
|
203
229
|
headers,
|
|
204
230
|
body: options?.formData || options?.body,
|
|
205
231
|
timestamp: startTime,
|
|
@@ -210,7 +236,7 @@ export class APIClient {
|
|
|
210
236
|
// Make request via HTTP adapter
|
|
211
237
|
const response = await this.httpClient.request<T>({
|
|
212
238
|
method,
|
|
213
|
-
url: url
|
|
239
|
+
url: url,
|
|
214
240
|
headers,
|
|
215
241
|
params: options?.params,
|
|
216
242
|
body: options?.body,
|
|
@@ -225,7 +251,7 @@ export class APIClient {
|
|
|
225
251
|
response.status,
|
|
226
252
|
response.statusText,
|
|
227
253
|
response.data,
|
|
228
|
-
url
|
|
254
|
+
url
|
|
229
255
|
);
|
|
230
256
|
|
|
231
257
|
// Log error
|
|
@@ -233,7 +259,7 @@ export class APIClient {
|
|
|
233
259
|
this.logger.logError(
|
|
234
260
|
{
|
|
235
261
|
method,
|
|
236
|
-
url: url
|
|
262
|
+
url: url,
|
|
237
263
|
headers,
|
|
238
264
|
body: options?.formData || options?.body,
|
|
239
265
|
timestamp: startTime,
|
|
@@ -255,7 +281,7 @@ export class APIClient {
|
|
|
255
281
|
this.logger.logResponse(
|
|
256
282
|
{
|
|
257
283
|
method,
|
|
258
|
-
url: url
|
|
284
|
+
url: url,
|
|
259
285
|
headers,
|
|
260
286
|
body: options?.formData || options?.body,
|
|
261
287
|
timestamp: startTime,
|
|
@@ -281,15 +307,15 @@ export class APIClient {
|
|
|
281
307
|
|
|
282
308
|
// Wrap other errors as NetworkError
|
|
283
309
|
const networkError = error instanceof Error
|
|
284
|
-
? new NetworkError(error.message, url
|
|
285
|
-
: new NetworkError('Unknown error', url
|
|
310
|
+
? new NetworkError(error.message, url, error)
|
|
311
|
+
: new NetworkError('Unknown error', url);
|
|
286
312
|
|
|
287
313
|
// Log network error
|
|
288
314
|
if (this.logger) {
|
|
289
315
|
this.logger.logError(
|
|
290
316
|
{
|
|
291
317
|
method,
|
|
292
|
-
url: url
|
|
318
|
+
url: url,
|
|
293
319
|
headers,
|
|
294
320
|
body: options?.formData || options?.body,
|
|
295
321
|
timestamp: startTime,
|
|
@@ -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
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
73
|
+
const response = await fetch(finalUrl, {
|
|
69
74
|
method,
|
|
70
75
|
headers: finalHeaders,
|
|
71
76
|
body: requestBody,
|
|
@@ -49,6 +49,13 @@ import { CfgCampaigns } from "./cfg__newsletter__campaigns/client";
|
|
|
49
49
|
import { CfgCentrifugoAdminApi } from "./cfg__centrifugo__centrifugo_admin_api/client";
|
|
50
50
|
import { CfgCentrifugoMonitoring } from "./cfg__centrifugo__centrifugo_monitoring/client";
|
|
51
51
|
import { CfgCentrifugoTesting } from "./cfg__centrifugo__centrifugo_testing/client";
|
|
52
|
+
import { CfgDashboardApiZones } from "./cfg__dashboard__dashboard_api_zones/client";
|
|
53
|
+
import { CfgDashboardActivity } from "./cfg__dashboard__dashboard_activity/client";
|
|
54
|
+
import { CfgDashboardCharts } from "./cfg__dashboard__dashboard_charts/client";
|
|
55
|
+
import { CfgDashboardCommands } from "./cfg__dashboard__dashboard_commands/client";
|
|
56
|
+
import { CfgDashboardOverview } from "./cfg__dashboard__dashboard_overview/client";
|
|
57
|
+
import { CfgDashboardStatistics } from "./cfg__dashboard__dashboard_statistics/client";
|
|
58
|
+
import { CfgDashboardSystem } from "./cfg__dashboard__dashboard_system/client";
|
|
52
59
|
import { CfgLeadSubmission } from "./cfg__leads__lead_submission/client";
|
|
53
60
|
import { CfgLogs } from "./cfg__newsletter__logs/client";
|
|
54
61
|
import { CfgNewsletters } from "./cfg__newsletter__newsletters/client";
|
|
@@ -56,6 +63,7 @@ import { CfgSubscriptions } from "./cfg__newsletter__subscriptions/client";
|
|
|
56
63
|
import { CfgTesting } from "./cfg__newsletter__testing/client";
|
|
57
64
|
import { CfgUserProfile } from "./cfg__accounts__user_profile/client";
|
|
58
65
|
import { CfgAccounts } from "./cfg__accounts/client";
|
|
66
|
+
import { CfgCentrifugo } from "./cfg__centrifugo/client";
|
|
59
67
|
import { CfgEndpoints } from "./cfg__endpoints/client";
|
|
60
68
|
import { CfgHealth } from "./cfg__health/client";
|
|
61
69
|
import { CfgKnowbase } from "./cfg__knowbase/client";
|
|
@@ -70,6 +78,13 @@ export * as CfgCampaignsTypes from "./cfg__newsletter__campaigns/models";
|
|
|
70
78
|
export * as CfgCentrifugoAdminApiTypes from "./cfg__centrifugo__centrifugo_admin_api/models";
|
|
71
79
|
export * as CfgCentrifugoMonitoringTypes from "./cfg__centrifugo__centrifugo_monitoring/models";
|
|
72
80
|
export * as CfgCentrifugoTestingTypes from "./cfg__centrifugo__centrifugo_testing/models";
|
|
81
|
+
export * as CfgDashboardApiZonesTypes from "./cfg__dashboard__dashboard_api_zones/models";
|
|
82
|
+
export * as CfgDashboardActivityTypes from "./cfg__dashboard__dashboard_activity/models";
|
|
83
|
+
export * as CfgDashboardChartsTypes from "./cfg__dashboard__dashboard_charts/models";
|
|
84
|
+
export * as CfgDashboardCommandsTypes from "./cfg__dashboard__dashboard_commands/models";
|
|
85
|
+
export * as CfgDashboardOverviewTypes from "./cfg__dashboard__dashboard_overview/models";
|
|
86
|
+
export * as CfgDashboardStatisticsTypes from "./cfg__dashboard__dashboard_statistics/models";
|
|
87
|
+
export * as CfgDashboardSystemTypes from "./cfg__dashboard__dashboard_system/models";
|
|
73
88
|
export * as CfgLeadSubmissionTypes from "./cfg__leads__lead_submission/models";
|
|
74
89
|
export * as CfgLogsTypes from "./cfg__newsletter__logs/models";
|
|
75
90
|
export * as CfgNewslettersTypes from "./cfg__newsletter__newsletters/models";
|
|
@@ -77,6 +92,7 @@ export * as CfgSubscriptionsTypes from "./cfg__newsletter__subscriptions/models"
|
|
|
77
92
|
export * as CfgTestingTypes from "./cfg__newsletter__testing/models";
|
|
78
93
|
export * as CfgUserProfileTypes from "./cfg__accounts__user_profile/models";
|
|
79
94
|
export * as CfgAccountsTypes from "./cfg__accounts/models";
|
|
95
|
+
export * as CfgCentrifugoTypes from "./cfg__centrifugo/models";
|
|
80
96
|
export * as CfgEndpointsTypes from "./cfg__endpoints/models";
|
|
81
97
|
export * as CfgHealthTypes from "./cfg__health/models";
|
|
82
98
|
export * as CfgKnowbaseTypes from "./cfg__knowbase/models";
|
|
@@ -159,6 +175,13 @@ export class API {
|
|
|
159
175
|
public cfg_centrifugo_admin_api!: CfgCentrifugoAdminApi;
|
|
160
176
|
public cfg_centrifugo_monitoring!: CfgCentrifugoMonitoring;
|
|
161
177
|
public cfg_centrifugo_testing!: CfgCentrifugoTesting;
|
|
178
|
+
public cfg_dashboard_api_zones!: CfgDashboardApiZones;
|
|
179
|
+
public cfg_dashboard_activity!: CfgDashboardActivity;
|
|
180
|
+
public cfg_dashboard_charts!: CfgDashboardCharts;
|
|
181
|
+
public cfg_dashboard_commands!: CfgDashboardCommands;
|
|
182
|
+
public cfg_dashboard_overview!: CfgDashboardOverview;
|
|
183
|
+
public cfg_dashboard_statistics!: CfgDashboardStatistics;
|
|
184
|
+
public cfg_dashboard_system!: CfgDashboardSystem;
|
|
162
185
|
public cfg_lead_submission!: CfgLeadSubmission;
|
|
163
186
|
public cfg_logs!: CfgLogs;
|
|
164
187
|
public cfg_newsletters!: CfgNewsletters;
|
|
@@ -166,6 +189,7 @@ export class API {
|
|
|
166
189
|
public cfg_testing!: CfgTesting;
|
|
167
190
|
public cfg_user_profile!: CfgUserProfile;
|
|
168
191
|
public cfg_accounts!: CfgAccounts;
|
|
192
|
+
public cfg_centrifugo!: CfgCentrifugo;
|
|
169
193
|
public cfg_endpoints!: CfgEndpoints;
|
|
170
194
|
public cfg_health!: CfgHealth;
|
|
171
195
|
public cfg_knowbase!: CfgKnowbase;
|
|
@@ -193,10 +217,8 @@ export class API {
|
|
|
193
217
|
loggerConfig: this.options?.loggerConfig,
|
|
194
218
|
});
|
|
195
219
|
|
|
196
|
-
//
|
|
197
|
-
|
|
198
|
-
this._injectAuthHeader();
|
|
199
|
-
}
|
|
220
|
+
// Always inject auth header wrapper (reads token dynamically from storage)
|
|
221
|
+
this._injectAuthHeader();
|
|
200
222
|
|
|
201
223
|
// Initialize sub-clients from APIClient
|
|
202
224
|
this.cfg_auth = this._client.cfg_auth;
|
|
@@ -205,6 +227,13 @@ export class API {
|
|
|
205
227
|
this.cfg_centrifugo_admin_api = this._client.cfg_centrifugo_admin_api;
|
|
206
228
|
this.cfg_centrifugo_monitoring = this._client.cfg_centrifugo_monitoring;
|
|
207
229
|
this.cfg_centrifugo_testing = this._client.cfg_centrifugo_testing;
|
|
230
|
+
this.cfg_dashboard_api_zones = this._client.cfg_dashboard_api_zones;
|
|
231
|
+
this.cfg_dashboard_activity = this._client.cfg_dashboard_activity;
|
|
232
|
+
this.cfg_dashboard_charts = this._client.cfg_dashboard_charts;
|
|
233
|
+
this.cfg_dashboard_commands = this._client.cfg_dashboard_commands;
|
|
234
|
+
this.cfg_dashboard_overview = this._client.cfg_dashboard_overview;
|
|
235
|
+
this.cfg_dashboard_statistics = this._client.cfg_dashboard_statistics;
|
|
236
|
+
this.cfg_dashboard_system = this._client.cfg_dashboard_system;
|
|
208
237
|
this.cfg_lead_submission = this._client.cfg_lead_submission;
|
|
209
238
|
this.cfg_logs = this._client.cfg_logs;
|
|
210
239
|
this.cfg_newsletters = this._client.cfg_newsletters;
|
|
@@ -212,6 +241,7 @@ export class API {
|
|
|
212
241
|
this.cfg_testing = this._client.cfg_testing;
|
|
213
242
|
this.cfg_user_profile = this._client.cfg_user_profile;
|
|
214
243
|
this.cfg_accounts = this._client.cfg_accounts;
|
|
244
|
+
this.cfg_centrifugo = this._client.cfg_centrifugo;
|
|
215
245
|
this.cfg_endpoints = this._client.cfg_endpoints;
|
|
216
246
|
this.cfg_health = this._client.cfg_health;
|
|
217
247
|
this.cfg_knowbase = this._client.cfg_knowbase;
|
|
@@ -233,10 +263,8 @@ export class API {
|
|
|
233
263
|
loggerConfig: this.options?.loggerConfig,
|
|
234
264
|
});
|
|
235
265
|
|
|
236
|
-
//
|
|
237
|
-
|
|
238
|
-
this._injectAuthHeader();
|
|
239
|
-
}
|
|
266
|
+
// Always inject auth header wrapper (reads token dynamically from storage)
|
|
267
|
+
this._injectAuthHeader();
|
|
240
268
|
|
|
241
269
|
// Reinitialize sub-clients
|
|
242
270
|
this.cfg_auth = this._client.cfg_auth;
|
|
@@ -245,6 +273,13 @@ export class API {
|
|
|
245
273
|
this.cfg_centrifugo_admin_api = this._client.cfg_centrifugo_admin_api;
|
|
246
274
|
this.cfg_centrifugo_monitoring = this._client.cfg_centrifugo_monitoring;
|
|
247
275
|
this.cfg_centrifugo_testing = this._client.cfg_centrifugo_testing;
|
|
276
|
+
this.cfg_dashboard_api_zones = this._client.cfg_dashboard_api_zones;
|
|
277
|
+
this.cfg_dashboard_activity = this._client.cfg_dashboard_activity;
|
|
278
|
+
this.cfg_dashboard_charts = this._client.cfg_dashboard_charts;
|
|
279
|
+
this.cfg_dashboard_commands = this._client.cfg_dashboard_commands;
|
|
280
|
+
this.cfg_dashboard_overview = this._client.cfg_dashboard_overview;
|
|
281
|
+
this.cfg_dashboard_statistics = this._client.cfg_dashboard_statistics;
|
|
282
|
+
this.cfg_dashboard_system = this._client.cfg_dashboard_system;
|
|
248
283
|
this.cfg_lead_submission = this._client.cfg_lead_submission;
|
|
249
284
|
this.cfg_logs = this._client.cfg_logs;
|
|
250
285
|
this.cfg_newsletters = this._client.cfg_newsletters;
|
|
@@ -252,6 +287,7 @@ export class API {
|
|
|
252
287
|
this.cfg_testing = this._client.cfg_testing;
|
|
253
288
|
this.cfg_user_profile = this._client.cfg_user_profile;
|
|
254
289
|
this.cfg_accounts = this._client.cfg_accounts;
|
|
290
|
+
this.cfg_centrifugo = this._client.cfg_centrifugo;
|
|
255
291
|
this.cfg_endpoints = this._client.cfg_endpoints;
|
|
256
292
|
this.cfg_health = this._client.cfg_health;
|
|
257
293
|
this.cfg_knowbase = this._client.cfg_knowbase;
|
|
@@ -270,12 +306,13 @@ export class API {
|
|
|
270
306
|
path: string,
|
|
271
307
|
options?: { params?: Record<string, any>; body?: any; formData?: FormData; headers?: Record<string, string> }
|
|
272
308
|
): Promise<T> => {
|
|
273
|
-
//
|
|
309
|
+
// Read token from storage dynamically (supports JWT injection after instantiation)
|
|
310
|
+
const token = this.getToken();
|
|
274
311
|
const mergedOptions = {
|
|
275
312
|
...options,
|
|
276
313
|
headers: {
|
|
277
314
|
...(options?.headers || {}),
|
|
278
|
-
...(
|
|
315
|
+
...(token ? { 'Authorization': `Bearer ${token}` } : {}),
|
|
279
316
|
},
|
|
280
317
|
};
|
|
281
318
|
|