@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
package/dist/clients.d.ts CHANGED
@@ -45,15 +45,13 @@ declare namespace enums {
45
45
  }
46
46
 
47
47
  /**
48
- * Request to start OAuth flow.
48
+ * Response with available OAuth providers.
49
49
  *
50
- * Request model (no read-only fields).
50
+ * Response model (includes read-only fields).
51
51
  */
52
- interface OAuthAuthorizeRequestRequest$1 {
53
- /** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
54
- redirect_uri?: string;
55
- /** Optional source URL for registration tracking */
56
- source_url?: string;
52
+ interface OAuthProvidersResponse$1 {
53
+ /** List of available OAuth providers */
54
+ providers: Array<Record<string, any>>;
57
55
  }
58
56
  /**
59
57
  * Request to disconnect OAuth provider.
@@ -67,37 +65,15 @@ interface OAuthDisconnectRequestRequest$1 {
67
65
  provider: OAuthConnectionProvider;
68
66
  }
69
67
  /**
70
- * Response with available OAuth providers.
71
- *
72
- * Response model (includes read-only fields).
73
- */
74
- interface OAuthProvidersResponse$1 {
75
- /** List of available OAuth providers */
76
- providers: Array<Record<string, any>>;
77
- }
78
- /**
79
- * Request to complete OAuth flow (callback handler).
68
+ * Request to start OAuth flow.
80
69
  *
81
70
  * Request model (no read-only fields).
82
71
  */
83
- interface OAuthCallbackRequestRequest$1 {
84
- /** Authorization code from OAuth provider callback */
85
- code: string;
86
- /** State token for CSRF verification (from authorize response) */
87
- state: string;
88
- /** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
72
+ interface OAuthAuthorizeRequestRequest$1 {
73
+ /** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
89
74
  redirect_uri?: string;
90
- }
91
- /**
92
- * Response with OAuth authorization URL.
93
- *
94
- * Response model (includes read-only fields).
95
- */
96
- interface OAuthAuthorizeResponse$1 {
97
- /** Full URL to redirect user to OAuth provider */
98
- authorization_url: string;
99
- /** State token for CSRF protection. Store this and verify on callback. */
100
- state: string;
75
+ /** Optional source URL for registration tracking */
76
+ source_url?: string;
101
77
  }
102
78
  /**
103
79
  * Response with JWT tokens after OAuth authentication. When 2FA is required: -
@@ -125,6 +101,30 @@ interface OAuthTokenResponse$1 {
125
101
  /** True if user should be prompted to enable 2FA */
126
102
  should_prompt_2fa?: boolean;
127
103
  }
104
+ /**
105
+ * Response with OAuth authorization URL.
106
+ *
107
+ * Response model (includes read-only fields).
108
+ */
109
+ interface OAuthAuthorizeResponse$1 {
110
+ /** Full URL to redirect user to OAuth provider */
111
+ authorization_url: string;
112
+ /** State token for CSRF protection. Store this and verify on callback. */
113
+ state: string;
114
+ }
115
+ /**
116
+ * Request to complete OAuth flow (callback handler).
117
+ *
118
+ * Request model (no read-only fields).
119
+ */
120
+ interface OAuthCallbackRequestRequest$1 {
121
+ /** Authorization code from OAuth provider callback */
122
+ code: string;
123
+ /** State token for CSRF verification (from authorize response) */
124
+ state: string;
125
+ /** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
126
+ redirect_uri?: string;
127
+ }
128
128
 
129
129
  /**
130
130
  * API endpoints for Oauth.
@@ -171,7 +171,7 @@ declare class Oauth {
171
171
  *
172
172
  * Request model (no read-only fields).
173
173
  */
174
- interface UserProfileUpdateRequest$1 {
174
+ interface PatchedUserProfileUpdateRequest$1 {
175
175
  first_name?: string;
176
176
  last_name?: string;
177
177
  company?: string;
@@ -179,14 +179,6 @@ interface UserProfileUpdateRequest$1 {
179
179
  position?: string;
180
180
  language?: string;
181
181
  }
182
- /**
183
- *
184
- * Request model (no read-only fields).
185
- */
186
- interface CfgAccountsProfileAvatarCreateRequest$1 {
187
- /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
188
- avatar: File | Blob;
189
- }
190
182
  /**
191
183
  * Serializer for user details.
192
184
  *
@@ -217,12 +209,23 @@ interface User$2 {
217
209
  unanswered_messages_count: number;
218
210
  centrifugo: CentrifugoToken$2 | null;
219
211
  }
212
+ /**
213
+ * Response serializer for account deletion.
214
+ *
215
+ * Response model (includes read-only fields).
216
+ */
217
+ interface AccountDeleteResponse$1 {
218
+ /** Whether the account was successfully deleted */
219
+ success: boolean;
220
+ /** Human-readable message about the deletion */
221
+ message: string;
222
+ }
220
223
  /**
221
224
  * Serializer for updating user profile.
222
225
  *
223
226
  * Request model (no read-only fields).
224
227
  */
225
- interface PatchedUserProfileUpdateRequest$1 {
228
+ interface UserProfileUpdateRequest$1 {
226
229
  first_name?: string;
227
230
  last_name?: string;
228
231
  company?: string;
@@ -231,15 +234,12 @@ interface PatchedUserProfileUpdateRequest$1 {
231
234
  language?: string;
232
235
  }
233
236
  /**
234
- * Response serializer for account deletion.
235
237
  *
236
- * Response model (includes read-only fields).
238
+ * Request model (no read-only fields).
237
239
  */
238
- interface AccountDeleteResponse$1 {
239
- /** Whether the account was successfully deleted */
240
- success: boolean;
241
- /** Human-readable message about the deletion */
242
- message: string;
240
+ interface CfgAccountsProfileAvatarCreateRequest$1 {
241
+ /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
242
+ avatar: File | Blob;
243
243
  }
244
244
  /**
245
245
  * Nested serializer for Centrifugo WebSocket connection token.
@@ -314,27 +314,6 @@ declare class UserProfile {
314
314
  accountsProfileUpdatePartialUpdate(data?: PatchedUserProfileUpdateRequest$1): Promise<User$2>;
315
315
  }
316
316
 
317
- /**
318
- * OTP verification response. When 2FA is required: - requires_2fa: True -
319
- * session_id: UUID of 2FA verification session - refresh/access/user: null
320
- * When 2FA is not required: - requires_2fa: False - session_id: null -
321
- * refresh/access/user: populated
322
- *
323
- * Response model (includes read-only fields).
324
- */
325
- interface OTPVerifyResponse$1 {
326
- /** Whether 2FA verification is required */
327
- requires_2fa?: boolean;
328
- /** 2FA session ID (if requires_2fa is True) */
329
- session_id?: string | null;
330
- /** JWT refresh token (if requires_2fa is False) */
331
- refresh?: string | null;
332
- /** JWT access token (if requires_2fa is False) */
333
- access?: string | null;
334
- user?: User$1 | null;
335
- /** Whether user should be prompted to enable 2FA */
336
- should_prompt_2fa?: boolean;
337
- }
338
317
  /**
339
318
  * Serializer for OTP verification.
340
319
  *
@@ -347,6 +326,15 @@ interface OTPVerifyRequest$1 {
347
326
  /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
348
327
  source_url?: string;
349
328
  }
329
+ /**
330
+ * OTP request response.
331
+ *
332
+ * Response model (includes read-only fields).
333
+ */
334
+ interface OTPRequestResponse$1 {
335
+ /** Success message */
336
+ message: string;
337
+ }
350
338
  /**
351
339
  * Serializer for OTP request.
352
340
  *
@@ -359,13 +347,25 @@ interface OTPRequestRequest$1 {
359
347
  source_url?: string;
360
348
  }
361
349
  /**
362
- * OTP request response.
350
+ * OTP verification response. When 2FA is required: - requires_2fa: True -
351
+ * session_id: UUID of 2FA verification session - refresh/access/user: null
352
+ * When 2FA is not required: - requires_2fa: False - session_id: null -
353
+ * refresh/access/user: populated
363
354
  *
364
355
  * Response model (includes read-only fields).
365
356
  */
366
- interface OTPRequestResponse$1 {
367
- /** Success message */
368
- message: string;
357
+ interface OTPVerifyResponse$1 {
358
+ /** Whether 2FA verification is required */
359
+ requires_2fa?: boolean;
360
+ /** 2FA session ID (if requires_2fa is True) */
361
+ session_id?: string | null;
362
+ /** JWT refresh token (if requires_2fa is False) */
363
+ refresh?: string | null;
364
+ /** JWT access token (if requires_2fa is False) */
365
+ access?: string | null;
366
+ user?: User$1 | null;
367
+ /** Whether user should be prompted to enable 2FA */
368
+ should_prompt_2fa?: boolean;
369
369
  }
370
370
  /**
371
371
  * Serializer for user details.
@@ -1276,1533 +1276,158 @@ declare class API$2 {
1276
1276
  }
1277
1277
 
1278
1278
  /**
1279
- * Request to get channel history.
1280
- *
1281
- * Request model (no read-only fields).
1282
- */
1283
- interface CentrifugoHistoryRequestRequest$1 {
1284
- /** Channel name */
1285
- channel: string;
1286
- /** Maximum number of messages to return */
1287
- limit?: number | null;
1288
- since?: CentrifugoStreamPosition$1 | null;
1289
- /** Reverse message order (newest first) */
1290
- reverse?: boolean | null;
1291
- }
1292
- /**
1293
- * Request to list active channels.
1294
- *
1295
- * Request model (no read-only fields).
1296
- */
1297
- interface CentrifugoChannelsRequestRequest$1 {
1298
- /** Pattern to filter channels (e.g., 'user:*') */
1299
- pattern?: string | null;
1300
- }
1301
- /**
1302
- * Channel presence response.
1303
- *
1304
- * Response model (includes read-only fields).
1305
- */
1306
- interface CentrifugoPresenceResponse$1 {
1307
- error?: CentrifugoError$1 | null;
1308
- result?: CentrifugoPresenceResult$1 | null;
1309
- }
1310
- /**
1311
- * Request to get channel presence statistics.
1312
- *
1313
- * Request model (no read-only fields).
1314
- */
1315
- interface CentrifugoPresenceStatsRequestRequest$1 {
1316
- /** Channel name */
1317
- channel: string;
1318
- }
1319
- /**
1320
- * Channel presence stats response.
1321
- *
1322
- * Response model (includes read-only fields).
1323
- */
1324
- interface CentrifugoPresenceStatsResponse$1 {
1325
- error?: CentrifugoError$1 | null;
1326
- result?: CentrifugoPresenceStatsResult$1 | null;
1327
- }
1328
- /**
1329
- * List of active channels response.
1330
- *
1331
- * Response model (includes read-only fields).
1332
- */
1333
- interface CentrifugoChannelsResponse$1 {
1334
- error?: CentrifugoError$1 | null;
1335
- result?: CentrifugoChannelsResult$1 | null;
1336
- }
1337
- /**
1338
- * Server info response.
1279
+ * Response model for Centrifugo connection token.
1339
1280
  *
1340
1281
  * Response model (includes read-only fields).
1341
1282
  */
1342
- interface CentrifugoInfoResponse$1 {
1343
- error?: CentrifugoError$1 | null;
1344
- result?: CentrifugoInfoResult$1 | null;
1283
+ interface ConnectionTokenResponse$1 {
1284
+ /** JWT token for Centrifugo connection */
1285
+ token: string;
1286
+ /** Centrifugo WebSocket URL */
1287
+ centrifugo_url: string;
1288
+ /** Token expiration time (ISO 8601) */
1289
+ expires_at: string;
1290
+ /** List of allowed channels */
1291
+ channels: Array<string>;
1345
1292
  }
1293
+
1346
1294
  /**
1347
- * Channel history response.
1348
- *
1349
- * Response model (includes read-only fields).
1295
+ * API endpoints for Centrifugo Auth.
1350
1296
  */
1351
- interface CentrifugoHistoryResponse$1 {
1352
- error?: CentrifugoError$1 | null;
1353
- result?: CentrifugoHistoryResult$1 | null;
1297
+ declare class CentrifugoAuth {
1298
+ private client;
1299
+ constructor(client: any);
1300
+ /**
1301
+ * Get Centrifugo connection token
1302
+ *
1303
+ * Generate JWT token for WebSocket connection to Centrifugo. Token
1304
+ * includes user's allowed channels based on their permissions. Requires
1305
+ * authentication.
1306
+ */
1307
+ tokenRetrieve(): Promise<ConnectionTokenResponse$1>;
1354
1308
  }
1309
+
1355
1310
  /**
1356
- * Request to get channel presence.
1311
+ * API Logger with Consola
1312
+ * Beautiful console logging for API requests and responses
1357
1313
  *
1358
- * Request model (no read-only fields).
1314
+ * Installation:
1315
+ * npm install consola
1359
1316
  */
1360
- interface CentrifugoPresenceRequestRequest$1 {
1361
- /** Channel name */
1362
- channel: string;
1363
- }
1317
+
1364
1318
  /**
1365
- * Stream position for pagination.
1366
- *
1367
- * Response model (includes read-only fields).
1319
+ * Logger configuration
1368
1320
  */
1369
- interface CentrifugoStreamPosition$1 {
1370
- /** Stream offset */
1371
- offset: number;
1372
- /** Stream epoch */
1373
- epoch: string;
1321
+ interface LoggerConfig$1 {
1322
+ /** Enable logging */
1323
+ enabled: boolean;
1324
+ /** Log requests */
1325
+ logRequests: boolean;
1326
+ /** Log responses */
1327
+ logResponses: boolean;
1328
+ /** Log errors */
1329
+ logErrors: boolean;
1330
+ /** Log request/response bodies */
1331
+ logBodies: boolean;
1332
+ /** Log headers (excluding sensitive ones) */
1333
+ logHeaders: boolean;
1334
+ /** Custom consola instance */
1335
+ consola?: ConsolaInstance;
1374
1336
  }
1337
+
1375
1338
  /**
1376
- * Presence result wrapper.
1339
+ * Retry Configuration and Utilities
1377
1340
  *
1378
- * Response model (includes read-only fields).
1341
+ * Provides automatic retry logic for failed HTTP requests using p-retry.
1342
+ * Retries only on network errors and server errors (5xx), not client errors (4xx).
1379
1343
  */
1380
- interface CentrifugoPresenceResult$1 {
1381
- /** Map of client IDs to client info */
1382
- presence: Record<string, CentrifugoClientInfo$1>;
1383
- }
1384
1344
  /**
1385
- * Centrifugo API error structure.
1386
- *
1387
- * Response model (includes read-only fields).
1345
+ * Information about a failed retry attempt.
1388
1346
  */
1389
- interface CentrifugoError$1 {
1390
- /** Error code (0 = no error) */
1391
- code?: number;
1392
- /** Error message */
1393
- message?: string;
1347
+ interface FailedAttemptInfo$1 {
1348
+ /** The error that caused the failure */
1349
+ error: Error;
1350
+ /** The attempt number (1-indexed) */
1351
+ attemptNumber: number;
1352
+ /** Number of retries left */
1353
+ retriesLeft: number;
1394
1354
  }
1395
1355
  /**
1396
- * Presence stats result.
1356
+ * Retry configuration options.
1397
1357
  *
1398
- * Response model (includes read-only fields).
1358
+ * Uses exponential backoff with jitter by default to avoid thundering herd.
1399
1359
  */
1400
- interface CentrifugoPresenceStatsResult$1 {
1401
- /** Number of connected clients */
1402
- num_clients: number;
1403
- /** Number of unique users */
1404
- num_users: number;
1405
- }
1406
- /**
1407
- * Channels result wrapper.
1408
- *
1409
- * Response model (includes read-only fields).
1410
- */
1411
- interface CentrifugoChannelsResult$1 {
1412
- /** Map of channel names to channel info */
1413
- channels: Record<string, CentrifugoChannelInfo$1>;
1414
- }
1415
- /**
1416
- * Info result wrapper.
1417
- *
1418
- * Response model (includes read-only fields).
1419
- */
1420
- interface CentrifugoInfoResult$1 {
1421
- /** List of Centrifugo nodes */
1422
- nodes: Array<CentrifugoNodeInfo$1>;
1423
- }
1424
- /**
1425
- * History result wrapper.
1426
- *
1427
- * Response model (includes read-only fields).
1428
- */
1429
- interface CentrifugoHistoryResult$1 {
1430
- /** List of publications */
1431
- publications: Array<CentrifugoPublication$1>;
1432
- /** Current stream epoch */
1433
- epoch: string;
1434
- /** Latest stream offset */
1435
- offset: number;
1436
- }
1437
- /**
1438
- * Information about connected client.
1439
- *
1440
- * Response model (includes read-only fields).
1441
- */
1442
- interface CentrifugoClientInfo$1 {
1443
- /** User ID */
1444
- user: string;
1445
- /** Client UUID */
1446
- client: string;
1447
- /** Connection metadata */
1448
- conn_info?: Record<string, any> | null;
1449
- /** Channel-specific metadata */
1450
- chan_info?: Record<string, any> | null;
1451
- }
1452
- /**
1453
- * Information about a single channel.
1454
- *
1455
- * Response model (includes read-only fields).
1456
- */
1457
- interface CentrifugoChannelInfo$1 {
1458
- /** Number of connected clients in channel */
1459
- num_clients: number;
1460
- }
1461
- /**
1462
- * Information about a single Centrifugo node.
1463
- *
1464
- * Response model (includes read-only fields).
1465
- */
1466
- interface CentrifugoNodeInfo$1 {
1467
- /** Unique node identifier */
1468
- uid: string;
1469
- /** Node name */
1470
- name: string;
1471
- /** Centrifugo version */
1472
- version: string;
1473
- /** Number of connected clients */
1474
- num_clients: number;
1475
- /** Number of unique users */
1476
- num_users: number;
1477
- /** Number of active channels */
1478
- num_channels: number;
1479
- /** Node uptime in seconds */
1480
- uptime: number;
1481
- /** Total number of subscriptions */
1482
- num_subs: number;
1483
- metrics?: CentrifugoMetrics$1 | null;
1484
- process?: CentrifugoProcess$1 | null;
1485
- }
1486
- /**
1487
- * Single publication (message) in channel history.
1488
- *
1489
- * Response model (includes read-only fields).
1490
- */
1491
- interface CentrifugoPublication$1 {
1492
- /** Message payload */
1493
- data: Record<string, any>;
1494
- info?: CentrifugoClientInfo$1 | null;
1495
- /** Message offset in channel stream */
1496
- offset: number;
1497
- /** Optional message tags */
1498
- tags?: Record<string, any> | null;
1499
- }
1500
- /**
1501
- * Process information.
1502
- *
1503
- * Response model (includes read-only fields).
1504
- */
1505
- interface CentrifugoProcess$1 {
1506
- /** CPU usage percentage */
1507
- cpu: number;
1508
- /** Resident set size in bytes */
1509
- rss: number;
1510
- }
1511
- /**
1512
- * Server metrics.
1513
- *
1514
- * Response model (includes read-only fields).
1515
- */
1516
- interface CentrifugoMetrics$1 {
1517
- /** Metrics collection interval */
1518
- interval: number;
1519
- /** Metric name to value mapping */
1520
- items: Record<string, any>;
1521
- }
1522
-
1523
- /**
1524
- * API endpoints for Centrifugo Admin API.
1525
- */
1526
- declare class CentrifugoAdminApi {
1527
- private client;
1528
- constructor(client: any);
1529
- /**
1530
- * Get connection token for dashboard
1531
- *
1532
- * Returns JWT token and config for WebSocket connection to Centrifugo.
1533
- */
1534
- centrifugoServerAuthTokenCreate(): Promise<any>;
1535
- /**
1536
- * List active channels
1537
- *
1538
- * Returns list of active channels with optional pattern filter.
1539
- */
1540
- centrifugoServerChannelsCreate(data: CentrifugoChannelsRequestRequest$1): Promise<CentrifugoChannelsResponse$1>;
1541
- /**
1542
- * Get channel history
1543
- *
1544
- * Returns message history for a channel.
1545
- */
1546
- centrifugoServerHistoryCreate(data: CentrifugoHistoryRequestRequest$1): Promise<CentrifugoHistoryResponse$1>;
1547
- /**
1548
- * Get Centrifugo server info
1549
- *
1550
- * Returns server information including node count, version, and uptime.
1551
- */
1552
- centrifugoServerInfoCreate(): Promise<CentrifugoInfoResponse$1>;
1553
- /**
1554
- * Get channel presence
1555
- *
1556
- * Returns list of clients currently subscribed to a channel.
1557
- */
1558
- centrifugoServerPresenceCreate(data: CentrifugoPresenceRequestRequest$1): Promise<CentrifugoPresenceResponse$1>;
1559
- /**
1560
- * Get channel presence statistics
1561
- *
1562
- * Returns quick statistics about channel presence (num_clients,
1563
- * num_users).
1564
- */
1565
- centrifugoServerPresenceStatsCreate(data: CentrifugoPresenceStatsRequestRequest$1): Promise<CentrifugoPresenceStatsResponse$1>;
1566
- }
1567
-
1568
- /**
1569
- * Response model for Centrifugo connection token.
1570
- *
1571
- * Response model (includes read-only fields).
1572
- */
1573
- interface ConnectionTokenResponse$1 {
1574
- /** JWT token for Centrifugo connection */
1575
- token: string;
1576
- /** Centrifugo WebSocket URL */
1577
- centrifugo_url: string;
1578
- /** Token expiration time (ISO 8601) */
1579
- expires_at: string;
1580
- /** List of allowed channels */
1581
- channels: Array<string>;
1582
- }
1583
-
1584
- /**
1585
- * API endpoints for Centrifugo Auth.
1586
- */
1587
- declare class CentrifugoAuth {
1588
- private client;
1589
- constructor(client: any);
1590
- /**
1591
- * Get Centrifugo connection token
1592
- *
1593
- * Generate JWT token for WebSocket connection to Centrifugo. Token
1594
- * includes user's allowed channels based on their permissions. Requires
1595
- * authentication.
1596
- */
1597
- tokenRetrieve(): Promise<ConnectionTokenResponse$1>;
1598
- }
1599
-
1600
- /**
1601
- * Timeline response with hourly/daily breakdown for DRF.
1602
- *
1603
- * Response model (includes read-only fields).
1604
- */
1605
- interface TimelineResponse$1 {
1606
- timeline: Array<TimelineItem$1>;
1607
- period_hours: number;
1608
- interval: string;
1609
- }
1610
- /**
1611
- * Health check response.
1612
- *
1613
- * Response model (includes read-only fields).
1614
- */
1615
- interface CentrifugoHealthCheck$1 {
1616
- /** Health status: healthy or unhealthy */
1617
- status: string;
1618
- /** Configured wrapper URL */
1619
- wrapper_url: string;
1620
- /** Whether API key is configured */
1621
- has_api_key: boolean;
1622
- /** Current timestamp */
1623
- timestamp: string;
1624
- }
1625
- /**
1626
- *
1627
- * Response model (includes read-only fields).
1628
- */
1629
- interface PaginatedPublishList$1 {
1630
- /** Total number of items across all pages */
1631
- count: number;
1632
- /** Current page number (1-based) */
1633
- page: number;
1634
- /** Total number of pages */
1635
- pages: number;
1636
- /** Number of items per page */
1637
- page_size: number;
1638
- /** Whether there is a next page */
1639
- has_next: boolean;
1640
- /** Whether there is a previous page */
1641
- has_previous: boolean;
1642
- /** Next page number (null if no next page) */
1643
- next_page?: number | null;
1644
- /** Previous page number (null if no previous page) */
1645
- previous_page?: number | null;
1646
- /** Array of items for current page */
1647
- results: Array<Publish$1>;
1648
- }
1649
- /**
1650
- * List of channel statistics.
1651
- *
1652
- * Response model (includes read-only fields).
1653
- */
1654
- interface ChannelList$1 {
1655
- /** Channel statistics */
1656
- channels: Array<ChannelStats$1>;
1657
- /** Total number of channels */
1658
- total_channels: number;
1659
- }
1660
- /**
1661
- * Overview statistics for Centrifugo publishes.
1662
- *
1663
- * Response model (includes read-only fields).
1664
- */
1665
- interface CentrifugoOverviewStats$1 {
1666
- /** Total publishes in period */
1667
- total: number;
1668
- /** Successful publishes */
1669
- successful: number;
1670
- /** Failed publishes */
1671
- failed: number;
1672
- /** Timeout publishes */
1673
- timeout: number;
1674
- /** Success rate percentage */
1675
- success_rate: number;
1676
- /** Average duration in milliseconds */
1677
- avg_duration_ms: number;
1678
- /** Average ACKs received */
1679
- avg_acks_received: number;
1680
- /** Statistics period in hours */
1681
- period_hours: number;
1682
- }
1683
- /**
1684
- * Single timeline data point for DRF.
1685
- *
1686
- * Response model (includes read-only fields).
1687
- */
1688
- interface TimelineItem$1 {
1689
- timestamp: string;
1690
- count: number;
1691
- successful: number;
1692
- failed: number;
1693
- timeout: number;
1694
- }
1695
- /**
1696
- * Single publish item for DRF pagination.
1697
- *
1698
- * Response model (includes read-only fields).
1699
- */
1700
- interface Publish$1 {
1701
- message_id: string;
1702
- channel: string;
1703
- status: string;
1704
- wait_for_ack: boolean;
1705
- acks_received: number;
1706
- acks_expected: number | null;
1707
- duration_ms: number | null;
1708
- created_at: string;
1709
- completed_at: string | null;
1710
- error_code: string | null;
1711
- error_message: string | null;
1712
- }
1713
- /**
1714
- * Statistics per channel.
1715
- *
1716
- * Response model (includes read-only fields).
1717
- */
1718
- interface ChannelStats$1 {
1719
- /** Channel name */
1720
- channel: string;
1721
- /** Total publishes to this channel */
1722
- total: number;
1723
- /** Successful publishes */
1724
- successful: number;
1725
- /** Failed publishes */
1726
- failed: number;
1727
- /** Average duration */
1728
- avg_duration_ms: number;
1729
- /** Average ACKs received */
1730
- avg_acks: number;
1731
- /** Last activity timestamp (ISO format) */
1732
- last_activity_at: string | null;
1733
- }
1734
-
1735
- /**
1736
- * API endpoints for Centrifugo Monitoring.
1737
- */
1738
- declare class CentrifugoMonitoring {
1739
- private client;
1740
- constructor(client: any);
1741
- centrifugoMonitorChannelsRetrieve(hours?: number): Promise<ChannelList$1>;
1742
- centrifugoMonitorChannelsRetrieve(params?: {
1743
- hours?: number;
1744
- }): Promise<ChannelList$1>;
1745
- /**
1746
- * Get Centrifugo health status
1747
- *
1748
- * Returns the current health status of the Centrifugo client.
1749
- */
1750
- centrifugoMonitorHealthRetrieve(): Promise<CentrifugoHealthCheck$1>;
1751
- centrifugoMonitorOverviewRetrieve(hours?: number): Promise<CentrifugoOverviewStats$1>;
1752
- centrifugoMonitorOverviewRetrieve(params?: {
1753
- hours?: number;
1754
- }): Promise<CentrifugoOverviewStats$1>;
1755
- centrifugoMonitorPublishesList(channel?: string, ordering?: string, page?: number, page_size?: number, search?: string, status?: string): Promise<PaginatedPublishList$1>;
1756
- centrifugoMonitorPublishesList(params?: {
1757
- channel?: string;
1758
- ordering?: string;
1759
- page?: number;
1760
- page_size?: number;
1761
- search?: string;
1762
- status?: string;
1763
- }): Promise<PaginatedPublishList$1>;
1764
- centrifugoMonitorTimelineRetrieve(hours?: number, interval?: string): Promise<TimelineResponse$1>;
1765
- centrifugoMonitorTimelineRetrieve(params?: {
1766
- hours?: number;
1767
- interval?: string;
1768
- }): Promise<TimelineResponse$1>;
1769
- }
1770
-
1771
- /**
1772
- * Response model for test message publishing.
1773
- *
1774
- * Response model (includes read-only fields).
1775
- */
1776
- interface PublishTestResponse$1 {
1777
- /** Whether publish succeeded */
1778
- success: boolean;
1779
- /** Unique message ID */
1780
- message_id: string;
1781
- /** Target channel */
1782
- channel: string;
1783
- /** Number of ACKs received */
1784
- acks_received?: number;
1785
- /** Whether message was delivered */
1786
- delivered?: boolean;
1787
- /** Error message if failed */
1788
- error?: string | null;
1789
- }
1790
- /**
1791
- * Response model for manual ACK.
1792
- *
1793
- * Response model (includes read-only fields).
1794
- */
1795
- interface ManualAckResponse$1 {
1796
- /** Whether ACK was sent successfully */
1797
- success: boolean;
1798
- /** Message ID that was acknowledged */
1799
- message_id: string;
1800
- /** Error message if failed */
1801
- error?: string | null;
1802
- }
1803
- /**
1804
- * Request model for manual ACK sending.
1805
- *
1806
- * Request model (no read-only fields).
1807
- */
1808
- interface ManualAckRequestRequest$1 {
1809
- /** Message ID to acknowledge */
1810
- message_id: string;
1811
- /** Client ID sending the ACK */
1812
- client_id: string;
1813
- }
1814
- /**
1815
- * Request model for test message publishing.
1816
- *
1817
- * Request model (no read-only fields).
1818
- */
1819
- interface PublishTestRequestRequest$1 {
1820
- /** Target channel name */
1821
- channel: string;
1822
- /** Message data (any JSON object) */
1823
- data: Record<string, any>;
1824
- /** Wait for client acknowledgment */
1825
- wait_for_ack?: boolean;
1826
- /** ACK timeout in seconds */
1827
- ack_timeout?: number;
1828
- }
1829
-
1830
- /**
1831
- * API endpoints for Centrifugo Testing.
1832
- */
1833
- declare class CentrifugoTesting {
1834
- private client;
1835
- constructor(client: any);
1360
+ interface RetryConfig$1 {
1836
1361
  /**
1837
- * Publish test message
1838
- *
1839
- * Publish test message to Centrifugo via wrapper with optional ACK
1840
- * tracking.
1362
+ * Maximum number of retry attempts.
1363
+ * @default 3
1841
1364
  */
1842
- publishTestCreate(data: PublishTestRequestRequest$1): Promise<PublishTestResponse$1>;
1365
+ retries?: number;
1843
1366
  /**
1844
- * Publish with database logging
1845
- *
1846
- * Publish message using CentrifugoClient with database logging. This will
1847
- * create CentrifugoLog records.
1367
+ * Exponential backoff factor.
1368
+ * @default 2
1848
1369
  */
1849
- publishWithLoggingCreate(data: PublishTestRequestRequest$1): Promise<PublishTestResponse$1>;
1850
- /**
1851
- * Send manual ACK
1852
- *
1853
- * Manually send ACK for a message to the wrapper. Pass message_id in
1854
- * request body.
1855
- */
1856
- sendAckCreate(data: ManualAckRequestRequest$1): Promise<ManualAckResponse$1>;
1857
- }
1858
-
1859
- /**
1860
- * API Logger with Consola
1861
- * Beautiful console logging for API requests and responses
1862
- *
1863
- * Installation:
1864
- * npm install consola
1865
- */
1866
-
1867
- /**
1868
- * Logger configuration
1869
- */
1870
- interface LoggerConfig$1 {
1871
- /** Enable logging */
1872
- enabled: boolean;
1873
- /** Log requests */
1874
- logRequests: boolean;
1875
- /** Log responses */
1876
- logResponses: boolean;
1877
- /** Log errors */
1878
- logErrors: boolean;
1879
- /** Log request/response bodies */
1880
- logBodies: boolean;
1881
- /** Log headers (excluding sensitive ones) */
1882
- logHeaders: boolean;
1883
- /** Custom consola instance */
1884
- consola?: ConsolaInstance;
1885
- }
1886
-
1887
- /**
1888
- * Retry Configuration and Utilities
1889
- *
1890
- * Provides automatic retry logic for failed HTTP requests using p-retry.
1891
- * Retries only on network errors and server errors (5xx), not client errors (4xx).
1892
- */
1893
- /**
1894
- * Information about a failed retry attempt.
1895
- */
1896
- interface FailedAttemptInfo$1 {
1897
- /** The error that caused the failure */
1898
- error: Error;
1899
- /** The attempt number (1-indexed) */
1900
- attemptNumber: number;
1901
- /** Number of retries left */
1902
- retriesLeft: number;
1903
- }
1904
- /**
1905
- * Retry configuration options.
1906
- *
1907
- * Uses exponential backoff with jitter by default to avoid thundering herd.
1908
- */
1909
- interface RetryConfig$1 {
1910
- /**
1911
- * Maximum number of retry attempts.
1912
- * @default 3
1913
- */
1914
- retries?: number;
1915
- /**
1916
- * Exponential backoff factor.
1917
- * @default 2
1918
- */
1919
- factor?: number;
1370
+ factor?: number;
1920
1371
  /**
1921
1372
  * Minimum wait time between retries (ms).
1922
1373
  * @default 1000
1923
- */
1924
- minTimeout?: number;
1925
- /**
1926
- * Maximum wait time between retries (ms).
1927
- * @default 60000
1928
- */
1929
- maxTimeout?: number;
1930
- /**
1931
- * Add randomness to wait times (jitter).
1932
- * Helps avoid thundering herd problem.
1933
- * @default true
1934
- */
1935
- randomize?: boolean;
1936
- /**
1937
- * Callback called on each failed attempt.
1938
- */
1939
- onFailedAttempt?: (info: FailedAttemptInfo$1) => void;
1940
- }
1941
-
1942
- /**
1943
- * Storage adapters for cross-platform token storage.
1944
- *
1945
- * Supports:
1946
- * - LocalStorage (browser)
1947
- * - Cookies (SSR/browser)
1948
- * - Memory (Node.js/Electron/testing)
1949
- */
1950
-
1951
- /**
1952
- * Storage adapter interface for cross-platform token storage.
1953
- */
1954
- interface StorageAdapter$1 {
1955
- getItem(key: string): string | null;
1956
- setItem(key: string, value: string): void;
1957
- removeItem(key: string): void;
1958
- }
1959
-
1960
- /**
1961
- * Zod schema for CentrifugoChannelInfo
1962
- *
1963
- * This schema provides runtime validation and type inference.
1964
- * * Information about a single channel.
1965
- * */
1966
-
1967
- /**
1968
- * Information about a single channel.
1969
- */
1970
- declare const CentrifugoChannelInfoSchema: z.ZodObject<{
1971
- num_clients: z.ZodNumber;
1972
- }, z.core.$strip>;
1973
- /**
1974
- * Infer TypeScript type from Zod schema
1975
- */
1976
- type CentrifugoChannelInfo = z.infer<typeof CentrifugoChannelInfoSchema>;
1977
-
1978
- /**
1979
- * Zod schema for CentrifugoChannelsRequestRequest
1980
- *
1981
- * This schema provides runtime validation and type inference.
1982
- * * Request to list active channels.
1983
- * */
1984
-
1985
- /**
1986
- * Request to list active channels.
1987
- */
1988
- declare const CentrifugoChannelsRequestRequestSchema: z.ZodObject<{
1989
- pattern: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1990
- }, z.core.$strip>;
1991
- /**
1992
- * Infer TypeScript type from Zod schema
1993
- */
1994
- type CentrifugoChannelsRequestRequest = z.infer<typeof CentrifugoChannelsRequestRequestSchema>;
1995
-
1996
- /**
1997
- * Zod schema for CentrifugoChannelsResponse
1998
- *
1999
- * This schema provides runtime validation and type inference.
2000
- * * List of active channels response.
2001
- * */
2002
-
2003
- /**
2004
- * List of active channels response.
2005
- */
2006
- declare const CentrifugoChannelsResponseSchema: z.ZodObject<{
2007
- error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2008
- code: z.ZodOptional<z.ZodNumber>;
2009
- message: z.ZodOptional<z.ZodString>;
2010
- }, z.core.$strip>>>;
2011
- result: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2012
- channels: z.ZodRecord<z.ZodString, z.ZodObject<{
2013
- num_clients: z.ZodNumber;
2014
- }, z.core.$strip>>;
2015
- }, z.core.$strip>>>;
2016
- }, z.core.$strip>;
2017
- /**
2018
- * Infer TypeScript type from Zod schema
2019
- */
2020
- type CentrifugoChannelsResponse = z.infer<typeof CentrifugoChannelsResponseSchema>;
2021
-
2022
- /**
2023
- * Zod schema for CentrifugoChannelsResult
2024
- *
2025
- * This schema provides runtime validation and type inference.
2026
- * * Channels result wrapper.
2027
- * */
2028
-
2029
- /**
2030
- * Channels result wrapper.
2031
- */
2032
- declare const CentrifugoChannelsResultSchema: z.ZodObject<{
2033
- channels: z.ZodRecord<z.ZodString, z.ZodObject<{
2034
- num_clients: z.ZodNumber;
2035
- }, z.core.$strip>>;
2036
- }, z.core.$strip>;
2037
- /**
2038
- * Infer TypeScript type from Zod schema
2039
- */
2040
- type CentrifugoChannelsResult = z.infer<typeof CentrifugoChannelsResultSchema>;
2041
-
2042
- /**
2043
- * Zod schema for CentrifugoClientInfo
2044
- *
2045
- * This schema provides runtime validation and type inference.
2046
- * * Information about connected client.
2047
- * */
2048
-
2049
- /**
2050
- * Information about connected client.
2051
- */
2052
- declare const CentrifugoClientInfoSchema: z.ZodObject<{
2053
- user: z.ZodString;
2054
- client: z.ZodString;
2055
- conn_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2056
- chan_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2057
- }, z.core.$strip>;
2058
- /**
2059
- * Infer TypeScript type from Zod schema
2060
- */
2061
- type CentrifugoClientInfo = z.infer<typeof CentrifugoClientInfoSchema>;
2062
-
2063
- /**
2064
- * Zod schema for CentrifugoError
2065
- *
2066
- * This schema provides runtime validation and type inference.
2067
- * * Centrifugo API error structure.
2068
- * */
2069
-
2070
- /**
2071
- * Centrifugo API error structure.
2072
- */
2073
- declare const CentrifugoErrorSchema: z.ZodObject<{
2074
- code: z.ZodOptional<z.ZodNumber>;
2075
- message: z.ZodOptional<z.ZodString>;
2076
- }, z.core.$strip>;
2077
- /**
2078
- * Infer TypeScript type from Zod schema
2079
- */
2080
- type CentrifugoError = z.infer<typeof CentrifugoErrorSchema>;
2081
-
2082
- /**
2083
- * Zod schema for CentrifugoHealthCheck
2084
- *
2085
- * This schema provides runtime validation and type inference.
2086
- * * Health check response.
2087
- * */
2088
-
2089
- /**
2090
- * Health check response.
2091
- */
2092
- declare const CentrifugoHealthCheckSchema: z.ZodObject<{
2093
- status: z.ZodString;
2094
- wrapper_url: z.ZodString;
2095
- has_api_key: z.ZodBoolean;
2096
- timestamp: z.ZodString;
2097
- }, z.core.$strip>;
2098
- /**
2099
- * Infer TypeScript type from Zod schema
2100
- */
2101
- type CentrifugoHealthCheck = z.infer<typeof CentrifugoHealthCheckSchema>;
2102
-
2103
- /**
2104
- * Zod schema for CentrifugoHistoryRequestRequest
2105
- *
2106
- * This schema provides runtime validation and type inference.
2107
- * * Request to get channel history.
2108
- * */
2109
-
2110
- /**
2111
- * Request to get channel history.
2112
- */
2113
- declare const CentrifugoHistoryRequestRequestSchema: z.ZodObject<{
2114
- channel: z.ZodString;
2115
- limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2116
- since: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2117
- offset: z.ZodNumber;
2118
- epoch: z.ZodString;
2119
- }, z.core.$strip>>>;
2120
- reverse: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2121
- }, z.core.$strip>;
2122
- /**
2123
- * Infer TypeScript type from Zod schema
2124
- */
2125
- type CentrifugoHistoryRequestRequest = z.infer<typeof CentrifugoHistoryRequestRequestSchema>;
2126
-
2127
- /**
2128
- * Zod schema for CentrifugoHistoryResponse
2129
- *
2130
- * This schema provides runtime validation and type inference.
2131
- * * Channel history response.
2132
- * */
2133
-
2134
- /**
2135
- * Channel history response.
2136
- */
2137
- declare const CentrifugoHistoryResponseSchema: z.ZodObject<{
2138
- error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2139
- code: z.ZodOptional<z.ZodNumber>;
2140
- message: z.ZodOptional<z.ZodString>;
2141
- }, z.core.$strip>>>;
2142
- result: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2143
- publications: z.ZodArray<z.ZodObject<{
2144
- data: z.ZodRecord<z.ZodString, z.ZodAny>;
2145
- info: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2146
- user: z.ZodString;
2147
- client: z.ZodString;
2148
- conn_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2149
- chan_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2150
- }, z.core.$strip>>>;
2151
- offset: z.ZodNumber;
2152
- tags: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2153
- }, z.core.$strip>>;
2154
- epoch: z.ZodString;
2155
- offset: z.ZodNumber;
2156
- }, z.core.$strip>>>;
2157
- }, z.core.$strip>;
2158
- /**
2159
- * Infer TypeScript type from Zod schema
2160
- */
2161
- type CentrifugoHistoryResponse = z.infer<typeof CentrifugoHistoryResponseSchema>;
2162
-
2163
- /**
2164
- * Zod schema for CentrifugoHistoryResult
2165
- *
2166
- * This schema provides runtime validation and type inference.
2167
- * * History result wrapper.
2168
- * */
2169
-
2170
- /**
2171
- * History result wrapper.
2172
- */
2173
- declare const CentrifugoHistoryResultSchema: z.ZodObject<{
2174
- publications: z.ZodArray<z.ZodObject<{
2175
- data: z.ZodRecord<z.ZodString, z.ZodAny>;
2176
- info: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2177
- user: z.ZodString;
2178
- client: z.ZodString;
2179
- conn_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2180
- chan_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2181
- }, z.core.$strip>>>;
2182
- offset: z.ZodNumber;
2183
- tags: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2184
- }, z.core.$strip>>;
2185
- epoch: z.ZodString;
2186
- offset: z.ZodNumber;
2187
- }, z.core.$strip>;
2188
- /**
2189
- * Infer TypeScript type from Zod schema
2190
- */
2191
- type CentrifugoHistoryResult = z.infer<typeof CentrifugoHistoryResultSchema>;
2192
-
2193
- /**
2194
- * Zod schema for CentrifugoInfoResponse
2195
- *
2196
- * This schema provides runtime validation and type inference.
2197
- * * Server info response.
2198
- * */
2199
-
2200
- /**
2201
- * Server info response.
2202
- */
2203
- declare const CentrifugoInfoResponseSchema: z.ZodObject<{
2204
- error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2205
- code: z.ZodOptional<z.ZodNumber>;
2206
- message: z.ZodOptional<z.ZodString>;
2207
- }, z.core.$strip>>>;
2208
- result: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2209
- nodes: z.ZodArray<z.ZodObject<{
2210
- uid: z.ZodString;
2211
- name: z.ZodString;
2212
- version: z.ZodString;
2213
- num_clients: z.ZodNumber;
2214
- num_users: z.ZodNumber;
2215
- num_channels: z.ZodNumber;
2216
- uptime: z.ZodNumber;
2217
- num_subs: z.ZodNumber;
2218
- metrics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2219
- interval: z.ZodNumber;
2220
- items: z.ZodRecord<z.ZodString, z.ZodNumber>;
2221
- }, z.core.$strip>>>;
2222
- process: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2223
- cpu: z.ZodNumber;
2224
- rss: z.ZodNumber;
2225
- }, z.core.$strip>>>;
2226
- }, z.core.$strip>>;
2227
- }, z.core.$strip>>>;
2228
- }, z.core.$strip>;
2229
- /**
2230
- * Infer TypeScript type from Zod schema
2231
- */
2232
- type CentrifugoInfoResponse = z.infer<typeof CentrifugoInfoResponseSchema>;
2233
-
2234
- /**
2235
- * Zod schema for CentrifugoInfoResult
2236
- *
2237
- * This schema provides runtime validation and type inference.
2238
- * * Info result wrapper.
2239
- * */
2240
-
2241
- /**
2242
- * Info result wrapper.
2243
- */
2244
- declare const CentrifugoInfoResultSchema: z.ZodObject<{
2245
- nodes: z.ZodArray<z.ZodObject<{
2246
- uid: z.ZodString;
2247
- name: z.ZodString;
2248
- version: z.ZodString;
2249
- num_clients: z.ZodNumber;
2250
- num_users: z.ZodNumber;
2251
- num_channels: z.ZodNumber;
2252
- uptime: z.ZodNumber;
2253
- num_subs: z.ZodNumber;
2254
- metrics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2255
- interval: z.ZodNumber;
2256
- items: z.ZodRecord<z.ZodString, z.ZodNumber>;
2257
- }, z.core.$strip>>>;
2258
- process: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2259
- cpu: z.ZodNumber;
2260
- rss: z.ZodNumber;
2261
- }, z.core.$strip>>>;
2262
- }, z.core.$strip>>;
2263
- }, z.core.$strip>;
2264
- /**
2265
- * Infer TypeScript type from Zod schema
2266
- */
2267
- type CentrifugoInfoResult = z.infer<typeof CentrifugoInfoResultSchema>;
2268
-
2269
- /**
2270
- * Zod schema for CentrifugoMetrics
2271
- *
2272
- * This schema provides runtime validation and type inference.
2273
- * * Server metrics.
2274
- * */
2275
-
2276
- /**
2277
- * Server metrics.
2278
- */
2279
- declare const CentrifugoMetricsSchema: z.ZodObject<{
2280
- interval: z.ZodNumber;
2281
- items: z.ZodRecord<z.ZodString, z.ZodNumber>;
2282
- }, z.core.$strip>;
2283
- /**
2284
- * Infer TypeScript type from Zod schema
2285
- */
2286
- type CentrifugoMetrics = z.infer<typeof CentrifugoMetricsSchema>;
2287
-
2288
- /**
2289
- * Zod schema for CentrifugoNodeInfo
2290
- *
2291
- * This schema provides runtime validation and type inference.
2292
- * * Information about a single Centrifugo node.
2293
- * */
2294
-
2295
- /**
2296
- * Information about a single Centrifugo node.
2297
- */
2298
- declare const CentrifugoNodeInfoSchema: z.ZodObject<{
2299
- uid: z.ZodString;
2300
- name: z.ZodString;
2301
- version: z.ZodString;
2302
- num_clients: z.ZodNumber;
2303
- num_users: z.ZodNumber;
2304
- num_channels: z.ZodNumber;
2305
- uptime: z.ZodNumber;
2306
- num_subs: z.ZodNumber;
2307
- metrics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2308
- interval: z.ZodNumber;
2309
- items: z.ZodRecord<z.ZodString, z.ZodNumber>;
2310
- }, z.core.$strip>>>;
2311
- process: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2312
- cpu: z.ZodNumber;
2313
- rss: z.ZodNumber;
2314
- }, z.core.$strip>>>;
2315
- }, z.core.$strip>;
2316
- /**
2317
- * Infer TypeScript type from Zod schema
2318
- */
2319
- type CentrifugoNodeInfo = z.infer<typeof CentrifugoNodeInfoSchema>;
2320
-
2321
- /**
2322
- * Zod schema for CentrifugoOverviewStats
2323
- *
2324
- * This schema provides runtime validation and type inference.
2325
- * * Overview statistics for Centrifugo publishes.
2326
- * */
2327
-
2328
- /**
2329
- * Overview statistics for Centrifugo publishes.
2330
- */
2331
- declare const CentrifugoOverviewStatsSchema: z.ZodObject<{
2332
- total: z.ZodNumber;
2333
- successful: z.ZodNumber;
2334
- failed: z.ZodNumber;
2335
- timeout: z.ZodNumber;
2336
- success_rate: z.ZodNumber;
2337
- avg_duration_ms: z.ZodNumber;
2338
- avg_acks_received: z.ZodNumber;
2339
- period_hours: z.ZodNumber;
2340
- }, z.core.$strip>;
2341
- /**
2342
- * Infer TypeScript type from Zod schema
2343
- */
2344
- type CentrifugoOverviewStats = z.infer<typeof CentrifugoOverviewStatsSchema>;
2345
-
2346
- /**
2347
- * Zod schema for CentrifugoPresenceRequestRequest
2348
- *
2349
- * This schema provides runtime validation and type inference.
2350
- * * Request to get channel presence.
2351
- * */
2352
-
2353
- /**
2354
- * Request to get channel presence.
2355
- */
2356
- declare const CentrifugoPresenceRequestRequestSchema: z.ZodObject<{
2357
- channel: z.ZodString;
2358
- }, z.core.$strip>;
2359
- /**
2360
- * Infer TypeScript type from Zod schema
2361
- */
2362
- type CentrifugoPresenceRequestRequest = z.infer<typeof CentrifugoPresenceRequestRequestSchema>;
2363
-
2364
- /**
2365
- * Zod schema for CentrifugoPresenceResponse
2366
- *
2367
- * This schema provides runtime validation and type inference.
2368
- * * Channel presence response.
2369
- * */
2370
-
2371
- /**
2372
- * Channel presence response.
2373
- */
2374
- declare const CentrifugoPresenceResponseSchema: z.ZodObject<{
2375
- error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2376
- code: z.ZodOptional<z.ZodNumber>;
2377
- message: z.ZodOptional<z.ZodString>;
2378
- }, z.core.$strip>>>;
2379
- result: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2380
- presence: z.ZodRecord<z.ZodString, z.ZodObject<{
2381
- user: z.ZodString;
2382
- client: z.ZodString;
2383
- conn_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2384
- chan_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2385
- }, z.core.$strip>>;
2386
- }, z.core.$strip>>>;
2387
- }, z.core.$strip>;
2388
- /**
2389
- * Infer TypeScript type from Zod schema
2390
- */
2391
- type CentrifugoPresenceResponse = z.infer<typeof CentrifugoPresenceResponseSchema>;
2392
-
2393
- /**
2394
- * Zod schema for CentrifugoPresenceResult
2395
- *
2396
- * This schema provides runtime validation and type inference.
2397
- * * Presence result wrapper.
2398
- * */
2399
-
2400
- /**
2401
- * Presence result wrapper.
2402
- */
2403
- declare const CentrifugoPresenceResultSchema: z.ZodObject<{
2404
- presence: z.ZodRecord<z.ZodString, z.ZodObject<{
2405
- user: z.ZodString;
2406
- client: z.ZodString;
2407
- conn_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2408
- chan_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2409
- }, z.core.$strip>>;
2410
- }, z.core.$strip>;
2411
- /**
2412
- * Infer TypeScript type from Zod schema
2413
- */
2414
- type CentrifugoPresenceResult = z.infer<typeof CentrifugoPresenceResultSchema>;
2415
-
2416
- /**
2417
- * Zod schema for CentrifugoPresenceStatsRequestRequest
2418
- *
2419
- * This schema provides runtime validation and type inference.
2420
- * * Request to get channel presence statistics.
2421
- * */
2422
-
2423
- /**
2424
- * Request to get channel presence statistics.
2425
- */
2426
- declare const CentrifugoPresenceStatsRequestRequestSchema: z.ZodObject<{
2427
- channel: z.ZodString;
2428
- }, z.core.$strip>;
2429
- /**
2430
- * Infer TypeScript type from Zod schema
2431
- */
2432
- type CentrifugoPresenceStatsRequestRequest = z.infer<typeof CentrifugoPresenceStatsRequestRequestSchema>;
2433
-
2434
- /**
2435
- * Zod schema for CentrifugoPresenceStatsResponse
2436
- *
2437
- * This schema provides runtime validation and type inference.
2438
- * * Channel presence stats response.
2439
- * */
2440
-
2441
- /**
2442
- * Channel presence stats response.
2443
- */
2444
- declare const CentrifugoPresenceStatsResponseSchema: z.ZodObject<{
2445
- error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2446
- code: z.ZodOptional<z.ZodNumber>;
2447
- message: z.ZodOptional<z.ZodString>;
2448
- }, z.core.$strip>>>;
2449
- result: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2450
- num_clients: z.ZodNumber;
2451
- num_users: z.ZodNumber;
2452
- }, z.core.$strip>>>;
2453
- }, z.core.$strip>;
2454
- /**
2455
- * Infer TypeScript type from Zod schema
2456
- */
2457
- type CentrifugoPresenceStatsResponse = z.infer<typeof CentrifugoPresenceStatsResponseSchema>;
2458
-
2459
- /**
2460
- * Zod schema for CentrifugoPresenceStatsResult
2461
- *
2462
- * This schema provides runtime validation and type inference.
2463
- * * Presence stats result.
2464
- * */
2465
-
2466
- /**
2467
- * Presence stats result.
2468
- */
2469
- declare const CentrifugoPresenceStatsResultSchema: z.ZodObject<{
2470
- num_clients: z.ZodNumber;
2471
- num_users: z.ZodNumber;
2472
- }, z.core.$strip>;
2473
- /**
2474
- * Infer TypeScript type from Zod schema
2475
- */
2476
- type CentrifugoPresenceStatsResult = z.infer<typeof CentrifugoPresenceStatsResultSchema>;
2477
-
2478
- /**
2479
- * Zod schema for CentrifugoProcess
2480
- *
2481
- * This schema provides runtime validation and type inference.
2482
- * * Process information.
2483
- * */
2484
-
2485
- /**
2486
- * Process information.
2487
- */
2488
- declare const CentrifugoProcessSchema: z.ZodObject<{
2489
- cpu: z.ZodNumber;
2490
- rss: z.ZodNumber;
2491
- }, z.core.$strip>;
2492
- /**
2493
- * Infer TypeScript type from Zod schema
2494
- */
2495
- type CentrifugoProcess = z.infer<typeof CentrifugoProcessSchema>;
2496
-
2497
- /**
2498
- * Zod schema for CentrifugoPublication
2499
- *
2500
- * This schema provides runtime validation and type inference.
2501
- * * Single publication (message) in channel history.
2502
- * */
2503
-
2504
- /**
2505
- * Single publication (message) in channel history.
2506
- */
2507
- declare const CentrifugoPublicationSchema: z.ZodObject<{
2508
- data: z.ZodRecord<z.ZodString, z.ZodAny>;
2509
- info: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2510
- user: z.ZodString;
2511
- client: z.ZodString;
2512
- conn_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2513
- chan_info: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2514
- }, z.core.$strip>>>;
2515
- offset: z.ZodNumber;
2516
- tags: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2517
- }, z.core.$strip>;
2518
- /**
2519
- * Infer TypeScript type from Zod schema
2520
- */
2521
- type CentrifugoPublication = z.infer<typeof CentrifugoPublicationSchema>;
2522
-
2523
- /**
2524
- * Zod schema for CentrifugoStreamPosition
2525
- *
2526
- * This schema provides runtime validation and type inference.
2527
- * * Stream position for pagination.
2528
- * */
2529
-
2530
- /**
2531
- * Stream position for pagination.
2532
- */
2533
- declare const CentrifugoStreamPositionSchema: z.ZodObject<{
2534
- offset: z.ZodNumber;
2535
- epoch: z.ZodString;
2536
- }, z.core.$strip>;
2537
- /**
2538
- * Infer TypeScript type from Zod schema
2539
- */
2540
- type CentrifugoStreamPosition = z.infer<typeof CentrifugoStreamPositionSchema>;
2541
-
2542
- /**
2543
- * Zod schema for ChannelList
2544
- *
2545
- * This schema provides runtime validation and type inference.
2546
- * * List of channel statistics.
2547
- * */
2548
-
2549
- /**
2550
- * List of channel statistics.
2551
- */
2552
- declare const ChannelListSchema: z.ZodObject<{
2553
- channels: z.ZodArray<z.ZodObject<{
2554
- channel: z.ZodString;
2555
- total: z.ZodNumber;
2556
- successful: z.ZodNumber;
2557
- failed: z.ZodNumber;
2558
- avg_duration_ms: z.ZodNumber;
2559
- avg_acks: z.ZodNumber;
2560
- last_activity_at: z.ZodNullable<z.ZodString>;
2561
- }, z.core.$strip>>;
2562
- total_channels: z.ZodNumber;
2563
- }, z.core.$strip>;
2564
- /**
2565
- * Infer TypeScript type from Zod schema
2566
- */
2567
- type ChannelList = z.infer<typeof ChannelListSchema>;
2568
-
2569
- /**
2570
- * Zod schema for ChannelStats
2571
- *
2572
- * This schema provides runtime validation and type inference.
2573
- * * Statistics per channel.
2574
- * */
2575
-
2576
- /**
2577
- * Statistics per channel.
2578
- */
2579
- declare const ChannelStatsSchema: z.ZodObject<{
2580
- channel: z.ZodString;
2581
- total: z.ZodNumber;
2582
- successful: z.ZodNumber;
2583
- failed: z.ZodNumber;
2584
- avg_duration_ms: z.ZodNumber;
2585
- avg_acks: z.ZodNumber;
2586
- last_activity_at: z.ZodNullable<z.ZodString>;
2587
- }, z.core.$strip>;
2588
- /**
2589
- * Infer TypeScript type from Zod schema
2590
- */
2591
- type ChannelStats = z.infer<typeof ChannelStatsSchema>;
2592
-
2593
- /**
2594
- * Zod schema for ConnectionTokenResponse
2595
- *
2596
- * This schema provides runtime validation and type inference.
2597
- * * Response model for Centrifugo connection token.
2598
- * */
2599
-
2600
- /**
2601
- * Response model for Centrifugo connection token.
2602
- */
2603
- declare const ConnectionTokenResponseSchema: z.ZodObject<{
2604
- token: z.ZodString;
2605
- centrifugo_url: z.ZodString;
2606
- expires_at: z.ZodString;
2607
- channels: z.ZodArray<z.ZodString>;
2608
- }, z.core.$strip>;
2609
- /**
2610
- * Infer TypeScript type from Zod schema
2611
- */
2612
- type ConnectionTokenResponse = z.infer<typeof ConnectionTokenResponseSchema>;
2613
-
2614
- /**
2615
- * Zod schema for ManualAckRequestRequest
2616
- *
2617
- * This schema provides runtime validation and type inference.
2618
- * * Request model for manual ACK sending.
2619
- * */
2620
-
2621
- /**
2622
- * Request model for manual ACK sending.
2623
- */
2624
- declare const ManualAckRequestRequestSchema: z.ZodObject<{
2625
- message_id: z.ZodString;
2626
- client_id: z.ZodString;
2627
- }, z.core.$strip>;
2628
- /**
2629
- * Infer TypeScript type from Zod schema
2630
- */
2631
- type ManualAckRequestRequest = z.infer<typeof ManualAckRequestRequestSchema>;
2632
-
2633
- /**
2634
- * Zod schema for ManualAckResponse
2635
- *
2636
- * This schema provides runtime validation and type inference.
2637
- * * Response model for manual ACK.
2638
- * */
2639
-
2640
- /**
2641
- * Response model for manual ACK.
2642
- */
2643
- declare const ManualAckResponseSchema: z.ZodObject<{
2644
- success: z.ZodBoolean;
2645
- message_id: z.ZodString;
2646
- error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2647
- }, z.core.$strip>;
2648
- /**
2649
- * Infer TypeScript type from Zod schema
2650
- */
2651
- type ManualAckResponse = z.infer<typeof ManualAckResponseSchema>;
2652
-
2653
- /**
2654
- * Zod schema for PaginatedPublishList
2655
- *
2656
- * This schema provides runtime validation and type inference.
2657
- * */
2658
-
2659
- declare const PaginatedPublishListSchema: z.ZodObject<{
2660
- count: z.ZodNumber;
2661
- page: z.ZodNumber;
2662
- pages: z.ZodNumber;
2663
- page_size: z.ZodNumber;
2664
- has_next: z.ZodBoolean;
2665
- has_previous: z.ZodBoolean;
2666
- next_page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2667
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2668
- results: z.ZodArray<z.ZodObject<{
2669
- message_id: z.ZodString;
2670
- channel: z.ZodString;
2671
- status: z.ZodString;
2672
- wait_for_ack: z.ZodBoolean;
2673
- acks_received: z.ZodNumber;
2674
- acks_expected: z.ZodNullable<z.ZodNumber>;
2675
- duration_ms: z.ZodNullable<z.ZodNumber>;
2676
- created_at: z.ZodString;
2677
- completed_at: z.ZodNullable<z.ZodString>;
2678
- error_code: z.ZodNullable<z.ZodString>;
2679
- error_message: z.ZodNullable<z.ZodString>;
2680
- }, z.core.$strip>>;
2681
- }, z.core.$strip>;
2682
- /**
2683
- * Infer TypeScript type from Zod schema
2684
- */
2685
- type PaginatedPublishList = z.infer<typeof PaginatedPublishListSchema>;
2686
-
2687
- /**
2688
- * Zod schema for Publish
2689
- *
2690
- * This schema provides runtime validation and type inference.
2691
- * * Single publish item for DRF pagination.
2692
- * */
2693
-
2694
- /**
2695
- * Single publish item for DRF pagination.
2696
- */
2697
- declare const PublishSchema: z.ZodObject<{
2698
- message_id: z.ZodString;
2699
- channel: z.ZodString;
2700
- status: z.ZodString;
2701
- wait_for_ack: z.ZodBoolean;
2702
- acks_received: z.ZodNumber;
2703
- acks_expected: z.ZodNullable<z.ZodNumber>;
2704
- duration_ms: z.ZodNullable<z.ZodNumber>;
2705
- created_at: z.ZodString;
2706
- completed_at: z.ZodNullable<z.ZodString>;
2707
- error_code: z.ZodNullable<z.ZodString>;
2708
- error_message: z.ZodNullable<z.ZodString>;
2709
- }, z.core.$strip>;
2710
- /**
2711
- * Infer TypeScript type from Zod schema
2712
- */
2713
- type Publish = z.infer<typeof PublishSchema>;
2714
-
2715
- /**
2716
- * Zod schema for PublishTestRequestRequest
2717
- *
2718
- * This schema provides runtime validation and type inference.
2719
- * * Request model for test message publishing.
2720
- * */
2721
-
2722
- /**
2723
- * Request model for test message publishing.
2724
- */
2725
- declare const PublishTestRequestRequestSchema: z.ZodObject<{
2726
- channel: z.ZodString;
2727
- data: z.ZodRecord<z.ZodString, z.ZodAny>;
2728
- wait_for_ack: z.ZodOptional<z.ZodBoolean>;
2729
- ack_timeout: z.ZodOptional<z.ZodNumber>;
2730
- }, z.core.$strip>;
2731
- /**
2732
- * Infer TypeScript type from Zod schema
2733
- */
2734
- type PublishTestRequestRequest = z.infer<typeof PublishTestRequestRequestSchema>;
1374
+ */
1375
+ minTimeout?: number;
1376
+ /**
1377
+ * Maximum wait time between retries (ms).
1378
+ * @default 60000
1379
+ */
1380
+ maxTimeout?: number;
1381
+ /**
1382
+ * Add randomness to wait times (jitter).
1383
+ * Helps avoid thundering herd problem.
1384
+ * @default true
1385
+ */
1386
+ randomize?: boolean;
1387
+ /**
1388
+ * Callback called on each failed attempt.
1389
+ */
1390
+ onFailedAttempt?: (info: FailedAttemptInfo$1) => void;
1391
+ }
2735
1392
 
2736
1393
  /**
2737
- * Zod schema for PublishTestResponse
1394
+ * Storage adapters for cross-platform token storage.
2738
1395
  *
2739
- * This schema provides runtime validation and type inference.
2740
- * * Response model for test message publishing.
2741
- * */
2742
-
2743
- /**
2744
- * Response model for test message publishing.
2745
- */
2746
- declare const PublishTestResponseSchema: z.ZodObject<{
2747
- success: z.ZodBoolean;
2748
- message_id: z.ZodString;
2749
- channel: z.ZodString;
2750
- acks_received: z.ZodOptional<z.ZodNumber>;
2751
- delivered: z.ZodOptional<z.ZodBoolean>;
2752
- error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2753
- }, z.core.$strip>;
2754
- /**
2755
- * Infer TypeScript type from Zod schema
1396
+ * Supports:
1397
+ * - LocalStorage (browser)
1398
+ * - Cookies (SSR/browser)
1399
+ * - Memory (Node.js/Electron/testing)
2756
1400
  */
2757
- type PublishTestResponse = z.infer<typeof PublishTestResponseSchema>;
2758
1401
 
2759
1402
  /**
2760
- * Zod schema for TimelineItem
2761
- *
2762
- * This schema provides runtime validation and type inference.
2763
- * * Single timeline data point for DRF.
2764
- * */
2765
-
2766
- /**
2767
- * Single timeline data point for DRF.
2768
- */
2769
- declare const TimelineItemSchema: z.ZodObject<{
2770
- timestamp: z.ZodString;
2771
- count: z.ZodNumber;
2772
- successful: z.ZodNumber;
2773
- failed: z.ZodNumber;
2774
- timeout: z.ZodNumber;
2775
- }, z.core.$strip>;
2776
- /**
2777
- * Infer TypeScript type from Zod schema
1403
+ * Storage adapter interface for cross-platform token storage.
2778
1404
  */
2779
- type TimelineItem = z.infer<typeof TimelineItemSchema>;
1405
+ interface StorageAdapter$1 {
1406
+ getItem(key: string): string | null;
1407
+ setItem(key: string, value: string): void;
1408
+ removeItem(key: string): void;
1409
+ }
2780
1410
 
2781
1411
  /**
2782
- * Zod schema for TimelineResponse
1412
+ * Zod schema for ConnectionTokenResponse
2783
1413
  *
2784
1414
  * This schema provides runtime validation and type inference.
2785
- * * Timeline response with hourly/daily breakdown for DRF.
1415
+ * * Response model for Centrifugo connection token.
2786
1416
  * */
2787
1417
 
2788
1418
  /**
2789
- * Timeline response with hourly/daily breakdown for DRF.
1419
+ * Response model for Centrifugo connection token.
2790
1420
  */
2791
- declare const TimelineResponseSchema: z.ZodObject<{
2792
- timeline: z.ZodArray<z.ZodObject<{
2793
- timestamp: z.ZodString;
2794
- count: z.ZodNumber;
2795
- successful: z.ZodNumber;
2796
- failed: z.ZodNumber;
2797
- timeout: z.ZodNumber;
2798
- }, z.core.$strip>>;
2799
- period_hours: z.ZodNumber;
2800
- interval: z.ZodString;
1421
+ declare const ConnectionTokenResponseSchema: z.ZodObject<{
1422
+ token: z.ZodString;
1423
+ centrifugo_url: z.ZodString;
1424
+ expires_at: z.ZodString;
1425
+ channels: z.ZodArray<z.ZodString>;
2801
1426
  }, z.core.$strip>;
2802
1427
  /**
2803
1428
  * Infer TypeScript type from Zod schema
2804
1429
  */
2805
- type TimelineResponse = z.infer<typeof TimelineResponseSchema>;
1430
+ type ConnectionTokenResponse = z.infer<typeof ConnectionTokenResponseSchema>;
2806
1431
 
2807
1432
  /**
2808
1433
  * Zod Schemas - Runtime validation and type inference
@@ -2822,123 +1447,12 @@ type TimelineResponse = z.infer<typeof TimelineResponseSchema>;
2822
1447
  * ```
2823
1448
  */
2824
1449
 
2825
- type index$5_CentrifugoChannelInfo = CentrifugoChannelInfo;
2826
- declare const index$5_CentrifugoChannelInfoSchema: typeof CentrifugoChannelInfoSchema;
2827
- type index$5_CentrifugoChannelsRequestRequest = CentrifugoChannelsRequestRequest;
2828
- declare const index$5_CentrifugoChannelsRequestRequestSchema: typeof CentrifugoChannelsRequestRequestSchema;
2829
- type index$5_CentrifugoChannelsResponse = CentrifugoChannelsResponse;
2830
- declare const index$5_CentrifugoChannelsResponseSchema: typeof CentrifugoChannelsResponseSchema;
2831
- type index$5_CentrifugoChannelsResult = CentrifugoChannelsResult;
2832
- declare const index$5_CentrifugoChannelsResultSchema: typeof CentrifugoChannelsResultSchema;
2833
- type index$5_CentrifugoClientInfo = CentrifugoClientInfo;
2834
- declare const index$5_CentrifugoClientInfoSchema: typeof CentrifugoClientInfoSchema;
2835
- type index$5_CentrifugoError = CentrifugoError;
2836
- declare const index$5_CentrifugoErrorSchema: typeof CentrifugoErrorSchema;
2837
- type index$5_CentrifugoHealthCheck = CentrifugoHealthCheck;
2838
- declare const index$5_CentrifugoHealthCheckSchema: typeof CentrifugoHealthCheckSchema;
2839
- type index$5_CentrifugoHistoryRequestRequest = CentrifugoHistoryRequestRequest;
2840
- declare const index$5_CentrifugoHistoryRequestRequestSchema: typeof CentrifugoHistoryRequestRequestSchema;
2841
- type index$5_CentrifugoHistoryResponse = CentrifugoHistoryResponse;
2842
- declare const index$5_CentrifugoHistoryResponseSchema: typeof CentrifugoHistoryResponseSchema;
2843
- type index$5_CentrifugoHistoryResult = CentrifugoHistoryResult;
2844
- declare const index$5_CentrifugoHistoryResultSchema: typeof CentrifugoHistoryResultSchema;
2845
- type index$5_CentrifugoInfoResponse = CentrifugoInfoResponse;
2846
- declare const index$5_CentrifugoInfoResponseSchema: typeof CentrifugoInfoResponseSchema;
2847
- type index$5_CentrifugoInfoResult = CentrifugoInfoResult;
2848
- declare const index$5_CentrifugoInfoResultSchema: typeof CentrifugoInfoResultSchema;
2849
- type index$5_CentrifugoMetrics = CentrifugoMetrics;
2850
- declare const index$5_CentrifugoMetricsSchema: typeof CentrifugoMetricsSchema;
2851
- type index$5_CentrifugoNodeInfo = CentrifugoNodeInfo;
2852
- declare const index$5_CentrifugoNodeInfoSchema: typeof CentrifugoNodeInfoSchema;
2853
- type index$5_CentrifugoOverviewStats = CentrifugoOverviewStats;
2854
- declare const index$5_CentrifugoOverviewStatsSchema: typeof CentrifugoOverviewStatsSchema;
2855
- type index$5_CentrifugoPresenceRequestRequest = CentrifugoPresenceRequestRequest;
2856
- declare const index$5_CentrifugoPresenceRequestRequestSchema: typeof CentrifugoPresenceRequestRequestSchema;
2857
- type index$5_CentrifugoPresenceResponse = CentrifugoPresenceResponse;
2858
- declare const index$5_CentrifugoPresenceResponseSchema: typeof CentrifugoPresenceResponseSchema;
2859
- type index$5_CentrifugoPresenceResult = CentrifugoPresenceResult;
2860
- declare const index$5_CentrifugoPresenceResultSchema: typeof CentrifugoPresenceResultSchema;
2861
- type index$5_CentrifugoPresenceStatsRequestRequest = CentrifugoPresenceStatsRequestRequest;
2862
- declare const index$5_CentrifugoPresenceStatsRequestRequestSchema: typeof CentrifugoPresenceStatsRequestRequestSchema;
2863
- type index$5_CentrifugoPresenceStatsResponse = CentrifugoPresenceStatsResponse;
2864
- declare const index$5_CentrifugoPresenceStatsResponseSchema: typeof CentrifugoPresenceStatsResponseSchema;
2865
- type index$5_CentrifugoPresenceStatsResult = CentrifugoPresenceStatsResult;
2866
- declare const index$5_CentrifugoPresenceStatsResultSchema: typeof CentrifugoPresenceStatsResultSchema;
2867
- type index$5_CentrifugoProcess = CentrifugoProcess;
2868
- declare const index$5_CentrifugoProcessSchema: typeof CentrifugoProcessSchema;
2869
- type index$5_CentrifugoPublication = CentrifugoPublication;
2870
- declare const index$5_CentrifugoPublicationSchema: typeof CentrifugoPublicationSchema;
2871
- type index$5_CentrifugoStreamPosition = CentrifugoStreamPosition;
2872
- declare const index$5_CentrifugoStreamPositionSchema: typeof CentrifugoStreamPositionSchema;
2873
- type index$5_ChannelList = ChannelList;
2874
- declare const index$5_ChannelListSchema: typeof ChannelListSchema;
2875
- type index$5_ChannelStats = ChannelStats;
2876
- declare const index$5_ChannelStatsSchema: typeof ChannelStatsSchema;
2877
1450
  type index$5_ConnectionTokenResponse = ConnectionTokenResponse;
2878
1451
  declare const index$5_ConnectionTokenResponseSchema: typeof ConnectionTokenResponseSchema;
2879
- type index$5_ManualAckRequestRequest = ManualAckRequestRequest;
2880
- declare const index$5_ManualAckRequestRequestSchema: typeof ManualAckRequestRequestSchema;
2881
- type index$5_ManualAckResponse = ManualAckResponse;
2882
- declare const index$5_ManualAckResponseSchema: typeof ManualAckResponseSchema;
2883
- type index$5_PaginatedPublishList = PaginatedPublishList;
2884
- declare const index$5_PaginatedPublishListSchema: typeof PaginatedPublishListSchema;
2885
- type index$5_Publish = Publish;
2886
- declare const index$5_PublishSchema: typeof PublishSchema;
2887
- type index$5_PublishTestRequestRequest = PublishTestRequestRequest;
2888
- declare const index$5_PublishTestRequestRequestSchema: typeof PublishTestRequestRequestSchema;
2889
- type index$5_PublishTestResponse = PublishTestResponse;
2890
- declare const index$5_PublishTestResponseSchema: typeof PublishTestResponseSchema;
2891
- type index$5_TimelineItem = TimelineItem;
2892
- declare const index$5_TimelineItemSchema: typeof TimelineItemSchema;
2893
- type index$5_TimelineResponse = TimelineResponse;
2894
- declare const index$5_TimelineResponseSchema: typeof TimelineResponseSchema;
2895
1452
  declare namespace index$5 {
2896
- export { type index$5_CentrifugoChannelInfo as CentrifugoChannelInfo, index$5_CentrifugoChannelInfoSchema as CentrifugoChannelInfoSchema, type index$5_CentrifugoChannelsRequestRequest as CentrifugoChannelsRequestRequest, index$5_CentrifugoChannelsRequestRequestSchema as CentrifugoChannelsRequestRequestSchema, type index$5_CentrifugoChannelsResponse as CentrifugoChannelsResponse, index$5_CentrifugoChannelsResponseSchema as CentrifugoChannelsResponseSchema, type index$5_CentrifugoChannelsResult as CentrifugoChannelsResult, index$5_CentrifugoChannelsResultSchema as CentrifugoChannelsResultSchema, type index$5_CentrifugoClientInfo as CentrifugoClientInfo, index$5_CentrifugoClientInfoSchema as CentrifugoClientInfoSchema, type index$5_CentrifugoError as CentrifugoError, index$5_CentrifugoErrorSchema as CentrifugoErrorSchema, type index$5_CentrifugoHealthCheck as CentrifugoHealthCheck, index$5_CentrifugoHealthCheckSchema as CentrifugoHealthCheckSchema, type index$5_CentrifugoHistoryRequestRequest as CentrifugoHistoryRequestRequest, index$5_CentrifugoHistoryRequestRequestSchema as CentrifugoHistoryRequestRequestSchema, type index$5_CentrifugoHistoryResponse as CentrifugoHistoryResponse, index$5_CentrifugoHistoryResponseSchema as CentrifugoHistoryResponseSchema, type index$5_CentrifugoHistoryResult as CentrifugoHistoryResult, index$5_CentrifugoHistoryResultSchema as CentrifugoHistoryResultSchema, type index$5_CentrifugoInfoResponse as CentrifugoInfoResponse, index$5_CentrifugoInfoResponseSchema as CentrifugoInfoResponseSchema, type index$5_CentrifugoInfoResult as CentrifugoInfoResult, index$5_CentrifugoInfoResultSchema as CentrifugoInfoResultSchema, type index$5_CentrifugoMetrics as CentrifugoMetrics, index$5_CentrifugoMetricsSchema as CentrifugoMetricsSchema, type index$5_CentrifugoNodeInfo as CentrifugoNodeInfo, index$5_CentrifugoNodeInfoSchema as CentrifugoNodeInfoSchema, type index$5_CentrifugoOverviewStats as CentrifugoOverviewStats, index$5_CentrifugoOverviewStatsSchema as CentrifugoOverviewStatsSchema, type index$5_CentrifugoPresenceRequestRequest as CentrifugoPresenceRequestRequest, index$5_CentrifugoPresenceRequestRequestSchema as CentrifugoPresenceRequestRequestSchema, type index$5_CentrifugoPresenceResponse as CentrifugoPresenceResponse, index$5_CentrifugoPresenceResponseSchema as CentrifugoPresenceResponseSchema, type index$5_CentrifugoPresenceResult as CentrifugoPresenceResult, index$5_CentrifugoPresenceResultSchema as CentrifugoPresenceResultSchema, type index$5_CentrifugoPresenceStatsRequestRequest as CentrifugoPresenceStatsRequestRequest, index$5_CentrifugoPresenceStatsRequestRequestSchema as CentrifugoPresenceStatsRequestRequestSchema, type index$5_CentrifugoPresenceStatsResponse as CentrifugoPresenceStatsResponse, index$5_CentrifugoPresenceStatsResponseSchema as CentrifugoPresenceStatsResponseSchema, type index$5_CentrifugoPresenceStatsResult as CentrifugoPresenceStatsResult, index$5_CentrifugoPresenceStatsResultSchema as CentrifugoPresenceStatsResultSchema, type index$5_CentrifugoProcess as CentrifugoProcess, index$5_CentrifugoProcessSchema as CentrifugoProcessSchema, type index$5_CentrifugoPublication as CentrifugoPublication, index$5_CentrifugoPublicationSchema as CentrifugoPublicationSchema, type index$5_CentrifugoStreamPosition as CentrifugoStreamPosition, index$5_CentrifugoStreamPositionSchema as CentrifugoStreamPositionSchema, type index$5_ChannelList as ChannelList, index$5_ChannelListSchema as ChannelListSchema, type index$5_ChannelStats as ChannelStats, index$5_ChannelStatsSchema as ChannelStatsSchema, type index$5_ConnectionTokenResponse as ConnectionTokenResponse, index$5_ConnectionTokenResponseSchema as ConnectionTokenResponseSchema, type index$5_ManualAckRequestRequest as ManualAckRequestRequest, index$5_ManualAckRequestRequestSchema as ManualAckRequestRequestSchema, type index$5_ManualAckResponse as ManualAckResponse, index$5_ManualAckResponseSchema as ManualAckResponseSchema, type index$5_PaginatedPublishList as PaginatedPublishList, index$5_PaginatedPublishListSchema as PaginatedPublishListSchema, type index$5_Publish as Publish, index$5_PublishSchema as PublishSchema, type index$5_PublishTestRequestRequest as PublishTestRequestRequest, index$5_PublishTestRequestRequestSchema as PublishTestRequestRequestSchema, type index$5_PublishTestResponse as PublishTestResponse, index$5_PublishTestResponseSchema as PublishTestResponseSchema, type index$5_TimelineItem as TimelineItem, index$5_TimelineItemSchema as TimelineItemSchema, type index$5_TimelineResponse as TimelineResponse, index$5_TimelineResponseSchema as TimelineResponseSchema };
1453
+ export { type index$5_ConnectionTokenResponse as ConnectionTokenResponse, index$5_ConnectionTokenResponseSchema as ConnectionTokenResponseSchema };
2897
1454
  }
2898
1455
 
2899
- /**
2900
- * Get connection token for dashboard
2901
- *
2902
- * @method POST
2903
- * @path /cfg/centrifugo/server/auth/token/
2904
- */
2905
- declare function createCentrifugoServerAuthTokenCreate(client?: any): Promise<any>;
2906
- /**
2907
- * List active channels
2908
- *
2909
- * @method POST
2910
- * @path /cfg/centrifugo/server/channels/
2911
- */
2912
- declare function createCentrifugoServerChannelsCreate(data: CentrifugoChannelsRequestRequest, client?: any): Promise<CentrifugoChannelsResponse>;
2913
- /**
2914
- * Get channel history
2915
- *
2916
- * @method POST
2917
- * @path /cfg/centrifugo/server/history/
2918
- */
2919
- declare function createCentrifugoServerHistoryCreate(data: CentrifugoHistoryRequestRequest, client?: any): Promise<CentrifugoHistoryResponse>;
2920
- /**
2921
- * Get Centrifugo server info
2922
- *
2923
- * @method POST
2924
- * @path /cfg/centrifugo/server/info/
2925
- */
2926
- declare function createCentrifugoServerInfoCreate(client?: any): Promise<CentrifugoInfoResponse>;
2927
- /**
2928
- * Get channel presence
2929
- *
2930
- * @method POST
2931
- * @path /cfg/centrifugo/server/presence/
2932
- */
2933
- declare function createCentrifugoServerPresenceCreate(data: CentrifugoPresenceRequestRequest, client?: any): Promise<CentrifugoPresenceResponse>;
2934
- /**
2935
- * Get channel presence statistics
2936
- *
2937
- * @method POST
2938
- * @path /cfg/centrifugo/server/presence-stats/
2939
- */
2940
- declare function createCentrifugoServerPresenceStatsCreate(data: CentrifugoPresenceStatsRequestRequest, client?: any): Promise<CentrifugoPresenceStatsResponse>;
2941
-
2942
1456
  /**
2943
1457
  * Get Centrifugo connection token
2944
1458
  *
@@ -2947,78 +1461,6 @@ declare function createCentrifugoServerPresenceStatsCreate(data: CentrifugoPrese
2947
1461
  */
2948
1462
  declare function getCentrifugoAuthTokenRetrieve(client?: any): Promise<ConnectionTokenResponse>;
2949
1463
 
2950
- /**
2951
- * Get channel statistics
2952
- *
2953
- * @method GET
2954
- * @path /cfg/centrifugo/monitor/channels/
2955
- */
2956
- declare function getCentrifugoMonitorChannelsRetrieve(params?: {
2957
- hours?: number;
2958
- }, client?: any): Promise<ChannelList>;
2959
- /**
2960
- * Get Centrifugo health status
2961
- *
2962
- * @method GET
2963
- * @path /cfg/centrifugo/monitor/health/
2964
- */
2965
- declare function getCentrifugoMonitorHealthRetrieve(client?: any): Promise<CentrifugoHealthCheck>;
2966
- /**
2967
- * Get overview statistics
2968
- *
2969
- * @method GET
2970
- * @path /cfg/centrifugo/monitor/overview/
2971
- */
2972
- declare function getCentrifugoMonitorOverviewRetrieve(params?: {
2973
- hours?: number;
2974
- }, client?: any): Promise<CentrifugoOverviewStats>;
2975
- /**
2976
- * Get recent publishes
2977
- *
2978
- * @method GET
2979
- * @path /cfg/centrifugo/monitor/publishes/
2980
- */
2981
- declare function getCentrifugoMonitorPublishesList(params?: {
2982
- channel?: string;
2983
- ordering?: string;
2984
- page?: number;
2985
- page_size?: number;
2986
- search?: string;
2987
- status?: string;
2988
- }, client?: any): Promise<PaginatedPublishList>;
2989
- /**
2990
- * Get publish timeline
2991
- *
2992
- * @method GET
2993
- * @path /cfg/centrifugo/monitor/timeline/
2994
- */
2995
- declare function getCentrifugoMonitorTimelineRetrieve(params?: {
2996
- hours?: number;
2997
- interval?: string;
2998
- }, client?: any): Promise<TimelineResponse>;
2999
-
3000
- /**
3001
- * Publish test message
3002
- *
3003
- * @method POST
3004
- * @path /cfg/centrifugo/testing/publish-test/
3005
- */
3006
- declare function createCentrifugoTestingPublishTestCreate(data: PublishTestRequestRequest, client?: any): Promise<PublishTestResponse>;
3007
- /**
3008
- * Publish with database logging
3009
- *
3010
- * @method POST
3011
- * @path /cfg/centrifugo/testing/publish-with-logging/
3012
- */
3013
- declare function createCentrifugoTestingPublishWithLoggingCreate(data: PublishTestRequestRequest, client?: any): Promise<PublishTestResponse>;
3014
- /**
3015
- * Send manual ACK
3016
- *
3017
- * @method POST
3018
- * @path /cfg/centrifugo/testing/send-ack/
3019
- */
3020
- declare function createCentrifugoTestingSendAckCreate(data: ManualAckRequestRequest, client?: any): Promise<ManualAckResponse>;
3021
-
3022
1464
  /**
3023
1465
  * Typed Fetchers - Universal API functions
3024
1466
  *
@@ -3046,23 +1488,9 @@ declare function createCentrifugoTestingSendAckCreate(data: ManualAckRequestRequ
3046
1488
  * ```
3047
1489
  */
3048
1490
 
3049
- declare const index$4_createCentrifugoServerAuthTokenCreate: typeof createCentrifugoServerAuthTokenCreate;
3050
- declare const index$4_createCentrifugoServerChannelsCreate: typeof createCentrifugoServerChannelsCreate;
3051
- declare const index$4_createCentrifugoServerHistoryCreate: typeof createCentrifugoServerHistoryCreate;
3052
- declare const index$4_createCentrifugoServerInfoCreate: typeof createCentrifugoServerInfoCreate;
3053
- declare const index$4_createCentrifugoServerPresenceCreate: typeof createCentrifugoServerPresenceCreate;
3054
- declare const index$4_createCentrifugoServerPresenceStatsCreate: typeof createCentrifugoServerPresenceStatsCreate;
3055
- declare const index$4_createCentrifugoTestingPublishTestCreate: typeof createCentrifugoTestingPublishTestCreate;
3056
- declare const index$4_createCentrifugoTestingPublishWithLoggingCreate: typeof createCentrifugoTestingPublishWithLoggingCreate;
3057
- declare const index$4_createCentrifugoTestingSendAckCreate: typeof createCentrifugoTestingSendAckCreate;
3058
1491
  declare const index$4_getCentrifugoAuthTokenRetrieve: typeof getCentrifugoAuthTokenRetrieve;
3059
- declare const index$4_getCentrifugoMonitorChannelsRetrieve: typeof getCentrifugoMonitorChannelsRetrieve;
3060
- declare const index$4_getCentrifugoMonitorHealthRetrieve: typeof getCentrifugoMonitorHealthRetrieve;
3061
- declare const index$4_getCentrifugoMonitorOverviewRetrieve: typeof getCentrifugoMonitorOverviewRetrieve;
3062
- declare const index$4_getCentrifugoMonitorPublishesList: typeof getCentrifugoMonitorPublishesList;
3063
- declare const index$4_getCentrifugoMonitorTimelineRetrieve: typeof getCentrifugoMonitorTimelineRetrieve;
3064
1492
  declare namespace index$4 {
3065
- export { index$4_createCentrifugoServerAuthTokenCreate as createCentrifugoServerAuthTokenCreate, index$4_createCentrifugoServerChannelsCreate as createCentrifugoServerChannelsCreate, index$4_createCentrifugoServerHistoryCreate as createCentrifugoServerHistoryCreate, index$4_createCentrifugoServerInfoCreate as createCentrifugoServerInfoCreate, index$4_createCentrifugoServerPresenceCreate as createCentrifugoServerPresenceCreate, index$4_createCentrifugoServerPresenceStatsCreate as createCentrifugoServerPresenceStatsCreate, index$4_createCentrifugoTestingPublishTestCreate as createCentrifugoTestingPublishTestCreate, index$4_createCentrifugoTestingPublishWithLoggingCreate as createCentrifugoTestingPublishWithLoggingCreate, index$4_createCentrifugoTestingSendAckCreate as createCentrifugoTestingSendAckCreate, index$4_getCentrifugoAuthTokenRetrieve as getCentrifugoAuthTokenRetrieve, index$4_getCentrifugoMonitorChannelsRetrieve as getCentrifugoMonitorChannelsRetrieve, index$4_getCentrifugoMonitorHealthRetrieve as getCentrifugoMonitorHealthRetrieve, index$4_getCentrifugoMonitorOverviewRetrieve as getCentrifugoMonitorOverviewRetrieve, index$4_getCentrifugoMonitorPublishesList as getCentrifugoMonitorPublishesList, index$4_getCentrifugoMonitorTimelineRetrieve as getCentrifugoMonitorTimelineRetrieve };
1493
+ export { index$4_getCentrifugoAuthTokenRetrieve as getCentrifugoAuthTokenRetrieve };
3066
1494
  }
3067
1495
 
3068
1496
  /**
@@ -3119,10 +1547,7 @@ declare class API$1 {
3119
1547
  private _locale;
3120
1548
  private storage;
3121
1549
  private options?;
3122
- centrifugo_admin_api: CentrifugoAdminApi;
3123
1550
  centrifugo_auth: CentrifugoAuth;
3124
- centrifugo_monitoring: CentrifugoMonitoring;
3125
- centrifugo_testing: CentrifugoTesting;
3126
1551
  constructor(baseUrl: string, options?: APIOptions$1);
3127
1552
  private _loadTokensFromStorage;
3128
1553
  private _reinitClients;
@@ -3244,6 +1669,15 @@ declare enum DeviceListStatus {
3244
1669
  DISABLED = "disabled"
3245
1670
  }
3246
1671
 
1672
+ /**
1673
+ * Serializer for completely disabling 2FA.
1674
+ *
1675
+ * Request model (no read-only fields).
1676
+ */
1677
+ interface DisableRequest$1 {
1678
+ /** TOTP code for verification */
1679
+ code: string;
1680
+ }
3247
1681
  /**
3248
1682
  *
3249
1683
  * Response model (includes read-only fields).
@@ -3268,15 +1702,6 @@ interface PaginatedDeviceListResponseList$1 {
3268
1702
  /** Array of items for current page */
3269
1703
  results: Array<DeviceListResponse$1>;
3270
1704
  }
3271
- /**
3272
- * Serializer for completely disabling 2FA.
3273
- *
3274
- * Request model (no read-only fields).
3275
- */
3276
- interface DisableRequest$1 {
3277
- /** TOTP code for verification */
3278
- code: string;
3279
- }
3280
1705
  /**
3281
1706
  * Response serializer for device list endpoint.
3282
1707
  *
@@ -3327,17 +1752,6 @@ declare class TotpManagement {
3327
1752
  totpDisableCreate(data: DisableRequest$1): Promise<any>;
3328
1753
  }
3329
1754
 
3330
- /**
3331
- * Serializer for confirming 2FA setup with first code.
3332
- *
3333
- * Request model (no read-only fields).
3334
- */
3335
- interface ConfirmSetupRequest$1 {
3336
- /** Device ID from setup response */
3337
- device_id: string;
3338
- /** 6-digit TOTP code from authenticator app */
3339
- code: string;
3340
- }
3341
1755
  /**
3342
1756
  * Response serializer for setup initiation.
3343
1757
  *
@@ -3355,6 +1769,17 @@ interface SetupResponse$1 {
3355
1769
  /** Seconds until setup expires (typically 600 = 10 minutes) */
3356
1770
  expires_in: number;
3357
1771
  }
1772
+ /**
1773
+ * Serializer for confirming 2FA setup with first code.
1774
+ *
1775
+ * Request model (no read-only fields).
1776
+ */
1777
+ interface ConfirmSetupRequest$1 {
1778
+ /** Device ID from setup response */
1779
+ device_id: string;
1780
+ /** 6-digit TOTP code from authenticator app */
1781
+ code: string;
1782
+ }
3358
1783
  /**
3359
1784
  * Serializer for starting 2FA setup.
3360
1785
  *
@@ -3396,26 +1821,26 @@ declare class TotpSetup {
3396
1821
  }
3397
1822
 
3398
1823
  /**
3399
- * Serializer for TOTP code verification during login.
1824
+ * Serializer for backup code verification during login.
3400
1825
  *
3401
1826
  * Request model (no read-only fields).
3402
1827
  */
3403
- interface VerifyRequest$1 {
1828
+ interface VerifyBackupRequest$1 {
3404
1829
  /** 2FA session ID from login response */
3405
1830
  session_id: string;
3406
- /** 6-digit TOTP code from authenticator app */
3407
- code: string;
1831
+ /** 8-character backup recovery code */
1832
+ backup_code: string;
3408
1833
  }
3409
1834
  /**
3410
- * Serializer for backup code verification during login.
1835
+ * Serializer for TOTP code verification during login.
3411
1836
  *
3412
1837
  * Request model (no read-only fields).
3413
1838
  */
3414
- interface VerifyBackupRequest$1 {
1839
+ interface VerifyRequest$1 {
3415
1840
  /** 2FA session ID from login response */
3416
1841
  session_id: string;
3417
- /** 8-character backup recovery code */
3418
- backup_code: string;
1842
+ /** 6-digit TOTP code from authenticator app */
1843
+ code: string;
3419
1844
  }
3420
1845
  /**
3421
1846
  * Response serializer for successful 2FA verification.
@@ -4360,49 +2785,6 @@ declare function useCreateAccountsOtpRequestCreate(): (data: OTPRequestRequest,
4360
2785
  */
4361
2786
  declare function useCreateAccountsOtpVerifyCreate(): (data: OTPVerifyRequest, client?: API$2) => Promise<OTPVerifyResponse>;
4362
2787
 
4363
- /**
4364
- * Get connection token for dashboard
4365
- *
4366
- * @method POST
4367
- * @path /cfg/centrifugo/server/auth/token/
4368
- */
4369
- declare function useCreateCentrifugoServerAuthTokenCreate(): (client?: API$1) => Promise<any>;
4370
- /**
4371
- * List active channels
4372
- *
4373
- * @method POST
4374
- * @path /cfg/centrifugo/server/channels/
4375
- */
4376
- declare function useCreateCentrifugoServerChannelsCreate(): (data: CentrifugoChannelsRequestRequest, client?: API$1) => Promise<CentrifugoChannelsResponse>;
4377
- /**
4378
- * Get channel history
4379
- *
4380
- * @method POST
4381
- * @path /cfg/centrifugo/server/history/
4382
- */
4383
- declare function useCreateCentrifugoServerHistoryCreate(): (data: CentrifugoHistoryRequestRequest, client?: API$1) => Promise<CentrifugoHistoryResponse>;
4384
- /**
4385
- * Get Centrifugo server info
4386
- *
4387
- * @method POST
4388
- * @path /cfg/centrifugo/server/info/
4389
- */
4390
- declare function useCreateCentrifugoServerInfoCreate(): (client?: API$1) => Promise<CentrifugoInfoResponse>;
4391
- /**
4392
- * Get channel presence
4393
- *
4394
- * @method POST
4395
- * @path /cfg/centrifugo/server/presence/
4396
- */
4397
- declare function useCreateCentrifugoServerPresenceCreate(): (data: CentrifugoPresenceRequestRequest, client?: API$1) => Promise<CentrifugoPresenceResponse>;
4398
- /**
4399
- * Get channel presence statistics
4400
- *
4401
- * @method POST
4402
- * @path /cfg/centrifugo/server/presence-stats/
4403
- */
4404
- declare function useCreateCentrifugoServerPresenceStatsCreate(): (data: CentrifugoPresenceStatsRequestRequest, client?: API$1) => Promise<CentrifugoPresenceStatsResponse>;
4405
-
4406
2788
  /**
4407
2789
  * SWR Hooks for Centrifugo Auth
4408
2790
  *
@@ -4428,95 +2810,6 @@ declare function useCreateCentrifugoServerPresenceStatsCreate(): (data: Centrifu
4428
2810
  */
4429
2811
  declare function useCentrifugoAuthTokenRetrieve(client?: API$1): ReturnType<typeof useSWR<ConnectionTokenResponse>>;
4430
2812
 
4431
- /**
4432
- * SWR Hooks for Centrifugo Monitoring
4433
- *
4434
- * React hooks powered by SWR for data fetching with automatic caching,
4435
- * revalidation, and optimistic updates.
4436
- *
4437
- * Usage:
4438
- * ```typescript
4439
- * // Query hooks (GET)
4440
- * const { data, error, isLoading } = useUsers({ page: 1 })
4441
- *
4442
- * // Mutation hooks (POST/PUT/PATCH/DELETE)
4443
- * const createUser = useCreateUser()
4444
- * await createUser({ name: 'John', email: 'john@example.com' })
4445
- * ```
4446
- */
4447
-
4448
- /**
4449
- * Get channel statistics
4450
- *
4451
- * @method GET
4452
- * @path /cfg/centrifugo/monitor/channels/
4453
- */
4454
- declare function useCentrifugoMonitorChannelsRetrieve(params?: {
4455
- hours?: number;
4456
- }, client?: API$1): ReturnType<typeof useSWR<ChannelList>>;
4457
- /**
4458
- * Get Centrifugo health status
4459
- *
4460
- * @method GET
4461
- * @path /cfg/centrifugo/monitor/health/
4462
- */
4463
- declare function useCentrifugoMonitorHealthRetrieve(client?: API$1): ReturnType<typeof useSWR<CentrifugoHealthCheck>>;
4464
- /**
4465
- * Get overview statistics
4466
- *
4467
- * @method GET
4468
- * @path /cfg/centrifugo/monitor/overview/
4469
- */
4470
- declare function useCentrifugoMonitorOverviewRetrieve(params?: {
4471
- hours?: number;
4472
- }, client?: API$1): ReturnType<typeof useSWR<CentrifugoOverviewStats>>;
4473
- /**
4474
- * Get recent publishes
4475
- *
4476
- * @method GET
4477
- * @path /cfg/centrifugo/monitor/publishes/
4478
- */
4479
- declare function useCentrifugoMonitorPublishesList(params?: {
4480
- channel?: string;
4481
- ordering?: string;
4482
- page?: number;
4483
- page_size?: number;
4484
- search?: string;
4485
- status?: string;
4486
- }, client?: API$1): ReturnType<typeof useSWR<PaginatedPublishList>>;
4487
- /**
4488
- * Get publish timeline
4489
- *
4490
- * @method GET
4491
- * @path /cfg/centrifugo/monitor/timeline/
4492
- */
4493
- declare function useCentrifugoMonitorTimelineRetrieve(params?: {
4494
- hours?: number;
4495
- interval?: string;
4496
- }, client?: API$1): ReturnType<typeof useSWR<TimelineResponse>>;
4497
-
4498
- /**
4499
- * Publish test message
4500
- *
4501
- * @method POST
4502
- * @path /cfg/centrifugo/testing/publish-test/
4503
- */
4504
- declare function useCreateCentrifugoTestingPublishTestCreate(): (data: PublishTestRequestRequest, client?: API$1) => Promise<PublishTestResponse>;
4505
- /**
4506
- * Publish with database logging
4507
- *
4508
- * @method POST
4509
- * @path /cfg/centrifugo/testing/publish-with-logging/
4510
- */
4511
- declare function useCreateCentrifugoTestingPublishWithLoggingCreate(): (data: PublishTestRequestRequest, client?: API$1) => Promise<PublishTestResponse>;
4512
- /**
4513
- * Send manual ACK
4514
- *
4515
- * @method POST
4516
- * @path /cfg/centrifugo/testing/send-ack/
4517
- */
4518
- declare function useCreateCentrifugoTestingSendAckCreate(): (data: ManualAckRequestRequest, client?: API$1) => Promise<ManualAckResponse>;
4519
-
4520
2813
  /**
4521
2814
  * SWR Hooks - React data fetching hooks
4522
2815
  *
@@ -4543,22 +2836,8 @@ declare function useCreateCentrifugoTestingSendAckCreate(): (data: ManualAckRequ
4543
2836
  */
4544
2837
 
4545
2838
  declare const index$1_useCentrifugoAuthTokenRetrieve: typeof useCentrifugoAuthTokenRetrieve;
4546
- declare const index$1_useCentrifugoMonitorChannelsRetrieve: typeof useCentrifugoMonitorChannelsRetrieve;
4547
- declare const index$1_useCentrifugoMonitorHealthRetrieve: typeof useCentrifugoMonitorHealthRetrieve;
4548
- declare const index$1_useCentrifugoMonitorOverviewRetrieve: typeof useCentrifugoMonitorOverviewRetrieve;
4549
- declare const index$1_useCentrifugoMonitorPublishesList: typeof useCentrifugoMonitorPublishesList;
4550
- declare const index$1_useCentrifugoMonitorTimelineRetrieve: typeof useCentrifugoMonitorTimelineRetrieve;
4551
- declare const index$1_useCreateCentrifugoServerAuthTokenCreate: typeof useCreateCentrifugoServerAuthTokenCreate;
4552
- declare const index$1_useCreateCentrifugoServerChannelsCreate: typeof useCreateCentrifugoServerChannelsCreate;
4553
- declare const index$1_useCreateCentrifugoServerHistoryCreate: typeof useCreateCentrifugoServerHistoryCreate;
4554
- declare const index$1_useCreateCentrifugoServerInfoCreate: typeof useCreateCentrifugoServerInfoCreate;
4555
- declare const index$1_useCreateCentrifugoServerPresenceCreate: typeof useCreateCentrifugoServerPresenceCreate;
4556
- declare const index$1_useCreateCentrifugoServerPresenceStatsCreate: typeof useCreateCentrifugoServerPresenceStatsCreate;
4557
- declare const index$1_useCreateCentrifugoTestingPublishTestCreate: typeof useCreateCentrifugoTestingPublishTestCreate;
4558
- declare const index$1_useCreateCentrifugoTestingPublishWithLoggingCreate: typeof useCreateCentrifugoTestingPublishWithLoggingCreate;
4559
- declare const index$1_useCreateCentrifugoTestingSendAckCreate: typeof useCreateCentrifugoTestingSendAckCreate;
4560
2839
  declare namespace index$1 {
4561
- export { index$1_useCentrifugoAuthTokenRetrieve as useCentrifugoAuthTokenRetrieve, index$1_useCentrifugoMonitorChannelsRetrieve as useCentrifugoMonitorChannelsRetrieve, index$1_useCentrifugoMonitorHealthRetrieve as useCentrifugoMonitorHealthRetrieve, index$1_useCentrifugoMonitorOverviewRetrieve as useCentrifugoMonitorOverviewRetrieve, index$1_useCentrifugoMonitorPublishesList as useCentrifugoMonitorPublishesList, index$1_useCentrifugoMonitorTimelineRetrieve as useCentrifugoMonitorTimelineRetrieve, index$1_useCreateCentrifugoServerAuthTokenCreate as useCreateCentrifugoServerAuthTokenCreate, index$1_useCreateCentrifugoServerChannelsCreate as useCreateCentrifugoServerChannelsCreate, index$1_useCreateCentrifugoServerHistoryCreate as useCreateCentrifugoServerHistoryCreate, index$1_useCreateCentrifugoServerInfoCreate as useCreateCentrifugoServerInfoCreate, index$1_useCreateCentrifugoServerPresenceCreate as useCreateCentrifugoServerPresenceCreate, index$1_useCreateCentrifugoServerPresenceStatsCreate as useCreateCentrifugoServerPresenceStatsCreate, index$1_useCreateCentrifugoTestingPublishTestCreate as useCreateCentrifugoTestingPublishTestCreate, index$1_useCreateCentrifugoTestingPublishWithLoggingCreate as useCreateCentrifugoTestingPublishWithLoggingCreate, index$1_useCreateCentrifugoTestingSendAckCreate as useCreateCentrifugoTestingSendAckCreate };
2840
+ export { index$1_useCentrifugoAuthTokenRetrieve as useCentrifugoAuthTokenRetrieve };
4562
2841
  }
4563
2842
 
4564
2843
  /**