@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.26",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "DjangoCFG",
|
|
6
6
|
"url": "https://djangocfg.com"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@types/node": "^22.15.3",
|
|
69
69
|
"@types/react": "19.2.2",
|
|
70
70
|
"@types/react-dom": "19.2.1",
|
|
71
|
-
"@djangocfg/typescript-config": "^1.2.
|
|
71
|
+
"@djangocfg/typescript-config": "^1.2.26",
|
|
72
72
|
"react": "^19.1.0",
|
|
73
73
|
"react-dom": "^19.1.0",
|
|
74
74
|
"tsup": "^8.5.0",
|
|
@@ -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 { OTPRequestRequestSchema, type OTPRequestRequest } from '../schemas/OTPRequestRequest.schema'
|
|
33
34
|
import { OTPRequestResponseSchema, type OTPRequestResponse } from '../schemas/OTPRequestResponse.schema'
|
|
34
35
|
import { OTPVerifyRequestSchema, type OTPVerifyRequest } from '../schemas/OTPVerifyRequest.schema'
|
|
@@ -45,7 +46,35 @@ export async function createAccountsOtpRequestCreate( data: OTPRequestRequest,
|
|
|
45
46
|
): Promise<OTPRequestResponse> {
|
|
46
47
|
const api = client || getAPIInstance()
|
|
47
48
|
const response = await api.cfg_accounts.otpRequestCreate(data)
|
|
48
|
-
|
|
49
|
+
try {
|
|
50
|
+
return OTPRequestResponseSchema.parse(response)
|
|
51
|
+
} catch (error) {
|
|
52
|
+
// Zod validation error - log detailed information
|
|
53
|
+
consola.error('❌ Zod Validation Failed');
|
|
54
|
+
consola.box({
|
|
55
|
+
title: 'createAccountsOtpRequestCreate',
|
|
56
|
+
message: `Path: /cfg/accounts/otp/request/\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 createAccountsOtpVerifyCreate( data: OTPVerifyRequest, c
|
|
|
59
88
|
): Promise<OTPVerifyResponse> {
|
|
60
89
|
const api = client || getAPIInstance()
|
|
61
90
|
const response = await api.cfg_accounts.otpVerifyCreate(data)
|
|
62
|
-
|
|
91
|
+
try {
|
|
92
|
+
return OTPVerifyResponseSchema.parse(response)
|
|
93
|
+
} catch (error) {
|
|
94
|
+
// Zod validation error - log detailed information
|
|
95
|
+
consola.error('❌ Zod Validation Failed');
|
|
96
|
+
consola.box({
|
|
97
|
+
title: 'createAccountsOtpVerifyCreate',
|
|
98
|
+
message: `Path: /cfg/accounts/otp/verify/\nMethod: POST`,
|
|
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
|
|
|
@@ -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 { TokenRefreshSchema, type TokenRefresh } from '../schemas/TokenRefresh.schema'
|
|
33
34
|
import { TokenRefreshRequestSchema, type TokenRefreshRequest } from '../schemas/TokenRefreshRequest.schema'
|
|
34
35
|
import { getAPIInstance } from '../../api-instance'
|
|
@@ -43,7 +44,35 @@ export async function createAccountsTokenRefreshCreate( data: TokenRefreshReque
|
|
|
43
44
|
): Promise<TokenRefresh> {
|
|
44
45
|
const api = client || getAPIInstance()
|
|
45
46
|
const response = await api.cfg_auth.accountsTokenRefreshCreate(data)
|
|
46
|
-
|
|
47
|
+
try {
|
|
48
|
+
return TokenRefreshSchema.parse(response)
|
|
49
|
+
} catch (error) {
|
|
50
|
+
// Zod validation error - log detailed information
|
|
51
|
+
consola.error('❌ Zod Validation Failed');
|
|
52
|
+
consola.box({
|
|
53
|
+
title: 'createAccountsTokenRefreshCreate',
|
|
54
|
+
message: `Path: /cfg/accounts/token/refresh/\nMethod: POST`,
|
|
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
|
|
|
@@ -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 { PatchedUserProfileUpdateRequestSchema, type PatchedUserProfileUpdateRequest } from '../schemas/PatchedUserProfileUpdateRequest.schema'
|
|
33
34
|
import { UserSchema, type User } from '../schemas/User.schema'
|
|
34
35
|
import { UserProfileUpdateRequestSchema, type UserProfileUpdateRequest } from '../schemas/UserProfileUpdateRequest.schema'
|
|
@@ -44,7 +45,35 @@ export async function getAccountsProfileRetrieve( client?: any
|
|
|
44
45
|
): Promise<User> {
|
|
45
46
|
const api = client || getAPIInstance()
|
|
46
47
|
const response = await api.cfg_user_profile.accountsProfileRetrieve()
|
|
47
|
-
|
|
48
|
+
try {
|
|
49
|
+
return UserSchema.parse(response)
|
|
50
|
+
} catch (error) {
|
|
51
|
+
// Zod validation error - log detailed information
|
|
52
|
+
consola.error('❌ Zod Validation Failed');
|
|
53
|
+
consola.box({
|
|
54
|
+
title: 'getAccountsProfileRetrieve',
|
|
55
|
+
message: `Path: /cfg/accounts/profile/\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 createAccountsProfileAvatarCreate( data: any, client?: a
|
|
|
58
87
|
): Promise<User> {
|
|
59
88
|
const api = client || getAPIInstance()
|
|
60
89
|
const response = await api.cfg_user_profile.accountsProfileAvatarCreate(data)
|
|
61
|
-
|
|
90
|
+
try {
|
|
91
|
+
return UserSchema.parse(response)
|
|
92
|
+
} catch (error) {
|
|
93
|
+
// Zod validation error - log detailed information
|
|
94
|
+
consola.error('❌ Zod Validation Failed');
|
|
95
|
+
consola.box({
|
|
96
|
+
title: 'createAccountsProfileAvatarCreate',
|
|
97
|
+
message: `Path: /cfg/accounts/profile/avatar/\nMethod: POST`,
|
|
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 partialUpdateAccountsProfilePartialUpdate( data: UserProf
|
|
|
72
129
|
): Promise<User> {
|
|
73
130
|
const api = client || getAPIInstance()
|
|
74
131
|
const response = await api.cfg_user_profile.accountsProfilePartialUpdate(data)
|
|
75
|
-
|
|
132
|
+
try {
|
|
133
|
+
return UserSchema.parse(response)
|
|
134
|
+
} catch (error) {
|
|
135
|
+
// Zod validation error - log detailed information
|
|
136
|
+
consola.error('❌ Zod Validation Failed');
|
|
137
|
+
consola.box({
|
|
138
|
+
title: 'partialUpdateAccountsProfilePartialUpdate',
|
|
139
|
+
message: `Path: /cfg/accounts/profile/partial/\nMethod: PUT`,
|
|
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
|
|
|
@@ -86,7 +171,35 @@ export async function partialUpdateAccountsProfilePartialPartialUpdate( data?:
|
|
|
86
171
|
): Promise<User> {
|
|
87
172
|
const api = client || getAPIInstance()
|
|
88
173
|
const response = await api.cfg_user_profile.accountsProfilePartialPartialUpdate(data)
|
|
89
|
-
|
|
174
|
+
try {
|
|
175
|
+
return UserSchema.parse(response)
|
|
176
|
+
} catch (error) {
|
|
177
|
+
// Zod validation error - log detailed information
|
|
178
|
+
consola.error('❌ Zod Validation Failed');
|
|
179
|
+
consola.box({
|
|
180
|
+
title: 'partialUpdateAccountsProfilePartialPartialUpdate',
|
|
181
|
+
message: `Path: /cfg/accounts/profile/partial/\nMethod: PATCH`,
|
|
182
|
+
style: {
|
|
183
|
+
borderColor: 'red',
|
|
184
|
+
borderStyle: 'rounded'
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
189
|
+
consola.error('Validation Issues:');
|
|
190
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
191
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
192
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
193
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
194
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
consola.error('Response data:', response);
|
|
199
|
+
|
|
200
|
+
// Re-throw the error
|
|
201
|
+
throw error;
|
|
202
|
+
}
|
|
90
203
|
}
|
|
91
204
|
|
|
92
205
|
|
|
@@ -100,7 +213,35 @@ export async function updateAccountsProfileUpdateUpdate( data: UserProfileUpdat
|
|
|
100
213
|
): Promise<User> {
|
|
101
214
|
const api = client || getAPIInstance()
|
|
102
215
|
const response = await api.cfg_user_profile.accountsProfileUpdateUpdate(data)
|
|
103
|
-
|
|
216
|
+
try {
|
|
217
|
+
return UserSchema.parse(response)
|
|
218
|
+
} catch (error) {
|
|
219
|
+
// Zod validation error - log detailed information
|
|
220
|
+
consola.error('❌ Zod Validation Failed');
|
|
221
|
+
consola.box({
|
|
222
|
+
title: 'updateAccountsProfileUpdateUpdate',
|
|
223
|
+
message: `Path: /cfg/accounts/profile/update/\nMethod: PUT`,
|
|
224
|
+
style: {
|
|
225
|
+
borderColor: 'red',
|
|
226
|
+
borderStyle: 'rounded'
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
231
|
+
consola.error('Validation Issues:');
|
|
232
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
233
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
234
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
235
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
236
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
consola.error('Response data:', response);
|
|
241
|
+
|
|
242
|
+
// Re-throw the error
|
|
243
|
+
throw error;
|
|
244
|
+
}
|
|
104
245
|
}
|
|
105
246
|
|
|
106
247
|
|
|
@@ -114,7 +255,35 @@ export async function partialUpdateAccountsProfileUpdatePartialUpdate( data?: P
|
|
|
114
255
|
): Promise<User> {
|
|
115
256
|
const api = client || getAPIInstance()
|
|
116
257
|
const response = await api.cfg_user_profile.accountsProfileUpdatePartialUpdate(data)
|
|
117
|
-
|
|
258
|
+
try {
|
|
259
|
+
return UserSchema.parse(response)
|
|
260
|
+
} catch (error) {
|
|
261
|
+
// Zod validation error - log detailed information
|
|
262
|
+
consola.error('❌ Zod Validation Failed');
|
|
263
|
+
consola.box({
|
|
264
|
+
title: 'partialUpdateAccountsProfileUpdatePartialUpdate',
|
|
265
|
+
message: `Path: /cfg/accounts/profile/update/\nMethod: PATCH`,
|
|
266
|
+
style: {
|
|
267
|
+
borderColor: 'red',
|
|
268
|
+
borderStyle: 'rounded'
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
273
|
+
consola.error('Validation Issues:');
|
|
274
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
275
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
276
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
277
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
278
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
consola.error('Response data:', response);
|
|
283
|
+
|
|
284
|
+
// Re-throw the error
|
|
285
|
+
throw error;
|
|
286
|
+
}
|
|
118
287
|
}
|
|
119
288
|
|
|
120
289
|
|
|
@@ -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 { PublishSchema, type Publish } from '../schemas/Publish.schema'
|
|
33
34
|
import { getAPIInstance } from '../../api-instance'
|
|
34
35
|
|
|
@@ -42,7 +43,35 @@ export async function getCentrifugoMonitorChannelsRetrieve( client?: any
|
|
|
42
43
|
): Promise<Publish> {
|
|
43
44
|
const api = client || getAPIInstance()
|
|
44
45
|
const response = await api.cfg_centrifugo.monitorChannelsRetrieve()
|
|
45
|
-
|
|
46
|
+
try {
|
|
47
|
+
return PublishSchema.parse(response)
|
|
48
|
+
} catch (error) {
|
|
49
|
+
// Zod validation error - log detailed information
|
|
50
|
+
consola.error('❌ Zod Validation Failed');
|
|
51
|
+
consola.box({
|
|
52
|
+
title: 'getCentrifugoMonitorChannelsRetrieve',
|
|
53
|
+
message: `Path: /cfg/centrifugo/monitor/channels/\nMethod: GET`,
|
|
54
|
+
style: {
|
|
55
|
+
borderColor: 'red',
|
|
56
|
+
borderStyle: 'rounded'
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
61
|
+
consola.error('Validation Issues:');
|
|
62
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
63
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
64
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
65
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
66
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
consola.error('Response data:', response);
|
|
71
|
+
|
|
72
|
+
// Re-throw the error
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
46
75
|
}
|
|
47
76
|
|
|
48
77
|
|
|
@@ -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 { CentrifugoChannelsRequestRequestSchema, type CentrifugoChannelsRequestRequest } from '../schemas/CentrifugoChannelsRequestRequest.schema'
|
|
33
34
|
import { CentrifugoChannelsResponseSchema, type CentrifugoChannelsResponse } from '../schemas/CentrifugoChannelsResponse.schema'
|
|
34
35
|
import { CentrifugoHistoryRequestRequestSchema, type CentrifugoHistoryRequestRequest } from '../schemas/CentrifugoHistoryRequestRequest.schema'
|
|
@@ -64,7 +65,35 @@ export async function createCentrifugoServerChannelsCreate( data: CentrifugoCha
|
|
|
64
65
|
): Promise<CentrifugoChannelsResponse> {
|
|
65
66
|
const api = client || getAPIInstance()
|
|
66
67
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerChannelsCreate(data)
|
|
67
|
-
|
|
68
|
+
try {
|
|
69
|
+
return CentrifugoChannelsResponseSchema.parse(response)
|
|
70
|
+
} catch (error) {
|
|
71
|
+
// Zod validation error - log detailed information
|
|
72
|
+
consola.error('❌ Zod Validation Failed');
|
|
73
|
+
consola.box({
|
|
74
|
+
title: 'createCentrifugoServerChannelsCreate',
|
|
75
|
+
message: `Path: /cfg/centrifugo/server/channels/\nMethod: POST`,
|
|
76
|
+
style: {
|
|
77
|
+
borderColor: 'red',
|
|
78
|
+
borderStyle: 'rounded'
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
83
|
+
consola.error('Validation Issues:');
|
|
84
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
85
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
86
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
87
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
88
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
consola.error('Response data:', response);
|
|
93
|
+
|
|
94
|
+
// Re-throw the error
|
|
95
|
+
throw error;
|
|
96
|
+
}
|
|
68
97
|
}
|
|
69
98
|
|
|
70
99
|
|
|
@@ -78,7 +107,35 @@ export async function createCentrifugoServerHistoryCreate( data: CentrifugoHist
|
|
|
78
107
|
): Promise<CentrifugoHistoryResponse> {
|
|
79
108
|
const api = client || getAPIInstance()
|
|
80
109
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerHistoryCreate(data)
|
|
81
|
-
|
|
110
|
+
try {
|
|
111
|
+
return CentrifugoHistoryResponseSchema.parse(response)
|
|
112
|
+
} catch (error) {
|
|
113
|
+
// Zod validation error - log detailed information
|
|
114
|
+
consola.error('❌ Zod Validation Failed');
|
|
115
|
+
consola.box({
|
|
116
|
+
title: 'createCentrifugoServerHistoryCreate',
|
|
117
|
+
message: `Path: /cfg/centrifugo/server/history/\nMethod: POST`,
|
|
118
|
+
style: {
|
|
119
|
+
borderColor: 'red',
|
|
120
|
+
borderStyle: 'rounded'
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
125
|
+
consola.error('Validation Issues:');
|
|
126
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
127
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
128
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
129
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
130
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
consola.error('Response data:', response);
|
|
135
|
+
|
|
136
|
+
// Re-throw the error
|
|
137
|
+
throw error;
|
|
138
|
+
}
|
|
82
139
|
}
|
|
83
140
|
|
|
84
141
|
|
|
@@ -92,7 +149,35 @@ export async function createCentrifugoServerInfoCreate( client?: any
|
|
|
92
149
|
): Promise<CentrifugoInfoResponse> {
|
|
93
150
|
const api = client || getAPIInstance()
|
|
94
151
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerInfoCreate()
|
|
95
|
-
|
|
152
|
+
try {
|
|
153
|
+
return CentrifugoInfoResponseSchema.parse(response)
|
|
154
|
+
} catch (error) {
|
|
155
|
+
// Zod validation error - log detailed information
|
|
156
|
+
consola.error('❌ Zod Validation Failed');
|
|
157
|
+
consola.box({
|
|
158
|
+
title: 'createCentrifugoServerInfoCreate',
|
|
159
|
+
message: `Path: /cfg/centrifugo/server/info/\nMethod: POST`,
|
|
160
|
+
style: {
|
|
161
|
+
borderColor: 'red',
|
|
162
|
+
borderStyle: 'rounded'
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
167
|
+
consola.error('Validation Issues:');
|
|
168
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
169
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
170
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
171
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
172
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
consola.error('Response data:', response);
|
|
177
|
+
|
|
178
|
+
// Re-throw the error
|
|
179
|
+
throw error;
|
|
180
|
+
}
|
|
96
181
|
}
|
|
97
182
|
|
|
98
183
|
|
|
@@ -106,7 +191,35 @@ export async function createCentrifugoServerPresenceCreate( data: CentrifugoPre
|
|
|
106
191
|
): Promise<CentrifugoPresenceResponse> {
|
|
107
192
|
const api = client || getAPIInstance()
|
|
108
193
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerPresenceCreate(data)
|
|
109
|
-
|
|
194
|
+
try {
|
|
195
|
+
return CentrifugoPresenceResponseSchema.parse(response)
|
|
196
|
+
} catch (error) {
|
|
197
|
+
// Zod validation error - log detailed information
|
|
198
|
+
consola.error('❌ Zod Validation Failed');
|
|
199
|
+
consola.box({
|
|
200
|
+
title: 'createCentrifugoServerPresenceCreate',
|
|
201
|
+
message: `Path: /cfg/centrifugo/server/presence/\nMethod: POST`,
|
|
202
|
+
style: {
|
|
203
|
+
borderColor: 'red',
|
|
204
|
+
borderStyle: 'rounded'
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
209
|
+
consola.error('Validation Issues:');
|
|
210
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
211
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
212
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
213
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
214
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
consola.error('Response data:', response);
|
|
219
|
+
|
|
220
|
+
// Re-throw the error
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
110
223
|
}
|
|
111
224
|
|
|
112
225
|
|
|
@@ -120,7 +233,35 @@ export async function createCentrifugoServerPresenceStatsCreate( data: Centrifu
|
|
|
120
233
|
): Promise<CentrifugoPresenceStatsResponse> {
|
|
121
234
|
const api = client || getAPIInstance()
|
|
122
235
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerPresenceStatsCreate(data)
|
|
123
|
-
|
|
236
|
+
try {
|
|
237
|
+
return CentrifugoPresenceStatsResponseSchema.parse(response)
|
|
238
|
+
} catch (error) {
|
|
239
|
+
// Zod validation error - log detailed information
|
|
240
|
+
consola.error('❌ Zod Validation Failed');
|
|
241
|
+
consola.box({
|
|
242
|
+
title: 'createCentrifugoServerPresenceStatsCreate',
|
|
243
|
+
message: `Path: /cfg/centrifugo/server/presence-stats/\nMethod: POST`,
|
|
244
|
+
style: {
|
|
245
|
+
borderColor: 'red',
|
|
246
|
+
borderStyle: 'rounded'
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
251
|
+
consola.error('Validation Issues:');
|
|
252
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
253
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
254
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
255
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
256
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
consola.error('Response data:', response);
|
|
261
|
+
|
|
262
|
+
// Re-throw the error
|
|
263
|
+
throw error;
|
|
264
|
+
}
|
|
124
265
|
}
|
|
125
266
|
|
|
126
267
|
|
|
@@ -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 { ConnectionTokenResponseSchema, type ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
|
|
33
34
|
import { getAPIInstance } from '../../api-instance'
|
|
34
35
|
|
|
@@ -42,7 +43,35 @@ export async function getCentrifugoAuthTokenRetrieve( client?: any
|
|
|
42
43
|
): Promise<ConnectionTokenResponse> {
|
|
43
44
|
const api = client || getAPIInstance()
|
|
44
45
|
const response = await api.cfg_centrifugo_auth.tokenRetrieve()
|
|
45
|
-
|
|
46
|
+
try {
|
|
47
|
+
return ConnectionTokenResponseSchema.parse(response)
|
|
48
|
+
} catch (error) {
|
|
49
|
+
// Zod validation error - log detailed information
|
|
50
|
+
consola.error('❌ Zod Validation Failed');
|
|
51
|
+
consola.box({
|
|
52
|
+
title: 'getCentrifugoAuthTokenRetrieve',
|
|
53
|
+
message: `Path: /cfg/centrifugo/auth/token/\nMethod: GET`,
|
|
54
|
+
style: {
|
|
55
|
+
borderColor: 'red',
|
|
56
|
+
borderStyle: 'rounded'
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
61
|
+
consola.error('Validation Issues:');
|
|
62
|
+
(error as any).issues.forEach((issue: any, index: number) => {
|
|
63
|
+
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
64
|
+
consola.error(` ├─ Message: ${issue.message}`);
|
|
65
|
+
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
66
|
+
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
consola.error('Response data:', response);
|
|
71
|
+
|
|
72
|
+
// Re-throw the error
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
46
75
|
}
|
|
47
76
|
|
|
48
77
|
|