@djangocfg/api 2.1.327 → 2.1.332
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 +328 -3553
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +328 -3553
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +744 -3036
- 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 +744 -3036
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +303 -3548
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +28 -2557
- package/dist/clients.d.ts +28 -2557
- package/dist/clients.mjs +303 -3548
- package/dist/clients.mjs.map +1 -1
- package/dist/index.cjs +1130 -3099
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1807 -2165
- package/dist/index.d.ts +1807 -2165
- package/dist/index.mjs +1130 -3099
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/_cfg_accounts/api.ts +67 -0
- 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 +6 -6
- 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_centrifugo/api.ts +67 -0
- 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 +6 -6
- 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_totp/api.ts +67 -0
- 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 +6 -6
- 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/{cfg_centrifugo/client.gen.ts → client.gen.ts} +3 -0
- package/src/_api/generated/helpers/auth.ts +223 -0
- package/src/_api/generated/{_shared → helpers}/index.ts +1 -0
- package/src/_api/generated/index.ts +22 -20
- 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_accounts/api.ts +0 -187
- package/src/_api/generated/cfg_accounts/client.gen.ts +0 -16
- package/src/_api/generated/cfg_centrifugo/api.ts +0 -164
- 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/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/api.ts +0 -181
- 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/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}/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
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
|
|
3
|
-
export type ClientOptions = {
|
|
4
|
-
baseUrl: 'http://localhost:8000' | (string & {});
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Serializer for regenerating backup codes.
|
|
9
|
-
*/
|
|
10
|
-
export type BackupCodesRegenerateRequest = {
|
|
11
|
-
/**
|
|
12
|
-
* TOTP code for verification
|
|
13
|
-
*/
|
|
14
|
-
code: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Response serializer for backup codes regeneration.
|
|
19
|
-
*/
|
|
20
|
-
export type BackupCodesRegenerateResponse = {
|
|
21
|
-
/**
|
|
22
|
-
* List of new backup codes (save these!)
|
|
23
|
-
*/
|
|
24
|
-
backup_codes: Array<string>;
|
|
25
|
-
/**
|
|
26
|
-
* Warning about previous codes being invalidated
|
|
27
|
-
*/
|
|
28
|
-
warning: string;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Serializer for backup codes status.
|
|
33
|
-
*/
|
|
34
|
-
export type BackupCodesStatus = {
|
|
35
|
-
/**
|
|
36
|
-
* Number of unused backup codes
|
|
37
|
-
*/
|
|
38
|
-
remaining_count: number;
|
|
39
|
-
/**
|
|
40
|
-
* Total number of codes generated
|
|
41
|
-
*/
|
|
42
|
-
total_generated: number;
|
|
43
|
-
/**
|
|
44
|
-
* Warning if running low on codes
|
|
45
|
-
*/
|
|
46
|
-
warning?: string | null;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Serializer for confirming 2FA setup with first code.
|
|
51
|
-
*/
|
|
52
|
-
export type ConfirmSetupRequest = {
|
|
53
|
-
/**
|
|
54
|
-
* Device ID from setup response
|
|
55
|
-
*/
|
|
56
|
-
device_id: string;
|
|
57
|
-
/**
|
|
58
|
-
* 6-digit TOTP code from authenticator app
|
|
59
|
-
*/
|
|
60
|
-
code: string;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Response serializer for setup confirmation.
|
|
65
|
-
*/
|
|
66
|
-
export type ConfirmSetupResponse = {
|
|
67
|
-
message: string;
|
|
68
|
-
/**
|
|
69
|
-
* List of backup recovery codes (save these!)
|
|
70
|
-
*/
|
|
71
|
-
backup_codes: Array<string>;
|
|
72
|
-
/**
|
|
73
|
-
* Warning message about backup codes
|
|
74
|
-
*/
|
|
75
|
-
backup_codes_warning: string;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Serializer for listing TOTP devices.
|
|
80
|
-
*/
|
|
81
|
-
export type DeviceList = {
|
|
82
|
-
readonly id: string;
|
|
83
|
-
/**
|
|
84
|
-
* Device name for identification
|
|
85
|
-
*/
|
|
86
|
-
readonly name: string;
|
|
87
|
-
/**
|
|
88
|
-
* Primary device used for verification
|
|
89
|
-
*/
|
|
90
|
-
readonly is_primary: boolean;
|
|
91
|
-
readonly status: DeviceListStatusEnum;
|
|
92
|
-
readonly created_at: string;
|
|
93
|
-
/**
|
|
94
|
-
* When device setup was confirmed
|
|
95
|
-
*/
|
|
96
|
-
readonly confirmed_at: string | null;
|
|
97
|
-
/**
|
|
98
|
-
* Last successful verification
|
|
99
|
-
*/
|
|
100
|
-
readonly last_used_at: string | null;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Response serializer for device list endpoint.
|
|
105
|
-
*/
|
|
106
|
-
export type DeviceListResponse = {
|
|
107
|
-
devices: Array<DeviceList>;
|
|
108
|
-
has_2fa_enabled: boolean;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* * `pending` - Pending Confirmation
|
|
113
|
-
* * `active` - Active
|
|
114
|
-
* * `disabled` - Disabled
|
|
115
|
-
*/
|
|
116
|
-
export enum DeviceListStatusEnum {
|
|
117
|
-
PENDING = 'pending',
|
|
118
|
-
ACTIVE = 'active',
|
|
119
|
-
DISABLED = 'disabled'
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Serializer for completely disabling 2FA.
|
|
124
|
-
*/
|
|
125
|
-
export type DisableRequest = {
|
|
126
|
-
/**
|
|
127
|
-
* TOTP code for verification
|
|
128
|
-
*/
|
|
129
|
-
code: string;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Serializer for starting 2FA setup.
|
|
134
|
-
*/
|
|
135
|
-
export type SetupRequest = {
|
|
136
|
-
/**
|
|
137
|
-
* Device name for identification (e.g., 'My iPhone')
|
|
138
|
-
*/
|
|
139
|
-
device_name?: string;
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Response serializer for setup initiation.
|
|
144
|
-
*/
|
|
145
|
-
export type SetupResponse = {
|
|
146
|
-
/**
|
|
147
|
-
* Device ID to use for confirmation
|
|
148
|
-
*/
|
|
149
|
-
device_id: string;
|
|
150
|
-
/**
|
|
151
|
-
* Base32-encoded TOTP secret (for manual entry)
|
|
152
|
-
*/
|
|
153
|
-
secret: string;
|
|
154
|
-
/**
|
|
155
|
-
* otpauth:// URI for QR code generation
|
|
156
|
-
*/
|
|
157
|
-
provisioning_uri: string;
|
|
158
|
-
/**
|
|
159
|
-
* Base64-encoded QR code image (data URI)
|
|
160
|
-
*/
|
|
161
|
-
qr_code_base64: string;
|
|
162
|
-
/**
|
|
163
|
-
* Seconds until setup expires (typically 600 = 10 minutes)
|
|
164
|
-
*/
|
|
165
|
-
expires_in: number;
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* User data returned after 2FA verification.
|
|
170
|
-
*/
|
|
171
|
-
export type TotpVerifyUser = {
|
|
172
|
-
readonly id: number;
|
|
173
|
-
readonly email: string;
|
|
174
|
-
first_name?: string;
|
|
175
|
-
last_name?: string;
|
|
176
|
-
/**
|
|
177
|
-
* Get user's full name.
|
|
178
|
-
*/
|
|
179
|
-
readonly full_name: string;
|
|
180
|
-
/**
|
|
181
|
-
* Get user's initials for avatar fallback.
|
|
182
|
-
*/
|
|
183
|
-
readonly initials: string;
|
|
184
|
-
/**
|
|
185
|
-
* Get formatted username for display.
|
|
186
|
-
*/
|
|
187
|
-
readonly display_username: string;
|
|
188
|
-
company?: string;
|
|
189
|
-
phone?: string;
|
|
190
|
-
position?: string;
|
|
191
|
-
language?: string;
|
|
192
|
-
readonly avatar: string | null;
|
|
193
|
-
/**
|
|
194
|
-
* Staff status
|
|
195
|
-
*
|
|
196
|
-
* Designates whether the user can log into this admin site.
|
|
197
|
-
*/
|
|
198
|
-
readonly is_staff: boolean;
|
|
199
|
-
/**
|
|
200
|
-
* Superuser status
|
|
201
|
-
*
|
|
202
|
-
* Designates that this user has all permissions without explicitly assigning them.
|
|
203
|
-
*/
|
|
204
|
-
readonly is_superuser: boolean;
|
|
205
|
-
readonly date_joined: string;
|
|
206
|
-
readonly last_login: string | null;
|
|
207
|
-
readonly unanswered_messages_count: number;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Serializer for backup code verification during login.
|
|
212
|
-
*/
|
|
213
|
-
export type VerifyBackupRequest = {
|
|
214
|
-
/**
|
|
215
|
-
* 2FA session ID from login response
|
|
216
|
-
*/
|
|
217
|
-
session_id: string;
|
|
218
|
-
/**
|
|
219
|
-
* 8-character backup recovery code
|
|
220
|
-
*/
|
|
221
|
-
backup_code: string;
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Serializer for TOTP code verification during login.
|
|
226
|
-
*/
|
|
227
|
-
export type VerifyRequest = {
|
|
228
|
-
/**
|
|
229
|
-
* 2FA session ID from login response
|
|
230
|
-
*/
|
|
231
|
-
session_id: string;
|
|
232
|
-
/**
|
|
233
|
-
* 6-digit TOTP code from authenticator app
|
|
234
|
-
*/
|
|
235
|
-
code: string;
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Response serializer for successful 2FA verification.
|
|
240
|
-
*/
|
|
241
|
-
export type VerifyResponse = {
|
|
242
|
-
message: string;
|
|
243
|
-
/**
|
|
244
|
-
* JWT access token
|
|
245
|
-
*/
|
|
246
|
-
access_token: string;
|
|
247
|
-
/**
|
|
248
|
-
* JWT refresh token
|
|
249
|
-
*/
|
|
250
|
-
refresh_token: string;
|
|
251
|
-
/**
|
|
252
|
-
* User profile data
|
|
253
|
-
*/
|
|
254
|
-
user: TotpVerifyUser;
|
|
255
|
-
/**
|
|
256
|
-
* Number of remaining backup codes (if backup code was used)
|
|
257
|
-
*/
|
|
258
|
-
remaining_backup_codes?: number;
|
|
259
|
-
/**
|
|
260
|
-
* Warning message (e.g., low backup codes)
|
|
261
|
-
*/
|
|
262
|
-
warning?: string;
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Response serializer for device list endpoint.
|
|
267
|
-
*/
|
|
268
|
-
export type DeviceListResponseWritable = {
|
|
269
|
-
devices: Array<unknown>;
|
|
270
|
-
has_2fa_enabled: boolean;
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* User data returned after 2FA verification.
|
|
275
|
-
*/
|
|
276
|
-
export type TotpVerifyUserWritable = {
|
|
277
|
-
first_name?: string;
|
|
278
|
-
last_name?: string;
|
|
279
|
-
company?: string;
|
|
280
|
-
phone?: string;
|
|
281
|
-
position?: string;
|
|
282
|
-
language?: string;
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Response serializer for successful 2FA verification.
|
|
287
|
-
*/
|
|
288
|
-
export type VerifyResponseWritable = {
|
|
289
|
-
message: string;
|
|
290
|
-
/**
|
|
291
|
-
* JWT access token
|
|
292
|
-
*/
|
|
293
|
-
access_token: string;
|
|
294
|
-
/**
|
|
295
|
-
* JWT refresh token
|
|
296
|
-
*/
|
|
297
|
-
refresh_token: string;
|
|
298
|
-
/**
|
|
299
|
-
* User profile data
|
|
300
|
-
*/
|
|
301
|
-
user: TotpVerifyUserWritable;
|
|
302
|
-
/**
|
|
303
|
-
* Number of remaining backup codes (if backup code was used)
|
|
304
|
-
*/
|
|
305
|
-
remaining_backup_codes?: number;
|
|
306
|
-
/**
|
|
307
|
-
* Warning message (e.g., low backup codes)
|
|
308
|
-
*/
|
|
309
|
-
warning?: string;
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
export type CfgTotpBackupCodesRetrieveData = {
|
|
313
|
-
body?: never;
|
|
314
|
-
path?: never;
|
|
315
|
-
query?: never;
|
|
316
|
-
url: '/cfg/totp/backup-codes/';
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
export type CfgTotpBackupCodesRetrieveResponses = {
|
|
320
|
-
200: BackupCodesStatus;
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
export type CfgTotpBackupCodesRetrieveResponse = CfgTotpBackupCodesRetrieveResponses[keyof CfgTotpBackupCodesRetrieveResponses];
|
|
324
|
-
|
|
325
|
-
export type CfgTotpBackupCodesRegenerateCreateData = {
|
|
326
|
-
body: BackupCodesRegenerateRequest;
|
|
327
|
-
path?: never;
|
|
328
|
-
query?: never;
|
|
329
|
-
url: '/cfg/totp/backup-codes/regenerate/';
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
export type CfgTotpBackupCodesRegenerateCreateErrors = {
|
|
333
|
-
/**
|
|
334
|
-
* Invalid code or 2FA not enabled
|
|
335
|
-
*/
|
|
336
|
-
400: unknown;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
export type CfgTotpBackupCodesRegenerateCreateResponses = {
|
|
340
|
-
200: BackupCodesRegenerateResponse;
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
export type CfgTotpBackupCodesRegenerateCreateResponse = CfgTotpBackupCodesRegenerateCreateResponses[keyof CfgTotpBackupCodesRegenerateCreateResponses];
|
|
344
|
-
|
|
345
|
-
export type CfgTotpDevicesRetrieveData = {
|
|
346
|
-
body?: never;
|
|
347
|
-
path?: never;
|
|
348
|
-
query?: never;
|
|
349
|
-
url: '/cfg/totp/devices/';
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
export type CfgTotpDevicesRetrieveResponses = {
|
|
353
|
-
200: DeviceListResponse;
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
export type CfgTotpDevicesRetrieveResponse = CfgTotpDevicesRetrieveResponses[keyof CfgTotpDevicesRetrieveResponses];
|
|
357
|
-
|
|
358
|
-
export type CfgTotpDevicesDestroyData = {
|
|
359
|
-
body?: never;
|
|
360
|
-
path: {
|
|
361
|
-
id: string;
|
|
362
|
-
};
|
|
363
|
-
query?: never;
|
|
364
|
-
url: '/cfg/totp/devices/{id}/';
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
export type CfgTotpDevicesDestroyResponses = {
|
|
368
|
-
/**
|
|
369
|
-
* No response body
|
|
370
|
-
*/
|
|
371
|
-
204: void;
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
export type CfgTotpDevicesDestroyResponse = CfgTotpDevicesDestroyResponses[keyof CfgTotpDevicesDestroyResponses];
|
|
375
|
-
|
|
376
|
-
export type CfgTotpDisableCreateData = {
|
|
377
|
-
body: DisableRequest;
|
|
378
|
-
path?: never;
|
|
379
|
-
query?: never;
|
|
380
|
-
url: '/cfg/totp/disable/';
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
export type CfgTotpDisableCreateErrors = {
|
|
384
|
-
/**
|
|
385
|
-
* Invalid code
|
|
386
|
-
*/
|
|
387
|
-
400: unknown;
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
export type CfgTotpDisableCreateResponses = {
|
|
391
|
-
/**
|
|
392
|
-
* 2FA disabled successfully
|
|
393
|
-
*/
|
|
394
|
-
200: unknown;
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
export type CfgTotpSetupCreateData = {
|
|
398
|
-
body?: SetupRequest;
|
|
399
|
-
path?: never;
|
|
400
|
-
query?: never;
|
|
401
|
-
url: '/cfg/totp/setup/';
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
export type CfgTotpSetupCreateErrors = {
|
|
405
|
-
/**
|
|
406
|
-
* 2FA already enabled or invalid request
|
|
407
|
-
*/
|
|
408
|
-
400: unknown;
|
|
409
|
-
};
|
|
410
|
-
|
|
411
|
-
export type CfgTotpSetupCreateResponses = {
|
|
412
|
-
200: SetupResponse;
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
export type CfgTotpSetupCreateResponse = CfgTotpSetupCreateResponses[keyof CfgTotpSetupCreateResponses];
|
|
416
|
-
|
|
417
|
-
export type CfgTotpSetupConfirmCreateData = {
|
|
418
|
-
body: ConfirmSetupRequest;
|
|
419
|
-
path?: never;
|
|
420
|
-
query?: never;
|
|
421
|
-
url: '/cfg/totp/setup/confirm/';
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
export type CfgTotpSetupConfirmCreateErrors = {
|
|
425
|
-
/**
|
|
426
|
-
* Invalid code or setup expired
|
|
427
|
-
*/
|
|
428
|
-
400: unknown;
|
|
429
|
-
};
|
|
430
|
-
|
|
431
|
-
export type CfgTotpSetupConfirmCreateResponses = {
|
|
432
|
-
200: ConfirmSetupResponse;
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
export type CfgTotpSetupConfirmCreateResponse = CfgTotpSetupConfirmCreateResponses[keyof CfgTotpSetupConfirmCreateResponses];
|
|
436
|
-
|
|
437
|
-
export type CfgTotpVerifyCreateData = {
|
|
438
|
-
body: VerifyRequest;
|
|
439
|
-
path?: never;
|
|
440
|
-
query?: never;
|
|
441
|
-
url: '/cfg/totp/verify/';
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
export type CfgTotpVerifyCreateErrors = {
|
|
445
|
-
/**
|
|
446
|
-
* Invalid code or session
|
|
447
|
-
*/
|
|
448
|
-
400: unknown;
|
|
449
|
-
/**
|
|
450
|
-
* Too many attempts
|
|
451
|
-
*/
|
|
452
|
-
403: unknown;
|
|
453
|
-
};
|
|
454
|
-
|
|
455
|
-
export type CfgTotpVerifyCreateResponses = {
|
|
456
|
-
200: VerifyResponse;
|
|
457
|
-
};
|
|
458
|
-
|
|
459
|
-
export type CfgTotpVerifyCreateResponse = CfgTotpVerifyCreateResponses[keyof CfgTotpVerifyCreateResponses];
|
|
460
|
-
|
|
461
|
-
export type CfgTotpVerifyBackupCreateData = {
|
|
462
|
-
body: VerifyBackupRequest;
|
|
463
|
-
path?: never;
|
|
464
|
-
query?: never;
|
|
465
|
-
url: '/cfg/totp/verify/backup/';
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
export type CfgTotpVerifyBackupCreateErrors = {
|
|
469
|
-
/**
|
|
470
|
-
* Invalid backup code or session
|
|
471
|
-
*/
|
|
472
|
-
400: unknown;
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
export type CfgTotpVerifyBackupCreateResponses = {
|
|
476
|
-
200: VerifyResponse;
|
|
477
|
-
};
|
|
478
|
-
|
|
479
|
-
export type CfgTotpVerifyBackupCreateResponse = CfgTotpVerifyBackupCreateResponses[keyof CfgTotpVerifyBackupCreateResponses];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|