@djangocfg/api 2.1.322 → 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.
Files changed (272) hide show
  1. package/dist/auth-server.cjs +1037 -1227
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +1037 -1217
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +2142 -3398
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.d.cts +158 -209
  8. package/dist/auth.d.ts +158 -209
  9. package/dist/auth.mjs +2136 -3392
  10. package/dist/auth.mjs.map +1 -1
  11. package/dist/clients.cjs +1018 -4423
  12. package/dist/clients.cjs.map +1 -1
  13. package/dist/clients.d.cts +151 -2918
  14. package/dist/clients.d.ts +151 -2918
  15. package/dist/clients.mjs +1018 -4417
  16. package/dist/clients.mjs.map +1 -1
  17. package/dist/index.cjs +2253 -2819
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +2408 -1872
  20. package/dist/index.d.ts +2408 -1872
  21. package/dist/index.mjs +2235 -2795
  22. package/dist/index.mjs.map +1 -1
  23. package/package.json +2 -7
  24. package/src/_api/generated/_cfg_accounts/api.ts +120 -0
  25. package/src/_api/generated/_cfg_accounts/events.ts +198 -0
  26. package/src/_api/generated/_cfg_accounts/hooks/index.ts +18 -0
  27. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +25 -0
  28. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthDisconnectCreate.ts +24 -0
  29. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthGithubAuthorizeCreate.ts +24 -0
  30. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthGithubCallbackCreate.ts +24 -0
  31. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +25 -0
  32. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpRequestCreate.ts +24 -0
  33. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpVerifyCreate.ts +24 -0
  34. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileAvatarCreate.ts +24 -0
  35. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileDeleteCreate.ts +24 -0
  36. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialPartialUpdate.ts +24 -0
  37. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialUpdate.ts +24 -0
  38. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +25 -0
  39. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileUpdatePartialUpdate.ts +24 -0
  40. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileUpdateUpdate.ts +24 -0
  41. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsTokenRefreshCreate.ts +24 -0
  42. package/src/_api/generated/_cfg_accounts/index.ts +29 -0
  43. package/src/_api/generated/_cfg_accounts/schemas/AccountDeleteResponse.ts +12 -0
  44. package/src/_api/generated/_cfg_accounts/schemas/CentrifugoToken.ts +14 -0
  45. package/src/_api/generated/_cfg_accounts/schemas/CfgUserUpdateRequest.ts +16 -0
  46. package/src/_api/generated/_cfg_accounts/schemas/OAuthAuthorizeRequestRequest.ts +12 -0
  47. package/src/_api/generated/_cfg_accounts/schemas/OAuthAuthorizeResponse.ts +12 -0
  48. package/src/_api/generated/_cfg_accounts/schemas/OAuthCallbackRequestRequest.ts +13 -0
  49. package/src/_api/generated/_cfg_accounts/schemas/OAuthConnection.ts +19 -0
  50. package/src/_api/generated/_cfg_accounts/schemas/OAuthDisconnectRequestRequest.ts +12 -0
  51. package/src/_api/generated/_cfg_accounts/schemas/OAuthError.ts +12 -0
  52. package/src/_api/generated/_cfg_accounts/schemas/OAuthProvidersResponse.ts +11 -0
  53. package/src/_api/generated/_cfg_accounts/schemas/OAuthTokenResponse.ts +18 -0
  54. package/src/_api/generated/_cfg_accounts/schemas/OTPErrorResponse.ts +13 -0
  55. package/src/_api/generated/_cfg_accounts/schemas/OTPRequestRequest.ts +12 -0
  56. package/src/_api/generated/_cfg_accounts/schemas/OTPRequestResponse.ts +11 -0
  57. package/src/_api/generated/_cfg_accounts/schemas/OTPVerifyRequest.ts +13 -0
  58. package/src/_api/generated/_cfg_accounts/schemas/OTPVerifyResponse.ts +17 -0
  59. package/src/_api/generated/_cfg_accounts/schemas/PatchedCfgUserUpdateRequest.ts +16 -0
  60. package/src/_api/generated/_cfg_accounts/schemas/ProviderEnum.ts +9 -0
  61. package/src/_api/generated/_cfg_accounts/schemas/TokenRefresh.ts +12 -0
  62. package/src/_api/generated/_cfg_accounts/schemas/TokenRefreshRequest.ts +11 -0
  63. package/src/_api/generated/{cfg_accounts/_utils/schemas/User.schema.ts → _cfg_accounts/schemas/User.ts} +19 -27
  64. package/src/_api/generated/_cfg_accounts/schemas/index.ts +24 -0
  65. package/src/_api/generated/_cfg_accounts/sdk.gen.ts +5 -0
  66. package/src/_api/generated/_cfg_accounts/types.gen.ts +5 -0
  67. package/src/_api/generated/_cfg_centrifugo/api.ts +120 -0
  68. package/src/_api/generated/_cfg_centrifugo/events.ts +198 -0
  69. package/src/_api/generated/_cfg_centrifugo/hooks/index.ts +4 -0
  70. package/src/_api/generated/_cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +25 -0
  71. package/src/_api/generated/_cfg_centrifugo/index.ts +29 -0
  72. package/src/_api/generated/_cfg_centrifugo/schemas/ConnectionTokenResponse.ts +14 -0
  73. package/src/_api/generated/_cfg_centrifugo/schemas/index.ts +4 -0
  74. package/src/_api/generated/_cfg_centrifugo/sdk.gen.ts +5 -0
  75. package/src/_api/generated/_cfg_centrifugo/types.gen.ts +5 -0
  76. package/src/_api/generated/_cfg_totp/api.ts +120 -0
  77. package/src/_api/generated/_cfg_totp/events.ts +198 -0
  78. package/src/_api/generated/_cfg_totp/hooks/index.ts +12 -0
  79. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRegenerateCreate.ts +24 -0
  80. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +25 -0
  81. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesDestroy.ts +24 -0
  82. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +25 -0
  83. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDisableCreate.ts +24 -0
  84. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpSetupConfirmCreate.ts +24 -0
  85. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpSetupCreate.ts +24 -0
  86. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpVerifyBackupCreate.ts +24 -0
  87. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpVerifyCreate.ts +24 -0
  88. package/src/_api/generated/_cfg_totp/index.ts +29 -0
  89. package/src/_api/generated/_cfg_totp/schemas/BackupCodesRegenerateRequest.ts +11 -0
  90. package/src/_api/generated/_cfg_totp/schemas/BackupCodesRegenerateResponse.ts +12 -0
  91. package/src/_api/generated/_cfg_totp/schemas/BackupCodesStatus.ts +13 -0
  92. package/src/_api/generated/_cfg_totp/schemas/ConfirmSetupRequest.ts +12 -0
  93. package/src/_api/generated/_cfg_totp/schemas/ConfirmSetupResponse.ts +13 -0
  94. package/src/_api/generated/_cfg_totp/schemas/DeviceList.ts +18 -0
  95. package/src/_api/generated/_cfg_totp/schemas/DeviceListResponse.ts +13 -0
  96. package/src/_api/generated/_cfg_totp/schemas/DeviceListStatusEnum.ts +9 -0
  97. package/src/_api/generated/_cfg_totp/schemas/DisableRequest.ts +11 -0
  98. package/src/_api/generated/_cfg_totp/schemas/SetupRequest.ts +11 -0
  99. package/src/_api/generated/_cfg_totp/schemas/SetupResponse.ts +15 -0
  100. package/src/_api/generated/{cfg_totp/_utils/schemas/TotpVerifyUser.schema.ts → _cfg_totp/schemas/TotpVerifyUser.ts} +17 -25
  101. package/src/_api/generated/_cfg_totp/schemas/VerifyBackupRequest.ts +12 -0
  102. package/src/_api/generated/_cfg_totp/schemas/VerifyRequest.ts +12 -0
  103. package/src/_api/generated/_cfg_totp/schemas/VerifyResponse.ts +17 -0
  104. package/src/_api/generated/_cfg_totp/schemas/index.ts +18 -0
  105. package/src/_api/generated/_cfg_totp/sdk.gen.ts +5 -0
  106. package/src/_api/generated/_cfg_totp/types.gen.ts +5 -0
  107. package/src/_api/generated/client/client.gen.ts +280 -0
  108. package/src/_api/generated/client/index.ts +25 -0
  109. package/src/_api/generated/client/types.gen.ts +217 -0
  110. package/src/_api/generated/client/utils.gen.ts +318 -0
  111. package/src/_api/generated/client.gen.ts +16 -0
  112. package/src/_api/generated/core/auth.gen.ts +41 -0
  113. package/src/_api/generated/core/bodySerializer.gen.ts +82 -0
  114. package/src/_api/generated/core/params.gen.ts +169 -0
  115. package/src/_api/generated/core/pathSerializer.gen.ts +171 -0
  116. package/src/_api/generated/core/queryKeySerializer.gen.ts +117 -0
  117. package/src/_api/generated/core/serverSentEvents.gen.ts +242 -0
  118. package/src/_api/generated/core/types.gen.ts +104 -0
  119. package/src/_api/generated/core/utils.gen.ts +140 -0
  120. package/src/_api/generated/helpers/errors.ts +70 -0
  121. package/src/_api/generated/helpers/index.ts +25 -0
  122. package/src/_api/generated/helpers/logger.ts +123 -0
  123. package/src/_api/generated/helpers/storage.ts +83 -0
  124. package/src/_api/generated/helpers/validation-events.ts +52 -0
  125. package/src/_api/generated/index.ts +28 -0
  126. package/src/_api/generated/sdk.gen.ts +1250 -0
  127. package/src/_api/generated/types.gen.ts +1294 -0
  128. package/src/_api/index.ts +5 -23
  129. package/src/auth/context/AccountsContext.tsx +58 -89
  130. package/src/auth/context/AuthContext.tsx +3 -3
  131. package/src/auth/context/index.ts +2 -2
  132. package/src/auth/hooks/useDeleteAccount.ts +3 -1
  133. package/src/auth/hooks/useGithubAuth.ts +13 -11
  134. package/src/auth/hooks/useTokenRefresh.ts +7 -4
  135. package/src/auth/hooks/useTwoFactor.ts +15 -8
  136. package/src/auth/hooks/useTwoFactorSetup.ts +9 -5
  137. package/src/auth/hooks/useTwoFactorStatus.ts +5 -3
  138. package/src/auth/middlewares/tokenRefresh.ts +7 -4
  139. package/src/clients.ts +14 -51
  140. package/src/index.ts +35 -60
  141. package/src/server.ts +25 -23
  142. package/src/_api/BaseClient.ts +0 -22
  143. package/src/_api/generated/cfg_accounts/CLAUDE.md +0 -86
  144. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts.ts +0 -154
  145. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__auth.ts +0 -95
  146. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__oauth.ts +0 -285
  147. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +0 -440
  148. package/src/_api/generated/cfg_accounts/_utils/fetchers/index.ts +0 -33
  149. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts.ts +0 -64
  150. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__auth.ts +0 -44
  151. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__oauth.ts +0 -114
  152. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +0 -152
  153. package/src/_api/generated/cfg_accounts/_utils/hooks/index.ts +0 -33
  154. package/src/_api/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts +0 -20
  155. package/src/_api/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts +0 -22
  156. package/src/_api/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts +0 -15
  157. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts +0 -20
  158. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts +0 -20
  159. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts +0 -21
  160. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts +0 -27
  161. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts +0 -20
  162. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts +0 -20
  163. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts +0 -19
  164. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts +0 -46
  165. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts +0 -41
  166. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts +0 -20
  167. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts +0 -19
  168. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts +0 -21
  169. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts +0 -45
  170. package/src/_api/generated/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts +0 -24
  171. package/src/_api/generated/cfg_accounts/_utils/schemas/TokenRefresh.schema.ts +0 -16
  172. package/src/_api/generated/cfg_accounts/_utils/schemas/TokenRefreshRequest.schema.ts +0 -15
  173. package/src/_api/generated/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts +0 -24
  174. package/src/_api/generated/cfg_accounts/_utils/schemas/index.ts +0 -41
  175. package/src/_api/generated/cfg_accounts/accounts/client.ts +0 -34
  176. package/src/_api/generated/cfg_accounts/accounts/index.ts +0 -4
  177. package/src/_api/generated/cfg_accounts/accounts/models.ts +0 -127
  178. package/src/_api/generated/cfg_accounts/accounts__auth/client.ts +0 -23
  179. package/src/_api/generated/cfg_accounts/accounts__auth/index.ts +0 -4
  180. package/src/_api/generated/cfg_accounts/accounts__auth/models.ts +0 -19
  181. package/src/_api/generated/cfg_accounts/accounts__oauth/client.ts +0 -67
  182. package/src/_api/generated/cfg_accounts/accounts__oauth/index.ts +0 -4
  183. package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +0 -127
  184. package/src/_api/generated/cfg_accounts/accounts__user_profile/client.ts +0 -94
  185. package/src/_api/generated/cfg_accounts/accounts__user_profile/index.ts +0 -4
  186. package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +0 -98
  187. package/src/_api/generated/cfg_accounts/api-instance.ts +0 -181
  188. package/src/_api/generated/cfg_accounts/client.ts +0 -339
  189. package/src/_api/generated/cfg_accounts/enums.ts +0 -10
  190. package/src/_api/generated/cfg_accounts/errors.ts +0 -123
  191. package/src/_api/generated/cfg_accounts/http.ts +0 -160
  192. package/src/_api/generated/cfg_accounts/index.ts +0 -338
  193. package/src/_api/generated/cfg_accounts/logger.ts +0 -261
  194. package/src/_api/generated/cfg_accounts/retry.ts +0 -177
  195. package/src/_api/generated/cfg_accounts/schema.json +0 -1576
  196. package/src/_api/generated/cfg_accounts/storage.ts +0 -163
  197. package/src/_api/generated/cfg_accounts/validation-events.ts +0 -135
  198. package/src/_api/generated/cfg_centrifugo/CLAUDE.md +0 -60
  199. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts +0 -94
  200. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/index.ts +0 -30
  201. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts +0 -39
  202. package/src/_api/generated/cfg_centrifugo/_utils/hooks/index.ts +0 -30
  203. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts +0 -22
  204. package/src/_api/generated/cfg_centrifugo/_utils/schemas/index.ts +0 -21
  205. package/src/_api/generated/cfg_centrifugo/api-instance.ts +0 -181
  206. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts +0 -27
  207. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/index.ts +0 -4
  208. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/models.ts +0 -18
  209. package/src/_api/generated/cfg_centrifugo/client.ts +0 -330
  210. package/src/_api/generated/cfg_centrifugo/errors.ts +0 -123
  211. package/src/_api/generated/cfg_centrifugo/http.ts +0 -160
  212. package/src/_api/generated/cfg_centrifugo/index.ts +0 -316
  213. package/src/_api/generated/cfg_centrifugo/logger.ts +0 -261
  214. package/src/_api/generated/cfg_centrifugo/retry.ts +0 -177
  215. package/src/_api/generated/cfg_centrifugo/schema.json +0 -118
  216. package/src/_api/generated/cfg_centrifugo/storage.ts +0 -163
  217. package/src/_api/generated/cfg_centrifugo/validation-events.ts +0 -135
  218. package/src/_api/generated/cfg_totp/CLAUDE.md +0 -83
  219. package/src/_api/generated/cfg_totp/_utils/fetchers/index.ts +0 -34
  220. package/src/_api/generated/cfg_totp/_utils/fetchers/totp.ts +0 -50
  221. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__backup_codes.ts +0 -153
  222. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts +0 -109
  223. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_setup.ts +0 -154
  224. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_verification.ts +0 -153
  225. package/src/_api/generated/cfg_totp/_utils/hooks/index.ts +0 -34
  226. package/src/_api/generated/cfg_totp/_utils/hooks/totp.ts +0 -43
  227. package/src/_api/generated/cfg_totp/_utils/hooks/totp__backup_codes.ts +0 -60
  228. package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_management.ts +0 -59
  229. package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_setup.ts +0 -64
  230. package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_verification.ts +0 -63
  231. package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts +0 -19
  232. package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts +0 -20
  233. package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts +0 -21
  234. package/src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts +0 -20
  235. package/src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts +0 -21
  236. package/src/_api/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts +0 -26
  237. package/src/_api/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts +0 -21
  238. package/src/_api/generated/cfg_totp/_utils/schemas/DisableRequest.schema.ts +0 -19
  239. package/src/_api/generated/cfg_totp/_utils/schemas/SetupRequest.schema.ts +0 -19
  240. package/src/_api/generated/cfg_totp/_utils/schemas/SetupResponse.schema.ts +0 -23
  241. package/src/_api/generated/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts +0 -20
  242. package/src/_api/generated/cfg_totp/_utils/schemas/VerifyRequest.schema.ts +0 -20
  243. package/src/_api/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts +0 -25
  244. package/src/_api/generated/cfg_totp/_utils/schemas/index.ts +0 -34
  245. package/src/_api/generated/cfg_totp/api-instance.ts +0 -181
  246. package/src/_api/generated/cfg_totp/client.ts +0 -342
  247. package/src/_api/generated/cfg_totp/enums.ts +0 -13
  248. package/src/_api/generated/cfg_totp/errors.ts +0 -123
  249. package/src/_api/generated/cfg_totp/http.ts +0 -160
  250. package/src/_api/generated/cfg_totp/index.ts +0 -345
  251. package/src/_api/generated/cfg_totp/logger.ts +0 -261
  252. package/src/_api/generated/cfg_totp/retry.ts +0 -177
  253. package/src/_api/generated/cfg_totp/schema.json +0 -910
  254. package/src/_api/generated/cfg_totp/storage.ts +0 -163
  255. package/src/_api/generated/cfg_totp/totp/client.ts +0 -24
  256. package/src/_api/generated/cfg_totp/totp/index.ts +0 -4
  257. package/src/_api/generated/cfg_totp/totp/models.ts +0 -4
  258. package/src/_api/generated/cfg_totp/totp__backup_codes/client.ts +0 -32
  259. package/src/_api/generated/cfg_totp/totp__backup_codes/index.ts +0 -4
  260. package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +0 -38
  261. package/src/_api/generated/cfg_totp/totp__totp_management/client.ts +0 -31
  262. package/src/_api/generated/cfg_totp/totp__totp_management/index.ts +0 -4
  263. package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +0 -46
  264. package/src/_api/generated/cfg_totp/totp__totp_setup/client.ts +0 -33
  265. package/src/_api/generated/cfg_totp/totp__totp_setup/index.ts +0 -4
  266. package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +0 -55
  267. package/src/_api/generated/cfg_totp/totp__totp_verification/client.ts +0 -33
  268. package/src/_api/generated/cfg_totp/totp__totp_verification/index.ts +0 -4
  269. package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +0 -74
  270. package/src/_api/generated/cfg_totp/validation-events.ts +0 -135
  271. package/src/hooks/accounts.ts +0 -8
  272. package/src/hooks/index.ts +0 -10
@@ -0,0 +1,1294 @@
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
+ * Response serializer for account deletion.
9
+ */
10
+ export type AccountDeleteResponse = {
11
+ /**
12
+ * Human-readable message about the deletion
13
+ */
14
+ message: string;
15
+ /**
16
+ * Whether the account was successfully deleted
17
+ */
18
+ success: boolean;
19
+ };
20
+
21
+ /**
22
+ * Serializer for regenerating backup codes.
23
+ */
24
+ export type BackupCodesRegenerateRequest = {
25
+ /**
26
+ * TOTP code for verification
27
+ */
28
+ code: string;
29
+ };
30
+
31
+ /**
32
+ * Response serializer for backup codes regeneration.
33
+ */
34
+ export type BackupCodesRegenerateResponse = {
35
+ /**
36
+ * List of new backup codes (save these!)
37
+ */
38
+ backup_codes: Array<string>;
39
+ /**
40
+ * Warning about previous codes being invalidated
41
+ */
42
+ warning: string;
43
+ };
44
+
45
+ /**
46
+ * Serializer for backup codes status.
47
+ */
48
+ export type BackupCodesStatus = {
49
+ /**
50
+ * Number of unused backup codes
51
+ */
52
+ remaining_count: number;
53
+ /**
54
+ * Total number of codes generated
55
+ */
56
+ total_generated: number;
57
+ /**
58
+ * Warning if running low on codes
59
+ */
60
+ warning?: string | null;
61
+ };
62
+
63
+ /**
64
+ * Nested serializer for Centrifugo WebSocket connection token.
65
+ */
66
+ export type CentrifugoToken = {
67
+ /**
68
+ * Centrifugo WebSocket URL
69
+ */
70
+ centrifugo_url: string;
71
+ /**
72
+ * List of allowed channels for this user
73
+ */
74
+ channels: Array<string>;
75
+ /**
76
+ * Token expiration time (ISO 8601)
77
+ */
78
+ expires_at: string;
79
+ /**
80
+ * JWT token for Centrifugo WebSocket connection
81
+ */
82
+ token: string;
83
+ };
84
+
85
+ /**
86
+ * Serializer for updating user profile.
87
+ */
88
+ export type CfgUserUpdateRequest = {
89
+ company?: string;
90
+ first_name?: string;
91
+ language?: string;
92
+ last_name?: string;
93
+ phone?: string;
94
+ position?: string;
95
+ };
96
+
97
+ /**
98
+ * Serializer for confirming 2FA setup with first code.
99
+ */
100
+ export type ConfirmSetupRequest = {
101
+ /**
102
+ * 6-digit TOTP code from authenticator app
103
+ */
104
+ code: string;
105
+ /**
106
+ * Device ID from setup response
107
+ */
108
+ device_id: string;
109
+ };
110
+
111
+ /**
112
+ * Response serializer for setup confirmation.
113
+ */
114
+ export type ConfirmSetupResponse = {
115
+ /**
116
+ * List of backup recovery codes (save these!)
117
+ */
118
+ backup_codes: Array<string>;
119
+ /**
120
+ * Warning message about backup codes
121
+ */
122
+ backup_codes_warning: string;
123
+ message: string;
124
+ };
125
+
126
+ /**
127
+ * ConnectionTokenResponse
128
+ *
129
+ * Response model for Centrifugo connection token.
130
+ */
131
+ export type ConnectionTokenResponse = {
132
+ /**
133
+ * Centrifugo Url
134
+ *
135
+ * Centrifugo WebSocket URL
136
+ */
137
+ centrifugo_url: string;
138
+ /**
139
+ * Channels
140
+ *
141
+ * List of allowed channels
142
+ */
143
+ channels: Array<string>;
144
+ /**
145
+ * Expires At
146
+ *
147
+ * Token expiration time (ISO 8601)
148
+ */
149
+ expires_at: string;
150
+ /**
151
+ * Token
152
+ *
153
+ * JWT token for Centrifugo connection
154
+ */
155
+ token: string;
156
+ };
157
+
158
+ /**
159
+ * Serializer for listing TOTP devices.
160
+ */
161
+ export type DeviceList = {
162
+ /**
163
+ * When device setup was confirmed
164
+ */
165
+ readonly confirmed_at: string | null;
166
+ readonly created_at: string;
167
+ readonly id: string;
168
+ /**
169
+ * Primary device used for verification
170
+ */
171
+ readonly is_primary: boolean;
172
+ /**
173
+ * Last successful verification
174
+ */
175
+ readonly last_used_at: string | null;
176
+ /**
177
+ * Device name for identification
178
+ */
179
+ readonly name: string;
180
+ readonly status: DeviceListStatusEnum;
181
+ };
182
+
183
+ /**
184
+ * Response serializer for device list endpoint.
185
+ */
186
+ export type DeviceListResponse = {
187
+ devices: Array<DeviceList>;
188
+ has_2fa_enabled: boolean;
189
+ };
190
+
191
+ /**
192
+ * * `pending` - Pending Confirmation
193
+ * * `active` - Active
194
+ * * `disabled` - Disabled
195
+ */
196
+ export enum DeviceListStatusEnum {
197
+ PENDING = 'pending',
198
+ ACTIVE = 'active',
199
+ DISABLED = 'disabled'
200
+ }
201
+
202
+ /**
203
+ * Serializer for completely disabling 2FA.
204
+ */
205
+ export type DisableRequest = {
206
+ /**
207
+ * TOTP code for verification
208
+ */
209
+ code: string;
210
+ };
211
+
212
+ /**
213
+ * Request to start OAuth flow.
214
+ */
215
+ export type OAuthAuthorizeRequestRequest = {
216
+ /**
217
+ * URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path
218
+ */
219
+ redirect_uri?: string;
220
+ /**
221
+ * Optional source URL for registration tracking
222
+ */
223
+ source_url?: string;
224
+ };
225
+
226
+ /**
227
+ * Response with OAuth authorization URL.
228
+ */
229
+ export type OAuthAuthorizeResponse = {
230
+ /**
231
+ * Full URL to redirect user to OAuth provider
232
+ */
233
+ authorization_url: string;
234
+ /**
235
+ * State token for CSRF protection. Store this and verify on callback.
236
+ */
237
+ state: string;
238
+ };
239
+
240
+ /**
241
+ * Request to complete OAuth flow (callback handler).
242
+ */
243
+ export type OAuthCallbackRequestRequest = {
244
+ /**
245
+ * Authorization code from OAuth provider callback
246
+ */
247
+ code: string;
248
+ /**
249
+ * Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path
250
+ */
251
+ redirect_uri?: string;
252
+ /**
253
+ * State token for CSRF verification (from authorize response)
254
+ */
255
+ state: string;
256
+ };
257
+
258
+ /**
259
+ * Serializer for OAuth connection info (user-facing).
260
+ */
261
+ export type OAuthConnection = {
262
+ /**
263
+ * When this OAuth connection was created
264
+ */
265
+ readonly connected_at: string;
266
+ readonly id: number;
267
+ /**
268
+ * Last time this OAuth connection was used for login
269
+ */
270
+ readonly last_login_at: string;
271
+ /**
272
+ * OAuth provider name (github, google, etc.)
273
+ *
274
+ * * `github` - GitHub
275
+ */
276
+ readonly provider: ProviderEnum;
277
+ /**
278
+ * Avatar URL from OAuth provider
279
+ */
280
+ readonly provider_avatar_url: string;
281
+ readonly provider_display: string;
282
+ /**
283
+ * Email from OAuth provider (may differ from user.email)
284
+ */
285
+ readonly provider_email: string;
286
+ /**
287
+ * Username on the OAuth provider platform
288
+ */
289
+ readonly provider_username: string;
290
+ };
291
+
292
+ /**
293
+ * Request to disconnect OAuth provider.
294
+ */
295
+ export type OAuthDisconnectRequestRequest = {
296
+ /**
297
+ * OAuth provider to disconnect
298
+ *
299
+ * * `github` - GitHub
300
+ */
301
+ provider: ProviderEnum;
302
+ };
303
+
304
+ /**
305
+ * Error response for OAuth endpoints.
306
+ */
307
+ export type OAuthError = {
308
+ /**
309
+ * Error code
310
+ */
311
+ error: string;
312
+ /**
313
+ * Human-readable error description
314
+ */
315
+ error_description?: string;
316
+ };
317
+
318
+ /**
319
+ * Response with available OAuth providers.
320
+ */
321
+ export type OAuthProvidersResponse = {
322
+ /**
323
+ * List of available OAuth providers
324
+ */
325
+ providers: Array<{
326
+ [key: string]: unknown;
327
+ }>;
328
+ };
329
+
330
+ /**
331
+ * Response with JWT tokens after OAuth authentication.
332
+ *
333
+ * When 2FA is required:
334
+ * - requires_2fa: True
335
+ * - session_id: UUID of 2FA verification session
336
+ * - access/refresh/user: null
337
+ *
338
+ * When 2FA is not required:
339
+ * - requires_2fa: False
340
+ * - session_id: null
341
+ * - access/refresh/user: populated
342
+ */
343
+ export type OAuthTokenResponse = {
344
+ /**
345
+ * JWT access token (null when requires_2fa=True)
346
+ */
347
+ access?: string | null;
348
+ /**
349
+ * True if a new OAuth connection was created
350
+ */
351
+ is_new_connection: boolean;
352
+ /**
353
+ * True if a new user was created during this OAuth flow
354
+ */
355
+ is_new_user: boolean;
356
+ /**
357
+ * JWT refresh token (null when requires_2fa=True)
358
+ */
359
+ refresh?: string | null;
360
+ /**
361
+ * True if 2FA verification is required
362
+ */
363
+ requires_2fa?: boolean;
364
+ /**
365
+ * 2FA session ID (only when requires_2fa=True)
366
+ */
367
+ session_id?: string | null;
368
+ /**
369
+ * True if user should be prompted to enable 2FA
370
+ */
371
+ should_prompt_2fa?: boolean;
372
+ /**
373
+ * Authenticated user info (null when requires_2fa=True)
374
+ */
375
+ user?: {
376
+ [key: string]: unknown;
377
+ } | null;
378
+ };
379
+
380
+ /**
381
+ * Typed error response for OTP operations.
382
+ *
383
+ * error_code values:
384
+ * - invalid_identifier — malformed email
385
+ * - cooldown — too soon after last request (retry_after = seconds)
386
+ * - hourly_limit — hourly quota exceeded (retry_after = seconds until reset)
387
+ * - daily_limit — daily quota exceeded (retry_after = seconds until reset)
388
+ * - rate_limited — IP-level rate limit hit (no retry_after)
389
+ * - user_creation_failed — internal error creating account
390
+ * - send_failed — transport error (email / SMS)
391
+ * - internal_error — unexpected server error
392
+ */
393
+ export type OtpErrorResponse = {
394
+ /**
395
+ * Human-readable error message
396
+ */
397
+ error: string;
398
+ /**
399
+ * Machine-readable error code
400
+ */
401
+ error_code?: string | null;
402
+ /**
403
+ * Seconds until the client may retry (present only for rate-limit errors)
404
+ */
405
+ retry_after?: number | null;
406
+ };
407
+
408
+ /**
409
+ * Serializer for OTP request.
410
+ */
411
+ export type OtpRequestRequest = {
412
+ /**
413
+ * Email address for OTP delivery
414
+ */
415
+ identifier: string;
416
+ /**
417
+ * Source URL for tracking registration (e.g., https://my.djangocfg.com)
418
+ */
419
+ source_url?: string;
420
+ };
421
+
422
+ /**
423
+ * OTP request response.
424
+ */
425
+ export type OtpRequestResponse = {
426
+ /**
427
+ * Success message
428
+ */
429
+ message: string;
430
+ };
431
+
432
+ /**
433
+ * Serializer for OTP verification.
434
+ */
435
+ export type OtpVerifyRequest = {
436
+ /**
437
+ * Email address used for OTP request
438
+ */
439
+ identifier: string;
440
+ otp: string;
441
+ /**
442
+ * Source URL for tracking login (e.g., https://my.djangocfg.com)
443
+ */
444
+ source_url?: string;
445
+ };
446
+
447
+ /**
448
+ * OTP verification response.
449
+ *
450
+ * When 2FA is required:
451
+ * - requires_2fa: True
452
+ * - session_id: UUID of 2FA verification session
453
+ * - refresh/access/user: null
454
+ *
455
+ * When 2FA is not required:
456
+ * - requires_2fa: False
457
+ * - session_id: null
458
+ * - refresh/access/user: populated
459
+ */
460
+ export type OtpVerifyResponse = {
461
+ /**
462
+ * JWT access token (if requires_2fa is False)
463
+ */
464
+ access?: string | null;
465
+ /**
466
+ * JWT refresh token (if requires_2fa is False)
467
+ */
468
+ refresh?: string | null;
469
+ /**
470
+ * Whether 2FA verification is required
471
+ */
472
+ requires_2fa?: boolean;
473
+ /**
474
+ * 2FA session ID (if requires_2fa is True)
475
+ */
476
+ session_id?: string | null;
477
+ /**
478
+ * Whether user should be prompted to enable 2FA
479
+ */
480
+ should_prompt_2fa?: boolean;
481
+ /**
482
+ * User information (if requires_2fa is False)
483
+ */
484
+ user?: User | null;
485
+ };
486
+
487
+ /**
488
+ * Serializer for updating user profile.
489
+ */
490
+ export type PatchedCfgUserUpdateRequest = {
491
+ company?: string;
492
+ first_name?: string;
493
+ language?: string;
494
+ last_name?: string;
495
+ phone?: string;
496
+ position?: string;
497
+ };
498
+
499
+ /**
500
+ * * `github` - GitHub
501
+ */
502
+ export enum ProviderEnum {
503
+ GITHUB = 'github'
504
+ }
505
+
506
+ /**
507
+ * Serializer for starting 2FA setup.
508
+ */
509
+ export type SetupRequest = {
510
+ /**
511
+ * Device name for identification (e.g., 'My iPhone')
512
+ */
513
+ device_name?: string;
514
+ };
515
+
516
+ /**
517
+ * Response serializer for setup initiation.
518
+ */
519
+ export type SetupResponse = {
520
+ /**
521
+ * Device ID to use for confirmation
522
+ */
523
+ device_id: string;
524
+ /**
525
+ * Seconds until setup expires (typically 600 = 10 minutes)
526
+ */
527
+ expires_in: number;
528
+ /**
529
+ * otpauth:// URI for QR code generation
530
+ */
531
+ provisioning_uri: string;
532
+ /**
533
+ * Base64-encoded QR code image (data URI)
534
+ */
535
+ qr_code_base64: string;
536
+ /**
537
+ * Base32-encoded TOTP secret (for manual entry)
538
+ */
539
+ secret: string;
540
+ };
541
+
542
+ export type TokenRefresh = {
543
+ readonly access: string;
544
+ refresh: string;
545
+ };
546
+
547
+ export type TokenRefreshRequest = {
548
+ refresh: string;
549
+ };
550
+
551
+ /**
552
+ * User data returned after 2FA verification.
553
+ */
554
+ export type TotpVerifyUser = {
555
+ readonly avatar: string | null;
556
+ company?: string;
557
+ readonly date_joined: string;
558
+ /**
559
+ * Get formatted username for display.
560
+ */
561
+ readonly display_username: string;
562
+ readonly email: string;
563
+ first_name?: string;
564
+ /**
565
+ * Get user's full name.
566
+ */
567
+ readonly full_name: string;
568
+ readonly id: number;
569
+ /**
570
+ * Get user's initials for avatar fallback.
571
+ */
572
+ readonly initials: string;
573
+ /**
574
+ * Staff status
575
+ *
576
+ * Designates whether the user can log into this admin site.
577
+ */
578
+ readonly is_staff: boolean;
579
+ /**
580
+ * Superuser status
581
+ *
582
+ * Designates that this user has all permissions without explicitly assigning them.
583
+ */
584
+ readonly is_superuser: boolean;
585
+ language?: string;
586
+ readonly last_login: string | null;
587
+ last_name?: string;
588
+ phone?: string;
589
+ position?: string;
590
+ readonly unanswered_messages_count: number;
591
+ };
592
+
593
+ /**
594
+ * Serializer for user details.
595
+ */
596
+ export type User = {
597
+ readonly avatar: string | null;
598
+ readonly centrifugo: CentrifugoToken | null;
599
+ company?: string;
600
+ readonly date_joined: string;
601
+ /**
602
+ * Get formatted username for display.
603
+ */
604
+ readonly display_username: string;
605
+ readonly email: string;
606
+ first_name?: string;
607
+ /**
608
+ * Get user's full name.
609
+ */
610
+ readonly full_name: string;
611
+ readonly id: number;
612
+ /**
613
+ * Get user's initials for avatar fallback.
614
+ */
615
+ readonly initials: string;
616
+ /**
617
+ * Staff status
618
+ *
619
+ * Designates whether the user can log into this admin site.
620
+ */
621
+ readonly is_staff: boolean;
622
+ /**
623
+ * Superuser status
624
+ *
625
+ * Designates that this user has all permissions without explicitly assigning them.
626
+ */
627
+ readonly is_superuser: boolean;
628
+ language?: string;
629
+ readonly last_login: string | null;
630
+ last_name?: string;
631
+ phone?: string;
632
+ position?: string;
633
+ readonly unanswered_messages_count: number;
634
+ };
635
+
636
+ /**
637
+ * Serializer for backup code verification during login.
638
+ */
639
+ export type VerifyBackupRequest = {
640
+ /**
641
+ * 8-character backup recovery code
642
+ */
643
+ backup_code: string;
644
+ /**
645
+ * 2FA session ID from login response
646
+ */
647
+ session_id: string;
648
+ };
649
+
650
+ /**
651
+ * Serializer for TOTP code verification during login.
652
+ */
653
+ export type VerifyRequest = {
654
+ /**
655
+ * 6-digit TOTP code from authenticator app
656
+ */
657
+ code: string;
658
+ /**
659
+ * 2FA session ID from login response
660
+ */
661
+ session_id: string;
662
+ };
663
+
664
+ /**
665
+ * Response serializer for successful 2FA verification.
666
+ */
667
+ export type VerifyResponse = {
668
+ /**
669
+ * JWT access token
670
+ */
671
+ access_token: string;
672
+ message: string;
673
+ /**
674
+ * JWT refresh token
675
+ */
676
+ refresh_token: string;
677
+ /**
678
+ * Number of remaining backup codes (if backup code was used)
679
+ */
680
+ remaining_backup_codes?: number;
681
+ /**
682
+ * User profile data
683
+ */
684
+ user: TotpVerifyUser;
685
+ /**
686
+ * Warning message (e.g., low backup codes)
687
+ */
688
+ warning?: string;
689
+ };
690
+
691
+ /**
692
+ * Response serializer for device list endpoint.
693
+ */
694
+ export type DeviceListResponseWritable = {
695
+ devices: Array<unknown>;
696
+ has_2fa_enabled: boolean;
697
+ };
698
+
699
+ /**
700
+ * OTP verification response.
701
+ *
702
+ * When 2FA is required:
703
+ * - requires_2fa: True
704
+ * - session_id: UUID of 2FA verification session
705
+ * - refresh/access/user: null
706
+ *
707
+ * When 2FA is not required:
708
+ * - requires_2fa: False
709
+ * - session_id: null
710
+ * - refresh/access/user: populated
711
+ */
712
+ export type OtpVerifyResponseWritable = {
713
+ /**
714
+ * JWT access token (if requires_2fa is False)
715
+ */
716
+ access?: string | null;
717
+ /**
718
+ * JWT refresh token (if requires_2fa is False)
719
+ */
720
+ refresh?: string | null;
721
+ /**
722
+ * Whether 2FA verification is required
723
+ */
724
+ requires_2fa?: boolean;
725
+ /**
726
+ * 2FA session ID (if requires_2fa is True)
727
+ */
728
+ session_id?: string | null;
729
+ /**
730
+ * Whether user should be prompted to enable 2FA
731
+ */
732
+ should_prompt_2fa?: boolean;
733
+ /**
734
+ * User information (if requires_2fa is False)
735
+ */
736
+ user?: UserWritable | null;
737
+ };
738
+
739
+ export type TokenRefreshWritable = {
740
+ refresh: string;
741
+ };
742
+
743
+ /**
744
+ * User data returned after 2FA verification.
745
+ */
746
+ export type TotpVerifyUserWritable = {
747
+ company?: string;
748
+ first_name?: string;
749
+ language?: string;
750
+ last_name?: string;
751
+ phone?: string;
752
+ position?: string;
753
+ };
754
+
755
+ /**
756
+ * Serializer for user details.
757
+ */
758
+ export type UserWritable = {
759
+ company?: string;
760
+ first_name?: string;
761
+ language?: string;
762
+ last_name?: string;
763
+ phone?: string;
764
+ position?: string;
765
+ };
766
+
767
+ /**
768
+ * Response serializer for successful 2FA verification.
769
+ */
770
+ export type VerifyResponseWritable = {
771
+ /**
772
+ * JWT access token
773
+ */
774
+ access_token: string;
775
+ message: string;
776
+ /**
777
+ * JWT refresh token
778
+ */
779
+ refresh_token: string;
780
+ /**
781
+ * Number of remaining backup codes (if backup code was used)
782
+ */
783
+ remaining_backup_codes?: number;
784
+ /**
785
+ * User profile data
786
+ */
787
+ user: TotpVerifyUserWritable;
788
+ /**
789
+ * Warning message (e.g., low backup codes)
790
+ */
791
+ warning?: string;
792
+ };
793
+
794
+ export type CfgAccountsOauthConnectionsListData = {
795
+ body?: never;
796
+ path?: never;
797
+ query?: never;
798
+ url: '/cfg/accounts/oauth/connections/';
799
+ };
800
+
801
+ export type CfgAccountsOauthConnectionsListResponses = {
802
+ 200: Array<OAuthConnection>;
803
+ };
804
+
805
+ export type CfgAccountsOauthConnectionsListResponse = CfgAccountsOauthConnectionsListResponses[keyof CfgAccountsOauthConnectionsListResponses];
806
+
807
+ export type CfgAccountsOauthDisconnectCreateData = {
808
+ body: OAuthDisconnectRequestRequest;
809
+ path?: never;
810
+ query?: never;
811
+ url: '/cfg/accounts/oauth/disconnect/';
812
+ };
813
+
814
+ export type CfgAccountsOauthDisconnectCreateErrors = {
815
+ 400: OAuthError;
816
+ 404: OAuthError;
817
+ };
818
+
819
+ export type CfgAccountsOauthDisconnectCreateError = CfgAccountsOauthDisconnectCreateErrors[keyof CfgAccountsOauthDisconnectCreateErrors];
820
+
821
+ export type CfgAccountsOauthDisconnectCreateResponses = {
822
+ 200: {
823
+ message?: string;
824
+ };
825
+ };
826
+
827
+ export type CfgAccountsOauthDisconnectCreateResponse = CfgAccountsOauthDisconnectCreateResponses[keyof CfgAccountsOauthDisconnectCreateResponses];
828
+
829
+ export type CfgAccountsOauthGithubAuthorizeCreateData = {
830
+ body?: OAuthAuthorizeRequestRequest;
831
+ path?: never;
832
+ query?: never;
833
+ url: '/cfg/accounts/oauth/github/authorize/';
834
+ };
835
+
836
+ export type CfgAccountsOauthGithubAuthorizeCreateErrors = {
837
+ 503: OAuthError;
838
+ };
839
+
840
+ export type CfgAccountsOauthGithubAuthorizeCreateError = CfgAccountsOauthGithubAuthorizeCreateErrors[keyof CfgAccountsOauthGithubAuthorizeCreateErrors];
841
+
842
+ export type CfgAccountsOauthGithubAuthorizeCreateResponses = {
843
+ 200: OAuthAuthorizeResponse;
844
+ };
845
+
846
+ export type CfgAccountsOauthGithubAuthorizeCreateResponse = CfgAccountsOauthGithubAuthorizeCreateResponses[keyof CfgAccountsOauthGithubAuthorizeCreateResponses];
847
+
848
+ export type CfgAccountsOauthGithubCallbackCreateData = {
849
+ body: OAuthCallbackRequestRequest;
850
+ path?: never;
851
+ query?: never;
852
+ url: '/cfg/accounts/oauth/github/callback/';
853
+ };
854
+
855
+ export type CfgAccountsOauthGithubCallbackCreateErrors = {
856
+ 400: OAuthError;
857
+ };
858
+
859
+ export type CfgAccountsOauthGithubCallbackCreateError = CfgAccountsOauthGithubCallbackCreateErrors[keyof CfgAccountsOauthGithubCallbackCreateErrors];
860
+
861
+ export type CfgAccountsOauthGithubCallbackCreateResponses = {
862
+ 200: OAuthTokenResponse;
863
+ };
864
+
865
+ export type CfgAccountsOauthGithubCallbackCreateResponse = CfgAccountsOauthGithubCallbackCreateResponses[keyof CfgAccountsOauthGithubCallbackCreateResponses];
866
+
867
+ export type CfgAccountsOauthProvidersRetrieveData = {
868
+ body?: never;
869
+ path?: never;
870
+ query?: never;
871
+ url: '/cfg/accounts/oauth/providers/';
872
+ };
873
+
874
+ export type CfgAccountsOauthProvidersRetrieveResponses = {
875
+ 200: OAuthProvidersResponse;
876
+ };
877
+
878
+ export type CfgAccountsOauthProvidersRetrieveResponse = CfgAccountsOauthProvidersRetrieveResponses[keyof CfgAccountsOauthProvidersRetrieveResponses];
879
+
880
+ export type CfgAccountsOtpRequestCreateData = {
881
+ body: OtpRequestRequest;
882
+ path?: never;
883
+ query?: never;
884
+ url: '/cfg/accounts/otp/request/';
885
+ };
886
+
887
+ export type CfgAccountsOtpRequestCreateErrors = {
888
+ 400: OtpErrorResponse;
889
+ 429: OtpErrorResponse;
890
+ 500: OtpErrorResponse;
891
+ };
892
+
893
+ export type CfgAccountsOtpRequestCreateError = CfgAccountsOtpRequestCreateErrors[keyof CfgAccountsOtpRequestCreateErrors];
894
+
895
+ export type CfgAccountsOtpRequestCreateResponses = {
896
+ 200: OtpRequestResponse;
897
+ };
898
+
899
+ export type CfgAccountsOtpRequestCreateResponse = CfgAccountsOtpRequestCreateResponses[keyof CfgAccountsOtpRequestCreateResponses];
900
+
901
+ export type CfgAccountsOtpVerifyCreateData = {
902
+ body: OtpVerifyRequest;
903
+ path?: never;
904
+ query?: never;
905
+ url: '/cfg/accounts/otp/verify/';
906
+ };
907
+
908
+ export type CfgAccountsOtpVerifyCreateErrors = {
909
+ 401: OtpErrorResponse;
910
+ 429: OtpErrorResponse;
911
+ };
912
+
913
+ export type CfgAccountsOtpVerifyCreateError = CfgAccountsOtpVerifyCreateErrors[keyof CfgAccountsOtpVerifyCreateErrors];
914
+
915
+ export type CfgAccountsOtpVerifyCreateResponses = {
916
+ 200: OtpVerifyResponse;
917
+ };
918
+
919
+ export type CfgAccountsOtpVerifyCreateResponse = CfgAccountsOtpVerifyCreateResponses[keyof CfgAccountsOtpVerifyCreateResponses];
920
+
921
+ export type CfgAccountsProfileRetrieveData = {
922
+ body?: never;
923
+ path?: never;
924
+ query?: never;
925
+ url: '/cfg/accounts/profile/';
926
+ };
927
+
928
+ export type CfgAccountsProfileRetrieveErrors = {
929
+ /**
930
+ * Authentication credentials were not provided.
931
+ */
932
+ 401: unknown;
933
+ };
934
+
935
+ export type CfgAccountsProfileRetrieveResponses = {
936
+ 200: User;
937
+ };
938
+
939
+ export type CfgAccountsProfileRetrieveResponse = CfgAccountsProfileRetrieveResponses[keyof CfgAccountsProfileRetrieveResponses];
940
+
941
+ export type CfgAccountsProfileAvatarCreateData = {
942
+ body?: {
943
+ /**
944
+ * Avatar image file (JPEG, PNG, GIF, WebP, max 5MB)
945
+ */
946
+ avatar: Blob | File;
947
+ };
948
+ path?: never;
949
+ query?: never;
950
+ url: '/cfg/accounts/profile/avatar/';
951
+ };
952
+
953
+ export type CfgAccountsProfileAvatarCreateErrors = {
954
+ /**
955
+ * Invalid file or validation error.
956
+ */
957
+ 400: unknown;
958
+ /**
959
+ * Authentication credentials were not provided.
960
+ */
961
+ 401: unknown;
962
+ };
963
+
964
+ export type CfgAccountsProfileAvatarCreateResponses = {
965
+ 200: User;
966
+ };
967
+
968
+ export type CfgAccountsProfileAvatarCreateResponse = CfgAccountsProfileAvatarCreateResponses[keyof CfgAccountsProfileAvatarCreateResponses];
969
+
970
+ export type CfgAccountsProfileDeleteCreateData = {
971
+ body?: never;
972
+ path?: never;
973
+ query?: never;
974
+ url: '/cfg/accounts/profile/delete/';
975
+ };
976
+
977
+ export type CfgAccountsProfileDeleteCreateErrors = {
978
+ /**
979
+ * Account is already deleted.
980
+ */
981
+ 400: unknown;
982
+ /**
983
+ * Authentication credentials were not provided.
984
+ */
985
+ 401: unknown;
986
+ };
987
+
988
+ export type CfgAccountsProfileDeleteCreateResponses = {
989
+ 200: AccountDeleteResponse;
990
+ };
991
+
992
+ export type CfgAccountsProfileDeleteCreateResponse = CfgAccountsProfileDeleteCreateResponses[keyof CfgAccountsProfileDeleteCreateResponses];
993
+
994
+ export type CfgAccountsProfilePartialPartialUpdateData = {
995
+ body?: PatchedCfgUserUpdateRequest;
996
+ path?: never;
997
+ query?: never;
998
+ url: '/cfg/accounts/profile/partial/';
999
+ };
1000
+
1001
+ export type CfgAccountsProfilePartialPartialUpdateErrors = {
1002
+ /**
1003
+ * Invalid data provided.
1004
+ */
1005
+ 400: unknown;
1006
+ /**
1007
+ * Authentication credentials were not provided.
1008
+ */
1009
+ 401: unknown;
1010
+ };
1011
+
1012
+ export type CfgAccountsProfilePartialPartialUpdateResponses = {
1013
+ 200: User;
1014
+ };
1015
+
1016
+ export type CfgAccountsProfilePartialPartialUpdateResponse = CfgAccountsProfilePartialPartialUpdateResponses[keyof CfgAccountsProfilePartialPartialUpdateResponses];
1017
+
1018
+ export type CfgAccountsProfilePartialUpdateData = {
1019
+ body?: CfgUserUpdateRequest;
1020
+ path?: never;
1021
+ query?: never;
1022
+ url: '/cfg/accounts/profile/partial/';
1023
+ };
1024
+
1025
+ export type CfgAccountsProfilePartialUpdateErrors = {
1026
+ /**
1027
+ * Invalid data provided.
1028
+ */
1029
+ 400: unknown;
1030
+ /**
1031
+ * Authentication credentials were not provided.
1032
+ */
1033
+ 401: unknown;
1034
+ };
1035
+
1036
+ export type CfgAccountsProfilePartialUpdateResponses = {
1037
+ 200: User;
1038
+ };
1039
+
1040
+ export type CfgAccountsProfilePartialUpdateResponse = CfgAccountsProfilePartialUpdateResponses[keyof CfgAccountsProfilePartialUpdateResponses];
1041
+
1042
+ export type CfgAccountsProfileUpdatePartialUpdateData = {
1043
+ body?: PatchedCfgUserUpdateRequest;
1044
+ path?: never;
1045
+ query?: never;
1046
+ url: '/cfg/accounts/profile/update/';
1047
+ };
1048
+
1049
+ export type CfgAccountsProfileUpdatePartialUpdateErrors = {
1050
+ /**
1051
+ * Invalid data provided.
1052
+ */
1053
+ 400: unknown;
1054
+ /**
1055
+ * Authentication credentials were not provided.
1056
+ */
1057
+ 401: unknown;
1058
+ };
1059
+
1060
+ export type CfgAccountsProfileUpdatePartialUpdateResponses = {
1061
+ 200: User;
1062
+ };
1063
+
1064
+ export type CfgAccountsProfileUpdatePartialUpdateResponse = CfgAccountsProfileUpdatePartialUpdateResponses[keyof CfgAccountsProfileUpdatePartialUpdateResponses];
1065
+
1066
+ export type CfgAccountsProfileUpdateUpdateData = {
1067
+ body?: CfgUserUpdateRequest;
1068
+ path?: never;
1069
+ query?: never;
1070
+ url: '/cfg/accounts/profile/update/';
1071
+ };
1072
+
1073
+ export type CfgAccountsProfileUpdateUpdateErrors = {
1074
+ /**
1075
+ * Invalid data provided.
1076
+ */
1077
+ 400: unknown;
1078
+ /**
1079
+ * Authentication credentials were not provided.
1080
+ */
1081
+ 401: unknown;
1082
+ };
1083
+
1084
+ export type CfgAccountsProfileUpdateUpdateResponses = {
1085
+ 200: User;
1086
+ };
1087
+
1088
+ export type CfgAccountsProfileUpdateUpdateResponse = CfgAccountsProfileUpdateUpdateResponses[keyof CfgAccountsProfileUpdateUpdateResponses];
1089
+
1090
+ export type CfgAccountsTokenRefreshCreateData = {
1091
+ body: TokenRefreshRequest;
1092
+ path?: never;
1093
+ query?: never;
1094
+ url: '/cfg/accounts/token/refresh/';
1095
+ };
1096
+
1097
+ export type CfgAccountsTokenRefreshCreateResponses = {
1098
+ 200: TokenRefresh;
1099
+ };
1100
+
1101
+ export type CfgAccountsTokenRefreshCreateResponse = CfgAccountsTokenRefreshCreateResponses[keyof CfgAccountsTokenRefreshCreateResponses];
1102
+
1103
+ export type CfgCentrifugoAuthTokenRetrieveData = {
1104
+ body?: never;
1105
+ path?: never;
1106
+ query?: never;
1107
+ url: '/cfg/centrifugo/auth/token/';
1108
+ };
1109
+
1110
+ export type CfgCentrifugoAuthTokenRetrieveErrors = {
1111
+ /**
1112
+ * Unauthorized - authentication required
1113
+ */
1114
+ 401: unknown;
1115
+ /**
1116
+ * Server error
1117
+ */
1118
+ 500: unknown;
1119
+ };
1120
+
1121
+ export type CfgCentrifugoAuthTokenRetrieveResponses = {
1122
+ 200: ConnectionTokenResponse;
1123
+ };
1124
+
1125
+ export type CfgCentrifugoAuthTokenRetrieveResponse = CfgCentrifugoAuthTokenRetrieveResponses[keyof CfgCentrifugoAuthTokenRetrieveResponses];
1126
+
1127
+ export type CfgTotpBackupCodesRetrieveData = {
1128
+ body?: never;
1129
+ path?: never;
1130
+ query?: never;
1131
+ url: '/cfg/totp/backup-codes/';
1132
+ };
1133
+
1134
+ export type CfgTotpBackupCodesRetrieveResponses = {
1135
+ 200: BackupCodesStatus;
1136
+ };
1137
+
1138
+ export type CfgTotpBackupCodesRetrieveResponse = CfgTotpBackupCodesRetrieveResponses[keyof CfgTotpBackupCodesRetrieveResponses];
1139
+
1140
+ export type CfgTotpBackupCodesRegenerateCreateData = {
1141
+ body: BackupCodesRegenerateRequest;
1142
+ path?: never;
1143
+ query?: never;
1144
+ url: '/cfg/totp/backup-codes/regenerate/';
1145
+ };
1146
+
1147
+ export type CfgTotpBackupCodesRegenerateCreateErrors = {
1148
+ /**
1149
+ * Invalid code or 2FA not enabled
1150
+ */
1151
+ 400: unknown;
1152
+ };
1153
+
1154
+ export type CfgTotpBackupCodesRegenerateCreateResponses = {
1155
+ 200: BackupCodesRegenerateResponse;
1156
+ };
1157
+
1158
+ export type CfgTotpBackupCodesRegenerateCreateResponse = CfgTotpBackupCodesRegenerateCreateResponses[keyof CfgTotpBackupCodesRegenerateCreateResponses];
1159
+
1160
+ export type CfgTotpDevicesRetrieveData = {
1161
+ body?: never;
1162
+ path?: never;
1163
+ query?: never;
1164
+ url: '/cfg/totp/devices/';
1165
+ };
1166
+
1167
+ export type CfgTotpDevicesRetrieveResponses = {
1168
+ 200: DeviceListResponse;
1169
+ };
1170
+
1171
+ export type CfgTotpDevicesRetrieveResponse = CfgTotpDevicesRetrieveResponses[keyof CfgTotpDevicesRetrieveResponses];
1172
+
1173
+ export type CfgTotpDevicesDestroyData = {
1174
+ body?: never;
1175
+ path: {
1176
+ id: string;
1177
+ };
1178
+ query?: never;
1179
+ url: '/cfg/totp/devices/{id}/';
1180
+ };
1181
+
1182
+ export type CfgTotpDevicesDestroyResponses = {
1183
+ /**
1184
+ * No response body
1185
+ */
1186
+ 204: void;
1187
+ };
1188
+
1189
+ export type CfgTotpDevicesDestroyResponse = CfgTotpDevicesDestroyResponses[keyof CfgTotpDevicesDestroyResponses];
1190
+
1191
+ export type CfgTotpDisableCreateData = {
1192
+ body: DisableRequest;
1193
+ path?: never;
1194
+ query?: never;
1195
+ url: '/cfg/totp/disable/';
1196
+ };
1197
+
1198
+ export type CfgTotpDisableCreateErrors = {
1199
+ /**
1200
+ * Invalid code
1201
+ */
1202
+ 400: unknown;
1203
+ };
1204
+
1205
+ export type CfgTotpDisableCreateResponses = {
1206
+ /**
1207
+ * 2FA disabled successfully
1208
+ */
1209
+ 200: unknown;
1210
+ };
1211
+
1212
+ export type CfgTotpSetupCreateData = {
1213
+ body?: SetupRequest;
1214
+ path?: never;
1215
+ query?: never;
1216
+ url: '/cfg/totp/setup/';
1217
+ };
1218
+
1219
+ export type CfgTotpSetupCreateErrors = {
1220
+ /**
1221
+ * 2FA already enabled or invalid request
1222
+ */
1223
+ 400: unknown;
1224
+ };
1225
+
1226
+ export type CfgTotpSetupCreateResponses = {
1227
+ 200: SetupResponse;
1228
+ };
1229
+
1230
+ export type CfgTotpSetupCreateResponse = CfgTotpSetupCreateResponses[keyof CfgTotpSetupCreateResponses];
1231
+
1232
+ export type CfgTotpSetupConfirmCreateData = {
1233
+ body: ConfirmSetupRequest;
1234
+ path?: never;
1235
+ query?: never;
1236
+ url: '/cfg/totp/setup/confirm/';
1237
+ };
1238
+
1239
+ export type CfgTotpSetupConfirmCreateErrors = {
1240
+ /**
1241
+ * Invalid code or setup expired
1242
+ */
1243
+ 400: unknown;
1244
+ };
1245
+
1246
+ export type CfgTotpSetupConfirmCreateResponses = {
1247
+ 200: ConfirmSetupResponse;
1248
+ };
1249
+
1250
+ export type CfgTotpSetupConfirmCreateResponse = CfgTotpSetupConfirmCreateResponses[keyof CfgTotpSetupConfirmCreateResponses];
1251
+
1252
+ export type CfgTotpVerifyCreateData = {
1253
+ body: VerifyRequest;
1254
+ path?: never;
1255
+ query?: never;
1256
+ url: '/cfg/totp/verify/';
1257
+ };
1258
+
1259
+ export type CfgTotpVerifyCreateErrors = {
1260
+ /**
1261
+ * Invalid code or session
1262
+ */
1263
+ 400: unknown;
1264
+ /**
1265
+ * Too many attempts
1266
+ */
1267
+ 403: unknown;
1268
+ };
1269
+
1270
+ export type CfgTotpVerifyCreateResponses = {
1271
+ 200: VerifyResponse;
1272
+ };
1273
+
1274
+ export type CfgTotpVerifyCreateResponse = CfgTotpVerifyCreateResponses[keyof CfgTotpVerifyCreateResponses];
1275
+
1276
+ export type CfgTotpVerifyBackupCreateData = {
1277
+ body: VerifyBackupRequest;
1278
+ path?: never;
1279
+ query?: never;
1280
+ url: '/cfg/totp/verify/backup/';
1281
+ };
1282
+
1283
+ export type CfgTotpVerifyBackupCreateErrors = {
1284
+ /**
1285
+ * Invalid backup code or session
1286
+ */
1287
+ 400: unknown;
1288
+ };
1289
+
1290
+ export type CfgTotpVerifyBackupCreateResponses = {
1291
+ 200: VerifyResponse;
1292
+ };
1293
+
1294
+ export type CfgTotpVerifyBackupCreateResponse = CfgTotpVerifyBackupCreateResponses[keyof CfgTotpVerifyBackupCreateResponses];