@djangocfg/api 1.2.22 → 1.2.23

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 (70) hide show
  1. package/dist/index.cjs +4228 -2450
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +3122 -738
  4. package/dist/index.d.ts +3122 -738
  5. package/dist/index.mjs +4140 -2370
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +3 -3
  9. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_charts.ts +138 -0
  10. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +11 -11
  11. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_testing.ts +6 -6
  12. package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
  13. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +3 -3
  14. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +126 -0
  15. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +9 -9
  16. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_testing.ts +4 -4
  17. package/src/cfg/generated/_utils/hooks/index.ts +1 -0
  18. package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +2 -2
  19. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +2 -2
  20. package/src/cfg/generated/_utils/schemas/{OverviewStats.schema.ts → CentrifugoOverviewStats.schema.ts} +3 -3
  21. package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +1 -1
  22. package/src/cfg/generated/_utils/schemas/DashboardCharts.schema.ts +30 -0
  23. package/src/cfg/generated/_utils/schemas/DjangoRQConfig.schema.ts +8 -1
  24. package/src/cfg/generated/_utils/schemas/ErrorDistributionChart.schema.ts +24 -0
  25. package/src/cfg/generated/_utils/schemas/ErrorDistributionChartSerializer.schema.ts +24 -0
  26. package/src/cfg/generated/_utils/schemas/ErrorDistributionDataPoint.schema.ts +22 -0
  27. package/src/cfg/generated/_utils/schemas/GRPCHealthCheck.schema.ts +23 -0
  28. package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +27 -0
  29. package/src/cfg/generated/_utils/schemas/GRPCServerConfigSerializer.schema.ts +1 -1
  30. package/src/cfg/generated/_utils/schemas/GRPCServerInfo.schema.ts +1 -1
  31. package/src/cfg/generated/_utils/schemas/{GRPCTestLogSerializer.schema.ts → GRPCTestLog.schema.ts} +4 -4
  32. package/src/cfg/generated/_utils/schemas/MonitoringServiceStatsSerializer.schema.ts +24 -0
  33. package/src/cfg/generated/_utils/schemas/RecentRequest.schema.ts +28 -0
  34. package/src/cfg/generated/_utils/schemas/RequestVolumeChart.schema.ts +25 -0
  35. package/src/cfg/generated/_utils/schemas/RequestVolumeChartSerializer.schema.ts +25 -0
  36. package/src/cfg/generated/_utils/schemas/RequestVolumeDataPoint.schema.ts +23 -0
  37. package/src/cfg/generated/_utils/schemas/ResponseTimeChart.schema.ts +25 -0
  38. package/src/cfg/generated/_utils/schemas/ResponseTimeChartSerializer.schema.ts +25 -0
  39. package/src/cfg/generated/_utils/schemas/ResponseTimeDataPoint.schema.ts +25 -0
  40. package/src/cfg/generated/_utils/schemas/ServerLifecycleChart.schema.ts +25 -0
  41. package/src/cfg/generated/_utils/schemas/ServerLifecycleEvent.schema.ts +24 -0
  42. package/src/cfg/generated/_utils/schemas/ServerUptimeChart.schema.ts +25 -0
  43. package/src/cfg/generated/_utils/schemas/ServerUptimeChartSerializer.schema.ts +25 -0
  44. package/src/cfg/generated/_utils/schemas/ServerUptimeDataPoint.schema.ts +21 -0
  45. package/src/cfg/generated/_utils/schemas/ServiceActivityChart.schema.ts +24 -0
  46. package/src/cfg/generated/_utils/schemas/ServiceActivityChartSerializer.schema.ts +24 -0
  47. package/src/cfg/generated/_utils/schemas/ServiceActivityDataPoint.schema.ts +22 -0
  48. package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +2 -2
  49. package/src/cfg/generated/_utils/schemas/ServiceStatsSerializer.schema.ts +8 -8
  50. package/src/cfg/generated/_utils/schemas/index.ts +24 -4
  51. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +5 -5
  52. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +4 -4
  53. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +1 -1
  54. package/src/cfg/generated/cfg__dashboard__dashboard_config/models.ts +26 -1
  55. package/src/cfg/generated/cfg__endpoints/client.ts +1 -1
  56. package/src/cfg/generated/cfg__grpc__grpc_charts/client.ts +162 -0
  57. package/src/cfg/generated/cfg__grpc__grpc_charts/index.ts +2 -0
  58. package/src/cfg/generated/cfg__grpc__grpc_charts/models.ts +335 -0
  59. package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +2 -2
  60. package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +12 -11
  61. package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +45 -31
  62. package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +11 -11
  63. package/src/cfg/generated/cfg__grpc__grpc_testing/client.ts +9 -10
  64. package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +22 -38
  65. package/src/cfg/generated/cfg__payments/client.ts +1 -1
  66. package/src/cfg/generated/client.ts +3 -0
  67. package/src/cfg/generated/index.ts +5 -0
  68. package/src/cfg/generated/schema.ts +1621 -342
  69. package/src/cfg/generated/_utils/schemas/GRPCTestLogs.schema.ts +0 -23
  70. package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +0 -23
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/api",
3
- "version": "1.2.22",
3
+ "version": "1.2.23",
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.22",
71
+ "@djangocfg/typescript-config": "^1.2.23",
72
72
  "react": "^19.1.0",
73
73
  "react-dom": "^19.1.0",
74
74
  "tsup": "^8.5.0",
@@ -29,9 +29,9 @@
29
29
  * const users = await getUsers({ page: 1 }, api)
30
30
  * ```
31
31
  */
32
+ import { CentrifugoOverviewStatsSchema, type CentrifugoOverviewStats } from '../schemas/CentrifugoOverviewStats.schema'
32
33
  import { ChannelListSchema, type ChannelList } from '../schemas/ChannelList.schema'
33
34
  import { HealthCheckSchema, type HealthCheck } from '../schemas/HealthCheck.schema'
34
- import { OverviewStatsSchema, type OverviewStats } from '../schemas/OverviewStats.schema'
35
35
  import { RecentPublishesSchema, type RecentPublishes } from '../schemas/RecentPublishes.schema'
36
36
  import { getAPIInstance } from '../../api-instance'
37
37
 
@@ -56,10 +56,10 @@ export async function getCentrifugoMonitorHealthRetrieve( client?: any
56
56
  * @path /cfg/centrifugo/monitor/overview/
57
57
  */
58
58
  export async function getCentrifugoMonitorOverviewRetrieve( params?: { hours?: number }, client?: any
59
- ): Promise<OverviewStats> {
59
+ ): Promise<CentrifugoOverviewStats> {
60
60
  const api = client || getAPIInstance()
61
61
  const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorOverviewRetrieve(params?.hours)
62
- return OverviewStatsSchema.parse(response)
62
+ return CentrifugoOverviewStatsSchema.parse(response)
63
63
  }
64
64
 
65
65
 
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Typed fetchers for Grpc Charts
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 { DashboardChartsSchema, type DashboardCharts } from '../schemas/DashboardCharts.schema'
33
+ import { ErrorDistributionChartSchema, type ErrorDistributionChart } from '../schemas/ErrorDistributionChart.schema'
34
+ import { RequestVolumeChartSchema, type RequestVolumeChart } from '../schemas/RequestVolumeChart.schema'
35
+ import { ResponseTimeChartSchema, type ResponseTimeChart } from '../schemas/ResponseTimeChart.schema'
36
+ import { ServerLifecycleChartSchema, type ServerLifecycleChart } from '../schemas/ServerLifecycleChart.schema'
37
+ import { ServerUptimeChartSchema, type ServerUptimeChart } from '../schemas/ServerUptimeChart.schema'
38
+ import { ServiceActivityChartSchema, type ServiceActivityChart } from '../schemas/ServiceActivityChart.schema'
39
+ import { getAPIInstance } from '../../api-instance'
40
+
41
+ /**
42
+ * Get all dashboard charts data
43
+ *
44
+ * @method GET
45
+ * @path /cfg/grpc/charts/dashboard/
46
+ */
47
+ export async function getGrpcChartsDashboardRetrieve( params?: { hours?: number }, client?: any
48
+ ): Promise<DashboardCharts> {
49
+ const api = client || getAPIInstance()
50
+ const response = await api.cfg_grpc_charts.dashboardRetrieve(params?.hours)
51
+ return DashboardChartsSchema.parse(response)
52
+ }
53
+
54
+
55
+ /**
56
+ * Get error distribution chart data
57
+ *
58
+ * @method GET
59
+ * @path /cfg/grpc/charts/error-distribution/
60
+ */
61
+ export async function getGrpcChartsErrorDistributionRetrieve( params?: { hours?: number }, client?: any
62
+ ): Promise<ErrorDistributionChart> {
63
+ const api = client || getAPIInstance()
64
+ const response = await api.cfg_grpc_charts.errorDistributionRetrieve(params?.hours)
65
+ return ErrorDistributionChartSchema.parse(response)
66
+ }
67
+
68
+
69
+ /**
70
+ * Get request volume chart data
71
+ *
72
+ * @method GET
73
+ * @path /cfg/grpc/charts/request-volume/
74
+ */
75
+ export async function getGrpcChartsRequestVolumeRetrieve( params?: { hours?: number }, client?: any
76
+ ): Promise<RequestVolumeChart> {
77
+ const api = client || getAPIInstance()
78
+ const response = await api.cfg_grpc_charts.requestVolumeRetrieve(params?.hours)
79
+ return RequestVolumeChartSchema.parse(response)
80
+ }
81
+
82
+
83
+ /**
84
+ * Get response time chart data
85
+ *
86
+ * @method GET
87
+ * @path /cfg/grpc/charts/response-time/
88
+ */
89
+ export async function getGrpcChartsResponseTimeRetrieve( params?: { hours?: number }, client?: any
90
+ ): Promise<ResponseTimeChart> {
91
+ const api = client || getAPIInstance()
92
+ const response = await api.cfg_grpc_charts.responseTimeRetrieve(params?.hours)
93
+ return ResponseTimeChartSchema.parse(response)
94
+ }
95
+
96
+
97
+ /**
98
+ * Get server lifecycle events
99
+ *
100
+ * @method GET
101
+ * @path /cfg/grpc/charts/server-lifecycle/
102
+ */
103
+ export async function getGrpcChartsServerLifecycleRetrieve( params?: { hours?: number }, client?: any
104
+ ): Promise<ServerLifecycleChart> {
105
+ const api = client || getAPIInstance()
106
+ const response = await api.cfg_grpc_charts.serverLifecycleRetrieve(params?.hours)
107
+ return ServerLifecycleChartSchema.parse(response)
108
+ }
109
+
110
+
111
+ /**
112
+ * Get server uptime chart data
113
+ *
114
+ * @method GET
115
+ * @path /cfg/grpc/charts/server-uptime/
116
+ */
117
+ export async function getGrpcChartsServerUptimeRetrieve( params?: { hours?: number }, client?: any
118
+ ): Promise<ServerUptimeChart> {
119
+ const api = client || getAPIInstance()
120
+ const response = await api.cfg_grpc_charts.serverUptimeRetrieve(params?.hours)
121
+ return ServerUptimeChartSchema.parse(response)
122
+ }
123
+
124
+
125
+ /**
126
+ * Get service activity chart data
127
+ *
128
+ * @method GET
129
+ * @path /cfg/grpc/charts/service-activity/
130
+ */
131
+ export async function getGrpcChartsServiceActivityRetrieve( params?: { hours?: number }, client?: any
132
+ ): Promise<ServiceActivityChart> {
133
+ const api = client || getAPIInstance()
134
+ const response = await api.cfg_grpc_charts.serviceActivityRetrieve(params?.hours)
135
+ return ServiceActivityChartSchema.parse(response)
136
+ }
137
+
138
+
@@ -29,10 +29,10 @@
29
29
  * const users = await getUsers({ page: 1 }, api)
30
30
  * ```
31
31
  */
32
- import { HealthCheckSchema, type HealthCheck } from '../schemas/HealthCheck.schema'
32
+ import { GRPCHealthCheckSchema, type GRPCHealthCheck } from '../schemas/GRPCHealthCheck.schema'
33
+ import { GRPCOverviewStatsSchema, type GRPCOverviewStats } from '../schemas/GRPCOverviewStats.schema'
33
34
  import { MethodListSchema, type MethodList } from '../schemas/MethodList.schema'
34
- import { OverviewStatsSchema, type OverviewStats } from '../schemas/OverviewStats.schema'
35
- import { RecentRequestsSchema, type RecentRequests } from '../schemas/RecentRequests.schema'
35
+ import { RecentRequestSchema, type RecentRequest } from '../schemas/RecentRequest.schema'
36
36
  import { ServiceListSchema, type ServiceList } from '../schemas/ServiceList.schema'
37
37
  import { getAPIInstance } from '../../api-instance'
38
38
 
@@ -43,10 +43,10 @@ import { getAPIInstance } from '../../api-instance'
43
43
  * @path /cfg/grpc/monitor/health/
44
44
  */
45
45
  export async function getGrpcMonitorHealthRetrieve( client?: any
46
- ): Promise<HealthCheck> {
46
+ ): Promise<GRPCHealthCheck> {
47
47
  const api = client || getAPIInstance()
48
48
  const response = await api.cfg_grpc_monitoring.grpcMonitorHealthRetrieve()
49
- return HealthCheckSchema.parse(response)
49
+ return GRPCHealthCheckSchema.parse(response)
50
50
  }
51
51
 
52
52
 
@@ -71,10 +71,10 @@ export async function getGrpcMonitorMethodsRetrieve( params?: { hours?: number;
71
71
  * @path /cfg/grpc/monitor/overview/
72
72
  */
73
73
  export async function getGrpcMonitorOverviewRetrieve( params?: { hours?: number }, client?: any
74
- ): Promise<OverviewStats> {
74
+ ): Promise<GRPCOverviewStats> {
75
75
  const api = client || getAPIInstance()
76
76
  const response = await api.cfg_grpc_monitoring.grpcMonitorOverviewRetrieve(params?.hours)
77
- return OverviewStatsSchema.parse(response)
77
+ return GRPCOverviewStatsSchema.parse(response)
78
78
  }
79
79
 
80
80
 
@@ -84,11 +84,11 @@ export async function getGrpcMonitorOverviewRetrieve( params?: { hours?: number
84
84
  * @method GET
85
85
  * @path /cfg/grpc/monitor/requests/
86
86
  */
87
- export async function getGrpcMonitorRequestsRetrieve( params?: { count?: number; method?: string; offset?: number; service?: string; status?: string }, client?: any
88
- ): Promise<RecentRequests> {
87
+ export async function getGrpcMonitorRequestsRetrieve( params?: { method?: string; service?: string; status?: string }, client?: any
88
+ ): Promise<RecentRequest> {
89
89
  const api = client || getAPIInstance()
90
- const response = await api.cfg_grpc_monitoring.grpcMonitorRequestsRetrieve(params?.count, params?.method, params?.offset, params?.service, params?.status)
91
- return RecentRequestsSchema.parse(response)
90
+ const response = await api.cfg_grpc_monitoring.grpcMonitorRequestsRetrieve(params?.method, params?.service, params?.status)
91
+ return RecentRequestSchema.parse(response)
92
92
  }
93
93
 
94
94
 
@@ -32,11 +32,11 @@
32
32
  import { GRPCCallRequestRequestSchema, type GRPCCallRequestRequest } from '../schemas/GRPCCallRequestRequest.schema'
33
33
  import { GRPCCallResponseSchema, type GRPCCallResponse } from '../schemas/GRPCCallResponse.schema'
34
34
  import { GRPCExamplesListSchema, type GRPCExamplesList } from '../schemas/GRPCExamplesList.schema'
35
- import { GRPCTestLogsSchema, type GRPCTestLogs } from '../schemas/GRPCTestLogs.schema'
35
+ import { GRPCTestLogSchema, type GRPCTestLog } from '../schemas/GRPCTestLog.schema'
36
36
  import { getAPIInstance } from '../../api-instance'
37
37
 
38
38
  /**
39
- * Call gRPC method (placeholder)
39
+ * Call gRPC method
40
40
  *
41
41
  * @method POST
42
42
  * @path /cfg/grpc/test/call/
@@ -69,11 +69,11 @@ export async function getGrpcTestExamplesRetrieve( params?: { method?: string;
69
69
  * @method GET
70
70
  * @path /cfg/grpc/test/logs/
71
71
  */
72
- export async function getGrpcTestLogsRetrieve( params?: { limit?: number; method?: string; offset?: number; service?: string; status?: string }, client?: any
73
- ): Promise<GRPCTestLogs> {
72
+ export async function getGrpcTestLogsRetrieve( params?: { method?: string; service?: string; status?: string }, client?: any
73
+ ): Promise<GRPCTestLog> {
74
74
  const api = client || getAPIInstance()
75
- const response = await api.cfg_grpc_testing.grpcTestLogsRetrieve(params?.limit, params?.method, params?.offset, params?.service, params?.status)
76
- return GRPCTestLogsSchema.parse(response)
75
+ const response = await api.cfg_grpc_testing.grpcTestLogsRetrieve(params?.method, params?.service, params?.status)
76
+ return GRPCTestLogSchema.parse(response)
77
77
  }
78
78
 
79
79
 
@@ -41,6 +41,7 @@ export * from './cfg__dashboard__dashboard_overview'
41
41
  export * from './cfg__dashboard__dashboard_statistics'
42
42
  export * from './cfg__dashboard__dashboard_system'
43
43
  export * from './cfg__endpoints'
44
+ export * from './cfg__grpc__grpc_charts'
44
45
  export * from './cfg__grpc__grpc_configuration'
45
46
  export * from './cfg__grpc__grpc_monitoring'
46
47
  export * from './cfg__grpc__grpc_services'
@@ -18,9 +18,9 @@ import useSWR from 'swr'
18
18
  import { useSWRConfig } from 'swr'
19
19
  import * as Fetchers from '../fetchers/cfg__centrifugo__centrifugo_monitoring'
20
20
  import type { API } from '../../index'
21
+ import type { CentrifugoOverviewStats } from '../schemas/CentrifugoOverviewStats.schema'
21
22
  import type { ChannelList } from '../schemas/ChannelList.schema'
22
23
  import type { HealthCheck } from '../schemas/HealthCheck.schema'
23
- import type { OverviewStats } from '../schemas/OverviewStats.schema'
24
24
  import type { RecentPublishes } from '../schemas/RecentPublishes.schema'
25
25
 
26
26
  /**
@@ -43,8 +43,8 @@ export function useCentrifugoMonitorHealthRetrieve(client?: API): ReturnType<typ
43
43
  * @method GET
44
44
  * @path /cfg/centrifugo/monitor/overview/
45
45
  */
46
- export function useCentrifugoMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<OverviewStats>> {
47
- return useSWR<OverviewStats>(
46
+ export function useCentrifugoMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<CentrifugoOverviewStats>> {
47
+ return useSWR<CentrifugoOverviewStats>(
48
48
  params ? ['cfg-centrifugo-monitor-overview', params] : 'cfg-centrifugo-monitor-overview',
49
49
  () => Fetchers.getCentrifugoMonitorOverviewRetrieve(params, client)
50
50
  )
@@ -0,0 +1,126 @@
1
+ /**
2
+ * SWR Hooks for Grpc Charts
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__grpc__grpc_charts'
20
+ import type { API } from '../../index'
21
+ import type { DashboardCharts } from '../schemas/DashboardCharts.schema'
22
+ import type { ErrorDistributionChart } from '../schemas/ErrorDistributionChart.schema'
23
+ import type { RequestVolumeChart } from '../schemas/RequestVolumeChart.schema'
24
+ import type { ResponseTimeChart } from '../schemas/ResponseTimeChart.schema'
25
+ import type { ServerLifecycleChart } from '../schemas/ServerLifecycleChart.schema'
26
+ import type { ServerUptimeChart } from '../schemas/ServerUptimeChart.schema'
27
+ import type { ServiceActivityChart } from '../schemas/ServiceActivityChart.schema'
28
+
29
+ /**
30
+ * Get all dashboard charts data
31
+ *
32
+ * @method GET
33
+ * @path /cfg/grpc/charts/dashboard/
34
+ */
35
+ export function useGrpcChartsDashboardRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<DashboardCharts>> {
36
+ return useSWR<DashboardCharts>(
37
+ params ? ['cfg-grpc-charts-dashboard', params] : 'cfg-grpc-charts-dashboard',
38
+ () => Fetchers.getGrpcChartsDashboardRetrieve(params, client)
39
+ )
40
+ }
41
+
42
+
43
+ /**
44
+ * Get error distribution chart data
45
+ *
46
+ * @method GET
47
+ * @path /cfg/grpc/charts/error-distribution/
48
+ */
49
+ export function useGrpcChartsErrorDistributionRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ErrorDistributionChart>> {
50
+ return useSWR<ErrorDistributionChart>(
51
+ params ? ['cfg-grpc-charts-error-distribution', params] : 'cfg-grpc-charts-error-distribution',
52
+ () => Fetchers.getGrpcChartsErrorDistributionRetrieve(params, client)
53
+ )
54
+ }
55
+
56
+
57
+ /**
58
+ * Get request volume chart data
59
+ *
60
+ * @method GET
61
+ * @path /cfg/grpc/charts/request-volume/
62
+ */
63
+ export function useGrpcChartsRequestVolumeRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<RequestVolumeChart>> {
64
+ return useSWR<RequestVolumeChart>(
65
+ params ? ['cfg-grpc-charts-request-volume', params] : 'cfg-grpc-charts-request-volume',
66
+ () => Fetchers.getGrpcChartsRequestVolumeRetrieve(params, client)
67
+ )
68
+ }
69
+
70
+
71
+ /**
72
+ * Get response time chart data
73
+ *
74
+ * @method GET
75
+ * @path /cfg/grpc/charts/response-time/
76
+ */
77
+ export function useGrpcChartsResponseTimeRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ResponseTimeChart>> {
78
+ return useSWR<ResponseTimeChart>(
79
+ params ? ['cfg-grpc-charts-response-time', params] : 'cfg-grpc-charts-response-time',
80
+ () => Fetchers.getGrpcChartsResponseTimeRetrieve(params, client)
81
+ )
82
+ }
83
+
84
+
85
+ /**
86
+ * Get server lifecycle events
87
+ *
88
+ * @method GET
89
+ * @path /cfg/grpc/charts/server-lifecycle/
90
+ */
91
+ export function useGrpcChartsServerLifecycleRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ServerLifecycleChart>> {
92
+ return useSWR<ServerLifecycleChart>(
93
+ params ? ['cfg-grpc-charts-server-lifecycle', params] : 'cfg-grpc-charts-server-lifecycle',
94
+ () => Fetchers.getGrpcChartsServerLifecycleRetrieve(params, client)
95
+ )
96
+ }
97
+
98
+
99
+ /**
100
+ * Get server uptime chart data
101
+ *
102
+ * @method GET
103
+ * @path /cfg/grpc/charts/server-uptime/
104
+ */
105
+ export function useGrpcChartsServerUptimeRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ServerUptimeChart>> {
106
+ return useSWR<ServerUptimeChart>(
107
+ params ? ['cfg-grpc-charts-server-uptime', params] : 'cfg-grpc-charts-server-uptime',
108
+ () => Fetchers.getGrpcChartsServerUptimeRetrieve(params, client)
109
+ )
110
+ }
111
+
112
+
113
+ /**
114
+ * Get service activity chart data
115
+ *
116
+ * @method GET
117
+ * @path /cfg/grpc/charts/service-activity/
118
+ */
119
+ export function useGrpcChartsServiceActivityRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ServiceActivityChart>> {
120
+ return useSWR<ServiceActivityChart>(
121
+ params ? ['cfg-grpc-charts-service-activity', params] : 'cfg-grpc-charts-service-activity',
122
+ () => Fetchers.getGrpcChartsServiceActivityRetrieve(params, client)
123
+ )
124
+ }
125
+
126
+
@@ -18,10 +18,10 @@ import useSWR from 'swr'
18
18
  import { useSWRConfig } from 'swr'
19
19
  import * as Fetchers from '../fetchers/cfg__grpc__grpc_monitoring'
20
20
  import type { API } from '../../index'
21
- import type { HealthCheck } from '../schemas/HealthCheck.schema'
21
+ import type { GRPCHealthCheck } from '../schemas/GRPCHealthCheck.schema'
22
+ import type { GRPCOverviewStats } from '../schemas/GRPCOverviewStats.schema'
22
23
  import type { MethodList } from '../schemas/MethodList.schema'
23
- import type { OverviewStats } from '../schemas/OverviewStats.schema'
24
- import type { RecentRequests } from '../schemas/RecentRequests.schema'
24
+ import type { RecentRequest } from '../schemas/RecentRequest.schema'
25
25
  import type { ServiceList } from '../schemas/ServiceList.schema'
26
26
 
27
27
  /**
@@ -30,8 +30,8 @@ import type { ServiceList } from '../schemas/ServiceList.schema'
30
30
  * @method GET
31
31
  * @path /cfg/grpc/monitor/health/
32
32
  */
33
- export function useGrpcMonitorHealthRetrieve(client?: API): ReturnType<typeof useSWR<HealthCheck>> {
34
- return useSWR<HealthCheck>(
33
+ export function useGrpcMonitorHealthRetrieve(client?: API): ReturnType<typeof useSWR<GRPCHealthCheck>> {
34
+ return useSWR<GRPCHealthCheck>(
35
35
  'cfg-grpc-monitor-health',
36
36
  () => Fetchers.getGrpcMonitorHealthRetrieve(client)
37
37
  )
@@ -58,8 +58,8 @@ export function useGrpcMonitorMethodsRetrieve(params?: { hours?: number; service
58
58
  * @method GET
59
59
  * @path /cfg/grpc/monitor/overview/
60
60
  */
61
- export function useGrpcMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<OverviewStats>> {
62
- return useSWR<OverviewStats>(
61
+ export function useGrpcMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<GRPCOverviewStats>> {
62
+ return useSWR<GRPCOverviewStats>(
63
63
  params ? ['cfg-grpc-monitor-overview', params] : 'cfg-grpc-monitor-overview',
64
64
  () => Fetchers.getGrpcMonitorOverviewRetrieve(params, client)
65
65
  )
@@ -72,8 +72,8 @@ export function useGrpcMonitorOverviewRetrieve(params?: { hours?: number }, clie
72
72
  * @method GET
73
73
  * @path /cfg/grpc/monitor/requests/
74
74
  */
75
- export function useGrpcMonitorRequestsRetrieve(params?: { count?: number; method?: string; offset?: number; service?: string; status?: string }, client?: API): ReturnType<typeof useSWR<RecentRequests>> {
76
- return useSWR<RecentRequests>(
75
+ export function useGrpcMonitorRequestsRetrieve(params?: { method?: string; service?: string; status?: string }, client?: API): ReturnType<typeof useSWR<RecentRequest>> {
76
+ return useSWR<RecentRequest>(
77
77
  params ? ['cfg-grpc-monitor-request', params] : 'cfg-grpc-monitor-request',
78
78
  () => Fetchers.getGrpcMonitorRequestsRetrieve(params, client)
79
79
  )
@@ -21,10 +21,10 @@ import type { API } from '../../index'
21
21
  import type { GRPCCallRequestRequest } from '../schemas/GRPCCallRequestRequest.schema'
22
22
  import type { GRPCCallResponse } from '../schemas/GRPCCallResponse.schema'
23
23
  import type { GRPCExamplesList } from '../schemas/GRPCExamplesList.schema'
24
- import type { GRPCTestLogs } from '../schemas/GRPCTestLogs.schema'
24
+ import type { GRPCTestLog } from '../schemas/GRPCTestLog.schema'
25
25
 
26
26
  /**
27
- * Call gRPC method (placeholder)
27
+ * Call gRPC method
28
28
  *
29
29
  * @method POST
30
30
  * @path /cfg/grpc/test/call/
@@ -61,8 +61,8 @@ export function useGrpcTestExamplesRetrieve(params?: { method?: string; service?
61
61
  * @method GET
62
62
  * @path /cfg/grpc/test/logs/
63
63
  */
64
- export function useGrpcTestLogsRetrieve(params?: { limit?: number; method?: string; offset?: number; service?: string; status?: string }, client?: API): ReturnType<typeof useSWR<GRPCTestLogs>> {
65
- return useSWR<GRPCTestLogs>(
64
+ export function useGrpcTestLogsRetrieve(params?: { method?: string; service?: string; status?: string }, client?: API): ReturnType<typeof useSWR<GRPCTestLog>> {
65
+ return useSWR<GRPCTestLog>(
66
66
  params ? ['cfg-grpc-test-log', params] : 'cfg-grpc-test-log',
67
67
  () => Fetchers.getGrpcTestLogsRetrieve(params, client)
68
68
  )
@@ -53,6 +53,7 @@ export * from './cfg__accounts__user_profile'
53
53
  export * from './cfg__accounts'
54
54
  export * from './cfg__centrifugo'
55
55
  export * from './cfg__endpoints'
56
+ export * from './cfg__grpc__grpc_charts'
56
57
  export * from './cfg__grpc__grpc_configuration'
57
58
  export * from './cfg__grpc__grpc_monitoring'
58
59
  export * from './cfg__grpc__grpc_services'
@@ -12,8 +12,8 @@ import { z } from 'zod'
12
12
  export const CentrifugoClientInfoSchema = z.object({
13
13
  user: z.string(),
14
14
  client: z.string(),
15
- conn_info: z.string().nullable().optional(),
16
- chan_info: z.string().nullable().optional(),
15
+ conn_info: z.record(z.string(), z.any()).nullable().optional(),
16
+ chan_info: z.record(z.string(), z.any()).nullable().optional(),
17
17
  })
18
18
 
19
19
  /**
@@ -12,9 +12,9 @@ import { CentrifugoStreamPositionSchema } from './CentrifugoStreamPosition.schem
12
12
  */
13
13
  export const CentrifugoHistoryRequestRequestSchema = z.object({
14
14
  channel: z.string(),
15
- limit: z.string().nullable().optional(),
15
+ limit: z.int().nullable().optional(),
16
16
  since: CentrifugoStreamPositionSchema.optional(),
17
- reverse: z.string().nullable().optional(),
17
+ reverse: z.boolean().nullable().optional(),
18
18
  })
19
19
 
20
20
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Zod schema for OverviewStats
2
+ * Zod schema for CentrifugoOverviewStats
3
3
  *
4
4
  * This schema provides runtime validation and type inference.
5
5
  * * Overview statistics for Centrifugo publishes.
@@ -9,7 +9,7 @@ import { z } from 'zod'
9
9
  /**
10
10
  * Overview statistics for Centrifugo publishes.
11
11
  */
12
- export const OverviewStatsSchema = z.object({
12
+ export const CentrifugoOverviewStatsSchema = z.object({
13
13
  total: z.int(),
14
14
  successful: z.int(),
15
15
  failed: z.int(),
@@ -23,4 +23,4 @@ export const OverviewStatsSchema = z.object({
23
23
  /**
24
24
  * Infer TypeScript type from Zod schema
25
25
  */
26
- export type OverviewStats = z.infer<typeof OverviewStatsSchema>
26
+ export type CentrifugoOverviewStats = z.infer<typeof CentrifugoOverviewStatsSchema>
@@ -14,7 +14,7 @@ export const CentrifugoPublicationSchema = z.object({
14
14
  data: z.record(z.string(), z.any()),
15
15
  info: CentrifugoClientInfoSchema.optional(),
16
16
  offset: z.int(),
17
- tags: z.string().nullable().optional(),
17
+ tags: z.record(z.string(), z.any()).nullable().optional(),
18
18
  })
19
19
 
20
20
  /**
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Zod schema for DashboardCharts
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Combined dashboard charts data.
6
+ * */
7
+ import { z } from 'zod'
8
+ import { ErrorDistributionChartSerializerSchema } from './ErrorDistributionChartSerializer.schema'
9
+ import { RequestVolumeChartSerializerSchema } from './RequestVolumeChartSerializer.schema'
10
+ import { ResponseTimeChartSerializerSchema } from './ResponseTimeChartSerializer.schema'
11
+ import { ServerUptimeChartSerializerSchema } from './ServerUptimeChartSerializer.schema'
12
+ import { ServiceActivityChartSerializerSchema } from './ServiceActivityChartSerializer.schema'
13
+
14
+ /**
15
+ * Combined dashboard charts data.
16
+ */
17
+ export const DashboardChartsSchema = z.object({
18
+ server_uptime: ServerUptimeChartSerializerSchema,
19
+ request_volume: RequestVolumeChartSerializerSchema,
20
+ response_time: ResponseTimeChartSerializerSchema,
21
+ service_activity: ServiceActivityChartSerializerSchema,
22
+ error_distribution: ErrorDistributionChartSerializerSchema,
23
+ period_hours: z.int(),
24
+ generated_at: z.string(),
25
+ })
26
+
27
+ /**
28
+ * Infer TypeScript type from Zod schema
29
+ */
30
+ export type DashboardCharts = z.infer<typeof DashboardChartsSchema>
@@ -5,12 +5,19 @@
5
5
  * * Django-RQ configuration.
6
6
  * */
7
7
  import { z } from 'zod'
8
+ import { RedisQueueConfigSchema } from './RedisQueueConfig.schema'
8
9
 
9
10
  /**
10
11
  * Django-RQ configuration.
11
12
  */
12
13
  export const DjangoRQConfigSchema = z.object({
13
- queues: z.record(z.string(), z.any()).nullable().optional(),
14
+ enabled: z.boolean().nullable().optional(),
15
+ queues: z.array(RedisQueueConfigSchema).nullable().optional(),
16
+ show_admin_link: z.boolean().nullable().optional(),
17
+ exception_handlers: z.array(z.string()).nullable().optional(),
18
+ api_token: z.string().nullable().optional(),
19
+ prometheus_enabled: z.boolean().nullable().optional(),
20
+ schedules: z.array(z.record(z.string(), z.any())).nullable().optional(),
14
21
  })
15
22
 
16
23
  /**
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Zod schema for ErrorDistributionChart
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Error distribution chart data.
6
+ * */
7
+ import { z } from 'zod'
8
+ import { ErrorDistributionDataPointSchema } from './ErrorDistributionDataPoint.schema'
9
+
10
+ /**
11
+ * Error distribution chart data.
12
+ */
13
+ export const ErrorDistributionChartSchema = z.object({
14
+ title: z.string().optional(),
15
+ error_types: z.array(ErrorDistributionDataPointSchema).optional(),
16
+ period_hours: z.int(),
17
+ total_errors: z.int(),
18
+ most_common_error: z.string().nullable().optional(),
19
+ })
20
+
21
+ /**
22
+ * Infer TypeScript type from Zod schema
23
+ */
24
+ export type ErrorDistributionChart = z.infer<typeof ErrorDistributionChartSchema>