@djangocfg/api 2.1.97 → 2.1.100
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/auth-server.cjs +333 -313
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +333 -313
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +441 -383
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +36 -1
- package/dist/auth.d.ts +36 -1
- package/dist/auth.mjs +441 -383
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +458 -383
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +55 -1
- package/dist/clients.d.ts +55 -1
- package/dist/clients.mjs +458 -383
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +184 -111
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +48 -1
- package/dist/hooks.d.ts +48 -1
- package/dist/hooks.mjs +184 -111
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +382 -313
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -5
- package/dist/index.d.ts +58 -5
- package/dist/index.mjs +382 -313
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/auth/hooks/index.ts +7 -0
- package/src/auth/hooks/useDeleteAccount.ts +90 -0
- package/src/generated/cfg_accounts/CLAUDE.md +4 -3
- package/src/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +58 -0
- package/src/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +19 -0
- package/src/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts +20 -0
- package/src/generated/cfg_accounts/_utils/schemas/index.ts +1 -0
- package/src/generated/cfg_accounts/accounts__user_profile/client.ts +14 -0
- package/src/generated/cfg_accounts/accounts__user_profile/models.ts +12 -0
- package/src/generated/cfg_accounts/schema.json +69 -0
package/dist/hooks.cjs
CHANGED
|
@@ -40,6 +40,7 @@ __export(hooks_exports, {
|
|
|
40
40
|
useCreateAccountsOtpRequestCreate: () => useCreateAccountsOtpRequestCreate,
|
|
41
41
|
useCreateAccountsOtpVerifyCreate: () => useCreateAccountsOtpVerifyCreate,
|
|
42
42
|
useCreateAccountsProfileAvatarCreate: () => useCreateAccountsProfileAvatarCreate,
|
|
43
|
+
useCreateAccountsProfileDeleteCreate: () => useCreateAccountsProfileDeleteCreate,
|
|
43
44
|
useCreateAccountsTokenRefreshCreate: () => useCreateAccountsTokenRefreshCreate,
|
|
44
45
|
usePartialUpdateAccountsProfilePartialPartialUpdate: () => usePartialUpdateAccountsProfilePartialPartialUpdate,
|
|
45
46
|
usePartialUpdateAccountsProfilePartialUpdate: () => usePartialUpdateAccountsProfilePartialUpdate,
|
|
@@ -164,6 +165,19 @@ var UserProfile = class {
|
|
|
164
165
|
const response = await this.client.request("POST", "/cfg/accounts/profile/avatar/", { formData });
|
|
165
166
|
return response;
|
|
166
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Delete user account
|
|
170
|
+
*
|
|
171
|
+
* Permanently delete the current user's account. This operation: -
|
|
172
|
+
* Deactivates the account (user cannot log in) - Anonymizes personal data
|
|
173
|
+
* (GDPR compliance) - Frees up the email address for re-registration -
|
|
174
|
+
* Preserves audit trail The account can be restored by an administrator if
|
|
175
|
+
* needed.
|
|
176
|
+
*/
|
|
177
|
+
async accountsProfileDeleteCreate() {
|
|
178
|
+
const response = await this.client.request("POST", "/cfg/accounts/profile/delete/");
|
|
179
|
+
return response;
|
|
180
|
+
}
|
|
167
181
|
/**
|
|
168
182
|
* Partial update user profile
|
|
169
183
|
*
|
|
@@ -873,176 +887,183 @@ var OTPVerifyRequestChannel = /* @__PURE__ */ ((OTPVerifyRequestChannel2) => {
|
|
|
873
887
|
return OTPVerifyRequestChannel2;
|
|
874
888
|
})(OTPVerifyRequestChannel || {});
|
|
875
889
|
|
|
876
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
890
|
+
// src/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts
|
|
877
891
|
var import_zod2 = require("zod");
|
|
878
|
-
var
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
expires_at: import_zod2.z.iso.datetime(),
|
|
882
|
-
channels: import_zod2.z.array(import_zod2.z.string())
|
|
892
|
+
var AccountDeleteResponseSchema = import_zod2.z.object({
|
|
893
|
+
success: import_zod2.z.boolean(),
|
|
894
|
+
message: import_zod2.z.string()
|
|
883
895
|
});
|
|
884
896
|
|
|
885
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
897
|
+
// src/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts
|
|
886
898
|
var import_zod3 = require("zod");
|
|
887
|
-
var
|
|
888
|
-
|
|
899
|
+
var CentrifugoTokenSchema = import_zod3.z.object({
|
|
900
|
+
token: import_zod3.z.string(),
|
|
901
|
+
centrifugo_url: import_zod3.z.union([import_zod3.z.url(), import_zod3.z.literal("")]),
|
|
902
|
+
expires_at: import_zod3.z.iso.datetime(),
|
|
903
|
+
channels: import_zod3.z.array(import_zod3.z.string())
|
|
889
904
|
});
|
|
890
905
|
|
|
891
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
906
|
+
// src/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts
|
|
892
907
|
var import_zod4 = require("zod");
|
|
893
|
-
var
|
|
894
|
-
|
|
895
|
-
source_url: import_zod4.z.union([import_zod4.z.url(), import_zod4.z.literal("")]).optional()
|
|
908
|
+
var CfgAccountsProfileAvatarCreateRequestSchema = import_zod4.z.object({
|
|
909
|
+
avatar: import_zod4.z.union([import_zod4.z.instanceof(File), import_zod4.z.instanceof(Blob)])
|
|
896
910
|
});
|
|
897
911
|
|
|
898
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
912
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts
|
|
899
913
|
var import_zod5 = require("zod");
|
|
900
|
-
var
|
|
901
|
-
|
|
902
|
-
|
|
914
|
+
var OAuthAuthorizeRequestRequestSchema = import_zod5.z.object({
|
|
915
|
+
redirect_uri: import_zod5.z.union([import_zod5.z.url(), import_zod5.z.literal("")]).optional(),
|
|
916
|
+
source_url: import_zod5.z.union([import_zod5.z.url(), import_zod5.z.literal("")]).optional()
|
|
903
917
|
});
|
|
904
918
|
|
|
905
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
919
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts
|
|
906
920
|
var import_zod6 = require("zod");
|
|
907
|
-
var
|
|
908
|
-
|
|
909
|
-
state: import_zod6.z.string()
|
|
910
|
-
redirect_uri: import_zod6.z.union([import_zod6.z.url(), import_zod6.z.literal("")]).optional()
|
|
921
|
+
var OAuthAuthorizeResponseSchema = import_zod6.z.object({
|
|
922
|
+
authorization_url: import_zod6.z.union([import_zod6.z.url(), import_zod6.z.literal("")]),
|
|
923
|
+
state: import_zod6.z.string()
|
|
911
924
|
});
|
|
912
925
|
|
|
913
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
926
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts
|
|
914
927
|
var import_zod7 = require("zod");
|
|
915
|
-
var
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
provider_username: import_zod7.z.string(),
|
|
920
|
-
provider_email: import_zod7.z.email(),
|
|
921
|
-
provider_avatar_url: import_zod7.z.union([import_zod7.z.url(), import_zod7.z.literal("")]),
|
|
922
|
-
connected_at: import_zod7.z.iso.datetime(),
|
|
923
|
-
last_login_at: import_zod7.z.iso.datetime()
|
|
928
|
+
var OAuthCallbackRequestRequestSchema = import_zod7.z.object({
|
|
929
|
+
code: import_zod7.z.string().min(10).max(500),
|
|
930
|
+
state: import_zod7.z.string().min(20).max(100),
|
|
931
|
+
redirect_uri: import_zod7.z.union([import_zod7.z.url(), import_zod7.z.literal("")]).optional()
|
|
924
932
|
});
|
|
925
933
|
|
|
926
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
934
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
|
|
927
935
|
var import_zod8 = require("zod");
|
|
928
|
-
var
|
|
929
|
-
|
|
936
|
+
var OAuthConnectionSchema = import_zod8.z.object({
|
|
937
|
+
id: import_zod8.z.int(),
|
|
938
|
+
provider: import_zod8.z.nativeEnum(OAuthConnectionProvider),
|
|
939
|
+
provider_display: import_zod8.z.string(),
|
|
940
|
+
provider_username: import_zod8.z.string(),
|
|
941
|
+
provider_email: import_zod8.z.email(),
|
|
942
|
+
provider_avatar_url: import_zod8.z.union([import_zod8.z.url(), import_zod8.z.literal("")]),
|
|
943
|
+
connected_at: import_zod8.z.iso.datetime(),
|
|
944
|
+
last_login_at: import_zod8.z.iso.datetime()
|
|
930
945
|
});
|
|
931
946
|
|
|
932
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
947
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
|
|
933
948
|
var import_zod9 = require("zod");
|
|
934
|
-
var
|
|
935
|
-
|
|
936
|
-
error_description: import_zod9.z.string().optional()
|
|
949
|
+
var OAuthDisconnectRequestRequestSchema = import_zod9.z.object({
|
|
950
|
+
provider: import_zod9.z.nativeEnum(OAuthDisconnectRequestRequestProvider)
|
|
937
951
|
});
|
|
938
952
|
|
|
939
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
953
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
|
|
940
954
|
var import_zod10 = require("zod");
|
|
941
|
-
var
|
|
942
|
-
|
|
955
|
+
var OAuthErrorSchema = import_zod10.z.object({
|
|
956
|
+
error: import_zod10.z.string(),
|
|
957
|
+
error_description: import_zod10.z.string().optional()
|
|
943
958
|
});
|
|
944
959
|
|
|
945
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
960
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts
|
|
946
961
|
var import_zod11 = require("zod");
|
|
947
|
-
var
|
|
948
|
-
|
|
949
|
-
session_id: import_zod11.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i).nullable().optional(),
|
|
950
|
-
access: import_zod11.z.string().nullable().optional(),
|
|
951
|
-
refresh: import_zod11.z.string().nullable().optional(),
|
|
952
|
-
user: import_zod11.z.record(import_zod11.z.string(), import_zod11.z.any()).nullable().optional(),
|
|
953
|
-
is_new_user: import_zod11.z.boolean(),
|
|
954
|
-
is_new_connection: import_zod11.z.boolean(),
|
|
955
|
-
should_prompt_2fa: import_zod11.z.boolean().optional()
|
|
962
|
+
var OAuthProvidersResponseSchema = import_zod11.z.object({
|
|
963
|
+
providers: import_zod11.z.array(import_zod11.z.record(import_zod11.z.string(), import_zod11.z.any()))
|
|
956
964
|
});
|
|
957
965
|
|
|
958
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
966
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts
|
|
959
967
|
var import_zod12 = require("zod");
|
|
960
|
-
var
|
|
961
|
-
|
|
968
|
+
var OAuthTokenResponseSchema = import_zod12.z.object({
|
|
969
|
+
requires_2fa: import_zod12.z.boolean().optional(),
|
|
970
|
+
session_id: import_zod12.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i).nullable().optional(),
|
|
971
|
+
access: import_zod12.z.string().nullable().optional(),
|
|
972
|
+
refresh: import_zod12.z.string().nullable().optional(),
|
|
973
|
+
user: import_zod12.z.record(import_zod12.z.string(), import_zod12.z.any()).nullable().optional(),
|
|
974
|
+
is_new_user: import_zod12.z.boolean(),
|
|
975
|
+
is_new_connection: import_zod12.z.boolean(),
|
|
976
|
+
should_prompt_2fa: import_zod12.z.boolean().optional()
|
|
962
977
|
});
|
|
963
978
|
|
|
964
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
979
|
+
// src/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
|
|
965
980
|
var import_zod13 = require("zod");
|
|
966
|
-
var
|
|
967
|
-
|
|
968
|
-
channel: import_zod13.z.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
969
|
-
source_url: import_zod13.z.union([import_zod13.z.url(), import_zod13.z.literal("")]).optional()
|
|
981
|
+
var OTPErrorResponseSchema = import_zod13.z.object({
|
|
982
|
+
error: import_zod13.z.string()
|
|
970
983
|
});
|
|
971
984
|
|
|
972
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
985
|
+
// src/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
|
|
973
986
|
var import_zod14 = require("zod");
|
|
974
|
-
var
|
|
975
|
-
|
|
987
|
+
var OTPRequestRequestSchema = import_zod14.z.object({
|
|
988
|
+
identifier: import_zod14.z.string().min(1),
|
|
989
|
+
channel: import_zod14.z.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
990
|
+
source_url: import_zod14.z.union([import_zod14.z.url(), import_zod14.z.literal("")]).optional()
|
|
976
991
|
});
|
|
977
992
|
|
|
978
|
-
// src/generated/cfg_accounts/_utils/schemas/
|
|
993
|
+
// src/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts
|
|
979
994
|
var import_zod15 = require("zod");
|
|
980
|
-
var
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
995
|
+
var OTPRequestResponseSchema = import_zod15.z.object({
|
|
996
|
+
message: import_zod15.z.string()
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
// src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts
|
|
1000
|
+
var import_zod16 = require("zod");
|
|
1001
|
+
var OTPVerifyRequestSchema = import_zod16.z.object({
|
|
1002
|
+
identifier: import_zod16.z.string().min(1),
|
|
1003
|
+
otp: import_zod16.z.string().min(6).max(6),
|
|
1004
|
+
channel: import_zod16.z.nativeEnum(OTPVerifyRequestChannel).optional(),
|
|
1005
|
+
source_url: import_zod16.z.union([import_zod16.z.url(), import_zod16.z.literal("")]).optional()
|
|
985
1006
|
});
|
|
986
1007
|
|
|
987
1008
|
// src/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts
|
|
988
|
-
var
|
|
1009
|
+
var import_zod18 = require("zod");
|
|
989
1010
|
|
|
990
1011
|
// src/generated/cfg_accounts/_utils/schemas/User.schema.ts
|
|
991
|
-
var
|
|
992
|
-
var UserSchema =
|
|
993
|
-
id:
|
|
994
|
-
email:
|
|
995
|
-
first_name:
|
|
996
|
-
last_name:
|
|
997
|
-
full_name:
|
|
998
|
-
initials:
|
|
999
|
-
display_username:
|
|
1000
|
-
company:
|
|
1001
|
-
phone:
|
|
1002
|
-
position:
|
|
1003
|
-
avatar:
|
|
1004
|
-
is_staff:
|
|
1005
|
-
is_superuser:
|
|
1006
|
-
date_joined:
|
|
1007
|
-
last_login:
|
|
1008
|
-
unanswered_messages_count:
|
|
1012
|
+
var import_zod17 = require("zod");
|
|
1013
|
+
var UserSchema = import_zod17.z.object({
|
|
1014
|
+
id: import_zod17.z.int(),
|
|
1015
|
+
email: import_zod17.z.email(),
|
|
1016
|
+
first_name: import_zod17.z.string().max(50).optional(),
|
|
1017
|
+
last_name: import_zod17.z.string().max(50).optional(),
|
|
1018
|
+
full_name: import_zod17.z.string(),
|
|
1019
|
+
initials: import_zod17.z.string(),
|
|
1020
|
+
display_username: import_zod17.z.string(),
|
|
1021
|
+
company: import_zod17.z.string().max(100).optional(),
|
|
1022
|
+
phone: import_zod17.z.string().max(20).optional(),
|
|
1023
|
+
position: import_zod17.z.string().max(100).optional(),
|
|
1024
|
+
avatar: import_zod17.z.union([import_zod17.z.url(), import_zod17.z.literal("")]).nullable(),
|
|
1025
|
+
is_staff: import_zod17.z.boolean(),
|
|
1026
|
+
is_superuser: import_zod17.z.boolean(),
|
|
1027
|
+
date_joined: import_zod17.z.iso.datetime(),
|
|
1028
|
+
last_login: import_zod17.z.iso.datetime().nullable(),
|
|
1029
|
+
unanswered_messages_count: import_zod17.z.int(),
|
|
1009
1030
|
centrifugo: CentrifugoTokenSchema.nullable()
|
|
1010
1031
|
});
|
|
1011
1032
|
|
|
1012
1033
|
// src/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts
|
|
1013
|
-
var OTPVerifyResponseSchema =
|
|
1014
|
-
requires_2fa:
|
|
1015
|
-
session_id:
|
|
1016
|
-
refresh:
|
|
1017
|
-
access:
|
|
1034
|
+
var OTPVerifyResponseSchema = import_zod18.z.object({
|
|
1035
|
+
requires_2fa: import_zod18.z.boolean().optional(),
|
|
1036
|
+
session_id: import_zod18.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i).nullable().optional(),
|
|
1037
|
+
refresh: import_zod18.z.string().nullable().optional(),
|
|
1038
|
+
access: import_zod18.z.string().nullable().optional(),
|
|
1018
1039
|
user: UserSchema.nullable().optional(),
|
|
1019
|
-
should_prompt_2fa:
|
|
1040
|
+
should_prompt_2fa: import_zod18.z.boolean().optional()
|
|
1020
1041
|
});
|
|
1021
1042
|
|
|
1022
1043
|
// src/generated/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts
|
|
1023
|
-
var
|
|
1024
|
-
var PatchedUserProfileUpdateRequestSchema =
|
|
1025
|
-
first_name:
|
|
1026
|
-
last_name:
|
|
1027
|
-
company:
|
|
1028
|
-
phone:
|
|
1029
|
-
position:
|
|
1044
|
+
var import_zod19 = require("zod");
|
|
1045
|
+
var PatchedUserProfileUpdateRequestSchema = import_zod19.z.object({
|
|
1046
|
+
first_name: import_zod19.z.string().max(50).optional(),
|
|
1047
|
+
last_name: import_zod19.z.string().max(50).optional(),
|
|
1048
|
+
company: import_zod19.z.string().max(100).optional(),
|
|
1049
|
+
phone: import_zod19.z.string().max(20).optional(),
|
|
1050
|
+
position: import_zod19.z.string().max(100).optional()
|
|
1030
1051
|
});
|
|
1031
1052
|
|
|
1032
1053
|
// src/generated/cfg_accounts/_utils/schemas/TokenRefreshRequest.schema.ts
|
|
1033
|
-
var
|
|
1034
|
-
var TokenRefreshRequestSchema =
|
|
1035
|
-
refresh:
|
|
1054
|
+
var import_zod20 = require("zod");
|
|
1055
|
+
var TokenRefreshRequestSchema = import_zod20.z.object({
|
|
1056
|
+
refresh: import_zod20.z.string().min(1)
|
|
1036
1057
|
});
|
|
1037
1058
|
|
|
1038
1059
|
// src/generated/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts
|
|
1039
|
-
var
|
|
1040
|
-
var UserProfileUpdateRequestSchema =
|
|
1041
|
-
first_name:
|
|
1042
|
-
last_name:
|
|
1043
|
-
company:
|
|
1044
|
-
phone:
|
|
1045
|
-
position:
|
|
1060
|
+
var import_zod21 = require("zod");
|
|
1061
|
+
var UserProfileUpdateRequestSchema = import_zod21.z.object({
|
|
1062
|
+
first_name: import_zod21.z.string().max(50).optional(),
|
|
1063
|
+
last_name: import_zod21.z.string().max(50).optional(),
|
|
1064
|
+
company: import_zod21.z.string().max(100).optional(),
|
|
1065
|
+
phone: import_zod21.z.string().max(20).optional(),
|
|
1066
|
+
position: import_zod21.z.string().max(100).optional()
|
|
1046
1067
|
});
|
|
1047
1068
|
|
|
1048
1069
|
// src/generated/cfg_accounts/_utils/fetchers/accounts.ts
|
|
@@ -1366,6 +1387,49 @@ Method: POST`);
|
|
|
1366
1387
|
}
|
|
1367
1388
|
}
|
|
1368
1389
|
__name(createAccountsProfileAvatarCreate, "createAccountsProfileAvatarCreate");
|
|
1390
|
+
async function createAccountsProfileDeleteCreate(client) {
|
|
1391
|
+
const api = client || getAPIInstance();
|
|
1392
|
+
const response = await api.user_profile.accountsProfileDeleteCreate();
|
|
1393
|
+
try {
|
|
1394
|
+
return AccountDeleteResponseSchema.parse(response);
|
|
1395
|
+
} catch (error) {
|
|
1396
|
+
import_consola4.consola.error("\u274C Zod Validation Failed");
|
|
1397
|
+
import_consola4.consola.box(`createAccountsProfileDeleteCreate
|
|
1398
|
+
Path: /cfg/accounts/profile/delete/
|
|
1399
|
+
Method: POST`);
|
|
1400
|
+
if (error instanceof Error && "issues" in error && Array.isArray(error.issues)) {
|
|
1401
|
+
import_consola4.consola.error("Validation Issues:");
|
|
1402
|
+
error.issues.forEach((issue, index) => {
|
|
1403
|
+
import_consola4.consola.error(` ${index + 1}. ${issue.path.join(".") || "root"}`);
|
|
1404
|
+
import_consola4.consola.error(` \u251C\u2500 Message: ${issue.message}`);
|
|
1405
|
+
if (issue.expected) import_consola4.consola.error(` \u251C\u2500 Expected: ${issue.expected}`);
|
|
1406
|
+
if (issue.received) import_consola4.consola.error(` \u2514\u2500 Received: ${issue.received}`);
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
import_consola4.consola.error("Response data:", response);
|
|
1410
|
+
if (typeof window !== "undefined" && error instanceof Error && "issues" in error) {
|
|
1411
|
+
try {
|
|
1412
|
+
const event = new CustomEvent("zod-validation-error", {
|
|
1413
|
+
detail: {
|
|
1414
|
+
operation: "createAccountsProfileDeleteCreate",
|
|
1415
|
+
path: "/cfg/accounts/profile/delete/",
|
|
1416
|
+
method: "POST",
|
|
1417
|
+
error,
|
|
1418
|
+
response,
|
|
1419
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
1420
|
+
},
|
|
1421
|
+
bubbles: true,
|
|
1422
|
+
cancelable: false
|
|
1423
|
+
});
|
|
1424
|
+
window.dispatchEvent(event);
|
|
1425
|
+
} catch (eventError) {
|
|
1426
|
+
import_consola4.consola.warn("Failed to dispatch validation error event:", eventError);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
throw error;
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
__name(createAccountsProfileDeleteCreate, "createAccountsProfileDeleteCreate");
|
|
1369
1433
|
async function partialUpdateAccountsProfilePartialUpdate(data, client) {
|
|
1370
1434
|
const api = client || getAPIInstance();
|
|
1371
1435
|
const response = await api.user_profile.accountsProfilePartialUpdate(data);
|
|
@@ -1813,6 +1877,15 @@ function useCreateAccountsProfileAvatarCreate() {
|
|
|
1813
1877
|
};
|
|
1814
1878
|
}
|
|
1815
1879
|
__name(useCreateAccountsProfileAvatarCreate, "useCreateAccountsProfileAvatarCreate");
|
|
1880
|
+
function useCreateAccountsProfileDeleteCreate() {
|
|
1881
|
+
const { mutate } = (0, import_swr5.useSWRConfig)();
|
|
1882
|
+
return async (client) => {
|
|
1883
|
+
const result = await createAccountsProfileDeleteCreate(client);
|
|
1884
|
+
mutate("cfg-accounts-profile-delete");
|
|
1885
|
+
return result;
|
|
1886
|
+
};
|
|
1887
|
+
}
|
|
1888
|
+
__name(useCreateAccountsProfileDeleteCreate, "useCreateAccountsProfileDeleteCreate");
|
|
1816
1889
|
function usePartialUpdateAccountsProfilePartialUpdate() {
|
|
1817
1890
|
const { mutate } = (0, import_swr5.useSWRConfig)();
|
|
1818
1891
|
return async (data, client) => {
|