@djangocfg/api 2.1.321 → 2.1.327

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 (293) hide show
  1. package/dist/auth-server.cjs +4265 -1169
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +4265 -1159
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +4150 -3053
  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 +4139 -3042
  10. package/dist/auth.mjs.map +1 -1
  11. package/dist/clients.cjs +3932 -4031
  12. package/dist/clients.cjs.map +1 -1
  13. package/dist/clients.d.cts +2408 -2671
  14. package/dist/clients.d.ts +2408 -2671
  15. package/dist/clients.mjs +3945 -4038
  16. package/dist/clients.mjs.map +1 -1
  17. package/dist/index.cjs +4214 -2713
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +2758 -1828
  20. package/dist/index.d.ts +2758 -1828
  21. package/dist/index.mjs +4183 -2676
  22. package/dist/index.mjs.map +1 -1
  23. package/package.json +2 -7
  24. package/src/_api/generated/_shared/errors.ts +70 -0
  25. package/src/_api/generated/_shared/index.ts +25 -0
  26. package/src/_api/generated/_shared/logger.ts +123 -0
  27. package/src/_api/generated/_shared/storage.ts +83 -0
  28. package/src/_api/generated/_shared/validation-events.ts +52 -0
  29. package/src/_api/generated/cfg_accounts/api.ts +187 -0
  30. package/src/_api/generated/cfg_accounts/client/client.gen.ts +280 -0
  31. package/src/_api/generated/cfg_accounts/client/index.ts +25 -0
  32. package/src/_api/generated/cfg_accounts/client/types.gen.ts +217 -0
  33. package/src/_api/generated/cfg_accounts/client/utils.gen.ts +318 -0
  34. package/src/_api/generated/cfg_accounts/client.gen.ts +16 -0
  35. package/src/_api/generated/cfg_accounts/core/auth.gen.ts +41 -0
  36. package/src/_api/generated/cfg_accounts/core/bodySerializer.gen.ts +82 -0
  37. package/src/_api/generated/cfg_accounts/core/params.gen.ts +169 -0
  38. package/src/_api/generated/cfg_accounts/core/pathSerializer.gen.ts +171 -0
  39. package/src/_api/generated/cfg_accounts/core/queryKeySerializer.gen.ts +117 -0
  40. package/src/_api/generated/cfg_accounts/core/serverSentEvents.gen.ts +242 -0
  41. package/src/_api/generated/cfg_accounts/core/types.gen.ts +104 -0
  42. package/src/_api/generated/cfg_accounts/core/utils.gen.ts +140 -0
  43. package/src/_api/generated/cfg_accounts/events.ts +198 -0
  44. package/src/_api/generated/cfg_accounts/hooks/index.ts +18 -0
  45. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +26 -0
  46. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthDisconnectCreate.ts +24 -0
  47. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthGithubAuthorizeCreate.ts +24 -0
  48. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthGithubCallbackCreate.ts +24 -0
  49. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +26 -0
  50. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOtpRequestCreate.ts +24 -0
  51. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOtpVerifyCreate.ts +24 -0
  52. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileAvatarCreate.ts +24 -0
  53. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileDeleteCreate.ts +24 -0
  54. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfilePartialPartialUpdate.ts +24 -0
  55. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfilePartialUpdate.ts +24 -0
  56. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +26 -0
  57. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileUpdatePartialUpdate.ts +24 -0
  58. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileUpdateUpdate.ts +24 -0
  59. package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsTokenRefreshCreate.ts +24 -0
  60. package/src/_api/generated/cfg_accounts/index.ts +26 -335
  61. package/src/_api/generated/cfg_accounts/schemas/AccountDeleteResponse.ts +12 -0
  62. package/src/_api/generated/cfg_accounts/schemas/CentrifugoToken.ts +14 -0
  63. package/src/_api/generated/cfg_accounts/schemas/CfgUserUpdateRequest.ts +16 -0
  64. package/src/_api/generated/cfg_accounts/schemas/OAuthAuthorizeRequestRequest.ts +12 -0
  65. package/src/_api/generated/cfg_accounts/schemas/OAuthAuthorizeResponse.ts +12 -0
  66. package/src/_api/generated/cfg_accounts/schemas/OAuthCallbackRequestRequest.ts +13 -0
  67. package/src/_api/generated/cfg_accounts/schemas/OAuthConnection.ts +19 -0
  68. package/src/_api/generated/cfg_accounts/schemas/OAuthDisconnectRequestRequest.ts +12 -0
  69. package/src/_api/generated/cfg_accounts/schemas/OAuthError.ts +12 -0
  70. package/src/_api/generated/cfg_accounts/schemas/OAuthProvidersResponse.ts +11 -0
  71. package/src/_api/generated/cfg_accounts/schemas/OAuthTokenResponse.ts +18 -0
  72. package/src/_api/generated/cfg_accounts/schemas/OTPErrorResponse.ts +13 -0
  73. package/src/_api/generated/cfg_accounts/schemas/OTPRequestRequest.ts +12 -0
  74. package/src/_api/generated/cfg_accounts/schemas/OTPRequestResponse.ts +11 -0
  75. package/src/_api/generated/cfg_accounts/schemas/OTPVerifyRequest.ts +13 -0
  76. package/src/_api/generated/cfg_accounts/schemas/OTPVerifyResponse.ts +17 -0
  77. package/src/_api/generated/cfg_accounts/schemas/PatchedCfgUserUpdateRequest.ts +16 -0
  78. package/src/_api/generated/cfg_accounts/schemas/ProviderEnum.ts +9 -0
  79. package/src/_api/generated/cfg_accounts/schemas/TokenRefresh.ts +12 -0
  80. package/src/_api/generated/cfg_accounts/schemas/TokenRefreshRequest.ts +11 -0
  81. package/src/_api/generated/cfg_accounts/{_utils/schemas/User.schema.ts → schemas/User.ts} +8 -16
  82. package/src/_api/generated/cfg_accounts/schemas/index.ts +24 -0
  83. package/src/_api/generated/cfg_accounts/sdk.gen.ts +796 -0
  84. package/src/_api/generated/cfg_accounts/types.gen.ts +764 -0
  85. package/src/_api/generated/cfg_centrifugo/api.ts +164 -0
  86. package/src/_api/generated/cfg_centrifugo/client/client.gen.ts +280 -0
  87. package/src/_api/generated/cfg_centrifugo/client/index.ts +25 -0
  88. package/src/_api/generated/cfg_centrifugo/client/types.gen.ts +217 -0
  89. package/src/_api/generated/cfg_centrifugo/client/utils.gen.ts +318 -0
  90. package/src/_api/generated/cfg_centrifugo/client.gen.ts +16 -0
  91. package/src/_api/generated/cfg_centrifugo/core/auth.gen.ts +41 -0
  92. package/src/_api/generated/cfg_centrifugo/core/bodySerializer.gen.ts +82 -0
  93. package/src/_api/generated/cfg_centrifugo/core/params.gen.ts +169 -0
  94. package/src/_api/generated/cfg_centrifugo/core/pathSerializer.gen.ts +171 -0
  95. package/src/_api/generated/cfg_centrifugo/core/queryKeySerializer.gen.ts +117 -0
  96. package/src/_api/generated/cfg_centrifugo/core/serverSentEvents.gen.ts +242 -0
  97. package/src/_api/generated/cfg_centrifugo/core/types.gen.ts +104 -0
  98. package/src/_api/generated/cfg_centrifugo/core/utils.gen.ts +140 -0
  99. package/src/_api/generated/cfg_centrifugo/events.ts +198 -0
  100. package/src/_api/generated/cfg_centrifugo/hooks/index.ts +4 -0
  101. package/src/_api/generated/cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +26 -0
  102. package/src/_api/generated/cfg_centrifugo/index.ts +26 -313
  103. package/src/_api/generated/cfg_centrifugo/schemas/ConnectionTokenResponse.ts +14 -0
  104. package/src/_api/generated/cfg_centrifugo/schemas/index.ts +4 -0
  105. package/src/_api/generated/cfg_centrifugo/sdk.gen.ts +64 -0
  106. package/src/_api/generated/cfg_centrifugo/types.gen.ts +61 -0
  107. package/src/_api/generated/cfg_totp/api.ts +181 -0
  108. package/src/_api/generated/cfg_totp/client/client.gen.ts +280 -0
  109. package/src/_api/generated/cfg_totp/client/index.ts +25 -0
  110. package/src/_api/generated/cfg_totp/client/types.gen.ts +217 -0
  111. package/src/_api/generated/cfg_totp/client/utils.gen.ts +318 -0
  112. package/src/_api/generated/cfg_totp/client.gen.ts +16 -0
  113. package/src/_api/generated/cfg_totp/core/auth.gen.ts +41 -0
  114. package/src/_api/generated/cfg_totp/core/bodySerializer.gen.ts +82 -0
  115. package/src/_api/generated/cfg_totp/core/params.gen.ts +169 -0
  116. package/src/_api/generated/cfg_totp/core/pathSerializer.gen.ts +171 -0
  117. package/src/_api/generated/cfg_totp/core/queryKeySerializer.gen.ts +117 -0
  118. package/src/_api/generated/cfg_totp/core/serverSentEvents.gen.ts +242 -0
  119. package/src/_api/generated/cfg_totp/core/types.gen.ts +104 -0
  120. package/src/_api/generated/cfg_totp/core/utils.gen.ts +140 -0
  121. package/src/_api/generated/cfg_totp/events.ts +198 -0
  122. package/src/_api/generated/cfg_totp/hooks/index.ts +12 -0
  123. package/src/_api/generated/cfg_totp/hooks/useCfgTotpBackupCodesRegenerateCreate.ts +24 -0
  124. package/src/_api/generated/cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +26 -0
  125. package/src/_api/generated/cfg_totp/hooks/useCfgTotpDevicesDestroy.ts +24 -0
  126. package/src/_api/generated/cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +26 -0
  127. package/src/_api/generated/cfg_totp/hooks/useCfgTotpDisableCreate.ts +24 -0
  128. package/src/_api/generated/cfg_totp/hooks/useCfgTotpSetupConfirmCreate.ts +24 -0
  129. package/src/_api/generated/cfg_totp/hooks/useCfgTotpSetupCreate.ts +24 -0
  130. package/src/_api/generated/cfg_totp/hooks/useCfgTotpVerifyBackupCreate.ts +24 -0
  131. package/src/_api/generated/cfg_totp/hooks/useCfgTotpVerifyCreate.ts +24 -0
  132. package/src/_api/generated/cfg_totp/index.ts +26 -342
  133. package/src/_api/generated/cfg_totp/schemas/BackupCodesRegenerateRequest.ts +11 -0
  134. package/src/_api/generated/cfg_totp/schemas/BackupCodesRegenerateResponse.ts +12 -0
  135. package/src/_api/generated/cfg_totp/schemas/BackupCodesStatus.ts +13 -0
  136. package/src/_api/generated/cfg_totp/schemas/ConfirmSetupRequest.ts +12 -0
  137. package/src/_api/generated/cfg_totp/schemas/ConfirmSetupResponse.ts +13 -0
  138. package/src/_api/generated/cfg_totp/schemas/DeviceList.ts +18 -0
  139. package/src/_api/generated/cfg_totp/schemas/DeviceListResponse.ts +13 -0
  140. package/src/_api/generated/cfg_totp/schemas/DeviceListStatusEnum.ts +9 -0
  141. package/src/_api/generated/cfg_totp/schemas/DisableRequest.ts +11 -0
  142. package/src/_api/generated/cfg_totp/schemas/SetupRequest.ts +11 -0
  143. package/src/_api/generated/cfg_totp/schemas/SetupResponse.ts +15 -0
  144. package/src/_api/generated/cfg_totp/{_utils/schemas/TotpVerifyUser.schema.ts → schemas/TotpVerifyUser.ts} +7 -15
  145. package/src/_api/generated/cfg_totp/schemas/VerifyBackupRequest.ts +12 -0
  146. package/src/_api/generated/cfg_totp/schemas/VerifyRequest.ts +12 -0
  147. package/src/_api/generated/cfg_totp/schemas/VerifyResponse.ts +17 -0
  148. package/src/_api/generated/cfg_totp/schemas/index.ts +18 -0
  149. package/src/_api/generated/cfg_totp/sdk.gen.ts +432 -0
  150. package/src/_api/generated/cfg_totp/types.gen.ts +479 -0
  151. package/src/_api/generated/index.ts +30 -0
  152. package/src/_api/index.ts +5 -23
  153. package/src/auth/context/AccountsContext.tsx +58 -89
  154. package/src/auth/context/AuthContext.tsx +3 -3
  155. package/src/auth/context/index.ts +2 -2
  156. package/src/auth/hooks/useDeleteAccount.ts +2 -1
  157. package/src/auth/hooks/useGithubAuth.ts +12 -11
  158. package/src/auth/hooks/useTokenRefresh.ts +6 -4
  159. package/src/auth/hooks/useTwoFactor.ts +14 -8
  160. package/src/auth/hooks/useTwoFactorSetup.ts +8 -5
  161. package/src/auth/hooks/useTwoFactorStatus.ts +3 -2
  162. package/src/auth/middlewares/tokenRefresh.ts +6 -4
  163. package/src/clients.ts +14 -51
  164. package/src/index.ts +15 -57
  165. package/src/server.ts +25 -23
  166. package/src/_api/BaseClient.ts +0 -22
  167. package/src/_api/generated/cfg_accounts/CLAUDE.md +0 -86
  168. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts.ts +0 -154
  169. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__auth.ts +0 -95
  170. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__oauth.ts +0 -285
  171. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +0 -440
  172. package/src/_api/generated/cfg_accounts/_utils/fetchers/index.ts +0 -33
  173. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts.ts +0 -64
  174. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__auth.ts +0 -44
  175. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__oauth.ts +0 -114
  176. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +0 -152
  177. package/src/_api/generated/cfg_accounts/_utils/hooks/index.ts +0 -33
  178. package/src/_api/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts +0 -20
  179. package/src/_api/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts +0 -22
  180. package/src/_api/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts +0 -15
  181. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts +0 -20
  182. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts +0 -20
  183. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts +0 -21
  184. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts +0 -27
  185. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts +0 -20
  186. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts +0 -20
  187. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts +0 -19
  188. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts +0 -46
  189. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts +0 -41
  190. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts +0 -20
  191. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts +0 -19
  192. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts +0 -21
  193. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts +0 -45
  194. package/src/_api/generated/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts +0 -24
  195. package/src/_api/generated/cfg_accounts/_utils/schemas/TokenRefresh.schema.ts +0 -16
  196. package/src/_api/generated/cfg_accounts/_utils/schemas/TokenRefreshRequest.schema.ts +0 -15
  197. package/src/_api/generated/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts +0 -24
  198. package/src/_api/generated/cfg_accounts/_utils/schemas/index.ts +0 -41
  199. package/src/_api/generated/cfg_accounts/accounts/client.ts +0 -34
  200. package/src/_api/generated/cfg_accounts/accounts/index.ts +0 -4
  201. package/src/_api/generated/cfg_accounts/accounts/models.ts +0 -127
  202. package/src/_api/generated/cfg_accounts/accounts__auth/client.ts +0 -23
  203. package/src/_api/generated/cfg_accounts/accounts__auth/index.ts +0 -4
  204. package/src/_api/generated/cfg_accounts/accounts__auth/models.ts +0 -19
  205. package/src/_api/generated/cfg_accounts/accounts__oauth/client.ts +0 -67
  206. package/src/_api/generated/cfg_accounts/accounts__oauth/index.ts +0 -4
  207. package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +0 -127
  208. package/src/_api/generated/cfg_accounts/accounts__user_profile/client.ts +0 -94
  209. package/src/_api/generated/cfg_accounts/accounts__user_profile/index.ts +0 -4
  210. package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +0 -98
  211. package/src/_api/generated/cfg_accounts/api-instance.ts +0 -181
  212. package/src/_api/generated/cfg_accounts/client.ts +0 -339
  213. package/src/_api/generated/cfg_accounts/enums.ts +0 -10
  214. package/src/_api/generated/cfg_accounts/errors.ts +0 -123
  215. package/src/_api/generated/cfg_accounts/http.ts +0 -160
  216. package/src/_api/generated/cfg_accounts/logger.ts +0 -261
  217. package/src/_api/generated/cfg_accounts/retry.ts +0 -177
  218. package/src/_api/generated/cfg_accounts/schema.json +0 -1576
  219. package/src/_api/generated/cfg_accounts/storage.ts +0 -163
  220. package/src/_api/generated/cfg_accounts/validation-events.ts +0 -135
  221. package/src/_api/generated/cfg_centrifugo/CLAUDE.md +0 -60
  222. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts +0 -94
  223. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/index.ts +0 -30
  224. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts +0 -39
  225. package/src/_api/generated/cfg_centrifugo/_utils/hooks/index.ts +0 -30
  226. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts +0 -22
  227. package/src/_api/generated/cfg_centrifugo/_utils/schemas/index.ts +0 -21
  228. package/src/_api/generated/cfg_centrifugo/api-instance.ts +0 -181
  229. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts +0 -27
  230. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/index.ts +0 -4
  231. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/models.ts +0 -18
  232. package/src/_api/generated/cfg_centrifugo/client.ts +0 -330
  233. package/src/_api/generated/cfg_centrifugo/errors.ts +0 -123
  234. package/src/_api/generated/cfg_centrifugo/http.ts +0 -160
  235. package/src/_api/generated/cfg_centrifugo/logger.ts +0 -261
  236. package/src/_api/generated/cfg_centrifugo/retry.ts +0 -177
  237. package/src/_api/generated/cfg_centrifugo/schema.json +0 -118
  238. package/src/_api/generated/cfg_centrifugo/storage.ts +0 -163
  239. package/src/_api/generated/cfg_centrifugo/validation-events.ts +0 -135
  240. package/src/_api/generated/cfg_totp/CLAUDE.md +0 -83
  241. package/src/_api/generated/cfg_totp/_utils/fetchers/index.ts +0 -34
  242. package/src/_api/generated/cfg_totp/_utils/fetchers/totp.ts +0 -50
  243. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__backup_codes.ts +0 -153
  244. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts +0 -109
  245. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_setup.ts +0 -154
  246. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_verification.ts +0 -153
  247. package/src/_api/generated/cfg_totp/_utils/hooks/index.ts +0 -34
  248. package/src/_api/generated/cfg_totp/_utils/hooks/totp.ts +0 -43
  249. package/src/_api/generated/cfg_totp/_utils/hooks/totp__backup_codes.ts +0 -60
  250. package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_management.ts +0 -59
  251. package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_setup.ts +0 -64
  252. package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_verification.ts +0 -63
  253. package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts +0 -19
  254. package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts +0 -20
  255. package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts +0 -21
  256. package/src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts +0 -20
  257. package/src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts +0 -21
  258. package/src/_api/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts +0 -26
  259. package/src/_api/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts +0 -21
  260. package/src/_api/generated/cfg_totp/_utils/schemas/DisableRequest.schema.ts +0 -19
  261. package/src/_api/generated/cfg_totp/_utils/schemas/SetupRequest.schema.ts +0 -19
  262. package/src/_api/generated/cfg_totp/_utils/schemas/SetupResponse.schema.ts +0 -23
  263. package/src/_api/generated/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts +0 -20
  264. package/src/_api/generated/cfg_totp/_utils/schemas/VerifyRequest.schema.ts +0 -20
  265. package/src/_api/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts +0 -25
  266. package/src/_api/generated/cfg_totp/_utils/schemas/index.ts +0 -34
  267. package/src/_api/generated/cfg_totp/api-instance.ts +0 -181
  268. package/src/_api/generated/cfg_totp/client.ts +0 -342
  269. package/src/_api/generated/cfg_totp/enums.ts +0 -13
  270. package/src/_api/generated/cfg_totp/errors.ts +0 -123
  271. package/src/_api/generated/cfg_totp/http.ts +0 -160
  272. package/src/_api/generated/cfg_totp/logger.ts +0 -261
  273. package/src/_api/generated/cfg_totp/retry.ts +0 -177
  274. package/src/_api/generated/cfg_totp/schema.json +0 -910
  275. package/src/_api/generated/cfg_totp/storage.ts +0 -163
  276. package/src/_api/generated/cfg_totp/totp/client.ts +0 -24
  277. package/src/_api/generated/cfg_totp/totp/index.ts +0 -4
  278. package/src/_api/generated/cfg_totp/totp/models.ts +0 -4
  279. package/src/_api/generated/cfg_totp/totp__backup_codes/client.ts +0 -32
  280. package/src/_api/generated/cfg_totp/totp__backup_codes/index.ts +0 -4
  281. package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +0 -38
  282. package/src/_api/generated/cfg_totp/totp__totp_management/client.ts +0 -31
  283. package/src/_api/generated/cfg_totp/totp__totp_management/index.ts +0 -4
  284. package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +0 -46
  285. package/src/_api/generated/cfg_totp/totp__totp_setup/client.ts +0 -33
  286. package/src/_api/generated/cfg_totp/totp__totp_setup/index.ts +0 -4
  287. package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +0 -55
  288. package/src/_api/generated/cfg_totp/totp__totp_verification/client.ts +0 -33
  289. package/src/_api/generated/cfg_totp/totp__totp_verification/index.ts +0 -4
  290. package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +0 -74
  291. package/src/_api/generated/cfg_totp/validation-events.ts +0 -135
  292. package/src/hooks/accounts.ts +0 -8
  293. package/src/hooks/index.ts +0 -10
@@ -1,910 +0,0 @@
1
- {
2
- "openapi": "3.1.0",
3
- "info": {
4
- "title": "Django CFG API",
5
- "version": "1.0.0",
6
- "description": "Complete API documentation for Django CFG Demo Project",
7
- "x-django-metadata": {
8
- "group": "cfg_totp",
9
- "apps": [
10
- "django_cfg_totp"
11
- ],
12
- "generator": "django-client",
13
- "generator_version": "1.0.0"
14
- }
15
- },
16
- "paths": {
17
- "/cfg/totp/backup-codes/": {
18
- "get": {
19
- "operationId": "cfg_totp_backup_codes_retrieve",
20
- "description": "Get backup codes status for user.",
21
- "tags": [
22
- "Backup Codes"
23
- ],
24
- "security": [
25
- {
26
- "jwtAuthWithLastLogin": []
27
- }
28
- ],
29
- "responses": {
30
- "200": {
31
- "content": {
32
- "application/json": {
33
- "schema": {
34
- "$ref": "#/components/schemas/BackupCodesStatus"
35
- }
36
- }
37
- },
38
- "description": ""
39
- }
40
- },
41
- "x-async-capable": false
42
- }
43
- },
44
- "/cfg/totp/backup-codes/regenerate/": {
45
- "post": {
46
- "operationId": "cfg_totp_backup_codes_regenerate_create",
47
- "description": "Regenerate backup codes.\n\nRequires TOTP code for verification.\nInvalidates all existing codes.",
48
- "tags": [
49
- "Backup Codes"
50
- ],
51
- "requestBody": {
52
- "content": {
53
- "application/json": {
54
- "schema": {
55
- "$ref": "#/components/schemas/BackupCodesRegenerateRequest"
56
- }
57
- },
58
- "application/x-www-form-urlencoded": {
59
- "schema": {
60
- "$ref": "#/components/schemas/BackupCodesRegenerateRequest"
61
- }
62
- },
63
- "multipart/form-data": {
64
- "schema": {
65
- "$ref": "#/components/schemas/BackupCodesRegenerateRequest"
66
- }
67
- }
68
- },
69
- "required": true
70
- },
71
- "security": [
72
- {
73
- "jwtAuthWithLastLogin": []
74
- }
75
- ],
76
- "responses": {
77
- "200": {
78
- "content": {
79
- "application/json": {
80
- "schema": {
81
- "$ref": "#/components/schemas/BackupCodesRegenerateResponse"
82
- }
83
- }
84
- },
85
- "description": ""
86
- },
87
- "400": {
88
- "content": {
89
- "application/json": {
90
- "schema": {
91
- "description": "Invalid code or 2FA not enabled"
92
- }
93
- }
94
- },
95
- "description": ""
96
- }
97
- },
98
- "x-async-capable": false
99
- }
100
- },
101
- "/cfg/totp/devices/": {
102
- "get": {
103
- "operationId": "cfg_totp_devices_retrieve",
104
- "description": "List all TOTP devices for user.",
105
- "tags": [
106
- "TOTP Management"
107
- ],
108
- "security": [
109
- {
110
- "jwtAuthWithLastLogin": []
111
- }
112
- ],
113
- "responses": {
114
- "200": {
115
- "content": {
116
- "application/json": {
117
- "schema": {
118
- "$ref": "#/components/schemas/DeviceListResponse"
119
- }
120
- }
121
- },
122
- "description": ""
123
- }
124
- },
125
- "x-async-capable": false
126
- }
127
- },
128
- "/cfg/totp/devices/{id}/": {
129
- "delete": {
130
- "operationId": "cfg_totp_devices_destroy",
131
- "description": "Delete a TOTP device.\n\nRequires verification code if removing the last/primary device.",
132
- "parameters": [
133
- {
134
- "in": "path",
135
- "name": "id",
136
- "schema": {
137
- "type": "string",
138
- "format": "uuid"
139
- },
140
- "required": true
141
- }
142
- ],
143
- "tags": [
144
- "totp"
145
- ],
146
- "security": [
147
- {
148
- "jwtAuthWithLastLogin": []
149
- }
150
- ],
151
- "responses": {
152
- "204": {
153
- "description": "No response body"
154
- }
155
- },
156
- "x-async-capable": false
157
- }
158
- },
159
- "/cfg/totp/disable/": {
160
- "post": {
161
- "operationId": "cfg_totp_disable_create",
162
- "description": "Completely disable 2FA for account.\n\nRequires verification code.",
163
- "tags": [
164
- "TOTP Management"
165
- ],
166
- "requestBody": {
167
- "content": {
168
- "application/json": {
169
- "schema": {
170
- "$ref": "#/components/schemas/DisableRequest"
171
- }
172
- },
173
- "application/x-www-form-urlencoded": {
174
- "schema": {
175
- "$ref": "#/components/schemas/DisableRequest"
176
- }
177
- },
178
- "multipart/form-data": {
179
- "schema": {
180
- "$ref": "#/components/schemas/DisableRequest"
181
- }
182
- }
183
- },
184
- "required": true
185
- },
186
- "security": [
187
- {
188
- "jwtAuthWithLastLogin": []
189
- }
190
- ],
191
- "responses": {
192
- "200": {
193
- "content": {
194
- "application/json": {
195
- "schema": {
196
- "description": "2FA disabled successfully"
197
- }
198
- }
199
- },
200
- "description": ""
201
- },
202
- "400": {
203
- "content": {
204
- "application/json": {
205
- "schema": {
206
- "description": "Invalid code"
207
- }
208
- }
209
- },
210
- "description": ""
211
- }
212
- },
213
- "x-async-capable": false
214
- }
215
- },
216
- "/cfg/totp/setup/": {
217
- "post": {
218
- "operationId": "cfg_totp_setup_create",
219
- "description": "Start 2FA setup process.\n\nCreates a new TOTP device and returns QR code for scanning.",
220
- "tags": [
221
- "TOTP Setup"
222
- ],
223
- "requestBody": {
224
- "content": {
225
- "application/json": {
226
- "schema": {
227
- "$ref": "#/components/schemas/SetupRequest"
228
- }
229
- },
230
- "application/x-www-form-urlencoded": {
231
- "schema": {
232
- "$ref": "#/components/schemas/SetupRequest"
233
- }
234
- },
235
- "multipart/form-data": {
236
- "schema": {
237
- "$ref": "#/components/schemas/SetupRequest"
238
- }
239
- }
240
- }
241
- },
242
- "security": [
243
- {
244
- "jwtAuthWithLastLogin": []
245
- }
246
- ],
247
- "responses": {
248
- "200": {
249
- "content": {
250
- "application/json": {
251
- "schema": {
252
- "$ref": "#/components/schemas/SetupResponse"
253
- }
254
- }
255
- },
256
- "description": ""
257
- },
258
- "400": {
259
- "content": {
260
- "application/json": {
261
- "schema": {
262
- "description": "2FA already enabled or invalid request"
263
- }
264
- }
265
- },
266
- "description": ""
267
- }
268
- },
269
- "x-async-capable": false
270
- }
271
- },
272
- "/cfg/totp/setup/confirm/": {
273
- "post": {
274
- "operationId": "cfg_totp_setup_confirm_create",
275
- "description": "Confirm 2FA setup with first valid code.\n\nActivates the device and generates backup codes.",
276
- "tags": [
277
- "TOTP Setup"
278
- ],
279
- "requestBody": {
280
- "content": {
281
- "application/json": {
282
- "schema": {
283
- "$ref": "#/components/schemas/ConfirmSetupRequest"
284
- }
285
- },
286
- "application/x-www-form-urlencoded": {
287
- "schema": {
288
- "$ref": "#/components/schemas/ConfirmSetupRequest"
289
- }
290
- },
291
- "multipart/form-data": {
292
- "schema": {
293
- "$ref": "#/components/schemas/ConfirmSetupRequest"
294
- }
295
- }
296
- },
297
- "required": true
298
- },
299
- "security": [
300
- {
301
- "jwtAuthWithLastLogin": []
302
- }
303
- ],
304
- "responses": {
305
- "200": {
306
- "content": {
307
- "application/json": {
308
- "schema": {
309
- "$ref": "#/components/schemas/ConfirmSetupResponse"
310
- }
311
- }
312
- },
313
- "description": ""
314
- },
315
- "400": {
316
- "content": {
317
- "application/json": {
318
- "schema": {
319
- "description": "Invalid code or setup expired"
320
- }
321
- }
322
- },
323
- "description": ""
324
- }
325
- },
326
- "x-async-capable": false
327
- }
328
- },
329
- "/cfg/totp/verify/": {
330
- "post": {
331
- "operationId": "cfg_totp_verify_create",
332
- "description": "Verify TOTP code for 2FA session.\n\nCompletes authentication and returns JWT tokens on success.",
333
- "tags": [
334
- "TOTP Verification"
335
- ],
336
- "requestBody": {
337
- "content": {
338
- "application/json": {
339
- "schema": {
340
- "$ref": "#/components/schemas/VerifyRequest"
341
- }
342
- },
343
- "application/x-www-form-urlencoded": {
344
- "schema": {
345
- "$ref": "#/components/schemas/VerifyRequest"
346
- }
347
- },
348
- "multipart/form-data": {
349
- "schema": {
350
- "$ref": "#/components/schemas/VerifyRequest"
351
- }
352
- }
353
- },
354
- "required": true
355
- },
356
- "security": [
357
- {
358
- "jwtAuthWithLastLogin": []
359
- },
360
- {}
361
- ],
362
- "responses": {
363
- "200": {
364
- "content": {
365
- "application/json": {
366
- "schema": {
367
- "$ref": "#/components/schemas/VerifyResponse"
368
- }
369
- }
370
- },
371
- "description": ""
372
- },
373
- "400": {
374
- "content": {
375
- "application/json": {
376
- "schema": {
377
- "description": "Invalid code or session"
378
- }
379
- }
380
- },
381
- "description": ""
382
- },
383
- "403": {
384
- "content": {
385
- "application/json": {
386
- "schema": {
387
- "description": "Too many attempts"
388
- }
389
- }
390
- },
391
- "description": ""
392
- }
393
- },
394
- "x-async-capable": false
395
- }
396
- },
397
- "/cfg/totp/verify/backup/": {
398
- "post": {
399
- "operationId": "cfg_totp_verify_backup_create",
400
- "description": "Verify backup recovery code for 2FA session.\n\nAlternative verification method when TOTP device unavailable.",
401
- "tags": [
402
- "TOTP Verification"
403
- ],
404
- "requestBody": {
405
- "content": {
406
- "application/json": {
407
- "schema": {
408
- "$ref": "#/components/schemas/VerifyBackupRequest"
409
- }
410
- },
411
- "application/x-www-form-urlencoded": {
412
- "schema": {
413
- "$ref": "#/components/schemas/VerifyBackupRequest"
414
- }
415
- },
416
- "multipart/form-data": {
417
- "schema": {
418
- "$ref": "#/components/schemas/VerifyBackupRequest"
419
- }
420
- }
421
- },
422
- "required": true
423
- },
424
- "security": [
425
- {
426
- "jwtAuthWithLastLogin": []
427
- },
428
- {}
429
- ],
430
- "responses": {
431
- "200": {
432
- "content": {
433
- "application/json": {
434
- "schema": {
435
- "$ref": "#/components/schemas/VerifyResponse"
436
- }
437
- }
438
- },
439
- "description": ""
440
- },
441
- "400": {
442
- "content": {
443
- "application/json": {
444
- "schema": {
445
- "description": "Invalid backup code or session"
446
- }
447
- }
448
- },
449
- "description": ""
450
- }
451
- },
452
- "x-async-capable": false
453
- }
454
- }
455
- },
456
- "components": {
457
- "schemas": {
458
- "BackupCodesRegenerateRequest": {
459
- "type": "object",
460
- "description": "Serializer for regenerating backup codes.",
461
- "properties": {
462
- "code": {
463
- "type": "string",
464
- "minLength": 6,
465
- "description": "TOTP code for verification",
466
- "maxLength": 6
467
- }
468
- },
469
- "required": [
470
- "code"
471
- ]
472
- },
473
- "BackupCodesRegenerateResponse": {
474
- "type": "object",
475
- "description": "Response serializer for backup codes regeneration.",
476
- "properties": {
477
- "backup_codes": {
478
- "type": "array",
479
- "items": {
480
- "type": "string"
481
- },
482
- "description": "List of new backup codes (save these!)"
483
- },
484
- "warning": {
485
- "type": "string",
486
- "description": "Warning about previous codes being invalidated"
487
- }
488
- },
489
- "required": [
490
- "backup_codes",
491
- "warning"
492
- ]
493
- },
494
- "BackupCodesStatus": {
495
- "type": "object",
496
- "description": "Serializer for backup codes status.",
497
- "properties": {
498
- "remaining_count": {
499
- "type": "integer",
500
- "description": "Number of unused backup codes"
501
- },
502
- "total_generated": {
503
- "type": "integer",
504
- "description": "Total number of codes generated"
505
- },
506
- "warning": {
507
- "type": [
508
- "string",
509
- "null"
510
- ],
511
- "description": "Warning if running low on codes"
512
- }
513
- },
514
- "required": [
515
- "remaining_count",
516
- "total_generated"
517
- ]
518
- },
519
- "ConfirmSetupRequest": {
520
- "type": "object",
521
- "description": "Serializer for confirming 2FA setup with first code.",
522
- "properties": {
523
- "device_id": {
524
- "type": "string",
525
- "format": "uuid",
526
- "description": "Device ID from setup response"
527
- },
528
- "code": {
529
- "type": "string",
530
- "minLength": 6,
531
- "description": "6-digit TOTP code from authenticator app",
532
- "maxLength": 6
533
- }
534
- },
535
- "required": [
536
- "code",
537
- "device_id"
538
- ]
539
- },
540
- "ConfirmSetupResponse": {
541
- "type": "object",
542
- "description": "Response serializer for setup confirmation.",
543
- "properties": {
544
- "message": {
545
- "type": "string"
546
- },
547
- "backup_codes": {
548
- "type": "array",
549
- "items": {
550
- "type": "string"
551
- },
552
- "description": "List of backup recovery codes (save these!)"
553
- },
554
- "backup_codes_warning": {
555
- "type": "string",
556
- "description": "Warning message about backup codes"
557
- }
558
- },
559
- "required": [
560
- "backup_codes",
561
- "backup_codes_warning",
562
- "message"
563
- ]
564
- },
565
- "DeviceList": {
566
- "type": "object",
567
- "description": "Serializer for listing TOTP devices.",
568
- "properties": {
569
- "id": {
570
- "type": "string",
571
- "format": "uuid",
572
- "readOnly": true
573
- },
574
- "name": {
575
- "type": "string",
576
- "readOnly": true,
577
- "description": "Device name for identification"
578
- },
579
- "is_primary": {
580
- "type": "boolean",
581
- "readOnly": true,
582
- "description": "Primary device used for verification"
583
- },
584
- "status": {
585
- "enum": [
586
- "pending",
587
- "active",
588
- "disabled"
589
- ],
590
- "type": "string",
591
- "description": "* `pending` - Pending Confirmation\n* `active` - Active\n* `disabled` - Disabled",
592
- "x-spec-enum-id": "c058383a5a3854d4",
593
- "readOnly": true
594
- },
595
- "created_at": {
596
- "type": "string",
597
- "format": "date-time",
598
- "readOnly": true
599
- },
600
- "confirmed_at": {
601
- "type": [
602
- "string",
603
- "null"
604
- ],
605
- "format": "date-time",
606
- "readOnly": true,
607
- "description": "When device setup was confirmed"
608
- },
609
- "last_used_at": {
610
- "type": [
611
- "string",
612
- "null"
613
- ],
614
- "format": "date-time",
615
- "readOnly": true,
616
- "description": "Last successful verification"
617
- }
618
- },
619
- "required": [
620
- "confirmed_at",
621
- "created_at",
622
- "id",
623
- "is_primary",
624
- "last_used_at",
625
- "name",
626
- "status"
627
- ]
628
- },
629
- "DeviceListResponse": {
630
- "type": "object",
631
- "description": "Response serializer for device list endpoint.",
632
- "properties": {
633
- "devices": {
634
- "type": "array",
635
- "items": {
636
- "$ref": "#/components/schemas/DeviceList"
637
- }
638
- },
639
- "has_2fa_enabled": {
640
- "type": "boolean"
641
- }
642
- },
643
- "required": [
644
- "devices",
645
- "has_2fa_enabled"
646
- ]
647
- },
648
- "DisableRequest": {
649
- "type": "object",
650
- "description": "Serializer for completely disabling 2FA.",
651
- "properties": {
652
- "code": {
653
- "type": "string",
654
- "minLength": 6,
655
- "description": "TOTP code for verification",
656
- "maxLength": 6
657
- }
658
- },
659
- "required": [
660
- "code"
661
- ]
662
- },
663
- "SetupRequest": {
664
- "type": "object",
665
- "description": "Serializer for starting 2FA setup.",
666
- "properties": {
667
- "device_name": {
668
- "type": "string",
669
- "minLength": 1,
670
- "default": "Authenticator",
671
- "description": "Device name for identification (e.g., 'My iPhone')",
672
- "maxLength": 100
673
- }
674
- }
675
- },
676
- "SetupResponse": {
677
- "type": "object",
678
- "description": "Response serializer for setup initiation.",
679
- "properties": {
680
- "device_id": {
681
- "type": "string",
682
- "format": "uuid",
683
- "description": "Device ID to use for confirmation"
684
- },
685
- "secret": {
686
- "type": "string",
687
- "description": "Base32-encoded TOTP secret (for manual entry)"
688
- },
689
- "provisioning_uri": {
690
- "type": "string",
691
- "description": "otpauth:// URI for QR code generation"
692
- },
693
- "qr_code_base64": {
694
- "type": "string",
695
- "description": "Base64-encoded QR code image (data URI)"
696
- },
697
- "expires_in": {
698
- "type": "integer",
699
- "description": "Seconds until setup expires (typically 600 = 10 minutes)"
700
- }
701
- },
702
- "required": [
703
- "device_id",
704
- "expires_in",
705
- "provisioning_uri",
706
- "qr_code_base64",
707
- "secret"
708
- ]
709
- },
710
- "TotpVerifyUser": {
711
- "type": "object",
712
- "description": "User data returned after 2FA verification.",
713
- "properties": {
714
- "id": {
715
- "type": "integer",
716
- "readOnly": true
717
- },
718
- "email": {
719
- "type": "string",
720
- "format": "email",
721
- "readOnly": true
722
- },
723
- "first_name": {
724
- "type": "string",
725
- "maxLength": 50
726
- },
727
- "last_name": {
728
- "type": "string",
729
- "maxLength": 50
730
- },
731
- "full_name": {
732
- "type": "string",
733
- "description": "Get user's full name.",
734
- "readOnly": true
735
- },
736
- "initials": {
737
- "type": "string",
738
- "description": "Get user's initials for avatar fallback.",
739
- "readOnly": true
740
- },
741
- "display_username": {
742
- "type": "string",
743
- "description": "Get formatted username for display.",
744
- "readOnly": true
745
- },
746
- "company": {
747
- "type": "string",
748
- "maxLength": 100
749
- },
750
- "phone": {
751
- "type": "string",
752
- "maxLength": 20
753
- },
754
- "position": {
755
- "type": "string",
756
- "maxLength": 100
757
- },
758
- "language": {
759
- "type": "string",
760
- "maxLength": 10
761
- },
762
- "avatar": {
763
- "type": [
764
- "string",
765
- "null"
766
- ],
767
- "format": "uri",
768
- "readOnly": true
769
- },
770
- "is_staff": {
771
- "type": "boolean",
772
- "readOnly": true,
773
- "title": "Staff status",
774
- "description": "Designates whether the user can log into this admin site."
775
- },
776
- "is_superuser": {
777
- "type": "boolean",
778
- "readOnly": true,
779
- "title": "Superuser status",
780
- "description": "Designates that this user has all permissions without explicitly assigning them."
781
- },
782
- "date_joined": {
783
- "type": "string",
784
- "format": "date-time",
785
- "readOnly": true
786
- },
787
- "last_login": {
788
- "type": [
789
- "string",
790
- "null"
791
- ],
792
- "format": "date-time",
793
- "readOnly": true
794
- },
795
- "unanswered_messages_count": {
796
- "type": "integer",
797
- "readOnly": true,
798
- "default": 0
799
- }
800
- },
801
- "required": [
802
- "avatar",
803
- "date_joined",
804
- "display_username",
805
- "email",
806
- "full_name",
807
- "id",
808
- "initials",
809
- "is_staff",
810
- "is_superuser",
811
- "last_login",
812
- "unanswered_messages_count"
813
- ]
814
- },
815
- "VerifyBackupRequest": {
816
- "type": "object",
817
- "description": "Serializer for backup code verification during login.",
818
- "properties": {
819
- "session_id": {
820
- "type": "string",
821
- "format": "uuid",
822
- "description": "2FA session ID from login response"
823
- },
824
- "backup_code": {
825
- "type": "string",
826
- "minLength": 8,
827
- "description": "8-character backup recovery code",
828
- "maxLength": 8
829
- }
830
- },
831
- "required": [
832
- "backup_code",
833
- "session_id"
834
- ]
835
- },
836
- "VerifyRequest": {
837
- "type": "object",
838
- "description": "Serializer for TOTP code verification during login.",
839
- "properties": {
840
- "session_id": {
841
- "type": "string",
842
- "format": "uuid",
843
- "description": "2FA session ID from login response"
844
- },
845
- "code": {
846
- "type": "string",
847
- "minLength": 6,
848
- "description": "6-digit TOTP code from authenticator app",
849
- "maxLength": 6
850
- }
851
- },
852
- "required": [
853
- "code",
854
- "session_id"
855
- ]
856
- },
857
- "VerifyResponse": {
858
- "type": "object",
859
- "description": "Response serializer for successful 2FA verification.",
860
- "properties": {
861
- "message": {
862
- "type": "string"
863
- },
864
- "access_token": {
865
- "type": "string",
866
- "description": "JWT access token"
867
- },
868
- "refresh_token": {
869
- "type": "string",
870
- "description": "JWT refresh token"
871
- },
872
- "user": {
873
- "allOf": [
874
- {
875
- "$ref": "#/components/schemas/TotpVerifyUser"
876
- }
877
- ],
878
- "description": "User profile data"
879
- },
880
- "remaining_backup_codes": {
881
- "type": "integer",
882
- "description": "Number of remaining backup codes (if backup code was used)"
883
- },
884
- "warning": {
885
- "type": "string",
886
- "description": "Warning message (e.g., low backup codes)"
887
- }
888
- },
889
- "required": [
890
- "access_token",
891
- "message",
892
- "refresh_token",
893
- "user"
894
- ]
895
- }
896
- },
897
- "securitySchemes": {
898
- "jwtAuthWithLastLogin": {
899
- "type": "http",
900
- "scheme": "bearer",
901
- "bearerFormat": "JWT"
902
- }
903
- }
904
- },
905
- "servers": [
906
- {
907
- "url": "http://localhost:8000"
908
- }
909
- ]
910
- }