@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 { RunDemoRequestRequestSchema, type RunDemoRequestRequest } from '../schemas/RunDemoRequestRequest.schema'
|
|
33
34
|
import { StressTestRequestRequestSchema, type StressTestRequestRequest } from '../schemas/StressTestRequestRequest.schema'
|
|
34
35
|
import { TestingActionResponseSchema, type TestingActionResponse } from '../schemas/TestingActionResponse.schema'
|
|
@@ -58,7 +59,35 @@ export async function deleteRqTestingCleanupDestroy( params?: { delete_demo_job
|
|
|
58
59
|
): Promise<TestingActionResponse> {
|
|
59
60
|
const api = client || getAPIInstance()
|
|
60
61
|
const response = await api.cfg_rq_testing.cleanupDestroy(params?.delete_demo_jobs_only, params?.queue, params?.registries)
|
|
61
|
-
|
|
62
|
+
try {
|
|
63
|
+
return TestingActionResponseSchema.parse(response)
|
|
64
|
+
} catch (error) {
|
|
65
|
+
// Zod validation error - log detailed information
|
|
66
|
+
consola.error('❌ Zod Validation Failed');
|
|
67
|
+
consola.box({
|
|
68
|
+
title: 'deleteRqTestingCleanupDestroy',
|
|
69
|
+
message: `Path: /cfg/rq/testing/cleanup/\nMethod: DELETE`,
|
|
70
|
+
style: {
|
|
71
|
+
borderColor: 'red',
|
|
72
|
+
borderStyle: 'rounded'
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
77
|
+
consola.error('Validation Issues:');
|
|
78
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
79
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
80
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
81
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
82
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
consola.error('Response data:', response);
|
|
87
|
+
|
|
88
|
+
// Re-throw the error
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
62
91
|
}
|
|
63
92
|
|
|
64
93
|
|
|
@@ -86,7 +115,35 @@ export async function createRqTestingRunDemoCreate( data: RunDemoRequestRequest
|
|
|
86
115
|
): Promise<TestingActionResponse> {
|
|
87
116
|
const api = client || getAPIInstance()
|
|
88
117
|
const response = await api.cfg_rq_testing.runDemoCreate(data)
|
|
89
|
-
|
|
118
|
+
try {
|
|
119
|
+
return TestingActionResponseSchema.parse(response)
|
|
120
|
+
} catch (error) {
|
|
121
|
+
// Zod validation error - log detailed information
|
|
122
|
+
consola.error('❌ Zod Validation Failed');
|
|
123
|
+
consola.box({
|
|
124
|
+
title: 'createRqTestingRunDemoCreate',
|
|
125
|
+
message: `Path: /cfg/rq/testing/run-demo/\nMethod: POST`,
|
|
126
|
+
style: {
|
|
127
|
+
borderColor: 'red',
|
|
128
|
+
borderStyle: 'rounded'
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
133
|
+
consola.error('Validation Issues:');
|
|
134
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
135
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
136
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
137
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
138
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
consola.error('Response data:', response);
|
|
143
|
+
|
|
144
|
+
// Re-throw the error
|
|
145
|
+
throw error;
|
|
146
|
+
}
|
|
90
147
|
}
|
|
91
148
|
|
|
92
149
|
|
|
@@ -100,7 +157,35 @@ export async function createRqTestingScheduleDemoCreate( data: any, client?: a
|
|
|
100
157
|
): Promise<TestingActionResponse> {
|
|
101
158
|
const api = client || getAPIInstance()
|
|
102
159
|
const response = await api.cfg_rq_testing.scheduleDemoCreate(data)
|
|
103
|
-
|
|
160
|
+
try {
|
|
161
|
+
return TestingActionResponseSchema.parse(response)
|
|
162
|
+
} catch (error) {
|
|
163
|
+
// Zod validation error - log detailed information
|
|
164
|
+
consola.error('❌ Zod Validation Failed');
|
|
165
|
+
consola.box({
|
|
166
|
+
title: 'createRqTestingScheduleDemoCreate',
|
|
167
|
+
message: `Path: /cfg/rq/testing/schedule-demo/\nMethod: POST`,
|
|
168
|
+
style: {
|
|
169
|
+
borderColor: 'red',
|
|
170
|
+
borderStyle: 'rounded'
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
175
|
+
consola.error('Validation Issues:');
|
|
176
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
177
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
178
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
179
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
180
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
consola.error('Response data:', response);
|
|
185
|
+
|
|
186
|
+
// Re-throw the error
|
|
187
|
+
throw error;
|
|
188
|
+
}
|
|
104
189
|
}
|
|
105
190
|
|
|
106
191
|
|
|
@@ -114,7 +199,35 @@ export async function createRqTestingStressTestCreate( data: StressTestRequestR
|
|
|
114
199
|
): Promise<TestingActionResponse> {
|
|
115
200
|
const api = client || getAPIInstance()
|
|
116
201
|
const response = await api.cfg_rq_testing.stressTestCreate(data)
|
|
117
|
-
|
|
202
|
+
try {
|
|
203
|
+
return TestingActionResponseSchema.parse(response)
|
|
204
|
+
} catch (error) {
|
|
205
|
+
// Zod validation error - log detailed information
|
|
206
|
+
consola.error('❌ Zod Validation Failed');
|
|
207
|
+
consola.box({
|
|
208
|
+
title: 'createRqTestingStressTestCreate',
|
|
209
|
+
message: `Path: /cfg/rq/testing/stress-test/\nMethod: POST`,
|
|
210
|
+
style: {
|
|
211
|
+
borderColor: 'red',
|
|
212
|
+
borderStyle: 'rounded'
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
217
|
+
consola.error('Validation Issues:');
|
|
218
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
219
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
220
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
221
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
222
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
consola.error('Response data:', response);
|
|
227
|
+
|
|
228
|
+
// Re-throw the error
|
|
229
|
+
throw error;
|
|
230
|
+
}
|
|
118
231
|
}
|
|
119
232
|
|
|
120
233
|
|
|
@@ -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 { WorkerStatsSchema, type WorkerStats } from '../schemas/WorkerStats.schema'
|
|
33
34
|
import { getAPIInstance } from '../../api-instance'
|
|
34
35
|
|
|
@@ -56,7 +57,35 @@ export async function getRqWorkersStatsRetrieve( client?: any
|
|
|
56
57
|
): Promise<WorkerStats> {
|
|
57
58
|
const api = client || getAPIInstance()
|
|
58
59
|
const response = await api.cfg_rq_workers.statsRetrieve()
|
|
59
|
-
|
|
60
|
+
try {
|
|
61
|
+
return WorkerStatsSchema.parse(response)
|
|
62
|
+
} catch (error) {
|
|
63
|
+
// Zod validation error - log detailed information
|
|
64
|
+
consola.error('❌ Zod Validation Failed');
|
|
65
|
+
consola.box({
|
|
66
|
+
title: 'getRqWorkersStatsRetrieve',
|
|
67
|
+
message: `Path: /cfg/rq/workers/stats/\nMethod: GET`,
|
|
68
|
+
style: {
|
|
69
|
+
borderColor: 'red',
|
|
70
|
+
borderStyle: 'rounded'
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
75
|
+
consola.error('Validation Issues:');
|
|
76
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
77
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
78
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
79
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
80
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
consola.error('Response data:', response);
|
|
85
|
+
|
|
86
|
+
// Re-throw the error
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
60
89
|
}
|
|
61
90
|
|
|
62
91
|
|
|
@@ -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 { MessageSchema, type Message } from '../schemas/Message.schema'
|
|
33
34
|
import { MessageCreateSchema, type MessageCreate } from '../schemas/MessageCreate.schema'
|
|
34
35
|
import { MessageCreateRequestSchema, type MessageCreateRequest } from '../schemas/MessageCreateRequest.schema'
|
|
@@ -51,7 +52,35 @@ export async function getSupportTicketsList( params?: { page?: number; page_siz
|
|
|
51
52
|
): Promise<PaginatedTicketList> {
|
|
52
53
|
const api = client || getAPIInstance()
|
|
53
54
|
const response = await api.cfg_support.ticketsList(params?.page, params?.page_size)
|
|
54
|
-
|
|
55
|
+
try {
|
|
56
|
+
return PaginatedTicketListSchema.parse(response)
|
|
57
|
+
} catch (error) {
|
|
58
|
+
// Zod validation error - log detailed information
|
|
59
|
+
consola.error('❌ Zod Validation Failed');
|
|
60
|
+
consola.box({
|
|
61
|
+
title: 'getSupportTicketsList',
|
|
62
|
+
message: `Path: /cfg/support/tickets/\nMethod: GET`,
|
|
63
|
+
style: {
|
|
64
|
+
borderColor: 'red',
|
|
65
|
+
borderStyle: 'rounded'
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
70
|
+
consola.error('Validation Issues:');
|
|
71
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
72
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
73
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
74
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
75
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
consola.error('Response data:', response);
|
|
80
|
+
|
|
81
|
+
// Re-throw the error
|
|
82
|
+
throw error;
|
|
83
|
+
}
|
|
55
84
|
}
|
|
56
85
|
|
|
57
86
|
|
|
@@ -65,7 +94,35 @@ export async function createSupportTicketsCreate( data: TicketRequest, client?
|
|
|
65
94
|
): Promise<Ticket> {
|
|
66
95
|
const api = client || getAPIInstance()
|
|
67
96
|
const response = await api.cfg_support.ticketsCreate(data)
|
|
68
|
-
|
|
97
|
+
try {
|
|
98
|
+
return TicketSchema.parse(response)
|
|
99
|
+
} catch (error) {
|
|
100
|
+
// Zod validation error - log detailed information
|
|
101
|
+
consola.error('❌ Zod Validation Failed');
|
|
102
|
+
consola.box({
|
|
103
|
+
title: 'createSupportTicketsCreate',
|
|
104
|
+
message: `Path: /cfg/support/tickets/\nMethod: POST`,
|
|
105
|
+
style: {
|
|
106
|
+
borderColor: 'red',
|
|
107
|
+
borderStyle: 'rounded'
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
112
|
+
consola.error('Validation Issues:');
|
|
113
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
114
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
115
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
116
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
117
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
consola.error('Response data:', response);
|
|
122
|
+
|
|
123
|
+
// Re-throw the error
|
|
124
|
+
throw error;
|
|
125
|
+
}
|
|
69
126
|
}
|
|
70
127
|
|
|
71
128
|
|
|
@@ -79,7 +136,35 @@ export async function getSupportTicketsMessagesList( ticket_uuid: string, param
|
|
|
79
136
|
): Promise<PaginatedMessageList> {
|
|
80
137
|
const api = client || getAPIInstance()
|
|
81
138
|
const response = await api.cfg_support.ticketsMessagesList(ticket_uuid, params?.page, params?.page_size)
|
|
82
|
-
|
|
139
|
+
try {
|
|
140
|
+
return PaginatedMessageListSchema.parse(response)
|
|
141
|
+
} catch (error) {
|
|
142
|
+
// Zod validation error - log detailed information
|
|
143
|
+
consola.error('❌ Zod Validation Failed');
|
|
144
|
+
consola.box({
|
|
145
|
+
title: 'getSupportTicketsMessagesList',
|
|
146
|
+
message: `Path: /cfg/support/tickets/{ticket_uuid}/messages/\nMethod: GET`,
|
|
147
|
+
style: {
|
|
148
|
+
borderColor: 'red',
|
|
149
|
+
borderStyle: 'rounded'
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
154
|
+
consola.error('Validation Issues:');
|
|
155
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
156
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
157
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
158
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
159
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
consola.error('Response data:', response);
|
|
164
|
+
|
|
165
|
+
// Re-throw the error
|
|
166
|
+
throw error;
|
|
167
|
+
}
|
|
83
168
|
}
|
|
84
169
|
|
|
85
170
|
|
|
@@ -93,7 +178,35 @@ export async function createSupportTicketsMessagesCreate( ticket_uuid: string,
|
|
|
93
178
|
): Promise<MessageCreate> {
|
|
94
179
|
const api = client || getAPIInstance()
|
|
95
180
|
const response = await api.cfg_support.ticketsMessagesCreate(ticket_uuid, data)
|
|
96
|
-
|
|
181
|
+
try {
|
|
182
|
+
return MessageCreateSchema.parse(response)
|
|
183
|
+
} catch (error) {
|
|
184
|
+
// Zod validation error - log detailed information
|
|
185
|
+
consola.error('❌ Zod Validation Failed');
|
|
186
|
+
consola.box({
|
|
187
|
+
title: 'createSupportTicketsMessagesCreate',
|
|
188
|
+
message: `Path: /cfg/support/tickets/{ticket_uuid}/messages/\nMethod: POST`,
|
|
189
|
+
style: {
|
|
190
|
+
borderColor: 'red',
|
|
191
|
+
borderStyle: 'rounded'
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
196
|
+
consola.error('Validation Issues:');
|
|
197
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
198
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
199
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
200
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
201
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
consola.error('Response data:', response);
|
|
206
|
+
|
|
207
|
+
// Re-throw the error
|
|
208
|
+
throw error;
|
|
209
|
+
}
|
|
97
210
|
}
|
|
98
211
|
|
|
99
212
|
|
|
@@ -107,7 +220,35 @@ export async function getSupportTicketsMessagesRetrieve( ticket_uuid: string, u
|
|
|
107
220
|
): Promise<Message> {
|
|
108
221
|
const api = client || getAPIInstance()
|
|
109
222
|
const response = await api.cfg_support.ticketsMessagesRetrieve(ticket_uuid, uuid)
|
|
110
|
-
|
|
223
|
+
try {
|
|
224
|
+
return MessageSchema.parse(response)
|
|
225
|
+
} catch (error) {
|
|
226
|
+
// Zod validation error - log detailed information
|
|
227
|
+
consola.error('❌ Zod Validation Failed');
|
|
228
|
+
consola.box({
|
|
229
|
+
title: 'getSupportTicketsMessagesRetrieve',
|
|
230
|
+
message: `Path: /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/\nMethod: GET`,
|
|
231
|
+
style: {
|
|
232
|
+
borderColor: 'red',
|
|
233
|
+
borderStyle: 'rounded'
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
238
|
+
consola.error('Validation Issues:');
|
|
239
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
240
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
241
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
242
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
243
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
consola.error('Response data:', response);
|
|
248
|
+
|
|
249
|
+
// Re-throw the error
|
|
250
|
+
throw error;
|
|
251
|
+
}
|
|
111
252
|
}
|
|
112
253
|
|
|
113
254
|
|
|
@@ -121,7 +262,35 @@ export async function updateSupportTicketsMessagesUpdate( ticket_uuid: string,
|
|
|
121
262
|
): Promise<Message> {
|
|
122
263
|
const api = client || getAPIInstance()
|
|
123
264
|
const response = await api.cfg_support.ticketsMessagesUpdate(ticket_uuid, uuid, data)
|
|
124
|
-
|
|
265
|
+
try {
|
|
266
|
+
return MessageSchema.parse(response)
|
|
267
|
+
} catch (error) {
|
|
268
|
+
// Zod validation error - log detailed information
|
|
269
|
+
consola.error('❌ Zod Validation Failed');
|
|
270
|
+
consola.box({
|
|
271
|
+
title: 'updateSupportTicketsMessagesUpdate',
|
|
272
|
+
message: `Path: /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/\nMethod: PUT`,
|
|
273
|
+
style: {
|
|
274
|
+
borderColor: 'red',
|
|
275
|
+
borderStyle: 'rounded'
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
280
|
+
consola.error('Validation Issues:');
|
|
281
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
282
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
283
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
284
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
285
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
consola.error('Response data:', response);
|
|
290
|
+
|
|
291
|
+
// Re-throw the error
|
|
292
|
+
throw error;
|
|
293
|
+
}
|
|
125
294
|
}
|
|
126
295
|
|
|
127
296
|
|
|
@@ -135,7 +304,35 @@ export async function partialUpdateSupportTicketsMessagesPartialUpdate( ticket_
|
|
|
135
304
|
): Promise<Message> {
|
|
136
305
|
const api = client || getAPIInstance()
|
|
137
306
|
const response = await api.cfg_support.ticketsMessagesPartialUpdate(ticket_uuid, uuid, data)
|
|
138
|
-
|
|
307
|
+
try {
|
|
308
|
+
return MessageSchema.parse(response)
|
|
309
|
+
} catch (error) {
|
|
310
|
+
// Zod validation error - log detailed information
|
|
311
|
+
consola.error('❌ Zod Validation Failed');
|
|
312
|
+
consola.box({
|
|
313
|
+
title: 'partialUpdateSupportTicketsMessagesPartialUpdate',
|
|
314
|
+
message: `Path: /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/\nMethod: PATCH`,
|
|
315
|
+
style: {
|
|
316
|
+
borderColor: 'red',
|
|
317
|
+
borderStyle: 'rounded'
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
322
|
+
consola.error('Validation Issues:');
|
|
323
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
324
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
325
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
326
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
327
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
consola.error('Response data:', response);
|
|
332
|
+
|
|
333
|
+
// Re-throw the error
|
|
334
|
+
throw error;
|
|
335
|
+
}
|
|
139
336
|
}
|
|
140
337
|
|
|
141
338
|
|
|
@@ -163,7 +360,35 @@ export async function getSupportTicketsRetrieve( uuid: string, client?: any
|
|
|
163
360
|
): Promise<Ticket> {
|
|
164
361
|
const api = client || getAPIInstance()
|
|
165
362
|
const response = await api.cfg_support.ticketsRetrieve(uuid)
|
|
166
|
-
|
|
363
|
+
try {
|
|
364
|
+
return TicketSchema.parse(response)
|
|
365
|
+
} catch (error) {
|
|
366
|
+
// Zod validation error - log detailed information
|
|
367
|
+
consola.error('❌ Zod Validation Failed');
|
|
368
|
+
consola.box({
|
|
369
|
+
title: 'getSupportTicketsRetrieve',
|
|
370
|
+
message: `Path: /cfg/support/tickets/{uuid}/\nMethod: GET`,
|
|
371
|
+
style: {
|
|
372
|
+
borderColor: 'red',
|
|
373
|
+
borderStyle: 'rounded'
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
378
|
+
consola.error('Validation Issues:');
|
|
379
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
380
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
381
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
382
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
383
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
consola.error('Response data:', response);
|
|
388
|
+
|
|
389
|
+
// Re-throw the error
|
|
390
|
+
throw error;
|
|
391
|
+
}
|
|
167
392
|
}
|
|
168
393
|
|
|
169
394
|
|
|
@@ -177,7 +402,35 @@ export async function updateSupportTicketsUpdate( uuid: string, data: TicketReq
|
|
|
177
402
|
): Promise<Ticket> {
|
|
178
403
|
const api = client || getAPIInstance()
|
|
179
404
|
const response = await api.cfg_support.ticketsUpdate(uuid, data)
|
|
180
|
-
|
|
405
|
+
try {
|
|
406
|
+
return TicketSchema.parse(response)
|
|
407
|
+
} catch (error) {
|
|
408
|
+
// Zod validation error - log detailed information
|
|
409
|
+
consola.error('❌ Zod Validation Failed');
|
|
410
|
+
consola.box({
|
|
411
|
+
title: 'updateSupportTicketsUpdate',
|
|
412
|
+
message: `Path: /cfg/support/tickets/{uuid}/\nMethod: PUT`,
|
|
413
|
+
style: {
|
|
414
|
+
borderColor: 'red',
|
|
415
|
+
borderStyle: 'rounded'
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
420
|
+
consola.error('Validation Issues:');
|
|
421
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
422
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
423
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
424
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
425
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
consola.error('Response data:', response);
|
|
430
|
+
|
|
431
|
+
// Re-throw the error
|
|
432
|
+
throw error;
|
|
433
|
+
}
|
|
181
434
|
}
|
|
182
435
|
|
|
183
436
|
|
|
@@ -191,7 +444,35 @@ export async function partialUpdateSupportTicketsPartialUpdate( uuid: string, d
|
|
|
191
444
|
): Promise<Ticket> {
|
|
192
445
|
const api = client || getAPIInstance()
|
|
193
446
|
const response = await api.cfg_support.ticketsPartialUpdate(uuid, data)
|
|
194
|
-
|
|
447
|
+
try {
|
|
448
|
+
return TicketSchema.parse(response)
|
|
449
|
+
} catch (error) {
|
|
450
|
+
// Zod validation error - log detailed information
|
|
451
|
+
consola.error('❌ Zod Validation Failed');
|
|
452
|
+
consola.box({
|
|
453
|
+
title: 'partialUpdateSupportTicketsPartialUpdate',
|
|
454
|
+
message: `Path: /cfg/support/tickets/{uuid}/\nMethod: PATCH`,
|
|
455
|
+
style: {
|
|
456
|
+
borderColor: 'red',
|
|
457
|
+
borderStyle: 'rounded'
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
462
|
+
consola.error('Validation Issues:');
|
|
463
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
464
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
465
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
466
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
467
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
consola.error('Response data:', response);
|
|
472
|
+
|
|
473
|
+
// Re-throw the error
|
|
474
|
+
throw error;
|
|
475
|
+
}
|
|
195
476
|
}
|
|
196
477
|
|
|
197
478
|
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* * Serializer for application-specific statistics.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
|
+
import { AppStatisticsDataSchema } from './AppStatisticsData.schema'
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Serializer for application-specific statistics.
|
|
11
12
|
*/
|
|
12
13
|
export const AppStatisticsSchema = z.object({
|
|
13
14
|
app_name: z.string(),
|
|
14
|
-
statistics:
|
|
15
|
+
statistics: AppStatisticsDataSchema,
|
|
15
16
|
})
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for AppStatisticsData
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for application statistics data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for application statistics data.
|
|
11
|
+
*/
|
|
12
|
+
export const AppStatisticsDataSchema = z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
total_records: z.int(),
|
|
15
|
+
model_count: z.int(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type AppStatisticsData = z.infer<typeof AppStatisticsDataSchema>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for AxesConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Django-Axes brute-force protection configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Django-Axes brute-force protection configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const AxesConfigSchema = z.object({
|
|
13
|
+
enabled: z.boolean().nullable().optional(),
|
|
14
|
+
failure_limit: z.int().nullable().optional(),
|
|
15
|
+
cooloff_time: z.int().nullable().optional(),
|
|
16
|
+
lock_out_at_failure: z.boolean().nullable().optional(),
|
|
17
|
+
reset_on_success: z.boolean().nullable().optional(),
|
|
18
|
+
only_user_failures: z.boolean().nullable().optional(),
|
|
19
|
+
lockout_template: z.string().nullable().optional(),
|
|
20
|
+
lockout_url: z.string().nullable().optional(),
|
|
21
|
+
verbose: z.boolean().nullable().optional(),
|
|
22
|
+
enable_access_failure_log: z.boolean().nullable().optional(),
|
|
23
|
+
ipware_proxy_count: z.int().nullable().optional(),
|
|
24
|
+
ipware_meta_precedence_order: z.array(z.string()).nullable().optional(),
|
|
25
|
+
allowed_ips: z.array(z.string()).nullable().optional(),
|
|
26
|
+
denied_ips: z.array(z.string()).nullable().optional(),
|
|
27
|
+
cache_name: z.string().nullable().optional(),
|
|
28
|
+
use_user_agent: z.boolean().nullable().optional(),
|
|
29
|
+
username_form_field: z.string().nullable().optional(),
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Infer TypeScript type from Zod schema
|
|
34
|
+
*/
|
|
35
|
+
export type AxesConfig = z.infer<typeof AxesConfigSchema>
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
* * Channels result wrapper.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
|
+
import { CentrifugoChannelInfoSchema } from './CentrifugoChannelInfo.schema'
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Channels result wrapper.
|
|
11
12
|
*/
|
|
12
13
|
export const CentrifugoChannelsResultSchema = z.object({
|
|
13
|
-
channels: z.record(z.string(),
|
|
14
|
+
channels: z.record(z.string(), CentrifugoChannelInfoSchema),
|
|
14
15
|
})
|
|
15
16
|
|
|
16
17
|
/**
|