@djangocfg/api 1.2.8 → 1.2.10
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 +75 -1317
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -1143
- package/dist/index.d.ts +52 -1143
- package/dist/index.mjs +75 -1302
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +0 -14
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +0 -84
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +0 -56
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +0 -56
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +0 -14
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +0 -108
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +0 -56
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +0 -72
- package/src/cfg/generated/cfg__centrifugo/client.ts +0 -8
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/client.ts +0 -61
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +0 -73
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +0 -43
- package/src/cfg/generated/schema.ts +0 -839
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "DjangoCFG",
|
|
6
6
|
"url": "https://djangocfg.com"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@types/node": "^22.15.3",
|
|
69
69
|
"@types/react": "19.2.2",
|
|
70
70
|
"@types/react-dom": "19.2.1",
|
|
71
|
-
"@djangocfg/typescript-config": "^1.2.
|
|
71
|
+
"@djangocfg/typescript-config": "^1.2.10",
|
|
72
72
|
"react": "^19.1.0",
|
|
73
73
|
"react-dom": "^19.1.0",
|
|
74
74
|
"tsup": "^8.5.0",
|
|
@@ -31,20 +31,6 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { getAPIInstance } from '../../api-instance'
|
|
33
33
|
|
|
34
|
-
/**
|
|
35
|
-
* API operation
|
|
36
|
-
*
|
|
37
|
-
* @method GET
|
|
38
|
-
* @path /cfg/centrifugo/admin/api/monitor/channels/
|
|
39
|
-
*/
|
|
40
|
-
export async function getCentrifugoAdminApiMonitorChannelsRetrieve( client?: any
|
|
41
|
-
): Promise<any> {
|
|
42
|
-
const api = client || getAPIInstance()
|
|
43
|
-
const response = await api.cfg_centrifugo.adminApiMonitorChannelsRetrieve()
|
|
44
|
-
return response
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
34
|
/**
|
|
49
35
|
* API operation
|
|
50
36
|
*
|
|
@@ -40,90 +40,6 @@ import { CentrifugoPresenceStatsRequestRequestSchema, type CentrifugoPresenceSta
|
|
|
40
40
|
import { CentrifugoPresenceStatsResponseSchema, type CentrifugoPresenceStatsResponse } from '../schemas/CentrifugoPresenceStatsResponse.schema'
|
|
41
41
|
import { getAPIInstance } from '../../api-instance'
|
|
42
42
|
|
|
43
|
-
/**
|
|
44
|
-
* Get connection token for dashboard
|
|
45
|
-
*
|
|
46
|
-
* @method POST
|
|
47
|
-
* @path /cfg/centrifugo/admin/api/server/auth/token/
|
|
48
|
-
*/
|
|
49
|
-
export async function createCentrifugoAdminApiServerAuthTokenCreate( client?: any
|
|
50
|
-
): Promise<any> {
|
|
51
|
-
const api = client || getAPIInstance()
|
|
52
|
-
const response = await api.cfg_centrifugo_admin_api.serverAuthTokenCreate()
|
|
53
|
-
return response
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* List active channels
|
|
59
|
-
*
|
|
60
|
-
* @method POST
|
|
61
|
-
* @path /cfg/centrifugo/admin/api/server/channels/
|
|
62
|
-
*/
|
|
63
|
-
export async function createCentrifugoAdminApiServerChannelsCreate( data: CentrifugoChannelsRequestRequest, client?: any
|
|
64
|
-
): Promise<CentrifugoChannelsResponse> {
|
|
65
|
-
const api = client || getAPIInstance()
|
|
66
|
-
const response = await api.cfg_centrifugo_admin_api.serverChannelsCreate(data)
|
|
67
|
-
return CentrifugoChannelsResponseSchema.parse(response)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Get channel history
|
|
73
|
-
*
|
|
74
|
-
* @method POST
|
|
75
|
-
* @path /cfg/centrifugo/admin/api/server/history/
|
|
76
|
-
*/
|
|
77
|
-
export async function createCentrifugoAdminApiServerHistoryCreate( data: CentrifugoHistoryRequestRequest, client?: any
|
|
78
|
-
): Promise<CentrifugoHistoryResponse> {
|
|
79
|
-
const api = client || getAPIInstance()
|
|
80
|
-
const response = await api.cfg_centrifugo_admin_api.serverHistoryCreate(data)
|
|
81
|
-
return CentrifugoHistoryResponseSchema.parse(response)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Get Centrifugo server info
|
|
87
|
-
*
|
|
88
|
-
* @method POST
|
|
89
|
-
* @path /cfg/centrifugo/admin/api/server/info/
|
|
90
|
-
*/
|
|
91
|
-
export async function createCentrifugoAdminApiServerInfoCreate( client?: any
|
|
92
|
-
): Promise<CentrifugoInfoResponse> {
|
|
93
|
-
const api = client || getAPIInstance()
|
|
94
|
-
const response = await api.cfg_centrifugo_admin_api.serverInfoCreate()
|
|
95
|
-
return CentrifugoInfoResponseSchema.parse(response)
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Get channel presence
|
|
101
|
-
*
|
|
102
|
-
* @method POST
|
|
103
|
-
* @path /cfg/centrifugo/admin/api/server/presence/
|
|
104
|
-
*/
|
|
105
|
-
export async function createCentrifugoAdminApiServerPresenceCreate( data: CentrifugoPresenceRequestRequest, client?: any
|
|
106
|
-
): Promise<CentrifugoPresenceResponse> {
|
|
107
|
-
const api = client || getAPIInstance()
|
|
108
|
-
const response = await api.cfg_centrifugo_admin_api.serverPresenceCreate(data)
|
|
109
|
-
return CentrifugoPresenceResponseSchema.parse(response)
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Get channel presence statistics
|
|
115
|
-
*
|
|
116
|
-
* @method POST
|
|
117
|
-
* @path /cfg/centrifugo/admin/api/server/presence-stats/
|
|
118
|
-
*/
|
|
119
|
-
export async function createCentrifugoAdminApiServerPresenceStatsCreate( data: CentrifugoPresenceStatsRequestRequest, client?: any
|
|
120
|
-
): Promise<CentrifugoPresenceStatsResponse> {
|
|
121
|
-
const api = client || getAPIInstance()
|
|
122
|
-
const response = await api.cfg_centrifugo_admin_api.serverPresenceStatsCreate(data)
|
|
123
|
-
return CentrifugoPresenceStatsResponseSchema.parse(response)
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
43
|
/**
|
|
128
44
|
* Get connection token for dashboard
|
|
129
45
|
*
|
|
@@ -35,62 +35,6 @@ import { OverviewStatsSchema, type OverviewStats } from '../schemas/OverviewStat
|
|
|
35
35
|
import { RecentPublishesSchema, type RecentPublishes } from '../schemas/RecentPublishes.schema'
|
|
36
36
|
import { getAPIInstance } from '../../api-instance'
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* Get Centrifugo health status
|
|
40
|
-
*
|
|
41
|
-
* @method GET
|
|
42
|
-
* @path /cfg/centrifugo/admin/api/monitor/health/
|
|
43
|
-
*/
|
|
44
|
-
export async function getCentrifugoAdminApiMonitorHealthRetrieve( client?: any
|
|
45
|
-
): Promise<HealthCheck> {
|
|
46
|
-
const api = client || getAPIInstance()
|
|
47
|
-
const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorHealthRetrieve()
|
|
48
|
-
return HealthCheckSchema.parse(response)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Get overview statistics
|
|
54
|
-
*
|
|
55
|
-
* @method GET
|
|
56
|
-
* @path /cfg/centrifugo/admin/api/monitor/overview/
|
|
57
|
-
*/
|
|
58
|
-
export async function getCentrifugoAdminApiMonitorOverviewRetrieve( params?: { hours?: number }, client?: any
|
|
59
|
-
): Promise<OverviewStats> {
|
|
60
|
-
const api = client || getAPIInstance()
|
|
61
|
-
const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorOverviewRetrieve(params?.hours)
|
|
62
|
-
return OverviewStatsSchema.parse(response)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Get recent publishes
|
|
68
|
-
*
|
|
69
|
-
* @method GET
|
|
70
|
-
* @path /cfg/centrifugo/admin/api/monitor/publishes/
|
|
71
|
-
*/
|
|
72
|
-
export async function getCentrifugoAdminApiMonitorPublishesRetrieve( params?: { channel?: string; count?: number; offset?: number; status?: string }, client?: any
|
|
73
|
-
): Promise<RecentPublishes> {
|
|
74
|
-
const api = client || getAPIInstance()
|
|
75
|
-
const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorPublishesRetrieve(params?.channel, params?.count, params?.offset, params?.status)
|
|
76
|
-
return RecentPublishesSchema.parse(response)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Get channel statistics
|
|
82
|
-
*
|
|
83
|
-
* @method GET
|
|
84
|
-
* @path /cfg/centrifugo/admin/api/monitor/timeline/
|
|
85
|
-
*/
|
|
86
|
-
export async function getCentrifugoAdminApiMonitorTimelineRetrieve( params?: { hours?: number; interval?: string }, client?: any
|
|
87
|
-
): Promise<ChannelList> {
|
|
88
|
-
const api = client || getAPIInstance()
|
|
89
|
-
const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorTimelineRetrieve(params?.hours, params?.interval)
|
|
90
|
-
return ChannelListSchema.parse(response)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
38
|
/**
|
|
95
39
|
* Get Centrifugo health status
|
|
96
40
|
*
|
|
@@ -37,62 +37,6 @@ import { PublishTestRequestRequestSchema, type PublishTestRequestRequest } from
|
|
|
37
37
|
import { PublishTestResponseSchema, type PublishTestResponse } from '../schemas/PublishTestResponse.schema'
|
|
38
38
|
import { getAPIInstance } from '../../api-instance'
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
* Generate connection token
|
|
42
|
-
*
|
|
43
|
-
* @method POST
|
|
44
|
-
* @path /cfg/centrifugo/admin/api/testing/connection-token/
|
|
45
|
-
*/
|
|
46
|
-
export async function createCentrifugoAdminApiTestingConnectionTokenCreate( data: ConnectionTokenRequestRequest, client?: any
|
|
47
|
-
): Promise<ConnectionTokenResponse> {
|
|
48
|
-
const api = client || getAPIInstance()
|
|
49
|
-
const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingConnectionTokenCreate(data)
|
|
50
|
-
return ConnectionTokenResponseSchema.parse(response)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Publish test message
|
|
56
|
-
*
|
|
57
|
-
* @method POST
|
|
58
|
-
* @path /cfg/centrifugo/admin/api/testing/publish-test/
|
|
59
|
-
*/
|
|
60
|
-
export async function createCentrifugoAdminApiTestingPublishTestCreate( data: PublishTestRequestRequest, client?: any
|
|
61
|
-
): Promise<PublishTestResponse> {
|
|
62
|
-
const api = client || getAPIInstance()
|
|
63
|
-
const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingPublishTestCreate(data)
|
|
64
|
-
return PublishTestResponseSchema.parse(response)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Publish with database logging
|
|
70
|
-
*
|
|
71
|
-
* @method POST
|
|
72
|
-
* @path /cfg/centrifugo/admin/api/testing/publish-with-logging/
|
|
73
|
-
*/
|
|
74
|
-
export async function createCentrifugoAdminApiTestingPublishWithLoggingCreate( data: PublishTestRequestRequest, client?: any
|
|
75
|
-
): Promise<PublishTestResponse> {
|
|
76
|
-
const api = client || getAPIInstance()
|
|
77
|
-
const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingPublishWithLoggingCreate(data)
|
|
78
|
-
return PublishTestResponseSchema.parse(response)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Send manual ACK
|
|
84
|
-
*
|
|
85
|
-
* @method POST
|
|
86
|
-
* @path /cfg/centrifugo/admin/api/testing/send-ack/
|
|
87
|
-
*/
|
|
88
|
-
export async function createCentrifugoAdminApiTestingSendAckCreate( data: ManualAckRequestRequest, client?: any
|
|
89
|
-
): Promise<ManualAckResponse> {
|
|
90
|
-
const api = client || getAPIInstance()
|
|
91
|
-
const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingSendAckCreate(data)
|
|
92
|
-
return ManualAckResponseSchema.parse(response)
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
40
|
/**
|
|
97
41
|
* Generate connection token
|
|
98
42
|
*
|
|
@@ -19,20 +19,6 @@ import { useSWRConfig } from 'swr'
|
|
|
19
19
|
import * as Fetchers from '../fetchers/cfg__centrifugo'
|
|
20
20
|
import type { API } from '../../index'
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* API operation
|
|
24
|
-
*
|
|
25
|
-
* @method GET
|
|
26
|
-
* @path /cfg/centrifugo/admin/api/monitor/channels/
|
|
27
|
-
*/
|
|
28
|
-
export function useCentrifugoAdminApiMonitorChannelsRetrieve(client?: API): ReturnType<typeof useSWR<any>> {
|
|
29
|
-
return useSWR<any>(
|
|
30
|
-
'cfg-centrifugo-admin-api-monitor-channel',
|
|
31
|
-
() => Fetchers.getCentrifugoAdminApiMonitorChannelsRetrieve(client)
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
22
|
/**
|
|
37
23
|
* API operation
|
|
38
24
|
*
|
|
@@ -28,114 +28,6 @@ import type { CentrifugoPresenceResponse } from '../schemas/CentrifugoPresenceRe
|
|
|
28
28
|
import type { CentrifugoPresenceStatsRequestRequest } from '../schemas/CentrifugoPresenceStatsRequestRequest.schema'
|
|
29
29
|
import type { CentrifugoPresenceStatsResponse } from '../schemas/CentrifugoPresenceStatsResponse.schema'
|
|
30
30
|
|
|
31
|
-
/**
|
|
32
|
-
* Get connection token for dashboard
|
|
33
|
-
*
|
|
34
|
-
* @method POST
|
|
35
|
-
* @path /cfg/centrifugo/admin/api/server/auth/token/
|
|
36
|
-
*/
|
|
37
|
-
export function useCreateCentrifugoAdminApiServerAuthTokenCreate() {
|
|
38
|
-
const { mutate } = useSWRConfig()
|
|
39
|
-
|
|
40
|
-
return async (client?: API): Promise<any> => {
|
|
41
|
-
const result = await Fetchers.createCentrifugoAdminApiServerAuthTokenCreate(client)
|
|
42
|
-
// Revalidate related queries
|
|
43
|
-
mutate('cfg-centrifugo-admin-api-server-auth-token')
|
|
44
|
-
return result
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* List active channels
|
|
51
|
-
*
|
|
52
|
-
* @method POST
|
|
53
|
-
* @path /cfg/centrifugo/admin/api/server/channels/
|
|
54
|
-
*/
|
|
55
|
-
export function useCreateCentrifugoAdminApiServerChannelsCreate() {
|
|
56
|
-
const { mutate } = useSWRConfig()
|
|
57
|
-
|
|
58
|
-
return async (data: CentrifugoChannelsRequestRequest, client?: API): Promise<CentrifugoChannelsResponse> => {
|
|
59
|
-
const result = await Fetchers.createCentrifugoAdminApiServerChannelsCreate(data, client)
|
|
60
|
-
// Revalidate related queries
|
|
61
|
-
mutate('cfg-centrifugo-admin-api-server-channels')
|
|
62
|
-
return result
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Get channel history
|
|
69
|
-
*
|
|
70
|
-
* @method POST
|
|
71
|
-
* @path /cfg/centrifugo/admin/api/server/history/
|
|
72
|
-
*/
|
|
73
|
-
export function useCreateCentrifugoAdminApiServerHistoryCreate() {
|
|
74
|
-
const { mutate } = useSWRConfig()
|
|
75
|
-
|
|
76
|
-
return async (data: CentrifugoHistoryRequestRequest, client?: API): Promise<CentrifugoHistoryResponse> => {
|
|
77
|
-
const result = await Fetchers.createCentrifugoAdminApiServerHistoryCreate(data, client)
|
|
78
|
-
// Revalidate related queries
|
|
79
|
-
mutate('cfg-centrifugo-admin-api-server-history')
|
|
80
|
-
return result
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Get Centrifugo server info
|
|
87
|
-
*
|
|
88
|
-
* @method POST
|
|
89
|
-
* @path /cfg/centrifugo/admin/api/server/info/
|
|
90
|
-
*/
|
|
91
|
-
export function useCreateCentrifugoAdminApiServerInfoCreate() {
|
|
92
|
-
const { mutate } = useSWRConfig()
|
|
93
|
-
|
|
94
|
-
return async (client?: API): Promise<CentrifugoInfoResponse> => {
|
|
95
|
-
const result = await Fetchers.createCentrifugoAdminApiServerInfoCreate(client)
|
|
96
|
-
// Revalidate related queries
|
|
97
|
-
mutate('cfg-centrifugo-admin-api-server-info')
|
|
98
|
-
return result
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Get channel presence
|
|
105
|
-
*
|
|
106
|
-
* @method POST
|
|
107
|
-
* @path /cfg/centrifugo/admin/api/server/presence/
|
|
108
|
-
*/
|
|
109
|
-
export function useCreateCentrifugoAdminApiServerPresenceCreate() {
|
|
110
|
-
const { mutate } = useSWRConfig()
|
|
111
|
-
|
|
112
|
-
return async (data: CentrifugoPresenceRequestRequest, client?: API): Promise<CentrifugoPresenceResponse> => {
|
|
113
|
-
const result = await Fetchers.createCentrifugoAdminApiServerPresenceCreate(data, client)
|
|
114
|
-
// Revalidate related queries
|
|
115
|
-
mutate('cfg-centrifugo-admin-api-server-presence')
|
|
116
|
-
return result
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Get channel presence statistics
|
|
123
|
-
*
|
|
124
|
-
* @method POST
|
|
125
|
-
* @path /cfg/centrifugo/admin/api/server/presence-stats/
|
|
126
|
-
*/
|
|
127
|
-
export function useCreateCentrifugoAdminApiServerPresenceStatsCreate() {
|
|
128
|
-
const { mutate } = useSWRConfig()
|
|
129
|
-
|
|
130
|
-
return async (data: CentrifugoPresenceStatsRequestRequest, client?: API): Promise<CentrifugoPresenceStatsResponse> => {
|
|
131
|
-
const result = await Fetchers.createCentrifugoAdminApiServerPresenceStatsCreate(data, client)
|
|
132
|
-
// Revalidate related queries
|
|
133
|
-
mutate('cfg-centrifugo-admin-api-server-presence-stats')
|
|
134
|
-
return result
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
31
|
/**
|
|
140
32
|
* Get connection token for dashboard
|
|
141
33
|
*
|
|
@@ -23,62 +23,6 @@ import type { HealthCheck } from '../schemas/HealthCheck.schema'
|
|
|
23
23
|
import type { OverviewStats } from '../schemas/OverviewStats.schema'
|
|
24
24
|
import type { RecentPublishes } from '../schemas/RecentPublishes.schema'
|
|
25
25
|
|
|
26
|
-
/**
|
|
27
|
-
* Get Centrifugo health status
|
|
28
|
-
*
|
|
29
|
-
* @method GET
|
|
30
|
-
* @path /cfg/centrifugo/admin/api/monitor/health/
|
|
31
|
-
*/
|
|
32
|
-
export function useCentrifugoAdminApiMonitorHealthRetrieve(client?: API): ReturnType<typeof useSWR<HealthCheck>> {
|
|
33
|
-
return useSWR<HealthCheck>(
|
|
34
|
-
'cfg-centrifugo-admin-api-monitor-health',
|
|
35
|
-
() => Fetchers.getCentrifugoAdminApiMonitorHealthRetrieve(client)
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Get overview statistics
|
|
42
|
-
*
|
|
43
|
-
* @method GET
|
|
44
|
-
* @path /cfg/centrifugo/admin/api/monitor/overview/
|
|
45
|
-
*/
|
|
46
|
-
export function useCentrifugoAdminApiMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<OverviewStats>> {
|
|
47
|
-
return useSWR<OverviewStats>(
|
|
48
|
-
params ? ['cfg-centrifugo-admin-api-monitor-overview', params] : 'cfg-centrifugo-admin-api-monitor-overview',
|
|
49
|
-
() => Fetchers.getCentrifugoAdminApiMonitorOverviewRetrieve(params, client)
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Get recent publishes
|
|
56
|
-
*
|
|
57
|
-
* @method GET
|
|
58
|
-
* @path /cfg/centrifugo/admin/api/monitor/publishes/
|
|
59
|
-
*/
|
|
60
|
-
export function useCentrifugoAdminApiMonitorPublishesRetrieve(params?: { channel?: string; count?: number; offset?: number; status?: string }, client?: API): ReturnType<typeof useSWR<RecentPublishes>> {
|
|
61
|
-
return useSWR<RecentPublishes>(
|
|
62
|
-
params ? ['cfg-centrifugo-admin-api-monitor-publishe', params] : 'cfg-centrifugo-admin-api-monitor-publishe',
|
|
63
|
-
() => Fetchers.getCentrifugoAdminApiMonitorPublishesRetrieve(params, client)
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Get channel statistics
|
|
70
|
-
*
|
|
71
|
-
* @method GET
|
|
72
|
-
* @path /cfg/centrifugo/admin/api/monitor/timeline/
|
|
73
|
-
*/
|
|
74
|
-
export function useCentrifugoAdminApiMonitorTimelineRetrieve(params?: { hours?: number; interval?: string }, client?: API): ReturnType<typeof useSWR<ChannelList>> {
|
|
75
|
-
return useSWR<ChannelList>(
|
|
76
|
-
params ? ['cfg-centrifugo-admin-api-monitor-timeline', params] : 'cfg-centrifugo-admin-api-monitor-timeline',
|
|
77
|
-
() => Fetchers.getCentrifugoAdminApiMonitorTimelineRetrieve(params, client)
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
26
|
/**
|
|
83
27
|
* Get Centrifugo health status
|
|
84
28
|
*
|
|
@@ -25,78 +25,6 @@ import type { ManualAckResponse } from '../schemas/ManualAckResponse.schema'
|
|
|
25
25
|
import type { PublishTestRequestRequest } from '../schemas/PublishTestRequestRequest.schema'
|
|
26
26
|
import type { PublishTestResponse } from '../schemas/PublishTestResponse.schema'
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* Generate connection token
|
|
30
|
-
*
|
|
31
|
-
* @method POST
|
|
32
|
-
* @path /cfg/centrifugo/admin/api/testing/connection-token/
|
|
33
|
-
*/
|
|
34
|
-
export function useCreateCentrifugoAdminApiTestingConnectionTokenCreate() {
|
|
35
|
-
const { mutate } = useSWRConfig()
|
|
36
|
-
|
|
37
|
-
return async (data: ConnectionTokenRequestRequest, client?: API): Promise<ConnectionTokenResponse> => {
|
|
38
|
-
const result = await Fetchers.createCentrifugoAdminApiTestingConnectionTokenCreate(data, client)
|
|
39
|
-
// Revalidate related queries
|
|
40
|
-
mutate('cfg-centrifugo-admin-api-testing-connection-token')
|
|
41
|
-
return result
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Publish test message
|
|
48
|
-
*
|
|
49
|
-
* @method POST
|
|
50
|
-
* @path /cfg/centrifugo/admin/api/testing/publish-test/
|
|
51
|
-
*/
|
|
52
|
-
export function useCreateCentrifugoAdminApiTestingPublishTestCreate() {
|
|
53
|
-
const { mutate } = useSWRConfig()
|
|
54
|
-
|
|
55
|
-
return async (data: PublishTestRequestRequest, client?: API): Promise<PublishTestResponse> => {
|
|
56
|
-
const result = await Fetchers.createCentrifugoAdminApiTestingPublishTestCreate(data, client)
|
|
57
|
-
// Revalidate related queries
|
|
58
|
-
mutate('cfg-centrifugo-admin-api-testing-publish-test')
|
|
59
|
-
return result
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Publish with database logging
|
|
66
|
-
*
|
|
67
|
-
* @method POST
|
|
68
|
-
* @path /cfg/centrifugo/admin/api/testing/publish-with-logging/
|
|
69
|
-
*/
|
|
70
|
-
export function useCreateCentrifugoAdminApiTestingPublishWithLoggingCreate() {
|
|
71
|
-
const { mutate } = useSWRConfig()
|
|
72
|
-
|
|
73
|
-
return async (data: PublishTestRequestRequest, client?: API): Promise<PublishTestResponse> => {
|
|
74
|
-
const result = await Fetchers.createCentrifugoAdminApiTestingPublishWithLoggingCreate(data, client)
|
|
75
|
-
// Revalidate related queries
|
|
76
|
-
mutate('cfg-centrifugo-admin-api-testing-publish-with-logging')
|
|
77
|
-
return result
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Send manual ACK
|
|
84
|
-
*
|
|
85
|
-
* @method POST
|
|
86
|
-
* @path /cfg/centrifugo/admin/api/testing/send-ack/
|
|
87
|
-
*/
|
|
88
|
-
export function useCreateCentrifugoAdminApiTestingSendAckCreate() {
|
|
89
|
-
const { mutate } = useSWRConfig()
|
|
90
|
-
|
|
91
|
-
return async (data: ManualAckRequestRequest, client?: API): Promise<ManualAckResponse> => {
|
|
92
|
-
const result = await Fetchers.createCentrifugoAdminApiTestingSendAckCreate(data, client)
|
|
93
|
-
// Revalidate related queries
|
|
94
|
-
mutate('cfg-centrifugo-admin-api-testing-send-ack')
|
|
95
|
-
return result
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
28
|
/**
|
|
101
29
|
* Generate connection token
|
|
102
30
|
*
|
|
@@ -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
|
*
|