@djangocfg/api 1.2.23 → 1.2.25

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 (146) hide show
  1. package/dist/index.cjs +2770 -23332
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1908 -19148
  4. package/dist/index.d.ts +1908 -19148
  5. package/dist/index.mjs +2705 -23279
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/contexts/index.ts +0 -11
  9. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +3 -2
  10. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_auth.ts +48 -0
  11. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +5 -5
  12. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +0 -16
  13. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_api_keys.ts +78 -0
  14. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +5 -20
  15. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_proto_files.ts +91 -0
  16. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +5 -4
  17. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_jobs.ts +10 -8
  18. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_registries.ts +24 -22
  19. package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_schedules.ts +5 -4
  20. package/src/cfg/generated/_utils/fetchers/index.ts +3 -0
  21. package/src/cfg/generated/_utils/hooks/cfg__accounts.ts +0 -1
  22. package/src/cfg/generated/_utils/hooks/cfg__accounts__auth.ts +0 -1
  23. package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +3 -3
  24. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +0 -1
  25. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_auth.ts +35 -0
  26. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +5 -6
  27. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +0 -21
  28. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +0 -1
  29. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +0 -1
  30. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +0 -1
  31. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +0 -1
  32. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +0 -1
  33. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +0 -1
  34. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +0 -1
  35. package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +0 -1
  36. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts +65 -0
  37. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +0 -1
  38. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +0 -1
  39. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +5 -21
  40. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_proto_files.ts +83 -0
  41. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +3 -3
  42. package/src/cfg/generated/_utils/hooks/cfg__health.ts +0 -1
  43. package/src/cfg/generated/_utils/hooks/cfg__leads__lead_submission.ts +0 -1
  44. package/src/cfg/generated/_utils/hooks/cfg__newsletter.ts +0 -1
  45. package/src/cfg/generated/_utils/hooks/cfg__newsletter__bulk_email.ts +0 -1
  46. package/src/cfg/generated/_utils/hooks/cfg__newsletter__logs.ts +0 -1
  47. package/src/cfg/generated/_utils/hooks/cfg__newsletter__newsletters.ts +0 -1
  48. package/src/cfg/generated/_utils/hooks/cfg__newsletter__testing.ts +0 -1
  49. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_jobs.ts +8 -6
  50. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +0 -1
  51. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_registries.ts +16 -14
  52. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_schedules.ts +3 -2
  53. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +0 -1
  54. package/src/cfg/generated/_utils/hooks/index.ts +3 -0
  55. package/src/cfg/generated/_utils/schemas/ApiKey.schema.ts +32 -0
  56. package/src/cfg/generated/_utils/schemas/ApiKeyStats.schema.ts +23 -0
  57. package/src/cfg/generated/_utils/schemas/CentrifugoToken.schema.ts +22 -0
  58. package/src/cfg/generated/_utils/schemas/Command.schema.ts +13 -0
  59. package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +3 -2
  60. package/src/cfg/generated/_utils/schemas/DashboardCharts.schema.ts +10 -10
  61. package/src/cfg/generated/_utils/schemas/GRPCCallRequestRequest.schema.ts +2 -2
  62. package/src/cfg/generated/_utils/schemas/GRPCConfig.schema.ts +6 -6
  63. package/src/cfg/generated/_utils/schemas/{GRPCExampleSerializer.schema.ts → GRPCExample.schema.ts} +3 -3
  64. package/src/cfg/generated/_utils/schemas/GRPCExamplesList.schema.ts +2 -2
  65. package/src/cfg/generated/_utils/schemas/{GRPCFeaturesSerializer.schema.ts → GRPCFeatures.schema.ts} +4 -4
  66. package/src/cfg/generated/_utils/schemas/{GRPCFrameworkConfigSerializer.schema.ts → GRPCFrameworkConfig.schema.ts} +3 -3
  67. package/src/cfg/generated/_utils/schemas/{GRPCInterceptorInfoSerializer.schema.ts → GRPCInterceptorInfo.schema.ts} +3 -3
  68. package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +3 -1
  69. package/src/cfg/generated/_utils/schemas/GRPCRegisteredService.schema.ts +24 -0
  70. package/src/cfg/generated/_utils/schemas/{GRPCServerConfigSerializer.schema.ts → GRPCServerConfig.schema.ts} +4 -4
  71. package/src/cfg/generated/_utils/schemas/GRPCServerInfo.schema.ts +6 -6
  72. package/src/cfg/generated/_utils/schemas/GRPCServerStatus.schema.ts +34 -0
  73. package/src/cfg/generated/_utils/schemas/{GRPCServiceInfoSerializer.schema.ts → GRPCServiceInfo.schema.ts} +3 -3
  74. package/src/cfg/generated/_utils/schemas/{GRPCStatsSerializer.schema.ts → GRPCStats.schema.ts} +3 -3
  75. package/src/cfg/generated/_utils/schemas/JobListRequest.schema.ts +28 -0
  76. package/src/cfg/generated/_utils/schemas/{MethodInfoSerializer.schema.ts → MethodInfo.schema.ts} +3 -3
  77. package/src/cfg/generated/_utils/schemas/MethodList.schema.ts +2 -2
  78. package/src/cfg/generated/_utils/schemas/{MethodStatsSerializer.schema.ts → MethodStats.schema.ts} +3 -3
  79. package/src/cfg/generated/_utils/schemas/{MethodSummarySerializer.schema.ts → MethodSummary.schema.ts} +5 -5
  80. package/src/cfg/generated/_utils/schemas/PaginatedApiKeyList.schema.ts +24 -0
  81. package/src/cfg/generated/_utils/schemas/PaginatedJobListList.schema.ts +24 -0
  82. package/src/cfg/generated/_utils/schemas/PaginatedPublishList.schema.ts +24 -0
  83. package/src/cfg/generated/_utils/schemas/PaginatedRecentRequestList.schema.ts +24 -0
  84. package/src/cfg/generated/_utils/schemas/PaginatedScheduledJobList.schema.ts +24 -0
  85. package/src/cfg/generated/_utils/schemas/PaginatedServiceSummaryList.schema.ts +24 -0
  86. package/src/cfg/generated/_utils/schemas/ProtoFileDetail.schema.ts +27 -0
  87. package/src/cfg/generated/_utils/schemas/ProtoFileList.schema.ts +23 -0
  88. package/src/cfg/generated/_utils/schemas/ProtoGenerateError.schema.ts +20 -0
  89. package/src/cfg/generated/_utils/schemas/ProtoGenerateRequestRequest.schema.ts +20 -0
  90. package/src/cfg/generated/_utils/schemas/ProtoGenerateResponse.schema.ts +24 -0
  91. package/src/cfg/generated/_utils/schemas/Publish.schema.ts +29 -0
  92. package/src/cfg/generated/_utils/schemas/{RecentErrorSerializer.schema.ts → RecentError.schema.ts} +3 -3
  93. package/src/cfg/generated/_utils/schemas/RecentRequest.schema.ts +5 -0
  94. package/src/cfg/generated/_utils/schemas/ServiceDetail.schema.ts +6 -6
  95. package/src/cfg/generated/_utils/schemas/ServiceMethods.schema.ts +2 -2
  96. package/src/cfg/generated/_utils/schemas/{ServiceStatsSerializer.schema.ts → ServiceStats.schema.ts} +3 -3
  97. package/src/cfg/generated/_utils/schemas/ServiceSummary.schema.ts +26 -0
  98. package/src/cfg/generated/_utils/schemas/User.schema.ts +2 -0
  99. package/src/cfg/generated/_utils/schemas/index.ts +31 -21
  100. package/src/cfg/generated/cfg__accounts/models.ts +17 -0
  101. package/src/cfg/generated/cfg__accounts__user_profile/models.ts +17 -0
  102. package/src/cfg/generated/cfg__centrifugo/client.ts +1 -1
  103. package/src/cfg/generated/cfg__centrifugo/models.ts +19 -0
  104. package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/client.ts +26 -0
  105. package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/index.ts +2 -0
  106. package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/models.ts +16 -0
  107. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +6 -5
  108. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +37 -11
  109. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +0 -10
  110. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +0 -26
  111. package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +10 -1
  112. package/src/cfg/generated/cfg__grpc__grpc_api_keys/client.ts +56 -0
  113. package/src/cfg/generated/cfg__grpc__grpc_api_keys/index.ts +2 -0
  114. package/src/cfg/generated/cfg__grpc__grpc_api_keys/models.ts +79 -0
  115. package/src/cfg/generated/cfg__grpc__grpc_charts/models.ts +0 -96
  116. package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +12 -12
  117. package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +4 -25
  118. package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +111 -49
  119. package/src/cfg/generated/cfg__grpc__grpc_proto_files/client.ts +54 -0
  120. package/src/cfg/generated/cfg__grpc__grpc_proto_files/index.ts +2 -0
  121. package/src/cfg/generated/cfg__grpc__grpc_proto_files/models.ts +35 -0
  122. package/src/cfg/generated/cfg__grpc__grpc_services/client.ts +6 -5
  123. package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +57 -8
  124. package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +2 -2
  125. package/src/cfg/generated/cfg__rq__rq_jobs/client.ts +8 -8
  126. package/src/cfg/generated/cfg__rq__rq_jobs/models.ts +65 -0
  127. package/src/cfg/generated/cfg__rq__rq_registries/client.ts +37 -34
  128. package/src/cfg/generated/cfg__rq__rq_registries/models.ts +65 -0
  129. package/src/cfg/generated/cfg__rq__rq_schedules/client.ts +4 -4
  130. package/src/cfg/generated/cfg__rq__rq_schedules/models.ts +25 -0
  131. package/src/cfg/generated/client.ts +9 -0
  132. package/src/cfg/generated/index.ts +27 -8
  133. package/src/cfg/generated/{schema.ts → schema.json} +19166 -18258
  134. package/src/index.ts +7 -2
  135. package/src/types/auth.ts +40 -0
  136. package/src/types/index.ts +7 -0
  137. package/src/cfg/contexts/AccountsContext.tsx +0 -205
  138. package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +0 -20
  139. package/src/cfg/generated/_utils/schemas/ErrorDistributionChartSerializer.schema.ts +0 -24
  140. package/src/cfg/generated/_utils/schemas/MonitoringServiceStatsSerializer.schema.ts +0 -24
  141. package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +0 -23
  142. package/src/cfg/generated/_utils/schemas/RequestVolumeChartSerializer.schema.ts +0 -25
  143. package/src/cfg/generated/_utils/schemas/ResponseTimeChartSerializer.schema.ts +0 -25
  144. package/src/cfg/generated/_utils/schemas/ServerUptimeChartSerializer.schema.ts +0 -25
  145. package/src/cfg/generated/_utils/schemas/ServiceActivityChartSerializer.schema.ts +0 -24
  146. package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +0 -21
@@ -0,0 +1,35 @@
1
+ /**
2
+ * SWR Hooks for Centrifugo Auth
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 * as Fetchers from '../fetchers/cfg__centrifugo__centrifugo_auth'
19
+ import type { API } from '../../index'
20
+ import type { ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
21
+
22
+ /**
23
+ * Get Centrifugo connection token
24
+ *
25
+ * @method GET
26
+ * @path /cfg/centrifugo/auth/token/
27
+ */
28
+ export function useCentrifugoAuthTokenRetrieve(client?: API): ReturnType<typeof useSWR<ConnectionTokenResponse>> {
29
+ return useSWR<ConnectionTokenResponse>(
30
+ 'cfg-centrifugo-auth-token',
31
+ () => Fetchers.getCentrifugoAuthTokenRetrieve(client)
32
+ )
33
+ }
34
+
35
+
@@ -15,13 +15,12 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__centrifugo__centrifugo_monitoring'
20
19
  import type { API } from '../../index'
21
20
  import type { CentrifugoOverviewStats } from '../schemas/CentrifugoOverviewStats.schema'
22
21
  import type { ChannelList } from '../schemas/ChannelList.schema'
23
22
  import type { HealthCheck } from '../schemas/HealthCheck.schema'
24
- import type { RecentPublishes } from '../schemas/RecentPublishes.schema'
23
+ import type { PaginatedPublishList } from '../schemas/PaginatedPublishList.schema'
25
24
 
26
25
  /**
27
26
  * Get Centrifugo health status
@@ -57,10 +56,10 @@ export function useCentrifugoMonitorOverviewRetrieve(params?: { hours?: number }
57
56
  * @method GET
58
57
  * @path /cfg/centrifugo/monitor/publishes/
59
58
  */
60
- export function useCentrifugoMonitorPublishesRetrieve(params?: { channel?: string; count?: number; offset?: number; status?: string }, client?: API): ReturnType<typeof useSWR<RecentPublishes>> {
61
- return useSWR<RecentPublishes>(
62
- params ? ['cfg-centrifugo-monitor-publishe', params] : 'cfg-centrifugo-monitor-publishe',
63
- () => Fetchers.getCentrifugoMonitorPublishesRetrieve(params, client)
59
+ export function useCentrifugoMonitorPublishesList(params?: { channel?: string; page?: number; page_size?: number; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedPublishList>> {
60
+ return useSWR<PaginatedPublishList>(
61
+ params ? ['cfg-centrifugo-monitor-publishes', params] : 'cfg-centrifugo-monitor-publishes',
62
+ () => Fetchers.getCentrifugoMonitorPublishesList(params, client)
64
63
  )
65
64
  }
66
65
 
@@ -14,35 +14,14 @@
14
14
  * await createUser({ name: 'John', email: 'john@example.com' })
15
15
  * ```
16
16
  */
17
- import useSWR from 'swr'
18
17
  import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__centrifugo__centrifugo_testing'
20
19
  import type { API } from '../../index'
21
- import type { ConnectionTokenRequestRequest } from '../schemas/ConnectionTokenRequestRequest.schema'
22
- import type { ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
23
20
  import type { ManualAckRequestRequest } from '../schemas/ManualAckRequestRequest.schema'
24
21
  import type { ManualAckResponse } from '../schemas/ManualAckResponse.schema'
25
22
  import type { PublishTestRequestRequest } from '../schemas/PublishTestRequestRequest.schema'
26
23
  import type { PublishTestResponse } from '../schemas/PublishTestResponse.schema'
27
24
 
28
- /**
29
- * Generate connection token
30
- *
31
- * @method POST
32
- * @path /cfg/centrifugo/testing/connection-token/
33
- */
34
- export function useCreateCentrifugoTestingConnectionTokenCreate() {
35
- const { mutate } = useSWRConfig()
36
-
37
- return async (data: ConnectionTokenRequestRequest, client?: API): Promise<ConnectionTokenResponse> => {
38
- const result = await Fetchers.createCentrifugoTestingConnectionTokenCreate(data, client)
39
- // Revalidate related queries
40
- mutate('cfg-centrifugo-testing-connection-token')
41
- return result
42
- }
43
- }
44
-
45
-
46
25
  /**
47
26
  * Publish test message
48
27
  *
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_activity'
20
19
  import type { API } from '../../index'
21
20
 
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_api_zones'
20
19
  import type { API } from '../../index'
21
20
  import type { APIZonesSummary } from '../schemas/APIZonesSummary.schema'
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_charts'
20
19
  import type { API } from '../../index'
21
20
  import type { ChartData } from '../schemas/ChartData.schema'
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_config'
20
19
  import type { API } from '../../index'
21
20
  import type { ConfigData } from '../schemas/ConfigData.schema'
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_overview'
20
19
  import type { API } from '../../index'
21
20
  import type { DashboardOverview } from '../schemas/DashboardOverview.schema'
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_statistics'
20
19
  import type { API } from '../../index'
21
20
  import type { UserStatistics } from '../schemas/UserStatistics.schema'
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_system'
20
19
  import type { API } from '../../index'
21
20
  import type { SystemHealth } from '../schemas/SystemHealth.schema'
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__endpoints'
20
19
  import type { API } from '../../index'
21
20
  import type { EndpointsStatus } from '../schemas/EndpointsStatus.schema'
@@ -0,0 +1,65 @@
1
+ /**
2
+ * SWR Hooks for Grpc Api Keys
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 * as Fetchers from '../fetchers/cfg__grpc__grpc_api_keys'
19
+ import type { API } from '../../index'
20
+ import type { ApiKey } from '../schemas/ApiKey.schema'
21
+ import type { ApiKeyStats } from '../schemas/ApiKeyStats.schema'
22
+ import type { PaginatedApiKeyList } from '../schemas/PaginatedApiKeyList.schema'
23
+
24
+ /**
25
+ * List API keys
26
+ *
27
+ * @method GET
28
+ * @path /cfg/grpc/api-keys/
29
+ */
30
+ export function useGrpcApiKeysList(params?: { is_active?: boolean; key_type?: string; page?: number; page_size?: number; user_id?: number }, client?: API): ReturnType<typeof useSWR<PaginatedApiKeyList>> {
31
+ return useSWR<PaginatedApiKeyList>(
32
+ params ? ['cfg-grpc-api-keys', params] : 'cfg-grpc-api-keys',
33
+ () => Fetchers.getGrpcApiKeysList(params, client)
34
+ )
35
+ }
36
+
37
+
38
+ /**
39
+ * Get API key details
40
+ *
41
+ * @method GET
42
+ * @path /cfg/grpc/api-keys/{id}/
43
+ */
44
+ export function useGrpcApiKeysRetrieve(id: number, client?: API): ReturnType<typeof useSWR<ApiKey>> {
45
+ return useSWR<ApiKey>(
46
+ ['cfg-grpc-api-key', id],
47
+ () => Fetchers.getGrpcApiKeysRetrieve(id, client)
48
+ )
49
+ }
50
+
51
+
52
+ /**
53
+ * Get API keys statistics
54
+ *
55
+ * @method GET
56
+ * @path /cfg/grpc/api-keys/stats/
57
+ */
58
+ export function useGrpcApiKeysStatsRetrieve(client?: API): ReturnType<typeof useSWR<ApiKeyStats>> {
59
+ return useSWR<ApiKeyStats>(
60
+ 'cfg-grpc-api-keys-stat',
61
+ () => Fetchers.getGrpcApiKeysStatsRetrieve(client)
62
+ )
63
+ }
64
+
65
+
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__grpc__grpc_charts'
20
19
  import type { API } from '../../index'
21
20
  import type { DashboardCharts } from '../schemas/DashboardCharts.schema'
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__grpc__grpc_configuration'
20
19
  import type { API } from '../../index'
21
20
  import type { GRPCConfig } from '../schemas/GRPCConfig.schema'
@@ -15,14 +15,12 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__grpc__grpc_monitoring'
20
19
  import type { API } from '../../index'
21
20
  import type { GRPCHealthCheck } from '../schemas/GRPCHealthCheck.schema'
22
21
  import type { GRPCOverviewStats } from '../schemas/GRPCOverviewStats.schema'
23
22
  import type { MethodList } from '../schemas/MethodList.schema'
24
- import type { RecentRequest } from '../schemas/RecentRequest.schema'
25
- import type { ServiceList } from '../schemas/ServiceList.schema'
23
+ import type { PaginatedRecentRequestList } from '../schemas/PaginatedRecentRequestList.schema'
26
24
 
27
25
  /**
28
26
  * Get gRPC health status
@@ -72,24 +70,10 @@ export function useGrpcMonitorOverviewRetrieve(params?: { hours?: number }, clie
72
70
  * @method GET
73
71
  * @path /cfg/grpc/monitor/requests/
74
72
  */
75
- export function useGrpcMonitorRequestsRetrieve(params?: { method?: string; service?: string; status?: string }, client?: API): ReturnType<typeof useSWR<RecentRequest>> {
76
- return useSWR<RecentRequest>(
77
- params ? ['cfg-grpc-monitor-request', params] : 'cfg-grpc-monitor-request',
78
- () => Fetchers.getGrpcMonitorRequestsRetrieve(params, client)
79
- )
80
- }
81
-
82
-
83
- /**
84
- * Get service statistics
85
- *
86
- * @method GET
87
- * @path /cfg/grpc/monitor/services/
88
- */
89
- export function useGrpcMonitorServicesRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ServiceList>> {
90
- return useSWR<ServiceList>(
91
- params ? ['cfg-grpc-monitor-service', params] : 'cfg-grpc-monitor-service',
92
- () => Fetchers.getGrpcMonitorServicesRetrieve(params, client)
73
+ export function useGrpcMonitorRequestsList(params?: { method?: string; page?: number; page_size?: number; service?: string; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedRecentRequestList>> {
74
+ return useSWR<PaginatedRecentRequestList>(
75
+ params ? ['cfg-grpc-monitor-requests', params] : 'cfg-grpc-monitor-requests',
76
+ () => Fetchers.getGrpcMonitorRequestsList(params, client)
93
77
  )
94
78
  }
95
79
 
@@ -0,0 +1,83 @@
1
+ /**
2
+ * SWR Hooks for Grpc Proto Files
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_proto_files'
20
+ import type { API } from '../../index'
21
+ import type { ProtoGenerateRequestRequest } from '../schemas/ProtoGenerateRequestRequest.schema'
22
+ import type { ProtoGenerateResponse } from '../schemas/ProtoGenerateResponse.schema'
23
+
24
+ /**
25
+ * List all proto files
26
+ *
27
+ * @method GET
28
+ * @path /cfg/grpc/proto-files/
29
+ */
30
+ export function useGrpcProtoFilesList(client?: API): ReturnType<typeof useSWR<any>> {
31
+ return useSWR<any>(
32
+ 'cfg-grpc-proto-files',
33
+ () => Fetchers.getGrpcProtoFilesList(client)
34
+ )
35
+ }
36
+
37
+
38
+ /**
39
+ * Download proto file
40
+ *
41
+ * @method GET
42
+ * @path /cfg/grpc/proto-files/{id}/
43
+ */
44
+ export function useGrpcProtoFilesRetrieve(id: string, pk: string, client?: API): ReturnType<typeof useSWR<any>> {
45
+ return useSWR<any>(
46
+ ['cfg-grpc-proto-file', id],
47
+ () => Fetchers.getGrpcProtoFilesRetrieve(id, pk, client)
48
+ )
49
+ }
50
+
51
+
52
+ /**
53
+ * Download all proto files
54
+ *
55
+ * @method GET
56
+ * @path /cfg/grpc/proto-files/download-all/
57
+ */
58
+ export function useGrpcProtoFilesDownloadAllRetrieve(client?: API): ReturnType<typeof useSWR<any>> {
59
+ return useSWR<any>(
60
+ 'cfg-grpc-proto-files-download-all',
61
+ () => Fetchers.getGrpcProtoFilesDownloadAllRetrieve(client)
62
+ )
63
+ }
64
+
65
+
66
+ /**
67
+ * Generate proto files
68
+ *
69
+ * @method POST
70
+ * @path /cfg/grpc/proto-files/generate/
71
+ */
72
+ export function useCreateGrpcProtoFilesGenerateCreate() {
73
+ const { mutate } = useSWRConfig()
74
+
75
+ return async (data: ProtoGenerateRequestRequest, client?: API): Promise<ProtoGenerateResponse> => {
76
+ const result = await Fetchers.createGrpcProtoFilesGenerateCreate(data, client)
77
+ // Revalidate related queries
78
+ mutate('cfg-grpc-proto-files-generate')
79
+ return result
80
+ }
81
+ }
82
+
83
+
@@ -15,9 +15,9 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__grpc__grpc_services'
20
19
  import type { API } from '../../index'
20
+ import type { PaginatedServiceSummaryList } from '../schemas/PaginatedServiceSummaryList.schema'
21
21
  import type { ServiceDetail } from '../schemas/ServiceDetail.schema'
22
22
  import type { ServiceMethods } from '../schemas/ServiceMethods.schema'
23
23
 
@@ -27,8 +27,8 @@ import type { ServiceMethods } from '../schemas/ServiceMethods.schema'
27
27
  * @method GET
28
28
  * @path /cfg/grpc/services/
29
29
  */
30
- export function useGrpcServicesList(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<any>> {
31
- return useSWR<any>(
30
+ export function useGrpcServicesList(params?: { hours?: number; page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedServiceSummaryList>> {
31
+ return useSWR<PaginatedServiceSummaryList>(
32
32
  params ? ['cfg-grpc-services', params] : 'cfg-grpc-services',
33
33
  () => Fetchers.getGrpcServicesList(params, client)
34
34
  )
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__health'
20
19
  import type { API } from '../../index'
21
20
  import type { HealthCheck } from '../schemas/HealthCheck.schema'
@@ -14,7 +14,6 @@
14
14
  * await createUser({ name: 'John', email: 'john@example.com' })
15
15
  * ```
16
16
  */
17
- import useSWR from 'swr'
18
17
  import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__leads__lead_submission'
20
19
  import type { API } from '../../index'
@@ -14,7 +14,6 @@
14
14
  * await createUser({ name: 'John', email: 'john@example.com' })
15
15
  * ```
16
16
  */
17
- import useSWR from 'swr'
18
17
  import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__newsletter'
20
19
  import type { API } from '../../index'
@@ -14,7 +14,6 @@
14
14
  * await createUser({ name: 'John', email: 'john@example.com' })
15
15
  * ```
16
16
  */
17
- import useSWR from 'swr'
18
17
  import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__newsletter__bulk_email'
20
19
  import type { API } from '../../index'
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__newsletter__logs'
20
19
  import type { API } from '../../index'
21
20
  import type { PaginatedEmailLogList } from '../schemas/PaginatedEmailLogList.schema'
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__newsletter__newsletters'
20
19
  import type { API } from '../../index'
21
20
  import type { Newsletter } from '../schemas/Newsletter.schema'
@@ -14,7 +14,6 @@
14
14
  * await createUser({ name: 'John', email: 'john@example.com' })
15
15
  * ```
16
16
  */
17
- import useSWR from 'swr'
18
17
  import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__newsletter__testing'
20
19
  import type { API } from '../../index'
@@ -20,6 +20,8 @@ import * as Fetchers from '../fetchers/cfg__rq__rq_jobs'
20
20
  import type { API } from '../../index'
21
21
  import type { JobActionResponse } from '../schemas/JobActionResponse.schema'
22
22
  import type { JobDetail } from '../schemas/JobDetail.schema'
23
+ import type { JobListRequest } from '../schemas/JobListRequest.schema'
24
+ import type { PaginatedJobListList } from '../schemas/PaginatedJobListList.schema'
23
25
 
24
26
  /**
25
27
  * List all jobs
@@ -27,8 +29,8 @@ import type { JobDetail } from '../schemas/JobDetail.schema'
27
29
  * @method GET
28
30
  * @path /cfg/rq/jobs/
29
31
  */
30
- export function useRqJobsList(params?: { queue?: string; status?: string }, client?: API): ReturnType<typeof useSWR<any>> {
31
- return useSWR<any>(
32
+ export function useRqJobsList(params?: { page?: number; page_size?: number; queue?: string; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
33
+ return useSWR<PaginatedJobListList>(
32
34
  params ? ['cfg-rq-jobs', params] : 'cfg-rq-jobs',
33
35
  () => Fetchers.getRqJobsList(params, client)
34
36
  )
@@ -77,8 +79,8 @@ export function useDeleteRqJobsDestroy() {
77
79
  export function useCreateRqJobsCancelCreate() {
78
80
  const { mutate } = useSWRConfig()
79
81
 
80
- return async (id: string, client?: API): Promise<JobActionResponse> => {
81
- const result = await Fetchers.createRqJobsCancelCreate(id, client)
82
+ return async (id: string, data: JobListRequest, client?: API): Promise<JobActionResponse> => {
83
+ const result = await Fetchers.createRqJobsCancelCreate(id, data, client)
82
84
  // Revalidate related queries
83
85
  mutate('cfg-rq-jobs-cancel')
84
86
  return result
@@ -95,8 +97,8 @@ export function useCreateRqJobsCancelCreate() {
95
97
  export function useCreateRqJobsRequeueCreate() {
96
98
  const { mutate } = useSWRConfig()
97
99
 
98
- return async (id: string, client?: API): Promise<JobActionResponse> => {
99
- const result = await Fetchers.createRqJobsRequeueCreate(id, client)
100
+ return async (id: string, data: JobListRequest, client?: API): Promise<JobActionResponse> => {
101
+ const result = await Fetchers.createRqJobsRequeueCreate(id, data, client)
100
102
  // Revalidate related queries
101
103
  mutate('cfg-rq-jobs-requeue')
102
104
  return result
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__rq__rq_monitoring'
20
19
  import type { API } from '../../index'
21
20
  import type { HealthCheck } from '../schemas/HealthCheck.schema'
@@ -19,6 +19,8 @@ import { useSWRConfig } from 'swr'
19
19
  import * as Fetchers from '../fetchers/cfg__rq__rq_registries'
20
20
  import type { API } from '../../index'
21
21
  import type { JobActionResponse } from '../schemas/JobActionResponse.schema'
22
+ import type { JobListRequest } from '../schemas/JobListRequest.schema'
23
+ import type { PaginatedJobListList } from '../schemas/PaginatedJobListList.schema'
22
24
 
23
25
  /**
24
26
  * List deferred jobs
@@ -26,8 +28,8 @@ import type { JobActionResponse } from '../schemas/JobActionResponse.schema'
26
28
  * @method GET
27
29
  * @path /cfg/rq/jobs/registries/deferred/
28
30
  */
29
- export function useRqJobsRegistriesDeferredList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<any>> {
30
- return useSWR<any>(
31
+ export function useRqJobsRegistriesDeferredList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
32
+ return useSWR<PaginatedJobListList>(
31
33
  params ? ['cfg-rq-jobs-registries-deferred', params] : 'cfg-rq-jobs-registries-deferred',
32
34
  () => Fetchers.getRqJobsRegistriesDeferredList(params, client)
33
35
  )
@@ -40,8 +42,8 @@ export function useRqJobsRegistriesDeferredList(params?: { queue?: string }, cli
40
42
  * @method GET
41
43
  * @path /cfg/rq/jobs/registries/failed/
42
44
  */
43
- export function useRqJobsRegistriesFailedList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<any>> {
44
- return useSWR<any>(
45
+ export function useRqJobsRegistriesFailedList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
46
+ return useSWR<PaginatedJobListList>(
45
47
  params ? ['cfg-rq-jobs-registries-failed', params] : 'cfg-rq-jobs-registries-failed',
46
48
  () => Fetchers.getRqJobsRegistriesFailedList(params, client)
47
49
  )
@@ -57,8 +59,8 @@ export function useRqJobsRegistriesFailedList(params?: { queue?: string }, clien
57
59
  export function useCreateRqJobsRegistriesFailedClearCreate() {
58
60
  const { mutate } = useSWRConfig()
59
61
 
60
- return async (params: { queue: string }, client?: API): Promise<JobActionResponse> => {
61
- const result = await Fetchers.createRqJobsRegistriesFailedClearCreate(params, client)
62
+ return async (data: JobListRequest, params: { queue: string }, client?: API): Promise<JobActionResponse> => {
63
+ const result = await Fetchers.createRqJobsRegistriesFailedClearCreate(data, params, client)
62
64
  // Revalidate related queries
63
65
  mutate('cfg-rq-jobs-registries-failed-clear')
64
66
  return result
@@ -75,8 +77,8 @@ export function useCreateRqJobsRegistriesFailedClearCreate() {
75
77
  export function useCreateRqJobsRegistriesFailedRequeueAllCreate() {
76
78
  const { mutate } = useSWRConfig()
77
79
 
78
- return async (params: { queue: string }, client?: API): Promise<JobActionResponse> => {
79
- const result = await Fetchers.createRqJobsRegistriesFailedRequeueAllCreate(params, client)
80
+ return async (data: JobListRequest, params: { queue: string }, client?: API): Promise<JobActionResponse> => {
81
+ const result = await Fetchers.createRqJobsRegistriesFailedRequeueAllCreate(data, params, client)
80
82
  // Revalidate related queries
81
83
  mutate('cfg-rq-jobs-registries-failed-requeue-all')
82
84
  return result
@@ -90,8 +92,8 @@ export function useCreateRqJobsRegistriesFailedRequeueAllCreate() {
90
92
  * @method GET
91
93
  * @path /cfg/rq/jobs/registries/finished/
92
94
  */
93
- export function useRqJobsRegistriesFinishedList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<any>> {
94
- return useSWR<any>(
95
+ export function useRqJobsRegistriesFinishedList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
96
+ return useSWR<PaginatedJobListList>(
95
97
  params ? ['cfg-rq-jobs-registries-finished', params] : 'cfg-rq-jobs-registries-finished',
96
98
  () => Fetchers.getRqJobsRegistriesFinishedList(params, client)
97
99
  )
@@ -107,8 +109,8 @@ export function useRqJobsRegistriesFinishedList(params?: { queue?: string }, cli
107
109
  export function useCreateRqJobsRegistriesFinishedClearCreate() {
108
110
  const { mutate } = useSWRConfig()
109
111
 
110
- return async (params: { queue: string }, client?: API): Promise<JobActionResponse> => {
111
- const result = await Fetchers.createRqJobsRegistriesFinishedClearCreate(params, client)
112
+ return async (data: JobListRequest, params: { queue: string }, client?: API): Promise<JobActionResponse> => {
113
+ const result = await Fetchers.createRqJobsRegistriesFinishedClearCreate(data, params, client)
112
114
  // Revalidate related queries
113
115
  mutate('cfg-rq-jobs-registries-finished-clear')
114
116
  return result
@@ -122,8 +124,8 @@ export function useCreateRqJobsRegistriesFinishedClearCreate() {
122
124
  * @method GET
123
125
  * @path /cfg/rq/jobs/registries/started/
124
126
  */
125
- export function useRqJobsRegistriesStartedList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<any>> {
126
- return useSWR<any>(
127
+ export function useRqJobsRegistriesStartedList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
128
+ return useSWR<PaginatedJobListList>(
127
129
  params ? ['cfg-rq-jobs-registries-started', params] : 'cfg-rq-jobs-registries-started',
128
130
  () => Fetchers.getRqJobsRegistriesStartedList(params, client)
129
131
  )
@@ -18,6 +18,7 @@ import useSWR from 'swr'
18
18
  import { useSWRConfig } from 'swr'
19
19
  import * as Fetchers from '../fetchers/cfg__rq__rq_schedules'
20
20
  import type { API } from '../../index'
21
+ import type { PaginatedScheduledJobList } from '../schemas/PaginatedScheduledJobList.schema'
21
22
  import type { ScheduleActionResponse } from '../schemas/ScheduleActionResponse.schema'
22
23
  import type { ScheduleCreateRequest } from '../schemas/ScheduleCreateRequest.schema'
23
24
  import type { ScheduledJob } from '../schemas/ScheduledJob.schema'
@@ -28,8 +29,8 @@ import type { ScheduledJob } from '../schemas/ScheduledJob.schema'
28
29
  * @method GET
29
30
  * @path /cfg/rq/schedules/
30
31
  */
31
- export function useRqSchedulesList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<any>> {
32
- return useSWR<any>(
32
+ export function useRqSchedulesList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedScheduledJobList>> {
33
+ return useSWR<PaginatedScheduledJobList>(
33
34
  params ? ['cfg-rq-schedules', params] : 'cfg-rq-schedules',
34
35
  () => Fetchers.getRqSchedulesList(params, client)
35
36
  )
@@ -15,7 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  import useSWR from 'swr'
18
- import { useSWRConfig } from 'swr'
19
18
  import * as Fetchers from '../fetchers/cfg__rq__rq_workers'
20
19
  import type { API } from '../../index'
21
20
  import type { WorkerStats } from '../schemas/WorkerStats.schema'