@djangocfg/api 1.2.24 → 1.2.25
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 +1719 -23297
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +561 -19228
- package/dist/index.d.ts +561 -19228
- package/dist/index.mjs +1614 -23195
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/index.ts +0 -11
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_auth.ts +48 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +0 -16
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +5 -20
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +5 -4
- package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
- package/src/cfg/generated/_utils/hooks/cfg__accounts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__accounts__auth.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_auth.ts +35 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +0 -21
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +5 -21
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +3 -3
- package/src/cfg/generated/_utils/hooks/cfg__health.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__leads__lead_submission.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__bulk_email.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__logs.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__newsletters.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__testing.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +0 -1
- package/src/cfg/generated/_utils/hooks/index.ts +1 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoToken.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +3 -2
- package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/GRPCRegisteredService.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/GRPCServerConfig.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/GRPCServerStatus.schema.ts +34 -0
- package/src/cfg/generated/_utils/schemas/PaginatedRecentRequestList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedServiceSummaryList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ServiceSummary.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/User.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/index.ts +6 -3
- package/src/cfg/generated/cfg__accounts/models.ts +17 -0
- package/src/cfg/generated/cfg__accounts__user_profile/models.ts +17 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/client.ts +26 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/index.ts +2 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/models.ts +16 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +0 -10
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +0 -26
- package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +2 -2
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +4 -25
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +99 -47
- package/src/cfg/generated/cfg__grpc__grpc_services/client.ts +6 -5
- package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +49 -0
- package/src/cfg/generated/client.ts +3 -0
- package/src/cfg/generated/index.ts +17 -8
- package/src/cfg/generated/{schema.ts → schema.json} +19122 -18892
- package/src/index.ts +7 -2
- package/src/types/auth.ts +40 -0
- package/src/types/index.ts +7 -0
- package/src/cfg/contexts/AccountsContext.tsx +0 -205
- package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +0 -20
- package/src/cfg/generated/_utils/schemas/MonitoringServiceStats.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +0 -21
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Response model (includes read-only fields).
|
|
4
|
+
*/
|
|
5
|
+
export interface PaginatedServiceSummaryList {
|
|
6
|
+
/** Total number of items across all pages */
|
|
7
|
+
count: number;
|
|
8
|
+
/** Current page number (1-based) */
|
|
9
|
+
page: number;
|
|
10
|
+
/** Total number of pages */
|
|
11
|
+
pages: number;
|
|
12
|
+
/** Number of items per page */
|
|
13
|
+
page_size: number;
|
|
14
|
+
/** Whether there is a next page */
|
|
15
|
+
has_next: boolean;
|
|
16
|
+
/** Whether there is a previous page */
|
|
17
|
+
has_previous: boolean;
|
|
18
|
+
/** Next page number (null if no next page) */
|
|
19
|
+
next_page?: number | null;
|
|
20
|
+
/** Previous page number (null if no previous page) */
|
|
21
|
+
previous_page?: number | null;
|
|
22
|
+
/** Array of items for current page */
|
|
23
|
+
results: Array<ServiceSummary>;
|
|
24
|
+
}
|
|
25
|
+
|
|
1
26
|
/**
|
|
2
27
|
* Detailed information about a service.
|
|
3
28
|
*
|
|
@@ -39,6 +64,30 @@ export interface ServiceMethods {
|
|
|
39
64
|
total_methods: number;
|
|
40
65
|
}
|
|
41
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Summary information for a single service.
|
|
69
|
+
*
|
|
70
|
+
* Response model (includes read-only fields).
|
|
71
|
+
*/
|
|
72
|
+
export interface ServiceSummary {
|
|
73
|
+
/** Service name (e.g., myapp.UserService) */
|
|
74
|
+
name: string;
|
|
75
|
+
/** Full service name with package */
|
|
76
|
+
full_name: string;
|
|
77
|
+
/** Package name */
|
|
78
|
+
package: string;
|
|
79
|
+
/** Number of methods in service */
|
|
80
|
+
methods_count: number;
|
|
81
|
+
/** Total requests to this service */
|
|
82
|
+
total_requests?: number;
|
|
83
|
+
/** Success rate percentage */
|
|
84
|
+
success_rate?: number;
|
|
85
|
+
/** Average duration in milliseconds */
|
|
86
|
+
avg_duration_ms?: number;
|
|
87
|
+
/** Last activity timestamp */
|
|
88
|
+
last_activity_at?: string | null;
|
|
89
|
+
}
|
|
90
|
+
|
|
42
91
|
/**
|
|
43
92
|
* Information about a service method.
|
|
44
93
|
*
|
|
@@ -2,6 +2,7 @@ import { CfgAuth } from "./cfg__accounts__auth";
|
|
|
2
2
|
import { CfgBulkEmail } from "./cfg__newsletter__bulk_email";
|
|
3
3
|
import { CfgCampaigns } from "./cfg__newsletter__campaigns";
|
|
4
4
|
import { CfgCentrifugoAdminApi } from "./cfg__centrifugo__centrifugo_admin_api";
|
|
5
|
+
import { CfgCentrifugoAuth } from "./cfg__centrifugo__centrifugo_auth";
|
|
5
6
|
import { CfgCentrifugoMonitoring } from "./cfg__centrifugo__centrifugo_monitoring";
|
|
6
7
|
import { CfgCentrifugoTesting } from "./cfg__centrifugo__centrifugo_testing";
|
|
7
8
|
import { CfgDashboardApiZones } from "./cfg__dashboard__dashboard_api_zones";
|
|
@@ -73,6 +74,7 @@ export class APIClient {
|
|
|
73
74
|
public cfg_bulk_email: CfgBulkEmail;
|
|
74
75
|
public cfg_campaigns: CfgCampaigns;
|
|
75
76
|
public cfg_centrifugo_admin_api: CfgCentrifugoAdminApi;
|
|
77
|
+
public cfg_centrifugo_auth: CfgCentrifugoAuth;
|
|
76
78
|
public cfg_centrifugo_monitoring: CfgCentrifugoMonitoring;
|
|
77
79
|
public cfg_centrifugo_testing: CfgCentrifugoTesting;
|
|
78
80
|
public cfg_dashboard_api_zones: CfgDashboardApiZones;
|
|
@@ -139,6 +141,7 @@ export class APIClient {
|
|
|
139
141
|
this.cfg_bulk_email = new CfgBulkEmail(this);
|
|
140
142
|
this.cfg_campaigns = new CfgCampaigns(this);
|
|
141
143
|
this.cfg_centrifugo_admin_api = new CfgCentrifugoAdminApi(this);
|
|
144
|
+
this.cfg_centrifugo_auth = new CfgCentrifugoAuth(this);
|
|
142
145
|
this.cfg_centrifugo_monitoring = new CfgCentrifugoMonitoring(this);
|
|
143
146
|
this.cfg_centrifugo_testing = new CfgCentrifugoTesting(this);
|
|
144
147
|
this.cfg_dashboard_api_zones = new CfgDashboardApiZones(this);
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
import { APIClient } from "./client";
|
|
36
|
-
import { OPENAPI_SCHEMA } from "./schema";
|
|
37
36
|
import {
|
|
38
37
|
StorageAdapter,
|
|
39
38
|
LocalStorageAdapter,
|
|
@@ -47,6 +46,7 @@ import { CfgAuth } from "./cfg__accounts__auth/client";
|
|
|
47
46
|
import { CfgBulkEmail } from "./cfg__newsletter__bulk_email/client";
|
|
48
47
|
import { CfgCampaigns } from "./cfg__newsletter__campaigns/client";
|
|
49
48
|
import { CfgCentrifugoAdminApi } from "./cfg__centrifugo__centrifugo_admin_api/client";
|
|
49
|
+
import { CfgCentrifugoAuth } from "./cfg__centrifugo__centrifugo_auth/client";
|
|
50
50
|
import { CfgCentrifugoMonitoring } from "./cfg__centrifugo__centrifugo_monitoring/client";
|
|
51
51
|
import { CfgCentrifugoTesting } from "./cfg__centrifugo__centrifugo_testing/client";
|
|
52
52
|
import { CfgDashboardApiZones } from "./cfg__dashboard__dashboard_api_zones/client";
|
|
@@ -90,6 +90,7 @@ export * as CfgAuthTypes from "./cfg__accounts__auth/models";
|
|
|
90
90
|
export * as CfgBulkEmailTypes from "./cfg__newsletter__bulk_email/models";
|
|
91
91
|
export * as CfgCampaignsTypes from "./cfg__newsletter__campaigns/models";
|
|
92
92
|
export * as CfgCentrifugoAdminApiTypes from "./cfg__centrifugo__centrifugo_admin_api/models";
|
|
93
|
+
export * as CfgCentrifugoAuthTypes from "./cfg__centrifugo__centrifugo_auth/models";
|
|
93
94
|
export * as CfgCentrifugoMonitoringTypes from "./cfg__centrifugo__centrifugo_monitoring/models";
|
|
94
95
|
export * as CfgCentrifugoTestingTypes from "./cfg__centrifugo__centrifugo_testing/models";
|
|
95
96
|
export * as CfgDashboardApiZonesTypes from "./cfg__dashboard__dashboard_api_zones/models";
|
|
@@ -154,9 +155,6 @@ export * as Hooks from "./_utils/hooks";
|
|
|
154
155
|
// Re-export core client
|
|
155
156
|
export { APIClient };
|
|
156
157
|
|
|
157
|
-
// Re-export OpenAPI schema
|
|
158
|
-
export { OPENAPI_SCHEMA };
|
|
159
|
-
|
|
160
158
|
// Re-export storage adapters for convenience
|
|
161
159
|
export type { StorageAdapter };
|
|
162
160
|
export { LocalStorageAdapter, CookieStorageAdapter, MemoryStorageAdapter };
|
|
@@ -201,6 +199,7 @@ export class API {
|
|
|
201
199
|
public cfg_bulk_email!: CfgBulkEmail;
|
|
202
200
|
public cfg_campaigns!: CfgCampaigns;
|
|
203
201
|
public cfg_centrifugo_admin_api!: CfgCentrifugoAdminApi;
|
|
202
|
+
public cfg_centrifugo_auth!: CfgCentrifugoAuth;
|
|
204
203
|
public cfg_centrifugo_monitoring!: CfgCentrifugoMonitoring;
|
|
205
204
|
public cfg_centrifugo_testing!: CfgCentrifugoTesting;
|
|
206
205
|
public cfg_dashboard_api_zones!: CfgDashboardApiZones;
|
|
@@ -267,6 +266,7 @@ export class API {
|
|
|
267
266
|
this.cfg_bulk_email = this._client.cfg_bulk_email;
|
|
268
267
|
this.cfg_campaigns = this._client.cfg_campaigns;
|
|
269
268
|
this.cfg_centrifugo_admin_api = this._client.cfg_centrifugo_admin_api;
|
|
269
|
+
this.cfg_centrifugo_auth = this._client.cfg_centrifugo_auth;
|
|
270
270
|
this.cfg_centrifugo_monitoring = this._client.cfg_centrifugo_monitoring;
|
|
271
271
|
this.cfg_centrifugo_testing = this._client.cfg_centrifugo_testing;
|
|
272
272
|
this.cfg_dashboard_api_zones = this._client.cfg_dashboard_api_zones;
|
|
@@ -327,6 +327,7 @@ export class API {
|
|
|
327
327
|
this.cfg_bulk_email = this._client.cfg_bulk_email;
|
|
328
328
|
this.cfg_campaigns = this._client.cfg_campaigns;
|
|
329
329
|
this.cfg_centrifugo_admin_api = this._client.cfg_centrifugo_admin_api;
|
|
330
|
+
this.cfg_centrifugo_auth = this._client.cfg_centrifugo_auth;
|
|
330
331
|
this.cfg_centrifugo_monitoring = this._client.cfg_centrifugo_monitoring;
|
|
331
332
|
this.cfg_centrifugo_testing = this._client.cfg_centrifugo_testing;
|
|
332
333
|
this.cfg_dashboard_api_zones = this._client.cfg_dashboard_api_zones;
|
|
@@ -459,11 +460,19 @@ export class API {
|
|
|
459
460
|
}
|
|
460
461
|
|
|
461
462
|
/**
|
|
462
|
-
* Get OpenAPI schema
|
|
463
|
-
* @returns
|
|
463
|
+
* Get OpenAPI schema path
|
|
464
|
+
* @returns Path to the OpenAPI schema JSON file
|
|
465
|
+
*
|
|
466
|
+
* Note: The OpenAPI schema is available in the schema.json file.
|
|
467
|
+
* You can load it dynamically using:
|
|
468
|
+
* ```typescript
|
|
469
|
+
* const schema = await fetch('./schema.json').then(r => r.json());
|
|
470
|
+
* // or using fs in Node.js:
|
|
471
|
+
* // const schema = JSON.parse(fs.readFileSync('./schema.json', 'utf-8'));
|
|
472
|
+
* ```
|
|
464
473
|
*/
|
|
465
|
-
|
|
466
|
-
return
|
|
474
|
+
getSchemaPath(): string {
|
|
475
|
+
return './schema.json';
|
|
467
476
|
}
|
|
468
477
|
}
|
|
469
478
|
|