@djangocfg/api 2.1.103 → 2.1.105

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 (38) hide show
  1. package/dist/auth.cjs +3348 -3218
  2. package/dist/auth.cjs.map +1 -1
  3. package/dist/auth.d.cts +77 -1
  4. package/dist/auth.d.ts +77 -1
  5. package/dist/auth.mjs +3295 -3165
  6. package/dist/auth.mjs.map +1 -1
  7. package/dist/clients.cjs +95 -64
  8. package/dist/clients.cjs.map +1 -1
  9. package/dist/clients.d.cts +134 -21
  10. package/dist/clients.d.ts +134 -21
  11. package/dist/clients.mjs +95 -64
  12. package/dist/clients.mjs.map +1 -1
  13. package/dist/hooks.cjs +1 -0
  14. package/dist/hooks.cjs.map +1 -1
  15. package/dist/hooks.mjs +1 -0
  16. package/dist/hooks.mjs.map +1 -1
  17. package/package.json +2 -3
  18. package/src/auth/context/AuthContext.tsx +1 -1
  19. package/src/auth/hooks/index.ts +4 -0
  20. package/src/auth/hooks/useAuthGuard.ts +1 -1
  21. package/src/auth/hooks/useAutoAuth.ts +2 -1
  22. package/src/auth/hooks/useCfgRouter.ts +153 -0
  23. package/src/auth/hooks/useGithubAuth.ts +1 -1
  24. package/src/auth/hooks/useQueryParams.ts +73 -0
  25. package/src/auth/hooks/useTwoFactor.ts +1 -1
  26. package/src/auth/hooks/useTwoFactorStatus.ts +5 -1
  27. package/src/generated/cfg_totp/CLAUDE.md +1 -1
  28. package/src/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts +3 -3
  29. package/src/generated/cfg_totp/_utils/hooks/totp__totp_management.ts +3 -3
  30. package/src/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts +21 -0
  31. package/src/generated/cfg_totp/_utils/schemas/{PaginatedDeviceListList.schema.ts → PaginatedDeviceListResponseList.schema.ts} +5 -5
  32. package/src/generated/cfg_totp/_utils/schemas/TotpVerifyUser.schema.ts +34 -0
  33. package/src/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts +2 -1
  34. package/src/generated/cfg_totp/_utils/schemas/index.ts +3 -1
  35. package/src/generated/cfg_totp/schema.json +124 -5
  36. package/src/generated/cfg_totp/totp__totp_management/client.ts +3 -3
  37. package/src/generated/cfg_totp/totp__totp_management/models.ts +12 -2
  38. package/src/generated/cfg_totp/totp__totp_verification/models.ts +30 -2
@@ -3229,7 +3229,7 @@ declare enum DeviceListStatus {
3229
3229
  *
3230
3230
  * Response model (includes read-only fields).
3231
3231
  */
3232
- interface PaginatedDeviceListList$1 {
3232
+ interface PaginatedDeviceListResponseList$1 {
3233
3233
  /** Total number of items across all pages */
3234
3234
  count: number;
3235
3235
  /** Current page number (1-based) */
@@ -3247,7 +3247,7 @@ interface PaginatedDeviceListList$1 {
3247
3247
  /** Previous page number (null if no previous page) */
3248
3248
  previous_page?: number | null;
3249
3249
  /** Array of items for current page */
3250
- results: Array<DeviceList$1>;
3250
+ results: Array<DeviceListResponse$1>;
3251
3251
  }
3252
3252
  /**
3253
3253
  * Serializer for completely disabling 2FA.
@@ -3258,6 +3258,15 @@ interface DisableRequest$1 {
3258
3258
  /** TOTP code for verification */
3259
3259
  code: string;
3260
3260
  }
3261
+ /**
3262
+ * Response serializer for device list endpoint.
3263
+ *
3264
+ * Response model (includes read-only fields).
3265
+ */
3266
+ interface DeviceListResponse$1 {
3267
+ devices: Array<DeviceList$1>;
3268
+ has_2fa_enabled: boolean;
3269
+ }
3261
3270
  /**
3262
3271
  * Serializer for listing TOTP devices.
3263
3272
  *
@@ -3286,11 +3295,11 @@ interface DeviceList$1 {
3286
3295
  declare class TotpManagement {
3287
3296
  private client;
3288
3297
  constructor(client: any);
3289
- totpDevicesList(page?: number, page_size?: number): Promise<PaginatedDeviceListList$1>;
3298
+ totpDevicesList(page?: number, page_size?: number): Promise<PaginatedDeviceListResponseList$1>;
3290
3299
  totpDevicesList(params?: {
3291
3300
  page?: number;
3292
3301
  page_size?: number;
3293
- }): Promise<PaginatedDeviceListList$1>;
3302
+ }): Promise<PaginatedDeviceListResponseList$1>;
3294
3303
  /**
3295
3304
  * Completely disable 2FA for account. Requires verification code.
3296
3305
  */
@@ -3387,8 +3396,7 @@ interface VerifyResponse$1 {
3387
3396
  access_token: string;
3388
3397
  /** JWT refresh token */
3389
3398
  refresh_token: string;
3390
- /** User profile data */
3391
- user: Record<string, any>;
3399
+ user: TotpVerifyUser$1;
3392
3400
  /** Number of remaining backup codes (if backup code was used) */
3393
3401
  remaining_backup_codes?: number;
3394
3402
  /** Warning message (e.g., low backup codes) */
@@ -3405,6 +3413,34 @@ interface VerifyBackupRequest$1 {
3405
3413
  /** 8-character backup recovery code */
3406
3414
  backup_code: string;
3407
3415
  }
3416
+ /**
3417
+ * User data returned after 2FA verification.
3418
+ *
3419
+ * Response model (includes read-only fields).
3420
+ */
3421
+ interface TotpVerifyUser$1 {
3422
+ id: number;
3423
+ email: string;
3424
+ first_name?: string;
3425
+ last_name?: string;
3426
+ /** Get user's full name. */
3427
+ full_name: string;
3428
+ /** Get user's initials for avatar fallback. */
3429
+ initials: string;
3430
+ /** Get formatted username for display. */
3431
+ display_username: string;
3432
+ company?: string;
3433
+ phone?: string;
3434
+ position?: string;
3435
+ avatar?: string | null;
3436
+ /** Designates whether the user can log into this admin site. */
3437
+ is_staff: boolean;
3438
+ /** Designates that this user has all permissions without explicitly assigning them. */
3439
+ is_superuser: boolean;
3440
+ date_joined: string;
3441
+ last_login?: string | null;
3442
+ unanswered_messages_count: number;
3443
+ }
3408
3444
 
3409
3445
  /**
3410
3446
  * API endpoints for TOTP Verification.
@@ -3658,6 +3694,26 @@ declare const DeviceListSchema: z.ZodObject<{
3658
3694
  */
3659
3695
  type DeviceList = z.infer<typeof DeviceListSchema>;
3660
3696
 
3697
+ /**
3698
+ * Response serializer for device list endpoint.
3699
+ */
3700
+ declare const DeviceListResponseSchema: z.ZodObject<{
3701
+ devices: z.ZodArray<z.ZodObject<{
3702
+ id: z.ZodString;
3703
+ name: z.ZodString;
3704
+ is_primary: z.ZodBoolean;
3705
+ status: z.ZodEnum<typeof DeviceListStatus>;
3706
+ created_at: z.ZodISODateTime;
3707
+ confirmed_at: z.ZodNullable<z.ZodISODateTime>;
3708
+ last_used_at: z.ZodNullable<z.ZodISODateTime>;
3709
+ }, z.core.$strip>>;
3710
+ has_2fa_enabled: z.ZodBoolean;
3711
+ }, z.core.$strip>;
3712
+ /**
3713
+ * Infer TypeScript type from Zod schema
3714
+ */
3715
+ type DeviceListResponse = z.infer<typeof DeviceListResponseSchema>;
3716
+
3661
3717
  /**
3662
3718
  * Zod schema for DisableRequest
3663
3719
  *
@@ -3676,7 +3732,7 @@ declare const DisableRequestSchema: z.ZodObject<{
3676
3732
  */
3677
3733
  type DisableRequest = z.infer<typeof DisableRequestSchema>;
3678
3734
 
3679
- declare const PaginatedDeviceListListSchema: z.ZodObject<{
3735
+ declare const PaginatedDeviceListResponseListSchema: z.ZodObject<{
3680
3736
  count: z.ZodInt;
3681
3737
  page: z.ZodInt;
3682
3738
  pages: z.ZodInt;
@@ -3686,19 +3742,22 @@ declare const PaginatedDeviceListListSchema: z.ZodObject<{
3686
3742
  next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3687
3743
  previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3688
3744
  results: z.ZodArray<z.ZodObject<{
3689
- id: z.ZodString;
3690
- name: z.ZodString;
3691
- is_primary: z.ZodBoolean;
3692
- status: z.ZodEnum<typeof DeviceListStatus>;
3693
- created_at: z.ZodISODateTime;
3694
- confirmed_at: z.ZodNullable<z.ZodISODateTime>;
3695
- last_used_at: z.ZodNullable<z.ZodISODateTime>;
3745
+ devices: z.ZodArray<z.ZodObject<{
3746
+ id: z.ZodString;
3747
+ name: z.ZodString;
3748
+ is_primary: z.ZodBoolean;
3749
+ status: z.ZodEnum<typeof DeviceListStatus>;
3750
+ created_at: z.ZodISODateTime;
3751
+ confirmed_at: z.ZodNullable<z.ZodISODateTime>;
3752
+ last_used_at: z.ZodNullable<z.ZodISODateTime>;
3753
+ }, z.core.$strip>>;
3754
+ has_2fa_enabled: z.ZodBoolean;
3696
3755
  }, z.core.$strip>>;
3697
3756
  }, z.core.$strip>;
3698
3757
  /**
3699
3758
  * Infer TypeScript type from Zod schema
3700
3759
  */
3701
- type PaginatedDeviceListList = z.infer<typeof PaginatedDeviceListListSchema>;
3760
+ type PaginatedDeviceListResponseList = z.infer<typeof PaginatedDeviceListResponseListSchema>;
3702
3761
 
3703
3762
  /**
3704
3763
  * Zod schema for SetupRequest
@@ -3740,6 +3799,39 @@ declare const SetupResponseSchema: z.ZodObject<{
3740
3799
  */
3741
3800
  type SetupResponse = z.infer<typeof SetupResponseSchema>;
3742
3801
 
3802
+ /**
3803
+ * Zod schema for TotpVerifyUser
3804
+ *
3805
+ * This schema provides runtime validation and type inference.
3806
+ * * User data returned after 2FA verification.
3807
+ * */
3808
+
3809
+ /**
3810
+ * User data returned after 2FA verification.
3811
+ */
3812
+ declare const TotpVerifyUserSchema: z.ZodObject<{
3813
+ id: z.ZodInt;
3814
+ email: z.ZodEmail;
3815
+ first_name: z.ZodOptional<z.ZodString>;
3816
+ last_name: z.ZodOptional<z.ZodString>;
3817
+ full_name: z.ZodString;
3818
+ initials: z.ZodString;
3819
+ display_username: z.ZodString;
3820
+ company: z.ZodOptional<z.ZodString>;
3821
+ phone: z.ZodOptional<z.ZodString>;
3822
+ position: z.ZodOptional<z.ZodString>;
3823
+ avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
3824
+ is_staff: z.ZodBoolean;
3825
+ is_superuser: z.ZodBoolean;
3826
+ date_joined: z.ZodISODateTime;
3827
+ last_login: z.ZodNullable<z.ZodISODateTime>;
3828
+ unanswered_messages_count: z.ZodInt;
3829
+ }, z.core.$strip>;
3830
+ /**
3831
+ * Infer TypeScript type from Zod schema
3832
+ */
3833
+ type TotpVerifyUser = z.infer<typeof TotpVerifyUserSchema>;
3834
+
3743
3835
  /**
3744
3836
  * Zod schema for VerifyBackupRequest
3745
3837
  *
@@ -3792,7 +3884,24 @@ declare const VerifyResponseSchema: z.ZodObject<{
3792
3884
  message: z.ZodString;
3793
3885
  access_token: z.ZodString;
3794
3886
  refresh_token: z.ZodString;
3795
- user: z.ZodRecord<z.ZodString, z.ZodAny>;
3887
+ user: z.ZodObject<{
3888
+ id: z.ZodInt;
3889
+ email: z.ZodEmail;
3890
+ first_name: z.ZodOptional<z.ZodString>;
3891
+ last_name: z.ZodOptional<z.ZodString>;
3892
+ full_name: z.ZodString;
3893
+ initials: z.ZodString;
3894
+ display_username: z.ZodString;
3895
+ company: z.ZodOptional<z.ZodString>;
3896
+ phone: z.ZodOptional<z.ZodString>;
3897
+ position: z.ZodOptional<z.ZodString>;
3898
+ avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
3899
+ is_staff: z.ZodBoolean;
3900
+ is_superuser: z.ZodBoolean;
3901
+ date_joined: z.ZodISODateTime;
3902
+ last_login: z.ZodNullable<z.ZodISODateTime>;
3903
+ unanswered_messages_count: z.ZodInt;
3904
+ }, z.core.$strip>;
3796
3905
  remaining_backup_codes: z.ZodOptional<z.ZodInt>;
3797
3906
  warning: z.ZodOptional<z.ZodString>;
3798
3907
  }, z.core.$strip>;
@@ -3830,15 +3939,19 @@ declare const index$6_ConfirmSetupRequestSchema: typeof ConfirmSetupRequestSchem
3830
3939
  type index$6_ConfirmSetupResponse = ConfirmSetupResponse;
3831
3940
  declare const index$6_ConfirmSetupResponseSchema: typeof ConfirmSetupResponseSchema;
3832
3941
  type index$6_DeviceList = DeviceList;
3942
+ type index$6_DeviceListResponse = DeviceListResponse;
3943
+ declare const index$6_DeviceListResponseSchema: typeof DeviceListResponseSchema;
3833
3944
  declare const index$6_DeviceListSchema: typeof DeviceListSchema;
3834
3945
  type index$6_DisableRequest = DisableRequest;
3835
3946
  declare const index$6_DisableRequestSchema: typeof DisableRequestSchema;
3836
- type index$6_PaginatedDeviceListList = PaginatedDeviceListList;
3837
- declare const index$6_PaginatedDeviceListListSchema: typeof PaginatedDeviceListListSchema;
3947
+ type index$6_PaginatedDeviceListResponseList = PaginatedDeviceListResponseList;
3948
+ declare const index$6_PaginatedDeviceListResponseListSchema: typeof PaginatedDeviceListResponseListSchema;
3838
3949
  type index$6_SetupRequest = SetupRequest;
3839
3950
  declare const index$6_SetupRequestSchema: typeof SetupRequestSchema;
3840
3951
  type index$6_SetupResponse = SetupResponse;
3841
3952
  declare const index$6_SetupResponseSchema: typeof SetupResponseSchema;
3953
+ type index$6_TotpVerifyUser = TotpVerifyUser;
3954
+ declare const index$6_TotpVerifyUserSchema: typeof TotpVerifyUserSchema;
3842
3955
  type index$6_VerifyBackupRequest = VerifyBackupRequest;
3843
3956
  declare const index$6_VerifyBackupRequestSchema: typeof VerifyBackupRequestSchema;
3844
3957
  type index$6_VerifyRequest = VerifyRequest;
@@ -3846,7 +3959,7 @@ declare const index$6_VerifyRequestSchema: typeof VerifyRequestSchema;
3846
3959
  type index$6_VerifyResponse = VerifyResponse;
3847
3960
  declare const index$6_VerifyResponseSchema: typeof VerifyResponseSchema;
3848
3961
  declare namespace index$6 {
3849
- export { type index$6_BackupCodesRegenerateRequest as BackupCodesRegenerateRequest, index$6_BackupCodesRegenerateRequestSchema as BackupCodesRegenerateRequestSchema, type index$6_BackupCodesRegenerateResponse as BackupCodesRegenerateResponse, index$6_BackupCodesRegenerateResponseSchema as BackupCodesRegenerateResponseSchema, type index$6_BackupCodesStatus as BackupCodesStatus, index$6_BackupCodesStatusSchema as BackupCodesStatusSchema, type index$6_ConfirmSetupRequest as ConfirmSetupRequest, index$6_ConfirmSetupRequestSchema as ConfirmSetupRequestSchema, type index$6_ConfirmSetupResponse as ConfirmSetupResponse, index$6_ConfirmSetupResponseSchema as ConfirmSetupResponseSchema, type index$6_DeviceList as DeviceList, index$6_DeviceListSchema as DeviceListSchema, type index$6_DisableRequest as DisableRequest, index$6_DisableRequestSchema as DisableRequestSchema, type index$6_PaginatedDeviceListList as PaginatedDeviceListList, index$6_PaginatedDeviceListListSchema as PaginatedDeviceListListSchema, type index$6_SetupRequest as SetupRequest, index$6_SetupRequestSchema as SetupRequestSchema, type index$6_SetupResponse as SetupResponse, index$6_SetupResponseSchema as SetupResponseSchema, type index$6_VerifyBackupRequest as VerifyBackupRequest, index$6_VerifyBackupRequestSchema as VerifyBackupRequestSchema, type index$6_VerifyRequest as VerifyRequest, index$6_VerifyRequestSchema as VerifyRequestSchema, type index$6_VerifyResponse as VerifyResponse, index$6_VerifyResponseSchema as VerifyResponseSchema };
3962
+ export { type index$6_BackupCodesRegenerateRequest as BackupCodesRegenerateRequest, index$6_BackupCodesRegenerateRequestSchema as BackupCodesRegenerateRequestSchema, type index$6_BackupCodesRegenerateResponse as BackupCodesRegenerateResponse, index$6_BackupCodesRegenerateResponseSchema as BackupCodesRegenerateResponseSchema, type index$6_BackupCodesStatus as BackupCodesStatus, index$6_BackupCodesStatusSchema as BackupCodesStatusSchema, type index$6_ConfirmSetupRequest as ConfirmSetupRequest, index$6_ConfirmSetupRequestSchema as ConfirmSetupRequestSchema, type index$6_ConfirmSetupResponse as ConfirmSetupResponse, index$6_ConfirmSetupResponseSchema as ConfirmSetupResponseSchema, type index$6_DeviceList as DeviceList, type index$6_DeviceListResponse as DeviceListResponse, index$6_DeviceListResponseSchema as DeviceListResponseSchema, index$6_DeviceListSchema as DeviceListSchema, type index$6_DisableRequest as DisableRequest, index$6_DisableRequestSchema as DisableRequestSchema, type index$6_PaginatedDeviceListResponseList as PaginatedDeviceListResponseList, index$6_PaginatedDeviceListResponseListSchema as PaginatedDeviceListResponseListSchema, type index$6_SetupRequest as SetupRequest, index$6_SetupRequestSchema as SetupRequestSchema, type index$6_SetupResponse as SetupResponse, index$6_SetupResponseSchema as SetupResponseSchema, type index$6_TotpVerifyUser as TotpVerifyUser, index$6_TotpVerifyUserSchema as TotpVerifyUserSchema, type index$6_VerifyBackupRequest as VerifyBackupRequest, index$6_VerifyBackupRequestSchema as VerifyBackupRequestSchema, type index$6_VerifyRequest as VerifyRequest, index$6_VerifyRequestSchema as VerifyRequestSchema, type index$6_VerifyResponse as VerifyResponse, index$6_VerifyResponseSchema as VerifyResponseSchema };
3850
3963
  }
3851
3964
 
3852
3965
  /**
@@ -3881,7 +3994,7 @@ declare function createTotpBackupCodesRegenerateCreate(data: BackupCodesRegenera
3881
3994
  declare function getTotpDevicesList(params?: {
3882
3995
  page?: number;
3883
3996
  page_size?: number;
3884
- }, client?: any): Promise<PaginatedDeviceListList>;
3997
+ }, client?: any): Promise<PaginatedDeviceListResponseList>;
3885
3998
  /**
3886
3999
  * API operation
3887
4000
  *
@@ -5008,7 +5121,7 @@ declare function useCreateTotpBackupCodesRegenerateCreate(): (data: BackupCodesR
5008
5121
  declare function useTotpDevicesList(params?: {
5009
5122
  page?: number;
5010
5123
  page_size?: number;
5011
- }, client?: API$1): ReturnType<typeof useSWR<PaginatedDeviceListList>>;
5124
+ }, client?: API$1): ReturnType<typeof useSWR<PaginatedDeviceListResponseList>>;
5012
5125
  /**
5013
5126
  * API operation
5014
5127
  *
package/dist/clients.d.ts CHANGED
@@ -3229,7 +3229,7 @@ declare enum DeviceListStatus {
3229
3229
  *
3230
3230
  * Response model (includes read-only fields).
3231
3231
  */
3232
- interface PaginatedDeviceListList$1 {
3232
+ interface PaginatedDeviceListResponseList$1 {
3233
3233
  /** Total number of items across all pages */
3234
3234
  count: number;
3235
3235
  /** Current page number (1-based) */
@@ -3247,7 +3247,7 @@ interface PaginatedDeviceListList$1 {
3247
3247
  /** Previous page number (null if no previous page) */
3248
3248
  previous_page?: number | null;
3249
3249
  /** Array of items for current page */
3250
- results: Array<DeviceList$1>;
3250
+ results: Array<DeviceListResponse$1>;
3251
3251
  }
3252
3252
  /**
3253
3253
  * Serializer for completely disabling 2FA.
@@ -3258,6 +3258,15 @@ interface DisableRequest$1 {
3258
3258
  /** TOTP code for verification */
3259
3259
  code: string;
3260
3260
  }
3261
+ /**
3262
+ * Response serializer for device list endpoint.
3263
+ *
3264
+ * Response model (includes read-only fields).
3265
+ */
3266
+ interface DeviceListResponse$1 {
3267
+ devices: Array<DeviceList$1>;
3268
+ has_2fa_enabled: boolean;
3269
+ }
3261
3270
  /**
3262
3271
  * Serializer for listing TOTP devices.
3263
3272
  *
@@ -3286,11 +3295,11 @@ interface DeviceList$1 {
3286
3295
  declare class TotpManagement {
3287
3296
  private client;
3288
3297
  constructor(client: any);
3289
- totpDevicesList(page?: number, page_size?: number): Promise<PaginatedDeviceListList$1>;
3298
+ totpDevicesList(page?: number, page_size?: number): Promise<PaginatedDeviceListResponseList$1>;
3290
3299
  totpDevicesList(params?: {
3291
3300
  page?: number;
3292
3301
  page_size?: number;
3293
- }): Promise<PaginatedDeviceListList$1>;
3302
+ }): Promise<PaginatedDeviceListResponseList$1>;
3294
3303
  /**
3295
3304
  * Completely disable 2FA for account. Requires verification code.
3296
3305
  */
@@ -3387,8 +3396,7 @@ interface VerifyResponse$1 {
3387
3396
  access_token: string;
3388
3397
  /** JWT refresh token */
3389
3398
  refresh_token: string;
3390
- /** User profile data */
3391
- user: Record<string, any>;
3399
+ user: TotpVerifyUser$1;
3392
3400
  /** Number of remaining backup codes (if backup code was used) */
3393
3401
  remaining_backup_codes?: number;
3394
3402
  /** Warning message (e.g., low backup codes) */
@@ -3405,6 +3413,34 @@ interface VerifyBackupRequest$1 {
3405
3413
  /** 8-character backup recovery code */
3406
3414
  backup_code: string;
3407
3415
  }
3416
+ /**
3417
+ * User data returned after 2FA verification.
3418
+ *
3419
+ * Response model (includes read-only fields).
3420
+ */
3421
+ interface TotpVerifyUser$1 {
3422
+ id: number;
3423
+ email: string;
3424
+ first_name?: string;
3425
+ last_name?: string;
3426
+ /** Get user's full name. */
3427
+ full_name: string;
3428
+ /** Get user's initials for avatar fallback. */
3429
+ initials: string;
3430
+ /** Get formatted username for display. */
3431
+ display_username: string;
3432
+ company?: string;
3433
+ phone?: string;
3434
+ position?: string;
3435
+ avatar?: string | null;
3436
+ /** Designates whether the user can log into this admin site. */
3437
+ is_staff: boolean;
3438
+ /** Designates that this user has all permissions without explicitly assigning them. */
3439
+ is_superuser: boolean;
3440
+ date_joined: string;
3441
+ last_login?: string | null;
3442
+ unanswered_messages_count: number;
3443
+ }
3408
3444
 
3409
3445
  /**
3410
3446
  * API endpoints for TOTP Verification.
@@ -3658,6 +3694,26 @@ declare const DeviceListSchema: z.ZodObject<{
3658
3694
  */
3659
3695
  type DeviceList = z.infer<typeof DeviceListSchema>;
3660
3696
 
3697
+ /**
3698
+ * Response serializer for device list endpoint.
3699
+ */
3700
+ declare const DeviceListResponseSchema: z.ZodObject<{
3701
+ devices: z.ZodArray<z.ZodObject<{
3702
+ id: z.ZodString;
3703
+ name: z.ZodString;
3704
+ is_primary: z.ZodBoolean;
3705
+ status: z.ZodEnum<typeof DeviceListStatus>;
3706
+ created_at: z.ZodISODateTime;
3707
+ confirmed_at: z.ZodNullable<z.ZodISODateTime>;
3708
+ last_used_at: z.ZodNullable<z.ZodISODateTime>;
3709
+ }, z.core.$strip>>;
3710
+ has_2fa_enabled: z.ZodBoolean;
3711
+ }, z.core.$strip>;
3712
+ /**
3713
+ * Infer TypeScript type from Zod schema
3714
+ */
3715
+ type DeviceListResponse = z.infer<typeof DeviceListResponseSchema>;
3716
+
3661
3717
  /**
3662
3718
  * Zod schema for DisableRequest
3663
3719
  *
@@ -3676,7 +3732,7 @@ declare const DisableRequestSchema: z.ZodObject<{
3676
3732
  */
3677
3733
  type DisableRequest = z.infer<typeof DisableRequestSchema>;
3678
3734
 
3679
- declare const PaginatedDeviceListListSchema: z.ZodObject<{
3735
+ declare const PaginatedDeviceListResponseListSchema: z.ZodObject<{
3680
3736
  count: z.ZodInt;
3681
3737
  page: z.ZodInt;
3682
3738
  pages: z.ZodInt;
@@ -3686,19 +3742,22 @@ declare const PaginatedDeviceListListSchema: z.ZodObject<{
3686
3742
  next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3687
3743
  previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3688
3744
  results: z.ZodArray<z.ZodObject<{
3689
- id: z.ZodString;
3690
- name: z.ZodString;
3691
- is_primary: z.ZodBoolean;
3692
- status: z.ZodEnum<typeof DeviceListStatus>;
3693
- created_at: z.ZodISODateTime;
3694
- confirmed_at: z.ZodNullable<z.ZodISODateTime>;
3695
- last_used_at: z.ZodNullable<z.ZodISODateTime>;
3745
+ devices: z.ZodArray<z.ZodObject<{
3746
+ id: z.ZodString;
3747
+ name: z.ZodString;
3748
+ is_primary: z.ZodBoolean;
3749
+ status: z.ZodEnum<typeof DeviceListStatus>;
3750
+ created_at: z.ZodISODateTime;
3751
+ confirmed_at: z.ZodNullable<z.ZodISODateTime>;
3752
+ last_used_at: z.ZodNullable<z.ZodISODateTime>;
3753
+ }, z.core.$strip>>;
3754
+ has_2fa_enabled: z.ZodBoolean;
3696
3755
  }, z.core.$strip>>;
3697
3756
  }, z.core.$strip>;
3698
3757
  /**
3699
3758
  * Infer TypeScript type from Zod schema
3700
3759
  */
3701
- type PaginatedDeviceListList = z.infer<typeof PaginatedDeviceListListSchema>;
3760
+ type PaginatedDeviceListResponseList = z.infer<typeof PaginatedDeviceListResponseListSchema>;
3702
3761
 
3703
3762
  /**
3704
3763
  * Zod schema for SetupRequest
@@ -3740,6 +3799,39 @@ declare const SetupResponseSchema: z.ZodObject<{
3740
3799
  */
3741
3800
  type SetupResponse = z.infer<typeof SetupResponseSchema>;
3742
3801
 
3802
+ /**
3803
+ * Zod schema for TotpVerifyUser
3804
+ *
3805
+ * This schema provides runtime validation and type inference.
3806
+ * * User data returned after 2FA verification.
3807
+ * */
3808
+
3809
+ /**
3810
+ * User data returned after 2FA verification.
3811
+ */
3812
+ declare const TotpVerifyUserSchema: z.ZodObject<{
3813
+ id: z.ZodInt;
3814
+ email: z.ZodEmail;
3815
+ first_name: z.ZodOptional<z.ZodString>;
3816
+ last_name: z.ZodOptional<z.ZodString>;
3817
+ full_name: z.ZodString;
3818
+ initials: z.ZodString;
3819
+ display_username: z.ZodString;
3820
+ company: z.ZodOptional<z.ZodString>;
3821
+ phone: z.ZodOptional<z.ZodString>;
3822
+ position: z.ZodOptional<z.ZodString>;
3823
+ avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
3824
+ is_staff: z.ZodBoolean;
3825
+ is_superuser: z.ZodBoolean;
3826
+ date_joined: z.ZodISODateTime;
3827
+ last_login: z.ZodNullable<z.ZodISODateTime>;
3828
+ unanswered_messages_count: z.ZodInt;
3829
+ }, z.core.$strip>;
3830
+ /**
3831
+ * Infer TypeScript type from Zod schema
3832
+ */
3833
+ type TotpVerifyUser = z.infer<typeof TotpVerifyUserSchema>;
3834
+
3743
3835
  /**
3744
3836
  * Zod schema for VerifyBackupRequest
3745
3837
  *
@@ -3792,7 +3884,24 @@ declare const VerifyResponseSchema: z.ZodObject<{
3792
3884
  message: z.ZodString;
3793
3885
  access_token: z.ZodString;
3794
3886
  refresh_token: z.ZodString;
3795
- user: z.ZodRecord<z.ZodString, z.ZodAny>;
3887
+ user: z.ZodObject<{
3888
+ id: z.ZodInt;
3889
+ email: z.ZodEmail;
3890
+ first_name: z.ZodOptional<z.ZodString>;
3891
+ last_name: z.ZodOptional<z.ZodString>;
3892
+ full_name: z.ZodString;
3893
+ initials: z.ZodString;
3894
+ display_username: z.ZodString;
3895
+ company: z.ZodOptional<z.ZodString>;
3896
+ phone: z.ZodOptional<z.ZodString>;
3897
+ position: z.ZodOptional<z.ZodString>;
3898
+ avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
3899
+ is_staff: z.ZodBoolean;
3900
+ is_superuser: z.ZodBoolean;
3901
+ date_joined: z.ZodISODateTime;
3902
+ last_login: z.ZodNullable<z.ZodISODateTime>;
3903
+ unanswered_messages_count: z.ZodInt;
3904
+ }, z.core.$strip>;
3796
3905
  remaining_backup_codes: z.ZodOptional<z.ZodInt>;
3797
3906
  warning: z.ZodOptional<z.ZodString>;
3798
3907
  }, z.core.$strip>;
@@ -3830,15 +3939,19 @@ declare const index$6_ConfirmSetupRequestSchema: typeof ConfirmSetupRequestSchem
3830
3939
  type index$6_ConfirmSetupResponse = ConfirmSetupResponse;
3831
3940
  declare const index$6_ConfirmSetupResponseSchema: typeof ConfirmSetupResponseSchema;
3832
3941
  type index$6_DeviceList = DeviceList;
3942
+ type index$6_DeviceListResponse = DeviceListResponse;
3943
+ declare const index$6_DeviceListResponseSchema: typeof DeviceListResponseSchema;
3833
3944
  declare const index$6_DeviceListSchema: typeof DeviceListSchema;
3834
3945
  type index$6_DisableRequest = DisableRequest;
3835
3946
  declare const index$6_DisableRequestSchema: typeof DisableRequestSchema;
3836
- type index$6_PaginatedDeviceListList = PaginatedDeviceListList;
3837
- declare const index$6_PaginatedDeviceListListSchema: typeof PaginatedDeviceListListSchema;
3947
+ type index$6_PaginatedDeviceListResponseList = PaginatedDeviceListResponseList;
3948
+ declare const index$6_PaginatedDeviceListResponseListSchema: typeof PaginatedDeviceListResponseListSchema;
3838
3949
  type index$6_SetupRequest = SetupRequest;
3839
3950
  declare const index$6_SetupRequestSchema: typeof SetupRequestSchema;
3840
3951
  type index$6_SetupResponse = SetupResponse;
3841
3952
  declare const index$6_SetupResponseSchema: typeof SetupResponseSchema;
3953
+ type index$6_TotpVerifyUser = TotpVerifyUser;
3954
+ declare const index$6_TotpVerifyUserSchema: typeof TotpVerifyUserSchema;
3842
3955
  type index$6_VerifyBackupRequest = VerifyBackupRequest;
3843
3956
  declare const index$6_VerifyBackupRequestSchema: typeof VerifyBackupRequestSchema;
3844
3957
  type index$6_VerifyRequest = VerifyRequest;
@@ -3846,7 +3959,7 @@ declare const index$6_VerifyRequestSchema: typeof VerifyRequestSchema;
3846
3959
  type index$6_VerifyResponse = VerifyResponse;
3847
3960
  declare const index$6_VerifyResponseSchema: typeof VerifyResponseSchema;
3848
3961
  declare namespace index$6 {
3849
- export { type index$6_BackupCodesRegenerateRequest as BackupCodesRegenerateRequest, index$6_BackupCodesRegenerateRequestSchema as BackupCodesRegenerateRequestSchema, type index$6_BackupCodesRegenerateResponse as BackupCodesRegenerateResponse, index$6_BackupCodesRegenerateResponseSchema as BackupCodesRegenerateResponseSchema, type index$6_BackupCodesStatus as BackupCodesStatus, index$6_BackupCodesStatusSchema as BackupCodesStatusSchema, type index$6_ConfirmSetupRequest as ConfirmSetupRequest, index$6_ConfirmSetupRequestSchema as ConfirmSetupRequestSchema, type index$6_ConfirmSetupResponse as ConfirmSetupResponse, index$6_ConfirmSetupResponseSchema as ConfirmSetupResponseSchema, type index$6_DeviceList as DeviceList, index$6_DeviceListSchema as DeviceListSchema, type index$6_DisableRequest as DisableRequest, index$6_DisableRequestSchema as DisableRequestSchema, type index$6_PaginatedDeviceListList as PaginatedDeviceListList, index$6_PaginatedDeviceListListSchema as PaginatedDeviceListListSchema, type index$6_SetupRequest as SetupRequest, index$6_SetupRequestSchema as SetupRequestSchema, type index$6_SetupResponse as SetupResponse, index$6_SetupResponseSchema as SetupResponseSchema, type index$6_VerifyBackupRequest as VerifyBackupRequest, index$6_VerifyBackupRequestSchema as VerifyBackupRequestSchema, type index$6_VerifyRequest as VerifyRequest, index$6_VerifyRequestSchema as VerifyRequestSchema, type index$6_VerifyResponse as VerifyResponse, index$6_VerifyResponseSchema as VerifyResponseSchema };
3962
+ export { type index$6_BackupCodesRegenerateRequest as BackupCodesRegenerateRequest, index$6_BackupCodesRegenerateRequestSchema as BackupCodesRegenerateRequestSchema, type index$6_BackupCodesRegenerateResponse as BackupCodesRegenerateResponse, index$6_BackupCodesRegenerateResponseSchema as BackupCodesRegenerateResponseSchema, type index$6_BackupCodesStatus as BackupCodesStatus, index$6_BackupCodesStatusSchema as BackupCodesStatusSchema, type index$6_ConfirmSetupRequest as ConfirmSetupRequest, index$6_ConfirmSetupRequestSchema as ConfirmSetupRequestSchema, type index$6_ConfirmSetupResponse as ConfirmSetupResponse, index$6_ConfirmSetupResponseSchema as ConfirmSetupResponseSchema, type index$6_DeviceList as DeviceList, type index$6_DeviceListResponse as DeviceListResponse, index$6_DeviceListResponseSchema as DeviceListResponseSchema, index$6_DeviceListSchema as DeviceListSchema, type index$6_DisableRequest as DisableRequest, index$6_DisableRequestSchema as DisableRequestSchema, type index$6_PaginatedDeviceListResponseList as PaginatedDeviceListResponseList, index$6_PaginatedDeviceListResponseListSchema as PaginatedDeviceListResponseListSchema, type index$6_SetupRequest as SetupRequest, index$6_SetupRequestSchema as SetupRequestSchema, type index$6_SetupResponse as SetupResponse, index$6_SetupResponseSchema as SetupResponseSchema, type index$6_TotpVerifyUser as TotpVerifyUser, index$6_TotpVerifyUserSchema as TotpVerifyUserSchema, type index$6_VerifyBackupRequest as VerifyBackupRequest, index$6_VerifyBackupRequestSchema as VerifyBackupRequestSchema, type index$6_VerifyRequest as VerifyRequest, index$6_VerifyRequestSchema as VerifyRequestSchema, type index$6_VerifyResponse as VerifyResponse, index$6_VerifyResponseSchema as VerifyResponseSchema };
3850
3963
  }
3851
3964
 
3852
3965
  /**
@@ -3881,7 +3994,7 @@ declare function createTotpBackupCodesRegenerateCreate(data: BackupCodesRegenera
3881
3994
  declare function getTotpDevicesList(params?: {
3882
3995
  page?: number;
3883
3996
  page_size?: number;
3884
- }, client?: any): Promise<PaginatedDeviceListList>;
3997
+ }, client?: any): Promise<PaginatedDeviceListResponseList>;
3885
3998
  /**
3886
3999
  * API operation
3887
4000
  *
@@ -5008,7 +5121,7 @@ declare function useCreateTotpBackupCodesRegenerateCreate(): (data: BackupCodesR
5008
5121
  declare function useTotpDevicesList(params?: {
5009
5122
  page?: number;
5010
5123
  page_size?: number;
5011
- }, client?: API$1): ReturnType<typeof useSWR<PaginatedDeviceListList>>;
5124
+ }, client?: API$1): ReturnType<typeof useSWR<PaginatedDeviceListResponseList>>;
5012
5125
  /**
5013
5126
  * API operation
5014
5127
  *