@djangocfg/api 1.2.7 → 1.2.9

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 (28) hide show
  1. package/dist/index.cjs +1274 -2252
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +321 -1099
  4. package/dist/index.d.ts +321 -1099
  5. package/dist/index.mjs +1197 -2162
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +0 -14
  9. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +0 -84
  10. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +0 -56
  11. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +0 -56
  12. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts +30 -0
  13. package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +0 -14
  14. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +0 -108
  15. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +0 -56
  16. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +0 -72
  17. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_commands.ts +34 -0
  18. package/src/cfg/generated/_utils/schemas/Command.schema.ts +2 -0
  19. package/src/cfg/generated/_utils/schemas/CommandExecuteRequestRequest.schema.ts +21 -0
  20. package/src/cfg/generated/_utils/schemas/CommandHelpResponse.schema.ts +25 -0
  21. package/src/cfg/generated/_utils/schemas/index.ts +2 -0
  22. package/src/cfg/generated/cfg__centrifugo/client.ts +0 -8
  23. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/client.ts +0 -61
  24. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +0 -73
  25. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +0 -43
  26. package/src/cfg/generated/cfg__dashboard__dashboard_commands/client.ts +21 -0
  27. package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +31 -0
  28. package/src/cfg/generated/schema.ts +256 -907
@@ -74,6 +74,8 @@ export * from './ChatSource.schema'
74
74
  export * from './ChatSourceRequest.schema'
75
75
  export * from './ChunkRevectorizationRequestRequest.schema'
76
76
  export * from './Command.schema'
77
+ export * from './CommandExecuteRequestRequest.schema'
78
+ export * from './CommandHelpResponse.schema'
77
79
  export * from './CommandsSummary.schema'
78
80
  export * from './ConnectionTokenRequestRequest.schema'
79
81
  export * from './ConnectionTokenResponse.schema'
@@ -11,14 +11,6 @@ export class CfgCentrifugo {
11
11
  this.client = client;
12
12
  }
13
13
 
14
- /**
15
- * Get statistics per channel.
16
- */
17
- async adminApiMonitorChannelsRetrieve(): Promise<any> {
18
- const response = await this.client.request('GET', "/cfg/centrifugo/admin/api/monitor/channels/");
19
- return response;
20
- }
21
-
22
14
  /**
23
15
  * Get statistics per channel.
24
16
  */
@@ -11,67 +11,6 @@ export class CfgCentrifugoAdminApi {
11
11
  this.client = client;
12
12
  }
13
13
 
14
- /**
15
- * Get connection token for dashboard
16
- *
17
- * Returns JWT token and config for WebSocket connection to Centrifugo.
18
- */
19
- async serverAuthTokenCreate(): Promise<any> {
20
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/server/auth/token/");
21
- return response;
22
- }
23
-
24
- /**
25
- * List active channels
26
- *
27
- * Returns list of active channels with optional pattern filter.
28
- */
29
- async serverChannelsCreate(data: Models.CentrifugoChannelsRequestRequest): Promise<Models.CentrifugoChannelsResponse> {
30
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/server/channels/", { body: data });
31
- return response;
32
- }
33
-
34
- /**
35
- * Get channel history
36
- *
37
- * Returns message history for a channel.
38
- */
39
- async serverHistoryCreate(data: Models.CentrifugoHistoryRequestRequest): Promise<Models.CentrifugoHistoryResponse> {
40
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/server/history/", { body: data });
41
- return response;
42
- }
43
-
44
- /**
45
- * Get Centrifugo server info
46
- *
47
- * Returns server information including node count, version, and uptime.
48
- */
49
- async serverInfoCreate(): Promise<Models.CentrifugoInfoResponse> {
50
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/server/info/");
51
- return response;
52
- }
53
-
54
- /**
55
- * Get channel presence
56
- *
57
- * Returns list of clients currently subscribed to a channel.
58
- */
59
- async serverPresenceCreate(data: Models.CentrifugoPresenceRequestRequest): Promise<Models.CentrifugoPresenceResponse> {
60
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/server/presence/", { body: data });
61
- return response;
62
- }
63
-
64
- /**
65
- * Get channel presence statistics
66
- *
67
- * Returns quick statistics about channel presence (num_clients,
68
- * num_users).
69
- */
70
- async serverPresenceStatsCreate(data: Models.CentrifugoPresenceStatsRequestRequest): Promise<Models.CentrifugoPresenceStatsResponse> {
71
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/server/presence-stats/", { body: data });
72
- return response;
73
- }
74
-
75
14
  /**
76
15
  * Get connection token for dashboard
77
16
  *
@@ -11,79 +11,6 @@ export class CfgCentrifugoMonitoring {
11
11
  this.client = client;
12
12
  }
13
13
 
14
- /**
15
- * Get Centrifugo health status
16
- *
17
- * Returns the current health status of the Centrifugo client.
18
- */
19
- async centrifugoAdminApiMonitorHealthRetrieve(): Promise<Models.HealthCheck> {
20
- const response = await this.client.request('GET', "/cfg/centrifugo/admin/api/monitor/health/");
21
- return response;
22
- }
23
-
24
- async centrifugoAdminApiMonitorOverviewRetrieve(hours?: number): Promise<Models.OverviewStats>;
25
- async centrifugoAdminApiMonitorOverviewRetrieve(params?: { hours?: number }): Promise<Models.OverviewStats>;
26
-
27
- /**
28
- * Get overview statistics
29
- *
30
- * Returns overview statistics for Centrifugo publishes.
31
- */
32
- async centrifugoAdminApiMonitorOverviewRetrieve(...args: any[]): Promise<Models.OverviewStats> {
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 = { hours: args[0] };
40
- }
41
- const response = await this.client.request('GET', "/cfg/centrifugo/admin/api/monitor/overview/", { params });
42
- return response;
43
- }
44
-
45
- async centrifugoAdminApiMonitorPublishesRetrieve(channel?: string, count?: number, offset?: number, status?: string): Promise<Models.RecentPublishes>;
46
- async centrifugoAdminApiMonitorPublishesRetrieve(params?: { channel?: string; count?: number; offset?: number; status?: string }): Promise<Models.RecentPublishes>;
47
-
48
- /**
49
- * Get recent publishes
50
- *
51
- * Returns a list of recent Centrifugo publishes with their details.
52
- */
53
- async centrifugoAdminApiMonitorPublishesRetrieve(...args: any[]): Promise<Models.RecentPublishes> {
54
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
55
-
56
- let params;
57
- if (isParamsObject) {
58
- params = args[0];
59
- } else {
60
- params = { channel: args[0], count: args[1], offset: args[2], status: args[3] };
61
- }
62
- const response = await this.client.request('GET', "/cfg/centrifugo/admin/api/monitor/publishes/", { params });
63
- return response;
64
- }
65
-
66
- async centrifugoAdminApiMonitorTimelineRetrieve(hours?: number, interval?: string): Promise<Models.ChannelList[]>;
67
- async centrifugoAdminApiMonitorTimelineRetrieve(params?: { hours?: number; interval?: string }): Promise<Models.ChannelList[]>;
68
-
69
- /**
70
- * Get channel statistics
71
- *
72
- * Returns statistics grouped by channel.
73
- */
74
- async centrifugoAdminApiMonitorTimelineRetrieve(...args: any[]): Promise<Models.ChannelList[]> {
75
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
76
-
77
- let params;
78
- if (isParamsObject) {
79
- params = args[0];
80
- } else {
81
- params = { hours: args[0], interval: args[1] };
82
- }
83
- const response = await this.client.request('GET', "/cfg/centrifugo/admin/api/monitor/timeline/", { params });
84
- return (response as any).results || [];
85
- }
86
-
87
14
  /**
88
15
  * Get Centrifugo health status
89
16
  *
@@ -11,49 +11,6 @@ export class CfgCentrifugoTesting {
11
11
  this.client = client;
12
12
  }
13
13
 
14
- /**
15
- * Generate connection token
16
- *
17
- * Generate JWT token for WebSocket connection to Centrifugo.
18
- */
19
- async centrifugoAdminApiTestingConnectionTokenCreate(data: Models.ConnectionTokenRequestRequest): Promise<Models.ConnectionTokenResponse> {
20
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/testing/connection-token/", { body: data });
21
- return response;
22
- }
23
-
24
- /**
25
- * Publish test message
26
- *
27
- * Publish test message to Centrifugo via wrapper with optional ACK
28
- * tracking.
29
- */
30
- async centrifugoAdminApiTestingPublishTestCreate(data: Models.PublishTestRequestRequest): Promise<Models.PublishTestResponse> {
31
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/testing/publish-test/", { body: data });
32
- return response;
33
- }
34
-
35
- /**
36
- * Publish with database logging
37
- *
38
- * Publish message using CentrifugoClient with database logging. This will
39
- * create CentrifugoLog records.
40
- */
41
- async centrifugoAdminApiTestingPublishWithLoggingCreate(data: Models.PublishTestRequestRequest): Promise<Models.PublishTestResponse> {
42
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/testing/publish-with-logging/", { body: data });
43
- return response;
44
- }
45
-
46
- /**
47
- * Send manual ACK
48
- *
49
- * Manually send ACK for a message to the wrapper. Pass message_id in
50
- * request body.
51
- */
52
- async centrifugoAdminApiTestingSendAckCreate(data: Models.ManualAckRequestRequest): Promise<Models.ManualAckResponse> {
53
- const response = await this.client.request('POST', "/cfg/centrifugo/admin/api/testing/send-ack/", { body: data });
54
- return response;
55
- }
56
-
57
14
  /**
58
15
  * Generate connection token
59
16
  *
@@ -21,6 +21,27 @@ export class CfgDashboardCommands {
21
21
  return response;
22
22
  }
23
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
+
24
45
  /**
25
46
  * Get commands summary
26
47
  *
@@ -1,3 +1,32 @@
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
+
1
30
  /**
2
31
  * Commands summary serializer.
3
32
  *
@@ -23,5 +52,7 @@ export interface Command {
23
52
  help: string;
24
53
  is_core: boolean;
25
54
  is_custom: boolean;
55
+ is_allowed?: boolean;
56
+ risk_level?: string;
26
57
  }
27
58