@djangocfg/api 1.2.4 → 1.2.5
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 +6912 -5124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6992 -4881
- package/dist/index.d.ts +6992 -4881
- package/dist/index.mjs +7024 -5247
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +211 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +150 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +152 -0
- package/src/cfg/generated/_utils/fetchers/index.ts +3 -2
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +246 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +137 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +171 -0
- package/src/cfg/generated/_utils/hooks/index.ts +3 -2
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelInfo.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResult.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoError.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResult.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoInfoResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoInfoResult.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoMetrics.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoNodeInfo.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResult.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoProcess.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoStreamPosition.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/ChannelList.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ChannelStatsSerializer.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/HealthCheck.schema.ts +5 -7
- package/src/cfg/generated/_utils/schemas/ManualAckRequestRequest.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/ManualAckResponse.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/OverviewStats.schema.ts +9 -12
- package/src/cfg/generated/_utils/schemas/PublishTestRequestRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/PublishTestResponse.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/index.ts +31 -10
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/client.ts +136 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +256 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +160 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +86 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +100 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/index.ts +2 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +88 -0
- package/src/cfg/generated/cfg__health/models.ts +7 -11
- package/src/cfg/generated/client.ts +9 -6
- package/src/cfg/generated/index.ts +15 -10
- package/src/cfg/generated/schema.ts +4463 -3169
- package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_monitoring.ts +0 -179
- package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_testing.ts +0 -151
- package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_monitoring.ts +0 -166
- package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_testing.ts +0 -162
- package/src/cfg/generated/_utils/schemas/LoadTestRequestRequest.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/LoadTestResponse.schema.ts +0 -21
- package/src/cfg/generated/_utils/schemas/LoadTestStatus.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/MethodStat.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/MethodStats.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/NotificationStats.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/RPCRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/TestRPCRequestRequest.schema.ts +0 -21
- package/src/cfg/generated/_utils/schemas/TestRPCResponse.schema.ts +0 -23
- package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/client.ts +0 -136
- package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/models.ts +0 -144
- package/src/cfg/generated/cfg__ipc__ipcrpc_testing/client.ts +0 -96
- package/src/cfg/generated/cfg__ipc__ipcrpc_testing/models.ts +0 -88
- /package/src/cfg/generated/{cfg__ipc__ipcrpc_monitoring → cfg__centrifugo__centrifugo_admin_api}/index.ts +0 -0
- /package/src/cfg/generated/{cfg__ipc__ipcrpc_testing → cfg__centrifugo__centrifugo_monitoring}/index.ts +0 -0
|
@@ -31,6 +31,30 @@ export * from './ArchiveStatistics.schema'
|
|
|
31
31
|
export * from './Balance.schema'
|
|
32
32
|
export * from './BulkEmailRequest.schema'
|
|
33
33
|
export * from './BulkEmailResponse.schema'
|
|
34
|
+
export * from './CentrifugoChannelInfo.schema'
|
|
35
|
+
export * from './CentrifugoChannelsRequestRequest.schema'
|
|
36
|
+
export * from './CentrifugoChannelsResponse.schema'
|
|
37
|
+
export * from './CentrifugoChannelsResult.schema'
|
|
38
|
+
export * from './CentrifugoClientInfo.schema'
|
|
39
|
+
export * from './CentrifugoError.schema'
|
|
40
|
+
export * from './CentrifugoHistoryRequestRequest.schema'
|
|
41
|
+
export * from './CentrifugoHistoryResponse.schema'
|
|
42
|
+
export * from './CentrifugoHistoryResult.schema'
|
|
43
|
+
export * from './CentrifugoInfoResponse.schema'
|
|
44
|
+
export * from './CentrifugoInfoResult.schema'
|
|
45
|
+
export * from './CentrifugoMetrics.schema'
|
|
46
|
+
export * from './CentrifugoNodeInfo.schema'
|
|
47
|
+
export * from './CentrifugoPresenceRequestRequest.schema'
|
|
48
|
+
export * from './CentrifugoPresenceResponse.schema'
|
|
49
|
+
export * from './CentrifugoPresenceResult.schema'
|
|
50
|
+
export * from './CentrifugoPresenceStatsRequestRequest.schema'
|
|
51
|
+
export * from './CentrifugoPresenceStatsResponse.schema'
|
|
52
|
+
export * from './CentrifugoPresenceStatsResult.schema'
|
|
53
|
+
export * from './CentrifugoProcess.schema'
|
|
54
|
+
export * from './CentrifugoPublication.schema'
|
|
55
|
+
export * from './CentrifugoStreamPosition.schema'
|
|
56
|
+
export * from './ChannelList.schema'
|
|
57
|
+
export * from './ChannelStatsSerializer.schema'
|
|
34
58
|
export * from './ChatHistory.schema'
|
|
35
59
|
export * from './ChatMessage.schema'
|
|
36
60
|
export * from './ChatQueryRequest.schema'
|
|
@@ -42,6 +66,8 @@ export * from './ChatSessionRequest.schema'
|
|
|
42
66
|
export * from './ChatSource.schema'
|
|
43
67
|
export * from './ChatSourceRequest.schema'
|
|
44
68
|
export * from './ChunkRevectorizationRequestRequest.schema'
|
|
69
|
+
export * from './ConnectionTokenRequestRequest.schema'
|
|
70
|
+
export * from './ConnectionTokenResponse.schema'
|
|
45
71
|
export * from './Currency.schema'
|
|
46
72
|
export * from './Document.schema'
|
|
47
73
|
export * from './DocumentArchive.schema'
|
|
@@ -63,20 +89,16 @@ export * from './LeadSubmission.schema'
|
|
|
63
89
|
export * from './LeadSubmissionError.schema'
|
|
64
90
|
export * from './LeadSubmissionRequest.schema'
|
|
65
91
|
export * from './LeadSubmissionResponse.schema'
|
|
66
|
-
export * from './
|
|
67
|
-
export * from './
|
|
68
|
-
export * from './LoadTestStatus.schema'
|
|
92
|
+
export * from './ManualAckRequestRequest.schema'
|
|
93
|
+
export * from './ManualAckResponse.schema'
|
|
69
94
|
export * from './Message.schema'
|
|
70
95
|
export * from './MessageCreate.schema'
|
|
71
96
|
export * from './MessageCreateRequest.schema'
|
|
72
97
|
export * from './MessageRequest.schema'
|
|
73
|
-
export * from './MethodStat.schema'
|
|
74
|
-
export * from './MethodStats.schema'
|
|
75
98
|
export * from './Newsletter.schema'
|
|
76
99
|
export * from './NewsletterCampaign.schema'
|
|
77
100
|
export * from './NewsletterCampaignRequest.schema'
|
|
78
101
|
export * from './NewsletterSubscription.schema'
|
|
79
|
-
export * from './NotificationStats.schema'
|
|
80
102
|
export * from './OTPErrorResponse.schema'
|
|
81
103
|
export * from './OTPRequestRequest.schema'
|
|
82
104
|
export * from './OTPRequestResponse.schema'
|
|
@@ -117,12 +139,13 @@ export * from './PaymentList.schema'
|
|
|
117
139
|
export * from './PublicCategory.schema'
|
|
118
140
|
export * from './PublicDocument.schema'
|
|
119
141
|
export * from './PublicDocumentList.schema'
|
|
142
|
+
export * from './PublishTestRequestRequest.schema'
|
|
143
|
+
export * from './PublishTestResponse.schema'
|
|
120
144
|
export * from './QueueAction.schema'
|
|
121
145
|
export * from './QueueActionRequest.schema'
|
|
122
146
|
export * from './QueueStatus.schema'
|
|
123
147
|
export * from './QuickHealth.schema'
|
|
124
|
-
export * from './
|
|
125
|
-
export * from './RecentRequests.schema'
|
|
148
|
+
export * from './RecentPublishes.schema'
|
|
126
149
|
export * from './SendCampaignRequest.schema'
|
|
127
150
|
export * from './SendCampaignResponse.schema'
|
|
128
151
|
export * from './Sender.schema'
|
|
@@ -131,8 +154,6 @@ export * from './SubscribeResponse.schema'
|
|
|
131
154
|
export * from './SuccessResponse.schema'
|
|
132
155
|
export * from './TaskStatistics.schema'
|
|
133
156
|
export * from './TestEmailRequest.schema'
|
|
134
|
-
export * from './TestRPCRequestRequest.schema'
|
|
135
|
-
export * from './TestRPCResponse.schema'
|
|
136
157
|
export * from './Ticket.schema'
|
|
137
158
|
export * from './TicketRequest.schema'
|
|
138
159
|
export * from './TokenRefresh.schema'
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Centrifugo Admin API.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgCentrifugoAdminApi {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
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
|
+
/**
|
|
76
|
+
* Get connection token for dashboard
|
|
77
|
+
*
|
|
78
|
+
* Returns JWT token and config for WebSocket connection to Centrifugo.
|
|
79
|
+
*/
|
|
80
|
+
async centrifugoServerAuthTokenCreate(): Promise<any> {
|
|
81
|
+
const response = await this.client.request('POST', "/cfg/centrifugo/server/auth/token/");
|
|
82
|
+
return response;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* List active channels
|
|
87
|
+
*
|
|
88
|
+
* Returns list of active channels with optional pattern filter.
|
|
89
|
+
*/
|
|
90
|
+
async centrifugoServerChannelsCreate(data: Models.CentrifugoChannelsRequestRequest): Promise<Models.CentrifugoChannelsResponse> {
|
|
91
|
+
const response = await this.client.request('POST', "/cfg/centrifugo/server/channels/", { body: data });
|
|
92
|
+
return response;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Get channel history
|
|
97
|
+
*
|
|
98
|
+
* Returns message history for a channel.
|
|
99
|
+
*/
|
|
100
|
+
async centrifugoServerHistoryCreate(data: Models.CentrifugoHistoryRequestRequest): Promise<Models.CentrifugoHistoryResponse> {
|
|
101
|
+
const response = await this.client.request('POST', "/cfg/centrifugo/server/history/", { body: data });
|
|
102
|
+
return response;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get Centrifugo server info
|
|
107
|
+
*
|
|
108
|
+
* Returns server information including node count, version, and uptime.
|
|
109
|
+
*/
|
|
110
|
+
async centrifugoServerInfoCreate(): Promise<Models.CentrifugoInfoResponse> {
|
|
111
|
+
const response = await this.client.request('POST', "/cfg/centrifugo/server/info/");
|
|
112
|
+
return response;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Get channel presence
|
|
117
|
+
*
|
|
118
|
+
* Returns list of clients currently subscribed to a channel.
|
|
119
|
+
*/
|
|
120
|
+
async centrifugoServerPresenceCreate(data: Models.CentrifugoPresenceRequestRequest): Promise<Models.CentrifugoPresenceResponse> {
|
|
121
|
+
const response = await this.client.request('POST', "/cfg/centrifugo/server/presence/", { body: data });
|
|
122
|
+
return response;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Get channel presence statistics
|
|
127
|
+
*
|
|
128
|
+
* Returns quick statistics about channel presence (num_clients,
|
|
129
|
+
* num_users).
|
|
130
|
+
*/
|
|
131
|
+
async centrifugoServerPresenceStatsCreate(data: Models.CentrifugoPresenceStatsRequestRequest): Promise<Models.CentrifugoPresenceStatsResponse> {
|
|
132
|
+
const response = await this.client.request('POST', "/cfg/centrifugo/server/presence-stats/", { body: data });
|
|
133
|
+
return response;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request to list active channels.
|
|
3
|
+
*
|
|
4
|
+
* Request model (no read-only fields).
|
|
5
|
+
*/
|
|
6
|
+
export interface CentrifugoChannelsRequestRequest {
|
|
7
|
+
/** Pattern to filter channels (e.g., 'user:*') */
|
|
8
|
+
pattern?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* List of active channels response.
|
|
13
|
+
*
|
|
14
|
+
* Response model (includes read-only fields).
|
|
15
|
+
*/
|
|
16
|
+
export interface CentrifugoChannelsResponse {
|
|
17
|
+
error?: Record<string, any>;
|
|
18
|
+
result?: Record<string, any>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Request to get channel history.
|
|
23
|
+
*
|
|
24
|
+
* Request model (no read-only fields).
|
|
25
|
+
*/
|
|
26
|
+
export interface CentrifugoHistoryRequestRequest {
|
|
27
|
+
/** Channel name */
|
|
28
|
+
channel: string;
|
|
29
|
+
/** Maximum number of messages to return */
|
|
30
|
+
limit?: string;
|
|
31
|
+
since?: Record<string, any>;
|
|
32
|
+
/** Reverse message order (newest first) */
|
|
33
|
+
reverse?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Channel history response.
|
|
38
|
+
*
|
|
39
|
+
* Response model (includes read-only fields).
|
|
40
|
+
*/
|
|
41
|
+
export interface CentrifugoHistoryResponse {
|
|
42
|
+
error?: Record<string, any>;
|
|
43
|
+
result?: Record<string, any>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Server info response.
|
|
48
|
+
*
|
|
49
|
+
* Response model (includes read-only fields).
|
|
50
|
+
*/
|
|
51
|
+
export interface CentrifugoInfoResponse {
|
|
52
|
+
error?: Record<string, any>;
|
|
53
|
+
result?: Record<string, any>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Request to get channel presence.
|
|
58
|
+
*
|
|
59
|
+
* Request model (no read-only fields).
|
|
60
|
+
*/
|
|
61
|
+
export interface CentrifugoPresenceRequestRequest {
|
|
62
|
+
/** Channel name */
|
|
63
|
+
channel: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Channel presence response.
|
|
68
|
+
*
|
|
69
|
+
* Response model (includes read-only fields).
|
|
70
|
+
*/
|
|
71
|
+
export interface CentrifugoPresenceResponse {
|
|
72
|
+
error?: Record<string, any>;
|
|
73
|
+
result?: Record<string, any>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Request to get channel presence statistics.
|
|
78
|
+
*
|
|
79
|
+
* Request model (no read-only fields).
|
|
80
|
+
*/
|
|
81
|
+
export interface CentrifugoPresenceStatsRequestRequest {
|
|
82
|
+
/** Channel name */
|
|
83
|
+
channel: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Channel presence stats response.
|
|
88
|
+
*
|
|
89
|
+
* Response model (includes read-only fields).
|
|
90
|
+
*/
|
|
91
|
+
export interface CentrifugoPresenceStatsResponse {
|
|
92
|
+
error?: Record<string, any>;
|
|
93
|
+
result?: Record<string, any>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Centrifugo API error structure.
|
|
98
|
+
*
|
|
99
|
+
* Response model (includes read-only fields).
|
|
100
|
+
*/
|
|
101
|
+
export interface CentrifugoError {
|
|
102
|
+
/** Error code (0 = no error) */
|
|
103
|
+
code?: number;
|
|
104
|
+
/** Error message */
|
|
105
|
+
message?: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Channels result wrapper.
|
|
110
|
+
*
|
|
111
|
+
* Response model (includes read-only fields).
|
|
112
|
+
*/
|
|
113
|
+
export interface CentrifugoChannelsResult {
|
|
114
|
+
/** Map of channel names to channel info */
|
|
115
|
+
channels: Record<string, any>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Stream position for pagination.
|
|
120
|
+
*
|
|
121
|
+
* Response model (includes read-only fields).
|
|
122
|
+
*/
|
|
123
|
+
export interface CentrifugoStreamPosition {
|
|
124
|
+
/** Stream offset */
|
|
125
|
+
offset: number;
|
|
126
|
+
/** Stream epoch */
|
|
127
|
+
epoch: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* History result wrapper.
|
|
132
|
+
*
|
|
133
|
+
* Response model (includes read-only fields).
|
|
134
|
+
*/
|
|
135
|
+
export interface CentrifugoHistoryResult {
|
|
136
|
+
/** List of publications */
|
|
137
|
+
publications: Array<CentrifugoPublication>;
|
|
138
|
+
/** Current stream epoch */
|
|
139
|
+
epoch: string;
|
|
140
|
+
/** Latest stream offset */
|
|
141
|
+
offset: number;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Info result wrapper.
|
|
146
|
+
*
|
|
147
|
+
* Response model (includes read-only fields).
|
|
148
|
+
*/
|
|
149
|
+
export interface CentrifugoInfoResult {
|
|
150
|
+
/** List of Centrifugo nodes */
|
|
151
|
+
nodes: Array<CentrifugoNodeInfo>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Presence result wrapper.
|
|
156
|
+
*
|
|
157
|
+
* Response model (includes read-only fields).
|
|
158
|
+
*/
|
|
159
|
+
export interface CentrifugoPresenceResult {
|
|
160
|
+
/** Map of client IDs to client info */
|
|
161
|
+
presence: Record<string, any>;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Presence stats result.
|
|
166
|
+
*
|
|
167
|
+
* Response model (includes read-only fields).
|
|
168
|
+
*/
|
|
169
|
+
export interface CentrifugoPresenceStatsResult {
|
|
170
|
+
/** Number of connected clients */
|
|
171
|
+
num_clients: number;
|
|
172
|
+
/** Number of unique users */
|
|
173
|
+
num_users: number;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Single publication (message) in channel history.
|
|
178
|
+
*
|
|
179
|
+
* Response model (includes read-only fields).
|
|
180
|
+
*/
|
|
181
|
+
export interface CentrifugoPublication {
|
|
182
|
+
/** Message payload */
|
|
183
|
+
data: Record<string, any>;
|
|
184
|
+
info?: Record<string, any>;
|
|
185
|
+
/** Message offset in channel stream */
|
|
186
|
+
offset: number;
|
|
187
|
+
/** Optional message tags */
|
|
188
|
+
tags?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Information about a single Centrifugo node.
|
|
193
|
+
*
|
|
194
|
+
* Response model (includes read-only fields).
|
|
195
|
+
*/
|
|
196
|
+
export interface CentrifugoNodeInfo {
|
|
197
|
+
/** Unique node identifier */
|
|
198
|
+
uid: string;
|
|
199
|
+
/** Node name */
|
|
200
|
+
name: string;
|
|
201
|
+
/** Centrifugo version */
|
|
202
|
+
version: string;
|
|
203
|
+
/** Number of connected clients */
|
|
204
|
+
num_clients: number;
|
|
205
|
+
/** Number of unique users */
|
|
206
|
+
num_users: number;
|
|
207
|
+
/** Number of active channels */
|
|
208
|
+
num_channels: number;
|
|
209
|
+
/** Node uptime in seconds */
|
|
210
|
+
uptime: number;
|
|
211
|
+
/** Total number of subscriptions */
|
|
212
|
+
num_subs: number;
|
|
213
|
+
metrics?: Record<string, any>;
|
|
214
|
+
process?: Record<string, any>;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Information about connected client.
|
|
219
|
+
*
|
|
220
|
+
* Response model (includes read-only fields).
|
|
221
|
+
*/
|
|
222
|
+
export interface CentrifugoClientInfo {
|
|
223
|
+
/** User ID */
|
|
224
|
+
user: string;
|
|
225
|
+
/** Client UUID */
|
|
226
|
+
client: string;
|
|
227
|
+
/** Connection metadata */
|
|
228
|
+
conn_info?: string;
|
|
229
|
+
/** Channel-specific metadata */
|
|
230
|
+
chan_info?: string;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Server metrics.
|
|
235
|
+
*
|
|
236
|
+
* Response model (includes read-only fields).
|
|
237
|
+
*/
|
|
238
|
+
export interface CentrifugoMetrics {
|
|
239
|
+
/** Metrics collection interval */
|
|
240
|
+
interval: number;
|
|
241
|
+
/** Metric name to value mapping */
|
|
242
|
+
items: Record<string, any>;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Process information.
|
|
247
|
+
*
|
|
248
|
+
* Response model (includes read-only fields).
|
|
249
|
+
*/
|
|
250
|
+
export interface CentrifugoProcess {
|
|
251
|
+
/** CPU usage percentage */
|
|
252
|
+
cpu: number;
|
|
253
|
+
/** Resident set size in bytes */
|
|
254
|
+
rss: number;
|
|
255
|
+
}
|
|
256
|
+
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Centrifugo Monitoring.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgCentrifugoMonitoring {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async centrifugoAdminApiMonitorChannelsRetrieve(hours?: number): Promise<Models.ChannelList[]>;
|
|
15
|
+
async centrifugoAdminApiMonitorChannelsRetrieve(params?: { hours?: number }): Promise<Models.ChannelList[]>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get channel statistics
|
|
19
|
+
*
|
|
20
|
+
* Returns statistics grouped by channel.
|
|
21
|
+
*/
|
|
22
|
+
async centrifugoAdminApiMonitorChannelsRetrieve(...args: any[]): Promise<Models.ChannelList[]> {
|
|
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 = { hours: args[0] };
|
|
30
|
+
}
|
|
31
|
+
const response = await this.client.request('GET', "/cfg/centrifugo/admin/api/monitor/channels/", { params });
|
|
32
|
+
return (response as any).results || [];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get Centrifugo health status
|
|
37
|
+
*
|
|
38
|
+
* Returns the current health status of the Centrifugo client.
|
|
39
|
+
*/
|
|
40
|
+
async centrifugoAdminApiMonitorHealthRetrieve(): Promise<Models.HealthCheck> {
|
|
41
|
+
const response = await this.client.request('GET', "/cfg/centrifugo/admin/api/monitor/health/");
|
|
42
|
+
return response;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async centrifugoAdminApiMonitorOverviewRetrieve(hours?: number): Promise<Models.OverviewStats>;
|
|
46
|
+
async centrifugoAdminApiMonitorOverviewRetrieve(params?: { hours?: number }): Promise<Models.OverviewStats>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get overview statistics
|
|
50
|
+
*
|
|
51
|
+
* Returns overview statistics for Centrifugo publishes.
|
|
52
|
+
*/
|
|
53
|
+
async centrifugoAdminApiMonitorOverviewRetrieve(...args: any[]): Promise<Models.OverviewStats> {
|
|
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 = { hours: args[0] };
|
|
61
|
+
}
|
|
62
|
+
const response = await this.client.request('GET', "/cfg/centrifugo/admin/api/monitor/overview/", { params });
|
|
63
|
+
return response;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async centrifugoAdminApiMonitorPublishesRetrieve(channel?: string, count?: number): Promise<Models.RecentPublishes>;
|
|
67
|
+
async centrifugoAdminApiMonitorPublishesRetrieve(params?: { channel?: string; count?: number }): Promise<Models.RecentPublishes>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Get recent publishes
|
|
71
|
+
*
|
|
72
|
+
* Returns a list of recent Centrifugo publishes with their details.
|
|
73
|
+
*/
|
|
74
|
+
async centrifugoAdminApiMonitorPublishesRetrieve(...args: any[]): Promise<Models.RecentPublishes> {
|
|
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 = { channel: args[0], count: args[1] };
|
|
82
|
+
}
|
|
83
|
+
const response = await this.client.request('GET', "/cfg/centrifugo/admin/api/monitor/publishes/", { params });
|
|
84
|
+
return response;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async centrifugoMonitorChannelsRetrieve(hours?: number): Promise<Models.ChannelList[]>;
|
|
88
|
+
async centrifugoMonitorChannelsRetrieve(params?: { hours?: number }): Promise<Models.ChannelList[]>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get channel statistics
|
|
92
|
+
*
|
|
93
|
+
* Returns statistics grouped by channel.
|
|
94
|
+
*/
|
|
95
|
+
async centrifugoMonitorChannelsRetrieve(...args: any[]): Promise<Models.ChannelList[]> {
|
|
96
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
97
|
+
|
|
98
|
+
let params;
|
|
99
|
+
if (isParamsObject) {
|
|
100
|
+
params = args[0];
|
|
101
|
+
} else {
|
|
102
|
+
params = { hours: args[0] };
|
|
103
|
+
}
|
|
104
|
+
const response = await this.client.request('GET', "/cfg/centrifugo/monitor/channels/", { params });
|
|
105
|
+
return (response as any).results || [];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Get Centrifugo health status
|
|
110
|
+
*
|
|
111
|
+
* Returns the current health status of the Centrifugo client.
|
|
112
|
+
*/
|
|
113
|
+
async centrifugoMonitorHealthRetrieve(): Promise<Models.HealthCheck> {
|
|
114
|
+
const response = await this.client.request('GET', "/cfg/centrifugo/monitor/health/");
|
|
115
|
+
return response;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
async centrifugoMonitorOverviewRetrieve(hours?: number): Promise<Models.OverviewStats>;
|
|
119
|
+
async centrifugoMonitorOverviewRetrieve(params?: { hours?: number }): Promise<Models.OverviewStats>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Get overview statistics
|
|
123
|
+
*
|
|
124
|
+
* Returns overview statistics for Centrifugo publishes.
|
|
125
|
+
*/
|
|
126
|
+
async centrifugoMonitorOverviewRetrieve(...args: any[]): Promise<Models.OverviewStats> {
|
|
127
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
128
|
+
|
|
129
|
+
let params;
|
|
130
|
+
if (isParamsObject) {
|
|
131
|
+
params = args[0];
|
|
132
|
+
} else {
|
|
133
|
+
params = { hours: args[0] };
|
|
134
|
+
}
|
|
135
|
+
const response = await this.client.request('GET', "/cfg/centrifugo/monitor/overview/", { params });
|
|
136
|
+
return response;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async centrifugoMonitorPublishesRetrieve(channel?: string, count?: number): Promise<Models.RecentPublishes>;
|
|
140
|
+
async centrifugoMonitorPublishesRetrieve(params?: { channel?: string; count?: number }): Promise<Models.RecentPublishes>;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Get recent publishes
|
|
144
|
+
*
|
|
145
|
+
* Returns a list of recent Centrifugo publishes with their details.
|
|
146
|
+
*/
|
|
147
|
+
async centrifugoMonitorPublishesRetrieve(...args: any[]): Promise<Models.RecentPublishes> {
|
|
148
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
149
|
+
|
|
150
|
+
let params;
|
|
151
|
+
if (isParamsObject) {
|
|
152
|
+
params = args[0];
|
|
153
|
+
} else {
|
|
154
|
+
params = { channel: args[0], count: args[1] };
|
|
155
|
+
}
|
|
156
|
+
const response = await this.client.request('GET', "/cfg/centrifugo/monitor/publishes/", { params });
|
|
157
|
+
return response;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
}
|