@djangocfg/api 2.1.230 → 2.1.232

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 (92) hide show
  1. package/README.md +19 -4
  2. package/dist/auth-server.cjs +45 -358
  3. package/dist/auth-server.cjs.map +1 -1
  4. package/dist/auth-server.mjs +43 -356
  5. package/dist/auth-server.mjs.map +1 -1
  6. package/dist/auth.cjs +223 -735
  7. package/dist/auth.cjs.map +1 -1
  8. package/dist/auth.mjs +218 -730
  9. package/dist/auth.mjs.map +1 -1
  10. package/dist/clients.cjs +313 -1568
  11. package/dist/clients.cjs.map +1 -1
  12. package/dist/clients.d.cts +211 -1932
  13. package/dist/clients.d.ts +211 -1932
  14. package/dist/clients.mjs +309 -1564
  15. package/dist/clients.mjs.map +1 -1
  16. package/dist/hooks.cjs +36 -32
  17. package/dist/hooks.cjs.map +1 -1
  18. package/dist/hooks.d.cts +76 -76
  19. package/dist/hooks.d.ts +76 -76
  20. package/dist/hooks.mjs +36 -32
  21. package/dist/hooks.mjs.map +1 -1
  22. package/dist/index.cjs +88 -593
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +88 -88
  25. package/dist/index.d.ts +88 -88
  26. package/dist/index.mjs +88 -593
  27. package/dist/index.mjs.map +1 -1
  28. package/package.json +2 -2
  29. package/src/_api/generated/cfg_accounts/accounts/models.ts +34 -34
  30. package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +41 -41
  31. package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +18 -18
  32. package/src/_api/generated/cfg_accounts/client.ts +39 -42
  33. package/src/_api/generated/cfg_centrifugo/CLAUDE.md +2 -27
  34. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/index.ts +0 -3
  35. package/src/_api/generated/cfg_centrifugo/_utils/hooks/index.ts +0 -3
  36. package/src/_api/generated/cfg_centrifugo/_utils/schemas/index.ts +0 -34
  37. package/src/_api/generated/cfg_centrifugo/client.ts +39 -51
  38. package/src/_api/generated/cfg_centrifugo/index.ts +0 -21
  39. package/src/_api/generated/cfg_centrifugo/schema.json +4 -2039
  40. package/src/_api/generated/cfg_totp/client.ts +39 -42
  41. package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +10 -10
  42. package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +12 -12
  43. package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +8 -8
  44. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts +0 -344
  45. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +0 -326
  46. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts +0 -211
  47. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts +0 -141
  48. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +0 -99
  49. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts +0 -82
  50. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts +0 -19
  51. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +0 -19
  52. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts +0 -22
  53. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts +0 -20
  54. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts +0 -22
  55. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts +0 -20
  56. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts +0 -22
  57. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +0 -23
  58. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts +0 -22
  59. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts +0 -22
  60. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts +0 -22
  61. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts +0 -20
  62. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts +0 -20
  63. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts +0 -30
  64. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts +0 -26
  65. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +0 -19
  66. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts +0 -22
  67. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts +0 -20
  68. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +0 -19
  69. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +0 -22
  70. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +0 -20
  71. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts +0 -20
  72. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts +0 -23
  73. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts +0 -20
  74. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts +0 -21
  75. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts +0 -25
  76. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts +0 -20
  77. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts +0 -21
  78. package/src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts +0 -24
  79. package/src/_api/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts +0 -29
  80. package/src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts +0 -22
  81. package/src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts +0 -24
  82. package/src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts +0 -23
  83. package/src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts +0 -22
  84. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts +0 -76
  85. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/index.ts +0 -4
  86. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +0 -268
  87. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts +0 -110
  88. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/index.ts +0 -4
  89. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +0 -144
  90. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts +0 -48
  91. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/index.ts +0 -4
  92. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +0 -64
@@ -1,99 +0,0 @@
1
- // @ts-nocheck
2
- // Auto-generated by DjangoCFG - see CLAUDE.md
3
- 'use client';
4
-
5
- /**
6
- * SWR Hooks for Centrifugo Monitoring
7
- *
8
- * React hooks powered by SWR for data fetching with automatic caching,
9
- * revalidation, and optimistic updates.
10
- *
11
- * Usage:
12
- * ```typescript
13
- * // Query hooks (GET)
14
- * const { data, error, isLoading } = useUsers({ page: 1 })
15
- *
16
- * // Mutation hooks (POST/PUT/PATCH/DELETE)
17
- * const createUser = useCreateUser()
18
- * await createUser({ name: 'John', email: 'john@example.com' })
19
- * ```
20
- */
21
- import useSWR from 'swr'
22
- import * as Fetchers from '../fetchers/centrifugo__centrifugo_monitoring'
23
- import type { API } from '../../index'
24
- import type { CentrifugoHealthCheck } from '../schemas/CentrifugoHealthCheck.schema'
25
- import type { CentrifugoOverviewStats } from '../schemas/CentrifugoOverviewStats.schema'
26
- import type { ChannelList } from '../schemas/ChannelList.schema'
27
- import type { PaginatedPublishList } from '../schemas/PaginatedPublishList.schema'
28
- import type { TimelineResponse } from '../schemas/TimelineResponse.schema'
29
-
30
- /**
31
- * Get channel statistics
32
- *
33
- * @method GET
34
- * @path /cfg/centrifugo/monitor/channels/
35
- */
36
- export function useCentrifugoMonitorChannelsRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ChannelList>> {
37
- return useSWR<ChannelList>(
38
- ['cfg-centrifugo-monitor-channel', params],
39
- () => Fetchers.getCentrifugoMonitorChannelsRetrieve(params, client)
40
- )
41
- }
42
-
43
-
44
- /**
45
- * Get Centrifugo health status
46
- *
47
- * @method GET
48
- * @path /cfg/centrifugo/monitor/health/
49
- */
50
- export function useCentrifugoMonitorHealthRetrieve(client?: API): ReturnType<typeof useSWR<CentrifugoHealthCheck>> {
51
- return useSWR<CentrifugoHealthCheck>(
52
- 'cfg-centrifugo-monitor-health',
53
- () => Fetchers.getCentrifugoMonitorHealthRetrieve(client)
54
- )
55
- }
56
-
57
-
58
- /**
59
- * Get overview statistics
60
- *
61
- * @method GET
62
- * @path /cfg/centrifugo/monitor/overview/
63
- */
64
- export function useCentrifugoMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<CentrifugoOverviewStats>> {
65
- return useSWR<CentrifugoOverviewStats>(
66
- ['cfg-centrifugo-monitor-overview', params],
67
- () => Fetchers.getCentrifugoMonitorOverviewRetrieve(params, client)
68
- )
69
- }
70
-
71
-
72
- /**
73
- * Get recent publishes
74
- *
75
- * @method GET
76
- * @path /cfg/centrifugo/monitor/publishes/
77
- */
78
- export function useCentrifugoMonitorPublishesList(params?: { channel?: string; ordering?: string; page?: number; page_size?: number; search?: string; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedPublishList>> {
79
- return useSWR<PaginatedPublishList>(
80
- ['cfg-centrifugo-monitor-publishes', params],
81
- () => Fetchers.getCentrifugoMonitorPublishesList(params, client)
82
- )
83
- }
84
-
85
-
86
- /**
87
- * Get publish timeline
88
- *
89
- * @method GET
90
- * @path /cfg/centrifugo/monitor/timeline/
91
- */
92
- export function useCentrifugoMonitorTimelineRetrieve(params?: { hours?: number; interval?: string }, client?: API): ReturnType<typeof useSWR<TimelineResponse>> {
93
- return useSWR<TimelineResponse>(
94
- ['cfg-centrifugo-monitor-timeline', params],
95
- () => Fetchers.getCentrifugoMonitorTimelineRetrieve(params, client)
96
- )
97
- }
98
-
99
-
@@ -1,82 +0,0 @@
1
- // @ts-nocheck
2
- // Auto-generated by DjangoCFG - see CLAUDE.md
3
- 'use client';
4
-
5
- /**
6
- * SWR Hooks for Centrifugo Testing
7
- *
8
- * React hooks powered by SWR for data fetching with automatic caching,
9
- * revalidation, and optimistic updates.
10
- *
11
- * Usage:
12
- * ```typescript
13
- * // Query hooks (GET)
14
- * const { data, error, isLoading } = useUsers({ page: 1 })
15
- *
16
- * // Mutation hooks (POST/PUT/PATCH/DELETE)
17
- * const createUser = useCreateUser()
18
- * await createUser({ name: 'John', email: 'john@example.com' })
19
- * ```
20
- */
21
- import { useSWRConfig } from 'swr'
22
- import * as Fetchers from '../fetchers/centrifugo__centrifugo_testing'
23
- import type { API } from '../../index'
24
- import type { ManualAckRequestRequest } from '../schemas/ManualAckRequestRequest.schema'
25
- import type { ManualAckResponse } from '../schemas/ManualAckResponse.schema'
26
- import type { PublishTestRequestRequest } from '../schemas/PublishTestRequestRequest.schema'
27
- import type { PublishTestResponse } from '../schemas/PublishTestResponse.schema'
28
-
29
- /**
30
- * Publish test message
31
- *
32
- * @method POST
33
- * @path /cfg/centrifugo/testing/publish-test/
34
- */
35
- export function useCreateCentrifugoTestingPublishTestCreate() {
36
- const { mutate } = useSWRConfig()
37
-
38
- return async (data: PublishTestRequestRequest, client?: API): Promise<PublishTestResponse> => {
39
- const result = await Fetchers.createCentrifugoTestingPublishTestCreate(data, client)
40
- // Revalidate related queries
41
- mutate('cfg-centrifugo-testing-publish-test')
42
- return result
43
- }
44
- }
45
-
46
-
47
- /**
48
- * Publish with database logging
49
- *
50
- * @method POST
51
- * @path /cfg/centrifugo/testing/publish-with-logging/
52
- */
53
- export function useCreateCentrifugoTestingPublishWithLoggingCreate() {
54
- const { mutate } = useSWRConfig()
55
-
56
- return async (data: PublishTestRequestRequest, client?: API): Promise<PublishTestResponse> => {
57
- const result = await Fetchers.createCentrifugoTestingPublishWithLoggingCreate(data, client)
58
- // Revalidate related queries
59
- mutate('cfg-centrifugo-testing-publish-with-logging')
60
- return result
61
- }
62
- }
63
-
64
-
65
- /**
66
- * Send manual ACK
67
- *
68
- * @method POST
69
- * @path /cfg/centrifugo/testing/send-ack/
70
- */
71
- export function useCreateCentrifugoTestingSendAckCreate() {
72
- const { mutate } = useSWRConfig()
73
-
74
- return async (data: ManualAckRequestRequest, client?: API): Promise<ManualAckResponse> => {
75
- const result = await Fetchers.createCentrifugoTestingSendAckCreate(data, client)
76
- // Revalidate related queries
77
- mutate('cfg-centrifugo-testing-send-ack')
78
- return result
79
- }
80
- }
81
-
82
-
@@ -1,19 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoChannelInfo
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Information about a single channel.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Information about a single channel.
11
- */
12
- export const CentrifugoChannelInfoSchema = z.object({
13
- num_clients: z.number().int(),
14
- })
15
-
16
- /**
17
- * Infer TypeScript type from Zod schema
18
- */
19
- export type CentrifugoChannelInfo = z.infer<typeof CentrifugoChannelInfoSchema>
@@ -1,19 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoChannelsRequestRequest
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Request to list active channels.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Request to list active channels.
11
- */
12
- export const CentrifugoChannelsRequestRequestSchema = z.object({
13
- pattern: z.string().nullable().optional(),
14
- })
15
-
16
- /**
17
- * Infer TypeScript type from Zod schema
18
- */
19
- export type CentrifugoChannelsRequestRequest = z.infer<typeof CentrifugoChannelsRequestRequestSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoChannelsResponse
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * List of active channels response.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoChannelsResultSchema } from './CentrifugoChannelsResult.schema'
9
- import { CentrifugoErrorSchema } from './CentrifugoError.schema'
10
-
11
- /**
12
- * List of active channels response.
13
- */
14
- export const CentrifugoChannelsResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.nullable().optional(),
16
- result: CentrifugoChannelsResultSchema.nullable().optional(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type CentrifugoChannelsResponse = z.infer<typeof CentrifugoChannelsResponseSchema>
@@ -1,20 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoChannelsResult
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Channels result wrapper.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoChannelInfoSchema } from './CentrifugoChannelInfo.schema'
9
-
10
- /**
11
- * Channels result wrapper.
12
- */
13
- export const CentrifugoChannelsResultSchema = z.object({
14
- channels: z.record(z.string(), CentrifugoChannelInfoSchema),
15
- })
16
-
17
- /**
18
- * Infer TypeScript type from Zod schema
19
- */
20
- export type CentrifugoChannelsResult = z.infer<typeof CentrifugoChannelsResultSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoClientInfo
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Information about connected client.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Information about connected client.
11
- */
12
- export const CentrifugoClientInfoSchema = z.object({
13
- user: z.string(),
14
- client: z.string(),
15
- conn_info: z.record(z.string(), z.any()).nullable().optional(),
16
- chan_info: z.record(z.string(), z.any()).nullable().optional(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type CentrifugoClientInfo = z.infer<typeof CentrifugoClientInfoSchema>
@@ -1,20 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoError
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Centrifugo API error structure.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Centrifugo API error structure.
11
- */
12
- export const CentrifugoErrorSchema = z.object({
13
- code: z.number().int().optional(),
14
- message: z.string().optional(),
15
- })
16
-
17
- /**
18
- * Infer TypeScript type from Zod schema
19
- */
20
- export type CentrifugoError = z.infer<typeof CentrifugoErrorSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoHealthCheck
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Health check response.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Health check response.
11
- */
12
- export const CentrifugoHealthCheckSchema = z.object({
13
- status: z.string(),
14
- wrapper_url: z.string(),
15
- has_api_key: z.boolean(),
16
- timestamp: z.string(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type CentrifugoHealthCheck = z.infer<typeof CentrifugoHealthCheckSchema>
@@ -1,23 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoHistoryRequestRequest
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Request to get channel history.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoStreamPositionSchema } from './CentrifugoStreamPosition.schema'
9
-
10
- /**
11
- * Request to get channel history.
12
- */
13
- export const CentrifugoHistoryRequestRequestSchema = z.object({
14
- channel: z.string(),
15
- limit: z.number().int().nullable().optional(),
16
- since: CentrifugoStreamPositionSchema.nullable().optional(),
17
- reverse: z.boolean().nullable().optional(),
18
- })
19
-
20
- /**
21
- * Infer TypeScript type from Zod schema
22
- */
23
- export type CentrifugoHistoryRequestRequest = z.infer<typeof CentrifugoHistoryRequestRequestSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoHistoryResponse
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Channel history response.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoErrorSchema } from './CentrifugoError.schema'
9
- import { CentrifugoHistoryResultSchema } from './CentrifugoHistoryResult.schema'
10
-
11
- /**
12
- * Channel history response.
13
- */
14
- export const CentrifugoHistoryResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.nullable().optional(),
16
- result: CentrifugoHistoryResultSchema.nullable().optional(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type CentrifugoHistoryResponse = z.infer<typeof CentrifugoHistoryResponseSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoHistoryResult
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * History result wrapper.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoPublicationSchema } from './CentrifugoPublication.schema'
9
-
10
- /**
11
- * History result wrapper.
12
- */
13
- export const CentrifugoHistoryResultSchema = z.object({
14
- publications: z.array(CentrifugoPublicationSchema),
15
- epoch: z.string(),
16
- offset: z.number().int(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type CentrifugoHistoryResult = z.infer<typeof CentrifugoHistoryResultSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoInfoResponse
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Server info response.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoErrorSchema } from './CentrifugoError.schema'
9
- import { CentrifugoInfoResultSchema } from './CentrifugoInfoResult.schema'
10
-
11
- /**
12
- * Server info response.
13
- */
14
- export const CentrifugoInfoResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.nullable().optional(),
16
- result: CentrifugoInfoResultSchema.nullable().optional(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type CentrifugoInfoResponse = z.infer<typeof CentrifugoInfoResponseSchema>
@@ -1,20 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoInfoResult
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Info result wrapper.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoNodeInfoSchema } from './CentrifugoNodeInfo.schema'
9
-
10
- /**
11
- * Info result wrapper.
12
- */
13
- export const CentrifugoInfoResultSchema = z.object({
14
- nodes: z.array(CentrifugoNodeInfoSchema),
15
- })
16
-
17
- /**
18
- * Infer TypeScript type from Zod schema
19
- */
20
- export type CentrifugoInfoResult = z.infer<typeof CentrifugoInfoResultSchema>
@@ -1,20 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoMetrics
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Server metrics.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Server metrics.
11
- */
12
- export const CentrifugoMetricsSchema = z.object({
13
- interval: z.number(),
14
- items: z.record(z.string(), z.number()),
15
- })
16
-
17
- /**
18
- * Infer TypeScript type from Zod schema
19
- */
20
- export type CentrifugoMetrics = z.infer<typeof CentrifugoMetricsSchema>
@@ -1,30 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoNodeInfo
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Information about a single Centrifugo node.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoMetricsSchema } from './CentrifugoMetrics.schema'
9
- import { CentrifugoProcessSchema } from './CentrifugoProcess.schema'
10
-
11
- /**
12
- * Information about a single Centrifugo node.
13
- */
14
- export const CentrifugoNodeInfoSchema = z.object({
15
- uid: z.string(),
16
- name: z.string(),
17
- version: z.string(),
18
- num_clients: z.number().int(),
19
- num_users: z.number().int(),
20
- num_channels: z.number().int(),
21
- uptime: z.number().int(),
22
- num_subs: z.number().int(),
23
- metrics: CentrifugoMetricsSchema.nullable().optional(),
24
- process: CentrifugoProcessSchema.nullable().optional(),
25
- })
26
-
27
- /**
28
- * Infer TypeScript type from Zod schema
29
- */
30
- export type CentrifugoNodeInfo = z.infer<typeof CentrifugoNodeInfoSchema>
@@ -1,26 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoOverviewStats
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Overview statistics for Centrifugo publishes.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Overview statistics for Centrifugo publishes.
11
- */
12
- export const CentrifugoOverviewStatsSchema = z.object({
13
- total: z.number().int(),
14
- successful: z.number().int(),
15
- failed: z.number().int(),
16
- timeout: z.number().int(),
17
- success_rate: z.number(),
18
- avg_duration_ms: z.number(),
19
- avg_acks_received: z.number(),
20
- period_hours: z.number().int(),
21
- })
22
-
23
- /**
24
- * Infer TypeScript type from Zod schema
25
- */
26
- export type CentrifugoOverviewStats = z.infer<typeof CentrifugoOverviewStatsSchema>
@@ -1,19 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoPresenceRequestRequest
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Request to get channel presence.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Request to get channel presence.
11
- */
12
- export const CentrifugoPresenceRequestRequestSchema = z.object({
13
- channel: z.string(),
14
- })
15
-
16
- /**
17
- * Infer TypeScript type from Zod schema
18
- */
19
- export type CentrifugoPresenceRequestRequest = z.infer<typeof CentrifugoPresenceRequestRequestSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoPresenceResponse
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Channel presence response.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoErrorSchema } from './CentrifugoError.schema'
9
- import { CentrifugoPresenceResultSchema } from './CentrifugoPresenceResult.schema'
10
-
11
- /**
12
- * Channel presence response.
13
- */
14
- export const CentrifugoPresenceResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.nullable().optional(),
16
- result: CentrifugoPresenceResultSchema.nullable().optional(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type CentrifugoPresenceResponse = z.infer<typeof CentrifugoPresenceResponseSchema>
@@ -1,20 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoPresenceResult
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Presence result wrapper.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoClientInfoSchema } from './CentrifugoClientInfo.schema'
9
-
10
- /**
11
- * Presence result wrapper.
12
- */
13
- export const CentrifugoPresenceResultSchema = z.object({
14
- presence: z.record(z.string(), CentrifugoClientInfoSchema),
15
- })
16
-
17
- /**
18
- * Infer TypeScript type from Zod schema
19
- */
20
- export type CentrifugoPresenceResult = z.infer<typeof CentrifugoPresenceResultSchema>
@@ -1,19 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoPresenceStatsRequestRequest
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Request to get channel presence statistics.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Request to get channel presence statistics.
11
- */
12
- export const CentrifugoPresenceStatsRequestRequestSchema = z.object({
13
- channel: z.string(),
14
- })
15
-
16
- /**
17
- * Infer TypeScript type from Zod schema
18
- */
19
- export type CentrifugoPresenceStatsRequestRequest = z.infer<typeof CentrifugoPresenceStatsRequestRequestSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoPresenceStatsResponse
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Channel presence stats response.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoErrorSchema } from './CentrifugoError.schema'
9
- import { CentrifugoPresenceStatsResultSchema } from './CentrifugoPresenceStatsResult.schema'
10
-
11
- /**
12
- * Channel presence stats response.
13
- */
14
- export const CentrifugoPresenceStatsResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.nullable().optional(),
16
- result: CentrifugoPresenceStatsResultSchema.nullable().optional(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type CentrifugoPresenceStatsResponse = z.infer<typeof CentrifugoPresenceStatsResponseSchema>
@@ -1,20 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoPresenceStatsResult
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Presence stats result.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Presence stats result.
11
- */
12
- export const CentrifugoPresenceStatsResultSchema = z.object({
13
- num_clients: z.number().int(),
14
- num_users: z.number().int(),
15
- })
16
-
17
- /**
18
- * Infer TypeScript type from Zod schema
19
- */
20
- export type CentrifugoPresenceStatsResult = z.infer<typeof CentrifugoPresenceStatsResultSchema>