@djangocfg/api 2.1.99 → 2.1.101

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.
Files changed (41) hide show
  1. package/dist/auth-server.cjs +333 -313
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +333 -313
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +471 -386
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.d.cts +42 -1
  8. package/dist/auth.d.ts +42 -1
  9. package/dist/auth.mjs +471 -386
  10. package/dist/auth.mjs.map +1 -1
  11. package/dist/clients.cjs +458 -383
  12. package/dist/clients.cjs.map +1 -1
  13. package/dist/clients.d.cts +55 -1
  14. package/dist/clients.d.ts +55 -1
  15. package/dist/clients.mjs +458 -383
  16. package/dist/clients.mjs.map +1 -1
  17. package/dist/hooks.cjs +184 -111
  18. package/dist/hooks.cjs.map +1 -1
  19. package/dist/hooks.d.cts +48 -1
  20. package/dist/hooks.d.ts +48 -1
  21. package/dist/hooks.mjs +184 -111
  22. package/dist/hooks.mjs.map +1 -1
  23. package/dist/index.cjs +382 -313
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +58 -5
  26. package/dist/index.d.ts +58 -5
  27. package/dist/index.mjs +382 -313
  28. package/dist/index.mjs.map +1 -1
  29. package/package.json +3 -3
  30. package/src/auth/context/AuthContext.tsx +31 -0
  31. package/src/auth/context/types.ts +4 -0
  32. package/src/auth/hooks/index.ts +7 -0
  33. package/src/auth/hooks/useDeleteAccount.ts +90 -0
  34. package/src/generated/cfg_accounts/CLAUDE.md +4 -3
  35. package/src/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +58 -0
  36. package/src/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +19 -0
  37. package/src/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts +20 -0
  38. package/src/generated/cfg_accounts/_utils/schemas/index.ts +1 -0
  39. package/src/generated/cfg_accounts/accounts__user_profile/client.ts +14 -0
  40. package/src/generated/cfg_accounts/accounts__user_profile/models.ts +12 -0
  41. package/src/generated/cfg_accounts/schema.json +69 -0
package/dist/auth.mjs CHANGED
@@ -121,6 +121,19 @@ var UserProfile = class {
121
121
  const response = await this.client.request("POST", "/cfg/accounts/profile/avatar/", { formData });
122
122
  return response;
123
123
  }
124
+ /**
125
+ * Delete user account
126
+ *
127
+ * Permanently delete the current user's account. This operation: -
128
+ * Deactivates the account (user cannot log in) - Anonymizes personal data
129
+ * (GDPR compliance) - Frees up the email address for re-registration -
130
+ * Preserves audit trail The account can be restored by an administrator if
131
+ * needed.
132
+ */
133
+ async accountsProfileDeleteCreate() {
134
+ const response = await this.client.request("POST", "/cfg/accounts/profile/delete/");
135
+ return response;
136
+ }
124
137
  /**
125
138
  * Partial update user profile
126
139
  *
@@ -837,183 +850,190 @@ var OTPVerifyRequestChannel = /* @__PURE__ */ ((OTPVerifyRequestChannel2) => {
837
850
  return OTPVerifyRequestChannel2;
838
851
  })(OTPVerifyRequestChannel || {});
839
852
 
840
- // src/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts
853
+ // src/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts
841
854
  import { z } from "zod";
842
- var CentrifugoTokenSchema = z.object({
843
- token: z.string(),
844
- centrifugo_url: z.union([z.url(), z.literal("")]),
845
- expires_at: z.iso.datetime(),
846
- channels: z.array(z.string())
855
+ var AccountDeleteResponseSchema = z.object({
856
+ success: z.boolean(),
857
+ message: z.string()
847
858
  });
848
859
 
849
- // src/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts
860
+ // src/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts
850
861
  import { z as z2 } from "zod";
851
- var CfgAccountsProfileAvatarCreateRequestSchema = z2.object({
852
- avatar: z2.union([z2.instanceof(File), z2.instanceof(Blob)])
862
+ var CentrifugoTokenSchema = z2.object({
863
+ token: z2.string(),
864
+ centrifugo_url: z2.union([z2.url(), z2.literal("")]),
865
+ expires_at: z2.iso.datetime(),
866
+ channels: z2.array(z2.string())
853
867
  });
854
868
 
855
- // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts
869
+ // src/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts
856
870
  import { z as z3 } from "zod";
857
- var OAuthAuthorizeRequestRequestSchema = z3.object({
858
- redirect_uri: z3.union([z3.url(), z3.literal("")]).optional(),
859
- source_url: z3.union([z3.url(), z3.literal("")]).optional()
871
+ var CfgAccountsProfileAvatarCreateRequestSchema = z3.object({
872
+ avatar: z3.union([z3.instanceof(File), z3.instanceof(Blob)])
860
873
  });
861
874
 
862
- // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts
875
+ // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts
863
876
  import { z as z4 } from "zod";
864
- var OAuthAuthorizeResponseSchema = z4.object({
865
- authorization_url: z4.union([z4.url(), z4.literal("")]),
866
- state: z4.string()
877
+ var OAuthAuthorizeRequestRequestSchema = z4.object({
878
+ redirect_uri: z4.union([z4.url(), z4.literal("")]).optional(),
879
+ source_url: z4.union([z4.url(), z4.literal("")]).optional()
867
880
  });
868
881
 
869
- // src/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts
882
+ // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts
870
883
  import { z as z5 } from "zod";
871
- var OAuthCallbackRequestRequestSchema = z5.object({
872
- code: z5.string().min(10).max(500),
873
- state: z5.string().min(20).max(100),
874
- redirect_uri: z5.union([z5.url(), z5.literal("")]).optional()
884
+ var OAuthAuthorizeResponseSchema = z5.object({
885
+ authorization_url: z5.union([z5.url(), z5.literal("")]),
886
+ state: z5.string()
875
887
  });
876
888
 
877
- // src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
889
+ // src/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts
878
890
  import { z as z6 } from "zod";
879
- var OAuthConnectionSchema = z6.object({
880
- id: z6.int(),
881
- provider: z6.nativeEnum(OAuthConnectionProvider),
882
- provider_display: z6.string(),
883
- provider_username: z6.string(),
884
- provider_email: z6.email(),
885
- provider_avatar_url: z6.union([z6.url(), z6.literal("")]),
886
- connected_at: z6.iso.datetime(),
887
- last_login_at: z6.iso.datetime()
891
+ var OAuthCallbackRequestRequestSchema = z6.object({
892
+ code: z6.string().min(10).max(500),
893
+ state: z6.string().min(20).max(100),
894
+ redirect_uri: z6.union([z6.url(), z6.literal("")]).optional()
888
895
  });
889
896
 
890
- // src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
897
+ // src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
891
898
  import { z as z7 } from "zod";
892
- var OAuthDisconnectRequestRequestSchema = z7.object({
893
- provider: z7.nativeEnum(OAuthDisconnectRequestRequestProvider)
899
+ var OAuthConnectionSchema = z7.object({
900
+ id: z7.int(),
901
+ provider: z7.nativeEnum(OAuthConnectionProvider),
902
+ provider_display: z7.string(),
903
+ provider_username: z7.string(),
904
+ provider_email: z7.email(),
905
+ provider_avatar_url: z7.union([z7.url(), z7.literal("")]),
906
+ connected_at: z7.iso.datetime(),
907
+ last_login_at: z7.iso.datetime()
894
908
  });
895
909
 
896
- // src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
910
+ // src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
897
911
  import { z as z8 } from "zod";
898
- var OAuthErrorSchema = z8.object({
899
- error: z8.string(),
900
- error_description: z8.string().optional()
912
+ var OAuthDisconnectRequestRequestSchema = z8.object({
913
+ provider: z8.nativeEnum(OAuthDisconnectRequestRequestProvider)
901
914
  });
902
915
 
903
- // src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts
916
+ // src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
904
917
  import { z as z9 } from "zod";
905
- var OAuthProvidersResponseSchema = z9.object({
906
- providers: z9.array(z9.record(z9.string(), z9.any()))
918
+ var OAuthErrorSchema = z9.object({
919
+ error: z9.string(),
920
+ error_description: z9.string().optional()
907
921
  });
908
922
 
909
- // src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts
923
+ // src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts
910
924
  import { z as z10 } from "zod";
911
- var OAuthTokenResponseSchema = z10.object({
912
- requires_2fa: z10.boolean().optional(),
913
- session_id: z10.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(),
914
- access: z10.string().nullable().optional(),
915
- refresh: z10.string().nullable().optional(),
916
- user: z10.record(z10.string(), z10.any()).nullable().optional(),
917
- is_new_user: z10.boolean(),
918
- is_new_connection: z10.boolean(),
919
- should_prompt_2fa: z10.boolean().optional()
925
+ var OAuthProvidersResponseSchema = z10.object({
926
+ providers: z10.array(z10.record(z10.string(), z10.any()))
920
927
  });
921
928
 
922
- // src/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
929
+ // src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts
923
930
  import { z as z11 } from "zod";
924
- var OTPErrorResponseSchema = z11.object({
925
- error: z11.string()
931
+ var OAuthTokenResponseSchema = z11.object({
932
+ requires_2fa: z11.boolean().optional(),
933
+ session_id: z11.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(),
934
+ access: z11.string().nullable().optional(),
935
+ refresh: z11.string().nullable().optional(),
936
+ user: z11.record(z11.string(), z11.any()).nullable().optional(),
937
+ is_new_user: z11.boolean(),
938
+ is_new_connection: z11.boolean(),
939
+ should_prompt_2fa: z11.boolean().optional()
926
940
  });
927
941
 
928
- // src/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
942
+ // src/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
929
943
  import { z as z12 } from "zod";
930
- var OTPRequestRequestSchema = z12.object({
931
- identifier: z12.string().min(1),
932
- channel: z12.nativeEnum(OTPRequestRequestChannel).optional(),
933
- source_url: z12.union([z12.url(), z12.literal("")]).optional()
944
+ var OTPErrorResponseSchema = z12.object({
945
+ error: z12.string()
934
946
  });
935
947
 
936
- // src/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts
948
+ // src/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
937
949
  import { z as z13 } from "zod";
938
- var OTPRequestResponseSchema = z13.object({
939
- message: z13.string()
950
+ var OTPRequestRequestSchema = z13.object({
951
+ identifier: z13.string().min(1),
952
+ channel: z13.nativeEnum(OTPRequestRequestChannel).optional(),
953
+ source_url: z13.union([z13.url(), z13.literal("")]).optional()
940
954
  });
941
955
 
942
- // src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts
956
+ // src/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts
943
957
  import { z as z14 } from "zod";
944
- var OTPVerifyRequestSchema = z14.object({
945
- identifier: z14.string().min(1),
946
- otp: z14.string().min(6).max(6),
947
- channel: z14.nativeEnum(OTPVerifyRequestChannel).optional(),
948
- source_url: z14.union([z14.url(), z14.literal("")]).optional()
958
+ var OTPRequestResponseSchema = z14.object({
959
+ message: z14.string()
960
+ });
961
+
962
+ // src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts
963
+ import { z as z15 } from "zod";
964
+ var OTPVerifyRequestSchema = z15.object({
965
+ identifier: z15.string().min(1),
966
+ otp: z15.string().min(6).max(6),
967
+ channel: z15.nativeEnum(OTPVerifyRequestChannel).optional(),
968
+ source_url: z15.union([z15.url(), z15.literal("")]).optional()
949
969
  });
950
970
 
951
971
  // src/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts
952
- import { z as z16 } from "zod";
972
+ import { z as z17 } from "zod";
953
973
 
954
974
  // src/generated/cfg_accounts/_utils/schemas/User.schema.ts
955
- import { z as z15 } from "zod";
956
- var UserSchema = z15.object({
957
- id: z15.int(),
958
- email: z15.email(),
959
- first_name: z15.string().max(50).optional(),
960
- last_name: z15.string().max(50).optional(),
961
- full_name: z15.string(),
962
- initials: z15.string(),
963
- display_username: z15.string(),
964
- company: z15.string().max(100).optional(),
965
- phone: z15.string().max(20).optional(),
966
- position: z15.string().max(100).optional(),
967
- avatar: z15.union([z15.url(), z15.literal("")]).nullable(),
968
- is_staff: z15.boolean(),
969
- is_superuser: z15.boolean(),
970
- date_joined: z15.iso.datetime(),
971
- last_login: z15.iso.datetime().nullable(),
972
- unanswered_messages_count: z15.int(),
975
+ import { z as z16 } from "zod";
976
+ var UserSchema = z16.object({
977
+ id: z16.int(),
978
+ email: z16.email(),
979
+ first_name: z16.string().max(50).optional(),
980
+ last_name: z16.string().max(50).optional(),
981
+ full_name: z16.string(),
982
+ initials: z16.string(),
983
+ display_username: z16.string(),
984
+ company: z16.string().max(100).optional(),
985
+ phone: z16.string().max(20).optional(),
986
+ position: z16.string().max(100).optional(),
987
+ avatar: z16.union([z16.url(), z16.literal("")]).nullable(),
988
+ is_staff: z16.boolean(),
989
+ is_superuser: z16.boolean(),
990
+ date_joined: z16.iso.datetime(),
991
+ last_login: z16.iso.datetime().nullable(),
992
+ unanswered_messages_count: z16.int(),
973
993
  centrifugo: CentrifugoTokenSchema.nullable()
974
994
  });
975
995
 
976
996
  // src/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts
977
- var OTPVerifyResponseSchema = z16.object({
978
- requires_2fa: z16.boolean().optional(),
979
- session_id: z16.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(),
980
- refresh: z16.string().nullable().optional(),
981
- access: z16.string().nullable().optional(),
997
+ var OTPVerifyResponseSchema = z17.object({
998
+ requires_2fa: z17.boolean().optional(),
999
+ session_id: z17.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(),
1000
+ refresh: z17.string().nullable().optional(),
1001
+ access: z17.string().nullable().optional(),
982
1002
  user: UserSchema.nullable().optional(),
983
- should_prompt_2fa: z16.boolean().optional()
1003
+ should_prompt_2fa: z17.boolean().optional()
984
1004
  });
985
1005
 
986
1006
  // src/generated/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts
987
- import { z as z17 } from "zod";
988
- var PatchedUserProfileUpdateRequestSchema = z17.object({
989
- first_name: z17.string().max(50).optional(),
990
- last_name: z17.string().max(50).optional(),
991
- company: z17.string().max(100).optional(),
992
- phone: z17.string().max(20).optional(),
993
- position: z17.string().max(100).optional()
1007
+ import { z as z18 } from "zod";
1008
+ var PatchedUserProfileUpdateRequestSchema = z18.object({
1009
+ first_name: z18.string().max(50).optional(),
1010
+ last_name: z18.string().max(50).optional(),
1011
+ company: z18.string().max(100).optional(),
1012
+ phone: z18.string().max(20).optional(),
1013
+ position: z18.string().max(100).optional()
994
1014
  });
995
1015
 
996
1016
  // src/generated/cfg_accounts/_utils/schemas/TokenRefresh.schema.ts
997
- import { z as z18 } from "zod";
998
- var TokenRefreshSchema = z18.object({
999
- access: z18.string(),
1000
- refresh: z18.string()
1017
+ import { z as z19 } from "zod";
1018
+ var TokenRefreshSchema = z19.object({
1019
+ access: z19.string(),
1020
+ refresh: z19.string()
1001
1021
  });
1002
1022
 
1003
1023
  // src/generated/cfg_accounts/_utils/schemas/TokenRefreshRequest.schema.ts
1004
- import { z as z19 } from "zod";
1005
- var TokenRefreshRequestSchema = z19.object({
1006
- refresh: z19.string().min(1)
1024
+ import { z as z20 } from "zod";
1025
+ var TokenRefreshRequestSchema = z20.object({
1026
+ refresh: z20.string().min(1)
1007
1027
  });
1008
1028
 
1009
1029
  // src/generated/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts
1010
- import { z as z20 } from "zod";
1011
- var UserProfileUpdateRequestSchema = z20.object({
1012
- first_name: z20.string().max(50).optional(),
1013
- last_name: z20.string().max(50).optional(),
1014
- company: z20.string().max(100).optional(),
1015
- phone: z20.string().max(20).optional(),
1016
- position: z20.string().max(100).optional()
1030
+ import { z as z21 } from "zod";
1031
+ var UserProfileUpdateRequestSchema = z21.object({
1032
+ first_name: z21.string().max(50).optional(),
1033
+ last_name: z21.string().max(50).optional(),
1034
+ company: z21.string().max(100).optional(),
1035
+ phone: z21.string().max(20).optional(),
1036
+ position: z21.string().max(100).optional()
1017
1037
  });
1018
1038
 
1019
1039
  // src/generated/cfg_accounts/_utils/fetchers/accounts.ts
@@ -2318,320 +2338,320 @@ var LocalStorageAdapter2 = class {
2318
2338
  };
2319
2339
 
2320
2340
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts
2321
- import { z as z21 } from "zod";
2322
- var CentrifugoChannelInfoSchema = z21.object({
2323
- num_clients: z21.int()
2341
+ import { z as z22 } from "zod";
2342
+ var CentrifugoChannelInfoSchema = z22.object({
2343
+ num_clients: z22.int()
2324
2344
  });
2325
2345
 
2326
2346
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts
2327
- import { z as z22 } from "zod";
2328
- var CentrifugoChannelsRequestRequestSchema = z22.object({
2329
- pattern: z22.string().nullable().optional()
2347
+ import { z as z23 } from "zod";
2348
+ var CentrifugoChannelsRequestRequestSchema = z23.object({
2349
+ pattern: z23.string().nullable().optional()
2330
2350
  });
2331
2351
 
2332
2352
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
2333
- import { z as z25 } from "zod";
2353
+ import { z as z26 } from "zod";
2334
2354
 
2335
2355
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts
2336
- import { z as z23 } from "zod";
2337
- var CentrifugoChannelsResultSchema = z23.object({
2338
- channels: z23.record(z23.string(), CentrifugoChannelInfoSchema)
2356
+ import { z as z24 } from "zod";
2357
+ var CentrifugoChannelsResultSchema = z24.object({
2358
+ channels: z24.record(z24.string(), CentrifugoChannelInfoSchema)
2339
2359
  });
2340
2360
 
2341
2361
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts
2342
- import { z as z24 } from "zod";
2343
- var CentrifugoErrorSchema = z24.object({
2344
- code: z24.int().optional(),
2345
- message: z24.string().optional()
2362
+ import { z as z25 } from "zod";
2363
+ var CentrifugoErrorSchema = z25.object({
2364
+ code: z25.int().optional(),
2365
+ message: z25.string().optional()
2346
2366
  });
2347
2367
 
2348
2368
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
2349
- var CentrifugoChannelsResponseSchema = z25.object({
2369
+ var CentrifugoChannelsResponseSchema = z26.object({
2350
2370
  error: CentrifugoErrorSchema.optional(),
2351
2371
  result: CentrifugoChannelsResultSchema.optional()
2352
2372
  });
2353
2373
 
2354
2374
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts
2355
- import { z as z26 } from "zod";
2356
- var CentrifugoClientInfoSchema = z26.object({
2357
- user: z26.string(),
2358
- client: z26.string(),
2359
- conn_info: z26.record(z26.string(), z26.any()).nullable().optional(),
2360
- chan_info: z26.record(z26.string(), z26.any()).nullable().optional()
2375
+ import { z as z27 } from "zod";
2376
+ var CentrifugoClientInfoSchema = z27.object({
2377
+ user: z27.string(),
2378
+ client: z27.string(),
2379
+ conn_info: z27.record(z27.string(), z27.any()).nullable().optional(),
2380
+ chan_info: z27.record(z27.string(), z27.any()).nullable().optional()
2361
2381
  });
2362
2382
 
2363
2383
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts
2364
- import { z as z27 } from "zod";
2365
- var CentrifugoHealthCheckSchema = z27.object({
2366
- status: z27.string(),
2367
- wrapper_url: z27.string(),
2368
- has_api_key: z27.boolean(),
2369
- timestamp: z27.string()
2384
+ import { z as z28 } from "zod";
2385
+ var CentrifugoHealthCheckSchema = z28.object({
2386
+ status: z28.string(),
2387
+ wrapper_url: z28.string(),
2388
+ has_api_key: z28.boolean(),
2389
+ timestamp: z28.string()
2370
2390
  });
2371
2391
 
2372
2392
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
2373
- import { z as z29 } from "zod";
2393
+ import { z as z30 } from "zod";
2374
2394
 
2375
2395
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts
2376
- import { z as z28 } from "zod";
2377
- var CentrifugoStreamPositionSchema = z28.object({
2378
- offset: z28.int(),
2379
- epoch: z28.string()
2396
+ import { z as z29 } from "zod";
2397
+ var CentrifugoStreamPositionSchema = z29.object({
2398
+ offset: z29.int(),
2399
+ epoch: z29.string()
2380
2400
  });
2381
2401
 
2382
2402
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
2383
- var CentrifugoHistoryRequestRequestSchema = z29.object({
2384
- channel: z29.string(),
2385
- limit: z29.int().nullable().optional(),
2403
+ var CentrifugoHistoryRequestRequestSchema = z30.object({
2404
+ channel: z30.string(),
2405
+ limit: z30.int().nullable().optional(),
2386
2406
  since: CentrifugoStreamPositionSchema.optional(),
2387
- reverse: z29.boolean().nullable().optional()
2407
+ reverse: z30.boolean().nullable().optional()
2388
2408
  });
2389
2409
 
2390
2410
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
2391
- import { z as z32 } from "zod";
2411
+ import { z as z33 } from "zod";
2392
2412
 
2393
2413
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
2394
- import { z as z31 } from "zod";
2414
+ import { z as z32 } from "zod";
2395
2415
 
2396
2416
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts
2397
- import { z as z30 } from "zod";
2398
- var CentrifugoPublicationSchema = z30.object({
2399
- data: z30.record(z30.string(), z30.any()),
2417
+ import { z as z31 } from "zod";
2418
+ var CentrifugoPublicationSchema = z31.object({
2419
+ data: z31.record(z31.string(), z31.any()),
2400
2420
  info: CentrifugoClientInfoSchema.optional(),
2401
- offset: z30.int(),
2402
- tags: z30.record(z30.string(), z30.any()).nullable().optional()
2421
+ offset: z31.int(),
2422
+ tags: z31.record(z31.string(), z31.any()).nullable().optional()
2403
2423
  });
2404
2424
 
2405
2425
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
2406
- var CentrifugoHistoryResultSchema = z31.object({
2407
- publications: z31.array(CentrifugoPublicationSchema),
2408
- epoch: z31.string(),
2409
- offset: z31.int()
2426
+ var CentrifugoHistoryResultSchema = z32.object({
2427
+ publications: z32.array(CentrifugoPublicationSchema),
2428
+ epoch: z32.string(),
2429
+ offset: z32.int()
2410
2430
  });
2411
2431
 
2412
2432
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
2413
- var CentrifugoHistoryResponseSchema = z32.object({
2433
+ var CentrifugoHistoryResponseSchema = z33.object({
2414
2434
  error: CentrifugoErrorSchema.optional(),
2415
2435
  result: CentrifugoHistoryResultSchema.optional()
2416
2436
  });
2417
2437
 
2418
2438
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
2419
- import { z as z37 } from "zod";
2439
+ import { z as z38 } from "zod";
2420
2440
 
2421
2441
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
2422
- import { z as z36 } from "zod";
2442
+ import { z as z37 } from "zod";
2423
2443
 
2424
2444
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
2425
- import { z as z35 } from "zod";
2445
+ import { z as z36 } from "zod";
2426
2446
 
2427
2447
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts
2428
- import { z as z33 } from "zod";
2429
- var CentrifugoMetricsSchema = z33.object({
2430
- interval: z33.number(),
2431
- items: z33.record(z33.string(), z33.number())
2448
+ import { z as z34 } from "zod";
2449
+ var CentrifugoMetricsSchema = z34.object({
2450
+ interval: z34.number(),
2451
+ items: z34.record(z34.string(), z34.number())
2432
2452
  });
2433
2453
 
2434
2454
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts
2435
- import { z as z34 } from "zod";
2436
- var CentrifugoProcessSchema = z34.object({
2437
- cpu: z34.number(),
2438
- rss: z34.int()
2455
+ import { z as z35 } from "zod";
2456
+ var CentrifugoProcessSchema = z35.object({
2457
+ cpu: z35.number(),
2458
+ rss: z35.int()
2439
2459
  });
2440
2460
 
2441
2461
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
2442
- var CentrifugoNodeInfoSchema = z35.object({
2443
- uid: z35.string(),
2444
- name: z35.string(),
2445
- version: z35.string(),
2446
- num_clients: z35.int(),
2447
- num_users: z35.int(),
2448
- num_channels: z35.int(),
2449
- uptime: z35.int(),
2450
- num_subs: z35.int(),
2462
+ var CentrifugoNodeInfoSchema = z36.object({
2463
+ uid: z36.string(),
2464
+ name: z36.string(),
2465
+ version: z36.string(),
2466
+ num_clients: z36.int(),
2467
+ num_users: z36.int(),
2468
+ num_channels: z36.int(),
2469
+ uptime: z36.int(),
2470
+ num_subs: z36.int(),
2451
2471
  metrics: CentrifugoMetricsSchema.optional(),
2452
2472
  process: CentrifugoProcessSchema.optional()
2453
2473
  });
2454
2474
 
2455
2475
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
2456
- var CentrifugoInfoResultSchema = z36.object({
2457
- nodes: z36.array(CentrifugoNodeInfoSchema)
2476
+ var CentrifugoInfoResultSchema = z37.object({
2477
+ nodes: z37.array(CentrifugoNodeInfoSchema)
2458
2478
  });
2459
2479
 
2460
2480
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
2461
- var CentrifugoInfoResponseSchema = z37.object({
2481
+ var CentrifugoInfoResponseSchema = z38.object({
2462
2482
  error: CentrifugoErrorSchema.optional(),
2463
2483
  result: CentrifugoInfoResultSchema.optional()
2464
2484
  });
2465
2485
 
2466
2486
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts
2467
- import { z as z38 } from "zod";
2468
- var CentrifugoOverviewStatsSchema = z38.object({
2469
- total: z38.int(),
2470
- successful: z38.int(),
2471
- failed: z38.int(),
2472
- timeout: z38.int(),
2473
- success_rate: z38.number(),
2474
- avg_duration_ms: z38.number(),
2475
- avg_acks_received: z38.number(),
2476
- period_hours: z38.int()
2487
+ import { z as z39 } from "zod";
2488
+ var CentrifugoOverviewStatsSchema = z39.object({
2489
+ total: z39.int(),
2490
+ successful: z39.int(),
2491
+ failed: z39.int(),
2492
+ timeout: z39.int(),
2493
+ success_rate: z39.number(),
2494
+ avg_duration_ms: z39.number(),
2495
+ avg_acks_received: z39.number(),
2496
+ period_hours: z39.int()
2477
2497
  });
2478
2498
 
2479
2499
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts
2480
- import { z as z39 } from "zod";
2481
- var CentrifugoPresenceRequestRequestSchema = z39.object({
2482
- channel: z39.string()
2500
+ import { z as z40 } from "zod";
2501
+ var CentrifugoPresenceRequestRequestSchema = z40.object({
2502
+ channel: z40.string()
2483
2503
  });
2484
2504
 
2485
2505
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
2486
- import { z as z41 } from "zod";
2506
+ import { z as z42 } from "zod";
2487
2507
 
2488
2508
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts
2489
- import { z as z40 } from "zod";
2490
- var CentrifugoPresenceResultSchema = z40.object({
2491
- presence: z40.record(z40.string(), CentrifugoClientInfoSchema)
2509
+ import { z as z41 } from "zod";
2510
+ var CentrifugoPresenceResultSchema = z41.object({
2511
+ presence: z41.record(z41.string(), CentrifugoClientInfoSchema)
2492
2512
  });
2493
2513
 
2494
2514
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
2495
- var CentrifugoPresenceResponseSchema = z41.object({
2515
+ var CentrifugoPresenceResponseSchema = z42.object({
2496
2516
  error: CentrifugoErrorSchema.optional(),
2497
2517
  result: CentrifugoPresenceResultSchema.optional()
2498
2518
  });
2499
2519
 
2500
2520
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts
2501
- import { z as z42 } from "zod";
2502
- var CentrifugoPresenceStatsRequestRequestSchema = z42.object({
2503
- channel: z42.string()
2521
+ import { z as z43 } from "zod";
2522
+ var CentrifugoPresenceStatsRequestRequestSchema = z43.object({
2523
+ channel: z43.string()
2504
2524
  });
2505
2525
 
2506
2526
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
2507
- import { z as z44 } from "zod";
2527
+ import { z as z45 } from "zod";
2508
2528
 
2509
2529
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts
2510
- import { z as z43 } from "zod";
2511
- var CentrifugoPresenceStatsResultSchema = z43.object({
2512
- num_clients: z43.int(),
2513
- num_users: z43.int()
2530
+ import { z as z44 } from "zod";
2531
+ var CentrifugoPresenceStatsResultSchema = z44.object({
2532
+ num_clients: z44.int(),
2533
+ num_users: z44.int()
2514
2534
  });
2515
2535
 
2516
2536
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
2517
- var CentrifugoPresenceStatsResponseSchema = z44.object({
2537
+ var CentrifugoPresenceStatsResponseSchema = z45.object({
2518
2538
  error: CentrifugoErrorSchema.optional(),
2519
2539
  result: CentrifugoPresenceStatsResultSchema.optional()
2520
2540
  });
2521
2541
 
2522
2542
  // src/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
2523
- import { z as z46 } from "zod";
2543
+ import { z as z47 } from "zod";
2524
2544
 
2525
2545
  // src/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts
2526
- import { z as z45 } from "zod";
2527
- var ChannelStatsSchema = z45.object({
2528
- channel: z45.string(),
2529
- total: z45.int(),
2530
- successful: z45.int(),
2531
- failed: z45.int(),
2532
- avg_duration_ms: z45.number(),
2533
- avg_acks: z45.number(),
2534
- last_activity_at: z45.string().nullable()
2546
+ import { z as z46 } from "zod";
2547
+ var ChannelStatsSchema = z46.object({
2548
+ channel: z46.string(),
2549
+ total: z46.int(),
2550
+ successful: z46.int(),
2551
+ failed: z46.int(),
2552
+ avg_duration_ms: z46.number(),
2553
+ avg_acks: z46.number(),
2554
+ last_activity_at: z46.string().nullable()
2535
2555
  });
2536
2556
 
2537
2557
  // src/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
2538
- var ChannelListSchema = z46.object({
2539
- channels: z46.array(ChannelStatsSchema),
2540
- total_channels: z46.int()
2558
+ var ChannelListSchema = z47.object({
2559
+ channels: z47.array(ChannelStatsSchema),
2560
+ total_channels: z47.int()
2541
2561
  });
2542
2562
 
2543
2563
  // src/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts
2544
- import { z as z47 } from "zod";
2545
- var ConnectionTokenResponseSchema = z47.object({
2546
- token: z47.string(),
2547
- centrifugo_url: z47.string(),
2548
- expires_at: z47.string(),
2549
- channels: z47.array(z47.string())
2564
+ import { z as z48 } from "zod";
2565
+ var ConnectionTokenResponseSchema = z48.object({
2566
+ token: z48.string(),
2567
+ centrifugo_url: z48.string(),
2568
+ expires_at: z48.string(),
2569
+ channels: z48.array(z48.string())
2550
2570
  });
2551
2571
 
2552
2572
  // src/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts
2553
- import { z as z48 } from "zod";
2554
- var ManualAckRequestRequestSchema = z48.object({
2555
- message_id: z48.string(),
2556
- client_id: z48.string()
2573
+ import { z as z49 } from "zod";
2574
+ var ManualAckRequestRequestSchema = z49.object({
2575
+ message_id: z49.string(),
2576
+ client_id: z49.string()
2557
2577
  });
2558
2578
 
2559
2579
  // src/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts
2560
- import { z as z49 } from "zod";
2561
- var ManualAckResponseSchema = z49.object({
2562
- success: z49.boolean(),
2563
- message_id: z49.string(),
2564
- error: z49.string().nullable().optional()
2580
+ import { z as z50 } from "zod";
2581
+ var ManualAckResponseSchema = z50.object({
2582
+ success: z50.boolean(),
2583
+ message_id: z50.string(),
2584
+ error: z50.string().nullable().optional()
2565
2585
  });
2566
2586
 
2567
2587
  // src/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
2568
- import { z as z51 } from "zod";
2588
+ import { z as z52 } from "zod";
2569
2589
 
2570
2590
  // src/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts
2571
- import { z as z50 } from "zod";
2572
- var PublishSchema = z50.object({
2573
- message_id: z50.string(),
2574
- channel: z50.string(),
2575
- status: z50.string(),
2576
- wait_for_ack: z50.boolean(),
2577
- acks_received: z50.int(),
2578
- acks_expected: z50.int().nullable(),
2579
- duration_ms: z50.number().nullable(),
2580
- created_at: z50.iso.datetime(),
2581
- completed_at: z50.iso.datetime().nullable(),
2582
- error_code: z50.string().nullable(),
2583
- error_message: z50.string().nullable()
2591
+ import { z as z51 } from "zod";
2592
+ var PublishSchema = z51.object({
2593
+ message_id: z51.string(),
2594
+ channel: z51.string(),
2595
+ status: z51.string(),
2596
+ wait_for_ack: z51.boolean(),
2597
+ acks_received: z51.int(),
2598
+ acks_expected: z51.int().nullable(),
2599
+ duration_ms: z51.number().nullable(),
2600
+ created_at: z51.iso.datetime(),
2601
+ completed_at: z51.iso.datetime().nullable(),
2602
+ error_code: z51.string().nullable(),
2603
+ error_message: z51.string().nullable()
2584
2604
  });
2585
2605
 
2586
2606
  // src/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
2587
- var PaginatedPublishListSchema = z51.object({
2588
- count: z51.int(),
2589
- page: z51.int(),
2590
- pages: z51.int(),
2591
- page_size: z51.int(),
2592
- has_next: z51.boolean(),
2593
- has_previous: z51.boolean(),
2594
- next_page: z51.int().nullable().optional(),
2595
- previous_page: z51.int().nullable().optional(),
2596
- results: z51.array(PublishSchema)
2607
+ var PaginatedPublishListSchema = z52.object({
2608
+ count: z52.int(),
2609
+ page: z52.int(),
2610
+ pages: z52.int(),
2611
+ page_size: z52.int(),
2612
+ has_next: z52.boolean(),
2613
+ has_previous: z52.boolean(),
2614
+ next_page: z52.int().nullable().optional(),
2615
+ previous_page: z52.int().nullable().optional(),
2616
+ results: z52.array(PublishSchema)
2597
2617
  });
2598
2618
 
2599
2619
  // src/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts
2600
- import { z as z52 } from "zod";
2601
- var PublishTestRequestRequestSchema = z52.object({
2602
- channel: z52.string(),
2603
- data: z52.record(z52.string(), z52.any()),
2604
- wait_for_ack: z52.boolean().optional(),
2605
- ack_timeout: z52.int().min(1).max(60).optional()
2620
+ import { z as z53 } from "zod";
2621
+ var PublishTestRequestRequestSchema = z53.object({
2622
+ channel: z53.string(),
2623
+ data: z53.record(z53.string(), z53.any()),
2624
+ wait_for_ack: z53.boolean().optional(),
2625
+ ack_timeout: z53.int().min(1).max(60).optional()
2606
2626
  });
2607
2627
 
2608
2628
  // src/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts
2609
- import { z as z53 } from "zod";
2610
- var PublishTestResponseSchema = z53.object({
2611
- success: z53.boolean(),
2612
- message_id: z53.string(),
2613
- channel: z53.string(),
2614
- acks_received: z53.int().optional(),
2615
- delivered: z53.boolean().optional(),
2616
- error: z53.string().nullable().optional()
2629
+ import { z as z54 } from "zod";
2630
+ var PublishTestResponseSchema = z54.object({
2631
+ success: z54.boolean(),
2632
+ message_id: z54.string(),
2633
+ channel: z54.string(),
2634
+ acks_received: z54.int().optional(),
2635
+ delivered: z54.boolean().optional(),
2636
+ error: z54.string().nullable().optional()
2617
2637
  });
2618
2638
 
2619
2639
  // src/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts
2620
- import { z as z54 } from "zod";
2621
- var TimelineItemSchema = z54.object({
2622
- timestamp: z54.string(),
2623
- count: z54.int(),
2624
- successful: z54.int(),
2625
- failed: z54.int(),
2626
- timeout: z54.int()
2640
+ import { z as z55 } from "zod";
2641
+ var TimelineItemSchema = z55.object({
2642
+ timestamp: z55.string(),
2643
+ count: z55.int(),
2644
+ successful: z55.int(),
2645
+ failed: z55.int(),
2646
+ timeout: z55.int()
2627
2647
  });
2628
2648
 
2629
2649
  // src/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts
2630
- import { z as z55 } from "zod";
2631
- var TimelineResponseSchema = z55.object({
2632
- timeline: z55.array(TimelineItemSchema),
2633
- period_hours: z55.int(),
2634
- interval: z55.string()
2650
+ import { z as z56 } from "zod";
2651
+ var TimelineResponseSchema = z56.object({
2652
+ timeline: z56.array(TimelineItemSchema),
2653
+ period_hours: z56.int(),
2654
+ interval: z56.string()
2635
2655
  });
2636
2656
 
2637
2657
  // src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts
@@ -3433,40 +3453,40 @@ var LocalStorageAdapter3 = class {
3433
3453
  };
3434
3454
 
3435
3455
  // src/generated/cfg_webpush/_utils/schemas/SendPushRequestRequest.schema.ts
3436
- import { z as z56 } from "zod";
3437
- var SendPushRequestRequestSchema = z56.object({
3438
- title: z56.string().min(1).max(255),
3439
- body: z56.string().min(1),
3440
- icon: z56.union([z56.url(), z56.literal("")]).nullable().optional(),
3441
- url: z56.union([z56.url(), z56.literal("")]).nullable().optional()
3456
+ import { z as z57 } from "zod";
3457
+ var SendPushRequestRequestSchema = z57.object({
3458
+ title: z57.string().min(1).max(255),
3459
+ body: z57.string().min(1),
3460
+ icon: z57.union([z57.url(), z57.literal("")]).nullable().optional(),
3461
+ url: z57.union([z57.url(), z57.literal("")]).nullable().optional()
3442
3462
  });
3443
3463
 
3444
3464
  // src/generated/cfg_webpush/_utils/schemas/SendPushResponse.schema.ts
3445
- import { z as z57 } from "zod";
3446
- var SendPushResponseSchema = z57.object({
3447
- success: z57.boolean(),
3448
- sent_to: z57.int()
3465
+ import { z as z58 } from "zod";
3466
+ var SendPushResponseSchema = z58.object({
3467
+ success: z58.boolean(),
3468
+ sent_to: z58.int()
3449
3469
  });
3450
3470
 
3451
3471
  // src/generated/cfg_webpush/_utils/schemas/SubscribeRequestRequest.schema.ts
3452
- import { z as z58 } from "zod";
3453
- var SubscribeRequestRequestSchema = z58.object({
3454
- endpoint: z58.union([z58.url(), z58.literal("")]),
3455
- keys: z58.record(z58.string(), z58.string().min(1))
3472
+ import { z as z59 } from "zod";
3473
+ var SubscribeRequestRequestSchema = z59.object({
3474
+ endpoint: z59.union([z59.url(), z59.literal("")]),
3475
+ keys: z59.record(z59.string(), z59.string().min(1))
3456
3476
  });
3457
3477
 
3458
3478
  // src/generated/cfg_webpush/_utils/schemas/SubscribeResponse.schema.ts
3459
- import { z as z59 } from "zod";
3460
- var SubscribeResponseSchema = z59.object({
3461
- success: z59.boolean(),
3462
- subscription_id: z59.int(),
3463
- created: z59.boolean()
3479
+ import { z as z60 } from "zod";
3480
+ var SubscribeResponseSchema = z60.object({
3481
+ success: z60.boolean(),
3482
+ subscription_id: z60.int(),
3483
+ created: z60.boolean()
3464
3484
  });
3465
3485
 
3466
3486
  // src/generated/cfg_webpush/_utils/schemas/VapidPublicKeyResponse.schema.ts
3467
- import { z as z60 } from "zod";
3468
- var VapidPublicKeyResponseSchema = z60.object({
3469
- publicKey: z60.string()
3487
+ import { z as z61 } from "zod";
3488
+ var VapidPublicKeyResponseSchema = z61.object({
3489
+ publicKey: z61.string()
3470
3490
  });
3471
3491
 
3472
3492
  // src/generated/cfg_webpush/_utils/fetchers/webpush__web_push.ts
@@ -4661,6 +4681,20 @@ var AuthProviderInternal = /* @__PURE__ */ __name(({ children, config }) => {
4661
4681
  const isAdminUser = useMemo(() => {
4662
4682
  return Boolean(user?.is_staff || user?.is_superuser);
4663
4683
  }, [user]);
4684
+ const updateProfile = useCallback3(
4685
+ async (data) => {
4686
+ const result = await accounts.partialUpdateProfile(data);
4687
+ return result;
4688
+ },
4689
+ [accounts]
4690
+ );
4691
+ const uploadAvatar = useCallback3(
4692
+ async (avatar) => {
4693
+ const result = await accounts.uploadAvatar(avatar);
4694
+ return result;
4695
+ },
4696
+ [accounts]
4697
+ );
4664
4698
  const value = useMemo(
4665
4699
  () => ({
4666
4700
  user,
@@ -4686,7 +4720,10 @@ var AuthProviderInternal = /* @__PURE__ */ __name(({ children, config }) => {
4686
4720
  saveRedirectUrl: redirectManager.setRedirect,
4687
4721
  getRedirectUrl: redirectManager.getFinalRedirectUrl,
4688
4722
  clearRedirectUrl: redirectManager.clearRedirect,
4689
- hasRedirectUrl: redirectManager.hasRedirect
4723
+ hasRedirectUrl: redirectManager.hasRedirect,
4724
+ // Profile management
4725
+ updateProfile,
4726
+ uploadAvatar
4690
4727
  }),
4691
4728
  [
4692
4729
  user,
@@ -4704,7 +4741,9 @@ var AuthProviderInternal = /* @__PURE__ */ __name(({ children, config }) => {
4704
4741
  verifyOTP,
4705
4742
  refreshToken,
4706
4743
  logout,
4707
- redirectManager
4744
+ redirectManager,
4745
+ updateProfile,
4746
+ uploadAvatar
4708
4747
  ]
4709
4748
  );
4710
4749
  return /* @__PURE__ */ jsx2(AuthContext.Provider, { value, children });
@@ -4757,7 +4796,15 @@ var defaultAuthState = {
4757
4796
  getRedirectUrl: /* @__PURE__ */ __name(() => null, "getRedirectUrl"),
4758
4797
  clearRedirectUrl: /* @__PURE__ */ __name(() => {
4759
4798
  }, "clearRedirectUrl"),
4760
- hasRedirectUrl: /* @__PURE__ */ __name(() => false, "hasRedirectUrl")
4799
+ hasRedirectUrl: /* @__PURE__ */ __name(() => false, "hasRedirectUrl"),
4800
+ updateProfile: /* @__PURE__ */ __name(async () => {
4801
+ authLogger.warn("useAuth: updateProfile called outside AuthProvider");
4802
+ return {};
4803
+ }, "updateProfile"),
4804
+ uploadAvatar: /* @__PURE__ */ __name(async () => {
4805
+ authLogger.warn("useAuth: uploadAvatar called outside AuthProvider");
4806
+ return {};
4807
+ }, "uploadAvatar")
4761
4808
  };
4762
4809
  var useAuth = /* @__PURE__ */ __name(() => {
4763
4810
  const context = useContext2(AuthContext);
@@ -5657,112 +5704,112 @@ var DeviceListStatus = /* @__PURE__ */ ((DeviceListStatus2) => {
5657
5704
  })(DeviceListStatus || {});
5658
5705
 
5659
5706
  // src/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts
5660
- import { z as z61 } from "zod";
5661
- var BackupCodesRegenerateRequestSchema = z61.object({
5662
- code: z61.string().min(6).max(6)
5707
+ import { z as z62 } from "zod";
5708
+ var BackupCodesRegenerateRequestSchema = z62.object({
5709
+ code: z62.string().min(6).max(6)
5663
5710
  });
5664
5711
 
5665
5712
  // src/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts
5666
- import { z as z62 } from "zod";
5667
- var BackupCodesRegenerateResponseSchema = z62.object({
5668
- backup_codes: z62.array(z62.string()),
5669
- warning: z62.string()
5713
+ import { z as z63 } from "zod";
5714
+ var BackupCodesRegenerateResponseSchema = z63.object({
5715
+ backup_codes: z63.array(z63.string()),
5716
+ warning: z63.string()
5670
5717
  });
5671
5718
 
5672
5719
  // src/generated/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts
5673
- import { z as z63 } from "zod";
5674
- var BackupCodesStatusSchema = z63.object({
5675
- remaining_count: z63.int(),
5676
- total_generated: z63.int(),
5677
- warning: z63.string().nullable().optional()
5720
+ import { z as z64 } from "zod";
5721
+ var BackupCodesStatusSchema = z64.object({
5722
+ remaining_count: z64.int(),
5723
+ total_generated: z64.int(),
5724
+ warning: z64.string().nullable().optional()
5678
5725
  });
5679
5726
 
5680
5727
  // src/generated/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts
5681
- import { z as z64 } from "zod";
5682
- var ConfirmSetupRequestSchema = z64.object({
5683
- device_id: z64.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5684
- code: z64.string().min(6).max(6)
5728
+ import { z as z65 } from "zod";
5729
+ var ConfirmSetupRequestSchema = z65.object({
5730
+ device_id: z65.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5731
+ code: z65.string().min(6).max(6)
5685
5732
  });
5686
5733
 
5687
5734
  // src/generated/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts
5688
- import { z as z65 } from "zod";
5689
- var ConfirmSetupResponseSchema = z65.object({
5690
- message: z65.string(),
5691
- backup_codes: z65.array(z65.string()),
5692
- backup_codes_warning: z65.string()
5735
+ import { z as z66 } from "zod";
5736
+ var ConfirmSetupResponseSchema = z66.object({
5737
+ message: z66.string(),
5738
+ backup_codes: z66.array(z66.string()),
5739
+ backup_codes_warning: z66.string()
5693
5740
  });
5694
5741
 
5695
5742
  // src/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts
5696
- import { z as z66 } from "zod";
5697
- var DeviceListSchema = z66.object({
5698
- id: z66.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5699
- name: z66.string(),
5700
- is_primary: z66.boolean(),
5701
- status: z66.nativeEnum(DeviceListStatus),
5702
- created_at: z66.iso.datetime(),
5703
- confirmed_at: z66.iso.datetime().nullable(),
5704
- last_used_at: z66.iso.datetime().nullable()
5743
+ import { z as z67 } from "zod";
5744
+ var DeviceListSchema = z67.object({
5745
+ id: z67.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5746
+ name: z67.string(),
5747
+ is_primary: z67.boolean(),
5748
+ status: z67.nativeEnum(DeviceListStatus),
5749
+ created_at: z67.iso.datetime(),
5750
+ confirmed_at: z67.iso.datetime().nullable(),
5751
+ last_used_at: z67.iso.datetime().nullable()
5705
5752
  });
5706
5753
 
5707
5754
  // src/generated/cfg_totp/_utils/schemas/DisableRequest.schema.ts
5708
- import { z as z67 } from "zod";
5709
- var DisableRequestSchema = z67.object({
5710
- code: z67.string().min(6).max(6)
5755
+ import { z as z68 } from "zod";
5756
+ var DisableRequestSchema = z68.object({
5757
+ code: z68.string().min(6).max(6)
5711
5758
  });
5712
5759
 
5713
5760
  // src/generated/cfg_totp/_utils/schemas/PaginatedDeviceListList.schema.ts
5714
- import { z as z68 } from "zod";
5715
- var PaginatedDeviceListListSchema = z68.object({
5716
- count: z68.int(),
5717
- page: z68.int(),
5718
- pages: z68.int(),
5719
- page_size: z68.int(),
5720
- has_next: z68.boolean(),
5721
- has_previous: z68.boolean(),
5722
- next_page: z68.int().nullable().optional(),
5723
- previous_page: z68.int().nullable().optional(),
5724
- results: z68.array(DeviceListSchema)
5761
+ import { z as z69 } from "zod";
5762
+ var PaginatedDeviceListListSchema = z69.object({
5763
+ count: z69.int(),
5764
+ page: z69.int(),
5765
+ pages: z69.int(),
5766
+ page_size: z69.int(),
5767
+ has_next: z69.boolean(),
5768
+ has_previous: z69.boolean(),
5769
+ next_page: z69.int().nullable().optional(),
5770
+ previous_page: z69.int().nullable().optional(),
5771
+ results: z69.array(DeviceListSchema)
5725
5772
  });
5726
5773
 
5727
5774
  // src/generated/cfg_totp/_utils/schemas/SetupRequest.schema.ts
5728
- import { z as z69 } from "zod";
5729
- var SetupRequestSchema = z69.object({
5730
- device_name: z69.string().min(1).max(100).optional()
5775
+ import { z as z70 } from "zod";
5776
+ var SetupRequestSchema = z70.object({
5777
+ device_name: z70.string().min(1).max(100).optional()
5731
5778
  });
5732
5779
 
5733
5780
  // src/generated/cfg_totp/_utils/schemas/SetupResponse.schema.ts
5734
- import { z as z70 } from "zod";
5735
- var SetupResponseSchema = z70.object({
5736
- device_id: z70.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5737
- secret: z70.string(),
5738
- provisioning_uri: z70.string(),
5739
- qr_code_base64: z70.string(),
5740
- expires_in: z70.int()
5781
+ import { z as z71 } from "zod";
5782
+ var SetupResponseSchema = z71.object({
5783
+ device_id: z71.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5784
+ secret: z71.string(),
5785
+ provisioning_uri: z71.string(),
5786
+ qr_code_base64: z71.string(),
5787
+ expires_in: z71.int()
5741
5788
  });
5742
5789
 
5743
5790
  // src/generated/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts
5744
- import { z as z71 } from "zod";
5745
- var VerifyBackupRequestSchema = z71.object({
5746
- session_id: z71.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5747
- backup_code: z71.string().min(8).max(8)
5791
+ import { z as z72 } from "zod";
5792
+ var VerifyBackupRequestSchema = z72.object({
5793
+ session_id: z72.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5794
+ backup_code: z72.string().min(8).max(8)
5748
5795
  });
5749
5796
 
5750
5797
  // src/generated/cfg_totp/_utils/schemas/VerifyRequest.schema.ts
5751
- import { z as z72 } from "zod";
5752
- var VerifyRequestSchema = z72.object({
5753
- session_id: z72.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5754
- code: z72.string().min(6).max(6)
5798
+ import { z as z73 } from "zod";
5799
+ var VerifyRequestSchema = z73.object({
5800
+ session_id: z73.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
5801
+ code: z73.string().min(6).max(6)
5755
5802
  });
5756
5803
 
5757
5804
  // src/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts
5758
- import { z as z73 } from "zod";
5759
- var VerifyResponseSchema = z73.object({
5760
- message: z73.string(),
5761
- access_token: z73.string(),
5762
- refresh_token: z73.string(),
5763
- user: z73.record(z73.string(), z73.any()),
5764
- remaining_backup_codes: z73.int().optional(),
5765
- warning: z73.string().optional()
5805
+ import { z as z74 } from "zod";
5806
+ var VerifyResponseSchema = z74.object({
5807
+ message: z74.string(),
5808
+ access_token: z74.string(),
5809
+ refresh_token: z74.string(),
5810
+ user: z74.record(z74.string(), z74.any()),
5811
+ remaining_backup_codes: z74.int().optional(),
5812
+ warning: z74.string().optional()
5766
5813
  });
5767
5814
 
5768
5815
  // src/generated/cfg_totp/_utils/fetchers/totp__backup_codes.ts
@@ -6844,6 +6891,43 @@ function useLocalStorage2(key, initialValue) {
6844
6891
  }
6845
6892
  __name(useLocalStorage2, "useLocalStorage");
6846
6893
 
6894
+ // src/auth/hooks/useDeleteAccount.ts
6895
+ import { useCallback as useCallback11, useState as useState11 } from "react";
6896
+ var useDeleteAccount = /* @__PURE__ */ __name(() => {
6897
+ const [isLoading, setIsLoading] = useState11(false);
6898
+ const [error, setError] = useState11(null);
6899
+ const { logout } = useAuth();
6900
+ const clearError = useCallback11(() => {
6901
+ setError(null);
6902
+ }, []);
6903
+ const deleteAccount = useCallback11(async () => {
6904
+ setIsLoading(true);
6905
+ setError(null);
6906
+ try {
6907
+ authLogger.info("Deleting account...");
6908
+ const response = await apiAccounts.user_profile.accountsProfileDeleteCreate();
6909
+ if (!response.success) {
6910
+ authLogger.error("Failed to delete account:", response.message);
6911
+ setError(response.message);
6912
+ throw new Error(response.message);
6913
+ }
6914
+ } catch (error2) {
6915
+ authLogger.error("Failed to delete account:", error2);
6916
+ throw error2;
6917
+ } finally {
6918
+ setIsLoading(false);
6919
+ }
6920
+ await logout();
6921
+ return { success: true, message: "Account deleted successfully" };
6922
+ }, []);
6923
+ return {
6924
+ isLoading,
6925
+ error,
6926
+ deleteAccount,
6927
+ clearError
6928
+ };
6929
+ }, "useDeleteAccount");
6930
+
6847
6931
  // src/auth/utils/validation.ts
6848
6932
  var validateEmail = /* @__PURE__ */ __name((email) => {
6849
6933
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
@@ -6893,6 +6977,7 @@ export {
6893
6977
  useAuthValidation,
6894
6978
  useAutoAuth,
6895
6979
  useBase64,
6980
+ useDeleteAccount,
6896
6981
  useGithubAuth,
6897
6982
  useLocalStorage2 as useLocalStorage,
6898
6983
  useSessionStorage,