@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,20 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoProcess
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Process information.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Process information.
11
- */
12
- export const CentrifugoProcessSchema = z.object({
13
- cpu: z.number(),
14
- rss: z.number().int(),
15
- })
16
-
17
- /**
18
- * Infer TypeScript type from Zod schema
19
- */
20
- export type CentrifugoProcess = z.infer<typeof CentrifugoProcessSchema>
@@ -1,23 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoPublication
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Single publication (message) in channel history.
6
- * */
7
- import { z } from 'zod'
8
- import { CentrifugoClientInfoSchema } from './CentrifugoClientInfo.schema'
9
-
10
- /**
11
- * Single publication (message) in channel history.
12
- */
13
- export const CentrifugoPublicationSchema = z.object({
14
- data: z.record(z.string(), z.any()),
15
- info: CentrifugoClientInfoSchema.nullable().optional(),
16
- offset: z.number().int(),
17
- tags: z.record(z.string(), z.any()).nullable().optional(),
18
- })
19
-
20
- /**
21
- * Infer TypeScript type from Zod schema
22
- */
23
- export type CentrifugoPublication = z.infer<typeof CentrifugoPublicationSchema>
@@ -1,20 +0,0 @@
1
- /**
2
- * Zod schema for CentrifugoStreamPosition
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Stream position for pagination.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Stream position for pagination.
11
- */
12
- export const CentrifugoStreamPositionSchema = z.object({
13
- offset: z.number().int(),
14
- epoch: z.string(),
15
- })
16
-
17
- /**
18
- * Infer TypeScript type from Zod schema
19
- */
20
- export type CentrifugoStreamPosition = z.infer<typeof CentrifugoStreamPositionSchema>
@@ -1,21 +0,0 @@
1
- /**
2
- * Zod schema for ChannelList
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * List of channel statistics.
6
- * */
7
- import { z } from 'zod'
8
- import { ChannelStatsSchema } from './ChannelStats.schema'
9
-
10
- /**
11
- * List of channel statistics.
12
- */
13
- export const ChannelListSchema = z.object({
14
- channels: z.array(ChannelStatsSchema),
15
- total_channels: z.number().int(),
16
- })
17
-
18
- /**
19
- * Infer TypeScript type from Zod schema
20
- */
21
- export type ChannelList = z.infer<typeof ChannelListSchema>
@@ -1,25 +0,0 @@
1
- /**
2
- * Zod schema for ChannelStats
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Statistics per channel.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Statistics per channel.
11
- */
12
- export const ChannelStatsSchema = z.object({
13
- channel: z.string(),
14
- total: z.number().int(),
15
- successful: z.number().int(),
16
- failed: z.number().int(),
17
- avg_duration_ms: z.number(),
18
- avg_acks: z.number(),
19
- last_activity_at: z.string().nullable(),
20
- })
21
-
22
- /**
23
- * Infer TypeScript type from Zod schema
24
- */
25
- export type ChannelStats = z.infer<typeof ChannelStatsSchema>
@@ -1,20 +0,0 @@
1
- /**
2
- * Zod schema for ManualAckRequestRequest
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Request model for manual ACK sending.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Request model for manual ACK sending.
11
- */
12
- export const ManualAckRequestRequestSchema = z.object({
13
- message_id: z.string(),
14
- client_id: z.string(),
15
- })
16
-
17
- /**
18
- * Infer TypeScript type from Zod schema
19
- */
20
- export type ManualAckRequestRequest = z.infer<typeof ManualAckRequestRequestSchema>
@@ -1,21 +0,0 @@
1
- /**
2
- * Zod schema for ManualAckResponse
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Response model for manual ACK.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Response model for manual ACK.
11
- */
12
- export const ManualAckResponseSchema = z.object({
13
- success: z.boolean(),
14
- message_id: z.string(),
15
- error: z.string().nullable().optional(),
16
- })
17
-
18
- /**
19
- * Infer TypeScript type from Zod schema
20
- */
21
- export type ManualAckResponse = z.infer<typeof ManualAckResponseSchema>
@@ -1,24 +0,0 @@
1
- /**
2
- * Zod schema for PaginatedPublishList
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * */
6
- import { z } from 'zod'
7
- import { PublishSchema } from './Publish.schema'
8
-
9
- export const PaginatedPublishListSchema = z.object({
10
- count: z.number().int(),
11
- page: z.number().int(),
12
- pages: z.number().int(),
13
- page_size: z.number().int(),
14
- has_next: z.boolean(),
15
- has_previous: z.boolean(),
16
- next_page: z.number().int().nullable().optional(),
17
- previous_page: z.number().int().nullable().optional(),
18
- results: z.array(PublishSchema),
19
- })
20
-
21
- /**
22
- * Infer TypeScript type from Zod schema
23
- */
24
- export type PaginatedPublishList = z.infer<typeof PaginatedPublishListSchema>
@@ -1,29 +0,0 @@
1
- /**
2
- * Zod schema for Publish
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Single publish item for DRF pagination.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Single publish item for DRF pagination.
11
- */
12
- export const PublishSchema = z.object({
13
- message_id: z.string(),
14
- channel: z.string(),
15
- status: z.string(),
16
- wait_for_ack: z.boolean(),
17
- acks_received: z.number().int(),
18
- acks_expected: z.number().int().nullable(),
19
- duration_ms: z.number().nullable(),
20
- created_at: z.string().datetime({ offset: true }),
21
- completed_at: z.string().datetime({ offset: true }).nullable(),
22
- error_code: z.string().nullable(),
23
- error_message: z.string().nullable(),
24
- })
25
-
26
- /**
27
- * Infer TypeScript type from Zod schema
28
- */
29
- export type Publish = z.infer<typeof PublishSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for PublishTestRequestRequest
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Request model for test message publishing.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Request model for test message publishing.
11
- */
12
- export const PublishTestRequestRequestSchema = z.object({
13
- channel: z.string(),
14
- data: z.record(z.string(), z.any()),
15
- wait_for_ack: z.boolean().optional(),
16
- ack_timeout: z.number().int().min(1.0).max(60.0).optional(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type PublishTestRequestRequest = z.infer<typeof PublishTestRequestRequestSchema>
@@ -1,24 +0,0 @@
1
- /**
2
- * Zod schema for PublishTestResponse
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Response model for test message publishing.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Response model for test message publishing.
11
- */
12
- export const PublishTestResponseSchema = z.object({
13
- success: z.boolean(),
14
- message_id: z.string(),
15
- channel: z.string(),
16
- acks_received: z.number().int().optional(),
17
- delivered: z.boolean().optional(),
18
- error: z.string().nullable().optional(),
19
- })
20
-
21
- /**
22
- * Infer TypeScript type from Zod schema
23
- */
24
- export type PublishTestResponse = z.infer<typeof PublishTestResponseSchema>
@@ -1,23 +0,0 @@
1
- /**
2
- * Zod schema for TimelineItem
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Single timeline data point for DRF.
6
- * */
7
- import { z } from 'zod'
8
-
9
- /**
10
- * Single timeline data point for DRF.
11
- */
12
- export const TimelineItemSchema = z.object({
13
- timestamp: z.string(),
14
- count: z.number().int(),
15
- successful: z.number().int(),
16
- failed: z.number().int(),
17
- timeout: z.number().int(),
18
- })
19
-
20
- /**
21
- * Infer TypeScript type from Zod schema
22
- */
23
- export type TimelineItem = z.infer<typeof TimelineItemSchema>
@@ -1,22 +0,0 @@
1
- /**
2
- * Zod schema for TimelineResponse
3
- *
4
- * This schema provides runtime validation and type inference.
5
- * * Timeline response with hourly/daily breakdown for DRF.
6
- * */
7
- import { z } from 'zod'
8
- import { TimelineItemSchema } from './TimelineItem.schema'
9
-
10
- /**
11
- * Timeline response with hourly/daily breakdown for DRF.
12
- */
13
- export const TimelineResponseSchema = z.object({
14
- timeline: z.array(TimelineItemSchema),
15
- period_hours: z.number().int(),
16
- interval: z.string(),
17
- })
18
-
19
- /**
20
- * Infer TypeScript type from Zod schema
21
- */
22
- export type TimelineResponse = z.infer<typeof TimelineResponseSchema>
@@ -1,76 +0,0 @@
1
- // @ts-nocheck
2
- import * as Models from "./models";
3
-
4
-
5
- /**
6
- * API endpoints for Centrifugo Admin API.
7
- */
8
- export class CentrifugoAdminApi {
9
- private client: any;
10
-
11
- constructor(client: any) {
12
- this.client = client;
13
- }
14
-
15
- /**
16
- * Get connection token for dashboard
17
- *
18
- * Returns JWT token and config for WebSocket connection to Centrifugo.
19
- */
20
- async centrifugoServerAuthTokenCreate(): Promise<any> {
21
- const response = await this.client.request('POST', "/cfg/centrifugo/server/auth/token/");
22
- return response;
23
- }
24
-
25
- /**
26
- * List active channels
27
- *
28
- * Returns list of active channels with optional pattern filter.
29
- */
30
- async centrifugoServerChannelsCreate(data: Models.CentrifugoChannelsRequestRequest): Promise<Models.CentrifugoChannelsResponse> {
31
- const response = await this.client.request('POST', "/cfg/centrifugo/server/channels/", { body: data });
32
- return response;
33
- }
34
-
35
- /**
36
- * Get channel history
37
- *
38
- * Returns message history for a channel.
39
- */
40
- async centrifugoServerHistoryCreate(data: Models.CentrifugoHistoryRequestRequest): Promise<Models.CentrifugoHistoryResponse> {
41
- const response = await this.client.request('POST', "/cfg/centrifugo/server/history/", { body: data });
42
- return response;
43
- }
44
-
45
- /**
46
- * Get Centrifugo server info
47
- *
48
- * Returns server information including node count, version, and uptime.
49
- */
50
- async centrifugoServerInfoCreate(): Promise<Models.CentrifugoInfoResponse> {
51
- const response = await this.client.request('POST', "/cfg/centrifugo/server/info/");
52
- return response;
53
- }
54
-
55
- /**
56
- * Get channel presence
57
- *
58
- * Returns list of clients currently subscribed to a channel.
59
- */
60
- async centrifugoServerPresenceCreate(data: Models.CentrifugoPresenceRequestRequest): Promise<Models.CentrifugoPresenceResponse> {
61
- const response = await this.client.request('POST', "/cfg/centrifugo/server/presence/", { body: data });
62
- return response;
63
- }
64
-
65
- /**
66
- * Get channel presence statistics
67
- *
68
- * Returns quick statistics about channel presence (num_clients,
69
- * num_users).
70
- */
71
- async centrifugoServerPresenceStatsCreate(data: Models.CentrifugoPresenceStatsRequestRequest): Promise<Models.CentrifugoPresenceStatsResponse> {
72
- const response = await this.client.request('POST', "/cfg/centrifugo/server/presence-stats/", { body: data });
73
- return response;
74
- }
75
-
76
- }
@@ -1,4 +0,0 @@
1
- // @ts-nocheck
2
- // Auto-generated by DjangoCFG - see CLAUDE.md
3
- export * from "./client";
4
- export * as Models from "./models";
@@ -1,268 +0,0 @@
1
- // @ts-nocheck
2
- // Auto-generated by DjangoCFG - see CLAUDE.md
3
- /**
4
- * Request to get channel history.
5
- *
6
- * Request model (no read-only fields).
7
- */
8
- export interface CentrifugoHistoryRequestRequest {
9
- /** Channel name */
10
- channel: string;
11
- /** Maximum number of messages to return */
12
- limit?: number | null;
13
- since?: CentrifugoStreamPosition | null;
14
- /** Reverse message order (newest first) */
15
- reverse?: boolean | null;
16
- }
17
-
18
- /**
19
- * Request to list active channels.
20
- *
21
- * Request model (no read-only fields).
22
- */
23
- export interface CentrifugoChannelsRequestRequest {
24
- /** Pattern to filter channels (e.g., 'user:*') */
25
- pattern?: string | null;
26
- }
27
-
28
- /**
29
- * Channel presence response.
30
- *
31
- * Response model (includes read-only fields).
32
- */
33
- export interface CentrifugoPresenceResponse {
34
- error?: CentrifugoError | null;
35
- result?: CentrifugoPresenceResult | null;
36
- }
37
-
38
- /**
39
- * Request to get channel presence statistics.
40
- *
41
- * Request model (no read-only fields).
42
- */
43
- export interface CentrifugoPresenceStatsRequestRequest {
44
- /** Channel name */
45
- channel: string;
46
- }
47
-
48
- /**
49
- * Channel presence stats response.
50
- *
51
- * Response model (includes read-only fields).
52
- */
53
- export interface CentrifugoPresenceStatsResponse {
54
- error?: CentrifugoError | null;
55
- result?: CentrifugoPresenceStatsResult | null;
56
- }
57
-
58
- /**
59
- * List of active channels response.
60
- *
61
- * Response model (includes read-only fields).
62
- */
63
- export interface CentrifugoChannelsResponse {
64
- error?: CentrifugoError | null;
65
- result?: CentrifugoChannelsResult | null;
66
- }
67
-
68
- /**
69
- * Server info response.
70
- *
71
- * Response model (includes read-only fields).
72
- */
73
- export interface CentrifugoInfoResponse {
74
- error?: CentrifugoError | null;
75
- result?: CentrifugoInfoResult | null;
76
- }
77
-
78
- /**
79
- * Channel history response.
80
- *
81
- * Response model (includes read-only fields).
82
- */
83
- export interface CentrifugoHistoryResponse {
84
- error?: CentrifugoError | null;
85
- result?: CentrifugoHistoryResult | null;
86
- }
87
-
88
- /**
89
- * Request to get channel presence.
90
- *
91
- * Request model (no read-only fields).
92
- */
93
- export interface CentrifugoPresenceRequestRequest {
94
- /** Channel name */
95
- channel: string;
96
- }
97
-
98
- /**
99
- * Stream position for pagination.
100
- *
101
- * Response model (includes read-only fields).
102
- */
103
- export interface CentrifugoStreamPosition {
104
- /** Stream offset */
105
- offset: number;
106
- /** Stream epoch */
107
- epoch: string;
108
- }
109
-
110
- /**
111
- * Presence result wrapper.
112
- *
113
- * Response model (includes read-only fields).
114
- */
115
- export interface CentrifugoPresenceResult {
116
- /** Map of client IDs to client info */
117
- presence: Record<string, CentrifugoClientInfo>;
118
- }
119
-
120
- /**
121
- * Centrifugo API error structure.
122
- *
123
- * Response model (includes read-only fields).
124
- */
125
- export interface CentrifugoError {
126
- /** Error code (0 = no error) */
127
- code?: number;
128
- /** Error message */
129
- message?: string;
130
- }
131
-
132
- /**
133
- * Presence stats result.
134
- *
135
- * Response model (includes read-only fields).
136
- */
137
- export interface CentrifugoPresenceStatsResult {
138
- /** Number of connected clients */
139
- num_clients: number;
140
- /** Number of unique users */
141
- num_users: number;
142
- }
143
-
144
- /**
145
- * Channels result wrapper.
146
- *
147
- * Response model (includes read-only fields).
148
- */
149
- export interface CentrifugoChannelsResult {
150
- /** Map of channel names to channel info */
151
- channels: Record<string, CentrifugoChannelInfo>;
152
- }
153
-
154
- /**
155
- * Info result wrapper.
156
- *
157
- * Response model (includes read-only fields).
158
- */
159
- export interface CentrifugoInfoResult {
160
- /** List of Centrifugo nodes */
161
- nodes: Array<CentrifugoNodeInfo>;
162
- }
163
-
164
- /**
165
- * History result wrapper.
166
- *
167
- * Response model (includes read-only fields).
168
- */
169
- export interface CentrifugoHistoryResult {
170
- /** List of publications */
171
- publications: Array<CentrifugoPublication>;
172
- /** Current stream epoch */
173
- epoch: string;
174
- /** Latest stream offset */
175
- offset: number;
176
- }
177
-
178
- /**
179
- * Information about connected client.
180
- *
181
- * Response model (includes read-only fields).
182
- */
183
- export interface CentrifugoClientInfo {
184
- /** User ID */
185
- user: string;
186
- /** Client UUID */
187
- client: string;
188
- /** Connection metadata */
189
- conn_info?: Record<string, any> | null;
190
- /** Channel-specific metadata */
191
- chan_info?: Record<string, any> | null;
192
- }
193
-
194
- /**
195
- * Information about a single channel.
196
- *
197
- * Response model (includes read-only fields).
198
- */
199
- export interface CentrifugoChannelInfo {
200
- /** Number of connected clients in channel */
201
- num_clients: number;
202
- }
203
-
204
- /**
205
- * Information about a single Centrifugo node.
206
- *
207
- * Response model (includes read-only fields).
208
- */
209
- export interface CentrifugoNodeInfo {
210
- /** Unique node identifier */
211
- uid: string;
212
- /** Node name */
213
- name: string;
214
- /** Centrifugo version */
215
- version: string;
216
- /** Number of connected clients */
217
- num_clients: number;
218
- /** Number of unique users */
219
- num_users: number;
220
- /** Number of active channels */
221
- num_channels: number;
222
- /** Node uptime in seconds */
223
- uptime: number;
224
- /** Total number of subscriptions */
225
- num_subs: number;
226
- metrics?: CentrifugoMetrics | null;
227
- process?: CentrifugoProcess | null;
228
- }
229
-
230
- /**
231
- * Single publication (message) in channel history.
232
- *
233
- * Response model (includes read-only fields).
234
- */
235
- export interface CentrifugoPublication {
236
- /** Message payload */
237
- data: Record<string, any>;
238
- info?: CentrifugoClientInfo | null;
239
- /** Message offset in channel stream */
240
- offset: number;
241
- /** Optional message tags */
242
- tags?: Record<string, any> | null;
243
- }
244
-
245
- /**
246
- * Process information.
247
- *
248
- * Response model (includes read-only fields).
249
- */
250
- export interface CentrifugoProcess {
251
- /** CPU usage percentage */
252
- cpu: number;
253
- /** Resident set size in bytes */
254
- rss: number;
255
- }
256
-
257
- /**
258
- * Server metrics.
259
- *
260
- * Response model (includes read-only fields).
261
- */
262
- export interface CentrifugoMetrics {
263
- /** Metrics collection interval */
264
- interval: number;
265
- /** Metric name to value mapping */
266
- items: Record<string, any>;
267
- }
268
-