@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.
Files changed (80) hide show
  1. package/dist/index.cjs +6912 -5124
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +6992 -4881
  4. package/dist/index.d.ts +6992 -4881
  5. package/dist/index.mjs +7024 -5247
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +211 -0
  9. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +150 -0
  10. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +152 -0
  11. package/src/cfg/generated/_utils/fetchers/index.ts +3 -2
  12. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +246 -0
  13. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +137 -0
  14. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +171 -0
  15. package/src/cfg/generated/_utils/hooks/index.ts +3 -2
  16. package/src/cfg/generated/_utils/schemas/CentrifugoChannelInfo.schema.ts +19 -0
  17. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +19 -0
  18. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResponse.schema.ts +22 -0
  19. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResult.schema.ts +19 -0
  20. package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +22 -0
  21. package/src/cfg/generated/_utils/schemas/CentrifugoError.schema.ts +20 -0
  22. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +23 -0
  23. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResponse.schema.ts +22 -0
  24. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResult.schema.ts +22 -0
  25. package/src/cfg/generated/_utils/schemas/CentrifugoInfoResponse.schema.ts +22 -0
  26. package/src/cfg/generated/_utils/schemas/CentrifugoInfoResult.schema.ts +20 -0
  27. package/src/cfg/generated/_utils/schemas/CentrifugoMetrics.schema.ts +20 -0
  28. package/src/cfg/generated/_utils/schemas/CentrifugoNodeInfo.schema.ts +30 -0
  29. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +19 -0
  30. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResponse.schema.ts +22 -0
  31. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResult.schema.ts +19 -0
  32. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +19 -0
  33. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +22 -0
  34. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +20 -0
  35. package/src/cfg/generated/_utils/schemas/CentrifugoProcess.schema.ts +20 -0
  36. package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +23 -0
  37. package/src/cfg/generated/_utils/schemas/CentrifugoStreamPosition.schema.ts +20 -0
  38. package/src/cfg/generated/_utils/schemas/ChannelList.schema.ts +21 -0
  39. package/src/cfg/generated/_utils/schemas/ChannelStatsSerializer.schema.ts +24 -0
  40. package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +20 -0
  41. package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +21 -0
  42. package/src/cfg/generated/_utils/schemas/HealthCheck.schema.ts +5 -7
  43. package/src/cfg/generated/_utils/schemas/ManualAckRequestRequest.schema.ts +20 -0
  44. package/src/cfg/generated/_utils/schemas/ManualAckResponse.schema.ts +21 -0
  45. package/src/cfg/generated/_utils/schemas/OverviewStats.schema.ts +9 -12
  46. package/src/cfg/generated/_utils/schemas/PublishTestRequestRequest.schema.ts +22 -0
  47. package/src/cfg/generated/_utils/schemas/PublishTestResponse.schema.ts +24 -0
  48. package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +21 -0
  49. package/src/cfg/generated/_utils/schemas/index.ts +31 -10
  50. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/client.ts +136 -0
  51. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +256 -0
  52. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +160 -0
  53. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +86 -0
  54. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +100 -0
  55. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/index.ts +2 -0
  56. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +88 -0
  57. package/src/cfg/generated/cfg__health/models.ts +7 -11
  58. package/src/cfg/generated/client.ts +9 -6
  59. package/src/cfg/generated/index.ts +15 -10
  60. package/src/cfg/generated/schema.ts +4463 -3169
  61. package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_monitoring.ts +0 -179
  62. package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_testing.ts +0 -151
  63. package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_monitoring.ts +0 -166
  64. package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_testing.ts +0 -162
  65. package/src/cfg/generated/_utils/schemas/LoadTestRequestRequest.schema.ts +0 -22
  66. package/src/cfg/generated/_utils/schemas/LoadTestResponse.schema.ts +0 -21
  67. package/src/cfg/generated/_utils/schemas/LoadTestStatus.schema.ts +0 -27
  68. package/src/cfg/generated/_utils/schemas/MethodStat.schema.ts +0 -25
  69. package/src/cfg/generated/_utils/schemas/MethodStats.schema.ts +0 -22
  70. package/src/cfg/generated/_utils/schemas/NotificationStats.schema.ts +0 -25
  71. package/src/cfg/generated/_utils/schemas/RPCRequest.schema.ts +0 -25
  72. package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +0 -22
  73. package/src/cfg/generated/_utils/schemas/TestRPCRequestRequest.schema.ts +0 -21
  74. package/src/cfg/generated/_utils/schemas/TestRPCResponse.schema.ts +0 -23
  75. package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/client.ts +0 -136
  76. package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/models.ts +0 -144
  77. package/src/cfg/generated/cfg__ipc__ipcrpc_testing/client.ts +0 -96
  78. package/src/cfg/generated/cfg__ipc__ipcrpc_testing/models.ts +0 -88
  79. /package/src/cfg/generated/{cfg__ipc__ipcrpc_monitoring → cfg__centrifugo__centrifugo_admin_api}/index.ts +0 -0
  80. /package/src/cfg/generated/{cfg__ipc__ipcrpc_testing → cfg__centrifugo__centrifugo_monitoring}/index.ts +0 -0
@@ -1,179 +0,0 @@
1
- /**
2
- * Typed fetchers for IPC/RPC Monitoring
3
- *
4
- * Universal functions that work in any environment:
5
- * - Next.js (App Router / Pages Router / Server Components)
6
- * - React Native
7
- * - Node.js backend
8
- *
9
- * These fetchers use Zod schemas for runtime validation.
10
- *
11
- * Usage:
12
- * ```typescript
13
- * // Configure API once (in your app entry point)
14
- * import { configureAPI } from '../../api-instance'
15
- * configureAPI({ baseUrl: 'https://api.example.com' })
16
- *
17
- * // Then use fetchers anywhere
18
- * const users = await getUsers({ page: 1 })
19
- *
20
- * // With SWR
21
- * const { data } = useSWR(['users', params], () => getUsers(params))
22
- *
23
- * // With React Query
24
- * const { data } = useQuery(['users', params], () => getUsers(params))
25
- *
26
- * // In Server Component or SSR (pass custom client)
27
- * import { API } from '../../index'
28
- * const api = new API('https://api.example.com')
29
- * const users = await getUsers({ page: 1 }, api)
30
- * ```
31
- */
32
- import { HealthCheckSchema, type HealthCheck } from '../schemas/HealthCheck.schema'
33
- import { MethodStatsSchema, type MethodStats } from '../schemas/MethodStats.schema'
34
- import { NotificationStatsSchema, type NotificationStats } from '../schemas/NotificationStats.schema'
35
- import { OverviewStatsSchema, type OverviewStats } from '../schemas/OverviewStats.schema'
36
- import { RecentRequestsSchema, type RecentRequests } from '../schemas/RecentRequests.schema'
37
- import { getAPIInstance } from '../../api-instance'
38
- import type { API } from '../../index'
39
-
40
- /**
41
- * Get RPC health status
42
- *
43
- * @method GET
44
- * @path /cfg/ipc/admin/api/monitor/health/
45
- */
46
- export async function getIpcAdminApiMonitorHealthRetrieve( client?
47
- ): Promise<HealthCheck> {
48
- const api = client || getAPIInstance()
49
- const response = await api.cfg_ipcrpc_monitoring.ipcAdminApiMonitorHealthRetrieve()
50
- return HealthCheckSchema.parse(response)
51
- }
52
-
53
-
54
- /**
55
- * Get method statistics
56
- *
57
- * @method GET
58
- * @path /cfg/ipc/admin/api/monitor/methods/
59
- */
60
- export async function getIpcAdminApiMonitorMethodsRetrieve( client?
61
- ): Promise<MethodStats> {
62
- const api = client || getAPIInstance()
63
- const response = await api.cfg_ipcrpc_monitoring.ipcAdminApiMonitorMethodsRetrieve()
64
- return MethodStatsSchema.parse(response)
65
- }
66
-
67
-
68
- /**
69
- * Get notification statistics
70
- *
71
- * @method GET
72
- * @path /cfg/ipc/admin/api/monitor/notifications/
73
- */
74
- export async function getIpcAdminApiMonitorNotificationsRetrieve( client?
75
- ): Promise<NotificationStats> {
76
- const api = client || getAPIInstance()
77
- const response = await api.cfg_ipcrpc_monitoring.ipcAdminApiMonitorNotificationsRetrieve()
78
- return NotificationStatsSchema.parse(response)
79
- }
80
-
81
-
82
- /**
83
- * Get overview statistics
84
- *
85
- * @method GET
86
- * @path /cfg/ipc/admin/api/monitor/overview/
87
- */
88
- export async function getIpcAdminApiMonitorOverviewRetrieve( client?
89
- ): Promise<OverviewStats> {
90
- const api = client || getAPIInstance()
91
- const response = await api.cfg_ipcrpc_monitoring.ipcAdminApiMonitorOverviewRetrieve()
92
- return OverviewStatsSchema.parse(response)
93
- }
94
-
95
-
96
- /**
97
- * Get recent RPC requests
98
- *
99
- * @method GET
100
- * @path /cfg/ipc/admin/api/monitor/requests/
101
- */
102
- export async function getIpcAdminApiMonitorRequestsRetrieve( params?: { count?: number }, client?
103
- ): Promise<RecentRequests> {
104
- const api = client || getAPIInstance()
105
- const response = await api.cfg_ipcrpc_monitoring.ipcAdminApiMonitorRequestsRetrieve(params?.count)
106
- return RecentRequestsSchema.parse(response)
107
- }
108
-
109
-
110
- /**
111
- * Get RPC health status
112
- *
113
- * @method GET
114
- * @path /cfg/ipc/monitor/health/
115
- */
116
- export async function getIpcMonitorHealthRetrieve( client?
117
- ): Promise<HealthCheck> {
118
- const api = client || getAPIInstance()
119
- const response = await api.cfg_ipcrpc_monitoring.ipcMonitorHealthRetrieve()
120
- return HealthCheckSchema.parse(response)
121
- }
122
-
123
-
124
- /**
125
- * Get method statistics
126
- *
127
- * @method GET
128
- * @path /cfg/ipc/monitor/methods/
129
- */
130
- export async function getIpcMonitorMethodsRetrieve( client?
131
- ): Promise<MethodStats> {
132
- const api = client || getAPIInstance()
133
- const response = await api.cfg_ipcrpc_monitoring.ipcMonitorMethodsRetrieve()
134
- return MethodStatsSchema.parse(response)
135
- }
136
-
137
-
138
- /**
139
- * Get notification statistics
140
- *
141
- * @method GET
142
- * @path /cfg/ipc/monitor/notifications/
143
- */
144
- export async function getIpcMonitorNotificationsRetrieve( client?
145
- ): Promise<NotificationStats> {
146
- const api = client || getAPIInstance()
147
- const response = await api.cfg_ipcrpc_monitoring.ipcMonitorNotificationsRetrieve()
148
- return NotificationStatsSchema.parse(response)
149
- }
150
-
151
-
152
- /**
153
- * Get overview statistics
154
- *
155
- * @method GET
156
- * @path /cfg/ipc/monitor/overview/
157
- */
158
- export async function getIpcMonitorOverviewRetrieve( client?
159
- ): Promise<OverviewStats> {
160
- const api = client || getAPIInstance()
161
- const response = await api.cfg_ipcrpc_monitoring.ipcMonitorOverviewRetrieve()
162
- return OverviewStatsSchema.parse(response)
163
- }
164
-
165
-
166
- /**
167
- * Get recent RPC requests
168
- *
169
- * @method GET
170
- * @path /cfg/ipc/monitor/requests/
171
- */
172
- export async function getIpcMonitorRequestsRetrieve( params?: { count?: number }, client?
173
- ): Promise<RecentRequests> {
174
- const api = client || getAPIInstance()
175
- const response = await api.cfg_ipcrpc_monitoring.ipcMonitorRequestsRetrieve(params?.count)
176
- return RecentRequestsSchema.parse(response)
177
- }
178
-
179
-
@@ -1,151 +0,0 @@
1
- /**
2
- * Typed fetchers for IPC/RPC Testing
3
- *
4
- * Universal functions that work in any environment:
5
- * - Next.js (App Router / Pages Router / Server Components)
6
- * - React Native
7
- * - Node.js backend
8
- *
9
- * These fetchers use Zod schemas for runtime validation.
10
- *
11
- * Usage:
12
- * ```typescript
13
- * // Configure API once (in your app entry point)
14
- * import { configureAPI } from '../../api-instance'
15
- * configureAPI({ baseUrl: 'https://api.example.com' })
16
- *
17
- * // Then use fetchers anywhere
18
- * const users = await getUsers({ page: 1 })
19
- *
20
- * // With SWR
21
- * const { data } = useSWR(['users', params], () => getUsers(params))
22
- *
23
- * // With React Query
24
- * const { data } = useQuery(['users', params], () => getUsers(params))
25
- *
26
- * // In Server Component or SSR (pass custom client)
27
- * import { API } from '../../index'
28
- * const api = new API('https://api.example.com')
29
- * const users = await getUsers({ page: 1 }, api)
30
- * ```
31
- */
32
- import { LoadTestRequestRequestSchema, type LoadTestRequestRequest } from '../schemas/LoadTestRequestRequest.schema'
33
- import { LoadTestResponseSchema, type LoadTestResponse } from '../schemas/LoadTestResponse.schema'
34
- import { LoadTestStatusSchema, type LoadTestStatus } from '../schemas/LoadTestStatus.schema'
35
- import { TestRPCRequestRequestSchema, type TestRPCRequestRequest } from '../schemas/TestRPCRequestRequest.schema'
36
- import { TestRPCResponseSchema, type TestRPCResponse } from '../schemas/TestRPCResponse.schema'
37
- import { getAPIInstance } from '../../api-instance'
38
- import type { API } from '../../index'
39
-
40
- /**
41
- * Start load test
42
- *
43
- * @method POST
44
- * @path /cfg/ipc/admin/api/test/load/start/
45
- */
46
- export async function createIpcAdminApiTestLoadStartCreate( data: LoadTestRequestRequest, client?
47
- ): Promise<LoadTestResponse> {
48
- const api = client || getAPIInstance()
49
- const response = await api.cfg_ipcrpc_testing.ipcAdminApiTestLoadStartCreate(data)
50
- return LoadTestResponseSchema.parse(response)
51
- }
52
-
53
-
54
- /**
55
- * Get load test status
56
- *
57
- * @method GET
58
- * @path /cfg/ipc/admin/api/test/load/status/
59
- */
60
- export async function getIpcAdminApiTestLoadStatusRetrieve( client?
61
- ): Promise<LoadTestStatus> {
62
- const api = client || getAPIInstance()
63
- const response = await api.cfg_ipcrpc_testing.ipcAdminApiTestLoadStatusRetrieve()
64
- return LoadTestStatusSchema.parse(response)
65
- }
66
-
67
-
68
- /**
69
- * Stop load test
70
- *
71
- * @method POST
72
- * @path /cfg/ipc/admin/api/test/load/stop/
73
- */
74
- export async function createIpcAdminApiTestLoadStopCreate( data: TestRPCRequestRequest, client?
75
- ): Promise<any> {
76
- const api = client || getAPIInstance()
77
- const response = await api.cfg_ipcrpc_testing.ipcAdminApiTestLoadStopCreate(data)
78
- return response
79
- }
80
-
81
-
82
- /**
83
- * Send test RPC request
84
- *
85
- * @method POST
86
- * @path /cfg/ipc/admin/api/test/send/
87
- */
88
- export async function createIpcAdminApiTestSendCreate( data: TestRPCRequestRequest, client?
89
- ): Promise<TestRPCResponse> {
90
- const api = client || getAPIInstance()
91
- const response = await api.cfg_ipcrpc_testing.ipcAdminApiTestSendCreate(data)
92
- return TestRPCResponseSchema.parse(response)
93
- }
94
-
95
-
96
- /**
97
- * Start load test
98
- *
99
- * @method POST
100
- * @path /cfg/ipc/test/load/start/
101
- */
102
- export async function createIpcTestLoadStartCreate( data: LoadTestRequestRequest, client?
103
- ): Promise<LoadTestResponse> {
104
- const api = client || getAPIInstance()
105
- const response = await api.cfg_ipcrpc_testing.ipcTestLoadStartCreate(data)
106
- return LoadTestResponseSchema.parse(response)
107
- }
108
-
109
-
110
- /**
111
- * Get load test status
112
- *
113
- * @method GET
114
- * @path /cfg/ipc/test/load/status/
115
- */
116
- export async function getIpcTestLoadStatusRetrieve( client?
117
- ): Promise<LoadTestStatus> {
118
- const api = client || getAPIInstance()
119
- const response = await api.cfg_ipcrpc_testing.ipcTestLoadStatusRetrieve()
120
- return LoadTestStatusSchema.parse(response)
121
- }
122
-
123
-
124
- /**
125
- * Stop load test
126
- *
127
- * @method POST
128
- * @path /cfg/ipc/test/load/stop/
129
- */
130
- export async function createIpcTestLoadStopCreate( data: TestRPCRequestRequest, client?
131
- ): Promise<any> {
132
- const api = client || getAPIInstance()
133
- const response = await api.cfg_ipcrpc_testing.ipcTestLoadStopCreate(data)
134
- return response
135
- }
136
-
137
-
138
- /**
139
- * Send test RPC request
140
- *
141
- * @method POST
142
- * @path /cfg/ipc/test/send/
143
- */
144
- export async function createIpcTestSendCreate( data: TestRPCRequestRequest, client?
145
- ): Promise<TestRPCResponse> {
146
- const api = client || getAPIInstance()
147
- const response = await api.cfg_ipcrpc_testing.ipcTestSendCreate(data)
148
- return TestRPCResponseSchema.parse(response)
149
- }
150
-
151
-
@@ -1,166 +0,0 @@
1
- /**
2
- * SWR Hooks for IPC/RPC Monitoring
3
- *
4
- * React hooks powered by SWR for data fetching with automatic caching,
5
- * revalidation, and optimistic updates.
6
- *
7
- * Usage:
8
- * ```typescript
9
- * // Query hooks (GET)
10
- * const { data, error, isLoading } = useUsers({ page: 1 })
11
- *
12
- * // Mutation hooks (POST/PUT/PATCH/DELETE)
13
- * const createUser = useCreateUser()
14
- * await createUser({ name: 'John', email: 'john@example.com' })
15
- * ```
16
- */
17
- import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
- import * as Fetchers from '../fetchers/cfg__ipc__ipcrpc_monitoring'
20
- import type { API } from '../../index'
21
- import type { HealthCheck } from '../schemas/HealthCheck.schema'
22
- import type { MethodStats } from '../schemas/MethodStats.schema'
23
- import type { NotificationStats } from '../schemas/NotificationStats.schema'
24
- import type { OverviewStats } from '../schemas/OverviewStats.schema'
25
- import type { RecentRequests } from '../schemas/RecentRequests.schema'
26
-
27
- /**
28
- * Get RPC health status
29
- *
30
- * @method GET
31
- * @path /cfg/ipc/admin/api/monitor/health/
32
- */
33
- export function useIpcAdminApiMonitorHealthRetrieve(client?: API): ReturnType<typeof useSWR<HealthCheck>> {
34
- return useSWR<HealthCheck>(
35
- 'cfg-ipc-admin-api-monitor-health',
36
- () => Fetchers.getIpcAdminApiMonitorHealthRetrieve(client)
37
- )
38
- }
39
-
40
-
41
- /**
42
- * Get method statistics
43
- *
44
- * @method GET
45
- * @path /cfg/ipc/admin/api/monitor/methods/
46
- */
47
- export function useIpcAdminApiMonitorMethodsRetrieve(client?: API): ReturnType<typeof useSWR<MethodStats>> {
48
- return useSWR<MethodStats>(
49
- 'cfg-ipc-admin-api-monitor-method',
50
- () => Fetchers.getIpcAdminApiMonitorMethodsRetrieve(client)
51
- )
52
- }
53
-
54
-
55
- /**
56
- * Get notification statistics
57
- *
58
- * @method GET
59
- * @path /cfg/ipc/admin/api/monitor/notifications/
60
- */
61
- export function useIpcAdminApiMonitorNotificationsRetrieve(client?: API): ReturnType<typeof useSWR<NotificationStats>> {
62
- return useSWR<NotificationStats>(
63
- 'cfg-ipc-admin-api-monitor-notification',
64
- () => Fetchers.getIpcAdminApiMonitorNotificationsRetrieve(client)
65
- )
66
- }
67
-
68
-
69
- /**
70
- * Get overview statistics
71
- *
72
- * @method GET
73
- * @path /cfg/ipc/admin/api/monitor/overview/
74
- */
75
- export function useIpcAdminApiMonitorOverviewRetrieve(client?: API): ReturnType<typeof useSWR<OverviewStats>> {
76
- return useSWR<OverviewStats>(
77
- 'cfg-ipc-admin-api-monitor-overview',
78
- () => Fetchers.getIpcAdminApiMonitorOverviewRetrieve(client)
79
- )
80
- }
81
-
82
-
83
- /**
84
- * Get recent RPC requests
85
- *
86
- * @method GET
87
- * @path /cfg/ipc/admin/api/monitor/requests/
88
- */
89
- export function useIpcAdminApiMonitorRequestsRetrieve(params?: { count?: number }, client?: API): ReturnType<typeof useSWR<RecentRequests>> {
90
- return useSWR<RecentRequests>(
91
- params ? ['cfg-ipc-admin-api-monitor-request', params] : 'cfg-ipc-admin-api-monitor-request',
92
- () => Fetchers.getIpcAdminApiMonitorRequestsRetrieve(params, client)
93
- )
94
- }
95
-
96
-
97
- /**
98
- * Get RPC health status
99
- *
100
- * @method GET
101
- * @path /cfg/ipc/monitor/health/
102
- */
103
- export function useIpcMonitorHealthRetrieve(client?: API): ReturnType<typeof useSWR<HealthCheck>> {
104
- return useSWR<HealthCheck>(
105
- 'cfg-ipc-monitor-health',
106
- () => Fetchers.getIpcMonitorHealthRetrieve(client)
107
- )
108
- }
109
-
110
-
111
- /**
112
- * Get method statistics
113
- *
114
- * @method GET
115
- * @path /cfg/ipc/monitor/methods/
116
- */
117
- export function useIpcMonitorMethodsRetrieve(client?: API): ReturnType<typeof useSWR<MethodStats>> {
118
- return useSWR<MethodStats>(
119
- 'cfg-ipc-monitor-method',
120
- () => Fetchers.getIpcMonitorMethodsRetrieve(client)
121
- )
122
- }
123
-
124
-
125
- /**
126
- * Get notification statistics
127
- *
128
- * @method GET
129
- * @path /cfg/ipc/monitor/notifications/
130
- */
131
- export function useIpcMonitorNotificationsRetrieve(client?: API): ReturnType<typeof useSWR<NotificationStats>> {
132
- return useSWR<NotificationStats>(
133
- 'cfg-ipc-monitor-notification',
134
- () => Fetchers.getIpcMonitorNotificationsRetrieve(client)
135
- )
136
- }
137
-
138
-
139
- /**
140
- * Get overview statistics
141
- *
142
- * @method GET
143
- * @path /cfg/ipc/monitor/overview/
144
- */
145
- export function useIpcMonitorOverviewRetrieve(client?: API): ReturnType<typeof useSWR<OverviewStats>> {
146
- return useSWR<OverviewStats>(
147
- 'cfg-ipc-monitor-overview',
148
- () => Fetchers.getIpcMonitorOverviewRetrieve(client)
149
- )
150
- }
151
-
152
-
153
- /**
154
- * Get recent RPC requests
155
- *
156
- * @method GET
157
- * @path /cfg/ipc/monitor/requests/
158
- */
159
- export function useIpcMonitorRequestsRetrieve(params?: { count?: number }, client?: API): ReturnType<typeof useSWR<RecentRequests>> {
160
- return useSWR<RecentRequests>(
161
- params ? ['cfg-ipc-monitor-request', params] : 'cfg-ipc-monitor-request',
162
- () => Fetchers.getIpcMonitorRequestsRetrieve(params, client)
163
- )
164
- }
165
-
166
-
@@ -1,162 +0,0 @@
1
- /**
2
- * SWR Hooks for IPC/RPC Testing
3
- *
4
- * React hooks powered by SWR for data fetching with automatic caching,
5
- * revalidation, and optimistic updates.
6
- *
7
- * Usage:
8
- * ```typescript
9
- * // Query hooks (GET)
10
- * const { data, error, isLoading } = useUsers({ page: 1 })
11
- *
12
- * // Mutation hooks (POST/PUT/PATCH/DELETE)
13
- * const createUser = useCreateUser()
14
- * await createUser({ name: 'John', email: 'john@example.com' })
15
- * ```
16
- */
17
- import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
- import * as Fetchers from '../fetchers/cfg__ipc__ipcrpc_testing'
20
- import type { API } from '../../index'
21
- import type { LoadTestRequestRequest } from '../schemas/LoadTestRequestRequest.schema'
22
- import type { LoadTestResponse } from '../schemas/LoadTestResponse.schema'
23
- import type { LoadTestStatus } from '../schemas/LoadTestStatus.schema'
24
- import type { TestRPCRequestRequest } from '../schemas/TestRPCRequestRequest.schema'
25
- import type { TestRPCResponse } from '../schemas/TestRPCResponse.schema'
26
-
27
- /**
28
- * Start load test
29
- *
30
- * @method POST
31
- * @path /cfg/ipc/admin/api/test/load/start/
32
- */
33
- export function useCreateIpcAdminApiTestLoadStartCreate() {
34
- const { mutate } = useSWRConfig()
35
-
36
- return async (data: LoadTestRequestRequest, client?: API): Promise<LoadTestResponse> => {
37
- const result = await Fetchers.createIpcAdminApiTestLoadStartCreate(data, client)
38
- // Revalidate related queries
39
- mutate('cfg-ipc-admin-api-test-load-start')
40
- return result
41
- }
42
- }
43
-
44
-
45
- /**
46
- * Get load test status
47
- *
48
- * @method GET
49
- * @path /cfg/ipc/admin/api/test/load/status/
50
- */
51
- export function useIpcAdminApiTestLoadStatusRetrieve(client?: API): ReturnType<typeof useSWR<LoadTestStatus>> {
52
- return useSWR<LoadTestStatus>(
53
- 'cfg-ipc-admin-api-test-load-statu',
54
- () => Fetchers.getIpcAdminApiTestLoadStatusRetrieve(client)
55
- )
56
- }
57
-
58
-
59
- /**
60
- * Stop load test
61
- *
62
- * @method POST
63
- * @path /cfg/ipc/admin/api/test/load/stop/
64
- */
65
- export function useCreateIpcAdminApiTestLoadStopCreate() {
66
- const { mutate } = useSWRConfig()
67
-
68
- return async (data: TestRPCRequestRequest, client?: API): Promise<any> => {
69
- const result = await Fetchers.createIpcAdminApiTestLoadStopCreate(data, client)
70
- // Revalidate related queries
71
- mutate('cfg-ipc-admin-api-test-load-stop')
72
- return result
73
- }
74
- }
75
-
76
-
77
- /**
78
- * Send test RPC request
79
- *
80
- * @method POST
81
- * @path /cfg/ipc/admin/api/test/send/
82
- */
83
- export function useCreateIpcAdminApiTestSendCreate() {
84
- const { mutate } = useSWRConfig()
85
-
86
- return async (data: TestRPCRequestRequest, client?: API): Promise<TestRPCResponse> => {
87
- const result = await Fetchers.createIpcAdminApiTestSendCreate(data, client)
88
- // Revalidate related queries
89
- mutate('cfg-ipc-admin-api-test-send')
90
- return result
91
- }
92
- }
93
-
94
-
95
- /**
96
- * Start load test
97
- *
98
- * @method POST
99
- * @path /cfg/ipc/test/load/start/
100
- */
101
- export function useCreateIpcTestLoadStartCreate() {
102
- const { mutate } = useSWRConfig()
103
-
104
- return async (data: LoadTestRequestRequest, client?: API): Promise<LoadTestResponse> => {
105
- const result = await Fetchers.createIpcTestLoadStartCreate(data, client)
106
- // Revalidate related queries
107
- mutate('cfg-ipc-test-load-start')
108
- return result
109
- }
110
- }
111
-
112
-
113
- /**
114
- * Get load test status
115
- *
116
- * @method GET
117
- * @path /cfg/ipc/test/load/status/
118
- */
119
- export function useIpcTestLoadStatusRetrieve(client?: API): ReturnType<typeof useSWR<LoadTestStatus>> {
120
- return useSWR<LoadTestStatus>(
121
- 'cfg-ipc-test-load-statu',
122
- () => Fetchers.getIpcTestLoadStatusRetrieve(client)
123
- )
124
- }
125
-
126
-
127
- /**
128
- * Stop load test
129
- *
130
- * @method POST
131
- * @path /cfg/ipc/test/load/stop/
132
- */
133
- export function useCreateIpcTestLoadStopCreate() {
134
- const { mutate } = useSWRConfig()
135
-
136
- return async (data: TestRPCRequestRequest, client?: API): Promise<any> => {
137
- const result = await Fetchers.createIpcTestLoadStopCreate(data, client)
138
- // Revalidate related queries
139
- mutate('cfg-ipc-test-load-stop')
140
- return result
141
- }
142
- }
143
-
144
-
145
- /**
146
- * Send test RPC request
147
- *
148
- * @method POST
149
- * @path /cfg/ipc/test/send/
150
- */
151
- export function useCreateIpcTestSendCreate() {
152
- const { mutate } = useSWRConfig()
153
-
154
- return async (data: TestRPCRequestRequest, client?: API): Promise<TestRPCResponse> => {
155
- const result = await Fetchers.createIpcTestSendCreate(data, client)
156
- // Revalidate related queries
157
- mutate('cfg-ipc-test-send')
158
- return result
159
- }
160
- }
161
-
162
-
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for LoadTestRequestRequest
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Serializer for load test request input.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Serializer for load test request input.
11
- */
12
- export const LoadTestRequestRequestSchema = z.object({
13
- method: z.string().min(1),
14
- total_requests: z.int().min(1.0).max(10000.0),
15
- concurrency: z.int().min(1.0).max(100.0),
16
- params: z.string().optional(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type LoadTestRequestRequest = z.infer<typeof LoadTestRequestRequestSchema>
@@ -1,21 +0,0 @@
1
- /**
2
- * Zod schema for LoadTestResponse
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Serializer for load test response.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Serializer for load test response.
11
- */
12
- export const LoadTestResponseSchema = z.object({
13
- test_id: z.string(),
14
- started: z.boolean(),
15
- message: z.string(),
16
- })
17
-
18
- /**
19
- * Infer TypeScript type from Zod schema
20
- */
21
- export type LoadTestResponse = z.infer<typeof LoadTestResponseSchema>