@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
@@ -0,0 +1,796 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client';
4
+ import { client } from './client.gen';
5
+ import type { CfgAccountsOauthConnectionsListData, CfgAccountsOauthConnectionsListResponses, CfgAccountsOauthDisconnectCreateData, CfgAccountsOauthDisconnectCreateErrors, CfgAccountsOauthDisconnectCreateResponses, CfgAccountsOauthGithubAuthorizeCreateData, CfgAccountsOauthGithubAuthorizeCreateErrors, CfgAccountsOauthGithubAuthorizeCreateResponses, CfgAccountsOauthGithubCallbackCreateData, CfgAccountsOauthGithubCallbackCreateErrors, CfgAccountsOauthGithubCallbackCreateResponses, CfgAccountsOauthProvidersRetrieveData, CfgAccountsOauthProvidersRetrieveResponses, CfgAccountsOtpRequestCreateData, CfgAccountsOtpRequestCreateErrors, CfgAccountsOtpRequestCreateResponses, CfgAccountsOtpVerifyCreateData, CfgAccountsOtpVerifyCreateErrors, CfgAccountsOtpVerifyCreateResponses, CfgAccountsProfileAvatarCreateData, CfgAccountsProfileAvatarCreateErrors, CfgAccountsProfileAvatarCreateResponses, CfgAccountsProfileDeleteCreateData, CfgAccountsProfileDeleteCreateErrors, CfgAccountsProfileDeleteCreateResponses, CfgAccountsProfilePartialPartialUpdateData, CfgAccountsProfilePartialPartialUpdateErrors, CfgAccountsProfilePartialPartialUpdateResponses, CfgAccountsProfilePartialUpdateData, CfgAccountsProfilePartialUpdateErrors, CfgAccountsProfilePartialUpdateResponses, CfgAccountsProfileRetrieveData, CfgAccountsProfileRetrieveErrors, CfgAccountsProfileRetrieveResponses, CfgAccountsProfileUpdatePartialUpdateData, CfgAccountsProfileUpdatePartialUpdateErrors, CfgAccountsProfileUpdatePartialUpdateResponses, CfgAccountsProfileUpdateUpdateData, CfgAccountsProfileUpdateUpdateErrors, CfgAccountsProfileUpdateUpdateResponses, CfgAccountsTokenRefreshCreateData, CfgAccountsTokenRefreshCreateResponses } from './types.gen';
6
+
7
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
8
+ /**
9
+ * You can provide a client instance returned by `createClient()` instead of
10
+ * individual options. This might be also useful if you want to implement a
11
+ * custom client.
12
+ */
13
+ client?: Client;
14
+ /**
15
+ * You can pass arbitrary values through the `meta` object. This can be
16
+ * used to access values that aren't defined as part of the SDK function.
17
+ */
18
+ meta?: Record<string, unknown>;
19
+ };
20
+
21
+ export class Cfg {
22
+ /**
23
+ * List OAuth connections
24
+ *
25
+ * Get all OAuth connections for the current user.
26
+ */
27
+ public static cfgAccountsOauthConnectionsList<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthConnectionsListData, ThrowOnError>) {
28
+ return (options?.client ?? client).get<CfgAccountsOauthConnectionsListResponses, unknown, ThrowOnError>({
29
+ security: [{ scheme: 'bearer', type: 'http' }],
30
+ url: '/cfg/accounts/oauth/connections/',
31
+ ...options
32
+ });
33
+ }
34
+
35
+ /**
36
+ * Disconnect OAuth provider
37
+ *
38
+ * Remove OAuth connection for the specified provider.
39
+ */
40
+ public static cfgAccountsOauthDisconnectCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthDisconnectCreateData, ThrowOnError>) {
41
+ return (options.client ?? client).post<CfgAccountsOauthDisconnectCreateResponses, CfgAccountsOauthDisconnectCreateErrors, ThrowOnError>({
42
+ security: [{ scheme: 'bearer', type: 'http' }],
43
+ url: '/cfg/accounts/oauth/disconnect/',
44
+ ...options,
45
+ headers: {
46
+ 'Content-Type': 'application/json',
47
+ ...options.headers
48
+ }
49
+ });
50
+ }
51
+
52
+ /**
53
+ * Start GitHub OAuth
54
+ *
55
+ * Generate GitHub OAuth authorization URL. Redirect user to this URL to start authentication.
56
+ */
57
+ public static cfgAccountsOauthGithubAuthorizeCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthGithubAuthorizeCreateData, ThrowOnError>) {
58
+ return (options?.client ?? client).post<CfgAccountsOauthGithubAuthorizeCreateResponses, CfgAccountsOauthGithubAuthorizeCreateErrors, ThrowOnError>({
59
+ url: '/cfg/accounts/oauth/github/authorize/',
60
+ ...options,
61
+ headers: {
62
+ 'Content-Type': 'application/json',
63
+ ...options?.headers
64
+ }
65
+ });
66
+ }
67
+
68
+ /**
69
+ * Complete GitHub OAuth
70
+ *
71
+ * Exchange authorization code for JWT tokens. Call this after GitHub redirects back with code.
72
+ */
73
+ public static cfgAccountsOauthGithubCallbackCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthGithubCallbackCreateData, ThrowOnError>) {
74
+ return (options.client ?? client).post<CfgAccountsOauthGithubCallbackCreateResponses, CfgAccountsOauthGithubCallbackCreateErrors, ThrowOnError>({
75
+ url: '/cfg/accounts/oauth/github/callback/',
76
+ ...options,
77
+ headers: {
78
+ 'Content-Type': 'application/json',
79
+ ...options.headers
80
+ }
81
+ });
82
+ }
83
+
84
+ /**
85
+ * List OAuth providers
86
+ *
87
+ * Get list of available OAuth providers for authentication.
88
+ */
89
+ public static cfgAccountsOauthProvidersRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthProvidersRetrieveData, ThrowOnError>) {
90
+ return (options?.client ?? client).get<CfgAccountsOauthProvidersRetrieveResponses, unknown, ThrowOnError>({ url: '/cfg/accounts/oauth/providers/', ...options });
91
+ }
92
+
93
+ /**
94
+ * Request OTP code to email.
95
+ */
96
+ public static cfgAccountsOtpRequestCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOtpRequestCreateData, ThrowOnError>) {
97
+ return (options.client ?? client).post<CfgAccountsOtpRequestCreateResponses, CfgAccountsOtpRequestCreateErrors, ThrowOnError>({
98
+ security: [{ scheme: 'bearer', type: 'http' }],
99
+ url: '/cfg/accounts/otp/request/',
100
+ ...options,
101
+ headers: {
102
+ 'Content-Type': 'application/json',
103
+ ...options.headers
104
+ }
105
+ });
106
+ }
107
+
108
+ /**
109
+ * Verify OTP code and return JWT tokens or 2FA session.
110
+ *
111
+ * If user has 2FA enabled:
112
+ * - Returns requires_2fa=True with session_id
113
+ * - Client must complete 2FA verification at /cfg/totp/verify/
114
+ *
115
+ * If user has no 2FA:
116
+ * - Returns JWT tokens and user data directly
117
+ */
118
+ public static cfgAccountsOtpVerifyCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOtpVerifyCreateData, ThrowOnError>) {
119
+ return (options.client ?? client).post<CfgAccountsOtpVerifyCreateResponses, CfgAccountsOtpVerifyCreateErrors, ThrowOnError>({
120
+ security: [{ scheme: 'bearer', type: 'http' }],
121
+ url: '/cfg/accounts/otp/verify/',
122
+ ...options,
123
+ headers: {
124
+ 'Content-Type': 'application/json',
125
+ ...options.headers
126
+ }
127
+ });
128
+ }
129
+
130
+ /**
131
+ * Get current user profile
132
+ *
133
+ * Retrieve the current authenticated user's profile information.
134
+ */
135
+ public static cfgAccountsProfileRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileRetrieveData, ThrowOnError>) {
136
+ return (options?.client ?? client).get<CfgAccountsProfileRetrieveResponses, CfgAccountsProfileRetrieveErrors, ThrowOnError>({
137
+ security: [{ scheme: 'bearer', type: 'http' }, {
138
+ in: 'cookie',
139
+ name: 'sessionid',
140
+ type: 'apiKey'
141
+ }],
142
+ url: '/cfg/accounts/profile/',
143
+ ...options
144
+ });
145
+ }
146
+
147
+ /**
148
+ * Upload user avatar
149
+ *
150
+ * Upload avatar image for the current authenticated user. Accepts multipart/form-data with 'avatar' field.
151
+ */
152
+ public static cfgAccountsProfileAvatarCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileAvatarCreateData, ThrowOnError>) {
153
+ return (options?.client ?? client).post<CfgAccountsProfileAvatarCreateResponses, CfgAccountsProfileAvatarCreateErrors, ThrowOnError>({
154
+ ...formDataBodySerializer,
155
+ security: [{ scheme: 'bearer', type: 'http' }],
156
+ url: '/cfg/accounts/profile/avatar/',
157
+ ...options,
158
+ headers: {
159
+ 'Content-Type': null,
160
+ ...options?.headers
161
+ }
162
+ });
163
+ }
164
+
165
+ /**
166
+ * Delete user account
167
+ *
168
+ *
169
+ * Permanently delete the current user's account.
170
+ *
171
+ * This operation:
172
+ * - Deactivates the account (user cannot log in)
173
+ * - Anonymizes personal data (GDPR compliance)
174
+ * - Frees up the email address for re-registration
175
+ * - Preserves audit trail
176
+ *
177
+ * The account can be restored by an administrator if needed.
178
+ *
179
+ */
180
+ public static cfgAccountsProfileDeleteCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileDeleteCreateData, ThrowOnError>) {
181
+ return (options?.client ?? client).post<CfgAccountsProfileDeleteCreateResponses, CfgAccountsProfileDeleteCreateErrors, ThrowOnError>({
182
+ security: [{ scheme: 'bearer', type: 'http' }, {
183
+ in: 'cookie',
184
+ name: 'sessionid',
185
+ type: 'apiKey'
186
+ }],
187
+ url: '/cfg/accounts/profile/delete/',
188
+ ...options
189
+ });
190
+ }
191
+
192
+ /**
193
+ * Partial update user profile
194
+ *
195
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
196
+ */
197
+ public static cfgAccountsProfilePartialPartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialPartialUpdateData, ThrowOnError>) {
198
+ return (options?.client ?? client).patch<CfgAccountsProfilePartialPartialUpdateResponses, CfgAccountsProfilePartialPartialUpdateErrors, ThrowOnError>({
199
+ security: [{ scheme: 'bearer', type: 'http' }, {
200
+ in: 'cookie',
201
+ name: 'sessionid',
202
+ type: 'apiKey'
203
+ }],
204
+ url: '/cfg/accounts/profile/partial/',
205
+ ...options,
206
+ headers: {
207
+ 'Content-Type': 'application/json',
208
+ ...options?.headers
209
+ }
210
+ });
211
+ }
212
+
213
+ /**
214
+ * Partial update user profile
215
+ *
216
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
217
+ */
218
+ public static cfgAccountsProfilePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialUpdateData, ThrowOnError>) {
219
+ return (options?.client ?? client).put<CfgAccountsProfilePartialUpdateResponses, CfgAccountsProfilePartialUpdateErrors, ThrowOnError>({
220
+ security: [{ scheme: 'bearer', type: 'http' }, {
221
+ in: 'cookie',
222
+ name: 'sessionid',
223
+ type: 'apiKey'
224
+ }],
225
+ url: '/cfg/accounts/profile/partial/',
226
+ ...options,
227
+ headers: {
228
+ 'Content-Type': 'application/json',
229
+ ...options?.headers
230
+ }
231
+ });
232
+ }
233
+
234
+ /**
235
+ * Update user profile
236
+ *
237
+ * Update the current authenticated user's profile information.
238
+ */
239
+ public static cfgAccountsProfileUpdatePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdatePartialUpdateData, ThrowOnError>) {
240
+ return (options?.client ?? client).patch<CfgAccountsProfileUpdatePartialUpdateResponses, CfgAccountsProfileUpdatePartialUpdateErrors, ThrowOnError>({
241
+ security: [{ scheme: 'bearer', type: 'http' }, {
242
+ in: 'cookie',
243
+ name: 'sessionid',
244
+ type: 'apiKey'
245
+ }],
246
+ url: '/cfg/accounts/profile/update/',
247
+ ...options,
248
+ headers: {
249
+ 'Content-Type': 'application/json',
250
+ ...options?.headers
251
+ }
252
+ });
253
+ }
254
+
255
+ /**
256
+ * Update user profile
257
+ *
258
+ * Update the current authenticated user's profile information.
259
+ */
260
+ public static cfgAccountsProfileUpdateUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdateUpdateData, ThrowOnError>) {
261
+ return (options?.client ?? client).put<CfgAccountsProfileUpdateUpdateResponses, CfgAccountsProfileUpdateUpdateErrors, ThrowOnError>({
262
+ security: [{ scheme: 'bearer', type: 'http' }, {
263
+ in: 'cookie',
264
+ name: 'sessionid',
265
+ type: 'apiKey'
266
+ }],
267
+ url: '/cfg/accounts/profile/update/',
268
+ ...options,
269
+ headers: {
270
+ 'Content-Type': 'application/json',
271
+ ...options?.headers
272
+ }
273
+ });
274
+ }
275
+
276
+ /**
277
+ * Refresh JWT token.
278
+ */
279
+ public static cfgAccountsTokenRefreshCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsTokenRefreshCreateData, ThrowOnError>) {
280
+ return (options.client ?? client).post<CfgAccountsTokenRefreshCreateResponses, unknown, ThrowOnError>({
281
+ url: '/cfg/accounts/token/refresh/',
282
+ ...options,
283
+ headers: {
284
+ 'Content-Type': 'application/json',
285
+ ...options.headers
286
+ }
287
+ });
288
+ }
289
+ }
290
+
291
+ export class Accounts {
292
+ /**
293
+ * List OAuth connections
294
+ *
295
+ * Get all OAuth connections for the current user.
296
+ */
297
+ public static cfgAccountsOauthConnectionsList<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthConnectionsListData, ThrowOnError>) {
298
+ return (options?.client ?? client).get<CfgAccountsOauthConnectionsListResponses, unknown, ThrowOnError>({
299
+ security: [{ scheme: 'bearer', type: 'http' }],
300
+ url: '/cfg/accounts/oauth/connections/',
301
+ ...options
302
+ });
303
+ }
304
+
305
+ /**
306
+ * Disconnect OAuth provider
307
+ *
308
+ * Remove OAuth connection for the specified provider.
309
+ */
310
+ public static cfgAccountsOauthDisconnectCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthDisconnectCreateData, ThrowOnError>) {
311
+ return (options.client ?? client).post<CfgAccountsOauthDisconnectCreateResponses, CfgAccountsOauthDisconnectCreateErrors, ThrowOnError>({
312
+ security: [{ scheme: 'bearer', type: 'http' }],
313
+ url: '/cfg/accounts/oauth/disconnect/',
314
+ ...options,
315
+ headers: {
316
+ 'Content-Type': 'application/json',
317
+ ...options.headers
318
+ }
319
+ });
320
+ }
321
+
322
+ /**
323
+ * Start GitHub OAuth
324
+ *
325
+ * Generate GitHub OAuth authorization URL. Redirect user to this URL to start authentication.
326
+ */
327
+ public static cfgAccountsOauthGithubAuthorizeCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthGithubAuthorizeCreateData, ThrowOnError>) {
328
+ return (options?.client ?? client).post<CfgAccountsOauthGithubAuthorizeCreateResponses, CfgAccountsOauthGithubAuthorizeCreateErrors, ThrowOnError>({
329
+ url: '/cfg/accounts/oauth/github/authorize/',
330
+ ...options,
331
+ headers: {
332
+ 'Content-Type': 'application/json',
333
+ ...options?.headers
334
+ }
335
+ });
336
+ }
337
+
338
+ /**
339
+ * Complete GitHub OAuth
340
+ *
341
+ * Exchange authorization code for JWT tokens. Call this after GitHub redirects back with code.
342
+ */
343
+ public static cfgAccountsOauthGithubCallbackCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthGithubCallbackCreateData, ThrowOnError>) {
344
+ return (options.client ?? client).post<CfgAccountsOauthGithubCallbackCreateResponses, CfgAccountsOauthGithubCallbackCreateErrors, ThrowOnError>({
345
+ url: '/cfg/accounts/oauth/github/callback/',
346
+ ...options,
347
+ headers: {
348
+ 'Content-Type': 'application/json',
349
+ ...options.headers
350
+ }
351
+ });
352
+ }
353
+
354
+ /**
355
+ * List OAuth providers
356
+ *
357
+ * Get list of available OAuth providers for authentication.
358
+ */
359
+ public static cfgAccountsOauthProvidersRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthProvidersRetrieveData, ThrowOnError>) {
360
+ return (options?.client ?? client).get<CfgAccountsOauthProvidersRetrieveResponses, unknown, ThrowOnError>({ url: '/cfg/accounts/oauth/providers/', ...options });
361
+ }
362
+
363
+ /**
364
+ * Request OTP code to email.
365
+ */
366
+ public static cfgAccountsOtpRequestCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOtpRequestCreateData, ThrowOnError>) {
367
+ return (options.client ?? client).post<CfgAccountsOtpRequestCreateResponses, CfgAccountsOtpRequestCreateErrors, ThrowOnError>({
368
+ security: [{ scheme: 'bearer', type: 'http' }],
369
+ url: '/cfg/accounts/otp/request/',
370
+ ...options,
371
+ headers: {
372
+ 'Content-Type': 'application/json',
373
+ ...options.headers
374
+ }
375
+ });
376
+ }
377
+
378
+ /**
379
+ * Verify OTP code and return JWT tokens or 2FA session.
380
+ *
381
+ * If user has 2FA enabled:
382
+ * - Returns requires_2fa=True with session_id
383
+ * - Client must complete 2FA verification at /cfg/totp/verify/
384
+ *
385
+ * If user has no 2FA:
386
+ * - Returns JWT tokens and user data directly
387
+ */
388
+ public static cfgAccountsOtpVerifyCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOtpVerifyCreateData, ThrowOnError>) {
389
+ return (options.client ?? client).post<CfgAccountsOtpVerifyCreateResponses, CfgAccountsOtpVerifyCreateErrors, ThrowOnError>({
390
+ security: [{ scheme: 'bearer', type: 'http' }],
391
+ url: '/cfg/accounts/otp/verify/',
392
+ ...options,
393
+ headers: {
394
+ 'Content-Type': 'application/json',
395
+ ...options.headers
396
+ }
397
+ });
398
+ }
399
+
400
+ /**
401
+ * Get current user profile
402
+ *
403
+ * Retrieve the current authenticated user's profile information.
404
+ */
405
+ public static cfgAccountsProfileRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileRetrieveData, ThrowOnError>) {
406
+ return (options?.client ?? client).get<CfgAccountsProfileRetrieveResponses, CfgAccountsProfileRetrieveErrors, ThrowOnError>({
407
+ security: [{ scheme: 'bearer', type: 'http' }, {
408
+ in: 'cookie',
409
+ name: 'sessionid',
410
+ type: 'apiKey'
411
+ }],
412
+ url: '/cfg/accounts/profile/',
413
+ ...options
414
+ });
415
+ }
416
+
417
+ /**
418
+ * Upload user avatar
419
+ *
420
+ * Upload avatar image for the current authenticated user. Accepts multipart/form-data with 'avatar' field.
421
+ */
422
+ public static cfgAccountsProfileAvatarCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileAvatarCreateData, ThrowOnError>) {
423
+ return (options?.client ?? client).post<CfgAccountsProfileAvatarCreateResponses, CfgAccountsProfileAvatarCreateErrors, ThrowOnError>({
424
+ ...formDataBodySerializer,
425
+ security: [{ scheme: 'bearer', type: 'http' }],
426
+ url: '/cfg/accounts/profile/avatar/',
427
+ ...options,
428
+ headers: {
429
+ 'Content-Type': null,
430
+ ...options?.headers
431
+ }
432
+ });
433
+ }
434
+
435
+ /**
436
+ * Delete user account
437
+ *
438
+ *
439
+ * Permanently delete the current user's account.
440
+ *
441
+ * This operation:
442
+ * - Deactivates the account (user cannot log in)
443
+ * - Anonymizes personal data (GDPR compliance)
444
+ * - Frees up the email address for re-registration
445
+ * - Preserves audit trail
446
+ *
447
+ * The account can be restored by an administrator if needed.
448
+ *
449
+ */
450
+ public static cfgAccountsProfileDeleteCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileDeleteCreateData, ThrowOnError>) {
451
+ return (options?.client ?? client).post<CfgAccountsProfileDeleteCreateResponses, CfgAccountsProfileDeleteCreateErrors, ThrowOnError>({
452
+ security: [{ scheme: 'bearer', type: 'http' }, {
453
+ in: 'cookie',
454
+ name: 'sessionid',
455
+ type: 'apiKey'
456
+ }],
457
+ url: '/cfg/accounts/profile/delete/',
458
+ ...options
459
+ });
460
+ }
461
+
462
+ /**
463
+ * Partial update user profile
464
+ *
465
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
466
+ */
467
+ public static cfgAccountsProfilePartialPartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialPartialUpdateData, ThrowOnError>) {
468
+ return (options?.client ?? client).patch<CfgAccountsProfilePartialPartialUpdateResponses, CfgAccountsProfilePartialPartialUpdateErrors, ThrowOnError>({
469
+ security: [{ scheme: 'bearer', type: 'http' }, {
470
+ in: 'cookie',
471
+ name: 'sessionid',
472
+ type: 'apiKey'
473
+ }],
474
+ url: '/cfg/accounts/profile/partial/',
475
+ ...options,
476
+ headers: {
477
+ 'Content-Type': 'application/json',
478
+ ...options?.headers
479
+ }
480
+ });
481
+ }
482
+
483
+ /**
484
+ * Partial update user profile
485
+ *
486
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
487
+ */
488
+ public static cfgAccountsProfilePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialUpdateData, ThrowOnError>) {
489
+ return (options?.client ?? client).put<CfgAccountsProfilePartialUpdateResponses, CfgAccountsProfilePartialUpdateErrors, ThrowOnError>({
490
+ security: [{ scheme: 'bearer', type: 'http' }, {
491
+ in: 'cookie',
492
+ name: 'sessionid',
493
+ type: 'apiKey'
494
+ }],
495
+ url: '/cfg/accounts/profile/partial/',
496
+ ...options,
497
+ headers: {
498
+ 'Content-Type': 'application/json',
499
+ ...options?.headers
500
+ }
501
+ });
502
+ }
503
+
504
+ /**
505
+ * Update user profile
506
+ *
507
+ * Update the current authenticated user's profile information.
508
+ */
509
+ public static cfgAccountsProfileUpdatePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdatePartialUpdateData, ThrowOnError>) {
510
+ return (options?.client ?? client).patch<CfgAccountsProfileUpdatePartialUpdateResponses, CfgAccountsProfileUpdatePartialUpdateErrors, ThrowOnError>({
511
+ security: [{ scheme: 'bearer', type: 'http' }, {
512
+ in: 'cookie',
513
+ name: 'sessionid',
514
+ type: 'apiKey'
515
+ }],
516
+ url: '/cfg/accounts/profile/update/',
517
+ ...options,
518
+ headers: {
519
+ 'Content-Type': 'application/json',
520
+ ...options?.headers
521
+ }
522
+ });
523
+ }
524
+
525
+ /**
526
+ * Update user profile
527
+ *
528
+ * Update the current authenticated user's profile information.
529
+ */
530
+ public static cfgAccountsProfileUpdateUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdateUpdateData, ThrowOnError>) {
531
+ return (options?.client ?? client).put<CfgAccountsProfileUpdateUpdateResponses, CfgAccountsProfileUpdateUpdateErrors, ThrowOnError>({
532
+ security: [{ scheme: 'bearer', type: 'http' }, {
533
+ in: 'cookie',
534
+ name: 'sessionid',
535
+ type: 'apiKey'
536
+ }],
537
+ url: '/cfg/accounts/profile/update/',
538
+ ...options,
539
+ headers: {
540
+ 'Content-Type': 'application/json',
541
+ ...options?.headers
542
+ }
543
+ });
544
+ }
545
+
546
+ /**
547
+ * Refresh JWT token.
548
+ */
549
+ public static cfgAccountsTokenRefreshCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsTokenRefreshCreateData, ThrowOnError>) {
550
+ return (options.client ?? client).post<CfgAccountsTokenRefreshCreateResponses, unknown, ThrowOnError>({
551
+ url: '/cfg/accounts/token/refresh/',
552
+ ...options,
553
+ headers: {
554
+ 'Content-Type': 'application/json',
555
+ ...options.headers
556
+ }
557
+ });
558
+ }
559
+ }
560
+
561
+ export class OAuth {
562
+ /**
563
+ * List OAuth connections
564
+ *
565
+ * Get all OAuth connections for the current user.
566
+ */
567
+ public static cfgAccountsOauthConnectionsList<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthConnectionsListData, ThrowOnError>) {
568
+ return (options?.client ?? client).get<CfgAccountsOauthConnectionsListResponses, unknown, ThrowOnError>({
569
+ security: [{ scheme: 'bearer', type: 'http' }],
570
+ url: '/cfg/accounts/oauth/connections/',
571
+ ...options
572
+ });
573
+ }
574
+
575
+ /**
576
+ * Disconnect OAuth provider
577
+ *
578
+ * Remove OAuth connection for the specified provider.
579
+ */
580
+ public static cfgAccountsOauthDisconnectCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthDisconnectCreateData, ThrowOnError>) {
581
+ return (options.client ?? client).post<CfgAccountsOauthDisconnectCreateResponses, CfgAccountsOauthDisconnectCreateErrors, ThrowOnError>({
582
+ security: [{ scheme: 'bearer', type: 'http' }],
583
+ url: '/cfg/accounts/oauth/disconnect/',
584
+ ...options,
585
+ headers: {
586
+ 'Content-Type': 'application/json',
587
+ ...options.headers
588
+ }
589
+ });
590
+ }
591
+
592
+ /**
593
+ * Start GitHub OAuth
594
+ *
595
+ * Generate GitHub OAuth authorization URL. Redirect user to this URL to start authentication.
596
+ */
597
+ public static cfgAccountsOauthGithubAuthorizeCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthGithubAuthorizeCreateData, ThrowOnError>) {
598
+ return (options?.client ?? client).post<CfgAccountsOauthGithubAuthorizeCreateResponses, CfgAccountsOauthGithubAuthorizeCreateErrors, ThrowOnError>({
599
+ url: '/cfg/accounts/oauth/github/authorize/',
600
+ ...options,
601
+ headers: {
602
+ 'Content-Type': 'application/json',
603
+ ...options?.headers
604
+ }
605
+ });
606
+ }
607
+
608
+ /**
609
+ * Complete GitHub OAuth
610
+ *
611
+ * Exchange authorization code for JWT tokens. Call this after GitHub redirects back with code.
612
+ */
613
+ public static cfgAccountsOauthGithubCallbackCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthGithubCallbackCreateData, ThrowOnError>) {
614
+ return (options.client ?? client).post<CfgAccountsOauthGithubCallbackCreateResponses, CfgAccountsOauthGithubCallbackCreateErrors, ThrowOnError>({
615
+ url: '/cfg/accounts/oauth/github/callback/',
616
+ ...options,
617
+ headers: {
618
+ 'Content-Type': 'application/json',
619
+ ...options.headers
620
+ }
621
+ });
622
+ }
623
+
624
+ /**
625
+ * List OAuth providers
626
+ *
627
+ * Get list of available OAuth providers for authentication.
628
+ */
629
+ public static cfgAccountsOauthProvidersRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthProvidersRetrieveData, ThrowOnError>) {
630
+ return (options?.client ?? client).get<CfgAccountsOauthProvidersRetrieveResponses, unknown, ThrowOnError>({ url: '/cfg/accounts/oauth/providers/', ...options });
631
+ }
632
+ }
633
+
634
+ export class UserProfile {
635
+ /**
636
+ * Get current user profile
637
+ *
638
+ * Retrieve the current authenticated user's profile information.
639
+ */
640
+ public static cfgAccountsProfileRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileRetrieveData, ThrowOnError>) {
641
+ return (options?.client ?? client).get<CfgAccountsProfileRetrieveResponses, CfgAccountsProfileRetrieveErrors, ThrowOnError>({
642
+ security: [{ scheme: 'bearer', type: 'http' }, {
643
+ in: 'cookie',
644
+ name: 'sessionid',
645
+ type: 'apiKey'
646
+ }],
647
+ url: '/cfg/accounts/profile/',
648
+ ...options
649
+ });
650
+ }
651
+
652
+ /**
653
+ * Upload user avatar
654
+ *
655
+ * Upload avatar image for the current authenticated user. Accepts multipart/form-data with 'avatar' field.
656
+ */
657
+ public static cfgAccountsProfileAvatarCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileAvatarCreateData, ThrowOnError>) {
658
+ return (options?.client ?? client).post<CfgAccountsProfileAvatarCreateResponses, CfgAccountsProfileAvatarCreateErrors, ThrowOnError>({
659
+ ...formDataBodySerializer,
660
+ security: [{ scheme: 'bearer', type: 'http' }],
661
+ url: '/cfg/accounts/profile/avatar/',
662
+ ...options,
663
+ headers: {
664
+ 'Content-Type': null,
665
+ ...options?.headers
666
+ }
667
+ });
668
+ }
669
+
670
+ /**
671
+ * Delete user account
672
+ *
673
+ *
674
+ * Permanently delete the current user's account.
675
+ *
676
+ * This operation:
677
+ * - Deactivates the account (user cannot log in)
678
+ * - Anonymizes personal data (GDPR compliance)
679
+ * - Frees up the email address for re-registration
680
+ * - Preserves audit trail
681
+ *
682
+ * The account can be restored by an administrator if needed.
683
+ *
684
+ */
685
+ public static cfgAccountsProfileDeleteCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileDeleteCreateData, ThrowOnError>) {
686
+ return (options?.client ?? client).post<CfgAccountsProfileDeleteCreateResponses, CfgAccountsProfileDeleteCreateErrors, ThrowOnError>({
687
+ security: [{ scheme: 'bearer', type: 'http' }, {
688
+ in: 'cookie',
689
+ name: 'sessionid',
690
+ type: 'apiKey'
691
+ }],
692
+ url: '/cfg/accounts/profile/delete/',
693
+ ...options
694
+ });
695
+ }
696
+
697
+ /**
698
+ * Partial update user profile
699
+ *
700
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
701
+ */
702
+ public static cfgAccountsProfilePartialPartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialPartialUpdateData, ThrowOnError>) {
703
+ return (options?.client ?? client).patch<CfgAccountsProfilePartialPartialUpdateResponses, CfgAccountsProfilePartialPartialUpdateErrors, ThrowOnError>({
704
+ security: [{ scheme: 'bearer', type: 'http' }, {
705
+ in: 'cookie',
706
+ name: 'sessionid',
707
+ type: 'apiKey'
708
+ }],
709
+ url: '/cfg/accounts/profile/partial/',
710
+ ...options,
711
+ headers: {
712
+ 'Content-Type': 'application/json',
713
+ ...options?.headers
714
+ }
715
+ });
716
+ }
717
+
718
+ /**
719
+ * Partial update user profile
720
+ *
721
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
722
+ */
723
+ public static cfgAccountsProfilePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialUpdateData, ThrowOnError>) {
724
+ return (options?.client ?? client).put<CfgAccountsProfilePartialUpdateResponses, CfgAccountsProfilePartialUpdateErrors, ThrowOnError>({
725
+ security: [{ scheme: 'bearer', type: 'http' }, {
726
+ in: 'cookie',
727
+ name: 'sessionid',
728
+ type: 'apiKey'
729
+ }],
730
+ url: '/cfg/accounts/profile/partial/',
731
+ ...options,
732
+ headers: {
733
+ 'Content-Type': 'application/json',
734
+ ...options?.headers
735
+ }
736
+ });
737
+ }
738
+
739
+ /**
740
+ * Update user profile
741
+ *
742
+ * Update the current authenticated user's profile information.
743
+ */
744
+ public static cfgAccountsProfileUpdatePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdatePartialUpdateData, ThrowOnError>) {
745
+ return (options?.client ?? client).patch<CfgAccountsProfileUpdatePartialUpdateResponses, CfgAccountsProfileUpdatePartialUpdateErrors, ThrowOnError>({
746
+ security: [{ scheme: 'bearer', type: 'http' }, {
747
+ in: 'cookie',
748
+ name: 'sessionid',
749
+ type: 'apiKey'
750
+ }],
751
+ url: '/cfg/accounts/profile/update/',
752
+ ...options,
753
+ headers: {
754
+ 'Content-Type': 'application/json',
755
+ ...options?.headers
756
+ }
757
+ });
758
+ }
759
+
760
+ /**
761
+ * Update user profile
762
+ *
763
+ * Update the current authenticated user's profile information.
764
+ */
765
+ public static cfgAccountsProfileUpdateUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdateUpdateData, ThrowOnError>) {
766
+ return (options?.client ?? client).put<CfgAccountsProfileUpdateUpdateResponses, CfgAccountsProfileUpdateUpdateErrors, ThrowOnError>({
767
+ security: [{ scheme: 'bearer', type: 'http' }, {
768
+ in: 'cookie',
769
+ name: 'sessionid',
770
+ type: 'apiKey'
771
+ }],
772
+ url: '/cfg/accounts/profile/update/',
773
+ ...options,
774
+ headers: {
775
+ 'Content-Type': 'application/json',
776
+ ...options?.headers
777
+ }
778
+ });
779
+ }
780
+ }
781
+
782
+ export class Auth {
783
+ /**
784
+ * Refresh JWT token.
785
+ */
786
+ public static cfgAccountsTokenRefreshCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsTokenRefreshCreateData, ThrowOnError>) {
787
+ return (options.client ?? client).post<CfgAccountsTokenRefreshCreateResponses, unknown, ThrowOnError>({
788
+ url: '/cfg/accounts/token/refresh/',
789
+ ...options,
790
+ headers: {
791
+ 'Content-Type': 'application/json',
792
+ ...options.headers
793
+ }
794
+ });
795
+ }
796
+ }