@djangocfg/api 2.1.309 → 2.1.310

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 (40) hide show
  1. package/dist/auth-server.cjs +18 -7
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +18 -7
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +54 -21
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.mjs +54 -21
  8. package/dist/auth.mjs.map +1 -1
  9. package/dist/clients.cjs +54 -21
  10. package/dist/clients.cjs.map +1 -1
  11. package/dist/clients.d.cts +144 -144
  12. package/dist/clients.d.ts +144 -144
  13. package/dist/clients.mjs +54 -21
  14. package/dist/clients.mjs.map +1 -1
  15. package/dist/hooks.cjs +18 -7
  16. package/dist/hooks.cjs.map +1 -1
  17. package/dist/hooks.d.cts +92 -92
  18. package/dist/hooks.d.ts +92 -92
  19. package/dist/hooks.mjs +18 -7
  20. package/dist/hooks.mjs.map +1 -1
  21. package/dist/index.cjs +36 -14
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +111 -105
  24. package/dist/index.d.ts +111 -105
  25. package/dist/index.mjs +36 -14
  26. package/dist/index.mjs.map +1 -1
  27. package/package.json +2 -2
  28. package/src/_api/generated/cfg_accounts/accounts/models.ts +25 -25
  29. package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +62 -62
  30. package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +24 -24
  31. package/src/_api/generated/cfg_accounts/client.ts +3 -0
  32. package/src/_api/generated/cfg_accounts/http.ts +30 -7
  33. package/src/_api/generated/cfg_centrifugo/client.ts +3 -0
  34. package/src/_api/generated/cfg_centrifugo/http.ts +30 -7
  35. package/src/_api/generated/cfg_totp/client.ts +3 -0
  36. package/src/_api/generated/cfg_totp/http.ts +30 -7
  37. package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +10 -10
  38. package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +10 -10
  39. package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +18 -18
  40. package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +18 -18
package/dist/index.d.cts CHANGED
@@ -48,35 +48,15 @@ declare namespace enums {
48
48
  }
49
49
 
50
50
  /**
51
- * Error response for OAuth endpoints.
52
- *
53
- * Response model (includes read-only fields).
54
- */
55
- interface OAuthError$1 {
56
- /** Error code */
57
- error: string;
58
- /** Human-readable error description */
59
- error_description?: string;
60
- }
61
- /**
62
- * Response with available OAuth providers.
63
- *
64
- * Response model (includes read-only fields).
65
- */
66
- interface OAuthProvidersResponse$1 {
67
- /** List of available OAuth providers */
68
- providers: Array<Record<string, any>>;
69
- }
70
- /**
71
- * Response with OAuth authorization URL.
51
+ * Request to start OAuth flow.
72
52
  *
73
- * Response model (includes read-only fields).
53
+ * Request model (no read-only fields).
74
54
  */
75
- interface OAuthAuthorizeResponse$1 {
76
- /** Full URL to redirect user to OAuth provider */
77
- authorization_url: string;
78
- /** State token for CSRF protection. Store this and verify on callback. */
79
- state: string;
55
+ interface OAuthAuthorizeRequestRequest$1 {
56
+ /** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
57
+ redirect_uri?: string;
58
+ /** Optional source URL for registration tracking */
59
+ source_url?: string;
80
60
  }
81
61
  /**
82
62
  * Request to complete OAuth flow (callback handler).
@@ -91,6 +71,32 @@ interface OAuthCallbackRequestRequest$1 {
91
71
  /** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
92
72
  redirect_uri?: string;
93
73
  }
74
+ /**
75
+ * Response with JWT tokens after OAuth authentication. When 2FA is required: -
76
+ * requires_2fa: True - session_id: UUID of 2FA verification session -
77
+ * access/refresh/user: null When 2FA is not required: - requires_2fa: False -
78
+ * session_id: null - access/refresh/user: populated
79
+ *
80
+ * Response model (includes read-only fields).
81
+ */
82
+ interface OAuthTokenResponse$1 {
83
+ /** True if 2FA verification is required */
84
+ requires_2fa?: boolean;
85
+ /** 2FA session ID (only when requires_2fa=True) */
86
+ session_id?: string | null;
87
+ /** JWT access token (null when requires_2fa=True) */
88
+ access?: string | null;
89
+ /** JWT refresh token (null when requires_2fa=True) */
90
+ refresh?: string | null;
91
+ /** Authenticated user info (null when requires_2fa=True) */
92
+ user?: Record<string, any> | null;
93
+ /** True if a new user was created during this OAuth flow */
94
+ is_new_user: boolean;
95
+ /** True if a new OAuth connection was created */
96
+ is_new_connection: boolean;
97
+ /** True if user should be prompted to enable 2FA */
98
+ should_prompt_2fa?: boolean;
99
+ }
94
100
  /**
95
101
  * Serializer for OAuth connection info (user-facing).
96
102
  *
@@ -115,41 +121,15 @@ interface OAuthConnection$1 {
115
121
  last_login_at: string;
116
122
  }
117
123
  /**
118
- * Request to start OAuth flow.
119
- *
120
- * Request model (no read-only fields).
121
- */
122
- interface OAuthAuthorizeRequestRequest$1 {
123
- /** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
124
- redirect_uri?: string;
125
- /** Optional source URL for registration tracking */
126
- source_url?: string;
127
- }
128
- /**
129
- * Response with JWT tokens after OAuth authentication. When 2FA is required: -
130
- * requires_2fa: True - session_id: UUID of 2FA verification session -
131
- * access/refresh/user: null When 2FA is not required: - requires_2fa: False -
132
- * session_id: null - access/refresh/user: populated
124
+ * Response with OAuth authorization URL.
133
125
  *
134
126
  * Response model (includes read-only fields).
135
127
  */
136
- interface OAuthTokenResponse$1 {
137
- /** True if 2FA verification is required */
138
- requires_2fa?: boolean;
139
- /** 2FA session ID (only when requires_2fa=True) */
140
- session_id?: string | null;
141
- /** JWT access token (null when requires_2fa=True) */
142
- access?: string | null;
143
- /** JWT refresh token (null when requires_2fa=True) */
144
- refresh?: string | null;
145
- /** Authenticated user info (null when requires_2fa=True) */
146
- user?: Record<string, any> | null;
147
- /** True if a new user was created during this OAuth flow */
148
- is_new_user: boolean;
149
- /** True if a new OAuth connection was created */
150
- is_new_connection: boolean;
151
- /** True if user should be prompted to enable 2FA */
152
- should_prompt_2fa?: boolean;
128
+ interface OAuthAuthorizeResponse$1 {
129
+ /** Full URL to redirect user to OAuth provider */
130
+ authorization_url: string;
131
+ /** State token for CSRF protection. Store this and verify on callback. */
132
+ state: string;
153
133
  }
154
134
  /**
155
135
  * Request to disconnect OAuth provider.
@@ -162,6 +142,26 @@ interface OAuthDisconnectRequestRequest$1 {
162
142
  * `github` - GitHub */
163
143
  provider: OAuthConnectionProvider;
164
144
  }
145
+ /**
146
+ * Response with available OAuth providers.
147
+ *
148
+ * Response model (includes read-only fields).
149
+ */
150
+ interface OAuthProvidersResponse$1 {
151
+ /** List of available OAuth providers */
152
+ providers: Array<Record<string, any>>;
153
+ }
154
+ /**
155
+ * Error response for OAuth endpoints.
156
+ *
157
+ * Response model (includes read-only fields).
158
+ */
159
+ interface OAuthError$1 {
160
+ /** Error code */
161
+ error: string;
162
+ /** Human-readable error description */
163
+ error_description?: string;
164
+ }
165
165
 
166
166
  declare namespace models$2 {
167
167
  export type { OAuthAuthorizeRequestRequest$1 as OAuthAuthorizeRequestRequest, OAuthAuthorizeResponse$1 as OAuthAuthorizeResponse, OAuthCallbackRequestRequest$1 as OAuthCallbackRequestRequest, OAuthConnection$1 as OAuthConnection, OAuthDisconnectRequestRequest$1 as OAuthDisconnectRequestRequest, OAuthError$1 as OAuthError, OAuthProvidersResponse$1 as OAuthProvidersResponse, OAuthTokenResponse$1 as OAuthTokenResponse };
@@ -212,7 +212,7 @@ declare class Oauth {
212
212
  *
213
213
  * Request model (no read-only fields).
214
214
  */
215
- interface UserProfileUpdateRequest$1 {
215
+ interface PatchedUserProfileUpdateRequest$1 {
216
216
  first_name?: string;
217
217
  last_name?: string;
218
218
  company?: string;
@@ -221,17 +221,23 @@ interface UserProfileUpdateRequest$1 {
221
221
  language?: string;
222
222
  }
223
223
  /**
224
- * Serializer for updating user profile.
225
224
  *
226
225
  * Request model (no read-only fields).
227
226
  */
228
- interface PatchedUserProfileUpdateRequest$1 {
229
- first_name?: string;
230
- last_name?: string;
231
- company?: string;
232
- phone?: string;
233
- position?: string;
234
- language?: string;
227
+ interface CfgAccountsProfileAvatarCreateRequest$1 {
228
+ /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
229
+ avatar: File | Blob;
230
+ }
231
+ /**
232
+ * Response serializer for account deletion.
233
+ *
234
+ * Response model (includes read-only fields).
235
+ */
236
+ interface AccountDeleteResponse$1 {
237
+ /** Whether the account was successfully deleted */
238
+ success: boolean;
239
+ /** Human-readable message about the deletion */
240
+ message: string;
235
241
  }
236
242
  /**
237
243
  * Serializer for user details.
@@ -264,23 +270,17 @@ interface User$2 {
264
270
  centrifugo: CentrifugoToken$2 | null;
265
271
  }
266
272
  /**
267
- * Response serializer for account deletion.
268
- *
269
- * Response model (includes read-only fields).
270
- */
271
- interface AccountDeleteResponse$1 {
272
- /** Whether the account was successfully deleted */
273
- success: boolean;
274
- /** Human-readable message about the deletion */
275
- message: string;
276
- }
277
- /**
273
+ * Serializer for updating user profile.
278
274
  *
279
275
  * Request model (no read-only fields).
280
276
  */
281
- interface CfgAccountsProfileAvatarCreateRequest$1 {
282
- /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
283
- avatar: File | Blob;
277
+ interface UserProfileUpdateRequest$1 {
278
+ first_name?: string;
279
+ last_name?: string;
280
+ company?: string;
281
+ phone?: string;
282
+ position?: string;
283
+ language?: string;
284
284
  }
285
285
  /**
286
286
  * Nested serializer for Centrifugo WebSocket connection token.
@@ -359,18 +359,6 @@ declare class UserProfile {
359
359
  accountsProfileUpdatePartialUpdate(data?: PatchedUserProfileUpdateRequest$1): Promise<User$2>;
360
360
  }
361
361
 
362
- /**
363
- * Serializer for OTP verification.
364
- *
365
- * Request model (no read-only fields).
366
- */
367
- interface OTPVerifyRequest$1 {
368
- /** Email address used for OTP request */
369
- identifier: string;
370
- otp: string;
371
- /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
372
- source_url?: string;
373
- }
374
362
  /**
375
363
  * OTP verification response. When 2FA is required: - requires_2fa: True -
376
364
  * session_id: UUID of 2FA verification session - refresh/access/user: null
@@ -392,17 +380,6 @@ interface OTPVerifyResponse$1 {
392
380
  /** Whether user should be prompted to enable 2FA */
393
381
  should_prompt_2fa?: boolean;
394
382
  }
395
- /**
396
- * Serializer for OTP request.
397
- *
398
- * Request model (no read-only fields).
399
- */
400
- interface OTPRequestRequest$1 {
401
- /** Email address for OTP delivery */
402
- identifier: string;
403
- /** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
404
- source_url?: string;
405
- }
406
383
  /**
407
384
  * OTP request response.
408
385
  *
@@ -432,6 +409,29 @@ interface OTPErrorResponse$1 {
432
409
  /** Seconds until the client may retry (present only for rate-limit errors) */
433
410
  retry_after?: number | null;
434
411
  }
412
+ /**
413
+ * Serializer for OTP verification.
414
+ *
415
+ * Request model (no read-only fields).
416
+ */
417
+ interface OTPVerifyRequest$1 {
418
+ /** Email address used for OTP request */
419
+ identifier: string;
420
+ otp: string;
421
+ /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
422
+ source_url?: string;
423
+ }
424
+ /**
425
+ * Serializer for OTP request.
426
+ *
427
+ * Request model (no read-only fields).
428
+ */
429
+ interface OTPRequestRequest$1 {
430
+ /** Email address for OTP delivery */
431
+ identifier: string;
432
+ /** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
433
+ source_url?: string;
434
+ }
435
435
  /**
436
436
  * Serializer for user details.
437
437
  *
@@ -517,6 +517,11 @@ interface HttpRequest {
517
517
  formData?: FormData;
518
518
  /** Binary data for octet-stream uploads */
519
519
  binaryBody?: Blob | ArrayBuffer;
520
+ /**
521
+ * Force a specific response parser. When set, overrides Content-Type sniffing.
522
+ * Generated for endpoints whose primary response is binary (file downloads).
523
+ */
524
+ responseType?: 'json' | 'text' | 'blob';
520
525
  }
521
526
  interface HttpResponse<T = any> {
522
527
  data: T;
@@ -821,6 +826,7 @@ declare class APIClient {
821
826
  formData?: FormData;
822
827
  binaryBody?: Blob | ArrayBuffer;
823
828
  headers?: Record<string, string>;
829
+ responseType?: 'json' | 'text' | 'blob';
824
830
  }): Promise<T>;
825
831
  /**
826
832
  * Internal request method (without retry wrapper).
package/dist/index.d.ts CHANGED
@@ -48,35 +48,15 @@ declare namespace enums {
48
48
  }
49
49
 
50
50
  /**
51
- * Error response for OAuth endpoints.
52
- *
53
- * Response model (includes read-only fields).
54
- */
55
- interface OAuthError$1 {
56
- /** Error code */
57
- error: string;
58
- /** Human-readable error description */
59
- error_description?: string;
60
- }
61
- /**
62
- * Response with available OAuth providers.
63
- *
64
- * Response model (includes read-only fields).
65
- */
66
- interface OAuthProvidersResponse$1 {
67
- /** List of available OAuth providers */
68
- providers: Array<Record<string, any>>;
69
- }
70
- /**
71
- * Response with OAuth authorization URL.
51
+ * Request to start OAuth flow.
72
52
  *
73
- * Response model (includes read-only fields).
53
+ * Request model (no read-only fields).
74
54
  */
75
- interface OAuthAuthorizeResponse$1 {
76
- /** Full URL to redirect user to OAuth provider */
77
- authorization_url: string;
78
- /** State token for CSRF protection. Store this and verify on callback. */
79
- state: string;
55
+ interface OAuthAuthorizeRequestRequest$1 {
56
+ /** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
57
+ redirect_uri?: string;
58
+ /** Optional source URL for registration tracking */
59
+ source_url?: string;
80
60
  }
81
61
  /**
82
62
  * Request to complete OAuth flow (callback handler).
@@ -91,6 +71,32 @@ interface OAuthCallbackRequestRequest$1 {
91
71
  /** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
92
72
  redirect_uri?: string;
93
73
  }
74
+ /**
75
+ * Response with JWT tokens after OAuth authentication. When 2FA is required: -
76
+ * requires_2fa: True - session_id: UUID of 2FA verification session -
77
+ * access/refresh/user: null When 2FA is not required: - requires_2fa: False -
78
+ * session_id: null - access/refresh/user: populated
79
+ *
80
+ * Response model (includes read-only fields).
81
+ */
82
+ interface OAuthTokenResponse$1 {
83
+ /** True if 2FA verification is required */
84
+ requires_2fa?: boolean;
85
+ /** 2FA session ID (only when requires_2fa=True) */
86
+ session_id?: string | null;
87
+ /** JWT access token (null when requires_2fa=True) */
88
+ access?: string | null;
89
+ /** JWT refresh token (null when requires_2fa=True) */
90
+ refresh?: string | null;
91
+ /** Authenticated user info (null when requires_2fa=True) */
92
+ user?: Record<string, any> | null;
93
+ /** True if a new user was created during this OAuth flow */
94
+ is_new_user: boolean;
95
+ /** True if a new OAuth connection was created */
96
+ is_new_connection: boolean;
97
+ /** True if user should be prompted to enable 2FA */
98
+ should_prompt_2fa?: boolean;
99
+ }
94
100
  /**
95
101
  * Serializer for OAuth connection info (user-facing).
96
102
  *
@@ -115,41 +121,15 @@ interface OAuthConnection$1 {
115
121
  last_login_at: string;
116
122
  }
117
123
  /**
118
- * Request to start OAuth flow.
119
- *
120
- * Request model (no read-only fields).
121
- */
122
- interface OAuthAuthorizeRequestRequest$1 {
123
- /** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
124
- redirect_uri?: string;
125
- /** Optional source URL for registration tracking */
126
- source_url?: string;
127
- }
128
- /**
129
- * Response with JWT tokens after OAuth authentication. When 2FA is required: -
130
- * requires_2fa: True - session_id: UUID of 2FA verification session -
131
- * access/refresh/user: null When 2FA is not required: - requires_2fa: False -
132
- * session_id: null - access/refresh/user: populated
124
+ * Response with OAuth authorization URL.
133
125
  *
134
126
  * Response model (includes read-only fields).
135
127
  */
136
- interface OAuthTokenResponse$1 {
137
- /** True if 2FA verification is required */
138
- requires_2fa?: boolean;
139
- /** 2FA session ID (only when requires_2fa=True) */
140
- session_id?: string | null;
141
- /** JWT access token (null when requires_2fa=True) */
142
- access?: string | null;
143
- /** JWT refresh token (null when requires_2fa=True) */
144
- refresh?: string | null;
145
- /** Authenticated user info (null when requires_2fa=True) */
146
- user?: Record<string, any> | null;
147
- /** True if a new user was created during this OAuth flow */
148
- is_new_user: boolean;
149
- /** True if a new OAuth connection was created */
150
- is_new_connection: boolean;
151
- /** True if user should be prompted to enable 2FA */
152
- should_prompt_2fa?: boolean;
128
+ interface OAuthAuthorizeResponse$1 {
129
+ /** Full URL to redirect user to OAuth provider */
130
+ authorization_url: string;
131
+ /** State token for CSRF protection. Store this and verify on callback. */
132
+ state: string;
153
133
  }
154
134
  /**
155
135
  * Request to disconnect OAuth provider.
@@ -162,6 +142,26 @@ interface OAuthDisconnectRequestRequest$1 {
162
142
  * `github` - GitHub */
163
143
  provider: OAuthConnectionProvider;
164
144
  }
145
+ /**
146
+ * Response with available OAuth providers.
147
+ *
148
+ * Response model (includes read-only fields).
149
+ */
150
+ interface OAuthProvidersResponse$1 {
151
+ /** List of available OAuth providers */
152
+ providers: Array<Record<string, any>>;
153
+ }
154
+ /**
155
+ * Error response for OAuth endpoints.
156
+ *
157
+ * Response model (includes read-only fields).
158
+ */
159
+ interface OAuthError$1 {
160
+ /** Error code */
161
+ error: string;
162
+ /** Human-readable error description */
163
+ error_description?: string;
164
+ }
165
165
 
166
166
  declare namespace models$2 {
167
167
  export type { OAuthAuthorizeRequestRequest$1 as OAuthAuthorizeRequestRequest, OAuthAuthorizeResponse$1 as OAuthAuthorizeResponse, OAuthCallbackRequestRequest$1 as OAuthCallbackRequestRequest, OAuthConnection$1 as OAuthConnection, OAuthDisconnectRequestRequest$1 as OAuthDisconnectRequestRequest, OAuthError$1 as OAuthError, OAuthProvidersResponse$1 as OAuthProvidersResponse, OAuthTokenResponse$1 as OAuthTokenResponse };
@@ -212,7 +212,7 @@ declare class Oauth {
212
212
  *
213
213
  * Request model (no read-only fields).
214
214
  */
215
- interface UserProfileUpdateRequest$1 {
215
+ interface PatchedUserProfileUpdateRequest$1 {
216
216
  first_name?: string;
217
217
  last_name?: string;
218
218
  company?: string;
@@ -221,17 +221,23 @@ interface UserProfileUpdateRequest$1 {
221
221
  language?: string;
222
222
  }
223
223
  /**
224
- * Serializer for updating user profile.
225
224
  *
226
225
  * Request model (no read-only fields).
227
226
  */
228
- interface PatchedUserProfileUpdateRequest$1 {
229
- first_name?: string;
230
- last_name?: string;
231
- company?: string;
232
- phone?: string;
233
- position?: string;
234
- language?: string;
227
+ interface CfgAccountsProfileAvatarCreateRequest$1 {
228
+ /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
229
+ avatar: File | Blob;
230
+ }
231
+ /**
232
+ * Response serializer for account deletion.
233
+ *
234
+ * Response model (includes read-only fields).
235
+ */
236
+ interface AccountDeleteResponse$1 {
237
+ /** Whether the account was successfully deleted */
238
+ success: boolean;
239
+ /** Human-readable message about the deletion */
240
+ message: string;
235
241
  }
236
242
  /**
237
243
  * Serializer for user details.
@@ -264,23 +270,17 @@ interface User$2 {
264
270
  centrifugo: CentrifugoToken$2 | null;
265
271
  }
266
272
  /**
267
- * Response serializer for account deletion.
268
- *
269
- * Response model (includes read-only fields).
270
- */
271
- interface AccountDeleteResponse$1 {
272
- /** Whether the account was successfully deleted */
273
- success: boolean;
274
- /** Human-readable message about the deletion */
275
- message: string;
276
- }
277
- /**
273
+ * Serializer for updating user profile.
278
274
  *
279
275
  * Request model (no read-only fields).
280
276
  */
281
- interface CfgAccountsProfileAvatarCreateRequest$1 {
282
- /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
283
- avatar: File | Blob;
277
+ interface UserProfileUpdateRequest$1 {
278
+ first_name?: string;
279
+ last_name?: string;
280
+ company?: string;
281
+ phone?: string;
282
+ position?: string;
283
+ language?: string;
284
284
  }
285
285
  /**
286
286
  * Nested serializer for Centrifugo WebSocket connection token.
@@ -359,18 +359,6 @@ declare class UserProfile {
359
359
  accountsProfileUpdatePartialUpdate(data?: PatchedUserProfileUpdateRequest$1): Promise<User$2>;
360
360
  }
361
361
 
362
- /**
363
- * Serializer for OTP verification.
364
- *
365
- * Request model (no read-only fields).
366
- */
367
- interface OTPVerifyRequest$1 {
368
- /** Email address used for OTP request */
369
- identifier: string;
370
- otp: string;
371
- /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
372
- source_url?: string;
373
- }
374
362
  /**
375
363
  * OTP verification response. When 2FA is required: - requires_2fa: True -
376
364
  * session_id: UUID of 2FA verification session - refresh/access/user: null
@@ -392,17 +380,6 @@ interface OTPVerifyResponse$1 {
392
380
  /** Whether user should be prompted to enable 2FA */
393
381
  should_prompt_2fa?: boolean;
394
382
  }
395
- /**
396
- * Serializer for OTP request.
397
- *
398
- * Request model (no read-only fields).
399
- */
400
- interface OTPRequestRequest$1 {
401
- /** Email address for OTP delivery */
402
- identifier: string;
403
- /** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
404
- source_url?: string;
405
- }
406
383
  /**
407
384
  * OTP request response.
408
385
  *
@@ -432,6 +409,29 @@ interface OTPErrorResponse$1 {
432
409
  /** Seconds until the client may retry (present only for rate-limit errors) */
433
410
  retry_after?: number | null;
434
411
  }
412
+ /**
413
+ * Serializer for OTP verification.
414
+ *
415
+ * Request model (no read-only fields).
416
+ */
417
+ interface OTPVerifyRequest$1 {
418
+ /** Email address used for OTP request */
419
+ identifier: string;
420
+ otp: string;
421
+ /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
422
+ source_url?: string;
423
+ }
424
+ /**
425
+ * Serializer for OTP request.
426
+ *
427
+ * Request model (no read-only fields).
428
+ */
429
+ interface OTPRequestRequest$1 {
430
+ /** Email address for OTP delivery */
431
+ identifier: string;
432
+ /** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
433
+ source_url?: string;
434
+ }
435
435
  /**
436
436
  * Serializer for user details.
437
437
  *
@@ -517,6 +517,11 @@ interface HttpRequest {
517
517
  formData?: FormData;
518
518
  /** Binary data for octet-stream uploads */
519
519
  binaryBody?: Blob | ArrayBuffer;
520
+ /**
521
+ * Force a specific response parser. When set, overrides Content-Type sniffing.
522
+ * Generated for endpoints whose primary response is binary (file downloads).
523
+ */
524
+ responseType?: 'json' | 'text' | 'blob';
520
525
  }
521
526
  interface HttpResponse<T = any> {
522
527
  data: T;
@@ -821,6 +826,7 @@ declare class APIClient {
821
826
  formData?: FormData;
822
827
  binaryBody?: Blob | ArrayBuffer;
823
828
  headers?: Record<string, string>;
829
+ responseType?: 'json' | 'text' | 'blob';
824
830
  }): Promise<T>;
825
831
  /**
826
832
  * Internal request method (without retry wrapper).