@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.
Files changed (39) 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 +441 -383
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.d.cts +36 -1
  8. package/dist/auth.d.ts +36 -1
  9. package/dist/auth.mjs +441 -383
  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 +6 -6
  30. package/src/auth/hooks/index.ts +7 -0
  31. package/src/auth/hooks/useDeleteAccount.ts +90 -0
  32. package/src/generated/cfg_accounts/CLAUDE.md +4 -3
  33. package/src/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +58 -0
  34. package/src/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +19 -0
  35. package/src/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts +20 -0
  36. package/src/generated/cfg_accounts/_utils/schemas/index.ts +1 -0
  37. package/src/generated/cfg_accounts/accounts__user_profile/client.ts +14 -0
  38. package/src/generated/cfg_accounts/accounts__user_profile/models.ts +12 -0
  39. package/src/generated/cfg_accounts/schema.json +69 -0
@@ -234,6 +234,17 @@ interface CfgAccountsProfileAvatarCreateRequest$1 {
234
234
  /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
235
235
  avatar: File | Blob;
236
236
  }
237
+ /**
238
+ * Response serializer for account deletion.
239
+ *
240
+ * Response model (includes read-only fields).
241
+ */
242
+ interface AccountDeleteResponse$1 {
243
+ /** Whether the account was successfully deleted */
244
+ success: boolean;
245
+ /** Human-readable message about the deletion */
246
+ message: string;
247
+ }
237
248
  /**
238
249
  * Serializer for updating user profile.
239
250
  *
@@ -293,6 +304,16 @@ declare class UserProfile {
293
304
  * multipart/form-data with 'avatar' field.
294
305
  */
295
306
  accountsProfileAvatarCreate(data: CfgAccountsProfileAvatarCreateRequest$1): Promise<User$2>;
307
+ /**
308
+ * Delete user account
309
+ *
310
+ * Permanently delete the current user's account. This operation: -
311
+ * Deactivates the account (user cannot log in) - Anonymizes personal data
312
+ * (GDPR compliance) - Frees up the email address for re-registration -
313
+ * Preserves audit trail The account can be restored by an administrator if
314
+ * needed.
315
+ */
316
+ accountsProfileDeleteCreate(): Promise<AccountDeleteResponse$1>;
296
317
  /**
297
318
  * Partial update user profile
298
319
  *
@@ -549,6 +570,25 @@ interface StorageAdapter$3 {
549
570
  removeItem(key: string): void;
550
571
  }
551
572
 
573
+ /**
574
+ * Zod schema for AccountDeleteResponse
575
+ *
576
+ * This schema provides runtime validation and type inference.
577
+ * * Response serializer for account deletion.
578
+ * */
579
+
580
+ /**
581
+ * Response serializer for account deletion.
582
+ */
583
+ declare const AccountDeleteResponseSchema: z.ZodObject<{
584
+ success: z.ZodBoolean;
585
+ message: z.ZodString;
586
+ }, z.core.$strip>;
587
+ /**
588
+ * Infer TypeScript type from Zod schema
589
+ */
590
+ type AccountDeleteResponse = z.infer<typeof AccountDeleteResponseSchema>;
591
+
552
592
  /**
553
593
  * Zod schema for CentrifugoToken
554
594
  *
@@ -1095,6 +1135,13 @@ declare function getAccountsProfileRetrieve(client?: any): Promise<User>;
1095
1135
  * @path /cfg/accounts/profile/avatar/
1096
1136
  */
1097
1137
  declare function createAccountsProfileAvatarCreate(data: CfgAccountsProfileAvatarCreateRequest, client?: any): Promise<User>;
1138
+ /**
1139
+ * Delete user account
1140
+ *
1141
+ * @method POST
1142
+ * @path /cfg/accounts/profile/delete/
1143
+ */
1144
+ declare function createAccountsProfileDeleteCreate(client?: any): Promise<AccountDeleteResponse>;
1098
1145
  /**
1099
1146
  * Partial update user profile
1100
1147
  *
@@ -4582,6 +4629,13 @@ declare function useAccountsProfileRetrieve(client?: API$3): ReturnType<typeof u
4582
4629
  * @path /cfg/accounts/profile/avatar/
4583
4630
  */
4584
4631
  declare function useCreateAccountsProfileAvatarCreate(): (data: CfgAccountsProfileAvatarCreateRequest, client?: API$3) => Promise<User>;
4632
+ /**
4633
+ * Delete user account
4634
+ *
4635
+ * @method POST
4636
+ * @path /cfg/accounts/profile/delete/
4637
+ */
4638
+ declare function useCreateAccountsProfileDeleteCreate(): (client?: API$3) => Promise<AccountDeleteResponse>;
4585
4639
  /**
4586
4640
  * Partial update user profile
4587
4641
  *
@@ -5054,4 +5108,4 @@ declare const apiTotp: API$1;
5054
5108
  declare const apiWebPush: API;
5055
5109
  declare const apiCentrifugo: API$2;
5056
5110
 
5057
- export { API$3 as AccountsAPI, API$2 as CentrifugoAPI, index$7 as CentrifugoFetchers, index$1 as CentrifugoHooks, type CentrifugoToken, CentrifugoTokenSchema, index$8 as CentrifugoTypes, type CfgAccountsProfileAvatarCreateRequest, CfgAccountsProfileAvatarCreateRequestSchema, enums as Enums, type OAuthAuthorizeRequestRequest, OAuthAuthorizeRequestRequestSchema, type OAuthAuthorizeResponse, OAuthAuthorizeResponseSchema, type OAuthCallbackRequestRequest, OAuthCallbackRequestRequestSchema, type OAuthConnection, OAuthConnectionSchema, type OAuthDisconnectRequestRequest, OAuthDisconnectRequestRequestSchema, type OAuthError, OAuthErrorSchema, type OAuthProvidersResponse, OAuthProvidersResponseSchema, type OAuthTokenResponse, OAuthTokenResponseSchema, type OTPErrorResponse, OTPErrorResponseSchema, type OTPRequestRequest, OTPRequestRequestSchema, type OTPRequestResponse, OTPRequestResponseSchema, type OTPVerifyRequest, OTPVerifyRequestSchema, type OTPVerifyResponse, OTPVerifyResponseSchema, type PatchedUserProfileUpdateRequest, PatchedUserProfileUpdateRequestSchema, type TokenRefresh, type TokenRefreshRequest, TokenRefreshRequestSchema, TokenRefreshSchema, API$1 as TotpAPI, index$5 as TotpFetchers, index as TotpHooks, index$6 as TotpTypes, type User, type UserProfileUpdateRequest, UserProfileUpdateRequestSchema, UserSchema, API as WebPushAPI, index$3 as WebPushFetchers, index$2 as WebPushHooks, index$4 as WebPushTypes, apiAccounts, apiCentrifugo, apiTotp, apiWebPush, createAccountsOauthDisconnectCreate, createAccountsOauthGithubAuthorizeCreate, createAccountsOauthGithubCallbackCreate, createAccountsOtpRequestCreate, createAccountsOtpVerifyCreate, createAccountsProfileAvatarCreate, createAccountsTokenRefreshCreate, getAccountsOauthConnectionsList, getAccountsOauthProvidersRetrieve, getAccountsProfileRetrieve, partialUpdateAccountsProfilePartialPartialUpdate, partialUpdateAccountsProfilePartialUpdate, partialUpdateAccountsProfileUpdatePartialUpdate, updateAccountsProfileUpdateUpdate, useAccountsOauthConnectionsList, useAccountsOauthProvidersRetrieve, useAccountsProfileRetrieve, useCreateAccountsOauthDisconnectCreate, useCreateAccountsOauthGithubAuthorizeCreate, useCreateAccountsOauthGithubCallbackCreate, useCreateAccountsOtpRequestCreate, useCreateAccountsOtpVerifyCreate, useCreateAccountsProfileAvatarCreate, useCreateAccountsTokenRefreshCreate, usePartialUpdateAccountsProfilePartialPartialUpdate, usePartialUpdateAccountsProfilePartialUpdate, usePartialUpdateAccountsProfileUpdatePartialUpdate, useUpdateAccountsProfileUpdateUpdate };
5111
+ export { type AccountDeleteResponse, AccountDeleteResponseSchema, API$3 as AccountsAPI, API$2 as CentrifugoAPI, index$7 as CentrifugoFetchers, index$1 as CentrifugoHooks, type CentrifugoToken, CentrifugoTokenSchema, index$8 as CentrifugoTypes, type CfgAccountsProfileAvatarCreateRequest, CfgAccountsProfileAvatarCreateRequestSchema, enums as Enums, type OAuthAuthorizeRequestRequest, OAuthAuthorizeRequestRequestSchema, type OAuthAuthorizeResponse, OAuthAuthorizeResponseSchema, type OAuthCallbackRequestRequest, OAuthCallbackRequestRequestSchema, type OAuthConnection, OAuthConnectionSchema, type OAuthDisconnectRequestRequest, OAuthDisconnectRequestRequestSchema, type OAuthError, OAuthErrorSchema, type OAuthProvidersResponse, OAuthProvidersResponseSchema, type OAuthTokenResponse, OAuthTokenResponseSchema, type OTPErrorResponse, OTPErrorResponseSchema, type OTPRequestRequest, OTPRequestRequestSchema, type OTPRequestResponse, OTPRequestResponseSchema, type OTPVerifyRequest, OTPVerifyRequestSchema, type OTPVerifyResponse, OTPVerifyResponseSchema, type PatchedUserProfileUpdateRequest, PatchedUserProfileUpdateRequestSchema, type TokenRefresh, type TokenRefreshRequest, TokenRefreshRequestSchema, TokenRefreshSchema, API$1 as TotpAPI, index$5 as TotpFetchers, index as TotpHooks, index$6 as TotpTypes, type User, type UserProfileUpdateRequest, UserProfileUpdateRequestSchema, UserSchema, API as WebPushAPI, index$3 as WebPushFetchers, index$2 as WebPushHooks, index$4 as WebPushTypes, apiAccounts, apiCentrifugo, apiTotp, apiWebPush, createAccountsOauthDisconnectCreate, createAccountsOauthGithubAuthorizeCreate, createAccountsOauthGithubCallbackCreate, createAccountsOtpRequestCreate, createAccountsOtpVerifyCreate, createAccountsProfileAvatarCreate, createAccountsProfileDeleteCreate, createAccountsTokenRefreshCreate, getAccountsOauthConnectionsList, getAccountsOauthProvidersRetrieve, getAccountsProfileRetrieve, partialUpdateAccountsProfilePartialPartialUpdate, partialUpdateAccountsProfilePartialUpdate, partialUpdateAccountsProfileUpdatePartialUpdate, updateAccountsProfileUpdateUpdate, useAccountsOauthConnectionsList, useAccountsOauthProvidersRetrieve, useAccountsProfileRetrieve, useCreateAccountsOauthDisconnectCreate, useCreateAccountsOauthGithubAuthorizeCreate, useCreateAccountsOauthGithubCallbackCreate, useCreateAccountsOtpRequestCreate, useCreateAccountsOtpVerifyCreate, useCreateAccountsProfileAvatarCreate, useCreateAccountsProfileDeleteCreate, useCreateAccountsTokenRefreshCreate, usePartialUpdateAccountsProfilePartialPartialUpdate, usePartialUpdateAccountsProfilePartialUpdate, usePartialUpdateAccountsProfileUpdatePartialUpdate, useUpdateAccountsProfileUpdateUpdate };
package/dist/clients.d.ts CHANGED
@@ -234,6 +234,17 @@ interface CfgAccountsProfileAvatarCreateRequest$1 {
234
234
  /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
235
235
  avatar: File | Blob;
236
236
  }
237
+ /**
238
+ * Response serializer for account deletion.
239
+ *
240
+ * Response model (includes read-only fields).
241
+ */
242
+ interface AccountDeleteResponse$1 {
243
+ /** Whether the account was successfully deleted */
244
+ success: boolean;
245
+ /** Human-readable message about the deletion */
246
+ message: string;
247
+ }
237
248
  /**
238
249
  * Serializer for updating user profile.
239
250
  *
@@ -293,6 +304,16 @@ declare class UserProfile {
293
304
  * multipart/form-data with 'avatar' field.
294
305
  */
295
306
  accountsProfileAvatarCreate(data: CfgAccountsProfileAvatarCreateRequest$1): Promise<User$2>;
307
+ /**
308
+ * Delete user account
309
+ *
310
+ * Permanently delete the current user's account. This operation: -
311
+ * Deactivates the account (user cannot log in) - Anonymizes personal data
312
+ * (GDPR compliance) - Frees up the email address for re-registration -
313
+ * Preserves audit trail The account can be restored by an administrator if
314
+ * needed.
315
+ */
316
+ accountsProfileDeleteCreate(): Promise<AccountDeleteResponse$1>;
296
317
  /**
297
318
  * Partial update user profile
298
319
  *
@@ -549,6 +570,25 @@ interface StorageAdapter$3 {
549
570
  removeItem(key: string): void;
550
571
  }
551
572
 
573
+ /**
574
+ * Zod schema for AccountDeleteResponse
575
+ *
576
+ * This schema provides runtime validation and type inference.
577
+ * * Response serializer for account deletion.
578
+ * */
579
+
580
+ /**
581
+ * Response serializer for account deletion.
582
+ */
583
+ declare const AccountDeleteResponseSchema: z.ZodObject<{
584
+ success: z.ZodBoolean;
585
+ message: z.ZodString;
586
+ }, z.core.$strip>;
587
+ /**
588
+ * Infer TypeScript type from Zod schema
589
+ */
590
+ type AccountDeleteResponse = z.infer<typeof AccountDeleteResponseSchema>;
591
+
552
592
  /**
553
593
  * Zod schema for CentrifugoToken
554
594
  *
@@ -1095,6 +1135,13 @@ declare function getAccountsProfileRetrieve(client?: any): Promise<User>;
1095
1135
  * @path /cfg/accounts/profile/avatar/
1096
1136
  */
1097
1137
  declare function createAccountsProfileAvatarCreate(data: CfgAccountsProfileAvatarCreateRequest, client?: any): Promise<User>;
1138
+ /**
1139
+ * Delete user account
1140
+ *
1141
+ * @method POST
1142
+ * @path /cfg/accounts/profile/delete/
1143
+ */
1144
+ declare function createAccountsProfileDeleteCreate(client?: any): Promise<AccountDeleteResponse>;
1098
1145
  /**
1099
1146
  * Partial update user profile
1100
1147
  *
@@ -4582,6 +4629,13 @@ declare function useAccountsProfileRetrieve(client?: API$3): ReturnType<typeof u
4582
4629
  * @path /cfg/accounts/profile/avatar/
4583
4630
  */
4584
4631
  declare function useCreateAccountsProfileAvatarCreate(): (data: CfgAccountsProfileAvatarCreateRequest, client?: API$3) => Promise<User>;
4632
+ /**
4633
+ * Delete user account
4634
+ *
4635
+ * @method POST
4636
+ * @path /cfg/accounts/profile/delete/
4637
+ */
4638
+ declare function useCreateAccountsProfileDeleteCreate(): (client?: API$3) => Promise<AccountDeleteResponse>;
4585
4639
  /**
4586
4640
  * Partial update user profile
4587
4641
  *
@@ -5054,4 +5108,4 @@ declare const apiTotp: API$1;
5054
5108
  declare const apiWebPush: API;
5055
5109
  declare const apiCentrifugo: API$2;
5056
5110
 
5057
- export { API$3 as AccountsAPI, API$2 as CentrifugoAPI, index$7 as CentrifugoFetchers, index$1 as CentrifugoHooks, type CentrifugoToken, CentrifugoTokenSchema, index$8 as CentrifugoTypes, type CfgAccountsProfileAvatarCreateRequest, CfgAccountsProfileAvatarCreateRequestSchema, enums as Enums, type OAuthAuthorizeRequestRequest, OAuthAuthorizeRequestRequestSchema, type OAuthAuthorizeResponse, OAuthAuthorizeResponseSchema, type OAuthCallbackRequestRequest, OAuthCallbackRequestRequestSchema, type OAuthConnection, OAuthConnectionSchema, type OAuthDisconnectRequestRequest, OAuthDisconnectRequestRequestSchema, type OAuthError, OAuthErrorSchema, type OAuthProvidersResponse, OAuthProvidersResponseSchema, type OAuthTokenResponse, OAuthTokenResponseSchema, type OTPErrorResponse, OTPErrorResponseSchema, type OTPRequestRequest, OTPRequestRequestSchema, type OTPRequestResponse, OTPRequestResponseSchema, type OTPVerifyRequest, OTPVerifyRequestSchema, type OTPVerifyResponse, OTPVerifyResponseSchema, type PatchedUserProfileUpdateRequest, PatchedUserProfileUpdateRequestSchema, type TokenRefresh, type TokenRefreshRequest, TokenRefreshRequestSchema, TokenRefreshSchema, API$1 as TotpAPI, index$5 as TotpFetchers, index as TotpHooks, index$6 as TotpTypes, type User, type UserProfileUpdateRequest, UserProfileUpdateRequestSchema, UserSchema, API as WebPushAPI, index$3 as WebPushFetchers, index$2 as WebPushHooks, index$4 as WebPushTypes, apiAccounts, apiCentrifugo, apiTotp, apiWebPush, createAccountsOauthDisconnectCreate, createAccountsOauthGithubAuthorizeCreate, createAccountsOauthGithubCallbackCreate, createAccountsOtpRequestCreate, createAccountsOtpVerifyCreate, createAccountsProfileAvatarCreate, createAccountsTokenRefreshCreate, getAccountsOauthConnectionsList, getAccountsOauthProvidersRetrieve, getAccountsProfileRetrieve, partialUpdateAccountsProfilePartialPartialUpdate, partialUpdateAccountsProfilePartialUpdate, partialUpdateAccountsProfileUpdatePartialUpdate, updateAccountsProfileUpdateUpdate, useAccountsOauthConnectionsList, useAccountsOauthProvidersRetrieve, useAccountsProfileRetrieve, useCreateAccountsOauthDisconnectCreate, useCreateAccountsOauthGithubAuthorizeCreate, useCreateAccountsOauthGithubCallbackCreate, useCreateAccountsOtpRequestCreate, useCreateAccountsOtpVerifyCreate, useCreateAccountsProfileAvatarCreate, useCreateAccountsTokenRefreshCreate, usePartialUpdateAccountsProfilePartialPartialUpdate, usePartialUpdateAccountsProfilePartialUpdate, usePartialUpdateAccountsProfileUpdatePartialUpdate, useUpdateAccountsProfileUpdateUpdate };
5111
+ export { type AccountDeleteResponse, AccountDeleteResponseSchema, API$3 as AccountsAPI, API$2 as CentrifugoAPI, index$7 as CentrifugoFetchers, index$1 as CentrifugoHooks, type CentrifugoToken, CentrifugoTokenSchema, index$8 as CentrifugoTypes, type CfgAccountsProfileAvatarCreateRequest, CfgAccountsProfileAvatarCreateRequestSchema, enums as Enums, type OAuthAuthorizeRequestRequest, OAuthAuthorizeRequestRequestSchema, type OAuthAuthorizeResponse, OAuthAuthorizeResponseSchema, type OAuthCallbackRequestRequest, OAuthCallbackRequestRequestSchema, type OAuthConnection, OAuthConnectionSchema, type OAuthDisconnectRequestRequest, OAuthDisconnectRequestRequestSchema, type OAuthError, OAuthErrorSchema, type OAuthProvidersResponse, OAuthProvidersResponseSchema, type OAuthTokenResponse, OAuthTokenResponseSchema, type OTPErrorResponse, OTPErrorResponseSchema, type OTPRequestRequest, OTPRequestRequestSchema, type OTPRequestResponse, OTPRequestResponseSchema, type OTPVerifyRequest, OTPVerifyRequestSchema, type OTPVerifyResponse, OTPVerifyResponseSchema, type PatchedUserProfileUpdateRequest, PatchedUserProfileUpdateRequestSchema, type TokenRefresh, type TokenRefreshRequest, TokenRefreshRequestSchema, TokenRefreshSchema, API$1 as TotpAPI, index$5 as TotpFetchers, index as TotpHooks, index$6 as TotpTypes, type User, type UserProfileUpdateRequest, UserProfileUpdateRequestSchema, UserSchema, API as WebPushAPI, index$3 as WebPushFetchers, index$2 as WebPushHooks, index$4 as WebPushTypes, apiAccounts, apiCentrifugo, apiTotp, apiWebPush, createAccountsOauthDisconnectCreate, createAccountsOauthGithubAuthorizeCreate, createAccountsOauthGithubCallbackCreate, createAccountsOtpRequestCreate, createAccountsOtpVerifyCreate, createAccountsProfileAvatarCreate, createAccountsProfileDeleteCreate, createAccountsTokenRefreshCreate, getAccountsOauthConnectionsList, getAccountsOauthProvidersRetrieve, getAccountsProfileRetrieve, partialUpdateAccountsProfilePartialPartialUpdate, partialUpdateAccountsProfilePartialUpdate, partialUpdateAccountsProfileUpdatePartialUpdate, updateAccountsProfileUpdateUpdate, useAccountsOauthConnectionsList, useAccountsOauthProvidersRetrieve, useAccountsProfileRetrieve, useCreateAccountsOauthDisconnectCreate, useCreateAccountsOauthGithubAuthorizeCreate, useCreateAccountsOauthGithubCallbackCreate, useCreateAccountsOtpRequestCreate, useCreateAccountsOtpVerifyCreate, useCreateAccountsProfileAvatarCreate, useCreateAccountsProfileDeleteCreate, useCreateAccountsTokenRefreshCreate, usePartialUpdateAccountsProfilePartialPartialUpdate, usePartialUpdateAccountsProfilePartialUpdate, usePartialUpdateAccountsProfileUpdatePartialUpdate, useUpdateAccountsProfileUpdateUpdate };