@djangocfg/api 1.2.25 → 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 +6319 -2061
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +698 -1532
- package/dist/index.d.ts +698 -1532
- package/dist/index.mjs +6319 -2061
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- 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 +30 -1
- 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 -3
- 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 +117 -4
- 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 +88 -3
- 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/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/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/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/RQSchedule.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/TelegramConfig.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/index.ts +8 -0
- package/src/cfg/generated/cfg__accounts/models.ts +4 -4
- package/src/cfg/generated/cfg__accounts__user_profile/models.ts +3 -3
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +27 -17
- 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 +4 -4
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +1 -1
- package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +2 -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/schema.json +340 -19
|
@@ -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 { SystemHealthSchema, type SystemHealth } from '../schemas/SystemHealth.schema'
|
|
33
34
|
import { SystemMetricsSchema, type SystemMetrics } from '../schemas/SystemMetrics.schema'
|
|
34
35
|
import { getAPIInstance } from '../../api-instance'
|
|
@@ -43,7 +44,35 @@ export async function getDashboardApiSystemHealthRetrieve( client?: any
|
|
|
43
44
|
): Promise<SystemHealth> {
|
|
44
45
|
const api = client || getAPIInstance()
|
|
45
46
|
const response = await api.cfg_dashboard_system.dashboardApiSystemHealthRetrieve()
|
|
46
|
-
|
|
47
|
+
try {
|
|
48
|
+
return SystemHealthSchema.parse(response)
|
|
49
|
+
} catch (error) {
|
|
50
|
+
// Zod validation error - log detailed information
|
|
51
|
+
consola.error('❌ Zod Validation Failed');
|
|
52
|
+
consola.box({
|
|
53
|
+
title: 'getDashboardApiSystemHealthRetrieve',
|
|
54
|
+
message: `Path: /cfg/dashboard/api/system/health/\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 getDashboardApiSystemMetricsRetrieve( client?: any
|
|
|
57
86
|
): Promise<SystemMetrics> {
|
|
58
87
|
const api = client || getAPIInstance()
|
|
59
88
|
const response = await api.cfg_dashboard_system.dashboardApiSystemMetricsRetrieve()
|
|
60
|
-
|
|
89
|
+
try {
|
|
90
|
+
return SystemMetricsSchema.parse(response)
|
|
91
|
+
} catch (error) {
|
|
92
|
+
// Zod validation error - log detailed information
|
|
93
|
+
consola.error('❌ Zod Validation Failed');
|
|
94
|
+
consola.box({
|
|
95
|
+
title: 'getDashboardApiSystemMetricsRetrieve',
|
|
96
|
+
message: `Path: /cfg/dashboard/api/system/metrics/\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
|
|
|
@@ -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 { EndpointsStatusSchema, type EndpointsStatus } from '../schemas/EndpointsStatus.schema'
|
|
33
34
|
import { URLsListSchema, type URLsList } from '../schemas/URLsList.schema'
|
|
34
35
|
import { getAPIInstance } from '../../api-instance'
|
|
@@ -43,7 +44,35 @@ export async function getEndpointsDrfRetrieve( client?: any
|
|
|
43
44
|
): Promise<EndpointsStatus> {
|
|
44
45
|
const api = client || getAPIInstance()
|
|
45
46
|
const response = await api.cfg_endpoints.drfRetrieve()
|
|
46
|
-
|
|
47
|
+
try {
|
|
48
|
+
return EndpointsStatusSchema.parse(response)
|
|
49
|
+
} catch (error) {
|
|
50
|
+
// Zod validation error - log detailed information
|
|
51
|
+
consola.error('❌ Zod Validation Failed');
|
|
52
|
+
consola.box({
|
|
53
|
+
title: 'getEndpointsDrfRetrieve',
|
|
54
|
+
message: `Path: /cfg/endpoints/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 getEndpointsUrlsRetrieve( client?: any
|
|
|
57
86
|
): Promise<URLsList> {
|
|
58
87
|
const api = client || getAPIInstance()
|
|
59
88
|
const response = await api.cfg_endpoints.urlsRetrieve()
|
|
60
|
-
|
|
89
|
+
try {
|
|
90
|
+
return URLsListSchema.parse(response)
|
|
91
|
+
} catch (error) {
|
|
92
|
+
// Zod validation error - log detailed information
|
|
93
|
+
consola.error('❌ Zod Validation Failed');
|
|
94
|
+
consola.box({
|
|
95
|
+
title: 'getEndpointsUrlsRetrieve',
|
|
96
|
+
message: `Path: /cfg/endpoints/urls/\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
|
|
|
@@ -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 { ApiKeySchema, type ApiKey } from '../schemas/ApiKey.schema'
|
|
33
34
|
import { ApiKeyStatsSchema, type ApiKeyStats } from '../schemas/ApiKeyStats.schema'
|
|
34
35
|
import { PaginatedApiKeyListSchema, type PaginatedApiKeyList } from '../schemas/PaginatedApiKeyList.schema'
|
|
@@ -44,7 +45,35 @@ export async function getGrpcApiKeysList( params?: { is_active?: boolean; key_t
|
|
|
44
45
|
): Promise<PaginatedApiKeyList> {
|
|
45
46
|
const api = client || getAPIInstance()
|
|
46
47
|
const response = await api.cfg_grpc_api_keys.list(params?.is_active, params?.key_type, params?.page, params?.page_size, params?.user_id)
|
|
47
|
-
|
|
48
|
+
try {
|
|
49
|
+
return PaginatedApiKeyListSchema.parse(response)
|
|
50
|
+
} catch (error) {
|
|
51
|
+
// Zod validation error - log detailed information
|
|
52
|
+
consola.error('❌ Zod Validation Failed');
|
|
53
|
+
consola.box({
|
|
54
|
+
title: 'getGrpcApiKeysList',
|
|
55
|
+
message: `Path: /cfg/grpc/api-keys/\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
|
+
}
|
|
48
77
|
}
|
|
49
78
|
|
|
50
79
|
|
|
@@ -58,7 +87,35 @@ export async function getGrpcApiKeysRetrieve( id: number, client?: any
|
|
|
58
87
|
): Promise<ApiKey> {
|
|
59
88
|
const api = client || getAPIInstance()
|
|
60
89
|
const response = await api.cfg_grpc_api_keys.retrieve(id)
|
|
61
|
-
|
|
90
|
+
try {
|
|
91
|
+
return ApiKeySchema.parse(response)
|
|
92
|
+
} catch (error) {
|
|
93
|
+
// Zod validation error - log detailed information
|
|
94
|
+
consola.error('❌ Zod Validation Failed');
|
|
95
|
+
consola.box({
|
|
96
|
+
title: 'getGrpcApiKeysRetrieve',
|
|
97
|
+
message: `Path: /cfg/grpc/api-keys/{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
|
+
}
|
|
62
119
|
}
|
|
63
120
|
|
|
64
121
|
|
|
@@ -72,7 +129,35 @@ export async function getGrpcApiKeysStatsRetrieve( client?: any
|
|
|
72
129
|
): Promise<ApiKeyStats> {
|
|
73
130
|
const api = client || getAPIInstance()
|
|
74
131
|
const response = await api.cfg_grpc_api_keys.statsRetrieve()
|
|
75
|
-
|
|
132
|
+
try {
|
|
133
|
+
return ApiKeyStatsSchema.parse(response)
|
|
134
|
+
} catch (error) {
|
|
135
|
+
// Zod validation error - log detailed information
|
|
136
|
+
consola.error('❌ Zod Validation Failed');
|
|
137
|
+
consola.box({
|
|
138
|
+
title: 'getGrpcApiKeysStatsRetrieve',
|
|
139
|
+
message: `Path: /cfg/grpc/api-keys/stats/\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
|
+
}
|
|
76
161
|
}
|
|
77
162
|
|
|
78
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 { DashboardChartsSchema, type DashboardCharts } from '../schemas/DashboardCharts.schema'
|
|
33
34
|
import { ErrorDistributionChartSchema, type ErrorDistributionChart } from '../schemas/ErrorDistributionChart.schema'
|
|
34
35
|
import { RequestVolumeChartSchema, type RequestVolumeChart } from '../schemas/RequestVolumeChart.schema'
|
|
@@ -48,7 +49,35 @@ export async function getGrpcChartsDashboardRetrieve( params?: { hours?: number
|
|
|
48
49
|
): Promise<DashboardCharts> {
|
|
49
50
|
const api = client || getAPIInstance()
|
|
50
51
|
const response = await api.cfg_grpc_charts.dashboardRetrieve(params?.hours)
|
|
51
|
-
|
|
52
|
+
try {
|
|
53
|
+
return DashboardChartsSchema.parse(response)
|
|
54
|
+
} catch (error) {
|
|
55
|
+
// Zod validation error - log detailed information
|
|
56
|
+
consola.error('❌ Zod Validation Failed');
|
|
57
|
+
consola.box({
|
|
58
|
+
title: 'getGrpcChartsDashboardRetrieve',
|
|
59
|
+
message: `Path: /cfg/grpc/charts/dashboard/\nMethod: GET`,
|
|
60
|
+
style: {
|
|
61
|
+
borderColor: 'red',
|
|
62
|
+
borderStyle: 'rounded'
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
67
|
+
consola.error('Validation Issues:');
|
|
68
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
69
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
70
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
71
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
72
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
consola.error('Response data:', response);
|
|
77
|
+
|
|
78
|
+
// Re-throw the error
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
52
81
|
}
|
|
53
82
|
|
|
54
83
|
|
|
@@ -62,7 +91,35 @@ export async function getGrpcChartsErrorDistributionRetrieve( params?: { hours?
|
|
|
62
91
|
): Promise<ErrorDistributionChart> {
|
|
63
92
|
const api = client || getAPIInstance()
|
|
64
93
|
const response = await api.cfg_grpc_charts.errorDistributionRetrieve(params?.hours)
|
|
65
|
-
|
|
94
|
+
try {
|
|
95
|
+
return ErrorDistributionChartSchema.parse(response)
|
|
96
|
+
} catch (error) {
|
|
97
|
+
// Zod validation error - log detailed information
|
|
98
|
+
consola.error('❌ Zod Validation Failed');
|
|
99
|
+
consola.box({
|
|
100
|
+
title: 'getGrpcChartsErrorDistributionRetrieve',
|
|
101
|
+
message: `Path: /cfg/grpc/charts/error-distribution/\nMethod: GET`,
|
|
102
|
+
style: {
|
|
103
|
+
borderColor: 'red',
|
|
104
|
+
borderStyle: 'rounded'
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
109
|
+
consola.error('Validation Issues:');
|
|
110
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
111
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
112
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
113
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
114
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
consola.error('Response data:', response);
|
|
119
|
+
|
|
120
|
+
// Re-throw the error
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
66
123
|
}
|
|
67
124
|
|
|
68
125
|
|
|
@@ -76,7 +133,35 @@ export async function getGrpcChartsRequestVolumeRetrieve( params?: { hours?: nu
|
|
|
76
133
|
): Promise<RequestVolumeChart> {
|
|
77
134
|
const api = client || getAPIInstance()
|
|
78
135
|
const response = await api.cfg_grpc_charts.requestVolumeRetrieve(params?.hours)
|
|
79
|
-
|
|
136
|
+
try {
|
|
137
|
+
return RequestVolumeChartSchema.parse(response)
|
|
138
|
+
} catch (error) {
|
|
139
|
+
// Zod validation error - log detailed information
|
|
140
|
+
consola.error('❌ Zod Validation Failed');
|
|
141
|
+
consola.box({
|
|
142
|
+
title: 'getGrpcChartsRequestVolumeRetrieve',
|
|
143
|
+
message: `Path: /cfg/grpc/charts/request-volume/\nMethod: GET`,
|
|
144
|
+
style: {
|
|
145
|
+
borderColor: 'red',
|
|
146
|
+
borderStyle: 'rounded'
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
151
|
+
consola.error('Validation Issues:');
|
|
152
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
153
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
154
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
155
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
156
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
consola.error('Response data:', response);
|
|
161
|
+
|
|
162
|
+
// Re-throw the error
|
|
163
|
+
throw error;
|
|
164
|
+
}
|
|
80
165
|
}
|
|
81
166
|
|
|
82
167
|
|
|
@@ -90,7 +175,35 @@ export async function getGrpcChartsResponseTimeRetrieve( params?: { hours?: num
|
|
|
90
175
|
): Promise<ResponseTimeChart> {
|
|
91
176
|
const api = client || getAPIInstance()
|
|
92
177
|
const response = await api.cfg_grpc_charts.responseTimeRetrieve(params?.hours)
|
|
93
|
-
|
|
178
|
+
try {
|
|
179
|
+
return ResponseTimeChartSchema.parse(response)
|
|
180
|
+
} catch (error) {
|
|
181
|
+
// Zod validation error - log detailed information
|
|
182
|
+
consola.error('❌ Zod Validation Failed');
|
|
183
|
+
consola.box({
|
|
184
|
+
title: 'getGrpcChartsResponseTimeRetrieve',
|
|
185
|
+
message: `Path: /cfg/grpc/charts/response-time/\nMethod: GET`,
|
|
186
|
+
style: {
|
|
187
|
+
borderColor: 'red',
|
|
188
|
+
borderStyle: 'rounded'
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
193
|
+
consola.error('Validation Issues:');
|
|
194
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
195
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
196
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
197
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
198
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
consola.error('Response data:', response);
|
|
203
|
+
|
|
204
|
+
// Re-throw the error
|
|
205
|
+
throw error;
|
|
206
|
+
}
|
|
94
207
|
}
|
|
95
208
|
|
|
96
209
|
|
|
@@ -104,7 +217,35 @@ export async function getGrpcChartsServerLifecycleRetrieve( params?: { hours?:
|
|
|
104
217
|
): Promise<ServerLifecycleChart> {
|
|
105
218
|
const api = client || getAPIInstance()
|
|
106
219
|
const response = await api.cfg_grpc_charts.serverLifecycleRetrieve(params?.hours)
|
|
107
|
-
|
|
220
|
+
try {
|
|
221
|
+
return ServerLifecycleChartSchema.parse(response)
|
|
222
|
+
} catch (error) {
|
|
223
|
+
// Zod validation error - log detailed information
|
|
224
|
+
consola.error('❌ Zod Validation Failed');
|
|
225
|
+
consola.box({
|
|
226
|
+
title: 'getGrpcChartsServerLifecycleRetrieve',
|
|
227
|
+
message: `Path: /cfg/grpc/charts/server-lifecycle/\nMethod: GET`,
|
|
228
|
+
style: {
|
|
229
|
+
borderColor: 'red',
|
|
230
|
+
borderStyle: 'rounded'
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
235
|
+
consola.error('Validation Issues:');
|
|
236
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
237
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
238
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
239
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
240
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
consola.error('Response data:', response);
|
|
245
|
+
|
|
246
|
+
// Re-throw the error
|
|
247
|
+
throw error;
|
|
248
|
+
}
|
|
108
249
|
}
|
|
109
250
|
|
|
110
251
|
|
|
@@ -118,7 +259,35 @@ export async function getGrpcChartsServerUptimeRetrieve( params?: { hours?: num
|
|
|
118
259
|
): Promise<ServerUptimeChart> {
|
|
119
260
|
const api = client || getAPIInstance()
|
|
120
261
|
const response = await api.cfg_grpc_charts.serverUptimeRetrieve(params?.hours)
|
|
121
|
-
|
|
262
|
+
try {
|
|
263
|
+
return ServerUptimeChartSchema.parse(response)
|
|
264
|
+
} catch (error) {
|
|
265
|
+
// Zod validation error - log detailed information
|
|
266
|
+
consola.error('❌ Zod Validation Failed');
|
|
267
|
+
consola.box({
|
|
268
|
+
title: 'getGrpcChartsServerUptimeRetrieve',
|
|
269
|
+
message: `Path: /cfg/grpc/charts/server-uptime/\nMethod: GET`,
|
|
270
|
+
style: {
|
|
271
|
+
borderColor: 'red',
|
|
272
|
+
borderStyle: 'rounded'
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
277
|
+
consola.error('Validation Issues:');
|
|
278
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
279
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
280
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
281
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
282
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
consola.error('Response data:', response);
|
|
287
|
+
|
|
288
|
+
// Re-throw the error
|
|
289
|
+
throw error;
|
|
290
|
+
}
|
|
122
291
|
}
|
|
123
292
|
|
|
124
293
|
|
|
@@ -132,7 +301,35 @@ export async function getGrpcChartsServiceActivityRetrieve( params?: { hours?:
|
|
|
132
301
|
): Promise<ServiceActivityChart> {
|
|
133
302
|
const api = client || getAPIInstance()
|
|
134
303
|
const response = await api.cfg_grpc_charts.serviceActivityRetrieve(params?.hours)
|
|
135
|
-
|
|
304
|
+
try {
|
|
305
|
+
return ServiceActivityChartSchema.parse(response)
|
|
306
|
+
} catch (error) {
|
|
307
|
+
// Zod validation error - log detailed information
|
|
308
|
+
consola.error('❌ Zod Validation Failed');
|
|
309
|
+
consola.box({
|
|
310
|
+
title: 'getGrpcChartsServiceActivityRetrieve',
|
|
311
|
+
message: `Path: /cfg/grpc/charts/service-activity/\nMethod: GET`,
|
|
312
|
+
style: {
|
|
313
|
+
borderColor: 'red',
|
|
314
|
+
borderStyle: 'rounded'
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
319
|
+
consola.error('Validation Issues:');
|
|
320
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
321
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
322
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
323
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
324
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
consola.error('Response data:', response);
|
|
329
|
+
|
|
330
|
+
// Re-throw the error
|
|
331
|
+
throw error;
|
|
332
|
+
}
|
|
136
333
|
}
|
|
137
334
|
|
|
138
335
|
|
|
@@ -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 { GRPCConfigSchema, type GRPCConfig } from '../schemas/GRPCConfig.schema'
|
|
33
34
|
import { GRPCServerInfoSchema, type GRPCServerInfo } from '../schemas/GRPCServerInfo.schema'
|
|
34
35
|
import { getAPIInstance } from '../../api-instance'
|
|
@@ -43,7 +44,35 @@ export async function getGrpcConfigConfigRetrieve( client?: any
|
|
|
43
44
|
): Promise<GRPCConfig> {
|
|
44
45
|
const api = client || getAPIInstance()
|
|
45
46
|
const response = await api.cfg_grpc_configuration.grpcConfigConfigRetrieve()
|
|
46
|
-
|
|
47
|
+
try {
|
|
48
|
+
return GRPCConfigSchema.parse(response)
|
|
49
|
+
} catch (error) {
|
|
50
|
+
// Zod validation error - log detailed information
|
|
51
|
+
consola.error('❌ Zod Validation Failed');
|
|
52
|
+
consola.box({
|
|
53
|
+
title: 'getGrpcConfigConfigRetrieve',
|
|
54
|
+
message: `Path: /cfg/grpc/config/config/\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 getGrpcConfigServerInfoRetrieve( client?: any
|
|
|
57
86
|
): Promise<GRPCServerInfo> {
|
|
58
87
|
const api = client || getAPIInstance()
|
|
59
88
|
const response = await api.cfg_grpc_configuration.grpcConfigServerInfoRetrieve()
|
|
60
|
-
|
|
89
|
+
try {
|
|
90
|
+
return GRPCServerInfoSchema.parse(response)
|
|
91
|
+
} catch (error) {
|
|
92
|
+
// Zod validation error - log detailed information
|
|
93
|
+
consola.error('❌ Zod Validation Failed');
|
|
94
|
+
consola.box({
|
|
95
|
+
title: 'getGrpcConfigServerInfoRetrieve',
|
|
96
|
+
message: `Path: /cfg/grpc/config/server-info/\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
|
|