@djangocfg/api 1.2.24 → 1.2.26
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.
- package/dist/index.cjs +6859 -24179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1243 -20744
- package/dist/index.d.ts +1243 -20744
- package/dist/index.mjs +6766 -24089
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/index.ts +0 -11
- package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +175 -6
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +146 -5
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_auth.ts +77 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +117 -4
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +88 -19
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_activity.ts +1 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_api_zones.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_charts.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_config.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_overview.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_statistics.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_system.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_api_keys.ts +88 -3
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_charts.ts +204 -7
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_configuration.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +119 -21
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_proto_files.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +92 -6
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_testing.ts +88 -3
- package/src/cfg/generated/_utils/fetchers/cfg__health.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +1422 -49
- package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +146 -5
- package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +88 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +146 -5
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +88 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +175 -6
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_jobs.ts +146 -5
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_monitoring.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_queues.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_registries.ts +204 -7
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_schedules.ts +117 -4
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_testing.ts +117 -4
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_workers.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__support.ts +291 -10
- package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
- package/src/cfg/generated/_utils/hooks/cfg__accounts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__accounts__auth.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_auth.ts +35 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +0 -21
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +5 -21
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +3 -3
- package/src/cfg/generated/_utils/hooks/cfg__health.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__leads__lead_submission.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__bulk_email.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__logs.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__newsletters.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__testing.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +0 -1
- package/src/cfg/generated/_utils/hooks/index.ts +1 -0
- package/src/cfg/generated/_utils/schemas/ApiKeyStats.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/AppStatistics.schema.ts +2 -1
- package/src/cfg/generated/_utils/schemas/AppStatisticsData.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/AxesConfig.schema.ts +35 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResult.schema.ts +2 -1
- package/src/cfg/generated/_utils/schemas/CentrifugoMetrics.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResult.schema.ts +2 -1
- package/src/cfg/generated/_utils/schemas/CentrifugoToken.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +3 -2
- package/src/cfg/generated/_utils/schemas/ConstanceConfig.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/DjangoConfig.schema.ts +14 -7
- package/src/cfg/generated/_utils/schemas/DjangoRQConfig.schema.ts +2 -1
- package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/GRPCRegisteredService.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/GRPCServerConfig.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/GRPCServerStatus.schema.ts +34 -0
- package/src/cfg/generated/_utils/schemas/NextJSAdminConfig.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/NgrokConfig.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/OpenAPIClientConfig.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/PaginatedRecentRequestList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedServiceSummaryList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/RQSchedule.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/ServiceSummary.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/TelegramConfig.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/User.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/index.ts +14 -3
- package/src/cfg/generated/cfg__accounts/models.ts +20 -3
- package/src/cfg/generated/cfg__accounts__user_profile/models.ts +19 -2
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +27 -17
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/client.ts +26 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/index.ts +2 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/models.ts +16 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +0 -10
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +0 -26
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/models.ts +1 -1
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +2 -2
- package/src/cfg/generated/cfg__dashboard__dashboard_config/models.ts +159 -26
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +18 -5
- package/src/cfg/generated/cfg__grpc__grpc_api_keys/models.ts +1 -1
- package/src/cfg/generated/cfg__grpc__grpc_charts/models.ts +5 -5
- package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +6 -6
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +4 -25
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +99 -47
- package/src/cfg/generated/cfg__grpc__grpc_services/client.ts +6 -5
- package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +51 -2
- package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +6 -6
- package/src/cfg/generated/cfg__knowbase/models.ts +12 -12
- package/src/cfg/generated/cfg__leads__lead_submission/models.ts +1 -1
- package/src/cfg/generated/cfg__newsletter/models.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__campaigns/models.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__logs/models.ts +4 -4
- package/src/cfg/generated/cfg__newsletter__subscriptions/models.ts +1 -1
- package/src/cfg/generated/cfg__payments/models.ts +12 -12
- package/src/cfg/generated/cfg__rq__rq_jobs/models.ts +2 -2
- package/src/cfg/generated/cfg__rq__rq_monitoring/models.ts +1 -1
- package/src/cfg/generated/cfg__rq__rq_queues/models.ts +1 -1
- package/src/cfg/generated/cfg__rq__rq_schedules/models.ts +3 -3
- package/src/cfg/generated/cfg__rq__rq_testing/models.ts +2 -2
- package/src/cfg/generated/cfg__support/models.ts +2 -2
- package/src/cfg/generated/client.ts +3 -0
- package/src/cfg/generated/index.ts +17 -8
- package/src/cfg/generated/{schema.ts → schema.json} +19349 -18798
- package/src/index.ts +7 -2
- package/src/types/auth.ts +40 -0
- package/src/types/index.ts +7 -0
- package/src/cfg/contexts/AccountsContext.tsx +0 -205
- package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +0 -20
- package/src/cfg/generated/_utils/schemas/MonitoringServiceStats.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +0 -21
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
import { consola } from 'consola'
|
|
32
33
|
import { GRPCHealthCheckSchema, type GRPCHealthCheck } from '../schemas/GRPCHealthCheck.schema'
|
|
33
34
|
import { GRPCOverviewStatsSchema, type GRPCOverviewStats } from '../schemas/GRPCOverviewStats.schema'
|
|
34
35
|
import { MethodListSchema, type MethodList } from '../schemas/MethodList.schema'
|
|
35
|
-
import {
|
|
36
|
-
import { ServiceListSchema, type ServiceList } from '../schemas/ServiceList.schema'
|
|
36
|
+
import { PaginatedRecentRequestListSchema, type PaginatedRecentRequestList } from '../schemas/PaginatedRecentRequestList.schema'
|
|
37
37
|
import { getAPIInstance } from '../../api-instance'
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -46,7 +46,35 @@ export async function getGrpcMonitorHealthRetrieve( client?: any
|
|
|
46
46
|
): Promise<GRPCHealthCheck> {
|
|
47
47
|
const api = client || getAPIInstance()
|
|
48
48
|
const response = await api.cfg_grpc_monitoring.grpcMonitorHealthRetrieve()
|
|
49
|
-
|
|
49
|
+
try {
|
|
50
|
+
return GRPCHealthCheckSchema.parse(response)
|
|
51
|
+
} catch (error) {
|
|
52
|
+
// Zod validation error - log detailed information
|
|
53
|
+
consola.error('❌ Zod Validation Failed');
|
|
54
|
+
consola.box({
|
|
55
|
+
title: 'getGrpcMonitorHealthRetrieve',
|
|
56
|
+
message: `Path: /cfg/grpc/monitor/health/\nMethod: GET`,
|
|
57
|
+
style: {
|
|
58
|
+
borderColor: 'red',
|
|
59
|
+
borderStyle: 'rounded'
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
64
|
+
consola.error('Validation Issues:');
|
|
65
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
66
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
67
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
68
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
69
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
consola.error('Response data:', response);
|
|
74
|
+
|
|
75
|
+
// Re-throw the error
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
50
78
|
}
|
|
51
79
|
|
|
52
80
|
|
|
@@ -60,7 +88,35 @@ export async function getGrpcMonitorMethodsRetrieve( params?: { hours?: number;
|
|
|
60
88
|
): Promise<MethodList> {
|
|
61
89
|
const api = client || getAPIInstance()
|
|
62
90
|
const response = await api.cfg_grpc_monitoring.grpcMonitorMethodsRetrieve(params?.hours, params?.service)
|
|
63
|
-
|
|
91
|
+
try {
|
|
92
|
+
return MethodListSchema.parse(response)
|
|
93
|
+
} catch (error) {
|
|
94
|
+
// Zod validation error - log detailed information
|
|
95
|
+
consola.error('❌ Zod Validation Failed');
|
|
96
|
+
consola.box({
|
|
97
|
+
title: 'getGrpcMonitorMethodsRetrieve',
|
|
98
|
+
message: `Path: /cfg/grpc/monitor/methods/\nMethod: GET`,
|
|
99
|
+
style: {
|
|
100
|
+
borderColor: 'red',
|
|
101
|
+
borderStyle: 'rounded'
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
106
|
+
consola.error('Validation Issues:');
|
|
107
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
108
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
109
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
110
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
111
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
consola.error('Response data:', response);
|
|
116
|
+
|
|
117
|
+
// Re-throw the error
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
64
120
|
}
|
|
65
121
|
|
|
66
122
|
|
|
@@ -74,7 +130,35 @@ export async function getGrpcMonitorOverviewRetrieve( params?: { hours?: number
|
|
|
74
130
|
): Promise<GRPCOverviewStats> {
|
|
75
131
|
const api = client || getAPIInstance()
|
|
76
132
|
const response = await api.cfg_grpc_monitoring.grpcMonitorOverviewRetrieve(params?.hours)
|
|
77
|
-
|
|
133
|
+
try {
|
|
134
|
+
return GRPCOverviewStatsSchema.parse(response)
|
|
135
|
+
} catch (error) {
|
|
136
|
+
// Zod validation error - log detailed information
|
|
137
|
+
consola.error('❌ Zod Validation Failed');
|
|
138
|
+
consola.box({
|
|
139
|
+
title: 'getGrpcMonitorOverviewRetrieve',
|
|
140
|
+
message: `Path: /cfg/grpc/monitor/overview/\nMethod: GET`,
|
|
141
|
+
style: {
|
|
142
|
+
borderColor: 'red',
|
|
143
|
+
borderStyle: 'rounded'
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
148
|
+
consola.error('Validation Issues:');
|
|
149
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
150
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
151
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
152
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
153
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
consola.error('Response data:', response);
|
|
158
|
+
|
|
159
|
+
// Re-throw the error
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
78
162
|
}
|
|
79
163
|
|
|
80
164
|
|
|
@@ -84,25 +168,39 @@ export async function getGrpcMonitorOverviewRetrieve( params?: { hours?: number
|
|
|
84
168
|
* @method GET
|
|
85
169
|
* @path /cfg/grpc/monitor/requests/
|
|
86
170
|
*/
|
|
87
|
-
export async function
|
|
88
|
-
): Promise<
|
|
171
|
+
export async function getGrpcMonitorRequestsList( params?: { method?: string; page?: number; page_size?: number; service?: string; status?: string }, client?: any
|
|
172
|
+
): Promise<PaginatedRecentRequestList> {
|
|
89
173
|
const api = client || getAPIInstance()
|
|
90
|
-
const response = await api.cfg_grpc_monitoring.
|
|
91
|
-
|
|
92
|
-
|
|
174
|
+
const response = await api.cfg_grpc_monitoring.grpcMonitorRequestsList(params?.method, params?.page, params?.page_size, params?.service, params?.status)
|
|
175
|
+
try {
|
|
176
|
+
return PaginatedRecentRequestListSchema.parse(response)
|
|
177
|
+
} catch (error) {
|
|
178
|
+
// Zod validation error - log detailed information
|
|
179
|
+
consola.error('❌ Zod Validation Failed');
|
|
180
|
+
consola.box({
|
|
181
|
+
title: 'getGrpcMonitorRequestsList',
|
|
182
|
+
message: `Path: /cfg/grpc/monitor/requests/\nMethod: GET`,
|
|
183
|
+
style: {
|
|
184
|
+
borderColor: 'red',
|
|
185
|
+
borderStyle: 'rounded'
|
|
186
|
+
}
|
|
187
|
+
});
|
|
93
188
|
|
|
189
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
190
|
+
consola.error('Validation Issues:');
|
|
191
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
192
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
193
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
194
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
195
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
94
198
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*/
|
|
101
|
-
export async function getGrpcMonitorServicesRetrieve( params?: { hours?: number }, client?: any
|
|
102
|
-
): Promise<ServiceList> {
|
|
103
|
-
const api = client || getAPIInstance()
|
|
104
|
-
const response = await api.cfg_grpc_monitoring.grpcMonitorServicesRetrieve(params?.hours)
|
|
105
|
-
return ServiceListSchema.parse(response)
|
|
199
|
+
consola.error('Response data:', response);
|
|
200
|
+
|
|
201
|
+
// Re-throw the error
|
|
202
|
+
throw error;
|
|
203
|
+
}
|
|
106
204
|
}
|
|
107
205
|
|
|
108
206
|
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
import { consola } from 'consola'
|
|
32
33
|
import { ProtoGenerateRequestRequestSchema, type ProtoGenerateRequestRequest } from '../schemas/ProtoGenerateRequestRequest.schema'
|
|
33
34
|
import { ProtoGenerateResponseSchema, type ProtoGenerateResponse } from '../schemas/ProtoGenerateResponse.schema'
|
|
34
35
|
import { getAPIInstance } from '../../api-instance'
|
|
@@ -85,7 +86,35 @@ export async function createGrpcProtoFilesGenerateCreate( data: ProtoGenerateRe
|
|
|
85
86
|
): Promise<ProtoGenerateResponse> {
|
|
86
87
|
const api = client || getAPIInstance()
|
|
87
88
|
const response = await api.cfg_grpc_proto_files.generateCreate(data)
|
|
88
|
-
|
|
89
|
+
try {
|
|
90
|
+
return ProtoGenerateResponseSchema.parse(response)
|
|
91
|
+
} catch (error) {
|
|
92
|
+
// Zod validation error - log detailed information
|
|
93
|
+
consola.error('❌ Zod Validation Failed');
|
|
94
|
+
consola.box({
|
|
95
|
+
title: 'createGrpcProtoFilesGenerateCreate',
|
|
96
|
+
message: `Path: /cfg/grpc/proto-files/generate/\nMethod: POST`,
|
|
97
|
+
style: {
|
|
98
|
+
borderColor: 'red',
|
|
99
|
+
borderStyle: 'rounded'
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
104
|
+
consola.error('Validation Issues:');
|
|
105
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
106
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
107
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
108
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
109
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
consola.error('Response data:', response);
|
|
114
|
+
|
|
115
|
+
// Re-throw the error
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
89
118
|
}
|
|
90
119
|
|
|
91
120
|
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
import { consola } from 'consola'
|
|
33
|
+
import { PaginatedServiceSummaryListSchema, type PaginatedServiceSummaryList } from '../schemas/PaginatedServiceSummaryList.schema'
|
|
32
34
|
import { ServiceDetailSchema, type ServiceDetail } from '../schemas/ServiceDetail.schema'
|
|
33
35
|
import { ServiceMethodsSchema, type ServiceMethods } from '../schemas/ServiceMethods.schema'
|
|
34
36
|
import { getAPIInstance } from '../../api-instance'
|
|
@@ -39,11 +41,39 @@ import { getAPIInstance } from '../../api-instance'
|
|
|
39
41
|
* @method GET
|
|
40
42
|
* @path /cfg/grpc/services/
|
|
41
43
|
*/
|
|
42
|
-
export async function getGrpcServicesList( params?: { hours?: number }, client?: any
|
|
43
|
-
): Promise<
|
|
44
|
+
export async function getGrpcServicesList( params?: { hours?: number; page?: number; page_size?: number }, client?: any
|
|
45
|
+
): Promise<PaginatedServiceSummaryList> {
|
|
44
46
|
const api = client || getAPIInstance()
|
|
45
|
-
const response = await api.cfg_grpc_services.list(params?.hours)
|
|
46
|
-
|
|
47
|
+
const response = await api.cfg_grpc_services.list(params?.hours, params?.page, params?.page_size)
|
|
48
|
+
try {
|
|
49
|
+
return PaginatedServiceSummaryListSchema.parse(response)
|
|
50
|
+
} catch (error) {
|
|
51
|
+
// Zod validation error - log detailed information
|
|
52
|
+
consola.error('❌ Zod Validation Failed');
|
|
53
|
+
consola.box({
|
|
54
|
+
title: 'getGrpcServicesList',
|
|
55
|
+
message: `Path: /cfg/grpc/services/\nMethod: GET`,
|
|
56
|
+
style: {
|
|
57
|
+
borderColor: 'red',
|
|
58
|
+
borderStyle: 'rounded'
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
63
|
+
consola.error('Validation Issues:');
|
|
64
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
65
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
66
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
67
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
68
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
consola.error('Response data:', response);
|
|
73
|
+
|
|
74
|
+
// Re-throw the error
|
|
75
|
+
throw error;
|
|
76
|
+
}
|
|
47
77
|
}
|
|
48
78
|
|
|
49
79
|
|
|
@@ -57,7 +87,35 @@ export async function getGrpcServicesRetrieve( id: string, pk: string, client?
|
|
|
57
87
|
): Promise<ServiceDetail> {
|
|
58
88
|
const api = client || getAPIInstance()
|
|
59
89
|
const response = await api.cfg_grpc_services.retrieve(id, pk)
|
|
60
|
-
|
|
90
|
+
try {
|
|
91
|
+
return ServiceDetailSchema.parse(response)
|
|
92
|
+
} catch (error) {
|
|
93
|
+
// Zod validation error - log detailed information
|
|
94
|
+
consola.error('❌ Zod Validation Failed');
|
|
95
|
+
consola.box({
|
|
96
|
+
title: 'getGrpcServicesRetrieve',
|
|
97
|
+
message: `Path: /cfg/grpc/services/{id}/\nMethod: GET`,
|
|
98
|
+
style: {
|
|
99
|
+
borderColor: 'red',
|
|
100
|
+
borderStyle: 'rounded'
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
105
|
+
consola.error('Validation Issues:');
|
|
106
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
107
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
108
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
109
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
110
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
consola.error('Response data:', response);
|
|
115
|
+
|
|
116
|
+
// Re-throw the error
|
|
117
|
+
throw error;
|
|
118
|
+
}
|
|
61
119
|
}
|
|
62
120
|
|
|
63
121
|
|
|
@@ -71,7 +129,35 @@ export async function getGrpcServicesMethodsRetrieve( id: string, pk: string,
|
|
|
71
129
|
): Promise<ServiceMethods> {
|
|
72
130
|
const api = client || getAPIInstance()
|
|
73
131
|
const response = await api.cfg_grpc_services.methodsRetrieve(id, pk)
|
|
74
|
-
|
|
132
|
+
try {
|
|
133
|
+
return ServiceMethodsSchema.parse(response)
|
|
134
|
+
} catch (error) {
|
|
135
|
+
// Zod validation error - log detailed information
|
|
136
|
+
consola.error('❌ Zod Validation Failed');
|
|
137
|
+
consola.box({
|
|
138
|
+
title: 'getGrpcServicesMethodsRetrieve',
|
|
139
|
+
message: `Path: /cfg/grpc/services/{id}/methods/\nMethod: GET`,
|
|
140
|
+
style: {
|
|
141
|
+
borderColor: 'red',
|
|
142
|
+
borderStyle: 'rounded'
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
147
|
+
consola.error('Validation Issues:');
|
|
148
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
149
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
150
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
151
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
152
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
consola.error('Response data:', response);
|
|
157
|
+
|
|
158
|
+
// Re-throw the error
|
|
159
|
+
throw error;
|
|
160
|
+
}
|
|
75
161
|
}
|
|
76
162
|
|
|
77
163
|
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
import { consola } from 'consola'
|
|
32
33
|
import { GRPCCallRequestRequestSchema, type GRPCCallRequestRequest } from '../schemas/GRPCCallRequestRequest.schema'
|
|
33
34
|
import { GRPCCallResponseSchema, type GRPCCallResponse } from '../schemas/GRPCCallResponse.schema'
|
|
34
35
|
import { GRPCExamplesListSchema, type GRPCExamplesList } from '../schemas/GRPCExamplesList.schema'
|
|
@@ -45,7 +46,35 @@ export async function createGrpcTestCallCreate( data: GRPCCallRequestRequest,
|
|
|
45
46
|
): Promise<GRPCCallResponse> {
|
|
46
47
|
const api = client || getAPIInstance()
|
|
47
48
|
const response = await api.cfg_grpc_testing.grpcTestCallCreate(data)
|
|
48
|
-
|
|
49
|
+
try {
|
|
50
|
+
return GRPCCallResponseSchema.parse(response)
|
|
51
|
+
} catch (error) {
|
|
52
|
+
// Zod validation error - log detailed information
|
|
53
|
+
consola.error('❌ Zod Validation Failed');
|
|
54
|
+
consola.box({
|
|
55
|
+
title: 'createGrpcTestCallCreate',
|
|
56
|
+
message: `Path: /cfg/grpc/test/call/\nMethod: POST`,
|
|
57
|
+
style: {
|
|
58
|
+
borderColor: 'red',
|
|
59
|
+
borderStyle: 'rounded'
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
64
|
+
consola.error('Validation Issues:');
|
|
65
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
66
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
67
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
68
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
69
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
consola.error('Response data:', response);
|
|
74
|
+
|
|
75
|
+
// Re-throw the error
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
49
78
|
}
|
|
50
79
|
|
|
51
80
|
|
|
@@ -59,7 +88,35 @@ export async function getGrpcTestExamplesRetrieve( params?: { method?: string;
|
|
|
59
88
|
): Promise<GRPCExamplesList> {
|
|
60
89
|
const api = client || getAPIInstance()
|
|
61
90
|
const response = await api.cfg_grpc_testing.grpcTestExamplesRetrieve(params?.method, params?.service)
|
|
62
|
-
|
|
91
|
+
try {
|
|
92
|
+
return GRPCExamplesListSchema.parse(response)
|
|
93
|
+
} catch (error) {
|
|
94
|
+
// Zod validation error - log detailed information
|
|
95
|
+
consola.error('❌ Zod Validation Failed');
|
|
96
|
+
consola.box({
|
|
97
|
+
title: 'getGrpcTestExamplesRetrieve',
|
|
98
|
+
message: `Path: /cfg/grpc/test/examples/\nMethod: GET`,
|
|
99
|
+
style: {
|
|
100
|
+
borderColor: 'red',
|
|
101
|
+
borderStyle: 'rounded'
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
106
|
+
consola.error('Validation Issues:');
|
|
107
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
108
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
109
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
110
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
111
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
consola.error('Response data:', response);
|
|
116
|
+
|
|
117
|
+
// Re-throw the error
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
63
120
|
}
|
|
64
121
|
|
|
65
122
|
|
|
@@ -73,7 +130,35 @@ export async function getGrpcTestLogsRetrieve( params?: { method?: string; serv
|
|
|
73
130
|
): Promise<GRPCTestLog> {
|
|
74
131
|
const api = client || getAPIInstance()
|
|
75
132
|
const response = await api.cfg_grpc_testing.grpcTestLogsRetrieve(params?.method, params?.service, params?.status)
|
|
76
|
-
|
|
133
|
+
try {
|
|
134
|
+
return GRPCTestLogSchema.parse(response)
|
|
135
|
+
} catch (error) {
|
|
136
|
+
// Zod validation error - log detailed information
|
|
137
|
+
consola.error('❌ Zod Validation Failed');
|
|
138
|
+
consola.box({
|
|
139
|
+
title: 'getGrpcTestLogsRetrieve',
|
|
140
|
+
message: `Path: /cfg/grpc/test/logs/\nMethod: GET`,
|
|
141
|
+
style: {
|
|
142
|
+
borderColor: 'red',
|
|
143
|
+
borderStyle: 'rounded'
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
148
|
+
consola.error('Validation Issues:');
|
|
149
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
150
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
151
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
152
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
153
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
consola.error('Response data:', response);
|
|
158
|
+
|
|
159
|
+
// Re-throw the error
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
77
162
|
}
|
|
78
163
|
|
|
79
164
|
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
import { consola } from 'consola'
|
|
32
33
|
import { HealthCheckSchema, type HealthCheck } from '../schemas/HealthCheck.schema'
|
|
33
34
|
import { QuickHealthSchema, type QuickHealth } from '../schemas/QuickHealth.schema'
|
|
34
35
|
import { getAPIInstance } from '../../api-instance'
|
|
@@ -43,7 +44,35 @@ export async function getHealthDrfRetrieve( client?: any
|
|
|
43
44
|
): Promise<HealthCheck> {
|
|
44
45
|
const api = client || getAPIInstance()
|
|
45
46
|
const response = await api.cfg_health.drfRetrieve()
|
|
46
|
-
|
|
47
|
+
try {
|
|
48
|
+
return HealthCheckSchema.parse(response)
|
|
49
|
+
} catch (error) {
|
|
50
|
+
// Zod validation error - log detailed information
|
|
51
|
+
consola.error('❌ Zod Validation Failed');
|
|
52
|
+
consola.box({
|
|
53
|
+
title: 'getHealthDrfRetrieve',
|
|
54
|
+
message: `Path: /cfg/health/drf/\nMethod: GET`,
|
|
55
|
+
style: {
|
|
56
|
+
borderColor: 'red',
|
|
57
|
+
borderStyle: 'rounded'
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
62
|
+
consola.error('Validation Issues:');
|
|
63
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
64
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
65
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
66
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
67
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
consola.error('Response data:', response);
|
|
72
|
+
|
|
73
|
+
// Re-throw the error
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
47
76
|
}
|
|
48
77
|
|
|
49
78
|
|
|
@@ -57,7 +86,35 @@ export async function getHealthDrfQuickRetrieve( client?: any
|
|
|
57
86
|
): Promise<QuickHealth> {
|
|
58
87
|
const api = client || getAPIInstance()
|
|
59
88
|
const response = await api.cfg_health.drfQuickRetrieve()
|
|
60
|
-
|
|
89
|
+
try {
|
|
90
|
+
return QuickHealthSchema.parse(response)
|
|
91
|
+
} catch (error) {
|
|
92
|
+
// Zod validation error - log detailed information
|
|
93
|
+
consola.error('❌ Zod Validation Failed');
|
|
94
|
+
consola.box({
|
|
95
|
+
title: 'getHealthDrfQuickRetrieve',
|
|
96
|
+
message: `Path: /cfg/health/drf/quick/\nMethod: GET`,
|
|
97
|
+
style: {
|
|
98
|
+
borderColor: 'red',
|
|
99
|
+
borderStyle: 'rounded'
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
104
|
+
consola.error('Validation Issues:');
|
|
105
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
106
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
107
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
108
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
109
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
consola.error('Response data:', response);
|
|
114
|
+
|
|
115
|
+
// Re-throw the error
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
61
118
|
}
|
|
62
119
|
|
|
63
120
|
|