@djangocfg/api 1.2.24 → 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 (76) hide show
  1. package/dist/index.cjs +1719 -23297
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +561 -19228
  4. package/dist/index.d.ts +561 -19228
  5. package/dist/index.mjs +1614 -23195
  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__centrifugo_auth.ts +48 -0
  10. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +0 -16
  11. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +5 -20
  12. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +5 -4
  13. package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
  14. package/src/cfg/generated/_utils/hooks/cfg__accounts.ts +0 -1
  15. package/src/cfg/generated/_utils/hooks/cfg__accounts__auth.ts +0 -1
  16. package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +0 -1
  17. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +0 -1
  18. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_auth.ts +35 -0
  19. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +0 -1
  20. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +0 -21
  21. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +0 -1
  22. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +0 -1
  23. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +0 -1
  24. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +0 -1
  25. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +0 -1
  26. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +0 -1
  27. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +0 -1
  28. package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +0 -1
  29. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts +0 -1
  30. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +0 -1
  31. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +0 -1
  32. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +5 -21
  33. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +3 -3
  34. package/src/cfg/generated/_utils/hooks/cfg__health.ts +0 -1
  35. package/src/cfg/generated/_utils/hooks/cfg__leads__lead_submission.ts +0 -1
  36. package/src/cfg/generated/_utils/hooks/cfg__newsletter.ts +0 -1
  37. package/src/cfg/generated/_utils/hooks/cfg__newsletter__bulk_email.ts +0 -1
  38. package/src/cfg/generated/_utils/hooks/cfg__newsletter__logs.ts +0 -1
  39. package/src/cfg/generated/_utils/hooks/cfg__newsletter__newsletters.ts +0 -1
  40. package/src/cfg/generated/_utils/hooks/cfg__newsletter__testing.ts +0 -1
  41. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +0 -1
  42. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +0 -1
  43. package/src/cfg/generated/_utils/hooks/index.ts +1 -0
  44. package/src/cfg/generated/_utils/schemas/CentrifugoToken.schema.ts +22 -0
  45. package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +3 -2
  46. package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +2 -0
  47. package/src/cfg/generated/_utils/schemas/GRPCRegisteredService.schema.ts +24 -0
  48. package/src/cfg/generated/_utils/schemas/GRPCServerConfig.schema.ts +1 -1
  49. package/src/cfg/generated/_utils/schemas/GRPCServerStatus.schema.ts +34 -0
  50. package/src/cfg/generated/_utils/schemas/PaginatedRecentRequestList.schema.ts +24 -0
  51. package/src/cfg/generated/_utils/schemas/PaginatedServiceSummaryList.schema.ts +24 -0
  52. package/src/cfg/generated/_utils/schemas/ServiceSummary.schema.ts +26 -0
  53. package/src/cfg/generated/_utils/schemas/User.schema.ts +2 -0
  54. package/src/cfg/generated/_utils/schemas/index.ts +6 -3
  55. package/src/cfg/generated/cfg__accounts/models.ts +17 -0
  56. package/src/cfg/generated/cfg__accounts__user_profile/models.ts +17 -0
  57. package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/client.ts +26 -0
  58. package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/index.ts +2 -0
  59. package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/models.ts +16 -0
  60. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +0 -10
  61. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +0 -26
  62. package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +2 -2
  63. package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +4 -25
  64. package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +99 -47
  65. package/src/cfg/generated/cfg__grpc__grpc_services/client.ts +6 -5
  66. package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +49 -0
  67. package/src/cfg/generated/client.ts +3 -0
  68. package/src/cfg/generated/index.ts +17 -8
  69. package/src/cfg/generated/{schema.ts → schema.json} +19122 -18892
  70. package/src/index.ts +7 -2
  71. package/src/types/auth.ts +40 -0
  72. package/src/types/index.ts +7 -0
  73. package/src/cfg/contexts/AccountsContext.tsx +0 -205
  74. package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +0 -20
  75. package/src/cfg/generated/_utils/schemas/MonitoringServiceStats.schema.ts +0 -24
  76. package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/api",
3
- "version": "1.2.24",
3
+ "version": "1.2.25",
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.24",
71
+ "@djangocfg/typescript-config": "^1.2.25",
72
72
  "react": "^19.1.0",
73
73
  "react-dom": "^19.1.0",
74
74
  "tsup": "^8.5.0",
@@ -5,17 +5,6 @@
5
5
  * Uses generated SWR hooks for optimal data fetching and caching
6
6
  */
7
7
 
8
- // Accounts (Auth & Profile)
9
- export {
10
- AccountsProvider,
11
- useAccountsContext,
12
- PatchedUserProfileUpdateRequestSchema
13
- } from './AccountsContext';
14
- export type {
15
- AccountsContextValue,
16
- PatchedUserProfileUpdateRequest
17
- } from './AccountsContext';
18
-
19
8
  // Newsletter (Campaigns & Subscriptions)
20
9
  export { NewsletterProvider, useNewsletterContext } from './NewsletterContext';
21
10
  export type { NewsletterContextValue } from './NewsletterContext';
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Typed fetchers for Centrifugo Auth
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 { ConnectionTokenResponseSchema, type ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
33
+ import { getAPIInstance } from '../../api-instance'
34
+
35
+ /**
36
+ * Get Centrifugo connection token
37
+ *
38
+ * @method GET
39
+ * @path /cfg/centrifugo/auth/token/
40
+ */
41
+ export async function getCentrifugoAuthTokenRetrieve( client?: any
42
+ ): Promise<ConnectionTokenResponse> {
43
+ const api = client || getAPIInstance()
44
+ const response = await api.cfg_centrifugo_auth.tokenRetrieve()
45
+ return ConnectionTokenResponseSchema.parse(response)
46
+ }
47
+
48
+
@@ -29,28 +29,12 @@
29
29
  * const users = await getUsers({ page: 1 }, api)
30
30
  * ```
31
31
  */
32
- import { ConnectionTokenRequestRequestSchema, type ConnectionTokenRequestRequest } from '../schemas/ConnectionTokenRequestRequest.schema'
33
- import { ConnectionTokenResponseSchema, type ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
34
32
  import { ManualAckRequestRequestSchema, type ManualAckRequestRequest } from '../schemas/ManualAckRequestRequest.schema'
35
33
  import { ManualAckResponseSchema, type ManualAckResponse } from '../schemas/ManualAckResponse.schema'
36
34
  import { PublishTestRequestRequestSchema, type PublishTestRequestRequest } from '../schemas/PublishTestRequestRequest.schema'
37
35
  import { PublishTestResponseSchema, type PublishTestResponse } from '../schemas/PublishTestResponse.schema'
38
36
  import { getAPIInstance } from '../../api-instance'
39
37
 
40
- /**
41
- * Generate connection token
42
- *
43
- * @method POST
44
- * @path /cfg/centrifugo/testing/connection-token/
45
- */
46
- export async function createCentrifugoTestingConnectionTokenCreate( data: ConnectionTokenRequestRequest, client?: any
47
- ): Promise<ConnectionTokenResponse> {
48
- const api = client || getAPIInstance()
49
- const response = await api.cfg_centrifugo_testing.connectionTokenCreate(data)
50
- return ConnectionTokenResponseSchema.parse(response)
51
- }
52
-
53
-
54
38
  /**
55
39
  * Publish test message
56
40
  *
@@ -32,8 +32,7 @@
32
32
  import { GRPCHealthCheckSchema, type GRPCHealthCheck } from '../schemas/GRPCHealthCheck.schema'
33
33
  import { GRPCOverviewStatsSchema, type GRPCOverviewStats } from '../schemas/GRPCOverviewStats.schema'
34
34
  import { MethodListSchema, type MethodList } from '../schemas/MethodList.schema'
35
- import { RecentRequestSchema, type RecentRequest } from '../schemas/RecentRequest.schema'
36
- import { ServiceListSchema, type ServiceList } from '../schemas/ServiceList.schema'
35
+ import { PaginatedRecentRequestListSchema, type PaginatedRecentRequestList } from '../schemas/PaginatedRecentRequestList.schema'
37
36
  import { getAPIInstance } from '../../api-instance'
38
37
 
39
38
  /**
@@ -84,25 +83,11 @@ export async function getGrpcMonitorOverviewRetrieve( params?: { hours?: number
84
83
  * @method GET
85
84
  * @path /cfg/grpc/monitor/requests/
86
85
  */
87
- export async function getGrpcMonitorRequestsRetrieve( params?: { method?: string; service?: string; status?: string }, client?: any
88
- ): Promise<RecentRequest> {
86
+ export async function getGrpcMonitorRequestsList( params?: { method?: string; page?: number; page_size?: number; service?: string; status?: string }, client?: any
87
+ ): Promise<PaginatedRecentRequestList> {
89
88
  const api = client || getAPIInstance()
90
- const response = await api.cfg_grpc_monitoring.grpcMonitorRequestsRetrieve(params?.method, params?.service, params?.status)
91
- return RecentRequestSchema.parse(response)
92
- }
93
-
94
-
95
- /**
96
- * Get service statistics
97
- *
98
- * @method GET
99
- * @path /cfg/grpc/monitor/services/
100
- */
101
- export async function getGrpcMonitorServicesRetrieve( params?: { hours?: number }, client?: any
102
- ): Promise<ServiceList> {
103
- const api = client || getAPIInstance()
104
- const response = await api.cfg_grpc_monitoring.grpcMonitorServicesRetrieve(params?.hours)
105
- return ServiceListSchema.parse(response)
89
+ const response = await api.cfg_grpc_monitoring.grpcMonitorRequestsList(params?.method, params?.page, params?.page_size, params?.service, params?.status)
90
+ return PaginatedRecentRequestListSchema.parse(response)
106
91
  }
107
92
 
108
93
 
@@ -29,6 +29,7 @@
29
29
  * const users = await getUsers({ page: 1 }, api)
30
30
  * ```
31
31
  */
32
+ import { PaginatedServiceSummaryListSchema, type PaginatedServiceSummaryList } from '../schemas/PaginatedServiceSummaryList.schema'
32
33
  import { ServiceDetailSchema, type ServiceDetail } from '../schemas/ServiceDetail.schema'
33
34
  import { ServiceMethodsSchema, type ServiceMethods } from '../schemas/ServiceMethods.schema'
34
35
  import { getAPIInstance } from '../../api-instance'
@@ -39,11 +40,11 @@ import { getAPIInstance } from '../../api-instance'
39
40
  * @method GET
40
41
  * @path /cfg/grpc/services/
41
42
  */
42
- export async function getGrpcServicesList( params?: { hours?: number }, client?: any
43
- ): Promise<any> {
43
+ export async function getGrpcServicesList( params?: { hours?: number; page?: number; page_size?: number }, client?: any
44
+ ): Promise<PaginatedServiceSummaryList> {
44
45
  const api = client || getAPIInstance()
45
- const response = await api.cfg_grpc_services.list(params?.hours)
46
- return response
46
+ const response = await api.cfg_grpc_services.list(params?.hours, params?.page, params?.page_size)
47
+ return PaginatedServiceSummaryListSchema.parse(response)
47
48
  }
48
49
 
49
50
 
@@ -30,6 +30,7 @@ export * from './cfg__accounts__auth'
30
30
  export * from './cfg__accounts__user_profile'
31
31
  export * from './cfg__centrifugo'
32
32
  export * from './cfg__centrifugo__centrifugo_admin_api'
33
+ export * from './cfg__centrifugo__centrifugo_auth'
33
34
  export * from './cfg__centrifugo__centrifugo_monitoring'
34
35
  export * from './cfg__centrifugo__centrifugo_testing'
35
36
  export * from './cfg__dashboard__dashboard_activity'
@@ -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__accounts'
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__accounts__auth'
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__centrifugo'
20
19
  import type { API } from '../../index'
21
20
  import type { Publish } from '../schemas/Publish.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__centrifugo__centrifugo_admin_api'
20
19
  import type { API } from '../../index'
@@ -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,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__centrifugo__centrifugo_monitoring'
20
19
  import type { API } from '../../index'
21
20
  import type { CentrifugoOverviewStats } from '../schemas/CentrifugoOverviewStats.schema'
@@ -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'
@@ -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_api_keys'
20
19
  import type { API } from '../../index'
21
20
  import type { ApiKey } from '../schemas/ApiKey.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_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
 
@@ -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'
@@ -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'
@@ -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'
@@ -27,6 +27,7 @@ export * from './cfg__accounts__auth'
27
27
  export * from './cfg__newsletter__bulk_email'
28
28
  export * from './cfg__newsletter__campaigns'
29
29
  export * from './cfg__centrifugo__centrifugo_admin_api'
30
+ export * from './cfg__centrifugo__centrifugo_auth'
30
31
  export * from './cfg__centrifugo__centrifugo_monitoring'
31
32
  export * from './cfg__centrifugo__centrifugo_testing'
32
33
  export * from './cfg__dashboard__dashboard_api_zones'
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Zod schema for CentrifugoToken
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Nested serializer for Centrifugo WebSocket connection token.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Nested serializer for Centrifugo WebSocket connection token.
11
+ */
12
+ export const CentrifugoTokenSchema = z.object({
13
+ token: z.string(),
14
+ centrifugo_url: z.url(),
15
+ expires_at: z.iso.datetime(),
16
+ channels: z.array(z.string()),
17
+ })
18
+
19
+ /**
20
+ * Infer TypeScript type from Zod schema
21
+ */
22
+ export type CentrifugoToken = z.infer<typeof CentrifugoTokenSchema>
@@ -2,17 +2,18 @@
2
2
  * Zod schema for ConnectionTokenResponse
3
3
  *
4
4
  * This schema provides runtime validation and type inference.
5
- * * Response model for connection token.
5
+ * * Response model for Centrifugo connection token.
6
6
  * */
7
7
  import { z } from 'zod'
8
8
 
9
9
  /**
10
- * Response model for connection token.
10
+ * Response model for Centrifugo connection token.
11
11
  */
12
12
  export const ConnectionTokenResponseSchema = z.object({
13
13
  token: z.string(),
14
14
  centrifugo_url: z.string(),
15
15
  expires_at: z.string(),
16
+ channels: z.array(z.string()),
16
17
  })
17
18
 
18
19
  /**
@@ -5,6 +5,7 @@
5
5
  * * Overview statistics for gRPC requests.
6
6
  * */
7
7
  import { z } from 'zod'
8
+ import { GRPCServerStatusSchema } from './GRPCServerStatus.schema'
8
9
 
9
10
  /**
10
11
  * Overview statistics for gRPC requests.
@@ -19,6 +20,7 @@ export const GRPCOverviewStatsSchema = z.object({
19
20
  avg_duration_ms: z.number(),
20
21
  p95_duration_ms: z.number().nullable(),
21
22
  period_hours: z.int(),
23
+ server: GRPCServerStatusSchema,
22
24
  })
23
25
 
24
26
  /**