@djangocfg/api 1.2.4 → 1.2.6

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 (125) hide show
  1. package/dist/index.cjs +7562 -3753
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +8096 -3976
  4. package/dist/index.d.ts +8096 -3976
  5. package/dist/index.mjs +7581 -3799
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/contexts/TasksContext.tsx +242 -0
  9. package/src/cfg/contexts/index.ts +3 -0
  10. package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -2
  11. package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -1
  12. package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -6
  13. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +62 -0
  14. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +211 -0
  15. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +150 -0
  16. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +152 -0
  17. package/src/cfg/generated/_utils/fetchers/cfg__dashboard.ts +150 -0
  18. package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +30 -1
  19. package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -2
  20. package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +57 -57
  21. package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -6
  22. package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -1
  23. package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -3
  24. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -1
  25. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -6
  26. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -1
  27. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -2
  28. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -3
  29. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -1
  30. package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +8 -8
  31. package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -12
  32. package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -10
  33. package/src/cfg/generated/_utils/fetchers/index.ts +5 -2
  34. package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +49 -0
  35. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +246 -0
  36. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +137 -0
  37. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +171 -0
  38. package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +137 -0
  39. package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +29 -0
  40. package/src/cfg/generated/_utils/hooks/index.ts +5 -2
  41. package/src/cfg/generated/_utils/schemas/ActivityEntry.schema.ts +25 -0
  42. package/src/cfg/generated/_utils/schemas/AppStatistics.schema.ts +20 -0
  43. package/src/cfg/generated/_utils/schemas/CentrifugoChannelInfo.schema.ts +19 -0
  44. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +19 -0
  45. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResponse.schema.ts +22 -0
  46. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResult.schema.ts +19 -0
  47. package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +22 -0
  48. package/src/cfg/generated/_utils/schemas/CentrifugoError.schema.ts +20 -0
  49. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +23 -0
  50. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResponse.schema.ts +22 -0
  51. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResult.schema.ts +22 -0
  52. package/src/cfg/generated/_utils/schemas/CentrifugoInfoResponse.schema.ts +22 -0
  53. package/src/cfg/generated/_utils/schemas/CentrifugoInfoResult.schema.ts +20 -0
  54. package/src/cfg/generated/_utils/schemas/CentrifugoMetrics.schema.ts +20 -0
  55. package/src/cfg/generated/_utils/schemas/CentrifugoNodeInfo.schema.ts +30 -0
  56. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +19 -0
  57. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResponse.schema.ts +22 -0
  58. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResult.schema.ts +19 -0
  59. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +19 -0
  60. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +22 -0
  61. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +20 -0
  62. package/src/cfg/generated/_utils/schemas/CentrifugoProcess.schema.ts +20 -0
  63. package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +23 -0
  64. package/src/cfg/generated/_utils/schemas/CentrifugoStreamPosition.schema.ts +20 -0
  65. package/src/cfg/generated/_utils/schemas/ChannelList.schema.ts +21 -0
  66. package/src/cfg/generated/_utils/schemas/ChannelStatsSerializer.schema.ts +25 -0
  67. package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +20 -0
  68. package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +21 -0
  69. package/src/cfg/generated/_utils/schemas/DashboardOverview.schema.ts +27 -0
  70. package/src/cfg/generated/_utils/schemas/HealthCheck.schema.ts +5 -7
  71. package/src/cfg/generated/_utils/schemas/ManualAckRequestRequest.schema.ts +20 -0
  72. package/src/cfg/generated/_utils/schemas/ManualAckResponse.schema.ts +21 -0
  73. package/src/cfg/generated/_utils/schemas/OverviewStats.schema.ts +9 -12
  74. package/src/cfg/generated/_utils/schemas/PublishTestRequestRequest.schema.ts +22 -0
  75. package/src/cfg/generated/_utils/schemas/PublishTestResponse.schema.ts +24 -0
  76. package/src/cfg/generated/_utils/schemas/QuickAction.schema.ts +29 -0
  77. package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +23 -0
  78. package/src/cfg/generated/_utils/schemas/StatCard.schema.ts +30 -0
  79. package/src/cfg/generated/_utils/schemas/SystemHealth.schema.ts +24 -0
  80. package/src/cfg/generated/_utils/schemas/SystemHealthItem.schema.ts +28 -0
  81. package/src/cfg/generated/_utils/schemas/SystemMetrics.schema.ts +25 -0
  82. package/src/cfg/generated/_utils/schemas/URLPattern.schema.ts +26 -0
  83. package/src/cfg/generated/_utils/schemas/URLsList.schema.ts +25 -0
  84. package/src/cfg/generated/_utils/schemas/UserStatistics.schema.ts +22 -0
  85. package/src/cfg/generated/_utils/schemas/index.ts +42 -10
  86. package/src/cfg/generated/cfg__centrifugo/client.ts +30 -0
  87. package/src/cfg/generated/cfg__centrifugo/models.ts +0 -0
  88. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/client.ts +136 -0
  89. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +256 -0
  90. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +160 -0
  91. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/index.ts +2 -0
  92. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +92 -0
  93. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +100 -0
  94. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/index.ts +2 -0
  95. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +88 -0
  96. package/src/cfg/generated/cfg__dashboard/client.ts +106 -0
  97. package/src/cfg/generated/cfg__dashboard/index.ts +2 -0
  98. package/src/cfg/generated/cfg__dashboard/models.ts +108 -0
  99. package/src/cfg/generated/cfg__endpoints/client.ts +16 -0
  100. package/src/cfg/generated/cfg__endpoints/models.ts +44 -0
  101. package/src/cfg/generated/cfg__health/models.ts +7 -11
  102. package/src/cfg/generated/client.ts +15 -6
  103. package/src/cfg/generated/enums.ts +56 -0
  104. package/src/cfg/generated/index.ts +32 -20
  105. package/src/cfg/generated/schema.ts +4840 -2127
  106. package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_monitoring.ts +0 -179
  107. package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_testing.ts +0 -151
  108. package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_monitoring.ts +0 -166
  109. package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_testing.ts +0 -162
  110. package/src/cfg/generated/_utils/schemas/LoadTestRequestRequest.schema.ts +0 -22
  111. package/src/cfg/generated/_utils/schemas/LoadTestResponse.schema.ts +0 -21
  112. package/src/cfg/generated/_utils/schemas/LoadTestStatus.schema.ts +0 -27
  113. package/src/cfg/generated/_utils/schemas/MethodStat.schema.ts +0 -25
  114. package/src/cfg/generated/_utils/schemas/MethodStats.schema.ts +0 -22
  115. package/src/cfg/generated/_utils/schemas/NotificationStats.schema.ts +0 -25
  116. package/src/cfg/generated/_utils/schemas/RPCRequest.schema.ts +0 -25
  117. package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +0 -22
  118. package/src/cfg/generated/_utils/schemas/TestRPCRequestRequest.schema.ts +0 -21
  119. package/src/cfg/generated/_utils/schemas/TestRPCResponse.schema.ts +0 -23
  120. package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/client.ts +0 -136
  121. package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/models.ts +0 -144
  122. package/src/cfg/generated/cfg__ipc__ipcrpc_testing/client.ts +0 -96
  123. package/src/cfg/generated/cfg__ipc__ipcrpc_testing/models.ts +0 -88
  124. /package/src/cfg/generated/{cfg__ipc__ipcrpc_monitoring → cfg__centrifugo}/index.ts +0 -0
  125. /package/src/cfg/generated/{cfg__ipc__ipcrpc_testing → cfg__centrifugo__centrifugo_admin_api}/index.ts +0 -0
@@ -0,0 +1,137 @@
1
+ /**
2
+ * SWR Hooks for Centrifugo 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__centrifugo__centrifugo_monitoring'
20
+ import type { API } from '../../index'
21
+ import type { ChannelList } from '../schemas/ChannelList.schema'
22
+ import type { HealthCheck } from '../schemas/HealthCheck.schema'
23
+ import type { OverviewStats } from '../schemas/OverviewStats.schema'
24
+ import type { RecentPublishes } from '../schemas/RecentPublishes.schema'
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
+ /**
83
+ * Get Centrifugo health status
84
+ *
85
+ * @method GET
86
+ * @path /cfg/centrifugo/monitor/health/
87
+ */
88
+ export function useCentrifugoMonitorHealthRetrieve(client?: API): ReturnType<typeof useSWR<HealthCheck>> {
89
+ return useSWR<HealthCheck>(
90
+ 'cfg-centrifugo-monitor-health',
91
+ () => Fetchers.getCentrifugoMonitorHealthRetrieve(client)
92
+ )
93
+ }
94
+
95
+
96
+ /**
97
+ * Get overview statistics
98
+ *
99
+ * @method GET
100
+ * @path /cfg/centrifugo/monitor/overview/
101
+ */
102
+ export function useCentrifugoMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<OverviewStats>> {
103
+ return useSWR<OverviewStats>(
104
+ params ? ['cfg-centrifugo-monitor-overview', params] : 'cfg-centrifugo-monitor-overview',
105
+ () => Fetchers.getCentrifugoMonitorOverviewRetrieve(params, client)
106
+ )
107
+ }
108
+
109
+
110
+ /**
111
+ * Get recent publishes
112
+ *
113
+ * @method GET
114
+ * @path /cfg/centrifugo/monitor/publishes/
115
+ */
116
+ export function useCentrifugoMonitorPublishesRetrieve(params?: { channel?: string; count?: number; offset?: number; status?: string }, client?: API): ReturnType<typeof useSWR<RecentPublishes>> {
117
+ return useSWR<RecentPublishes>(
118
+ params ? ['cfg-centrifugo-monitor-publishe', params] : 'cfg-centrifugo-monitor-publishe',
119
+ () => Fetchers.getCentrifugoMonitorPublishesRetrieve(params, client)
120
+ )
121
+ }
122
+
123
+
124
+ /**
125
+ * Get channel statistics
126
+ *
127
+ * @method GET
128
+ * @path /cfg/centrifugo/monitor/timeline/
129
+ */
130
+ export function useCentrifugoMonitorTimelineRetrieve(params?: { hours?: number; interval?: string }, client?: API): ReturnType<typeof useSWR<ChannelList>> {
131
+ return useSWR<ChannelList>(
132
+ params ? ['cfg-centrifugo-monitor-timeline', params] : 'cfg-centrifugo-monitor-timeline',
133
+ () => Fetchers.getCentrifugoMonitorTimelineRetrieve(params, client)
134
+ )
135
+ }
136
+
137
+
@@ -0,0 +1,171 @@
1
+ /**
2
+ * SWR Hooks for Centrifugo 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__centrifugo__centrifugo_testing'
20
+ import type { API } from '../../index'
21
+ import type { ConnectionTokenRequestRequest } from '../schemas/ConnectionTokenRequestRequest.schema'
22
+ import type { ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
23
+ import type { ManualAckRequestRequest } from '../schemas/ManualAckRequestRequest.schema'
24
+ import type { ManualAckResponse } from '../schemas/ManualAckResponse.schema'
25
+ import type { PublishTestRequestRequest } from '../schemas/PublishTestRequestRequest.schema'
26
+ import type { PublishTestResponse } from '../schemas/PublishTestResponse.schema'
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
+ /**
101
+ * Generate connection token
102
+ *
103
+ * @method POST
104
+ * @path /cfg/centrifugo/testing/connection-token/
105
+ */
106
+ export function useCreateCentrifugoTestingConnectionTokenCreate() {
107
+ const { mutate } = useSWRConfig()
108
+
109
+ return async (data: ConnectionTokenRequestRequest, client?: API): Promise<ConnectionTokenResponse> => {
110
+ const result = await Fetchers.createCentrifugoTestingConnectionTokenCreate(data, client)
111
+ // Revalidate related queries
112
+ mutate('cfg-centrifugo-testing-connection-token')
113
+ return result
114
+ }
115
+ }
116
+
117
+
118
+ /**
119
+ * Publish test message
120
+ *
121
+ * @method POST
122
+ * @path /cfg/centrifugo/testing/publish-test/
123
+ */
124
+ export function useCreateCentrifugoTestingPublishTestCreate() {
125
+ const { mutate } = useSWRConfig()
126
+
127
+ return async (data: PublishTestRequestRequest, client?: API): Promise<PublishTestResponse> => {
128
+ const result = await Fetchers.createCentrifugoTestingPublishTestCreate(data, client)
129
+ // Revalidate related queries
130
+ mutate('cfg-centrifugo-testing-publish-test')
131
+ return result
132
+ }
133
+ }
134
+
135
+
136
+ /**
137
+ * Publish with database logging
138
+ *
139
+ * @method POST
140
+ * @path /cfg/centrifugo/testing/publish-with-logging/
141
+ */
142
+ export function useCreateCentrifugoTestingPublishWithLoggingCreate() {
143
+ const { mutate } = useSWRConfig()
144
+
145
+ return async (data: PublishTestRequestRequest, client?: API): Promise<PublishTestResponse> => {
146
+ const result = await Fetchers.createCentrifugoTestingPublishWithLoggingCreate(data, client)
147
+ // Revalidate related queries
148
+ mutate('cfg-centrifugo-testing-publish-with-logging')
149
+ return result
150
+ }
151
+ }
152
+
153
+
154
+ /**
155
+ * Send manual ACK
156
+ *
157
+ * @method POST
158
+ * @path /cfg/centrifugo/testing/send-ack/
159
+ */
160
+ export function useCreateCentrifugoTestingSendAckCreate() {
161
+ const { mutate } = useSWRConfig()
162
+
163
+ return async (data: ManualAckRequestRequest, client?: API): Promise<ManualAckResponse> => {
164
+ const result = await Fetchers.createCentrifugoTestingSendAckCreate(data, client)
165
+ // Revalidate related queries
166
+ mutate('cfg-centrifugo-testing-send-ack')
167
+ return result
168
+ }
169
+ }
170
+
171
+
@@ -0,0 +1,137 @@
1
+ /**
2
+ * SWR Hooks for Dashboard
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__dashboard'
20
+ import type { API } from '../../index'
21
+ import type { DashboardOverview } from '../schemas/DashboardOverview.schema'
22
+ import type { SystemHealth } from '../schemas/SystemHealth.schema'
23
+ import type { SystemMetrics } from '../schemas/SystemMetrics.schema'
24
+ import type { UserStatistics } from '../schemas/UserStatistics.schema'
25
+
26
+ /**
27
+ * Get quick actions
28
+ *
29
+ * @method GET
30
+ * @path /cfg/dashboard/api/activity/actions/
31
+ */
32
+ export function useDashboardApiActivityActionsList(client?: API): ReturnType<typeof useSWR<any>> {
33
+ return useSWR<any>(
34
+ 'cfg-dashboard-api-activity-actions',
35
+ () => Fetchers.getDashboardApiActivityActionsList(client)
36
+ )
37
+ }
38
+
39
+
40
+ /**
41
+ * Get recent activity
42
+ *
43
+ * @method GET
44
+ * @path /cfg/dashboard/api/activity/recent/
45
+ */
46
+ export function useDashboardApiActivityRecentList(params?: { limit?: number }, client?: API): ReturnType<typeof useSWR<any>> {
47
+ return useSWR<any>(
48
+ params ? ['cfg-dashboard-api-activity-recent', params] : 'cfg-dashboard-api-activity-recent',
49
+ () => Fetchers.getDashboardApiActivityRecentList(params, client)
50
+ )
51
+ }
52
+
53
+
54
+ /**
55
+ * Get dashboard overview
56
+ *
57
+ * @method GET
58
+ * @path /cfg/dashboard/api/overview/overview/
59
+ */
60
+ export function useDashboardApiOverviewOverviewRetrieve(client?: API): ReturnType<typeof useSWR<DashboardOverview>> {
61
+ return useSWR<DashboardOverview>(
62
+ 'cfg-dashboard-api-overview-overview',
63
+ () => Fetchers.getDashboardApiOverviewOverviewRetrieve(client)
64
+ )
65
+ }
66
+
67
+
68
+ /**
69
+ * Get application statistics
70
+ *
71
+ * @method GET
72
+ * @path /cfg/dashboard/api/statistics/apps/
73
+ */
74
+ export function useDashboardApiStatisticsAppsList(client?: API): ReturnType<typeof useSWR<any>> {
75
+ return useSWR<any>(
76
+ 'cfg-dashboard-api-statistics-apps',
77
+ () => Fetchers.getDashboardApiStatisticsAppsList(client)
78
+ )
79
+ }
80
+
81
+
82
+ /**
83
+ * Get statistics cards
84
+ *
85
+ * @method GET
86
+ * @path /cfg/dashboard/api/statistics/cards/
87
+ */
88
+ export function useDashboardApiStatisticsCardsList(client?: API): ReturnType<typeof useSWR<any>> {
89
+ return useSWR<any>(
90
+ 'cfg-dashboard-api-statistics-cards',
91
+ () => Fetchers.getDashboardApiStatisticsCardsList(client)
92
+ )
93
+ }
94
+
95
+
96
+ /**
97
+ * Get user statistics
98
+ *
99
+ * @method GET
100
+ * @path /cfg/dashboard/api/statistics/users/
101
+ */
102
+ export function useDashboardApiStatisticsUsersRetrieve(client?: API): ReturnType<typeof useSWR<UserStatistics>> {
103
+ return useSWR<UserStatistics>(
104
+ 'cfg-dashboard-api-statistics-user',
105
+ () => Fetchers.getDashboardApiStatisticsUsersRetrieve(client)
106
+ )
107
+ }
108
+
109
+
110
+ /**
111
+ * Get system health status
112
+ *
113
+ * @method GET
114
+ * @path /cfg/dashboard/api/system/health/
115
+ */
116
+ export function useDashboardApiSystemHealthRetrieve(client?: API): ReturnType<typeof useSWR<SystemHealth>> {
117
+ return useSWR<SystemHealth>(
118
+ 'cfg-dashboard-api-system-health',
119
+ () => Fetchers.getDashboardApiSystemHealthRetrieve(client)
120
+ )
121
+ }
122
+
123
+
124
+ /**
125
+ * Get system metrics
126
+ *
127
+ * @method GET
128
+ * @path /cfg/dashboard/api/system/metrics/
129
+ */
130
+ export function useDashboardApiSystemMetricsRetrieve(client?: API): ReturnType<typeof useSWR<SystemMetrics>> {
131
+ return useSWR<SystemMetrics>(
132
+ 'cfg-dashboard-api-system-metric',
133
+ () => Fetchers.getDashboardApiSystemMetricsRetrieve(client)
134
+ )
135
+ }
136
+
137
+
@@ -19,6 +19,7 @@ import { useSWRConfig } from 'swr'
19
19
  import * as Fetchers from '../fetchers/cfg__endpoints'
20
20
  import type { API } from '../../index'
21
21
  import type { EndpointsStatus } from '../schemas/EndpointsStatus.schema'
22
+ import type { URLsList } from '../schemas/URLsList.schema'
22
23
 
23
24
  /**
24
25
  * API operation
@@ -34,3 +35,31 @@ export function useEndpointsDrfRetrieve(client?: API): ReturnType<typeof useSWR<
34
35
  }
35
36
 
36
37
 
38
+ /**
39
+ * API operation
40
+ *
41
+ * @method GET
42
+ * @path /cfg/endpoints/urls/
43
+ */
44
+ export function useEndpointsUrlsRetrieve(client?: API): ReturnType<typeof useSWR<URLsList>> {
45
+ return useSWR<URLsList>(
46
+ 'cfg-endpoints-url',
47
+ () => Fetchers.getEndpointsUrlsRetrieve(client)
48
+ )
49
+ }
50
+
51
+
52
+ /**
53
+ * API operation
54
+ *
55
+ * @method GET
56
+ * @path /cfg/endpoints/urls/compact/
57
+ */
58
+ export function useEndpointsUrlsCompactRetrieve(client?: API): ReturnType<typeof useSWR<any>> {
59
+ return useSWR<any>(
60
+ 'cfg-endpoints-urls-compact',
61
+ () => Fetchers.getEndpointsUrlsCompactRetrieve(client)
62
+ )
63
+ }
64
+
65
+
@@ -26,8 +26,9 @@
26
26
  export * from './cfg__accounts__auth'
27
27
  export * from './cfg__newsletter__bulk_email'
28
28
  export * from './cfg__newsletter__campaigns'
29
- export * from './cfg__ipc__ipcrpc_monitoring'
30
- export * from './cfg__ipc__ipcrpc_testing'
29
+ export * from './cfg__centrifugo__centrifugo_admin_api'
30
+ export * from './cfg__centrifugo__centrifugo_monitoring'
31
+ export * from './cfg__centrifugo__centrifugo_testing'
31
32
  export * from './cfg__leads__lead_submission'
32
33
  export * from './cfg__newsletter__logs'
33
34
  export * from './cfg__newsletter__newsletters'
@@ -35,6 +36,8 @@ export * from './cfg__newsletter__subscriptions'
35
36
  export * from './cfg__newsletter__testing'
36
37
  export * from './cfg__accounts__user_profile'
37
38
  export * from './cfg__accounts'
39
+ export * from './cfg__centrifugo'
40
+ export * from './cfg__dashboard'
38
41
  export * from './cfg__endpoints'
39
42
  export * from './cfg__health'
40
43
  export * from './cfg__knowbase'
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Zod schema for ActivityEntry
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Serializer for recent activity entries.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Serializer for recent activity entries.
11
+ */
12
+ export const ActivityEntrySchema = z.object({
13
+ id: z.int(),
14
+ user: z.string(),
15
+ action: z.string(),
16
+ resource: z.string(),
17
+ timestamp: z.string(),
18
+ icon: z.string(),
19
+ color: z.string(),
20
+ })
21
+
22
+ /**
23
+ * Infer TypeScript type from Zod schema
24
+ */
25
+ export type ActivityEntry = z.infer<typeof ActivityEntrySchema>
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Zod schema for AppStatistics
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Serializer for application-specific statistics.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Serializer for application-specific statistics.
11
+ */
12
+ export const AppStatisticsSchema = z.object({
13
+ app_name: z.string(),
14
+ statistics: z.record(z.string(), z.any()),
15
+ })
16
+
17
+ /**
18
+ * Infer TypeScript type from Zod schema
19
+ */
20
+ export type AppStatistics = z.infer<typeof AppStatisticsSchema>
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Zod schema for CentrifugoChannelInfo
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Information about a single channel.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Information about a single channel.
11
+ */
12
+ export const CentrifugoChannelInfoSchema = z.object({
13
+ num_clients: z.int(),
14
+ })
15
+
16
+ /**
17
+ * Infer TypeScript type from Zod schema
18
+ */
19
+ export type CentrifugoChannelInfo = z.infer<typeof CentrifugoChannelInfoSchema>
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Zod schema for CentrifugoChannelsRequestRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Request to list active channels.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Request to list active channels.
11
+ */
12
+ export const CentrifugoChannelsRequestRequestSchema = z.object({
13
+ pattern: z.string().nullable().optional(),
14
+ })
15
+
16
+ /**
17
+ * Infer TypeScript type from Zod schema
18
+ */
19
+ export type CentrifugoChannelsRequestRequest = z.infer<typeof CentrifugoChannelsRequestRequestSchema>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Zod schema for CentrifugoChannelsResponse
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * List of active channels response.
6
+ * */
7
+ import { z } from 'zod'
8
+ import { CentrifugoChannelsResultSchema } from './CentrifugoChannelsResult.schema'
9
+ import { CentrifugoErrorSchema } from './CentrifugoError.schema'
10
+
11
+ /**
12
+ * List of active channels response.
13
+ */
14
+ export const CentrifugoChannelsResponseSchema = z.object({
15
+ error: CentrifugoErrorSchema.optional(),
16
+ result: CentrifugoChannelsResultSchema.optional(),
17
+ })
18
+
19
+ /**
20
+ * Infer TypeScript type from Zod schema
21
+ */
22
+ export type CentrifugoChannelsResponse = z.infer<typeof CentrifugoChannelsResponseSchema>
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Zod schema for CentrifugoChannelsResult
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Channels result wrapper.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Channels result wrapper.
11
+ */
12
+ export const CentrifugoChannelsResultSchema = z.object({
13
+ channels: z.record(z.string(), z.any()),
14
+ })
15
+
16
+ /**
17
+ * Infer TypeScript type from Zod schema
18
+ */
19
+ export type CentrifugoChannelsResult = z.infer<typeof CentrifugoChannelsResultSchema>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Zod schema for CentrifugoClientInfo
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Information about connected client.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Information about connected client.
11
+ */
12
+ export const CentrifugoClientInfoSchema = z.object({
13
+ user: z.string(),
14
+ client: z.string(),
15
+ conn_info: z.string().nullable().optional(),
16
+ chan_info: z.string().nullable().optional(),
17
+ })
18
+
19
+ /**
20
+ * Infer TypeScript type from Zod schema
21
+ */
22
+ export type CentrifugoClientInfo = z.infer<typeof CentrifugoClientInfoSchema>
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Zod schema for CentrifugoError
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Centrifugo API error structure.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Centrifugo API error structure.
11
+ */
12
+ export const CentrifugoErrorSchema = z.object({
13
+ code: z.int().optional(),
14
+ message: z.string().optional(),
15
+ })
16
+
17
+ /**
18
+ * Infer TypeScript type from Zod schema
19
+ */
20
+ export type CentrifugoError = z.infer<typeof CentrifugoErrorSchema>