@djangocfg/api 1.2.33 → 1.2.35

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 (87) hide show
  1. package/dist/index.cjs +3739 -3676
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +564 -295
  4. package/dist/index.d.ts +564 -295
  5. package/dist/index.mjs +3675 -3611
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/contexts/LeadsContext.tsx +11 -0
  9. package/src/cfg/contexts/NewsletterContext.tsx +19 -0
  10. package/src/cfg/contexts/SupportContext.tsx +3 -3
  11. package/src/cfg/contexts/index.ts +22 -2
  12. package/src/cfg/contexts/knowbase/DocumentsContext.tsx +4 -4
  13. package/src/cfg/contexts/knowbase/SessionsContext.tsx +2 -2
  14. package/src/cfg/contexts/payments/PaymentsContext.tsx +2 -2
  15. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +68 -3
  16. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_testing.ts +7 -7
  17. package/src/cfg/generated/_utils/fetchers/index.ts +0 -1
  18. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +18 -3
  19. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_testing.ts +5 -5
  20. package/src/cfg/generated/_utils/hooks/index.ts +0 -1
  21. package/src/cfg/generated/_utils/schemas/APIZonesSummary.schema.ts +1 -1
  22. package/src/cfg/generated/_utils/schemas/AppStatisticsData.schema.ts +2 -0
  23. package/src/cfg/generated/_utils/schemas/ArchiveItemChunk.schema.ts +1 -1
  24. package/src/cfg/generated/_utils/schemas/ArchiveItemChunkDetail.schema.ts +2 -2
  25. package/src/cfg/generated/_utils/schemas/ArchiveItemDetail.schema.ts +1 -1
  26. package/src/cfg/generated/_utils/schemas/ArchiveSearchResult.schema.ts +3 -3
  27. package/src/cfg/generated/_utils/schemas/ChannelList.schema.ts +2 -2
  28. package/src/cfg/generated/_utils/schemas/{ChannelStatsSerializer.schema.ts → ChannelStats.schema.ts} +4 -4
  29. package/src/cfg/generated/_utils/schemas/ChatMessage.schema.ts +1 -1
  30. package/src/cfg/generated/_utils/schemas/CommandCategory.schema.ts +21 -0
  31. package/src/cfg/generated/_utils/schemas/CommandExecuteRequestRequest.schema.ts +1 -1
  32. package/src/cfg/generated/_utils/schemas/CommandsSummary.schema.ts +2 -1
  33. package/src/cfg/generated/_utils/schemas/DjangoConfig.schema.ts +2 -1
  34. package/src/cfg/generated/_utils/schemas/Document.schema.ts +1 -1
  35. package/src/cfg/generated/_utils/schemas/DocumentArchiveDetail.schema.ts +2 -2
  36. package/src/cfg/generated/_utils/schemas/DocumentCreateRequest.schema.ts +1 -1
  37. package/src/cfg/generated/_utils/schemas/DocumentProcessingStatus.schema.ts +1 -1
  38. package/src/cfg/generated/_utils/schemas/DocumentRequest.schema.ts +1 -1
  39. package/src/cfg/generated/_utils/schemas/GRPCCallRequestRequest.schema.ts +2 -2
  40. package/src/cfg/generated/_utils/schemas/GRPCCallResponse.schema.ts +1 -1
  41. package/src/cfg/generated/_utils/schemas/GRPCExample.schema.ts +3 -3
  42. package/src/cfg/generated/_utils/schemas/JobDetail.schema.ts +2 -2
  43. package/src/cfg/generated/_utils/schemas/LeadSubmission.schema.ts +1 -1
  44. package/src/cfg/generated/_utils/schemas/LeadSubmissionError.schema.ts +1 -1
  45. package/src/cfg/generated/_utils/schemas/LeadSubmissionRequest.schema.ts +1 -1
  46. package/src/cfg/generated/_utils/schemas/ModelStatistics.schema.ts +23 -0
  47. package/src/cfg/generated/_utils/schemas/PaginatedGRPCTestLogList.schema.ts +24 -0
  48. package/src/cfg/generated/_utils/schemas/PatchedDocumentRequest.schema.ts +1 -1
  49. package/src/cfg/generated/_utils/schemas/PatchedLeadSubmissionRequest.schema.ts +1 -1
  50. package/src/cfg/generated/_utils/schemas/Publish.schema.ts +1 -1
  51. package/src/cfg/generated/_utils/schemas/RQConfig.schema.ts +2 -1
  52. package/src/cfg/generated/_utils/schemas/RQSchedule.schema.ts +1 -1
  53. package/src/cfg/generated/_utils/schemas/RedisQueueConfig.schema.ts +1 -1
  54. package/src/cfg/generated/_utils/schemas/RunDemoRequestRequest.schema.ts +1 -1
  55. package/src/cfg/generated/_utils/schemas/ScheduleCreateRequest.schema.ts +1 -1
  56. package/src/cfg/generated/_utils/schemas/ScheduleInfo.schema.ts +27 -0
  57. package/src/cfg/generated/_utils/schemas/ScheduledJob.schema.ts +1 -1
  58. package/src/cfg/generated/_utils/schemas/TestScenario.schema.ts +1 -1
  59. package/src/cfg/generated/_utils/schemas/TimelineItem.schema.ts +23 -0
  60. package/src/cfg/generated/_utils/schemas/TimelineResponse.schema.ts +22 -0
  61. package/src/cfg/generated/_utils/schemas/index.ts +7 -1
  62. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +1 -1
  63. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +27 -6
  64. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +45 -21
  65. package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/models.ts +1 -1
  66. package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +15 -2
  67. package/src/cfg/generated/cfg__dashboard__dashboard_config/models.ts +17 -16
  68. package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +20 -0
  69. package/src/cfg/generated/cfg__grpc__grpc_api_keys/models.ts +1 -1
  70. package/src/cfg/generated/cfg__grpc__grpc_testing/client.ts +4 -4
  71. package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +48 -23
  72. package/src/cfg/generated/cfg__knowbase/models.ts +15 -15
  73. package/src/cfg/generated/cfg__leads/models.ts +3 -3
  74. package/src/cfg/generated/cfg__leads__lead_submission/models.ts +2 -2
  75. package/src/cfg/generated/cfg__rq__rq_jobs/models.ts +5 -5
  76. package/src/cfg/generated/cfg__rq__rq_monitoring/models.ts +19 -2
  77. package/src/cfg/generated/cfg__rq__rq_queues/models.ts +1 -1
  78. package/src/cfg/generated/cfg__rq__rq_schedules/models.ts +7 -7
  79. package/src/cfg/generated/cfg__rq__rq_testing/models.ts +4 -4
  80. package/src/cfg/generated/client.ts +0 -3
  81. package/src/cfg/generated/index.ts +0 -5
  82. package/src/cfg/generated/schema.json +403 -181
  83. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +0 -99
  84. package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +0 -35
  85. package/src/cfg/generated/cfg__centrifugo/client.ts +0 -22
  86. package/src/cfg/generated/cfg__centrifugo/index.ts +0 -2
  87. package/src/cfg/generated/cfg__centrifugo/models.ts +0 -19
@@ -12,8 +12,8 @@ import { z } from 'zod'
12
12
  export const GRPCCallRequestRequestSchema = z.object({
13
13
  service: z.string().min(1),
14
14
  method: z.string().min(1),
15
- payload: z.record(z.string(), z.any()),
16
- metadata: z.record(z.string(), z.any()).optional(),
15
+ payload: z.record(z.string(), z.record(z.string(), z.any())),
16
+ metadata: z.record(z.string(), z.record(z.string(), z.any())).optional(),
17
17
  timeout_ms: z.int().optional(),
18
18
  })
19
19
 
@@ -19,7 +19,7 @@ export const GRPCCallResponseSchema = z.object({
19
19
  duration_ms: z.int(),
20
20
  response: z.string().nullable().optional(),
21
21
  error: z.string().nullable().optional(),
22
- metadata: z.record(z.string(), z.any()).optional(),
22
+ metadata: z.record(z.string(), z.record(z.string(), z.any())).optional(),
23
23
  timestamp: z.string(),
24
24
  })
25
25
 
@@ -13,9 +13,9 @@ export const GRPCExampleSchema = z.object({
13
13
  service: z.string(),
14
14
  method: z.string(),
15
15
  description: z.string(),
16
- payload_example: z.record(z.string(), z.any()),
17
- expected_response: z.record(z.string(), z.any()),
18
- metadata_example: z.record(z.string(), z.any()).optional(),
16
+ payload_example: z.record(z.string(), z.record(z.string(), z.any())),
17
+ expected_response: z.record(z.string(), z.record(z.string(), z.any())),
18
+ metadata_example: z.record(z.string(), z.record(z.string(), z.any())).optional(),
19
19
  })
20
20
 
21
21
  /**
@@ -16,7 +16,7 @@ Provides comprehensive job details including result and metadata.
16
16
  export const JobDetailSchema = z.object({
17
17
  id: z.string(),
18
18
  func_name: z.string(),
19
- args: z.array(z.string()).optional(),
19
+ args: z.array(z.record(z.string(), z.any())).optional(),
20
20
  kwargs: z.record(z.string(), z.any()).optional(),
21
21
  created_at: z.iso.datetime(),
22
22
  enqueued_at: z.iso.datetime().nullable().optional(),
@@ -28,7 +28,7 @@ export const JobDetailSchema = z.object({
28
28
  timeout: z.int().nullable().optional(),
29
29
  result_ttl: z.int().nullable().optional(),
30
30
  failure_ttl: z.int().nullable().optional(),
31
- result: z.string().nullable().optional(),
31
+ result: z.record(z.string(), z.any()).nullable().optional(),
32
32
  exc_info: z.string().nullable().optional(),
33
33
  meta: z.record(z.string(), z.any()).optional(),
34
34
  dependency_ids: z.array(z.string()).optional(),
@@ -19,7 +19,7 @@ export const LeadSubmissionSchema = z.object({
19
19
  contact_value: z.string().max(200).nullable().optional(),
20
20
  subject: z.string().max(200).nullable().optional(),
21
21
  message: z.string(),
22
- extra: z.string().nullable().optional(),
22
+ extra: z.record(z.string(), z.any()).nullable().optional(),
23
23
  site_url: z.url(),
24
24
  })
25
25
 
@@ -12,7 +12,7 @@ import { z } from 'zod'
12
12
  export const LeadSubmissionErrorSchema = z.object({
13
13
  success: z.boolean(),
14
14
  error: z.string(),
15
- details: z.record(z.string(), z.any()).optional(),
15
+ details: z.record(z.string(), z.record(z.string(), z.any())).optional(),
16
16
  })
17
17
 
18
18
  /**
@@ -19,7 +19,7 @@ export const LeadSubmissionRequestSchema = z.object({
19
19
  contact_value: z.string().max(200).nullable().optional(),
20
20
  subject: z.string().max(200).nullable().optional(),
21
21
  message: z.string().min(1),
22
- extra: z.string().nullable().optional(),
22
+ extra: z.record(z.string(), z.any()).nullable().optional(),
23
23
  site_url: z.url(),
24
24
  })
25
25
 
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Zod schema for ModelStatistics
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Serializer for individual model statistics.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Serializer for individual model statistics.
11
+ */
12
+ export const ModelStatisticsSchema = z.object({
13
+ model_name: z.string(),
14
+ name: z.string(),
15
+ count: z.int(),
16
+ fields_count: z.int(),
17
+ admin_url: z.string(),
18
+ })
19
+
20
+ /**
21
+ * Infer TypeScript type from Zod schema
22
+ */
23
+ export type ModelStatistics = z.infer<typeof ModelStatisticsSchema>
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Zod schema for PaginatedGRPCTestLogList
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * */
6
+ import { z } from 'zod'
7
+ import { GRPCTestLogSchema } from './GRPCTestLog.schema'
8
+
9
+ export const PaginatedGRPCTestLogListSchema = z.object({
10
+ count: z.int(),
11
+ page: z.int(),
12
+ pages: z.int(),
13
+ page_size: z.int(),
14
+ has_next: z.boolean(),
15
+ has_previous: z.boolean(),
16
+ next_page: z.int().nullable().optional(),
17
+ previous_page: z.int().nullable().optional(),
18
+ results: z.array(GRPCTestLogSchema),
19
+ })
20
+
21
+ /**
22
+ * Infer TypeScript type from Zod schema
23
+ */
24
+ export type PaginatedGRPCTestLogList = z.infer<typeof PaginatedGRPCTestLogListSchema>
@@ -13,7 +13,7 @@ export const PatchedDocumentRequestSchema = z.object({
13
13
  title: z.string().min(1).max(512).optional(),
14
14
  file_type: z.string().min(1).max(100).optional(),
15
15
  file_size: z.int().min(0.0).max(2147483647.0).optional(),
16
- metadata: z.string().nullable().optional(),
16
+ metadata: z.record(z.string(), z.any()).nullable().optional(),
17
17
  })
18
18
 
19
19
  /**
@@ -19,7 +19,7 @@ export const PatchedLeadSubmissionRequestSchema = z.object({
19
19
  contact_value: z.string().max(200).nullable().optional(),
20
20
  subject: z.string().max(200).nullable().optional(),
21
21
  message: z.string().min(1).optional(),
22
- extra: z.string().nullable().optional(),
22
+ extra: z.record(z.string(), z.any()).nullable().optional(),
23
23
  site_url: z.url().optional(),
24
24
  })
25
25
 
@@ -15,7 +15,7 @@ export const PublishSchema = z.object({
15
15
  status: z.string(),
16
16
  wait_for_ack: z.boolean(),
17
17
  acks_received: z.int(),
18
- acks_expected: z.int(),
18
+ acks_expected: z.int().nullable(),
19
19
  duration_ms: z.number().nullable(),
20
20
  created_at: z.iso.datetime(),
21
21
  completed_at: z.iso.datetime().nullable(),
@@ -7,6 +7,7 @@
7
7
  Returns current RQ configuration from django-cfg.
8
8
  * */
9
9
  import { z } from 'zod'
10
+ import { ScheduleInfoSchema } from './ScheduleInfo.schema'
10
11
 
11
12
  /**
12
13
  * RQ configuration serializer.
@@ -20,7 +21,7 @@ export const RQConfigSchema = z.object({
20
21
  show_admin_link: z.boolean().optional(),
21
22
  prometheus_enabled: z.boolean().optional(),
22
23
  api_token_configured: z.boolean().optional(),
23
- schedules: z.array(z.string()).optional(),
24
+ schedules: z.array(ScheduleInfoSchema).optional(),
24
25
  })
25
26
 
26
27
  /**
@@ -14,7 +14,7 @@ export const RQScheduleSchema = z.object({
14
14
  cron_string: z.string().nullable().optional(),
15
15
  queue: z.string().nullable().optional(),
16
16
  kwargs: z.record(z.string(), z.any()).nullable().optional(),
17
- args: z.array(z.string()).nullable().optional(),
17
+ args: z.array(z.record(z.string(), z.any())).nullable().optional(),
18
18
  meta: z.record(z.string(), z.any()).nullable().optional(),
19
19
  repeat: z.int().nullable().optional(),
20
20
  result_ttl: z.int().nullable().optional(),
@@ -18,7 +18,7 @@ export const RedisQueueConfigSchema = z.object({
18
18
  password: z.string().nullable().optional(),
19
19
  default_timeout: z.int().nullable().optional(),
20
20
  default_result_ttl: z.int().nullable().optional(),
21
- sentinels: z.array(z.string()).nullable().optional(),
21
+ sentinels: z.record(z.string(), z.any()).nullable().optional(),
22
22
  master_name: z.string().nullable().optional(),
23
23
  socket_timeout: z.int().nullable().optional(),
24
24
  })
@@ -13,7 +13,7 @@ import * as Enums from '../../enums'
13
13
  export const RunDemoRequestRequestSchema = z.object({
14
14
  scenario: z.nativeEnum(Enums.RunDemoRequestRequestScenario),
15
15
  queue: z.string().min(1).optional(),
16
- args: z.array(z.string()).optional(),
16
+ args: z.array(z.record(z.string(), z.any())).optional(),
17
17
  kwargs: z.record(z.string(), z.any()).optional(),
18
18
  timeout: z.int().nullable().optional(),
19
19
  })
@@ -21,7 +21,7 @@ Supports three scheduling methods:
21
21
  */
22
22
  export const ScheduleCreateRequestSchema = z.object({
23
23
  func: z.string().min(1),
24
- args: z.array(z.string()).optional(),
24
+ args: z.array(z.record(z.string(), z.any())).optional(),
25
25
  kwargs: z.record(z.string(), z.any()).optional(),
26
26
  queue_name: z.string().min(1).optional(),
27
27
  scheduled_time: z.iso.datetime().nullable().optional(),
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Zod schema for ScheduleInfo
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Schedule information in config response.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Schedule information in config response.
11
+ */
12
+ export const ScheduleInfoSchema = z.object({
13
+ func: z.string(),
14
+ queue: z.string(),
15
+ cron: z.string().nullable().optional(),
16
+ interval: z.int().nullable().optional(),
17
+ scheduled_time: z.iso.datetime().nullable().optional(),
18
+ description: z.string().nullable().optional(),
19
+ timeout: z.int().nullable().optional(),
20
+ result_ttl: z.int().nullable().optional(),
21
+ repeat: z.int().nullable().optional(),
22
+ })
23
+
24
+ /**
25
+ * Infer TypeScript type from Zod schema
26
+ */
27
+ export type ScheduleInfo = z.infer<typeof ScheduleInfoSchema>
@@ -12,7 +12,7 @@ import { z } from 'zod'
12
12
  export const ScheduledJobSchema = z.object({
13
13
  id: z.string(),
14
14
  func: z.string(),
15
- args: z.array(z.string()).optional(),
15
+ args: z.array(z.record(z.string(), z.any())).optional(),
16
16
  kwargs: z.record(z.string(), z.any()).optional(),
17
17
  queue_name: z.string(),
18
18
  scheduled_time: z.iso.datetime().nullable().optional(),
@@ -14,7 +14,7 @@ export const TestScenarioSchema = z.object({
14
14
  name: z.string(),
15
15
  description: z.string(),
16
16
  task_func: z.string(),
17
- default_args: z.array(z.string()).optional(),
17
+ default_args: z.array(z.record(z.string(), z.any())).optional(),
18
18
  default_kwargs: z.record(z.string(), z.any()).optional(),
19
19
  estimated_duration: z.int().nullable().optional(),
20
20
  })
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Zod schema for TimelineItem
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Single timeline data point for DRF.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Single timeline data point for DRF.
11
+ */
12
+ export const TimelineItemSchema = z.object({
13
+ timestamp: z.string(),
14
+ count: z.int(),
15
+ successful: z.int(),
16
+ failed: z.int(),
17
+ timeout: z.int(),
18
+ })
19
+
20
+ /**
21
+ * Infer TypeScript type from Zod schema
22
+ */
23
+ export type TimelineItem = z.infer<typeof TimelineItemSchema>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Zod schema for TimelineResponse
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Timeline response with hourly/daily breakdown for DRF.
6
+ * */
7
+ import { z } from 'zod'
8
+ import { TimelineItemSchema } from './TimelineItem.schema'
9
+
10
+ /**
11
+ * Timeline response with hourly/daily breakdown for DRF.
12
+ */
13
+ export const TimelineResponseSchema = z.object({
14
+ timeline: z.array(TimelineItemSchema),
15
+ period_hours: z.int(),
16
+ interval: z.string(),
17
+ })
18
+
19
+ /**
20
+ * Infer TypeScript type from Zod schema
21
+ */
22
+ export type TimelineResponse = z.infer<typeof TimelineResponseSchema>
@@ -64,7 +64,7 @@ export * from './CentrifugoPublication.schema'
64
64
  export * from './CentrifugoStreamPosition.schema'
65
65
  export * from './CentrifugoToken.schema'
66
66
  export * from './ChannelList.schema'
67
- export * from './ChannelStatsSerializer.schema'
67
+ export * from './ChannelStats.schema'
68
68
  export * from './ChartData.schema'
69
69
  export * from './ChartDataset.schema'
70
70
  export * from './ChatHistory.schema'
@@ -79,6 +79,7 @@ export * from './ChatSource.schema'
79
79
  export * from './ChatSourceRequest.schema'
80
80
  export * from './ChunkRevectorizationRequestRequest.schema'
81
81
  export * from './Command.schema'
82
+ export * from './CommandCategory.schema'
82
83
  export * from './CommandExecuteRequestRequest.schema'
83
84
  export * from './CommandHelpResponse.schema'
84
85
  export * from './CommandsSummary.schema'
@@ -150,6 +151,7 @@ export * from './MethodInfo.schema'
150
151
  export * from './MethodList.schema'
151
152
  export * from './MethodStats.schema'
152
153
  export * from './MethodSummary.schema'
154
+ export * from './ModelStatistics.schema'
153
155
  export * from './Newsletter.schema'
154
156
  export * from './NewsletterCampaign.schema'
155
157
  export * from './NewsletterCampaignRequest.schema'
@@ -171,6 +173,7 @@ export * from './PaginatedChatSessionList.schema'
171
173
  export * from './PaginatedDocumentArchiveListList.schema'
172
174
  export * from './PaginatedDocumentList.schema'
173
175
  export * from './PaginatedEmailLogList.schema'
176
+ export * from './PaginatedGRPCTestLogList.schema'
174
177
  export * from './PaginatedJobListList.schema'
175
178
  export * from './PaginatedLeadSubmissionList.schema'
176
179
  export * from './PaginatedMessageList.schema'
@@ -229,6 +232,7 @@ export * from './ResponseTimeDataPoint.schema'
229
232
  export * from './RunDemoRequestRequest.schema'
230
233
  export * from './ScheduleActionResponse.schema'
231
234
  export * from './ScheduleCreateRequest.schema'
235
+ export * from './ScheduleInfo.schema'
232
236
  export * from './ScheduledJob.schema'
233
237
  export * from './SendCampaignRequest.schema'
234
238
  export * from './SendCampaignResponse.schema'
@@ -258,6 +262,8 @@ export * from './TestScenario.schema'
258
262
  export * from './TestingActionResponse.schema'
259
263
  export * from './Ticket.schema'
260
264
  export * from './TicketRequest.schema'
265
+ export * from './TimelineItem.schema'
266
+ export * from './TimelineResponse.schema'
261
267
  export * from './TokenRefresh.schema'
262
268
  export * from './TokenRefreshRequest.schema'
263
269
  export * from './Transaction.schema'
@@ -249,7 +249,7 @@ export interface CentrifugoMetrics {
249
249
  /** Metrics collection interval */
250
250
  interval: number;
251
251
  /** Metric name to value mapping */
252
- items: Record<string, number>;
252
+ items: Record<string, any>;
253
253
  }
254
254
 
255
255
  /**
@@ -11,6 +11,27 @@ export class CfgCentrifugoMonitoring {
11
11
  this.client = client;
12
12
  }
13
13
 
14
+ async centrifugoMonitorChannelsRetrieve(hours?: number): Promise<Models.ChannelList[]>;
15
+ async centrifugoMonitorChannelsRetrieve(params?: { hours?: number }): Promise<Models.ChannelList[]>;
16
+
17
+ /**
18
+ * Get channel statistics
19
+ *
20
+ * Returns statistics grouped by channel.
21
+ */
22
+ async centrifugoMonitorChannelsRetrieve(...args: any[]): Promise<Models.ChannelList[]> {
23
+ const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
24
+
25
+ let params;
26
+ if (isParamsObject) {
27
+ params = args[0];
28
+ } else {
29
+ params = { hours: args[0] };
30
+ }
31
+ const response = await this.client.request('GET', "/cfg/centrifugo/monitor/channels/", { params });
32
+ return (response as any).results || response;
33
+ }
34
+
14
35
  /**
15
36
  * Get Centrifugo health status
16
37
  *
@@ -64,15 +85,15 @@ export class CfgCentrifugoMonitoring {
64
85
  return response;
65
86
  }
66
87
 
67
- async centrifugoMonitorTimelineRetrieve(hours?: number, interval?: string): Promise<Models.ChannelList[]>;
68
- async centrifugoMonitorTimelineRetrieve(params?: { hours?: number; interval?: string }): Promise<Models.ChannelList[]>;
88
+ async centrifugoMonitorTimelineRetrieve(hours?: number, interval?: string): Promise<Models.TimelineResponse>;
89
+ async centrifugoMonitorTimelineRetrieve(params?: { hours?: number; interval?: string }): Promise<Models.TimelineResponse>;
69
90
 
70
91
  /**
71
- * Get channel statistics
92
+ * Get publish timeline
72
93
  *
73
- * Returns statistics grouped by channel.
94
+ * Returns hourly or daily breakdown of publish counts for charts.
74
95
  */
75
- async centrifugoMonitorTimelineRetrieve(...args: any[]): Promise<Models.ChannelList[]> {
96
+ async centrifugoMonitorTimelineRetrieve(...args: any[]): Promise<Models.TimelineResponse> {
76
97
  const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
77
98
 
78
99
  let params;
@@ -82,7 +103,7 @@ export class CfgCentrifugoMonitoring {
82
103
  params = { hours: args[0], interval: args[1] };
83
104
  }
84
105
  const response = await this.client.request('GET', "/cfg/centrifugo/monitor/timeline/", { params });
85
- return (response as any).results || response;
106
+ return response;
86
107
  }
87
108
 
88
109
  }
@@ -1,3 +1,15 @@
1
+ /**
2
+ * List of channel statistics.
3
+ *
4
+ * Response model (includes read-only fields).
5
+ */
6
+ export interface ChannelList {
7
+ /** Channel statistics */
8
+ channels: Array<ChannelStats>;
9
+ /** Total number of channels */
10
+ total_channels: number;
11
+ }
12
+
1
13
  /**
2
14
  * Health check response.
3
15
  *
@@ -64,15 +76,36 @@ export interface PaginatedPublishList {
64
76
  }
65
77
 
66
78
  /**
67
- * List of channel statistics.
79
+ * Timeline response with hourly/daily breakdown for DRF.
68
80
  *
69
81
  * Response model (includes read-only fields).
70
82
  */
71
- export interface ChannelList {
72
- /** Channel statistics */
73
- channels: Array<ChannelStatsSerializer>;
74
- /** Total number of channels */
75
- total_channels: number;
83
+ export interface TimelineResponse {
84
+ timeline: Array<TimelineItem>;
85
+ period_hours: number;
86
+ interval: string;
87
+ }
88
+
89
+ /**
90
+ * Statistics per channel.
91
+ *
92
+ * Response model (includes read-only fields).
93
+ */
94
+ export interface ChannelStats {
95
+ /** Channel name */
96
+ channel: string;
97
+ /** Total publishes to this channel */
98
+ total: number;
99
+ /** Successful publishes */
100
+ successful: number;
101
+ /** Failed publishes */
102
+ failed: number;
103
+ /** Average duration */
104
+ avg_duration_ms: number;
105
+ /** Average ACKs received */
106
+ avg_acks: number;
107
+ /** Last activity timestamp (ISO format) */
108
+ last_activity_at: string | null;
76
109
  }
77
110
 
78
111
  /**
@@ -86,7 +119,7 @@ export interface Publish {
86
119
  status: string;
87
120
  wait_for_ack: boolean;
88
121
  acks_received: number;
89
- acks_expected: number;
122
+ acks_expected: number | null;
90
123
  duration_ms: number | null;
91
124
  created_at: string;
92
125
  completed_at: string | null;
@@ -95,24 +128,15 @@ export interface Publish {
95
128
  }
96
129
 
97
130
  /**
98
- * Statistics per channel.
131
+ * Single timeline data point for DRF.
99
132
  *
100
133
  * Response model (includes read-only fields).
101
134
  */
102
- export interface ChannelStatsSerializer {
103
- /** Channel name */
104
- channel: string;
105
- /** Total publishes to this channel */
106
- total: number;
107
- /** Successful publishes */
135
+ export interface TimelineItem {
136
+ timestamp: string;
137
+ count: number;
108
138
  successful: number;
109
- /** Failed publishes */
110
139
  failed: number;
111
- /** Average duration */
112
- avg_duration_ms: number;
113
- /** Average ACKs received */
114
- avg_acks: number;
115
- /** Last activity timestamp (ISO format) */
116
- last_activity_at?: string | null;
140
+ timeout: number;
117
141
  }
118
142
 
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export interface APIZonesSummary {
7
7
  zones: Array<APIZone>;
8
- summary: Record<string, string>;
8
+ summary: Record<string, any>;
9
9
  }
10
10
 
11
11
  /**
@@ -24,7 +24,7 @@ export interface CommandExecuteRequestRequest {
24
24
  /** Positional arguments for the command */
25
25
  args?: Array<string>;
26
26
  /** Named options for the command (e.g., {'verbosity': '2'}) */
27
- options?: Record<string, string>;
27
+ options?: Record<string, any>;
28
28
  }
29
29
 
30
30
  /**
@@ -38,7 +38,8 @@ export interface CommandsSummary {
38
38
  custom_commands: number;
39
39
  categories: Array<string>;
40
40
  commands: Array<Command>;
41
- categorized: Record<string, string>;
41
+ /** Commands grouped by category */
42
+ categorized: Array<CommandCategory>;
42
43
  }
43
44
 
44
45
  /**
@@ -65,3 +66,15 @@ export interface Command {
65
66
  is_destructive?: boolean | null;
66
67
  }
67
68
 
69
+ /**
70
+ * Category with commands.
71
+ *
72
+ * Response model (includes read-only fields).
73
+ */
74
+ export interface CommandCategory {
75
+ /** Category name */
76
+ category: string;
77
+ /** Commands in this category */
78
+ commands: Array<Command>;
79
+ }
80
+