@djangocfg/api 1.2.24 → 1.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/index.cjs +1719 -23297
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +561 -19228
  4. package/dist/index.d.ts +561 -19228
  5. package/dist/index.mjs +1614 -23195
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/contexts/index.ts +0 -11
  9. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_auth.ts +48 -0
  10. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +0 -16
  11. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +5 -20
  12. package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +5 -4
  13. package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
  14. package/src/cfg/generated/_utils/hooks/cfg__accounts.ts +0 -1
  15. package/src/cfg/generated/_utils/hooks/cfg__accounts__auth.ts +0 -1
  16. package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +0 -1
  17. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +0 -1
  18. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_auth.ts +35 -0
  19. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +0 -1
  20. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +0 -21
  21. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +0 -1
  22. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +0 -1
  23. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +0 -1
  24. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +0 -1
  25. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +0 -1
  26. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +0 -1
  27. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +0 -1
  28. package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +0 -1
  29. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts +0 -1
  30. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +0 -1
  31. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +0 -1
  32. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +5 -21
  33. package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +3 -3
  34. package/src/cfg/generated/_utils/hooks/cfg__health.ts +0 -1
  35. package/src/cfg/generated/_utils/hooks/cfg__leads__lead_submission.ts +0 -1
  36. package/src/cfg/generated/_utils/hooks/cfg__newsletter.ts +0 -1
  37. package/src/cfg/generated/_utils/hooks/cfg__newsletter__bulk_email.ts +0 -1
  38. package/src/cfg/generated/_utils/hooks/cfg__newsletter__logs.ts +0 -1
  39. package/src/cfg/generated/_utils/hooks/cfg__newsletter__newsletters.ts +0 -1
  40. package/src/cfg/generated/_utils/hooks/cfg__newsletter__testing.ts +0 -1
  41. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +0 -1
  42. package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +0 -1
  43. package/src/cfg/generated/_utils/hooks/index.ts +1 -0
  44. package/src/cfg/generated/_utils/schemas/CentrifugoToken.schema.ts +22 -0
  45. package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +3 -2
  46. package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +2 -0
  47. package/src/cfg/generated/_utils/schemas/GRPCRegisteredService.schema.ts +24 -0
  48. package/src/cfg/generated/_utils/schemas/GRPCServerConfig.schema.ts +1 -1
  49. package/src/cfg/generated/_utils/schemas/GRPCServerStatus.schema.ts +34 -0
  50. package/src/cfg/generated/_utils/schemas/PaginatedRecentRequestList.schema.ts +24 -0
  51. package/src/cfg/generated/_utils/schemas/PaginatedServiceSummaryList.schema.ts +24 -0
  52. package/src/cfg/generated/_utils/schemas/ServiceSummary.schema.ts +26 -0
  53. package/src/cfg/generated/_utils/schemas/User.schema.ts +2 -0
  54. package/src/cfg/generated/_utils/schemas/index.ts +6 -3
  55. package/src/cfg/generated/cfg__accounts/models.ts +17 -0
  56. package/src/cfg/generated/cfg__accounts__user_profile/models.ts +17 -0
  57. package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/client.ts +26 -0
  58. package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/index.ts +2 -0
  59. package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/models.ts +16 -0
  60. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +0 -10
  61. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +0 -26
  62. package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +2 -2
  63. package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +4 -25
  64. package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +99 -47
  65. package/src/cfg/generated/cfg__grpc__grpc_services/client.ts +6 -5
  66. package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +49 -0
  67. package/src/cfg/generated/client.ts +3 -0
  68. package/src/cfg/generated/index.ts +17 -8
  69. package/src/cfg/generated/{schema.ts → schema.json} +19122 -18892
  70. package/src/index.ts +7 -2
  71. package/src/types/auth.ts +40 -0
  72. package/src/types/index.ts +7 -0
  73. package/src/cfg/contexts/AccountsContext.tsx +0 -205
  74. package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +0 -20
  75. package/src/cfg/generated/_utils/schemas/MonitoringServiceStats.schema.ts +0 -24
  76. package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +0 -21
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Zod schema for GRPCRegisteredService
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Information about a registered gRPC service.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Information about a registered gRPC service.
11
+ */
12
+ export const GRPCRegisteredServiceSchema = z.object({
13
+ name: z.string(),
14
+ full_name: z.string(),
15
+ methods_count: z.int(),
16
+ request_count: z.int(),
17
+ error_count: z.int(),
18
+ success_rate: z.number(),
19
+ })
20
+
21
+ /**
22
+ * Infer TypeScript type from Zod schema
23
+ */
24
+ export type GRPCRegisteredService = z.infer<typeof GRPCRegisteredServiceSchema>
@@ -13,7 +13,7 @@ export const GRPCServerConfigSchema = z.object({
13
13
  host: z.string(),
14
14
  port: z.int(),
15
15
  enabled: z.boolean(),
16
- max_workers: z.int(),
16
+ max_concurrent_streams: z.int().nullable().optional(),
17
17
  max_concurrent_rpcs: z.int().nullable().optional(),
18
18
  })
19
19
 
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Zod schema for GRPCServerStatus
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * gRPC server status and information for overview stats.
6
+ * */
7
+ import { z } from 'zod'
8
+ import { GRPCRegisteredServiceSchema } from './GRPCRegisteredService.schema'
9
+
10
+ /**
11
+ * gRPC server status and information for overview stats.
12
+ */
13
+ export const GRPCServerStatusSchema = z.object({
14
+ status: z.string(),
15
+ is_running: z.boolean(),
16
+ host: z.string(),
17
+ port: z.int(),
18
+ address: z.string(),
19
+ pid: z.int().nullable(),
20
+ started_at: z.iso.datetime().nullable(),
21
+ uptime_seconds: z.int(),
22
+ uptime_display: z.string(),
23
+ registered_services_count: z.int(),
24
+ enable_reflection: z.boolean(),
25
+ enable_health_check: z.boolean(),
26
+ last_heartbeat: z.iso.datetime().nullable(),
27
+ services: z.array(GRPCRegisteredServiceSchema),
28
+ services_healthy: z.boolean(),
29
+ })
30
+
31
+ /**
32
+ * Infer TypeScript type from Zod schema
33
+ */
34
+ export type GRPCServerStatus = z.infer<typeof GRPCServerStatusSchema>
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Zod schema for PaginatedRecentRequestList
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * */
6
+ import { z } from 'zod'
7
+ import { RecentRequestSchema } from './RecentRequest.schema'
8
+
9
+ export const PaginatedRecentRequestListSchema = 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(RecentRequestSchema),
19
+ })
20
+
21
+ /**
22
+ * Infer TypeScript type from Zod schema
23
+ */
24
+ export type PaginatedRecentRequestList = z.infer<typeof PaginatedRecentRequestListSchema>
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Zod schema for PaginatedServiceSummaryList
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * */
6
+ import { z } from 'zod'
7
+ import { ServiceSummarySchema } from './ServiceSummary.schema'
8
+
9
+ export const PaginatedServiceSummaryListSchema = 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(ServiceSummarySchema),
19
+ })
20
+
21
+ /**
22
+ * Infer TypeScript type from Zod schema
23
+ */
24
+ export type PaginatedServiceSummaryList = z.infer<typeof PaginatedServiceSummaryListSchema>
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Zod schema for ServiceSummary
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Summary information for a single service.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Summary information for a single service.
11
+ */
12
+ export const ServiceSummarySchema = z.object({
13
+ name: z.string(),
14
+ full_name: z.string(),
15
+ package: z.string(),
16
+ methods_count: z.int(),
17
+ total_requests: z.int().optional(),
18
+ success_rate: z.number().optional(),
19
+ avg_duration_ms: z.number().optional(),
20
+ last_activity_at: z.string().nullable().optional(),
21
+ })
22
+
23
+ /**
24
+ * Infer TypeScript type from Zod schema
25
+ */
26
+ export type ServiceSummary = z.infer<typeof ServiceSummarySchema>
@@ -5,6 +5,7 @@
5
5
  * * Serializer for user details.
6
6
  * */
7
7
  import { z } from 'zod'
8
+ import { CentrifugoTokenSchema } from './CentrifugoToken.schema'
8
9
 
9
10
  /**
10
11
  * Serializer for user details.
@@ -26,6 +27,7 @@ export const UserSchema = z.object({
26
27
  date_joined: z.iso.datetime(),
27
28
  last_login: z.iso.datetime().nullable(),
28
29
  unanswered_messages_count: z.int(),
30
+ centrifugo: CentrifugoTokenSchema.nullable(),
29
31
  })
30
32
 
31
33
  /**
@@ -60,6 +60,7 @@ export * from './CentrifugoPresenceStatsResult.schema'
60
60
  export * from './CentrifugoProcess.schema'
61
61
  export * from './CentrifugoPublication.schema'
62
62
  export * from './CentrifugoStreamPosition.schema'
63
+ export * from './CentrifugoToken.schema'
63
64
  export * from './ChannelList.schema'
64
65
  export * from './ChannelStatsSerializer.schema'
65
66
  export * from './ChartData.schema'
@@ -82,7 +83,6 @@ export * from './CommandsSummary.schema'
82
83
  export * from './ConfigData.schema'
83
84
  export * from './ConfigMeta.schema'
84
85
  export * from './ConfigValidation.schema'
85
- export * from './ConnectionTokenRequestRequest.schema'
86
86
  export * from './ConnectionTokenResponse.schema'
87
87
  export * from './Currency.schema'
88
88
  export * from './DRFConfig.schema'
@@ -120,8 +120,10 @@ export * from './GRPCFrameworkConfig.schema'
120
120
  export * from './GRPCHealthCheck.schema'
121
121
  export * from './GRPCInterceptorInfo.schema'
122
122
  export * from './GRPCOverviewStats.schema'
123
+ export * from './GRPCRegisteredService.schema'
123
124
  export * from './GRPCServerConfig.schema'
124
125
  export * from './GRPCServerInfo.schema'
126
+ export * from './GRPCServerStatus.schema'
125
127
  export * from './GRPCServiceInfo.schema'
126
128
  export * from './GRPCStats.schema'
127
129
  export * from './GRPCTestLog.schema'
@@ -145,7 +147,6 @@ export * from './MethodInfo.schema'
145
147
  export * from './MethodList.schema'
146
148
  export * from './MethodStats.schema'
147
149
  export * from './MethodSummary.schema'
148
- export * from './MonitoringServiceStats.schema'
149
150
  export * from './Newsletter.schema'
150
151
  export * from './NewsletterCampaign.schema'
151
152
  export * from './NewsletterCampaignRequest.schema'
@@ -174,7 +175,9 @@ export * from './PaginatedPaymentListList.schema'
174
175
  export * from './PaginatedPublicCategoryList.schema'
175
176
  export * from './PaginatedPublicDocumentListList.schema'
176
177
  export * from './PaginatedPublishList.schema'
178
+ export * from './PaginatedRecentRequestList.schema'
177
179
  export * from './PaginatedScheduledJobList.schema'
180
+ export * from './PaginatedServiceSummaryList.schema'
178
181
  export * from './PaginatedTicketList.schema'
179
182
  export * from './PatchedArchiveItemChunkRequest.schema'
180
183
  export * from './PatchedArchiveItemRequest.schema'
@@ -230,9 +233,9 @@ export * from './ServerUptimeDataPoint.schema'
230
233
  export * from './ServiceActivityChart.schema'
231
234
  export * from './ServiceActivityDataPoint.schema'
232
235
  export * from './ServiceDetail.schema'
233
- export * from './ServiceList.schema'
234
236
  export * from './ServiceMethods.schema'
235
237
  export * from './ServiceStats.schema'
238
+ export * from './ServiceSummary.schema'
236
239
  export * from './SpectacularConfig.schema'
237
240
  export * from './StatCard.schema'
238
241
  export * from './StressTestRequestRequest.schema'
@@ -96,5 +96,22 @@ export interface User {
96
96
  last_login: string | null;
97
97
  /** Get count of unanswered messages for the user. */
98
98
  unanswered_messages_count: number;
99
+ centrifugo: Record<string, any> | null;
100
+ }
101
+
102
+ /**
103
+ * Nested serializer for Centrifugo WebSocket connection token.
104
+ *
105
+ * Response model (includes read-only fields).
106
+ */
107
+ export interface CentrifugoToken {
108
+ /** JWT token for Centrifugo WebSocket connection */
109
+ token: string;
110
+ /** Centrifugo WebSocket URL */
111
+ centrifugo_url: string;
112
+ /** Token expiration time (ISO 8601) */
113
+ expires_at: string;
114
+ /** List of allowed channels for this user */
115
+ channels: Array<string>;
99
116
  }
100
117
 
@@ -26,6 +26,7 @@ export interface User {
26
26
  last_login: string | null;
27
27
  /** Get count of unanswered messages for the user. */
28
28
  unanswered_messages_count: number;
29
+ centrifugo: Record<string, any> | null;
29
30
  }
30
31
 
31
32
  /**
@@ -54,3 +55,19 @@ export interface PatchedUserProfileUpdateRequest {
54
55
  position?: string;
55
56
  }
56
57
 
58
+ /**
59
+ * Nested serializer for Centrifugo WebSocket connection token.
60
+ *
61
+ * Response model (includes read-only fields).
62
+ */
63
+ export interface CentrifugoToken {
64
+ /** JWT token for Centrifugo WebSocket connection */
65
+ token: string;
66
+ /** Centrifugo WebSocket URL */
67
+ centrifugo_url: string;
68
+ /** Token expiration time (ISO 8601) */
69
+ expires_at: string;
70
+ /** List of allowed channels for this user */
71
+ channels: Array<string>;
72
+ }
73
+
@@ -0,0 +1,26 @@
1
+ import * as Models from "./models";
2
+
3
+
4
+ /**
5
+ * API endpoints for Centrifugo Auth.
6
+ */
7
+ export class CfgCentrifugoAuth {
8
+ private client: any;
9
+
10
+ constructor(client: any) {
11
+ this.client = client;
12
+ }
13
+
14
+ /**
15
+ * Get Centrifugo connection token
16
+ *
17
+ * Generate JWT token for WebSocket connection to Centrifugo. Token
18
+ * includes user's allowed channels based on their permissions. Requires
19
+ * authentication.
20
+ */
21
+ async tokenRetrieve(): Promise<Models.ConnectionTokenResponse> {
22
+ const response = await this.client.request('GET', "/cfg/centrifugo/auth/token/");
23
+ return response;
24
+ }
25
+
26
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * as Models from "./models";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Response model for Centrifugo connection token.
3
+ *
4
+ * Response model (includes read-only fields).
5
+ */
6
+ export interface ConnectionTokenResponse {
7
+ /** JWT token for Centrifugo connection */
8
+ token: string;
9
+ /** Centrifugo WebSocket URL */
10
+ centrifugo_url: string;
11
+ /** Token expiration time (ISO 8601) */
12
+ expires_at: string;
13
+ /** List of allowed channels */
14
+ channels: Array<string>;
15
+ }
16
+
@@ -11,16 +11,6 @@ export class CfgCentrifugoTesting {
11
11
  this.client = client;
12
12
  }
13
13
 
14
- /**
15
- * Generate connection token
16
- *
17
- * Generate JWT token for WebSocket connection to Centrifugo.
18
- */
19
- async connectionTokenCreate(data: Models.ConnectionTokenRequestRequest): Promise<Models.ConnectionTokenResponse> {
20
- const response = await this.client.request('POST', "/cfg/centrifugo/testing/connection-token/", { body: data });
21
- return response;
22
- }
23
-
24
14
  /**
25
15
  * Publish test message
26
16
  *
@@ -1,29 +1,3 @@
1
- /**
2
- * Request model for connection token generation.
3
- *
4
- * Request model (no read-only fields).
5
- */
6
- export interface ConnectionTokenRequestRequest {
7
- /** User ID for the connection */
8
- user_id: string;
9
- /** List of channels to authorize */
10
- channels?: Array<string>;
11
- }
12
-
13
- /**
14
- * Response model for connection token.
15
- *
16
- * Response model (includes read-only fields).
17
- */
18
- export interface ConnectionTokenResponse {
19
- /** JWT token for WebSocket connection */
20
- token: string;
21
- /** Centrifugo WebSocket URL */
22
- centrifugo_url: string;
23
- /** Token expiration time (ISO 8601) */
24
- expires_at: string;
25
- }
26
-
27
1
  /**
28
2
  * Request model for test message publishing.
29
3
  *
@@ -46,8 +46,8 @@ export interface GRPCServerConfig {
46
46
  port: number;
47
47
  /** Whether gRPC server is enabled */
48
48
  enabled: boolean;
49
- /** Maximum worker threads */
50
- max_workers: number;
49
+ /** Maximum concurrent streams (async server) */
50
+ max_concurrent_streams?: number | null;
51
51
  /** Maximum concurrent RPCs */
52
52
  max_concurrent_rpcs?: number | null;
53
53
  }
@@ -63,8 +63,8 @@ export class CfgGrpcMonitoring {
63
63
  return response;
64
64
  }
65
65
 
66
- async grpcMonitorRequestsRetrieve(method?: string, service?: string, status?: string): Promise<Models.RecentRequest>;
67
- async grpcMonitorRequestsRetrieve(params?: { method?: string; service?: string; status?: string }): Promise<Models.RecentRequest>;
66
+ async grpcMonitorRequestsList(method?: string, page?: number, page_size?: number, service?: string, status?: string): Promise<Models.PaginatedRecentRequestList>;
67
+ async grpcMonitorRequestsList(params?: { method?: string; page?: number; page_size?: number; service?: string; status?: string }): Promise<Models.PaginatedRecentRequestList>;
68
68
 
69
69
  /**
70
70
  * Get recent requests
@@ -72,40 +72,19 @@ export class CfgGrpcMonitoring {
72
72
  * Returns a list of recent gRPC requests with their details. Uses standard
73
73
  * DRF pagination.
74
74
  */
75
- async grpcMonitorRequestsRetrieve(...args: any[]): Promise<Models.RecentRequest> {
75
+ async grpcMonitorRequestsList(...args: any[]): Promise<Models.PaginatedRecentRequestList> {
76
76
  const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
77
77
 
78
78
  let params;
79
79
  if (isParamsObject) {
80
80
  params = args[0];
81
81
  } else {
82
- params = { method: args[0], service: args[1], status: args[2] };
82
+ params = { method: args[0], page: args[1], page_size: args[2], service: args[3], status: args[4] };
83
83
  }
84
84
  const response = await this.client.request('GET', "/cfg/grpc/monitor/requests/", { params });
85
85
  return response;
86
86
  }
87
87
 
88
- async grpcMonitorServicesRetrieve(hours?: number): Promise<Models.ServiceList[]>;
89
- async grpcMonitorServicesRetrieve(params?: { hours?: number }): Promise<Models.ServiceList[]>;
90
-
91
- /**
92
- * Get service statistics
93
- *
94
- * Returns statistics grouped by service.
95
- */
96
- async grpcMonitorServicesRetrieve(...args: any[]): Promise<Models.ServiceList[]> {
97
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
98
-
99
- let params;
100
- if (isParamsObject) {
101
- params = args[0];
102
- } else {
103
- params = { hours: args[0] };
104
- }
105
- const response = await this.client.request('GET', "/cfg/grpc/monitor/services/", { params });
106
- return response;
107
- }
108
-
109
88
  async grpcMonitorTimelineRetrieve(hours?: number, interval?: string): Promise<any>;
110
89
  async grpcMonitorTimelineRetrieve(params?: { hours?: number; interval?: string }): Promise<any>;
111
90
 
@@ -52,6 +52,92 @@ export interface GRPCOverviewStats {
52
52
  p95_duration_ms: number | null;
53
53
  /** Statistics period in hours */
54
54
  period_hours: number;
55
+ server: Record<string, any>;
56
+ }
57
+
58
+ /**
59
+ *
60
+ * Response model (includes read-only fields).
61
+ */
62
+ export interface PaginatedRecentRequestList {
63
+ /** Total number of items across all pages */
64
+ count: number;
65
+ /** Current page number (1-based) */
66
+ page: number;
67
+ /** Total number of pages */
68
+ pages: number;
69
+ /** Number of items per page */
70
+ page_size: number;
71
+ /** Whether there is a next page */
72
+ has_next: boolean;
73
+ /** Whether there is a previous page */
74
+ has_previous: boolean;
75
+ /** Next page number (null if no next page) */
76
+ next_page?: number | null;
77
+ /** Previous page number (null if no previous page) */
78
+ previous_page?: number | null;
79
+ /** Array of items for current page */
80
+ results: Array<RecentRequest>;
81
+ }
82
+
83
+ /**
84
+ * Statistics for a single gRPC method.
85
+ *
86
+ * Response model (includes read-only fields).
87
+ */
88
+ export interface MethodStats {
89
+ /** Method name */
90
+ method_name: string;
91
+ /** Service name */
92
+ service_name: string;
93
+ /** Total requests */
94
+ total: number;
95
+ /** Successful requests */
96
+ successful: number;
97
+ /** Error requests */
98
+ errors: number;
99
+ /** Average duration */
100
+ avg_duration_ms: number;
101
+ /** Last activity timestamp */
102
+ last_activity_at: string | null;
103
+ }
104
+
105
+ /**
106
+ * gRPC server status and information for overview stats.
107
+ *
108
+ * Response model (includes read-only fields).
109
+ */
110
+ export interface GRPCServerStatus {
111
+ /** Server status (running, stopped, error, etc.) */
112
+ status: string;
113
+ /** Whether server is currently running */
114
+ is_running: boolean;
115
+ /** Server host address */
116
+ host: string;
117
+ /** Server port */
118
+ port: number;
119
+ /** Full server address (host:port) */
120
+ address: string;
121
+ /** Process ID */
122
+ pid: number | null;
123
+ /** Server start time */
124
+ started_at: string | null;
125
+ /** Server uptime in seconds */
126
+ uptime_seconds: number;
127
+ /** Human-readable uptime */
128
+ uptime_display: string;
129
+ /** Number of registered services */
130
+ registered_services_count: number;
131
+ /** Whether reflection is enabled */
132
+ enable_reflection: boolean;
133
+ /** Whether health check is enabled */
134
+ enable_health_check: boolean;
135
+ /** Last heartbeat timestamp */
136
+ last_heartbeat: string | null;
137
+ /** List of registered services with stats */
138
+ services: Array<GRPCRegisteredService>;
139
+ /** Whether all services are healthy (no recent errors) */
140
+ services_healthy: boolean;
55
141
  }
56
142
 
57
143
  /**
@@ -93,56 +179,22 @@ export interface RecentRequest {
93
179
  }
94
180
 
95
181
  /**
96
- * List of gRPC services with statistics.
182
+ * Information about a registered gRPC service.
97
183
  *
98
184
  * Response model (includes read-only fields).
99
185
  */
100
- export interface ServiceList {
101
- /** Service statistics */
102
- services: Array<MonitoringServiceStats>;
103
- /** Total number of services */
104
- total_services: number;
105
- }
106
-
107
- /**
108
- * Statistics for a single gRPC method.
109
- *
110
- * Response model (includes read-only fields).
111
- */
112
- export interface MethodStats {
113
- /** Method name */
114
- method_name: string;
186
+ export interface GRPCRegisteredService {
115
187
  /** Service name */
116
- service_name: string;
117
- /** Total requests */
118
- total: number;
119
- /** Successful requests */
120
- successful: number;
121
- /** Error requests */
122
- errors: number;
123
- /** Average duration */
124
- avg_duration_ms: number;
125
- /** Last activity timestamp */
126
- last_activity_at: string | null;
127
- }
128
-
129
- /**
130
- * Statistics for a single gRPC service (monitoring endpoint).
131
- *
132
- * Response model (includes read-only fields).
133
- */
134
- export interface MonitoringServiceStats {
135
- /** Service name */
136
- service_name: string;
137
- /** Total requests */
138
- total: number;
139
- /** Successful requests */
140
- successful: number;
141
- /** Error requests */
142
- errors: number;
143
- /** Average duration */
144
- avg_duration_ms: number;
145
- /** Last activity timestamp */
146
- last_activity_at: string | null;
188
+ name: string;
189
+ /** Full service name with package */
190
+ full_name: string;
191
+ /** Number of methods in service */
192
+ methods_count: number;
193
+ /** Total requests to this service in period */
194
+ request_count: number;
195
+ /** Error requests to this service in period */
196
+ error_count: number;
197
+ /** Success rate percentage for this service */
198
+ success_rate: number;
147
199
  }
148
200
 
@@ -11,22 +11,23 @@ export class CfgGrpcServices {
11
11
  this.client = client;
12
12
  }
13
13
 
14
- async list(hours?: number): Promise<any>;
15
- async list(params?: { hours?: number }): Promise<any>;
14
+ async list(hours?: number, page?: number, page_size?: number): Promise<Models.PaginatedServiceSummaryList>;
15
+ async list(params?: { hours?: number; page?: number; page_size?: number }): Promise<Models.PaginatedServiceSummaryList>;
16
16
 
17
17
  /**
18
18
  * List all services
19
19
  *
20
- * Returns list of all registered gRPC services with basic statistics.
20
+ * Returns paginated list of all registered gRPC services with basic
21
+ * statistics.
21
22
  */
22
- async list(...args: any[]): Promise<any> {
23
+ async list(...args: any[]): Promise<Models.PaginatedServiceSummaryList> {
23
24
  const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
24
25
 
25
26
  let params;
26
27
  if (isParamsObject) {
27
28
  params = args[0];
28
29
  } else {
29
- params = { hours: args[0] };
30
+ params = { hours: args[0], page: args[1], page_size: args[2] };
30
31
  }
31
32
  const response = await this.client.request('GET', "/cfg/grpc/services/", { params });
32
33
  return response;