@djangocfg/api 2.1.223 → 2.1.225
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/clients.d.cts +212 -212
- package/dist/clients.d.ts +212 -212
- package/dist/hooks.d.cts +64 -64
- package/dist/hooks.d.ts +64 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +89 -89
- package/dist/index.d.ts +89 -89
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/cfg_accounts/accounts/models.ts +26 -26
- package/src/_api/generated/cfg_accounts/accounts__auth/models.ts +5 -5
- package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +53 -53
- package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +9 -9
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +65 -65
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +24 -24
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +25 -25
- package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +10 -10
- package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +19 -19
- package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +12 -12
package/dist/hooks.d.cts
CHANGED
|
@@ -4,17 +4,17 @@ import useSWR from 'swr';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* Request model (no read-only fields).
|
|
8
8
|
*/
|
|
9
|
-
interface
|
|
10
|
-
access: string;
|
|
9
|
+
interface TokenRefreshRequest$1 {
|
|
11
10
|
refresh: string;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
13
|
*
|
|
15
|
-
*
|
|
14
|
+
* Response model (includes read-only fields).
|
|
16
15
|
*/
|
|
17
|
-
interface
|
|
16
|
+
interface TokenRefresh$1 {
|
|
17
|
+
access: string;
|
|
18
18
|
refresh: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -47,19 +47,6 @@ declare enum OTPRequestRequestChannel {
|
|
|
47
47
|
PHONE = "phone"
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* Request to complete OAuth flow (callback handler).
|
|
52
|
-
*
|
|
53
|
-
* Request model (no read-only fields).
|
|
54
|
-
*/
|
|
55
|
-
interface OAuthCallbackRequestRequest$1 {
|
|
56
|
-
/** Authorization code from OAuth provider callback */
|
|
57
|
-
code: string;
|
|
58
|
-
/** State token for CSRF verification (from authorize response) */
|
|
59
|
-
state: string;
|
|
60
|
-
/** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
|
|
61
|
-
redirect_uri?: string;
|
|
62
|
-
}
|
|
63
50
|
/**
|
|
64
51
|
* Request to start OAuth flow.
|
|
65
52
|
*
|
|
@@ -72,24 +59,37 @@ interface OAuthAuthorizeRequestRequest$1 {
|
|
|
72
59
|
source_url?: string;
|
|
73
60
|
}
|
|
74
61
|
/**
|
|
75
|
-
* Response with OAuth
|
|
62
|
+
* Response with available OAuth providers.
|
|
76
63
|
*
|
|
77
64
|
* Response model (includes read-only fields).
|
|
78
65
|
*/
|
|
79
|
-
interface
|
|
80
|
-
/**
|
|
81
|
-
|
|
82
|
-
|
|
66
|
+
interface OAuthProvidersResponse {
|
|
67
|
+
/** List of available OAuth providers */
|
|
68
|
+
providers: Array<Record<string, any>>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Request to complete OAuth flow (callback handler).
|
|
72
|
+
*
|
|
73
|
+
* Request model (no read-only fields).
|
|
74
|
+
*/
|
|
75
|
+
interface OAuthCallbackRequestRequest$1 {
|
|
76
|
+
/** Authorization code from OAuth provider callback */
|
|
77
|
+
code: string;
|
|
78
|
+
/** State token for CSRF verification (from authorize response) */
|
|
83
79
|
state: string;
|
|
80
|
+
/** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
|
|
81
|
+
redirect_uri?: string;
|
|
84
82
|
}
|
|
85
83
|
/**
|
|
86
|
-
*
|
|
84
|
+
* Request to disconnect OAuth provider.
|
|
87
85
|
*
|
|
88
|
-
*
|
|
86
|
+
* Request model (no read-only fields).
|
|
89
87
|
*/
|
|
90
|
-
interface
|
|
91
|
-
/**
|
|
92
|
-
|
|
88
|
+
interface OAuthDisconnectRequestRequest$1 {
|
|
89
|
+
/** OAuth provider to disconnect
|
|
90
|
+
|
|
91
|
+
* `github` - GitHub */
|
|
92
|
+
provider: OAuthConnectionProvider;
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* Response with JWT tokens after OAuth authentication. When 2FA is required: -
|
|
@@ -118,15 +118,15 @@ interface OAuthTokenResponse$1 {
|
|
|
118
118
|
should_prompt_2fa?: boolean;
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* Response with OAuth authorization URL.
|
|
122
122
|
*
|
|
123
|
-
*
|
|
123
|
+
* Response model (includes read-only fields).
|
|
124
124
|
*/
|
|
125
|
-
interface
|
|
126
|
-
/** OAuth provider
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
interface OAuthAuthorizeResponse$1 {
|
|
126
|
+
/** Full URL to redirect user to OAuth provider */
|
|
127
|
+
authorization_url: string;
|
|
128
|
+
/** State token for CSRF protection. Store this and verify on callback. */
|
|
129
|
+
state: string;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/**
|
|
@@ -212,6 +212,14 @@ interface UserProfileUpdateRequest$1 {
|
|
|
212
212
|
position?: string;
|
|
213
213
|
language?: string;
|
|
214
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
* Request model (no read-only fields).
|
|
218
|
+
*/
|
|
219
|
+
interface CfgAccountsProfileAvatarCreateRequest$1 {
|
|
220
|
+
/** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
|
|
221
|
+
avatar: File | Blob;
|
|
222
|
+
}
|
|
215
223
|
/**
|
|
216
224
|
* Response serializer for account deletion.
|
|
217
225
|
*
|
|
@@ -236,14 +244,6 @@ interface PatchedUserProfileUpdateRequest$1 {
|
|
|
236
244
|
position?: string;
|
|
237
245
|
language?: string;
|
|
238
246
|
}
|
|
239
|
-
/**
|
|
240
|
-
*
|
|
241
|
-
* Request model (no read-only fields).
|
|
242
|
-
*/
|
|
243
|
-
interface CfgAccountsProfileAvatarCreateRequest$1 {
|
|
244
|
-
/** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
|
|
245
|
-
avatar: File | Blob;
|
|
246
|
-
}
|
|
247
247
|
/**
|
|
248
248
|
* Nested serializer for Centrifugo WebSocket connection token.
|
|
249
249
|
*
|
|
@@ -317,6 +317,27 @@ declare class UserProfile {
|
|
|
317
317
|
accountsProfileUpdatePartialUpdate(data?: PatchedUserProfileUpdateRequest$1): Promise<User$2>;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
/**
|
|
321
|
+
* OTP verification response. When 2FA is required: - requires_2fa: True -
|
|
322
|
+
* session_id: UUID of 2FA verification session - refresh/access/user: null
|
|
323
|
+
* When 2FA is not required: - requires_2fa: False - session_id: null -
|
|
324
|
+
* refresh/access/user: populated
|
|
325
|
+
*
|
|
326
|
+
* Response model (includes read-only fields).
|
|
327
|
+
*/
|
|
328
|
+
interface OTPVerifyResponse$1 {
|
|
329
|
+
/** Whether 2FA verification is required */
|
|
330
|
+
requires_2fa?: boolean;
|
|
331
|
+
/** 2FA session ID (if requires_2fa is True) */
|
|
332
|
+
session_id?: string | null;
|
|
333
|
+
/** JWT refresh token (if requires_2fa is False) */
|
|
334
|
+
refresh?: string | null;
|
|
335
|
+
/** JWT access token (if requires_2fa is False) */
|
|
336
|
+
access?: string | null;
|
|
337
|
+
user?: User$1 | null;
|
|
338
|
+
/** Whether user should be prompted to enable 2FA */
|
|
339
|
+
should_prompt_2fa?: boolean;
|
|
340
|
+
}
|
|
320
341
|
/**
|
|
321
342
|
* Serializer for OTP request.
|
|
322
343
|
*
|
|
@@ -342,27 +363,6 @@ interface OTPRequestResponse$1 {
|
|
|
342
363
|
/** Success message */
|
|
343
364
|
message: string;
|
|
344
365
|
}
|
|
345
|
-
/**
|
|
346
|
-
* OTP verification response. When 2FA is required: - requires_2fa: True -
|
|
347
|
-
* session_id: UUID of 2FA verification session - refresh/access/user: null
|
|
348
|
-
* When 2FA is not required: - requires_2fa: False - session_id: null -
|
|
349
|
-
* refresh/access/user: populated
|
|
350
|
-
*
|
|
351
|
-
* Response model (includes read-only fields).
|
|
352
|
-
*/
|
|
353
|
-
interface OTPVerifyResponse$1 {
|
|
354
|
-
/** Whether 2FA verification is required */
|
|
355
|
-
requires_2fa?: boolean;
|
|
356
|
-
/** 2FA session ID (if requires_2fa is True) */
|
|
357
|
-
session_id?: string | null;
|
|
358
|
-
/** JWT refresh token (if requires_2fa is False) */
|
|
359
|
-
refresh?: string | null;
|
|
360
|
-
/** JWT access token (if requires_2fa is False) */
|
|
361
|
-
access?: string | null;
|
|
362
|
-
user?: User$1 | null;
|
|
363
|
-
/** Whether user should be prompted to enable 2FA */
|
|
364
|
-
should_prompt_2fa?: boolean;
|
|
365
|
-
}
|
|
366
366
|
/**
|
|
367
367
|
* Serializer for OTP verification.
|
|
368
368
|
*
|
package/dist/hooks.d.ts
CHANGED
|
@@ -4,17 +4,17 @@ import useSWR from 'swr';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* Request model (no read-only fields).
|
|
8
8
|
*/
|
|
9
|
-
interface
|
|
10
|
-
access: string;
|
|
9
|
+
interface TokenRefreshRequest$1 {
|
|
11
10
|
refresh: string;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
13
|
*
|
|
15
|
-
*
|
|
14
|
+
* Response model (includes read-only fields).
|
|
16
15
|
*/
|
|
17
|
-
interface
|
|
16
|
+
interface TokenRefresh$1 {
|
|
17
|
+
access: string;
|
|
18
18
|
refresh: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -47,19 +47,6 @@ declare enum OTPRequestRequestChannel {
|
|
|
47
47
|
PHONE = "phone"
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* Request to complete OAuth flow (callback handler).
|
|
52
|
-
*
|
|
53
|
-
* Request model (no read-only fields).
|
|
54
|
-
*/
|
|
55
|
-
interface OAuthCallbackRequestRequest$1 {
|
|
56
|
-
/** Authorization code from OAuth provider callback */
|
|
57
|
-
code: string;
|
|
58
|
-
/** State token for CSRF verification (from authorize response) */
|
|
59
|
-
state: string;
|
|
60
|
-
/** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
|
|
61
|
-
redirect_uri?: string;
|
|
62
|
-
}
|
|
63
50
|
/**
|
|
64
51
|
* Request to start OAuth flow.
|
|
65
52
|
*
|
|
@@ -72,24 +59,37 @@ interface OAuthAuthorizeRequestRequest$1 {
|
|
|
72
59
|
source_url?: string;
|
|
73
60
|
}
|
|
74
61
|
/**
|
|
75
|
-
* Response with OAuth
|
|
62
|
+
* Response with available OAuth providers.
|
|
76
63
|
*
|
|
77
64
|
* Response model (includes read-only fields).
|
|
78
65
|
*/
|
|
79
|
-
interface
|
|
80
|
-
/**
|
|
81
|
-
|
|
82
|
-
|
|
66
|
+
interface OAuthProvidersResponse {
|
|
67
|
+
/** List of available OAuth providers */
|
|
68
|
+
providers: Array<Record<string, any>>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Request to complete OAuth flow (callback handler).
|
|
72
|
+
*
|
|
73
|
+
* Request model (no read-only fields).
|
|
74
|
+
*/
|
|
75
|
+
interface OAuthCallbackRequestRequest$1 {
|
|
76
|
+
/** Authorization code from OAuth provider callback */
|
|
77
|
+
code: string;
|
|
78
|
+
/** State token for CSRF verification (from authorize response) */
|
|
83
79
|
state: string;
|
|
80
|
+
/** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
|
|
81
|
+
redirect_uri?: string;
|
|
84
82
|
}
|
|
85
83
|
/**
|
|
86
|
-
*
|
|
84
|
+
* Request to disconnect OAuth provider.
|
|
87
85
|
*
|
|
88
|
-
*
|
|
86
|
+
* Request model (no read-only fields).
|
|
89
87
|
*/
|
|
90
|
-
interface
|
|
91
|
-
/**
|
|
92
|
-
|
|
88
|
+
interface OAuthDisconnectRequestRequest$1 {
|
|
89
|
+
/** OAuth provider to disconnect
|
|
90
|
+
|
|
91
|
+
* `github` - GitHub */
|
|
92
|
+
provider: OAuthConnectionProvider;
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* Response with JWT tokens after OAuth authentication. When 2FA is required: -
|
|
@@ -118,15 +118,15 @@ interface OAuthTokenResponse$1 {
|
|
|
118
118
|
should_prompt_2fa?: boolean;
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* Response with OAuth authorization URL.
|
|
122
122
|
*
|
|
123
|
-
*
|
|
123
|
+
* Response model (includes read-only fields).
|
|
124
124
|
*/
|
|
125
|
-
interface
|
|
126
|
-
/** OAuth provider
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
interface OAuthAuthorizeResponse$1 {
|
|
126
|
+
/** Full URL to redirect user to OAuth provider */
|
|
127
|
+
authorization_url: string;
|
|
128
|
+
/** State token for CSRF protection. Store this and verify on callback. */
|
|
129
|
+
state: string;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/**
|
|
@@ -212,6 +212,14 @@ interface UserProfileUpdateRequest$1 {
|
|
|
212
212
|
position?: string;
|
|
213
213
|
language?: string;
|
|
214
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
* Request model (no read-only fields).
|
|
218
|
+
*/
|
|
219
|
+
interface CfgAccountsProfileAvatarCreateRequest$1 {
|
|
220
|
+
/** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
|
|
221
|
+
avatar: File | Blob;
|
|
222
|
+
}
|
|
215
223
|
/**
|
|
216
224
|
* Response serializer for account deletion.
|
|
217
225
|
*
|
|
@@ -236,14 +244,6 @@ interface PatchedUserProfileUpdateRequest$1 {
|
|
|
236
244
|
position?: string;
|
|
237
245
|
language?: string;
|
|
238
246
|
}
|
|
239
|
-
/**
|
|
240
|
-
*
|
|
241
|
-
* Request model (no read-only fields).
|
|
242
|
-
*/
|
|
243
|
-
interface CfgAccountsProfileAvatarCreateRequest$1 {
|
|
244
|
-
/** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
|
|
245
|
-
avatar: File | Blob;
|
|
246
|
-
}
|
|
247
247
|
/**
|
|
248
248
|
* Nested serializer for Centrifugo WebSocket connection token.
|
|
249
249
|
*
|
|
@@ -317,6 +317,27 @@ declare class UserProfile {
|
|
|
317
317
|
accountsProfileUpdatePartialUpdate(data?: PatchedUserProfileUpdateRequest$1): Promise<User$2>;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
/**
|
|
321
|
+
* OTP verification response. When 2FA is required: - requires_2fa: True -
|
|
322
|
+
* session_id: UUID of 2FA verification session - refresh/access/user: null
|
|
323
|
+
* When 2FA is not required: - requires_2fa: False - session_id: null -
|
|
324
|
+
* refresh/access/user: populated
|
|
325
|
+
*
|
|
326
|
+
* Response model (includes read-only fields).
|
|
327
|
+
*/
|
|
328
|
+
interface OTPVerifyResponse$1 {
|
|
329
|
+
/** Whether 2FA verification is required */
|
|
330
|
+
requires_2fa?: boolean;
|
|
331
|
+
/** 2FA session ID (if requires_2fa is True) */
|
|
332
|
+
session_id?: string | null;
|
|
333
|
+
/** JWT refresh token (if requires_2fa is False) */
|
|
334
|
+
refresh?: string | null;
|
|
335
|
+
/** JWT access token (if requires_2fa is False) */
|
|
336
|
+
access?: string | null;
|
|
337
|
+
user?: User$1 | null;
|
|
338
|
+
/** Whether user should be prompted to enable 2FA */
|
|
339
|
+
should_prompt_2fa?: boolean;
|
|
340
|
+
}
|
|
320
341
|
/**
|
|
321
342
|
* Serializer for OTP request.
|
|
322
343
|
*
|
|
@@ -342,27 +363,6 @@ interface OTPRequestResponse$1 {
|
|
|
342
363
|
/** Success message */
|
|
343
364
|
message: string;
|
|
344
365
|
}
|
|
345
|
-
/**
|
|
346
|
-
* OTP verification response. When 2FA is required: - requires_2fa: True -
|
|
347
|
-
* session_id: UUID of 2FA verification session - refresh/access/user: null
|
|
348
|
-
* When 2FA is not required: - requires_2fa: False - session_id: null -
|
|
349
|
-
* refresh/access/user: populated
|
|
350
|
-
*
|
|
351
|
-
* Response model (includes read-only fields).
|
|
352
|
-
*/
|
|
353
|
-
interface OTPVerifyResponse$1 {
|
|
354
|
-
/** Whether 2FA verification is required */
|
|
355
|
-
requires_2fa?: boolean;
|
|
356
|
-
/** 2FA session ID (if requires_2fa is True) */
|
|
357
|
-
session_id?: string | null;
|
|
358
|
-
/** JWT refresh token (if requires_2fa is False) */
|
|
359
|
-
refresh?: string | null;
|
|
360
|
-
/** JWT access token (if requires_2fa is False) */
|
|
361
|
-
access?: string | null;
|
|
362
|
-
user?: User$1 | null;
|
|
363
|
-
/** Whether user should be prompted to enable 2FA */
|
|
364
|
-
should_prompt_2fa?: boolean;
|
|
365
|
-
}
|
|
366
366
|
/**
|
|
367
367
|
* Serializer for OTP verification.
|
|
368
368
|
*
|