@djangocfg/api 2.1.309 → 2.1.312
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-server.cjs +18 -7
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +18 -7
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +54 -21
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.mjs +54 -21
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +54 -21
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +144 -144
- package/dist/clients.d.ts +144 -144
- package/dist/clients.mjs +54 -21
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +18 -7
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +92 -92
- package/dist/hooks.d.ts +92 -92
- package/dist/hooks.mjs +18 -7
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +36 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +111 -105
- package/dist/index.d.ts +111 -105
- package/dist/index.mjs +36 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/cfg_accounts/accounts/models.ts +25 -25
- package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +62 -62
- package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +24 -24
- package/src/_api/generated/cfg_accounts/client.ts +3 -0
- package/src/_api/generated/cfg_accounts/http.ts +30 -7
- package/src/_api/generated/cfg_centrifugo/client.ts +3 -0
- package/src/_api/generated/cfg_centrifugo/http.ts +30 -7
- package/src/_api/generated/cfg_totp/client.ts +3 -0
- package/src/_api/generated/cfg_totp/http.ts +30 -7
- package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +10 -10
- package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +10 -10
- package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +18 -18
- package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +18 -18
package/dist/hooks.d.cts
CHANGED
|
@@ -39,24 +39,15 @@ declare enum OAuthConnectionProvider {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* Response model (includes read-only fields).
|
|
45
|
-
*/
|
|
46
|
-
interface OAuthProvidersResponse {
|
|
47
|
-
/** List of available OAuth providers */
|
|
48
|
-
providers: Array<Record<string, any>>;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Response with OAuth authorization URL.
|
|
42
|
+
* Request to start OAuth flow.
|
|
52
43
|
*
|
|
53
|
-
*
|
|
44
|
+
* Request model (no read-only fields).
|
|
54
45
|
*/
|
|
55
|
-
interface
|
|
56
|
-
/**
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
|
|
46
|
+
interface OAuthAuthorizeRequestRequest$1 {
|
|
47
|
+
/** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
|
|
48
|
+
redirect_uri?: string;
|
|
49
|
+
/** Optional source URL for registration tracking */
|
|
50
|
+
source_url?: string;
|
|
60
51
|
}
|
|
61
52
|
/**
|
|
62
53
|
* Request to complete OAuth flow (callback handler).
|
|
@@ -71,6 +62,32 @@ interface OAuthCallbackRequestRequest$1 {
|
|
|
71
62
|
/** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
|
|
72
63
|
redirect_uri?: string;
|
|
73
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Response with JWT tokens after OAuth authentication. When 2FA is required: -
|
|
67
|
+
* requires_2fa: True - session_id: UUID of 2FA verification session -
|
|
68
|
+
* access/refresh/user: null When 2FA is not required: - requires_2fa: False -
|
|
69
|
+
* session_id: null - access/refresh/user: populated
|
|
70
|
+
*
|
|
71
|
+
* Response model (includes read-only fields).
|
|
72
|
+
*/
|
|
73
|
+
interface OAuthTokenResponse$1 {
|
|
74
|
+
/** True if 2FA verification is required */
|
|
75
|
+
requires_2fa?: boolean;
|
|
76
|
+
/** 2FA session ID (only when requires_2fa=True) */
|
|
77
|
+
session_id?: string | null;
|
|
78
|
+
/** JWT access token (null when requires_2fa=True) */
|
|
79
|
+
access?: string | null;
|
|
80
|
+
/** JWT refresh token (null when requires_2fa=True) */
|
|
81
|
+
refresh?: string | null;
|
|
82
|
+
/** Authenticated user info (null when requires_2fa=True) */
|
|
83
|
+
user?: Record<string, any> | null;
|
|
84
|
+
/** True if a new user was created during this OAuth flow */
|
|
85
|
+
is_new_user: boolean;
|
|
86
|
+
/** True if a new OAuth connection was created */
|
|
87
|
+
is_new_connection: boolean;
|
|
88
|
+
/** True if user should be prompted to enable 2FA */
|
|
89
|
+
should_prompt_2fa?: boolean;
|
|
90
|
+
}
|
|
74
91
|
/**
|
|
75
92
|
* Serializer for OAuth connection info (user-facing).
|
|
76
93
|
*
|
|
@@ -95,41 +112,15 @@ interface OAuthConnection {
|
|
|
95
112
|
last_login_at: string;
|
|
96
113
|
}
|
|
97
114
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* Request model (no read-only fields).
|
|
101
|
-
*/
|
|
102
|
-
interface OAuthAuthorizeRequestRequest$1 {
|
|
103
|
-
/** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
|
|
104
|
-
redirect_uri?: string;
|
|
105
|
-
/** Optional source URL for registration tracking */
|
|
106
|
-
source_url?: string;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Response with JWT tokens after OAuth authentication. When 2FA is required: -
|
|
110
|
-
* requires_2fa: True - session_id: UUID of 2FA verification session -
|
|
111
|
-
* access/refresh/user: null When 2FA is not required: - requires_2fa: False -
|
|
112
|
-
* session_id: null - access/refresh/user: populated
|
|
115
|
+
* Response with OAuth authorization URL.
|
|
113
116
|
*
|
|
114
117
|
* Response model (includes read-only fields).
|
|
115
118
|
*/
|
|
116
|
-
interface
|
|
117
|
-
/**
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
/** JWT access token (null when requires_2fa=True) */
|
|
122
|
-
access?: string | null;
|
|
123
|
-
/** JWT refresh token (null when requires_2fa=True) */
|
|
124
|
-
refresh?: string | null;
|
|
125
|
-
/** Authenticated user info (null when requires_2fa=True) */
|
|
126
|
-
user?: Record<string, any> | null;
|
|
127
|
-
/** True if a new user was created during this OAuth flow */
|
|
128
|
-
is_new_user: boolean;
|
|
129
|
-
/** True if a new OAuth connection was created */
|
|
130
|
-
is_new_connection: boolean;
|
|
131
|
-
/** True if user should be prompted to enable 2FA */
|
|
132
|
-
should_prompt_2fa?: boolean;
|
|
119
|
+
interface OAuthAuthorizeResponse$1 {
|
|
120
|
+
/** Full URL to redirect user to OAuth provider */
|
|
121
|
+
authorization_url: string;
|
|
122
|
+
/** State token for CSRF protection. Store this and verify on callback. */
|
|
123
|
+
state: string;
|
|
133
124
|
}
|
|
134
125
|
/**
|
|
135
126
|
* Request to disconnect OAuth provider.
|
|
@@ -142,6 +133,15 @@ interface OAuthDisconnectRequestRequest$1 {
|
|
|
142
133
|
* `github` - GitHub */
|
|
143
134
|
provider: OAuthConnectionProvider;
|
|
144
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Response with available OAuth providers.
|
|
138
|
+
*
|
|
139
|
+
* Response model (includes read-only fields).
|
|
140
|
+
*/
|
|
141
|
+
interface OAuthProvidersResponse {
|
|
142
|
+
/** List of available OAuth providers */
|
|
143
|
+
providers: Array<Record<string, any>>;
|
|
144
|
+
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* API endpoints for Oauth.
|
|
@@ -188,7 +188,7 @@ declare class Oauth {
|
|
|
188
188
|
*
|
|
189
189
|
* Request model (no read-only fields).
|
|
190
190
|
*/
|
|
191
|
-
interface
|
|
191
|
+
interface PatchedUserProfileUpdateRequest$1 {
|
|
192
192
|
first_name?: string;
|
|
193
193
|
last_name?: string;
|
|
194
194
|
company?: string;
|
|
@@ -197,17 +197,23 @@ interface UserProfileUpdateRequest$1 {
|
|
|
197
197
|
language?: string;
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
-
* Serializer for updating user profile.
|
|
201
200
|
*
|
|
202
201
|
* Request model (no read-only fields).
|
|
203
202
|
*/
|
|
204
|
-
interface
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
interface CfgAccountsProfileAvatarCreateRequest$1 {
|
|
204
|
+
/** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
|
|
205
|
+
avatar: File | Blob;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Response serializer for account deletion.
|
|
209
|
+
*
|
|
210
|
+
* Response model (includes read-only fields).
|
|
211
|
+
*/
|
|
212
|
+
interface AccountDeleteResponse$1 {
|
|
213
|
+
/** Whether the account was successfully deleted */
|
|
214
|
+
success: boolean;
|
|
215
|
+
/** Human-readable message about the deletion */
|
|
216
|
+
message: string;
|
|
211
217
|
}
|
|
212
218
|
/**
|
|
213
219
|
* Serializer for user details.
|
|
@@ -240,23 +246,17 @@ interface User$2 {
|
|
|
240
246
|
centrifugo: CentrifugoToken$1 | null;
|
|
241
247
|
}
|
|
242
248
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* Response model (includes read-only fields).
|
|
246
|
-
*/
|
|
247
|
-
interface AccountDeleteResponse$1 {
|
|
248
|
-
/** Whether the account was successfully deleted */
|
|
249
|
-
success: boolean;
|
|
250
|
-
/** Human-readable message about the deletion */
|
|
251
|
-
message: string;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
249
|
+
* Serializer for updating user profile.
|
|
254
250
|
*
|
|
255
251
|
* Request model (no read-only fields).
|
|
256
252
|
*/
|
|
257
|
-
interface
|
|
258
|
-
|
|
259
|
-
|
|
253
|
+
interface UserProfileUpdateRequest$1 {
|
|
254
|
+
first_name?: string;
|
|
255
|
+
last_name?: string;
|
|
256
|
+
company?: string;
|
|
257
|
+
phone?: string;
|
|
258
|
+
position?: string;
|
|
259
|
+
language?: string;
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
262
|
* Nested serializer for Centrifugo WebSocket connection token.
|
|
@@ -331,18 +331,6 @@ declare class UserProfile {
|
|
|
331
331
|
accountsProfileUpdatePartialUpdate(data?: PatchedUserProfileUpdateRequest$1): Promise<User$2>;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
/**
|
|
335
|
-
* Serializer for OTP verification.
|
|
336
|
-
*
|
|
337
|
-
* Request model (no read-only fields).
|
|
338
|
-
*/
|
|
339
|
-
interface OTPVerifyRequest$1 {
|
|
340
|
-
/** Email address used for OTP request */
|
|
341
|
-
identifier: string;
|
|
342
|
-
otp: string;
|
|
343
|
-
/** Source URL for tracking login (e.g., https://my.djangocfg.com) */
|
|
344
|
-
source_url?: string;
|
|
345
|
-
}
|
|
346
334
|
/**
|
|
347
335
|
* OTP verification response. When 2FA is required: - requires_2fa: True -
|
|
348
336
|
* session_id: UUID of 2FA verification session - refresh/access/user: null
|
|
@@ -365,24 +353,36 @@ interface OTPVerifyResponse$1 {
|
|
|
365
353
|
should_prompt_2fa?: boolean;
|
|
366
354
|
}
|
|
367
355
|
/**
|
|
368
|
-
*
|
|
356
|
+
* OTP request response.
|
|
357
|
+
*
|
|
358
|
+
* Response model (includes read-only fields).
|
|
359
|
+
*/
|
|
360
|
+
interface OTPRequestResponse$1 {
|
|
361
|
+
/** Success message */
|
|
362
|
+
message: string;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Serializer for OTP verification.
|
|
369
366
|
*
|
|
370
367
|
* Request model (no read-only fields).
|
|
371
368
|
*/
|
|
372
|
-
interface
|
|
373
|
-
/** Email address for OTP
|
|
369
|
+
interface OTPVerifyRequest$1 {
|
|
370
|
+
/** Email address used for OTP request */
|
|
374
371
|
identifier: string;
|
|
375
|
-
|
|
372
|
+
otp: string;
|
|
373
|
+
/** Source URL for tracking login (e.g., https://my.djangocfg.com) */
|
|
376
374
|
source_url?: string;
|
|
377
375
|
}
|
|
378
376
|
/**
|
|
379
|
-
* OTP request
|
|
377
|
+
* Serializer for OTP request.
|
|
380
378
|
*
|
|
381
|
-
*
|
|
379
|
+
* Request model (no read-only fields).
|
|
382
380
|
*/
|
|
383
|
-
interface
|
|
384
|
-
/**
|
|
385
|
-
|
|
381
|
+
interface OTPRequestRequest$1 {
|
|
382
|
+
/** Email address for OTP delivery */
|
|
383
|
+
identifier: string;
|
|
384
|
+
/** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
|
|
385
|
+
source_url?: string;
|
|
386
386
|
}
|
|
387
387
|
/**
|
|
388
388
|
* Serializer for user details.
|
package/dist/hooks.d.ts
CHANGED
|
@@ -39,24 +39,15 @@ declare enum OAuthConnectionProvider {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* Response model (includes read-only fields).
|
|
45
|
-
*/
|
|
46
|
-
interface OAuthProvidersResponse {
|
|
47
|
-
/** List of available OAuth providers */
|
|
48
|
-
providers: Array<Record<string, any>>;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Response with OAuth authorization URL.
|
|
42
|
+
* Request to start OAuth flow.
|
|
52
43
|
*
|
|
53
|
-
*
|
|
44
|
+
* Request model (no read-only fields).
|
|
54
45
|
*/
|
|
55
|
-
interface
|
|
56
|
-
/**
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
|
|
46
|
+
interface OAuthAuthorizeRequestRequest$1 {
|
|
47
|
+
/** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
|
|
48
|
+
redirect_uri?: string;
|
|
49
|
+
/** Optional source URL for registration tracking */
|
|
50
|
+
source_url?: string;
|
|
60
51
|
}
|
|
61
52
|
/**
|
|
62
53
|
* Request to complete OAuth flow (callback handler).
|
|
@@ -71,6 +62,32 @@ interface OAuthCallbackRequestRequest$1 {
|
|
|
71
62
|
/** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
|
|
72
63
|
redirect_uri?: string;
|
|
73
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Response with JWT tokens after OAuth authentication. When 2FA is required: -
|
|
67
|
+
* requires_2fa: True - session_id: UUID of 2FA verification session -
|
|
68
|
+
* access/refresh/user: null When 2FA is not required: - requires_2fa: False -
|
|
69
|
+
* session_id: null - access/refresh/user: populated
|
|
70
|
+
*
|
|
71
|
+
* Response model (includes read-only fields).
|
|
72
|
+
*/
|
|
73
|
+
interface OAuthTokenResponse$1 {
|
|
74
|
+
/** True if 2FA verification is required */
|
|
75
|
+
requires_2fa?: boolean;
|
|
76
|
+
/** 2FA session ID (only when requires_2fa=True) */
|
|
77
|
+
session_id?: string | null;
|
|
78
|
+
/** JWT access token (null when requires_2fa=True) */
|
|
79
|
+
access?: string | null;
|
|
80
|
+
/** JWT refresh token (null when requires_2fa=True) */
|
|
81
|
+
refresh?: string | null;
|
|
82
|
+
/** Authenticated user info (null when requires_2fa=True) */
|
|
83
|
+
user?: Record<string, any> | null;
|
|
84
|
+
/** True if a new user was created during this OAuth flow */
|
|
85
|
+
is_new_user: boolean;
|
|
86
|
+
/** True if a new OAuth connection was created */
|
|
87
|
+
is_new_connection: boolean;
|
|
88
|
+
/** True if user should be prompted to enable 2FA */
|
|
89
|
+
should_prompt_2fa?: boolean;
|
|
90
|
+
}
|
|
74
91
|
/**
|
|
75
92
|
* Serializer for OAuth connection info (user-facing).
|
|
76
93
|
*
|
|
@@ -95,41 +112,15 @@ interface OAuthConnection {
|
|
|
95
112
|
last_login_at: string;
|
|
96
113
|
}
|
|
97
114
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* Request model (no read-only fields).
|
|
101
|
-
*/
|
|
102
|
-
interface OAuthAuthorizeRequestRequest$1 {
|
|
103
|
-
/** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
|
|
104
|
-
redirect_uri?: string;
|
|
105
|
-
/** Optional source URL for registration tracking */
|
|
106
|
-
source_url?: string;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Response with JWT tokens after OAuth authentication. When 2FA is required: -
|
|
110
|
-
* requires_2fa: True - session_id: UUID of 2FA verification session -
|
|
111
|
-
* access/refresh/user: null When 2FA is not required: - requires_2fa: False -
|
|
112
|
-
* session_id: null - access/refresh/user: populated
|
|
115
|
+
* Response with OAuth authorization URL.
|
|
113
116
|
*
|
|
114
117
|
* Response model (includes read-only fields).
|
|
115
118
|
*/
|
|
116
|
-
interface
|
|
117
|
-
/**
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
/** JWT access token (null when requires_2fa=True) */
|
|
122
|
-
access?: string | null;
|
|
123
|
-
/** JWT refresh token (null when requires_2fa=True) */
|
|
124
|
-
refresh?: string | null;
|
|
125
|
-
/** Authenticated user info (null when requires_2fa=True) */
|
|
126
|
-
user?: Record<string, any> | null;
|
|
127
|
-
/** True if a new user was created during this OAuth flow */
|
|
128
|
-
is_new_user: boolean;
|
|
129
|
-
/** True if a new OAuth connection was created */
|
|
130
|
-
is_new_connection: boolean;
|
|
131
|
-
/** True if user should be prompted to enable 2FA */
|
|
132
|
-
should_prompt_2fa?: boolean;
|
|
119
|
+
interface OAuthAuthorizeResponse$1 {
|
|
120
|
+
/** Full URL to redirect user to OAuth provider */
|
|
121
|
+
authorization_url: string;
|
|
122
|
+
/** State token for CSRF protection. Store this and verify on callback. */
|
|
123
|
+
state: string;
|
|
133
124
|
}
|
|
134
125
|
/**
|
|
135
126
|
* Request to disconnect OAuth provider.
|
|
@@ -142,6 +133,15 @@ interface OAuthDisconnectRequestRequest$1 {
|
|
|
142
133
|
* `github` - GitHub */
|
|
143
134
|
provider: OAuthConnectionProvider;
|
|
144
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Response with available OAuth providers.
|
|
138
|
+
*
|
|
139
|
+
* Response model (includes read-only fields).
|
|
140
|
+
*/
|
|
141
|
+
interface OAuthProvidersResponse {
|
|
142
|
+
/** List of available OAuth providers */
|
|
143
|
+
providers: Array<Record<string, any>>;
|
|
144
|
+
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* API endpoints for Oauth.
|
|
@@ -188,7 +188,7 @@ declare class Oauth {
|
|
|
188
188
|
*
|
|
189
189
|
* Request model (no read-only fields).
|
|
190
190
|
*/
|
|
191
|
-
interface
|
|
191
|
+
interface PatchedUserProfileUpdateRequest$1 {
|
|
192
192
|
first_name?: string;
|
|
193
193
|
last_name?: string;
|
|
194
194
|
company?: string;
|
|
@@ -197,17 +197,23 @@ interface UserProfileUpdateRequest$1 {
|
|
|
197
197
|
language?: string;
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
-
* Serializer for updating user profile.
|
|
201
200
|
*
|
|
202
201
|
* Request model (no read-only fields).
|
|
203
202
|
*/
|
|
204
|
-
interface
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
interface CfgAccountsProfileAvatarCreateRequest$1 {
|
|
204
|
+
/** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
|
|
205
|
+
avatar: File | Blob;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Response serializer for account deletion.
|
|
209
|
+
*
|
|
210
|
+
* Response model (includes read-only fields).
|
|
211
|
+
*/
|
|
212
|
+
interface AccountDeleteResponse$1 {
|
|
213
|
+
/** Whether the account was successfully deleted */
|
|
214
|
+
success: boolean;
|
|
215
|
+
/** Human-readable message about the deletion */
|
|
216
|
+
message: string;
|
|
211
217
|
}
|
|
212
218
|
/**
|
|
213
219
|
* Serializer for user details.
|
|
@@ -240,23 +246,17 @@ interface User$2 {
|
|
|
240
246
|
centrifugo: CentrifugoToken$1 | null;
|
|
241
247
|
}
|
|
242
248
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* Response model (includes read-only fields).
|
|
246
|
-
*/
|
|
247
|
-
interface AccountDeleteResponse$1 {
|
|
248
|
-
/** Whether the account was successfully deleted */
|
|
249
|
-
success: boolean;
|
|
250
|
-
/** Human-readable message about the deletion */
|
|
251
|
-
message: string;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
249
|
+
* Serializer for updating user profile.
|
|
254
250
|
*
|
|
255
251
|
* Request model (no read-only fields).
|
|
256
252
|
*/
|
|
257
|
-
interface
|
|
258
|
-
|
|
259
|
-
|
|
253
|
+
interface UserProfileUpdateRequest$1 {
|
|
254
|
+
first_name?: string;
|
|
255
|
+
last_name?: string;
|
|
256
|
+
company?: string;
|
|
257
|
+
phone?: string;
|
|
258
|
+
position?: string;
|
|
259
|
+
language?: string;
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
262
|
* Nested serializer for Centrifugo WebSocket connection token.
|
|
@@ -331,18 +331,6 @@ declare class UserProfile {
|
|
|
331
331
|
accountsProfileUpdatePartialUpdate(data?: PatchedUserProfileUpdateRequest$1): Promise<User$2>;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
/**
|
|
335
|
-
* Serializer for OTP verification.
|
|
336
|
-
*
|
|
337
|
-
* Request model (no read-only fields).
|
|
338
|
-
*/
|
|
339
|
-
interface OTPVerifyRequest$1 {
|
|
340
|
-
/** Email address used for OTP request */
|
|
341
|
-
identifier: string;
|
|
342
|
-
otp: string;
|
|
343
|
-
/** Source URL for tracking login (e.g., https://my.djangocfg.com) */
|
|
344
|
-
source_url?: string;
|
|
345
|
-
}
|
|
346
334
|
/**
|
|
347
335
|
* OTP verification response. When 2FA is required: - requires_2fa: True -
|
|
348
336
|
* session_id: UUID of 2FA verification session - refresh/access/user: null
|
|
@@ -365,24 +353,36 @@ interface OTPVerifyResponse$1 {
|
|
|
365
353
|
should_prompt_2fa?: boolean;
|
|
366
354
|
}
|
|
367
355
|
/**
|
|
368
|
-
*
|
|
356
|
+
* OTP request response.
|
|
357
|
+
*
|
|
358
|
+
* Response model (includes read-only fields).
|
|
359
|
+
*/
|
|
360
|
+
interface OTPRequestResponse$1 {
|
|
361
|
+
/** Success message */
|
|
362
|
+
message: string;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Serializer for OTP verification.
|
|
369
366
|
*
|
|
370
367
|
* Request model (no read-only fields).
|
|
371
368
|
*/
|
|
372
|
-
interface
|
|
373
|
-
/** Email address for OTP
|
|
369
|
+
interface OTPVerifyRequest$1 {
|
|
370
|
+
/** Email address used for OTP request */
|
|
374
371
|
identifier: string;
|
|
375
|
-
|
|
372
|
+
otp: string;
|
|
373
|
+
/** Source URL for tracking login (e.g., https://my.djangocfg.com) */
|
|
376
374
|
source_url?: string;
|
|
377
375
|
}
|
|
378
376
|
/**
|
|
379
|
-
* OTP request
|
|
377
|
+
* Serializer for OTP request.
|
|
380
378
|
*
|
|
381
|
-
*
|
|
379
|
+
* Request model (no read-only fields).
|
|
382
380
|
*/
|
|
383
|
-
interface
|
|
384
|
-
/**
|
|
385
|
-
|
|
381
|
+
interface OTPRequestRequest$1 {
|
|
382
|
+
/** Email address for OTP delivery */
|
|
383
|
+
identifier: string;
|
|
384
|
+
/** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
|
|
385
|
+
source_url?: string;
|
|
386
386
|
}
|
|
387
387
|
/**
|
|
388
388
|
* Serializer for user details.
|
package/dist/hooks.mjs
CHANGED
|
@@ -209,7 +209,7 @@ var FetchAdapter = class {
|
|
|
209
209
|
__name(this, "FetchAdapter");
|
|
210
210
|
}
|
|
211
211
|
async request(request) {
|
|
212
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
212
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
213
213
|
let finalUrl = url;
|
|
214
214
|
if (params) {
|
|
215
215
|
const searchParams = new URLSearchParams();
|
|
@@ -242,11 +242,21 @@ var FetchAdapter = class {
|
|
|
242
242
|
// Include Django session cookies
|
|
243
243
|
});
|
|
244
244
|
let data = null;
|
|
245
|
-
const contentType = response.headers.get("content-type");
|
|
246
|
-
if (response.status !== 204
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
246
|
+
if (response.status !== 204) {
|
|
247
|
+
if (responseType === "blob") {
|
|
248
|
+
data = await response.blob();
|
|
249
|
+
} else if (responseType === "text") {
|
|
250
|
+
data = await response.text();
|
|
251
|
+
} else if (responseType === "json") {
|
|
252
|
+
data = await response.json();
|
|
253
|
+
} else if (contentType.includes("application/json")) {
|
|
254
|
+
data = await response.json();
|
|
255
|
+
} else if (contentType.startsWith("text/")) {
|
|
256
|
+
data = await response.text();
|
|
257
|
+
} else {
|
|
258
|
+
data = await response.blob();
|
|
259
|
+
}
|
|
250
260
|
}
|
|
251
261
|
const responseHeaders = {};
|
|
252
262
|
response.headers.forEach((value, key) => {
|
|
@@ -682,7 +692,8 @@ var APIClient = class {
|
|
|
682
692
|
params: options?.params,
|
|
683
693
|
body: options?.body,
|
|
684
694
|
formData: options?.formData,
|
|
685
|
-
binaryBody: options?.binaryBody
|
|
695
|
+
binaryBody: options?.binaryBody,
|
|
696
|
+
responseType: options?.responseType
|
|
686
697
|
});
|
|
687
698
|
const duration = Date.now() - startTime;
|
|
688
699
|
if (response.status >= 400) {
|