@djangocfg/api 2.1.327 → 2.1.331
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 +185 -3471
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +185 -3471
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +952 -3305
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +35 -35
- package/dist/auth.d.ts +35 -35
- package/dist/auth.mjs +952 -3305
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +90 -3396
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +4 -2508
- package/dist/clients.d.ts +4 -2508
- package/dist/clients.mjs +90 -3396
- package/dist/clients.mjs.map +1 -1
- package/dist/index.cjs +985 -3052
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1544 -1938
- package/dist/index.d.ts +1544 -1938
- package/dist/index.mjs +985 -3052
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/{cfg_centrifugo → _cfg_accounts}/api.ts +11 -55
- package/src/_api/generated/{cfg_totp → _cfg_accounts}/events.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/index.ts +1 -1
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthConnectionsList.ts +5 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthDisconnectCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthGithubAuthorizeCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthGithubCallbackCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthProvidersRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOtpRequestCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOtpVerifyCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileAvatarCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileDeleteCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfilePartialPartialUpdate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfilePartialUpdate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileUpdatePartialUpdate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileUpdateUpdate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsTokenRefreshCreate.ts +3 -3
- package/src/_api/generated/{cfg_centrifugo → _cfg_accounts}/index.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/AccountDeleteResponse.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/CentrifugoToken.ts +4 -4
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/CfgUserUpdateRequest.ts +4 -4
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthAuthorizeRequestRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthAuthorizeResponse.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthCallbackRequestRequest.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthConnection.ts +6 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthDisconnectRequestRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthError.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthProvidersResponse.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthTokenResponse.ts +7 -7
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPErrorResponse.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPRequestRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPRequestResponse.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPVerifyRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPVerifyResponse.ts +6 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/PatchedCfgUserUpdateRequest.ts +4 -4
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/ProviderEnum.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/TokenRefresh.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/TokenRefreshRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/User.ts +13 -13
- package/src/_api/generated/_cfg_accounts/sdk.gen.ts +5 -0
- package/src/_api/generated/_cfg_accounts/types.gen.ts +5 -0
- package/src/_api/generated/{cfg_totp → _cfg_centrifugo}/api.ts +11 -72
- package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/events.ts +3 -3
- package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/hooks/index.ts +1 -1
- package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_accounts → _cfg_centrifugo}/index.ts +3 -3
- package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/schemas/ConnectionTokenResponse.ts +4 -4
- package/src/_api/generated/_cfg_centrifugo/sdk.gen.ts +5 -0
- package/src/_api/generated/_cfg_centrifugo/types.gen.ts +5 -0
- package/src/_api/generated/{cfg_accounts → _cfg_totp}/api.ts +11 -78
- package/src/_api/generated/{cfg_accounts → _cfg_totp}/events.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/index.ts +1 -1
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpBackupCodesRegenerateCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpBackupCodesRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpDevicesDestroy.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpDevicesRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpDisableCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpSetupConfirmCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpSetupCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpVerifyBackupCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpVerifyCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/index.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/BackupCodesRegenerateRequest.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/BackupCodesRegenerateResponse.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/BackupCodesStatus.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/ConfirmSetupRequest.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/ConfirmSetupResponse.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/DeviceList.ts +6 -6
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/DeviceListResponse.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/DeviceListStatusEnum.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/DisableRequest.ts +2 -2
- package/src/_api/generated/_cfg_totp/schemas/SetupRequest.ts +11 -0
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/SetupResponse.ts +4 -4
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/TotpVerifyUser.ts +12 -12
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/VerifyBackupRequest.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/VerifyRequest.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/VerifyResponse.ts +4 -4
- package/src/_api/generated/_cfg_totp/sdk.gen.ts +5 -0
- package/src/_api/generated/_cfg_totp/types.gen.ts +5 -0
- package/src/_api/generated/index.ts +11 -13
- package/src/_api/generated/{cfg_accounts/sdk.gen.ts → sdk.gen.ts} +455 -1
- package/src/_api/generated/{cfg_accounts/types.gen.ts → types.gen.ts} +607 -77
- package/src/auth/context/AccountsContext.tsx +10 -10
- package/src/auth/context/AuthContext.tsx +1 -1
- package/src/auth/hooks/useDeleteAccount.ts +2 -1
- package/src/auth/hooks/useGithubAuth.ts +3 -2
- package/src/auth/hooks/useTokenRefresh.ts +2 -1
- package/src/auth/hooks/useTwoFactor.ts +4 -3
- package/src/auth/hooks/useTwoFactorSetup.ts +3 -2
- package/src/auth/hooks/useTwoFactorStatus.ts +4 -3
- package/src/auth/middlewares/tokenRefresh.ts +2 -1
- package/src/clients.ts +3 -3
- package/src/index.ts +22 -5
- package/src/server.ts +9 -9
- package/src/_api/generated/cfg_centrifugo/client/client.gen.ts +0 -280
- package/src/_api/generated/cfg_centrifugo/client/index.ts +0 -25
- package/src/_api/generated/cfg_centrifugo/client/types.gen.ts +0 -217
- package/src/_api/generated/cfg_centrifugo/client/utils.gen.ts +0 -318
- package/src/_api/generated/cfg_centrifugo/client.gen.ts +0 -16
- package/src/_api/generated/cfg_centrifugo/core/auth.gen.ts +0 -41
- package/src/_api/generated/cfg_centrifugo/core/bodySerializer.gen.ts +0 -82
- package/src/_api/generated/cfg_centrifugo/core/params.gen.ts +0 -169
- package/src/_api/generated/cfg_centrifugo/core/pathSerializer.gen.ts +0 -171
- package/src/_api/generated/cfg_centrifugo/core/queryKeySerializer.gen.ts +0 -117
- package/src/_api/generated/cfg_centrifugo/core/serverSentEvents.gen.ts +0 -242
- package/src/_api/generated/cfg_centrifugo/core/types.gen.ts +0 -104
- package/src/_api/generated/cfg_centrifugo/core/utils.gen.ts +0 -140
- package/src/_api/generated/cfg_centrifugo/sdk.gen.ts +0 -64
- package/src/_api/generated/cfg_centrifugo/types.gen.ts +0 -61
- package/src/_api/generated/cfg_totp/client/client.gen.ts +0 -280
- package/src/_api/generated/cfg_totp/client/index.ts +0 -25
- package/src/_api/generated/cfg_totp/client/types.gen.ts +0 -217
- package/src/_api/generated/cfg_totp/client/utils.gen.ts +0 -318
- package/src/_api/generated/cfg_totp/client.gen.ts +0 -16
- package/src/_api/generated/cfg_totp/core/auth.gen.ts +0 -41
- package/src/_api/generated/cfg_totp/core/bodySerializer.gen.ts +0 -82
- package/src/_api/generated/cfg_totp/core/params.gen.ts +0 -169
- package/src/_api/generated/cfg_totp/core/pathSerializer.gen.ts +0 -171
- package/src/_api/generated/cfg_totp/core/queryKeySerializer.gen.ts +0 -117
- package/src/_api/generated/cfg_totp/core/serverSentEvents.gen.ts +0 -242
- package/src/_api/generated/cfg_totp/core/types.gen.ts +0 -104
- package/src/_api/generated/cfg_totp/core/utils.gen.ts +0 -140
- package/src/_api/generated/cfg_totp/schemas/SetupRequest.ts +0 -11
- package/src/_api/generated/cfg_totp/sdk.gen.ts +0 -432
- package/src/_api/generated/cfg_totp/types.gen.ts +0 -479
- /package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/index.ts +0 -0
- /package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/schemas/index.ts +0 -0
- /package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/index.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client → client}/client.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client → client}/index.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client → client}/types.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client → client}/utils.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client.gen.ts → client.gen.ts} +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/auth.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/bodySerializer.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/params.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/pathSerializer.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/queryKeySerializer.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/serverSentEvents.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/types.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/utils.gen.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/errors.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/index.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/logger.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/storage.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/validation-events.ts +0 -0
package/dist/auth.d.cts
CHANGED
|
@@ -7,33 +7,33 @@ import { z } from 'zod';
|
|
|
7
7
|
* Nested serializer for Centrifugo WebSocket connection token.
|
|
8
8
|
*/
|
|
9
9
|
type CentrifugoToken = {
|
|
10
|
-
/**
|
|
11
|
-
* JWT token for Centrifugo WebSocket connection
|
|
12
|
-
*/
|
|
13
|
-
token: string;
|
|
14
10
|
/**
|
|
15
11
|
* Centrifugo WebSocket URL
|
|
16
12
|
*/
|
|
17
13
|
centrifugo_url: string;
|
|
14
|
+
/**
|
|
15
|
+
* List of allowed channels for this user
|
|
16
|
+
*/
|
|
17
|
+
channels: Array<string>;
|
|
18
18
|
/**
|
|
19
19
|
* Token expiration time (ISO 8601)
|
|
20
20
|
*/
|
|
21
21
|
expires_at: string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* JWT token for Centrifugo WebSocket connection
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
token: string;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* Serializer for updating user profile.
|
|
29
29
|
*/
|
|
30
30
|
type CfgUserUpdateRequest = {
|
|
31
|
+
company?: string;
|
|
31
32
|
first_name?: string;
|
|
33
|
+
language?: string;
|
|
32
34
|
last_name?: string;
|
|
33
|
-
company?: string;
|
|
34
35
|
phone?: string;
|
|
35
36
|
position?: string;
|
|
36
|
-
language?: string;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
39
|
* Serializer for OTP request.
|
|
@@ -86,40 +86,40 @@ type OtpVerifyRequest = {
|
|
|
86
86
|
*/
|
|
87
87
|
type OtpVerifyResponse = {
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
|
-
requires_2fa?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* 2FA session ID (if requires_2fa is True)
|
|
89
|
+
* JWT access token (if requires_2fa is False)
|
|
94
90
|
*/
|
|
95
|
-
|
|
91
|
+
access?: string | null;
|
|
96
92
|
/**
|
|
97
93
|
* JWT refresh token (if requires_2fa is False)
|
|
98
94
|
*/
|
|
99
95
|
refresh?: string | null;
|
|
100
96
|
/**
|
|
101
|
-
*
|
|
97
|
+
* Whether 2FA verification is required
|
|
102
98
|
*/
|
|
103
|
-
|
|
99
|
+
requires_2fa?: boolean;
|
|
104
100
|
/**
|
|
105
|
-
*
|
|
101
|
+
* 2FA session ID (if requires_2fa is True)
|
|
106
102
|
*/
|
|
107
|
-
|
|
103
|
+
session_id?: string | null;
|
|
108
104
|
/**
|
|
109
105
|
* Whether user should be prompted to enable 2FA
|
|
110
106
|
*/
|
|
111
107
|
should_prompt_2fa?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* User information (if requires_2fa is False)
|
|
110
|
+
*/
|
|
111
|
+
user?: User | null;
|
|
112
112
|
};
|
|
113
113
|
/**
|
|
114
114
|
* Serializer for updating user profile.
|
|
115
115
|
*/
|
|
116
116
|
type PatchedCfgUserUpdateRequest = {
|
|
117
|
+
company?: string;
|
|
117
118
|
first_name?: string;
|
|
119
|
+
language?: string;
|
|
118
120
|
last_name?: string;
|
|
119
|
-
company?: string;
|
|
120
121
|
phone?: string;
|
|
121
122
|
position?: string;
|
|
122
|
-
language?: string;
|
|
123
123
|
};
|
|
124
124
|
type TokenRefresh = {
|
|
125
125
|
readonly access: string;
|
|
@@ -129,27 +129,25 @@ type TokenRefresh = {
|
|
|
129
129
|
* Serializer for user details.
|
|
130
130
|
*/
|
|
131
131
|
type User = {
|
|
132
|
-
readonly
|
|
132
|
+
readonly avatar: string | null;
|
|
133
|
+
readonly centrifugo: CentrifugoToken | null;
|
|
134
|
+
company?: string;
|
|
135
|
+
readonly date_joined: string;
|
|
136
|
+
/**
|
|
137
|
+
* Get formatted username for display.
|
|
138
|
+
*/
|
|
139
|
+
readonly display_username: string;
|
|
133
140
|
readonly email: string;
|
|
134
141
|
first_name?: string;
|
|
135
|
-
last_name?: string;
|
|
136
142
|
/**
|
|
137
143
|
* Get user's full name.
|
|
138
144
|
*/
|
|
139
145
|
readonly full_name: string;
|
|
146
|
+
readonly id: number;
|
|
140
147
|
/**
|
|
141
148
|
* Get user's initials for avatar fallback.
|
|
142
149
|
*/
|
|
143
150
|
readonly initials: string;
|
|
144
|
-
/**
|
|
145
|
-
* Get formatted username for display.
|
|
146
|
-
*/
|
|
147
|
-
readonly display_username: string;
|
|
148
|
-
company?: string;
|
|
149
|
-
phone?: string;
|
|
150
|
-
position?: string;
|
|
151
|
-
language?: string;
|
|
152
|
-
readonly avatar: string | null;
|
|
153
151
|
/**
|
|
154
152
|
* Staff status
|
|
155
153
|
*
|
|
@@ -162,10 +160,12 @@ type User = {
|
|
|
162
160
|
* Designates that this user has all permissions without explicitly assigning them.
|
|
163
161
|
*/
|
|
164
162
|
readonly is_superuser: boolean;
|
|
165
|
-
|
|
163
|
+
language?: string;
|
|
166
164
|
readonly last_login: string | null;
|
|
165
|
+
last_name?: string;
|
|
166
|
+
phone?: string;
|
|
167
|
+
position?: string;
|
|
167
168
|
readonly unanswered_messages_count: number;
|
|
168
|
-
readonly centrifugo: CentrifugoToken | null;
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
/**
|
|
@@ -342,12 +342,12 @@ declare const AuthProvider: React$1.FC<AuthProviderProps>;
|
|
|
342
342
|
declare const useAuth: () => AuthContextType;
|
|
343
343
|
|
|
344
344
|
declare const PatchedCfgUserUpdateRequestSchema: z.ZodObject<{
|
|
345
|
+
company: z.ZodOptional<z.ZodString>;
|
|
345
346
|
first_name: z.ZodOptional<z.ZodString>;
|
|
347
|
+
language: z.ZodOptional<z.ZodString>;
|
|
346
348
|
last_name: z.ZodOptional<z.ZodString>;
|
|
347
|
-
company: z.ZodOptional<z.ZodString>;
|
|
348
349
|
phone: z.ZodOptional<z.ZodString>;
|
|
349
350
|
position: z.ZodOptional<z.ZodString>;
|
|
350
|
-
language: z.ZodOptional<z.ZodString>;
|
|
351
351
|
}, z.core.$strip>;
|
|
352
352
|
|
|
353
353
|
interface AccountsContextValue {
|
package/dist/auth.d.ts
CHANGED
|
@@ -7,33 +7,33 @@ import { z } from 'zod';
|
|
|
7
7
|
* Nested serializer for Centrifugo WebSocket connection token.
|
|
8
8
|
*/
|
|
9
9
|
type CentrifugoToken = {
|
|
10
|
-
/**
|
|
11
|
-
* JWT token for Centrifugo WebSocket connection
|
|
12
|
-
*/
|
|
13
|
-
token: string;
|
|
14
10
|
/**
|
|
15
11
|
* Centrifugo WebSocket URL
|
|
16
12
|
*/
|
|
17
13
|
centrifugo_url: string;
|
|
14
|
+
/**
|
|
15
|
+
* List of allowed channels for this user
|
|
16
|
+
*/
|
|
17
|
+
channels: Array<string>;
|
|
18
18
|
/**
|
|
19
19
|
* Token expiration time (ISO 8601)
|
|
20
20
|
*/
|
|
21
21
|
expires_at: string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* JWT token for Centrifugo WebSocket connection
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
token: string;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* Serializer for updating user profile.
|
|
29
29
|
*/
|
|
30
30
|
type CfgUserUpdateRequest = {
|
|
31
|
+
company?: string;
|
|
31
32
|
first_name?: string;
|
|
33
|
+
language?: string;
|
|
32
34
|
last_name?: string;
|
|
33
|
-
company?: string;
|
|
34
35
|
phone?: string;
|
|
35
36
|
position?: string;
|
|
36
|
-
language?: string;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
39
|
* Serializer for OTP request.
|
|
@@ -86,40 +86,40 @@ type OtpVerifyRequest = {
|
|
|
86
86
|
*/
|
|
87
87
|
type OtpVerifyResponse = {
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
|
-
requires_2fa?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* 2FA session ID (if requires_2fa is True)
|
|
89
|
+
* JWT access token (if requires_2fa is False)
|
|
94
90
|
*/
|
|
95
|
-
|
|
91
|
+
access?: string | null;
|
|
96
92
|
/**
|
|
97
93
|
* JWT refresh token (if requires_2fa is False)
|
|
98
94
|
*/
|
|
99
95
|
refresh?: string | null;
|
|
100
96
|
/**
|
|
101
|
-
*
|
|
97
|
+
* Whether 2FA verification is required
|
|
102
98
|
*/
|
|
103
|
-
|
|
99
|
+
requires_2fa?: boolean;
|
|
104
100
|
/**
|
|
105
|
-
*
|
|
101
|
+
* 2FA session ID (if requires_2fa is True)
|
|
106
102
|
*/
|
|
107
|
-
|
|
103
|
+
session_id?: string | null;
|
|
108
104
|
/**
|
|
109
105
|
* Whether user should be prompted to enable 2FA
|
|
110
106
|
*/
|
|
111
107
|
should_prompt_2fa?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* User information (if requires_2fa is False)
|
|
110
|
+
*/
|
|
111
|
+
user?: User | null;
|
|
112
112
|
};
|
|
113
113
|
/**
|
|
114
114
|
* Serializer for updating user profile.
|
|
115
115
|
*/
|
|
116
116
|
type PatchedCfgUserUpdateRequest = {
|
|
117
|
+
company?: string;
|
|
117
118
|
first_name?: string;
|
|
119
|
+
language?: string;
|
|
118
120
|
last_name?: string;
|
|
119
|
-
company?: string;
|
|
120
121
|
phone?: string;
|
|
121
122
|
position?: string;
|
|
122
|
-
language?: string;
|
|
123
123
|
};
|
|
124
124
|
type TokenRefresh = {
|
|
125
125
|
readonly access: string;
|
|
@@ -129,27 +129,25 @@ type TokenRefresh = {
|
|
|
129
129
|
* Serializer for user details.
|
|
130
130
|
*/
|
|
131
131
|
type User = {
|
|
132
|
-
readonly
|
|
132
|
+
readonly avatar: string | null;
|
|
133
|
+
readonly centrifugo: CentrifugoToken | null;
|
|
134
|
+
company?: string;
|
|
135
|
+
readonly date_joined: string;
|
|
136
|
+
/**
|
|
137
|
+
* Get formatted username for display.
|
|
138
|
+
*/
|
|
139
|
+
readonly display_username: string;
|
|
133
140
|
readonly email: string;
|
|
134
141
|
first_name?: string;
|
|
135
|
-
last_name?: string;
|
|
136
142
|
/**
|
|
137
143
|
* Get user's full name.
|
|
138
144
|
*/
|
|
139
145
|
readonly full_name: string;
|
|
146
|
+
readonly id: number;
|
|
140
147
|
/**
|
|
141
148
|
* Get user's initials for avatar fallback.
|
|
142
149
|
*/
|
|
143
150
|
readonly initials: string;
|
|
144
|
-
/**
|
|
145
|
-
* Get formatted username for display.
|
|
146
|
-
*/
|
|
147
|
-
readonly display_username: string;
|
|
148
|
-
company?: string;
|
|
149
|
-
phone?: string;
|
|
150
|
-
position?: string;
|
|
151
|
-
language?: string;
|
|
152
|
-
readonly avatar: string | null;
|
|
153
151
|
/**
|
|
154
152
|
* Staff status
|
|
155
153
|
*
|
|
@@ -162,10 +160,12 @@ type User = {
|
|
|
162
160
|
* Designates that this user has all permissions without explicitly assigning them.
|
|
163
161
|
*/
|
|
164
162
|
readonly is_superuser: boolean;
|
|
165
|
-
|
|
163
|
+
language?: string;
|
|
166
164
|
readonly last_login: string | null;
|
|
165
|
+
last_name?: string;
|
|
166
|
+
phone?: string;
|
|
167
|
+
position?: string;
|
|
167
168
|
readonly unanswered_messages_count: number;
|
|
168
|
-
readonly centrifugo: CentrifugoToken | null;
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
/**
|
|
@@ -342,12 +342,12 @@ declare const AuthProvider: React$1.FC<AuthProviderProps>;
|
|
|
342
342
|
declare const useAuth: () => AuthContextType;
|
|
343
343
|
|
|
344
344
|
declare const PatchedCfgUserUpdateRequestSchema: z.ZodObject<{
|
|
345
|
+
company: z.ZodOptional<z.ZodString>;
|
|
345
346
|
first_name: z.ZodOptional<z.ZodString>;
|
|
347
|
+
language: z.ZodOptional<z.ZodString>;
|
|
346
348
|
last_name: z.ZodOptional<z.ZodString>;
|
|
347
|
-
company: z.ZodOptional<z.ZodString>;
|
|
348
349
|
phone: z.ZodOptional<z.ZodString>;
|
|
349
350
|
position: z.ZodOptional<z.ZodString>;
|
|
350
|
-
language: z.ZodOptional<z.ZodString>;
|
|
351
351
|
}, z.core.$strip>;
|
|
352
352
|
|
|
353
353
|
interface AccountsContextValue {
|