@djangocfg/api 1.2.21 → 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 (111) hide show
  1. package/dist/index.cjs +11030 -6472
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +10395 -4022
  4. package/dist/index.d.ts +10395 -4022
  5. package/dist/index.mjs +11117 -6580
  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__dashboard__dashboard_config.ts +48 -0
  10. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_charts.ts +138 -0
  11. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_configuration.ts +63 -0
  12. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +11 -11
  13. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +77 -0
  14. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_testing.ts +79 -0
  15. package/src/cfg/generated/_utils/fetchers/index.ts +5 -0
  16. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +3 -3
  17. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +36 -0
  18. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +126 -0
  19. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +51 -0
  20. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +9 -9
  21. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +65 -0
  22. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_testing.ts +71 -0
  23. package/src/cfg/generated/_utils/hooks/index.ts +5 -0
  24. package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +2 -2
  25. package/src/cfg/generated/_utils/schemas/CentrifugoConfig.schema.ts +23 -0
  26. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +2 -2
  27. package/src/cfg/generated/_utils/schemas/{OverviewStats.schema.ts → CentrifugoOverviewStats.schema.ts} +3 -3
  28. package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +1 -1
  29. package/src/cfg/generated/_utils/schemas/ConfigData.schema.ts +27 -0
  30. package/src/cfg/generated/_utils/schemas/ConfigMeta.schema.ts +20 -0
  31. package/src/cfg/generated/_utils/schemas/ConfigValidation.schema.ts +24 -0
  32. package/src/cfg/generated/_utils/schemas/DRFConfig.schema.ts +20 -0
  33. package/src/cfg/generated/_utils/schemas/DashboardCharts.schema.ts +30 -0
  34. package/src/cfg/generated/_utils/schemas/DatabaseConfig.schema.ts +31 -0
  35. package/src/cfg/generated/_utils/schemas/DjangoConfig.schema.ts +86 -0
  36. package/src/cfg/generated/_utils/schemas/DjangoRQConfig.schema.ts +26 -0
  37. package/src/cfg/generated/_utils/schemas/EmailConfig.schema.ts +28 -0
  38. package/src/cfg/generated/_utils/schemas/ErrorDistributionChart.schema.ts +24 -0
  39. package/src/cfg/generated/_utils/schemas/ErrorDistributionChartSerializer.schema.ts +24 -0
  40. package/src/cfg/generated/_utils/schemas/ErrorDistributionDataPoint.schema.ts +22 -0
  41. package/src/cfg/generated/_utils/schemas/GRPCCallRequestRequest.schema.ts +23 -0
  42. package/src/cfg/generated/_utils/schemas/GRPCCallResponse.schema.ts +29 -0
  43. package/src/cfg/generated/_utils/schemas/GRPCConfig.schema.ts +26 -0
  44. package/src/cfg/generated/_utils/schemas/GRPCConfigDashboard.schema.ts +25 -0
  45. package/src/cfg/generated/_utils/schemas/GRPCExampleSerializer.schema.ts +24 -0
  46. package/src/cfg/generated/_utils/schemas/GRPCExamplesList.schema.ts +21 -0
  47. package/src/cfg/generated/_utils/schemas/GRPCFeaturesSerializer.schema.ts +22 -0
  48. package/src/cfg/generated/_utils/schemas/GRPCFrameworkConfigSerializer.schema.ts +22 -0
  49. package/src/cfg/generated/_utils/schemas/GRPCHealthCheck.schema.ts +23 -0
  50. package/src/cfg/generated/_utils/schemas/GRPCInterceptorInfoSerializer.schema.ts +20 -0
  51. package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +27 -0
  52. package/src/cfg/generated/_utils/schemas/GRPCServerConfigSerializer.schema.ts +23 -0
  53. package/src/cfg/generated/_utils/schemas/GRPCServerInfo.schema.ts +28 -0
  54. package/src/cfg/generated/_utils/schemas/GRPCServiceInfoSerializer.schema.ts +22 -0
  55. package/src/cfg/generated/_utils/schemas/GRPCStatsSerializer.schema.ts +21 -0
  56. package/src/cfg/generated/_utils/schemas/GRPCTestLog.schema.ts +27 -0
  57. package/src/cfg/generated/_utils/schemas/JWTConfig.schema.ts +21 -0
  58. package/src/cfg/generated/_utils/schemas/MethodInfoSerializer.schema.ts +24 -0
  59. package/src/cfg/generated/_utils/schemas/MethodSummarySerializer.schema.ts +25 -0
  60. package/src/cfg/generated/_utils/schemas/MonitoringServiceStatsSerializer.schema.ts +24 -0
  61. package/src/cfg/generated/_utils/schemas/PaymentsConfig.schema.ts +21 -0
  62. package/src/cfg/generated/_utils/schemas/PaymentsNowPayments.schema.ts +22 -0
  63. package/src/cfg/generated/_utils/schemas/RecentErrorSerializer.schema.ts +22 -0
  64. package/src/cfg/generated/_utils/schemas/RecentRequest.schema.ts +28 -0
  65. package/src/cfg/generated/_utils/schemas/RedisQueueConfig.schema.ts +29 -0
  66. package/src/cfg/generated/_utils/schemas/RequestVolumeChart.schema.ts +25 -0
  67. package/src/cfg/generated/_utils/schemas/RequestVolumeChartSerializer.schema.ts +25 -0
  68. package/src/cfg/generated/_utils/schemas/RequestVolumeDataPoint.schema.ts +23 -0
  69. package/src/cfg/generated/_utils/schemas/ResponseTimeChart.schema.ts +25 -0
  70. package/src/cfg/generated/_utils/schemas/ResponseTimeChartSerializer.schema.ts +25 -0
  71. package/src/cfg/generated/_utils/schemas/ResponseTimeDataPoint.schema.ts +25 -0
  72. package/src/cfg/generated/_utils/schemas/ServerLifecycleChart.schema.ts +25 -0
  73. package/src/cfg/generated/_utils/schemas/ServerLifecycleEvent.schema.ts +24 -0
  74. package/src/cfg/generated/_utils/schemas/ServerUptimeChart.schema.ts +25 -0
  75. package/src/cfg/generated/_utils/schemas/ServerUptimeChartSerializer.schema.ts +25 -0
  76. package/src/cfg/generated/_utils/schemas/ServerUptimeDataPoint.schema.ts +21 -0
  77. package/src/cfg/generated/_utils/schemas/ServiceActivityChart.schema.ts +24 -0
  78. package/src/cfg/generated/_utils/schemas/ServiceActivityChartSerializer.schema.ts +24 -0
  79. package/src/cfg/generated/_utils/schemas/ServiceActivityDataPoint.schema.ts +22 -0
  80. package/src/cfg/generated/_utils/schemas/ServiceDetail.schema.ts +31 -0
  81. package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +2 -2
  82. package/src/cfg/generated/_utils/schemas/ServiceMethods.schema.ts +22 -0
  83. package/src/cfg/generated/_utils/schemas/ServiceStatsSerializer.schema.ts +8 -8
  84. package/src/cfg/generated/_utils/schemas/SpectacularConfig.schema.ts +21 -0
  85. package/src/cfg/generated/_utils/schemas/index.ts +56 -2
  86. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +5 -5
  87. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +4 -4
  88. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +1 -1
  89. package/src/cfg/generated/cfg__dashboard__dashboard_config/client.ts +25 -0
  90. package/src/cfg/generated/cfg__dashboard__dashboard_config/index.ts +2 -0
  91. package/src/cfg/generated/cfg__dashboard__dashboard_config/models.ts +240 -0
  92. package/src/cfg/generated/cfg__endpoints/client.ts +1 -1
  93. package/src/cfg/generated/cfg__grpc__grpc_charts/client.ts +162 -0
  94. package/src/cfg/generated/cfg__grpc__grpc_charts/index.ts +2 -0
  95. package/src/cfg/generated/cfg__grpc__grpc_charts/models.ts +335 -0
  96. package/src/cfg/generated/cfg__grpc__grpc_configuration/client.ts +35 -0
  97. package/src/cfg/generated/cfg__grpc__grpc_configuration/index.ts +2 -0
  98. package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +128 -0
  99. package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +12 -11
  100. package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +45 -31
  101. package/src/cfg/generated/cfg__grpc__grpc_services/client.ts +55 -0
  102. package/src/cfg/generated/cfg__grpc__grpc_services/index.ts +2 -0
  103. package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +138 -0
  104. package/src/cfg/generated/cfg__grpc__grpc_testing/client.ts +67 -0
  105. package/src/cfg/generated/cfg__grpc__grpc_testing/index.ts +2 -0
  106. package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +106 -0
  107. package/src/cfg/generated/cfg__payments/client.ts +1 -1
  108. package/src/cfg/generated/client.ts +15 -0
  109. package/src/cfg/generated/index.ts +25 -0
  110. package/src/cfg/generated/schema.ts +8264 -4968
  111. 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.21",
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.21",
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,48 @@
1
+ /**
2
+ * Typed fetchers for Dashboard - Config
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 { ConfigDataSchema, type ConfigData } from '../schemas/ConfigData.schema'
33
+ import { getAPIInstance } from '../../api-instance'
34
+
35
+ /**
36
+ * Get configuration data
37
+ *
38
+ * @method GET
39
+ * @path /cfg/dashboard/api/config/config/
40
+ */
41
+ export async function getDashboardApiConfigConfigRetrieve( client?: any
42
+ ): Promise<ConfigData> {
43
+ const api = client || getAPIInstance()
44
+ const response = await api.cfg_dashboard_config.dashboardApiConfigConfigRetrieve()
45
+ return ConfigDataSchema.parse(response)
46
+ }
47
+
48
+
@@ -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
+
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Typed fetchers for Grpc Configuration
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 { GRPCConfigSchema, type GRPCConfig } from '../schemas/GRPCConfig.schema'
33
+ import { GRPCServerInfoSchema, type GRPCServerInfo } from '../schemas/GRPCServerInfo.schema'
34
+ import { getAPIInstance } from '../../api-instance'
35
+
36
+ /**
37
+ * Get gRPC configuration
38
+ *
39
+ * @method GET
40
+ * @path /cfg/grpc/config/config/
41
+ */
42
+ export async function getGrpcConfigConfigRetrieve( client?: any
43
+ ): Promise<GRPCConfig> {
44
+ const api = client || getAPIInstance()
45
+ const response = await api.cfg_grpc_configuration.grpcConfigConfigRetrieve()
46
+ return GRPCConfigSchema.parse(response)
47
+ }
48
+
49
+
50
+ /**
51
+ * Get server information
52
+ *
53
+ * @method GET
54
+ * @path /cfg/grpc/config/server-info/
55
+ */
56
+ export async function getGrpcConfigServerInfoRetrieve( client?: any
57
+ ): Promise<GRPCServerInfo> {
58
+ const api = client || getAPIInstance()
59
+ const response = await api.cfg_grpc_configuration.grpcConfigServerInfoRetrieve()
60
+ return GRPCServerInfoSchema.parse(response)
61
+ }
62
+
63
+
@@ -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
 
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Typed fetchers for Grpc Services
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 { ServiceDetailSchema, type ServiceDetail } from '../schemas/ServiceDetail.schema'
33
+ import { ServiceMethodsSchema, type ServiceMethods } from '../schemas/ServiceMethods.schema'
34
+ import { getAPIInstance } from '../../api-instance'
35
+
36
+ /**
37
+ * List all services
38
+ *
39
+ * @method GET
40
+ * @path /cfg/grpc/services/
41
+ */
42
+ export async function getGrpcServicesList( params?: { hours?: number }, client?: any
43
+ ): Promise<any> {
44
+ const api = client || getAPIInstance()
45
+ const response = await api.cfg_grpc_services.list(params?.hours)
46
+ return response
47
+ }
48
+
49
+
50
+ /**
51
+ * Get service details
52
+ *
53
+ * @method GET
54
+ * @path /cfg/grpc/services/{id}/
55
+ */
56
+ export async function getGrpcServicesRetrieve( id: string, pk: string, client?: any
57
+ ): Promise<ServiceDetail> {
58
+ const api = client || getAPIInstance()
59
+ const response = await api.cfg_grpc_services.retrieve(id, pk)
60
+ return ServiceDetailSchema.parse(response)
61
+ }
62
+
63
+
64
+ /**
65
+ * Get service methods
66
+ *
67
+ * @method GET
68
+ * @path /cfg/grpc/services/{id}/methods/
69
+ */
70
+ export async function getGrpcServicesMethodsRetrieve( id: string, pk: string, client?: any
71
+ ): Promise<ServiceMethods> {
72
+ const api = client || getAPIInstance()
73
+ const response = await api.cfg_grpc_services.methodsRetrieve(id, pk)
74
+ return ServiceMethodsSchema.parse(response)
75
+ }
76
+
77
+
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Typed fetchers for Grpc 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 { GRPCCallRequestRequestSchema, type GRPCCallRequestRequest } from '../schemas/GRPCCallRequestRequest.schema'
33
+ import { GRPCCallResponseSchema, type GRPCCallResponse } from '../schemas/GRPCCallResponse.schema'
34
+ import { GRPCExamplesListSchema, type GRPCExamplesList } from '../schemas/GRPCExamplesList.schema'
35
+ import { GRPCTestLogSchema, type GRPCTestLog } from '../schemas/GRPCTestLog.schema'
36
+ import { getAPIInstance } from '../../api-instance'
37
+
38
+ /**
39
+ * Call gRPC method
40
+ *
41
+ * @method POST
42
+ * @path /cfg/grpc/test/call/
43
+ */
44
+ export async function createGrpcTestCallCreate( data: GRPCCallRequestRequest, client?: any
45
+ ): Promise<GRPCCallResponse> {
46
+ const api = client || getAPIInstance()
47
+ const response = await api.cfg_grpc_testing.grpcTestCallCreate(data)
48
+ return GRPCCallResponseSchema.parse(response)
49
+ }
50
+
51
+
52
+ /**
53
+ * Get example payloads
54
+ *
55
+ * @method GET
56
+ * @path /cfg/grpc/test/examples/
57
+ */
58
+ export async function getGrpcTestExamplesRetrieve( params?: { method?: string; service?: string }, client?: any
59
+ ): Promise<GRPCExamplesList> {
60
+ const api = client || getAPIInstance()
61
+ const response = await api.cfg_grpc_testing.grpcTestExamplesRetrieve(params?.method, params?.service)
62
+ return GRPCExamplesListSchema.parse(response)
63
+ }
64
+
65
+
66
+ /**
67
+ * Get test logs
68
+ *
69
+ * @method GET
70
+ * @path /cfg/grpc/test/logs/
71
+ */
72
+ export async function getGrpcTestLogsRetrieve( params?: { method?: string; service?: string; status?: string }, client?: any
73
+ ): Promise<GRPCTestLog> {
74
+ const api = client || getAPIInstance()
75
+ const response = await api.cfg_grpc_testing.grpcTestLogsRetrieve(params?.method, params?.service, params?.status)
76
+ return GRPCTestLogSchema.parse(response)
77
+ }
78
+
79
+
@@ -36,11 +36,16 @@ export * from './cfg__dashboard__dashboard_activity'
36
36
  export * from './cfg__dashboard__dashboard_api_zones'
37
37
  export * from './cfg__dashboard__dashboard_charts'
38
38
  export * from './cfg__dashboard__dashboard_commands'
39
+ export * from './cfg__dashboard__dashboard_config'
39
40
  export * from './cfg__dashboard__dashboard_overview'
40
41
  export * from './cfg__dashboard__dashboard_statistics'
41
42
  export * from './cfg__dashboard__dashboard_system'
42
43
  export * from './cfg__endpoints'
44
+ export * from './cfg__grpc__grpc_charts'
45
+ export * from './cfg__grpc__grpc_configuration'
43
46
  export * from './cfg__grpc__grpc_monitoring'
47
+ export * from './cfg__grpc__grpc_services'
48
+ export * from './cfg__grpc__grpc_testing'
44
49
  export * from './cfg__health'
45
50
  export * from './cfg__knowbase'
46
51
  export * from './cfg__leads'
@@ -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,36 @@
1
+ /**
2
+ * SWR Hooks for Dashboard - Config
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__dashboard_config'
20
+ import type { API } from '../../index'
21
+ import type { ConfigData } from '../schemas/ConfigData.schema'
22
+
23
+ /**
24
+ * Get configuration data
25
+ *
26
+ * @method GET
27
+ * @path /cfg/dashboard/api/config/config/
28
+ */
29
+ export function useDashboardApiConfigConfigRetrieve(client?: API): ReturnType<typeof useSWR<ConfigData>> {
30
+ return useSWR<ConfigData>(
31
+ 'cfg-dashboard-api-config-config',
32
+ () => Fetchers.getDashboardApiConfigConfigRetrieve(client)
33
+ )
34
+ }
35
+
36
+