@djangocfg/api 2.1.322 → 2.1.331

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/auth-server.cjs +1037 -1227
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +1037 -1217
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +2142 -3398
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.d.cts +158 -209
  8. package/dist/auth.d.ts +158 -209
  9. package/dist/auth.mjs +2136 -3392
  10. package/dist/auth.mjs.map +1 -1
  11. package/dist/clients.cjs +1018 -4423
  12. package/dist/clients.cjs.map +1 -1
  13. package/dist/clients.d.cts +151 -2918
  14. package/dist/clients.d.ts +151 -2918
  15. package/dist/clients.mjs +1018 -4417
  16. package/dist/clients.mjs.map +1 -1
  17. package/dist/index.cjs +2253 -2819
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +2408 -1872
  20. package/dist/index.d.ts +2408 -1872
  21. package/dist/index.mjs +2235 -2795
  22. package/dist/index.mjs.map +1 -1
  23. package/package.json +2 -7
  24. package/src/_api/generated/_cfg_accounts/api.ts +120 -0
  25. package/src/_api/generated/_cfg_accounts/events.ts +198 -0
  26. package/src/_api/generated/_cfg_accounts/hooks/index.ts +18 -0
  27. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +25 -0
  28. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthDisconnectCreate.ts +24 -0
  29. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthGithubAuthorizeCreate.ts +24 -0
  30. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthGithubCallbackCreate.ts +24 -0
  31. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +25 -0
  32. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpRequestCreate.ts +24 -0
  33. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpVerifyCreate.ts +24 -0
  34. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileAvatarCreate.ts +24 -0
  35. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileDeleteCreate.ts +24 -0
  36. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialPartialUpdate.ts +24 -0
  37. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialUpdate.ts +24 -0
  38. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +25 -0
  39. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileUpdatePartialUpdate.ts +24 -0
  40. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileUpdateUpdate.ts +24 -0
  41. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsTokenRefreshCreate.ts +24 -0
  42. package/src/_api/generated/_cfg_accounts/index.ts +29 -0
  43. package/src/_api/generated/_cfg_accounts/schemas/AccountDeleteResponse.ts +12 -0
  44. package/src/_api/generated/_cfg_accounts/schemas/CentrifugoToken.ts +14 -0
  45. package/src/_api/generated/_cfg_accounts/schemas/CfgUserUpdateRequest.ts +16 -0
  46. package/src/_api/generated/_cfg_accounts/schemas/OAuthAuthorizeRequestRequest.ts +12 -0
  47. package/src/_api/generated/_cfg_accounts/schemas/OAuthAuthorizeResponse.ts +12 -0
  48. package/src/_api/generated/_cfg_accounts/schemas/OAuthCallbackRequestRequest.ts +13 -0
  49. package/src/_api/generated/_cfg_accounts/schemas/OAuthConnection.ts +19 -0
  50. package/src/_api/generated/_cfg_accounts/schemas/OAuthDisconnectRequestRequest.ts +12 -0
  51. package/src/_api/generated/_cfg_accounts/schemas/OAuthError.ts +12 -0
  52. package/src/_api/generated/_cfg_accounts/schemas/OAuthProvidersResponse.ts +11 -0
  53. package/src/_api/generated/_cfg_accounts/schemas/OAuthTokenResponse.ts +18 -0
  54. package/src/_api/generated/_cfg_accounts/schemas/OTPErrorResponse.ts +13 -0
  55. package/src/_api/generated/_cfg_accounts/schemas/OTPRequestRequest.ts +12 -0
  56. package/src/_api/generated/_cfg_accounts/schemas/OTPRequestResponse.ts +11 -0
  57. package/src/_api/generated/_cfg_accounts/schemas/OTPVerifyRequest.ts +13 -0
  58. package/src/_api/generated/_cfg_accounts/schemas/OTPVerifyResponse.ts +17 -0
  59. package/src/_api/generated/_cfg_accounts/schemas/PatchedCfgUserUpdateRequest.ts +16 -0
  60. package/src/_api/generated/_cfg_accounts/schemas/ProviderEnum.ts +9 -0
  61. package/src/_api/generated/_cfg_accounts/schemas/TokenRefresh.ts +12 -0
  62. package/src/_api/generated/_cfg_accounts/schemas/TokenRefreshRequest.ts +11 -0
  63. package/src/_api/generated/{cfg_accounts/_utils/schemas/User.schema.ts → _cfg_accounts/schemas/User.ts} +19 -27
  64. package/src/_api/generated/_cfg_accounts/schemas/index.ts +24 -0
  65. package/src/_api/generated/_cfg_accounts/sdk.gen.ts +5 -0
  66. package/src/_api/generated/_cfg_accounts/types.gen.ts +5 -0
  67. package/src/_api/generated/_cfg_centrifugo/api.ts +120 -0
  68. package/src/_api/generated/_cfg_centrifugo/events.ts +198 -0
  69. package/src/_api/generated/_cfg_centrifugo/hooks/index.ts +4 -0
  70. package/src/_api/generated/_cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +25 -0
  71. package/src/_api/generated/_cfg_centrifugo/index.ts +29 -0
  72. package/src/_api/generated/_cfg_centrifugo/schemas/ConnectionTokenResponse.ts +14 -0
  73. package/src/_api/generated/_cfg_centrifugo/schemas/index.ts +4 -0
  74. package/src/_api/generated/_cfg_centrifugo/sdk.gen.ts +5 -0
  75. package/src/_api/generated/_cfg_centrifugo/types.gen.ts +5 -0
  76. package/src/_api/generated/_cfg_totp/api.ts +120 -0
  77. package/src/_api/generated/_cfg_totp/events.ts +198 -0
  78. package/src/_api/generated/_cfg_totp/hooks/index.ts +12 -0
  79. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRegenerateCreate.ts +24 -0
  80. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +25 -0
  81. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesDestroy.ts +24 -0
  82. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +25 -0
  83. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDisableCreate.ts +24 -0
  84. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpSetupConfirmCreate.ts +24 -0
  85. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpSetupCreate.ts +24 -0
  86. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpVerifyBackupCreate.ts +24 -0
  87. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpVerifyCreate.ts +24 -0
  88. package/src/_api/generated/_cfg_totp/index.ts +29 -0
  89. package/src/_api/generated/_cfg_totp/schemas/BackupCodesRegenerateRequest.ts +11 -0
  90. package/src/_api/generated/_cfg_totp/schemas/BackupCodesRegenerateResponse.ts +12 -0
  91. package/src/_api/generated/_cfg_totp/schemas/BackupCodesStatus.ts +13 -0
  92. package/src/_api/generated/_cfg_totp/schemas/ConfirmSetupRequest.ts +12 -0
  93. package/src/_api/generated/_cfg_totp/schemas/ConfirmSetupResponse.ts +13 -0
  94. package/src/_api/generated/_cfg_totp/schemas/DeviceList.ts +18 -0
  95. package/src/_api/generated/_cfg_totp/schemas/DeviceListResponse.ts +13 -0
  96. package/src/_api/generated/_cfg_totp/schemas/DeviceListStatusEnum.ts +9 -0
  97. package/src/_api/generated/_cfg_totp/schemas/DisableRequest.ts +11 -0
  98. package/src/_api/generated/_cfg_totp/schemas/SetupRequest.ts +11 -0
  99. package/src/_api/generated/_cfg_totp/schemas/SetupResponse.ts +15 -0
  100. package/src/_api/generated/{cfg_totp/_utils/schemas/TotpVerifyUser.schema.ts → _cfg_totp/schemas/TotpVerifyUser.ts} +17 -25
  101. package/src/_api/generated/_cfg_totp/schemas/VerifyBackupRequest.ts +12 -0
  102. package/src/_api/generated/_cfg_totp/schemas/VerifyRequest.ts +12 -0
  103. package/src/_api/generated/_cfg_totp/schemas/VerifyResponse.ts +17 -0
  104. package/src/_api/generated/_cfg_totp/schemas/index.ts +18 -0
  105. package/src/_api/generated/_cfg_totp/sdk.gen.ts +5 -0
  106. package/src/_api/generated/_cfg_totp/types.gen.ts +5 -0
  107. package/src/_api/generated/client/client.gen.ts +280 -0
  108. package/src/_api/generated/client/index.ts +25 -0
  109. package/src/_api/generated/client/types.gen.ts +217 -0
  110. package/src/_api/generated/client/utils.gen.ts +318 -0
  111. package/src/_api/generated/client.gen.ts +16 -0
  112. package/src/_api/generated/core/auth.gen.ts +41 -0
  113. package/src/_api/generated/core/bodySerializer.gen.ts +82 -0
  114. package/src/_api/generated/core/params.gen.ts +169 -0
  115. package/src/_api/generated/core/pathSerializer.gen.ts +171 -0
  116. package/src/_api/generated/core/queryKeySerializer.gen.ts +117 -0
  117. package/src/_api/generated/core/serverSentEvents.gen.ts +242 -0
  118. package/src/_api/generated/core/types.gen.ts +104 -0
  119. package/src/_api/generated/core/utils.gen.ts +140 -0
  120. package/src/_api/generated/helpers/errors.ts +70 -0
  121. package/src/_api/generated/helpers/index.ts +25 -0
  122. package/src/_api/generated/helpers/logger.ts +123 -0
  123. package/src/_api/generated/helpers/storage.ts +83 -0
  124. package/src/_api/generated/helpers/validation-events.ts +52 -0
  125. package/src/_api/generated/index.ts +28 -0
  126. package/src/_api/generated/sdk.gen.ts +1250 -0
  127. package/src/_api/generated/types.gen.ts +1294 -0
  128. package/src/_api/index.ts +5 -23
  129. package/src/auth/context/AccountsContext.tsx +58 -89
  130. package/src/auth/context/AuthContext.tsx +3 -3
  131. package/src/auth/context/index.ts +2 -2
  132. package/src/auth/hooks/useDeleteAccount.ts +3 -1
  133. package/src/auth/hooks/useGithubAuth.ts +13 -11
  134. package/src/auth/hooks/useTokenRefresh.ts +7 -4
  135. package/src/auth/hooks/useTwoFactor.ts +15 -8
  136. package/src/auth/hooks/useTwoFactorSetup.ts +9 -5
  137. package/src/auth/hooks/useTwoFactorStatus.ts +5 -3
  138. package/src/auth/middlewares/tokenRefresh.ts +7 -4
  139. package/src/clients.ts +14 -51
  140. package/src/index.ts +35 -60
  141. package/src/server.ts +25 -23
  142. package/src/_api/BaseClient.ts +0 -22
  143. package/src/_api/generated/cfg_accounts/CLAUDE.md +0 -86
  144. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts.ts +0 -154
  145. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__auth.ts +0 -95
  146. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__oauth.ts +0 -285
  147. package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +0 -440
  148. package/src/_api/generated/cfg_accounts/_utils/fetchers/index.ts +0 -33
  149. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts.ts +0 -64
  150. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__auth.ts +0 -44
  151. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__oauth.ts +0 -114
  152. package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +0 -152
  153. package/src/_api/generated/cfg_accounts/_utils/hooks/index.ts +0 -33
  154. package/src/_api/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts +0 -20
  155. package/src/_api/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts +0 -22
  156. package/src/_api/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts +0 -15
  157. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts +0 -20
  158. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts +0 -20
  159. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts +0 -21
  160. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts +0 -27
  161. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts +0 -20
  162. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts +0 -20
  163. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts +0 -19
  164. package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts +0 -46
  165. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts +0 -41
  166. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts +0 -20
  167. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts +0 -19
  168. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts +0 -21
  169. package/src/_api/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts +0 -45
  170. package/src/_api/generated/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts +0 -24
  171. package/src/_api/generated/cfg_accounts/_utils/schemas/TokenRefresh.schema.ts +0 -16
  172. package/src/_api/generated/cfg_accounts/_utils/schemas/TokenRefreshRequest.schema.ts +0 -15
  173. package/src/_api/generated/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts +0 -24
  174. package/src/_api/generated/cfg_accounts/_utils/schemas/index.ts +0 -41
  175. package/src/_api/generated/cfg_accounts/accounts/client.ts +0 -34
  176. package/src/_api/generated/cfg_accounts/accounts/index.ts +0 -4
  177. package/src/_api/generated/cfg_accounts/accounts/models.ts +0 -127
  178. package/src/_api/generated/cfg_accounts/accounts__auth/client.ts +0 -23
  179. package/src/_api/generated/cfg_accounts/accounts__auth/index.ts +0 -4
  180. package/src/_api/generated/cfg_accounts/accounts__auth/models.ts +0 -19
  181. package/src/_api/generated/cfg_accounts/accounts__oauth/client.ts +0 -67
  182. package/src/_api/generated/cfg_accounts/accounts__oauth/index.ts +0 -4
  183. package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +0 -127
  184. package/src/_api/generated/cfg_accounts/accounts__user_profile/client.ts +0 -94
  185. package/src/_api/generated/cfg_accounts/accounts__user_profile/index.ts +0 -4
  186. package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +0 -98
  187. package/src/_api/generated/cfg_accounts/api-instance.ts +0 -181
  188. package/src/_api/generated/cfg_accounts/client.ts +0 -339
  189. package/src/_api/generated/cfg_accounts/enums.ts +0 -10
  190. package/src/_api/generated/cfg_accounts/errors.ts +0 -123
  191. package/src/_api/generated/cfg_accounts/http.ts +0 -160
  192. package/src/_api/generated/cfg_accounts/index.ts +0 -338
  193. package/src/_api/generated/cfg_accounts/logger.ts +0 -261
  194. package/src/_api/generated/cfg_accounts/retry.ts +0 -177
  195. package/src/_api/generated/cfg_accounts/schema.json +0 -1576
  196. package/src/_api/generated/cfg_accounts/storage.ts +0 -163
  197. package/src/_api/generated/cfg_accounts/validation-events.ts +0 -135
  198. package/src/_api/generated/cfg_centrifugo/CLAUDE.md +0 -60
  199. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts +0 -94
  200. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/index.ts +0 -30
  201. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts +0 -39
  202. package/src/_api/generated/cfg_centrifugo/_utils/hooks/index.ts +0 -30
  203. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts +0 -22
  204. package/src/_api/generated/cfg_centrifugo/_utils/schemas/index.ts +0 -21
  205. package/src/_api/generated/cfg_centrifugo/api-instance.ts +0 -181
  206. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts +0 -27
  207. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/index.ts +0 -4
  208. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/models.ts +0 -18
  209. package/src/_api/generated/cfg_centrifugo/client.ts +0 -330
  210. package/src/_api/generated/cfg_centrifugo/errors.ts +0 -123
  211. package/src/_api/generated/cfg_centrifugo/http.ts +0 -160
  212. package/src/_api/generated/cfg_centrifugo/index.ts +0 -316
  213. package/src/_api/generated/cfg_centrifugo/logger.ts +0 -261
  214. package/src/_api/generated/cfg_centrifugo/retry.ts +0 -177
  215. package/src/_api/generated/cfg_centrifugo/schema.json +0 -118
  216. package/src/_api/generated/cfg_centrifugo/storage.ts +0 -163
  217. package/src/_api/generated/cfg_centrifugo/validation-events.ts +0 -135
  218. package/src/_api/generated/cfg_totp/CLAUDE.md +0 -83
  219. package/src/_api/generated/cfg_totp/_utils/fetchers/index.ts +0 -34
  220. package/src/_api/generated/cfg_totp/_utils/fetchers/totp.ts +0 -50
  221. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__backup_codes.ts +0 -153
  222. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts +0 -109
  223. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_setup.ts +0 -154
  224. package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_verification.ts +0 -153
  225. package/src/_api/generated/cfg_totp/_utils/hooks/index.ts +0 -34
  226. package/src/_api/generated/cfg_totp/_utils/hooks/totp.ts +0 -43
  227. package/src/_api/generated/cfg_totp/_utils/hooks/totp__backup_codes.ts +0 -60
  228. package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_management.ts +0 -59
  229. package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_setup.ts +0 -64
  230. package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_verification.ts +0 -63
  231. package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts +0 -19
  232. package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts +0 -20
  233. package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts +0 -21
  234. package/src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts +0 -20
  235. package/src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts +0 -21
  236. package/src/_api/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts +0 -26
  237. package/src/_api/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts +0 -21
  238. package/src/_api/generated/cfg_totp/_utils/schemas/DisableRequest.schema.ts +0 -19
  239. package/src/_api/generated/cfg_totp/_utils/schemas/SetupRequest.schema.ts +0 -19
  240. package/src/_api/generated/cfg_totp/_utils/schemas/SetupResponse.schema.ts +0 -23
  241. package/src/_api/generated/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts +0 -20
  242. package/src/_api/generated/cfg_totp/_utils/schemas/VerifyRequest.schema.ts +0 -20
  243. package/src/_api/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts +0 -25
  244. package/src/_api/generated/cfg_totp/_utils/schemas/index.ts +0 -34
  245. package/src/_api/generated/cfg_totp/api-instance.ts +0 -181
  246. package/src/_api/generated/cfg_totp/client.ts +0 -342
  247. package/src/_api/generated/cfg_totp/enums.ts +0 -13
  248. package/src/_api/generated/cfg_totp/errors.ts +0 -123
  249. package/src/_api/generated/cfg_totp/http.ts +0 -160
  250. package/src/_api/generated/cfg_totp/index.ts +0 -345
  251. package/src/_api/generated/cfg_totp/logger.ts +0 -261
  252. package/src/_api/generated/cfg_totp/retry.ts +0 -177
  253. package/src/_api/generated/cfg_totp/schema.json +0 -910
  254. package/src/_api/generated/cfg_totp/storage.ts +0 -163
  255. package/src/_api/generated/cfg_totp/totp/client.ts +0 -24
  256. package/src/_api/generated/cfg_totp/totp/index.ts +0 -4
  257. package/src/_api/generated/cfg_totp/totp/models.ts +0 -4
  258. package/src/_api/generated/cfg_totp/totp__backup_codes/client.ts +0 -32
  259. package/src/_api/generated/cfg_totp/totp__backup_codes/index.ts +0 -4
  260. package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +0 -38
  261. package/src/_api/generated/cfg_totp/totp__totp_management/client.ts +0 -31
  262. package/src/_api/generated/cfg_totp/totp__totp_management/index.ts +0 -4
  263. package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +0 -46
  264. package/src/_api/generated/cfg_totp/totp__totp_setup/client.ts +0 -33
  265. package/src/_api/generated/cfg_totp/totp__totp_setup/index.ts +0 -4
  266. package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +0 -55
  267. package/src/_api/generated/cfg_totp/totp__totp_verification/client.ts +0 -33
  268. package/src/_api/generated/cfg_totp/totp__totp_verification/index.ts +0 -4
  269. package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +0 -74
  270. package/src/_api/generated/cfg_totp/validation-events.ts +0 -135
  271. package/src/hooks/accounts.ts +0 -8
  272. package/src/hooks/index.ts +0 -10
package/dist/index.d.ts CHANGED
@@ -1,2126 +1,2662 @@
1
1
  import { ConsolaInstance } from 'consola';
2
- import { z, ZodError } from 'zod';
2
+ import { ZodError } from 'zod';
3
3
 
4
- /**
5
- *
6
- * Request model (no read-only fields).
7
- */
8
- interface TokenRefreshRequest$1 {
9
- refresh: string;
10
- }
11
- /**
12
- *
13
- * Response model (includes read-only fields).
14
- */
15
- interface TokenRefresh$1 {
16
- access: string;
17
- refresh: string;
18
- }
19
-
20
- declare namespace models$3 {
21
- export type { TokenRefresh$1 as TokenRefresh, TokenRefreshRequest$1 as TokenRefreshRequest };
22
- }
23
-
24
- /**
25
- * API endpoints for Auth.
26
- */
27
- declare class Auth {
28
- private client;
29
- constructor(client: any);
4
+ type AuthToken = string | undefined;
5
+ interface Auth$1 {
30
6
  /**
31
- * Refresh JWT token.
7
+ * Which part of the request do we use to send the auth?
8
+ *
9
+ * @default 'header'
10
+ */
11
+ in?: 'header' | 'query' | 'cookie';
12
+ /**
13
+ * Header or query parameter name.
14
+ *
15
+ * @default 'Authorization'
32
16
  */
33
- accountsTokenRefreshCreate(data: TokenRefreshRequest$1): Promise<TokenRefresh$1>;
17
+ name?: string;
18
+ scheme?: 'basic' | 'bearer';
19
+ type: 'apiKey' | 'http';
34
20
  }
35
21
 
36
- /**
37
- * OAuth provider to disconnect
38
- * * `github` - GitHub
39
- */
40
- declare enum OAuthConnectionProvider {
41
- GITHUB = "github"
22
+ interface SerializerOptions<T> {
23
+ /**
24
+ * @default true
25
+ */
26
+ explode: boolean;
27
+ style: T;
42
28
  }
29
+ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
30
+ type ObjectStyle = 'form' | 'deepObject';
31
+
32
+ type QuerySerializer = (query: Record<string, unknown>) => string;
33
+ type BodySerializer = (body: unknown) => unknown;
34
+ type QuerySerializerOptionsObject = {
35
+ allowReserved?: boolean;
36
+ array?: Partial<SerializerOptions<ArrayStyle>>;
37
+ object?: Partial<SerializerOptions<ObjectStyle>>;
38
+ };
39
+ type QuerySerializerOptions = QuerySerializerOptionsObject & {
40
+ /**
41
+ * Per-parameter serialization overrides. When provided, these settings
42
+ * override the global array/object settings for specific parameter names.
43
+ */
44
+ parameters?: Record<string, QuerySerializerOptionsObject>;
45
+ };
43
46
 
44
- type enums_OAuthConnectionProvider = OAuthConnectionProvider;
45
- declare const enums_OAuthConnectionProvider: typeof OAuthConnectionProvider;
46
- declare namespace enums {
47
- export { enums_OAuthConnectionProvider as OAuthConnectionProvider };
47
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
48
+ type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
49
+ /**
50
+ * Returns the final request URL.
51
+ */
52
+ buildUrl: BuildUrlFn;
53
+ getConfig: () => Config;
54
+ request: RequestFn;
55
+ setConfig: (config: Config) => Config;
56
+ } & {
57
+ [K in HttpMethod]: MethodFn;
58
+ } & ([SseFn] extends [never] ? {
59
+ sse?: never;
60
+ } : {
61
+ sse: {
62
+ [K in HttpMethod]: SseFn;
63
+ };
64
+ });
65
+ interface Config$1 {
66
+ /**
67
+ * Auth token or a function returning auth token. The resolved value will be
68
+ * added to the request payload as defined by its `security` array.
69
+ */
70
+ auth?: ((auth: Auth$1) => Promise<AuthToken> | AuthToken) | AuthToken;
71
+ /**
72
+ * A function for serializing request body parameter. By default,
73
+ * {@link JSON.stringify()} will be used.
74
+ */
75
+ bodySerializer?: BodySerializer | null;
76
+ /**
77
+ * An object containing any HTTP headers that you want to pre-populate your
78
+ * `Headers` object with.
79
+ *
80
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
81
+ */
82
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
83
+ /**
84
+ * The request method.
85
+ *
86
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
87
+ */
88
+ method?: Uppercase<HttpMethod>;
89
+ /**
90
+ * A function for serializing request query parameters. By default, arrays
91
+ * will be exploded in form style, objects will be exploded in deepObject
92
+ * style, and reserved characters are percent-encoded.
93
+ *
94
+ * This method will have no effect if the native `paramsSerializer()` Axios
95
+ * API function is used.
96
+ *
97
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
98
+ */
99
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
100
+ /**
101
+ * A function validating request data. This is useful if you want to ensure
102
+ * the request conforms to the desired shape, so it can be safely sent to
103
+ * the server.
104
+ */
105
+ requestValidator?: (data: unknown) => Promise<unknown>;
106
+ /**
107
+ * A function transforming response data before it's returned. This is useful
108
+ * for post-processing data, e.g., converting ISO strings into Date objects.
109
+ */
110
+ responseTransformer?: (data: unknown) => Promise<unknown>;
111
+ /**
112
+ * A function validating response data. This is useful if you want to ensure
113
+ * the response conforms to the desired shape, so it can be safely passed to
114
+ * the transformers and returned to the user.
115
+ */
116
+ responseValidator?: (data: unknown) => Promise<unknown>;
48
117
  }
49
118
 
50
- /**
51
- * Request to start OAuth flow.
52
- *
53
- * Request model (no read-only fields).
54
- */
55
- interface OAuthAuthorizeRequestRequest$1 {
56
- /** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
57
- redirect_uri?: string;
58
- /** Optional source URL for registration tracking */
59
- source_url?: string;
60
- }
61
- /**
62
- * Request to complete OAuth flow (callback handler).
63
- *
64
- * Request model (no read-only fields).
65
- */
66
- interface OAuthCallbackRequestRequest$1 {
67
- /** Authorization code from OAuth provider callback */
68
- code: string;
69
- /** State token for CSRF verification (from authorize response) */
70
- state: string;
71
- /** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
72
- redirect_uri?: string;
73
- }
74
- /**
75
- * Response with JWT tokens after OAuth authentication. When 2FA is required: -
76
- * requires_2fa: True - session_id: UUID of 2FA verification session -
77
- * access/refresh/user: null When 2FA is not required: - requires_2fa: False -
78
- * session_id: null - access/refresh/user: populated
79
- *
80
- * Response model (includes read-only fields).
81
- */
82
- interface OAuthTokenResponse$1 {
83
- /** True if 2FA verification is required */
84
- requires_2fa?: boolean;
85
- /** 2FA session ID (only when requires_2fa=True) */
86
- session_id?: string | null;
87
- /** JWT access token (null when requires_2fa=True) */
88
- access?: string | null;
89
- /** JWT refresh token (null when requires_2fa=True) */
90
- refresh?: string | null;
91
- /** Authenticated user info (null when requires_2fa=True) */
92
- user?: Record<string, any> | null;
93
- /** True if a new user was created during this OAuth flow */
94
- is_new_user: boolean;
95
- /** True if a new OAuth connection was created */
96
- is_new_connection: boolean;
97
- /** True if user should be prompted to enable 2FA */
98
- should_prompt_2fa?: boolean;
99
- }
100
- /**
101
- * Serializer for OAuth connection info (user-facing).
102
- *
103
- * Response model (includes read-only fields).
104
- */
105
- interface OAuthConnection$1 {
106
- id: number;
107
- /** OAuth provider name (github, google, etc.)
108
-
109
- * `github` - GitHub */
110
- provider: OAuthConnectionProvider;
111
- provider_display: string;
112
- /** Username on the OAuth provider platform */
113
- provider_username: string;
114
- /** Email from OAuth provider (may differ from user.email) */
115
- provider_email: string;
116
- /** Avatar URL from OAuth provider */
117
- provider_avatar_url: string;
118
- /** When this OAuth connection was created */
119
- connected_at: string;
120
- /** Last time this OAuth connection was used for login */
121
- last_login_at: string;
122
- }
123
- /**
124
- * Response with OAuth authorization URL.
125
- *
126
- * Response model (includes read-only fields).
127
- */
128
- interface OAuthAuthorizeResponse$1 {
129
- /** Full URL to redirect user to OAuth provider */
130
- authorization_url: string;
131
- /** State token for CSRF protection. Store this and verify on callback. */
132
- state: string;
133
- }
134
- /**
135
- * Request to disconnect OAuth provider.
136
- *
137
- * Request model (no read-only fields).
138
- */
139
- interface OAuthDisconnectRequestRequest$1 {
140
- /** OAuth provider to disconnect
141
-
142
- * `github` - GitHub */
143
- provider: OAuthConnectionProvider;
144
- }
145
- /**
146
- * Response with available OAuth providers.
147
- *
148
- * Response model (includes read-only fields).
149
- */
150
- interface OAuthProvidersResponse$1 {
151
- /** List of available OAuth providers */
152
- providers: Array<Record<string, any>>;
119
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
120
+ /**
121
+ * Fetch API implementation. You can use this option to provide a custom
122
+ * fetch instance.
123
+ *
124
+ * @default globalThis.fetch
125
+ */
126
+ fetch?: typeof fetch;
127
+ /**
128
+ * Implementing clients can call request interceptors inside this hook.
129
+ */
130
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
131
+ /**
132
+ * Callback invoked when a network or parsing error occurs during streaming.
133
+ *
134
+ * This option applies only if the endpoint returns a stream of events.
135
+ *
136
+ * @param error The error that occurred.
137
+ */
138
+ onSseError?: (error: unknown) => void;
139
+ /**
140
+ * Callback invoked when an event is streamed from the server.
141
+ *
142
+ * This option applies only if the endpoint returns a stream of events.
143
+ *
144
+ * @param event Event streamed from the server.
145
+ * @returns Nothing (void).
146
+ */
147
+ onSseEvent?: (event: StreamEvent<TData>) => void;
148
+ serializedBody?: RequestInit['body'];
149
+ /**
150
+ * Default retry delay in milliseconds.
151
+ *
152
+ * This option applies only if the endpoint returns a stream of events.
153
+ *
154
+ * @default 3000
155
+ */
156
+ sseDefaultRetryDelay?: number;
157
+ /**
158
+ * Maximum number of retry attempts before giving up.
159
+ */
160
+ sseMaxRetryAttempts?: number;
161
+ /**
162
+ * Maximum retry delay in milliseconds.
163
+ *
164
+ * Applies only when exponential backoff is used.
165
+ *
166
+ * This option applies only if the endpoint returns a stream of events.
167
+ *
168
+ * @default 30000
169
+ */
170
+ sseMaxRetryDelay?: number;
171
+ /**
172
+ * Optional sleep function for retry backoff.
173
+ *
174
+ * Defaults to using `setTimeout`.
175
+ */
176
+ sseSleepFn?: (ms: number) => Promise<void>;
177
+ url: string;
178
+ };
179
+ interface StreamEvent<TData = unknown> {
180
+ data: TData;
181
+ event?: string;
182
+ id?: string;
183
+ retry?: number;
153
184
  }
154
- /**
155
- * Error response for OAuth endpoints.
156
- *
157
- * Response model (includes read-only fields).
158
- */
159
- interface OAuthError$1 {
160
- /** Error code */
161
- error: string;
162
- /** Human-readable error description */
163
- error_description?: string;
185
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
186
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
187
+ };
188
+
189
+ type ErrInterceptor<Err, Res, Req, Options> = (error: Err,
190
+ /** response may be undefined due to a network error where no response object is produced */
191
+ response: Res | undefined,
192
+ /** request may be undefined, because error may be from building the request object itself */
193
+ request: Req | undefined, options: Options) => Err | Promise<Err>;
194
+ type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
195
+ type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
196
+ declare class Interceptors<Interceptor> {
197
+ fns: Array<Interceptor | null>;
198
+ clear(): void;
199
+ eject(id: number | Interceptor): void;
200
+ exists(id: number | Interceptor): boolean;
201
+ getInterceptorIndex(id: number | Interceptor): number;
202
+ update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
203
+ use(fn: Interceptor): number;
164
204
  }
165
-
166
- declare namespace models$2 {
167
- export type { OAuthAuthorizeRequestRequest$1 as OAuthAuthorizeRequestRequest, OAuthAuthorizeResponse$1 as OAuthAuthorizeResponse, OAuthCallbackRequestRequest$1 as OAuthCallbackRequestRequest, OAuthConnection$1 as OAuthConnection, OAuthDisconnectRequestRequest$1 as OAuthDisconnectRequestRequest, OAuthError$1 as OAuthError, OAuthProvidersResponse$1 as OAuthProvidersResponse, OAuthTokenResponse$1 as OAuthTokenResponse };
205
+ interface Middleware<Req, Res, Err, Options> {
206
+ error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
207
+ request: Interceptors<ReqInterceptor<Req, Options>>;
208
+ response: Interceptors<ResInterceptor<Res, Req, Options>>;
168
209
  }
169
210
 
170
- /**
171
- * API endpoints for Oauth.
172
- */
173
- declare class Oauth {
174
- private client;
175
- constructor(client: any);
211
+ type ResponseStyle = 'data' | 'fields';
212
+ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
176
213
  /**
177
- * List OAuth connections
214
+ * Base URL for all requests made by this client.
215
+ */
216
+ baseUrl?: T['baseUrl'];
217
+ /**
218
+ * Fetch API implementation. You can use this option to provide a custom
219
+ * fetch instance.
178
220
  *
179
- * Get all OAuth connections for the current user.
221
+ * @default globalThis.fetch
180
222
  */
181
- accountsOauthConnectionsList(): Promise<OAuthConnection$1[]>;
223
+ fetch?: typeof fetch;
182
224
  /**
183
- * Disconnect OAuth provider
225
+ * Please don't use the Fetch client for Next.js applications. The `next`
226
+ * options won't have any effect.
184
227
  *
185
- * Remove OAuth connection for the specified provider.
228
+ * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
186
229
  */
187
- accountsOauthDisconnectCreate(data: OAuthDisconnectRequestRequest$1): Promise<any>;
230
+ next?: never;
188
231
  /**
189
- * Start GitHub OAuth
232
+ * Return the response data parsed in a specified format. By default, `auto`
233
+ * will infer the appropriate method from the `Content-Type` response header.
234
+ * You can override this behavior with any of the {@link Body} methods.
235
+ * Select `stream` if you don't want to parse response data at all.
190
236
  *
191
- * Generate GitHub OAuth authorization URL. Redirect user to this URL to
192
- * start authentication.
237
+ * @default 'auto'
193
238
  */
194
- accountsOauthGithubAuthorizeCreate(data: OAuthAuthorizeRequestRequest$1): Promise<OAuthAuthorizeResponse$1>;
239
+ parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
195
240
  /**
196
- * Complete GitHub OAuth
241
+ * Should we return only data or multiple fields (data, error, response, etc.)?
197
242
  *
198
- * Exchange authorization code for JWT tokens. Call this after GitHub
199
- * redirects back with code.
243
+ * @default 'fields'
200
244
  */
201
- accountsOauthGithubCallbackCreate(data: OAuthCallbackRequestRequest$1): Promise<OAuthTokenResponse$1>;
245
+ responseStyle?: ResponseStyle;
202
246
  /**
203
- * List OAuth providers
247
+ * Throw an error instead of returning it in the response?
204
248
  *
205
- * Get list of available OAuth providers for authentication.
249
+ * @default false
250
+ */
251
+ throwOnError?: T['throwOnError'];
252
+ }
253
+ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
254
+ responseStyle: TResponseStyle;
255
+ throwOnError: ThrowOnError;
256
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
257
+ /**
258
+ * Any body that you want to add to your request.
259
+ *
260
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
261
+ */
262
+ body?: unknown;
263
+ path?: Record<string, unknown>;
264
+ query?: Record<string, unknown>;
265
+ /**
266
+ * Security mechanism(s) to use for the request.
206
267
  */
207
- accountsOauthProvidersRetrieve(): Promise<OAuthProvidersResponse$1>;
268
+ security?: ReadonlyArray<Auth$1>;
269
+ url: Url;
208
270
  }
271
+ interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
272
+ headers: Headers;
273
+ serializedBody?: string;
274
+ }
275
+ type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
276
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
277
+ request: Request;
278
+ response: Response;
279
+ }> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
280
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
281
+ error: undefined;
282
+ } | {
283
+ data: undefined;
284
+ error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
285
+ }) & {
286
+ /** request may be undefined, because error may be from building the request object itself */
287
+ request?: Request;
288
+ /** response may be undefined, because error may be from building the request object itself or from a network error */
289
+ response?: Response;
290
+ }>;
291
+ interface ClientOptions$1 {
292
+ baseUrl?: string;
293
+ responseStyle?: ResponseStyle;
294
+ throwOnError?: boolean;
295
+ }
296
+ type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
297
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
298
+ type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
299
+ type BuildUrlFn = <TData extends {
300
+ body?: unknown;
301
+ path?: Record<string, unknown>;
302
+ query?: Record<string, unknown>;
303
+ url: string;
304
+ }>(options: TData & Options$1<TData>) => string;
305
+ type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
306
+ interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
307
+ };
308
+ interface TDataShape {
309
+ body?: unknown;
310
+ headers?: unknown;
311
+ path?: unknown;
312
+ query?: unknown;
313
+ url: string;
314
+ }
315
+ type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
316
+ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
209
317
 
318
+ type ClientOptions = {
319
+ baseUrl: 'http://localhost:8000' | (string & {});
320
+ };
210
321
  /**
211
- * Serializer for updating user profile.
212
- *
213
- * Request model (no read-only fields).
322
+ * Response serializer for account deletion.
214
323
  */
215
- interface PatchedUserProfileUpdateRequest$1 {
216
- first_name?: string;
217
- last_name?: string;
218
- company?: string;
219
- phone?: string;
220
- position?: string;
221
- language?: string;
222
- }
324
+ type AccountDeleteResponse = {
325
+ /**
326
+ * Human-readable message about the deletion
327
+ */
328
+ message: string;
329
+ /**
330
+ * Whether the account was successfully deleted
331
+ */
332
+ success: boolean;
333
+ };
223
334
  /**
224
- *
225
- * Request model (no read-only fields).
335
+ * Serializer for regenerating backup codes.
226
336
  */
227
- interface CfgAccountsProfileAvatarCreateRequest$1 {
228
- /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
229
- avatar: File | Blob;
230
- }
337
+ type BackupCodesRegenerateRequest = {
338
+ /**
339
+ * TOTP code for verification
340
+ */
341
+ code: string;
342
+ };
231
343
  /**
232
- * Response serializer for account deletion.
233
- *
234
- * Response model (includes read-only fields).
344
+ * Response serializer for backup codes regeneration.
235
345
  */
236
- interface AccountDeleteResponse$1 {
237
- /** Whether the account was successfully deleted */
238
- success: boolean;
239
- /** Human-readable message about the deletion */
240
- message: string;
241
- }
346
+ type BackupCodesRegenerateResponse = {
347
+ /**
348
+ * List of new backup codes (save these!)
349
+ */
350
+ backup_codes: Array<string>;
351
+ /**
352
+ * Warning about previous codes being invalidated
353
+ */
354
+ warning: string;
355
+ };
242
356
  /**
243
- * Serializer for user details.
244
- *
245
- * Response model (includes read-only fields).
357
+ * Serializer for backup codes status.
246
358
  */
247
- interface User$2 {
248
- id: number;
249
- email: string;
250
- first_name?: string;
251
- last_name?: string;
252
- /** Get user's full name. */
253
- full_name: string;
254
- /** Get user's initials for avatar fallback. */
255
- initials: string;
256
- /** Get formatted username for display. */
257
- display_username: string;
258
- company?: string;
259
- phone?: string;
260
- position?: string;
261
- language?: string;
262
- avatar?: string | null;
263
- /** Designates whether the user can log into this admin site. */
264
- is_staff: boolean;
265
- /** Designates that this user has all permissions without explicitly assigning them. */
266
- is_superuser: boolean;
267
- date_joined: string;
268
- last_login?: string | null;
269
- unanswered_messages_count: number;
270
- centrifugo: CentrifugoToken$2 | null;
271
- }
359
+ type BackupCodesStatus = {
360
+ /**
361
+ * Number of unused backup codes
362
+ */
363
+ remaining_count: number;
364
+ /**
365
+ * Total number of codes generated
366
+ */
367
+ total_generated: number;
368
+ /**
369
+ * Warning if running low on codes
370
+ */
371
+ warning?: string | null;
372
+ };
373
+ /**
374
+ * Nested serializer for Centrifugo WebSocket connection token.
375
+ */
376
+ type CentrifugoToken = {
377
+ /**
378
+ * Centrifugo WebSocket URL
379
+ */
380
+ centrifugo_url: string;
381
+ /**
382
+ * List of allowed channels for this user
383
+ */
384
+ channels: Array<string>;
385
+ /**
386
+ * Token expiration time (ISO 8601)
387
+ */
388
+ expires_at: string;
389
+ /**
390
+ * JWT token for Centrifugo WebSocket connection
391
+ */
392
+ token: string;
393
+ };
272
394
  /**
273
395
  * Serializer for updating user profile.
274
- *
275
- * Request model (no read-only fields).
276
396
  */
277
- interface UserProfileUpdateRequest$1 {
397
+ type CfgUserUpdateRequest = {
398
+ company?: string;
278
399
  first_name?: string;
400
+ language?: string;
279
401
  last_name?: string;
280
- company?: string;
281
402
  phone?: string;
282
403
  position?: string;
283
- language?: string;
284
- }
404
+ };
285
405
  /**
286
- * Nested serializer for Centrifugo WebSocket connection token.
287
- *
288
- * Response model (includes read-only fields).
406
+ * Serializer for confirming 2FA setup with first code.
289
407
  */
290
- interface CentrifugoToken$2 {
291
- /** JWT token for Centrifugo WebSocket connection */
292
- token: string;
293
- /** Centrifugo WebSocket URL */
294
- centrifugo_url: string;
295
- /** Token expiration time (ISO 8601) */
296
- expires_at: string;
297
- /** List of allowed channels for this user */
298
- channels: Array<string>;
299
- }
300
-
301
- declare namespace models$1 {
302
- export type { AccountDeleteResponse$1 as AccountDeleteResponse, CentrifugoToken$2 as CentrifugoToken, CfgAccountsProfileAvatarCreateRequest$1 as CfgAccountsProfileAvatarCreateRequest, PatchedUserProfileUpdateRequest$1 as PatchedUserProfileUpdateRequest, User$2 as User, UserProfileUpdateRequest$1 as UserProfileUpdateRequest };
303
- }
304
-
408
+ type ConfirmSetupRequest = {
409
+ /**
410
+ * 6-digit TOTP code from authenticator app
411
+ */
412
+ code: string;
413
+ /**
414
+ * Device ID from setup response
415
+ */
416
+ device_id: string;
417
+ };
305
418
  /**
306
- * API endpoints for User Profile.
419
+ * Response serializer for setup confirmation.
307
420
  */
308
- declare class UserProfile {
309
- private client;
310
- constructor(client: any);
421
+ type ConfirmSetupResponse = {
311
422
  /**
312
- * Get current user profile
313
- *
314
- * Retrieve the current authenticated user's profile information.
423
+ * List of backup recovery codes (save these!)
315
424
  */
316
- accountsProfileRetrieve(): Promise<User$2>;
425
+ backup_codes: Array<string>;
317
426
  /**
318
- * Upload user avatar
319
- *
320
- * Upload avatar image for the current authenticated user. Accepts
321
- * multipart/form-data with 'avatar' field.
427
+ * Warning message about backup codes
322
428
  */
323
- accountsProfileAvatarCreate(data: CfgAccountsProfileAvatarCreateRequest$1): Promise<User$2>;
429
+ backup_codes_warning: string;
430
+ message: string;
431
+ };
432
+ /**
433
+ * ConnectionTokenResponse
434
+ *
435
+ * Response model for Centrifugo connection token.
436
+ */
437
+ type ConnectionTokenResponse = {
324
438
  /**
325
- * Delete user account
439
+ * Centrifugo Url
326
440
  *
327
- * Permanently delete the current user's account. This operation: -
328
- * Deactivates the account (user cannot log in) - Anonymizes personal data
329
- * (GDPR compliance) - Frees up the email address for re-registration -
330
- * Preserves audit trail The account can be restored by an administrator if
331
- * needed.
441
+ * Centrifugo WebSocket URL
332
442
  */
333
- accountsProfileDeleteCreate(): Promise<AccountDeleteResponse$1>;
443
+ centrifugo_url: string;
334
444
  /**
335
- * Partial update user profile
445
+ * Channels
336
446
  *
337
- * Partially update the current authenticated user's profile information.
338
- * Supports avatar upload.
447
+ * List of allowed channels
339
448
  */
340
- accountsProfilePartialUpdate(data: UserProfileUpdateRequest$1): Promise<User$2>;
449
+ channels: Array<string>;
341
450
  /**
342
- * Partial update user profile
451
+ * Expires At
343
452
  *
344
- * Partially update the current authenticated user's profile information.
345
- * Supports avatar upload.
453
+ * Token expiration time (ISO 8601)
346
454
  */
347
- accountsProfilePartialPartialUpdate(data?: PatchedUserProfileUpdateRequest$1): Promise<User$2>;
455
+ expires_at: string;
348
456
  /**
349
- * Update user profile
350
- *
351
- * Update the current authenticated user's profile information.
352
- */
353
- accountsProfileUpdateUpdate(data: UserProfileUpdateRequest$1): Promise<User$2>;
354
- /**
355
- * Update user profile
457
+ * Token
356
458
  *
357
- * Update the current authenticated user's profile information.
459
+ * JWT token for Centrifugo connection
358
460
  */
359
- accountsProfileUpdatePartialUpdate(data?: PatchedUserProfileUpdateRequest$1): Promise<User$2>;
360
- }
361
-
461
+ token: string;
462
+ };
362
463
  /**
363
- * OTP verification response. When 2FA is required: - requires_2fa: True -
364
- * session_id: UUID of 2FA verification session - refresh/access/user: null
365
- * When 2FA is not required: - requires_2fa: False - session_id: null -
366
- * refresh/access/user: populated
367
- *
368
- * Response model (includes read-only fields).
464
+ * Serializer for listing TOTP devices.
369
465
  */
370
- interface OTPVerifyResponse$1 {
371
- /** Whether 2FA verification is required */
372
- requires_2fa?: boolean;
373
- /** 2FA session ID (if requires_2fa is True) */
374
- session_id?: string | null;
375
- /** JWT refresh token (if requires_2fa is False) */
376
- refresh?: string | null;
377
- /** JWT access token (if requires_2fa is False) */
378
- access?: string | null;
379
- user?: User$1 | null;
380
- /** Whether user should be prompted to enable 2FA */
381
- should_prompt_2fa?: boolean;
382
- }
466
+ type DeviceList = {
467
+ /**
468
+ * When device setup was confirmed
469
+ */
470
+ readonly confirmed_at: string | null;
471
+ readonly created_at: string;
472
+ readonly id: string;
473
+ /**
474
+ * Primary device used for verification
475
+ */
476
+ readonly is_primary: boolean;
477
+ /**
478
+ * Last successful verification
479
+ */
480
+ readonly last_used_at: string | null;
481
+ /**
482
+ * Device name for identification
483
+ */
484
+ readonly name: string;
485
+ readonly status: DeviceListStatusEnum;
486
+ };
383
487
  /**
384
- * OTP request response.
385
- *
386
- * Response model (includes read-only fields).
488
+ * Response serializer for device list endpoint.
387
489
  */
388
- interface OTPRequestResponse$1 {
389
- /** Success message */
390
- message: string;
391
- }
490
+ type DeviceListResponse = {
491
+ devices: Array<DeviceList>;
492
+ has_2fa_enabled: boolean;
493
+ };
392
494
  /**
393
- * Typed error response for OTP operations. error_code values: -
394
- * invalid_identifier malformed email - cooldown — too soon after last
395
- * request (retry_after = seconds) - hourly_limit — hourly quota exceeded
396
- * (retry_after = seconds until reset) - daily_limit — daily quota exceeded
397
- * (retry_after = seconds until reset) - rate_limited — IP-level rate limit hit
398
- * (no retry_after) - user_creation_failed — internal error creating account -
399
- * send_failed — transport error (email / SMS) - internal_error — unexpected
400
- * server error
401
- *
402
- * Response model (includes read-only fields).
495
+ * * `pending` - Pending Confirmation
496
+ * * `active` - Active
497
+ * * `disabled` - Disabled
403
498
  */
404
- interface OTPErrorResponse$1 {
405
- /** Human-readable error message */
406
- error: string;
407
- /** Machine-readable error code */
408
- error_code?: string | null;
409
- /** Seconds until the client may retry (present only for rate-limit errors) */
410
- retry_after?: number | null;
499
+ declare enum DeviceListStatusEnum {
500
+ PENDING = "pending",
501
+ ACTIVE = "active",
502
+ DISABLED = "disabled"
411
503
  }
412
504
  /**
413
- * Serializer for OTP verification.
414
- *
415
- * Request model (no read-only fields).
505
+ * Serializer for completely disabling 2FA.
416
506
  */
417
- interface OTPVerifyRequest$1 {
418
- /** Email address used for OTP request */
419
- identifier: string;
420
- otp: string;
421
- /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
422
- source_url?: string;
423
- }
507
+ type DisableRequest = {
508
+ /**
509
+ * TOTP code for verification
510
+ */
511
+ code: string;
512
+ };
424
513
  /**
425
- * Serializer for OTP request.
426
- *
427
- * Request model (no read-only fields).
514
+ * Request to start OAuth flow.
428
515
  */
429
- interface OTPRequestRequest$1 {
430
- /** Email address for OTP delivery */
431
- identifier: string;
432
- /** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
516
+ type OAuthAuthorizeRequestRequest = {
517
+ /**
518
+ * URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path
519
+ */
520
+ redirect_uri?: string;
521
+ /**
522
+ * Optional source URL for registration tracking
523
+ */
433
524
  source_url?: string;
434
- }
525
+ };
435
526
  /**
436
- * Serializer for user details.
437
- *
438
- * Response model (includes read-only fields).
527
+ * Response with OAuth authorization URL.
439
528
  */
440
- interface User$1 {
441
- id: number;
442
- email: string;
443
- first_name?: string;
444
- last_name?: string;
445
- /** Get user's full name. */
446
- full_name: string;
447
- /** Get user's initials for avatar fallback. */
448
- initials: string;
449
- /** Get formatted username for display. */
450
- display_username: string;
451
- company?: string;
452
- phone?: string;
453
- position?: string;
454
- language?: string;
455
- avatar?: string | null;
456
- /** Designates whether the user can log into this admin site. */
457
- is_staff: boolean;
458
- /** Designates that this user has all permissions without explicitly assigning them. */
459
- is_superuser: boolean;
460
- date_joined: string;
461
- last_login?: string | null;
462
- unanswered_messages_count: number;
463
- centrifugo: CentrifugoToken$1 | null;
464
- }
529
+ type OAuthAuthorizeResponse = {
530
+ /**
531
+ * Full URL to redirect user to OAuth provider
532
+ */
533
+ authorization_url: string;
534
+ /**
535
+ * State token for CSRF protection. Store this and verify on callback.
536
+ */
537
+ state: string;
538
+ };
465
539
  /**
466
- * Nested serializer for Centrifugo WebSocket connection token.
467
- *
468
- * Response model (includes read-only fields).
540
+ * Request to complete OAuth flow (callback handler).
469
541
  */
470
- interface CentrifugoToken$1 {
471
- /** JWT token for Centrifugo WebSocket connection */
472
- token: string;
473
- /** Centrifugo WebSocket URL */
474
- centrifugo_url: string;
475
- /** Token expiration time (ISO 8601) */
476
- expires_at: string;
477
- /** List of allowed channels for this user */
478
- channels: Array<string>;
479
- }
480
-
481
- declare namespace models {
482
- export type { CentrifugoToken$1 as CentrifugoToken, OTPErrorResponse$1 as OTPErrorResponse, OTPRequestRequest$1 as OTPRequestRequest, OTPRequestResponse$1 as OTPRequestResponse, OTPVerifyRequest$1 as OTPVerifyRequest, OTPVerifyResponse$1 as OTPVerifyResponse, User$1 as User };
483
- }
484
-
542
+ type OAuthCallbackRequestRequest = {
543
+ /**
544
+ * Authorization code from OAuth provider callback
545
+ */
546
+ code: string;
547
+ /**
548
+ * Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path
549
+ */
550
+ redirect_uri?: string;
551
+ /**
552
+ * State token for CSRF verification (from authorize response)
553
+ */
554
+ state: string;
555
+ };
485
556
  /**
486
- * API endpoints for Accounts.
557
+ * Serializer for OAuth connection info (user-facing).
487
558
  */
488
- declare class Accounts {
489
- private client;
490
- constructor(client: any);
559
+ type OAuthConnection = {
491
560
  /**
492
- * Request OTP code to email.
561
+ * When this OAuth connection was created
493
562
  */
494
- otpRequestCreate(data: OTPRequestRequest$1): Promise<OTPRequestResponse$1>;
563
+ readonly connected_at: string;
564
+ readonly id: number;
495
565
  /**
496
- * Verify OTP code and return JWT tokens or 2FA session. If user has 2FA
497
- * enabled: - Returns requires_2fa=True with session_id - Client must
498
- * complete 2FA verification at /cfg/totp/verify/ If user has no 2FA: -
499
- * Returns JWT tokens and user data directly
566
+ * Last time this OAuth connection was used for login
500
567
  */
501
- otpVerifyCreate(data: OTPVerifyRequest$1): Promise<OTPVerifyResponse$1>;
502
- }
503
-
568
+ readonly last_login_at: string;
569
+ /**
570
+ * OAuth provider name (github, google, etc.)
571
+ *
572
+ * * `github` - GitHub
573
+ */
574
+ readonly provider: ProviderEnum;
575
+ /**
576
+ * Avatar URL from OAuth provider
577
+ */
578
+ readonly provider_avatar_url: string;
579
+ readonly provider_display: string;
580
+ /**
581
+ * Email from OAuth provider (may differ from user.email)
582
+ */
583
+ readonly provider_email: string;
584
+ /**
585
+ * Username on the OAuth provider platform
586
+ */
587
+ readonly provider_username: string;
588
+ };
504
589
  /**
505
- * HTTP Client Adapter Pattern
506
- *
507
- * Allows switching between fetch/axios/httpx without changing generated code.
508
- * Provides unified interface for making HTTP requests.
590
+ * Request to disconnect OAuth provider.
509
591
  */
510
- interface HttpRequest {
511
- method: string;
512
- url: string;
513
- headers?: Record<string, string>;
514
- body?: any;
515
- params?: Record<string, any>;
516
- /** FormData for file uploads (multipart/form-data) */
517
- formData?: FormData;
518
- /** Binary data for octet-stream uploads */
519
- binaryBody?: Blob | ArrayBuffer;
592
+ type OAuthDisconnectRequestRequest = {
520
593
  /**
521
- * Force a specific response parser. When set, overrides Content-Type sniffing.
522
- * Generated for endpoints whose primary response is binary (file downloads).
594
+ * OAuth provider to disconnect
595
+ *
596
+ * * `github` - GitHub
523
597
  */
524
- responseType?: 'json' | 'text' | 'blob';
525
- }
526
- interface HttpResponse<T = any> {
527
- data: T;
528
- status: number;
529
- statusText: string;
530
- headers: Record<string, string>;
531
- }
598
+ provider: ProviderEnum;
599
+ };
532
600
  /**
533
- * HTTP Client Adapter Interface.
534
- * Implement this to use custom HTTP clients (axios, httpx, etc.)
601
+ * Error response for OAuth endpoints.
535
602
  */
536
- interface HttpClientAdapter$1 {
537
- request<T = any>(request: HttpRequest): Promise<HttpResponse<T>>;
538
- }
603
+ type OAuthError = {
604
+ /**
605
+ * Error code
606
+ */
607
+ error: string;
608
+ /**
609
+ * Human-readable error description
610
+ */
611
+ error_description?: string;
612
+ };
539
613
  /**
540
- * Default Fetch API adapter.
541
- * Uses native browser fetch() with proper error handling.
614
+ * Response with available OAuth providers.
542
615
  */
543
- declare class FetchAdapter implements HttpClientAdapter$1 {
544
- request<T = any>(request: HttpRequest): Promise<HttpResponse<T>>;
545
- }
616
+ type OAuthProvidersResponse = {
617
+ /**
618
+ * List of available OAuth providers
619
+ */
620
+ providers: Array<{
621
+ [key: string]: unknown;
622
+ }>;
623
+ };
546
624
  /**
547
- * FetchAdapter with keepalive:true.
548
- *
549
- * Use this adapter when you need requests to survive page unload
550
- * (visibilitychange / beforeunload) — the browser will complete the request
551
- * even after the page is navigated away. Typical use: monitor / analytics flush.
625
+ * Response with JWT tokens after OAuth authentication.
552
626
  *
553
- * @example
554
- * ```typescript
555
- * import { APIClient, KeepAliveFetchAdapter } from './client';
556
- * const client = new APIClient(baseUrl, { httpClient: new KeepAliveFetchAdapter() });
557
- * ```
558
- */
559
- declare class KeepAliveFetchAdapter extends FetchAdapter {
560
- request<T = any>(request: HttpRequest): Promise<HttpResponse<T>>;
561
- }
562
-
563
- /**
564
- * API Logger with Consola
565
- * Beautiful console logging for API requests and responses
627
+ * When 2FA is required:
628
+ * - requires_2fa: True
629
+ * - session_id: UUID of 2FA verification session
630
+ * - access/refresh/user: null
566
631
  *
567
- * Installation:
568
- * npm install consola
569
- */
570
-
571
- /**
572
- * Request log data
573
- */
574
- interface RequestLog {
575
- method: string;
576
- url: string;
577
- headers?: Record<string, string>;
578
- body?: any;
579
- timestamp: number;
580
- }
581
- /**
582
- * Response log data
583
- */
584
- interface ResponseLog {
585
- status: number;
586
- statusText: string;
587
- data?: any;
588
- duration: number;
589
- timestamp: number;
590
- }
591
- /**
592
- * Error log data
593
- */
594
- interface ErrorLog {
595
- message: string;
596
- statusCode?: number;
597
- fieldErrors?: Record<string, string[]>;
598
- duration: number;
599
- timestamp: number;
600
- }
601
- /**
602
- * Logger configuration
603
- */
604
- interface LoggerConfig {
605
- /** Enable logging */
606
- enabled: boolean;
607
- /** Log requests */
608
- logRequests: boolean;
609
- /** Log responses */
610
- logResponses: boolean;
611
- /** Log errors */
612
- logErrors: boolean;
613
- /** Log request/response bodies */
614
- logBodies: boolean;
615
- /** Log headers (excluding sensitive ones) */
616
- logHeaders: boolean;
617
- /** Custom consola instance */
618
- consola?: ConsolaInstance;
619
- }
620
- /**
621
- * API Logger class
632
+ * When 2FA is not required:
633
+ * - requires_2fa: False
634
+ * - session_id: null
635
+ * - access/refresh/user: populated
622
636
  */
623
- declare class APILogger {
624
- private config;
625
- private consola;
626
- constructor(config?: Partial<LoggerConfig>);
637
+ type OAuthTokenResponse = {
627
638
  /**
628
- * Enable logging
639
+ * JWT access token (null when requires_2fa=True)
629
640
  */
630
- enable(): void;
641
+ access?: string | null;
631
642
  /**
632
- * Disable logging
643
+ * True if a new OAuth connection was created
633
644
  */
634
- disable(): void;
645
+ is_new_connection: boolean;
635
646
  /**
636
- * Update configuration
647
+ * True if a new user was created during this OAuth flow
637
648
  */
638
- setConfig(config: Partial<LoggerConfig>): void;
649
+ is_new_user: boolean;
639
650
  /**
640
- * Filter sensitive headers
651
+ * JWT refresh token (null when requires_2fa=True)
641
652
  */
642
- private filterHeaders;
653
+ refresh?: string | null;
643
654
  /**
644
- * Log request
655
+ * True if 2FA verification is required
645
656
  */
646
- logRequest(request: RequestLog): void;
657
+ requires_2fa?: boolean;
647
658
  /**
648
- * Log response
659
+ * 2FA session ID (only when requires_2fa=True)
649
660
  */
650
- logResponse(request: RequestLog, response: ResponseLog): void;
661
+ session_id?: string | null;
651
662
  /**
652
- * Log error
663
+ * True if user should be prompted to enable 2FA
653
664
  */
654
- logError(request: RequestLog, error: ErrorLog): void;
665
+ should_prompt_2fa?: boolean;
655
666
  /**
656
- * Log general info
667
+ * Authenticated user info (null when requires_2fa=True)
657
668
  */
658
- info(message: string, ...args: any[]): void;
669
+ user?: {
670
+ [key: string]: unknown;
671
+ } | null;
672
+ };
673
+ /**
674
+ * Typed error response for OTP operations.
675
+ *
676
+ * error_code values:
677
+ * - invalid_identifier — malformed email
678
+ * - cooldown — too soon after last request (retry_after = seconds)
679
+ * - hourly_limit — hourly quota exceeded (retry_after = seconds until reset)
680
+ * - daily_limit — daily quota exceeded (retry_after = seconds until reset)
681
+ * - rate_limited — IP-level rate limit hit (no retry_after)
682
+ * - user_creation_failed — internal error creating account
683
+ * - send_failed — transport error (email / SMS)
684
+ * - internal_error — unexpected server error
685
+ */
686
+ type OtpErrorResponse = {
659
687
  /**
660
- * Log warning
688
+ * Human-readable error message
661
689
  */
662
- warn(message: string, ...args: any[]): void;
690
+ error: string;
663
691
  /**
664
- * Log error
692
+ * Machine-readable error code
665
693
  */
666
- error(message: string, ...args: any[]): void;
694
+ error_code?: string | null;
667
695
  /**
668
- * Log debug
696
+ * Seconds until the client may retry (present only for rate-limit errors)
669
697
  */
670
- debug(message: string, ...args: any[]): void;
698
+ retry_after?: number | null;
699
+ };
700
+ /**
701
+ * Serializer for OTP request.
702
+ */
703
+ type OtpRequestRequest = {
671
704
  /**
672
- * Log success
705
+ * Email address for OTP delivery
673
706
  */
674
- success(message: string, ...args: any[]): void;
707
+ identifier: string;
675
708
  /**
676
- * Create a sub-logger with prefix
709
+ * Source URL for tracking registration (e.g., https://my.djangocfg.com)
677
710
  */
678
- withTag(tag: string): ConsolaInstance;
679
- }
680
-
711
+ source_url?: string;
712
+ };
681
713
  /**
682
- * Retry Configuration and Utilities
683
- *
684
- * Provides automatic retry logic for failed HTTP requests using p-retry.
685
- * Retries only on network errors and server errors (5xx), not client errors (4xx).
714
+ * OTP request response.
686
715
  */
716
+ type OtpRequestResponse = {
717
+ /**
718
+ * Success message
719
+ */
720
+ message: string;
721
+ };
687
722
  /**
688
- * Information about a failed retry attempt.
723
+ * Serializer for OTP verification.
689
724
  */
690
- interface FailedAttemptInfo {
691
- /** The error that caused the failure */
692
- error: Error;
693
- /** The attempt number (1-indexed) */
694
- attemptNumber: number;
695
- /** Number of retries left */
696
- retriesLeft: number;
697
- }
725
+ type OtpVerifyRequest = {
726
+ /**
727
+ * Email address used for OTP request
728
+ */
729
+ identifier: string;
730
+ otp: string;
731
+ /**
732
+ * Source URL for tracking login (e.g., https://my.djangocfg.com)
733
+ */
734
+ source_url?: string;
735
+ };
698
736
  /**
699
- * Retry configuration options.
737
+ * OTP verification response.
700
738
  *
701
- * Uses exponential backoff with jitter by default to avoid thundering herd.
739
+ * When 2FA is required:
740
+ * - requires_2fa: True
741
+ * - session_id: UUID of 2FA verification session
742
+ * - refresh/access/user: null
743
+ *
744
+ * When 2FA is not required:
745
+ * - requires_2fa: False
746
+ * - session_id: null
747
+ * - refresh/access/user: populated
702
748
  */
703
- interface RetryConfig {
749
+ type OtpVerifyResponse = {
704
750
  /**
705
- * Maximum number of retry attempts.
706
- * @default 3
751
+ * JWT access token (if requires_2fa is False)
707
752
  */
708
- retries?: number;
753
+ access?: string | null;
709
754
  /**
710
- * Exponential backoff factor.
711
- * @default 2
755
+ * JWT refresh token (if requires_2fa is False)
712
756
  */
713
- factor?: number;
757
+ refresh?: string | null;
714
758
  /**
715
- * Minimum wait time between retries (ms).
716
- * @default 1000
759
+ * Whether 2FA verification is required
717
760
  */
718
- minTimeout?: number;
761
+ requires_2fa?: boolean;
719
762
  /**
720
- * Maximum wait time between retries (ms).
721
- * @default 60000
763
+ * 2FA session ID (if requires_2fa is True)
722
764
  */
723
- maxTimeout?: number;
765
+ session_id?: string | null;
724
766
  /**
725
- * Add randomness to wait times (jitter).
726
- * Helps avoid thundering herd problem.
727
- * @default true
767
+ * Whether user should be prompted to enable 2FA
728
768
  */
729
- randomize?: boolean;
769
+ should_prompt_2fa?: boolean;
730
770
  /**
731
- * Callback called on each failed attempt.
771
+ * User information (if requires_2fa is False)
732
772
  */
733
- onFailedAttempt?: (info: FailedAttemptInfo) => void;
734
- }
773
+ user?: User | null;
774
+ };
735
775
  /**
736
- * Default retry configuration.
776
+ * Serializer for updating user profile.
737
777
  */
738
- declare const DEFAULT_RETRY_CONFIG: Required<RetryConfig>;
778
+ type PatchedCfgUserUpdateRequest = {
779
+ company?: string;
780
+ first_name?: string;
781
+ language?: string;
782
+ last_name?: string;
783
+ phone?: string;
784
+ position?: string;
785
+ };
739
786
  /**
740
- * Determine if an error should trigger a retry.
741
- *
742
- * Retries on:
743
- * - Network errors (connection refused, timeout, etc.)
744
- * - Server errors (5xx status codes)
745
- * - Rate limiting (429 status code)
746
- *
747
- * Does NOT retry on:
748
- * - Client errors (4xx except 429)
749
- * - Authentication errors (401, 403)
750
- * - Not found (404)
751
- *
752
- * @param error - The error to check
753
- * @returns true if should retry, false otherwise
787
+ * * `github` - GitHub
754
788
  */
755
- declare function shouldRetry(error: any): boolean;
789
+ declare enum ProviderEnum {
790
+ GITHUB = "github"
791
+ }
756
792
  /**
757
- * Wrap a function with retry logic.
758
- *
759
- * @param fn - Async function to retry
760
- * @param config - Retry configuration
761
- * @returns Result of the function
762
- *
763
- * @example
764
- * ```typescript
765
- * const result = await withRetry(
766
- * async () => fetch('https://api.example.com/users'),
767
- * { retries: 5, minTimeout: 2000 }
768
- * );
769
- * ```
793
+ * Serializer for starting 2FA setup.
770
794
  */
771
- declare function withRetry<T>(fn: () => Promise<T>, config?: RetryConfig): Promise<T>;
772
-
795
+ type SetupRequest = {
796
+ /**
797
+ * Device name for identification (e.g., 'My iPhone')
798
+ */
799
+ device_name?: string;
800
+ };
773
801
  /**
774
- * Async API client for Django CFG API.
775
- *
776
- * Usage:
777
- * ```typescript
778
- * const client = new APIClient('https://api.example.com');
779
- * const users = await client.users.list();
780
- * const post = await client.posts.create(newPost);
781
- *
782
- * // Custom HTTP adapter (e.g., Axios)
783
- * const client = new APIClient('https://api.example.com', {
784
- * httpClient: new AxiosAdapter()
785
- * });
786
- * ```
802
+ * Response serializer for setup initiation.
787
803
  */
788
- declare class APIClient {
789
- private baseUrl;
790
- private httpClient;
791
- private logger;
792
- private retryConfig;
793
- private tokenGetter;
794
- auth: Auth;
795
- oauth: Oauth;
796
- user_profile: UserProfile;
797
- accounts: Accounts;
798
- constructor(baseUrl: string, options?: {
799
- httpClient?: HttpClientAdapter$1;
800
- loggerConfig?: Partial<LoggerConfig>;
801
- retryConfig?: RetryConfig;
802
- tokenGetter?: () => string | null;
803
- });
804
+ type SetupResponse = {
804
805
  /**
805
- * Get CSRF token from cookies (for SessionAuthentication).
806
- *
807
- * Returns null if cookie doesn't exist (JWT-only auth).
806
+ * Device ID to use for confirmation
808
807
  */
809
- getCsrfToken(): string | null;
808
+ device_id: string;
810
809
  /**
811
- * Get the base URL for building streaming/download URLs.
810
+ * Seconds until setup expires (typically 600 = 10 minutes)
812
811
  */
813
- getBaseUrl(): string;
812
+ expires_in: number;
814
813
  /**
815
- * Get JWT token for URL authentication (used in streaming endpoints).
816
- * Returns null if no token getter is configured or no token is available.
814
+ * otpauth:// URI for QR code generation
817
815
  */
818
- getToken(): string | null;
816
+ provisioning_uri: string;
819
817
  /**
820
- * Make HTTP request with Django CSRF and session handling.
821
- * Automatically retries on network errors and 5xx server errors.
818
+ * Base64-encoded QR code image (data URI)
822
819
  */
823
- request<T>(method: string, path: string, options?: {
824
- params?: Record<string, any>;
825
- body?: any;
826
- formData?: FormData;
827
- binaryBody?: Blob | ArrayBuffer;
828
- headers?: Record<string, string>;
829
- responseType?: 'json' | 'text' | 'blob';
830
- }): Promise<T>;
820
+ qr_code_base64: string;
831
821
  /**
832
- * Internal request method (without retry wrapper).
833
- * Used by request() method with optional retry logic.
822
+ * Base32-encoded TOTP secret (for manual entry)
834
823
  */
835
- private _makeRequest;
836
- }
837
-
824
+ secret: string;
825
+ };
826
+ type TokenRefresh = {
827
+ readonly access: string;
828
+ refresh: string;
829
+ };
830
+ type TokenRefreshRequest = {
831
+ refresh: string;
832
+ };
833
+ /**
834
+ * User data returned after 2FA verification.
835
+ */
836
+ type TotpVerifyUser = {
837
+ readonly avatar: string | null;
838
+ company?: string;
839
+ readonly date_joined: string;
840
+ /**
841
+ * Get formatted username for display.
842
+ */
843
+ readonly display_username: string;
844
+ readonly email: string;
845
+ first_name?: string;
846
+ /**
847
+ * Get user's full name.
848
+ */
849
+ readonly full_name: string;
850
+ readonly id: number;
851
+ /**
852
+ * Get user's initials for avatar fallback.
853
+ */
854
+ readonly initials: string;
855
+ /**
856
+ * Staff status
857
+ *
858
+ * Designates whether the user can log into this admin site.
859
+ */
860
+ readonly is_staff: boolean;
861
+ /**
862
+ * Superuser status
863
+ *
864
+ * Designates that this user has all permissions without explicitly assigning them.
865
+ */
866
+ readonly is_superuser: boolean;
867
+ language?: string;
868
+ readonly last_login: string | null;
869
+ last_name?: string;
870
+ phone?: string;
871
+ position?: string;
872
+ readonly unanswered_messages_count: number;
873
+ };
874
+ /**
875
+ * Serializer for user details.
876
+ */
877
+ type User = {
878
+ readonly avatar: string | null;
879
+ readonly centrifugo: CentrifugoToken | null;
880
+ company?: string;
881
+ readonly date_joined: string;
882
+ /**
883
+ * Get formatted username for display.
884
+ */
885
+ readonly display_username: string;
886
+ readonly email: string;
887
+ first_name?: string;
888
+ /**
889
+ * Get user's full name.
890
+ */
891
+ readonly full_name: string;
892
+ readonly id: number;
893
+ /**
894
+ * Get user's initials for avatar fallback.
895
+ */
896
+ readonly initials: string;
897
+ /**
898
+ * Staff status
899
+ *
900
+ * Designates whether the user can log into this admin site.
901
+ */
902
+ readonly is_staff: boolean;
903
+ /**
904
+ * Superuser status
905
+ *
906
+ * Designates that this user has all permissions without explicitly assigning them.
907
+ */
908
+ readonly is_superuser: boolean;
909
+ language?: string;
910
+ readonly last_login: string | null;
911
+ last_name?: string;
912
+ phone?: string;
913
+ position?: string;
914
+ readonly unanswered_messages_count: number;
915
+ };
916
+ /**
917
+ * Serializer for backup code verification during login.
918
+ */
919
+ type VerifyBackupRequest = {
920
+ /**
921
+ * 8-character backup recovery code
922
+ */
923
+ backup_code: string;
924
+ /**
925
+ * 2FA session ID from login response
926
+ */
927
+ session_id: string;
928
+ };
929
+ /**
930
+ * Serializer for TOTP code verification during login.
931
+ */
932
+ type VerifyRequest = {
933
+ /**
934
+ * 6-digit TOTP code from authenticator app
935
+ */
936
+ code: string;
937
+ /**
938
+ * 2FA session ID from login response
939
+ */
940
+ session_id: string;
941
+ };
942
+ /**
943
+ * Response serializer for successful 2FA verification.
944
+ */
945
+ type VerifyResponse = {
946
+ /**
947
+ * JWT access token
948
+ */
949
+ access_token: string;
950
+ message: string;
951
+ /**
952
+ * JWT refresh token
953
+ */
954
+ refresh_token: string;
955
+ /**
956
+ * Number of remaining backup codes (if backup code was used)
957
+ */
958
+ remaining_backup_codes?: number;
959
+ /**
960
+ * User profile data
961
+ */
962
+ user: TotpVerifyUser;
963
+ /**
964
+ * Warning message (e.g., low backup codes)
965
+ */
966
+ warning?: string;
967
+ };
838
968
  /**
839
- * Storage adapters for cross-platform token storage.
969
+ * Response serializer for device list endpoint.
970
+ */
971
+ type DeviceListResponseWritable = {
972
+ devices: Array<unknown>;
973
+ has_2fa_enabled: boolean;
974
+ };
975
+ /**
976
+ * OTP verification response.
977
+ *
978
+ * When 2FA is required:
979
+ * - requires_2fa: True
980
+ * - session_id: UUID of 2FA verification session
981
+ * - refresh/access/user: null
840
982
  *
841
- * Supports:
842
- * - LocalStorage (browser)
843
- * - Cookies (SSR/browser)
844
- * - Memory (Node.js/Electron/testing)
983
+ * When 2FA is not required:
984
+ * - requires_2fa: False
985
+ * - session_id: null
986
+ * - refresh/access/user: populated
845
987
  */
846
-
988
+ type OtpVerifyResponseWritable = {
989
+ /**
990
+ * JWT access token (if requires_2fa is False)
991
+ */
992
+ access?: string | null;
993
+ /**
994
+ * JWT refresh token (if requires_2fa is False)
995
+ */
996
+ refresh?: string | null;
997
+ /**
998
+ * Whether 2FA verification is required
999
+ */
1000
+ requires_2fa?: boolean;
1001
+ /**
1002
+ * 2FA session ID (if requires_2fa is True)
1003
+ */
1004
+ session_id?: string | null;
1005
+ /**
1006
+ * Whether user should be prompted to enable 2FA
1007
+ */
1008
+ should_prompt_2fa?: boolean;
1009
+ /**
1010
+ * User information (if requires_2fa is False)
1011
+ */
1012
+ user?: UserWritable | null;
1013
+ };
1014
+ type TokenRefreshWritable = {
1015
+ refresh: string;
1016
+ };
1017
+ /**
1018
+ * User data returned after 2FA verification.
1019
+ */
1020
+ type TotpVerifyUserWritable = {
1021
+ company?: string;
1022
+ first_name?: string;
1023
+ language?: string;
1024
+ last_name?: string;
1025
+ phone?: string;
1026
+ position?: string;
1027
+ };
1028
+ /**
1029
+ * Serializer for user details.
1030
+ */
1031
+ type UserWritable = {
1032
+ company?: string;
1033
+ first_name?: string;
1034
+ language?: string;
1035
+ last_name?: string;
1036
+ phone?: string;
1037
+ position?: string;
1038
+ };
847
1039
  /**
848
- * Storage adapter interface for cross-platform token storage.
1040
+ * Response serializer for successful 2FA verification.
849
1041
  */
1042
+ type VerifyResponseWritable = {
1043
+ /**
1044
+ * JWT access token
1045
+ */
1046
+ access_token: string;
1047
+ message: string;
1048
+ /**
1049
+ * JWT refresh token
1050
+ */
1051
+ refresh_token: string;
1052
+ /**
1053
+ * Number of remaining backup codes (if backup code was used)
1054
+ */
1055
+ remaining_backup_codes?: number;
1056
+ /**
1057
+ * User profile data
1058
+ */
1059
+ user: TotpVerifyUserWritable;
1060
+ /**
1061
+ * Warning message (e.g., low backup codes)
1062
+ */
1063
+ warning?: string;
1064
+ };
1065
+ type CfgAccountsOauthConnectionsListData = {
1066
+ body?: never;
1067
+ path?: never;
1068
+ query?: never;
1069
+ url: '/cfg/accounts/oauth/connections/';
1070
+ };
1071
+ type CfgAccountsOauthConnectionsListResponses = {
1072
+ 200: Array<OAuthConnection>;
1073
+ };
1074
+ type CfgAccountsOauthConnectionsListResponse = CfgAccountsOauthConnectionsListResponses[keyof CfgAccountsOauthConnectionsListResponses];
1075
+ type CfgAccountsOauthDisconnectCreateData = {
1076
+ body: OAuthDisconnectRequestRequest;
1077
+ path?: never;
1078
+ query?: never;
1079
+ url: '/cfg/accounts/oauth/disconnect/';
1080
+ };
1081
+ type CfgAccountsOauthDisconnectCreateErrors = {
1082
+ 400: OAuthError;
1083
+ 404: OAuthError;
1084
+ };
1085
+ type CfgAccountsOauthDisconnectCreateError = CfgAccountsOauthDisconnectCreateErrors[keyof CfgAccountsOauthDisconnectCreateErrors];
1086
+ type CfgAccountsOauthDisconnectCreateResponses = {
1087
+ 200: {
1088
+ message?: string;
1089
+ };
1090
+ };
1091
+ type CfgAccountsOauthDisconnectCreateResponse = CfgAccountsOauthDisconnectCreateResponses[keyof CfgAccountsOauthDisconnectCreateResponses];
1092
+ type CfgAccountsOauthGithubAuthorizeCreateData = {
1093
+ body?: OAuthAuthorizeRequestRequest;
1094
+ path?: never;
1095
+ query?: never;
1096
+ url: '/cfg/accounts/oauth/github/authorize/';
1097
+ };
1098
+ type CfgAccountsOauthGithubAuthorizeCreateErrors = {
1099
+ 503: OAuthError;
1100
+ };
1101
+ type CfgAccountsOauthGithubAuthorizeCreateError = CfgAccountsOauthGithubAuthorizeCreateErrors[keyof CfgAccountsOauthGithubAuthorizeCreateErrors];
1102
+ type CfgAccountsOauthGithubAuthorizeCreateResponses = {
1103
+ 200: OAuthAuthorizeResponse;
1104
+ };
1105
+ type CfgAccountsOauthGithubAuthorizeCreateResponse = CfgAccountsOauthGithubAuthorizeCreateResponses[keyof CfgAccountsOauthGithubAuthorizeCreateResponses];
1106
+ type CfgAccountsOauthGithubCallbackCreateData = {
1107
+ body: OAuthCallbackRequestRequest;
1108
+ path?: never;
1109
+ query?: never;
1110
+ url: '/cfg/accounts/oauth/github/callback/';
1111
+ };
1112
+ type CfgAccountsOauthGithubCallbackCreateErrors = {
1113
+ 400: OAuthError;
1114
+ };
1115
+ type CfgAccountsOauthGithubCallbackCreateError = CfgAccountsOauthGithubCallbackCreateErrors[keyof CfgAccountsOauthGithubCallbackCreateErrors];
1116
+ type CfgAccountsOauthGithubCallbackCreateResponses = {
1117
+ 200: OAuthTokenResponse;
1118
+ };
1119
+ type CfgAccountsOauthGithubCallbackCreateResponse = CfgAccountsOauthGithubCallbackCreateResponses[keyof CfgAccountsOauthGithubCallbackCreateResponses];
1120
+ type CfgAccountsOauthProvidersRetrieveData = {
1121
+ body?: never;
1122
+ path?: never;
1123
+ query?: never;
1124
+ url: '/cfg/accounts/oauth/providers/';
1125
+ };
1126
+ type CfgAccountsOauthProvidersRetrieveResponses = {
1127
+ 200: OAuthProvidersResponse;
1128
+ };
1129
+ type CfgAccountsOauthProvidersRetrieveResponse = CfgAccountsOauthProvidersRetrieveResponses[keyof CfgAccountsOauthProvidersRetrieveResponses];
1130
+ type CfgAccountsOtpRequestCreateData = {
1131
+ body: OtpRequestRequest;
1132
+ path?: never;
1133
+ query?: never;
1134
+ url: '/cfg/accounts/otp/request/';
1135
+ };
1136
+ type CfgAccountsOtpRequestCreateErrors = {
1137
+ 400: OtpErrorResponse;
1138
+ 429: OtpErrorResponse;
1139
+ 500: OtpErrorResponse;
1140
+ };
1141
+ type CfgAccountsOtpRequestCreateError = CfgAccountsOtpRequestCreateErrors[keyof CfgAccountsOtpRequestCreateErrors];
1142
+ type CfgAccountsOtpRequestCreateResponses = {
1143
+ 200: OtpRequestResponse;
1144
+ };
1145
+ type CfgAccountsOtpRequestCreateResponse = CfgAccountsOtpRequestCreateResponses[keyof CfgAccountsOtpRequestCreateResponses];
1146
+ type CfgAccountsOtpVerifyCreateData = {
1147
+ body: OtpVerifyRequest;
1148
+ path?: never;
1149
+ query?: never;
1150
+ url: '/cfg/accounts/otp/verify/';
1151
+ };
1152
+ type CfgAccountsOtpVerifyCreateErrors = {
1153
+ 401: OtpErrorResponse;
1154
+ 429: OtpErrorResponse;
1155
+ };
1156
+ type CfgAccountsOtpVerifyCreateError = CfgAccountsOtpVerifyCreateErrors[keyof CfgAccountsOtpVerifyCreateErrors];
1157
+ type CfgAccountsOtpVerifyCreateResponses = {
1158
+ 200: OtpVerifyResponse;
1159
+ };
1160
+ type CfgAccountsOtpVerifyCreateResponse = CfgAccountsOtpVerifyCreateResponses[keyof CfgAccountsOtpVerifyCreateResponses];
1161
+ type CfgAccountsProfileRetrieveData = {
1162
+ body?: never;
1163
+ path?: never;
1164
+ query?: never;
1165
+ url: '/cfg/accounts/profile/';
1166
+ };
1167
+ type CfgAccountsProfileRetrieveErrors = {
1168
+ /**
1169
+ * Authentication credentials were not provided.
1170
+ */
1171
+ 401: unknown;
1172
+ };
1173
+ type CfgAccountsProfileRetrieveResponses = {
1174
+ 200: User;
1175
+ };
1176
+ type CfgAccountsProfileRetrieveResponse = CfgAccountsProfileRetrieveResponses[keyof CfgAccountsProfileRetrieveResponses];
1177
+ type CfgAccountsProfileAvatarCreateData = {
1178
+ body?: {
1179
+ /**
1180
+ * Avatar image file (JPEG, PNG, GIF, WebP, max 5MB)
1181
+ */
1182
+ avatar: Blob | File;
1183
+ };
1184
+ path?: never;
1185
+ query?: never;
1186
+ url: '/cfg/accounts/profile/avatar/';
1187
+ };
1188
+ type CfgAccountsProfileAvatarCreateErrors = {
1189
+ /**
1190
+ * Invalid file or validation error.
1191
+ */
1192
+ 400: unknown;
1193
+ /**
1194
+ * Authentication credentials were not provided.
1195
+ */
1196
+ 401: unknown;
1197
+ };
1198
+ type CfgAccountsProfileAvatarCreateResponses = {
1199
+ 200: User;
1200
+ };
1201
+ type CfgAccountsProfileAvatarCreateResponse = CfgAccountsProfileAvatarCreateResponses[keyof CfgAccountsProfileAvatarCreateResponses];
1202
+ type CfgAccountsProfileDeleteCreateData = {
1203
+ body?: never;
1204
+ path?: never;
1205
+ query?: never;
1206
+ url: '/cfg/accounts/profile/delete/';
1207
+ };
1208
+ type CfgAccountsProfileDeleteCreateErrors = {
1209
+ /**
1210
+ * Account is already deleted.
1211
+ */
1212
+ 400: unknown;
1213
+ /**
1214
+ * Authentication credentials were not provided.
1215
+ */
1216
+ 401: unknown;
1217
+ };
1218
+ type CfgAccountsProfileDeleteCreateResponses = {
1219
+ 200: AccountDeleteResponse;
1220
+ };
1221
+ type CfgAccountsProfileDeleteCreateResponse = CfgAccountsProfileDeleteCreateResponses[keyof CfgAccountsProfileDeleteCreateResponses];
1222
+ type CfgAccountsProfilePartialPartialUpdateData = {
1223
+ body?: PatchedCfgUserUpdateRequest;
1224
+ path?: never;
1225
+ query?: never;
1226
+ url: '/cfg/accounts/profile/partial/';
1227
+ };
1228
+ type CfgAccountsProfilePartialPartialUpdateErrors = {
1229
+ /**
1230
+ * Invalid data provided.
1231
+ */
1232
+ 400: unknown;
1233
+ /**
1234
+ * Authentication credentials were not provided.
1235
+ */
1236
+ 401: unknown;
1237
+ };
1238
+ type CfgAccountsProfilePartialPartialUpdateResponses = {
1239
+ 200: User;
1240
+ };
1241
+ type CfgAccountsProfilePartialPartialUpdateResponse = CfgAccountsProfilePartialPartialUpdateResponses[keyof CfgAccountsProfilePartialPartialUpdateResponses];
1242
+ type CfgAccountsProfilePartialUpdateData = {
1243
+ body?: CfgUserUpdateRequest;
1244
+ path?: never;
1245
+ query?: never;
1246
+ url: '/cfg/accounts/profile/partial/';
1247
+ };
1248
+ type CfgAccountsProfilePartialUpdateErrors = {
1249
+ /**
1250
+ * Invalid data provided.
1251
+ */
1252
+ 400: unknown;
1253
+ /**
1254
+ * Authentication credentials were not provided.
1255
+ */
1256
+ 401: unknown;
1257
+ };
1258
+ type CfgAccountsProfilePartialUpdateResponses = {
1259
+ 200: User;
1260
+ };
1261
+ type CfgAccountsProfilePartialUpdateResponse = CfgAccountsProfilePartialUpdateResponses[keyof CfgAccountsProfilePartialUpdateResponses];
1262
+ type CfgAccountsProfileUpdatePartialUpdateData = {
1263
+ body?: PatchedCfgUserUpdateRequest;
1264
+ path?: never;
1265
+ query?: never;
1266
+ url: '/cfg/accounts/profile/update/';
1267
+ };
1268
+ type CfgAccountsProfileUpdatePartialUpdateErrors = {
1269
+ /**
1270
+ * Invalid data provided.
1271
+ */
1272
+ 400: unknown;
1273
+ /**
1274
+ * Authentication credentials were not provided.
1275
+ */
1276
+ 401: unknown;
1277
+ };
1278
+ type CfgAccountsProfileUpdatePartialUpdateResponses = {
1279
+ 200: User;
1280
+ };
1281
+ type CfgAccountsProfileUpdatePartialUpdateResponse = CfgAccountsProfileUpdatePartialUpdateResponses[keyof CfgAccountsProfileUpdatePartialUpdateResponses];
1282
+ type CfgAccountsProfileUpdateUpdateData = {
1283
+ body?: CfgUserUpdateRequest;
1284
+ path?: never;
1285
+ query?: never;
1286
+ url: '/cfg/accounts/profile/update/';
1287
+ };
1288
+ type CfgAccountsProfileUpdateUpdateErrors = {
1289
+ /**
1290
+ * Invalid data provided.
1291
+ */
1292
+ 400: unknown;
1293
+ /**
1294
+ * Authentication credentials were not provided.
1295
+ */
1296
+ 401: unknown;
1297
+ };
1298
+ type CfgAccountsProfileUpdateUpdateResponses = {
1299
+ 200: User;
1300
+ };
1301
+ type CfgAccountsProfileUpdateUpdateResponse = CfgAccountsProfileUpdateUpdateResponses[keyof CfgAccountsProfileUpdateUpdateResponses];
1302
+ type CfgAccountsTokenRefreshCreateData = {
1303
+ body: TokenRefreshRequest;
1304
+ path?: never;
1305
+ query?: never;
1306
+ url: '/cfg/accounts/token/refresh/';
1307
+ };
1308
+ type CfgAccountsTokenRefreshCreateResponses = {
1309
+ 200: TokenRefresh;
1310
+ };
1311
+ type CfgAccountsTokenRefreshCreateResponse = CfgAccountsTokenRefreshCreateResponses[keyof CfgAccountsTokenRefreshCreateResponses];
1312
+ type CfgCentrifugoAuthTokenRetrieveData = {
1313
+ body?: never;
1314
+ path?: never;
1315
+ query?: never;
1316
+ url: '/cfg/centrifugo/auth/token/';
1317
+ };
1318
+ type CfgCentrifugoAuthTokenRetrieveErrors = {
1319
+ /**
1320
+ * Unauthorized - authentication required
1321
+ */
1322
+ 401: unknown;
1323
+ /**
1324
+ * Server error
1325
+ */
1326
+ 500: unknown;
1327
+ };
1328
+ type CfgCentrifugoAuthTokenRetrieveResponses = {
1329
+ 200: ConnectionTokenResponse;
1330
+ };
1331
+ type CfgCentrifugoAuthTokenRetrieveResponse = CfgCentrifugoAuthTokenRetrieveResponses[keyof CfgCentrifugoAuthTokenRetrieveResponses];
1332
+ type CfgTotpBackupCodesRetrieveData = {
1333
+ body?: never;
1334
+ path?: never;
1335
+ query?: never;
1336
+ url: '/cfg/totp/backup-codes/';
1337
+ };
1338
+ type CfgTotpBackupCodesRetrieveResponses = {
1339
+ 200: BackupCodesStatus;
1340
+ };
1341
+ type CfgTotpBackupCodesRetrieveResponse = CfgTotpBackupCodesRetrieveResponses[keyof CfgTotpBackupCodesRetrieveResponses];
1342
+ type CfgTotpBackupCodesRegenerateCreateData = {
1343
+ body: BackupCodesRegenerateRequest;
1344
+ path?: never;
1345
+ query?: never;
1346
+ url: '/cfg/totp/backup-codes/regenerate/';
1347
+ };
1348
+ type CfgTotpBackupCodesRegenerateCreateErrors = {
1349
+ /**
1350
+ * Invalid code or 2FA not enabled
1351
+ */
1352
+ 400: unknown;
1353
+ };
1354
+ type CfgTotpBackupCodesRegenerateCreateResponses = {
1355
+ 200: BackupCodesRegenerateResponse;
1356
+ };
1357
+ type CfgTotpBackupCodesRegenerateCreateResponse = CfgTotpBackupCodesRegenerateCreateResponses[keyof CfgTotpBackupCodesRegenerateCreateResponses];
1358
+ type CfgTotpDevicesRetrieveData = {
1359
+ body?: never;
1360
+ path?: never;
1361
+ query?: never;
1362
+ url: '/cfg/totp/devices/';
1363
+ };
1364
+ type CfgTotpDevicesRetrieveResponses = {
1365
+ 200: DeviceListResponse;
1366
+ };
1367
+ type CfgTotpDevicesRetrieveResponse = CfgTotpDevicesRetrieveResponses[keyof CfgTotpDevicesRetrieveResponses];
1368
+ type CfgTotpDevicesDestroyData = {
1369
+ body?: never;
1370
+ path: {
1371
+ id: string;
1372
+ };
1373
+ query?: never;
1374
+ url: '/cfg/totp/devices/{id}/';
1375
+ };
1376
+ type CfgTotpDevicesDestroyResponses = {
1377
+ /**
1378
+ * No response body
1379
+ */
1380
+ 204: void;
1381
+ };
1382
+ type CfgTotpDevicesDestroyResponse = CfgTotpDevicesDestroyResponses[keyof CfgTotpDevicesDestroyResponses];
1383
+ type CfgTotpDisableCreateData = {
1384
+ body: DisableRequest;
1385
+ path?: never;
1386
+ query?: never;
1387
+ url: '/cfg/totp/disable/';
1388
+ };
1389
+ type CfgTotpDisableCreateErrors = {
1390
+ /**
1391
+ * Invalid code
1392
+ */
1393
+ 400: unknown;
1394
+ };
1395
+ type CfgTotpDisableCreateResponses = {
1396
+ /**
1397
+ * 2FA disabled successfully
1398
+ */
1399
+ 200: unknown;
1400
+ };
1401
+ type CfgTotpSetupCreateData = {
1402
+ body?: SetupRequest;
1403
+ path?: never;
1404
+ query?: never;
1405
+ url: '/cfg/totp/setup/';
1406
+ };
1407
+ type CfgTotpSetupCreateErrors = {
1408
+ /**
1409
+ * 2FA already enabled or invalid request
1410
+ */
1411
+ 400: unknown;
1412
+ };
1413
+ type CfgTotpSetupCreateResponses = {
1414
+ 200: SetupResponse;
1415
+ };
1416
+ type CfgTotpSetupCreateResponse = CfgTotpSetupCreateResponses[keyof CfgTotpSetupCreateResponses];
1417
+ type CfgTotpSetupConfirmCreateData = {
1418
+ body: ConfirmSetupRequest;
1419
+ path?: never;
1420
+ query?: never;
1421
+ url: '/cfg/totp/setup/confirm/';
1422
+ };
1423
+ type CfgTotpSetupConfirmCreateErrors = {
1424
+ /**
1425
+ * Invalid code or setup expired
1426
+ */
1427
+ 400: unknown;
1428
+ };
1429
+ type CfgTotpSetupConfirmCreateResponses = {
1430
+ 200: ConfirmSetupResponse;
1431
+ };
1432
+ type CfgTotpSetupConfirmCreateResponse = CfgTotpSetupConfirmCreateResponses[keyof CfgTotpSetupConfirmCreateResponses];
1433
+ type CfgTotpVerifyCreateData = {
1434
+ body: VerifyRequest;
1435
+ path?: never;
1436
+ query?: never;
1437
+ url: '/cfg/totp/verify/';
1438
+ };
1439
+ type CfgTotpVerifyCreateErrors = {
1440
+ /**
1441
+ * Invalid code or session
1442
+ */
1443
+ 400: unknown;
1444
+ /**
1445
+ * Too many attempts
1446
+ */
1447
+ 403: unknown;
1448
+ };
1449
+ type CfgTotpVerifyCreateResponses = {
1450
+ 200: VerifyResponse;
1451
+ };
1452
+ type CfgTotpVerifyCreateResponse = CfgTotpVerifyCreateResponses[keyof CfgTotpVerifyCreateResponses];
1453
+ type CfgTotpVerifyBackupCreateData = {
1454
+ body: VerifyBackupRequest;
1455
+ path?: never;
1456
+ query?: never;
1457
+ url: '/cfg/totp/verify/backup/';
1458
+ };
1459
+ type CfgTotpVerifyBackupCreateErrors = {
1460
+ /**
1461
+ * Invalid backup code or session
1462
+ */
1463
+ 400: unknown;
1464
+ };
1465
+ type CfgTotpVerifyBackupCreateResponses = {
1466
+ 200: VerifyResponse;
1467
+ };
1468
+ type CfgTotpVerifyBackupCreateResponse = CfgTotpVerifyBackupCreateResponses[keyof CfgTotpVerifyBackupCreateResponses];
1469
+
850
1470
  interface StorageAdapter {
851
1471
  getItem(key: string): string | null;
852
1472
  setItem(key: string, value: string): void;
853
1473
  removeItem(key: string): void;
1474
+ clear?(): void;
854
1475
  }
855
- /**
856
- * LocalStorage adapter with safe try-catch for browser environments.
857
- * Works in modern browsers with localStorage support.
858
- *
859
- * Note: This adapter uses window.localStorage and should only be used in browser/client environments.
860
- * For server-side usage, use MemoryStorageAdapter or CookieStorageAdapter instead.
861
- */
1476
+ /** Browser localStorage. Falls back to no-op on SSR / private mode. */
862
1477
  declare class LocalStorageAdapter implements StorageAdapter {
863
- private logger?;
864
- constructor(logger?: APILogger);
865
1478
  getItem(key: string): string | null;
866
1479
  setItem(key: string, value: string): void;
867
1480
  removeItem(key: string): void;
1481
+ clear(): void;
868
1482
  }
869
- /**
870
- * Cookie-based storage adapter for SSR and browser environments.
871
- * Useful for Next.js, Nuxt.js, and other SSR frameworks.
872
- */
873
- declare class CookieStorageAdapter implements StorageAdapter {
874
- private logger?;
875
- constructor(logger?: APILogger);
1483
+ /** In-memory store. Use for SSR, Electron main process, or tests. */
1484
+ declare class MemoryStorageAdapter implements StorageAdapter {
1485
+ private store;
876
1486
  getItem(key: string): string | null;
877
1487
  setItem(key: string, value: string): void;
878
1488
  removeItem(key: string): void;
1489
+ clear(): void;
879
1490
  }
880
- /**
881
- * In-memory storage adapter for Node.js, Electron, and testing environments.
882
- * Data is stored in RAM and cleared when process exits.
883
- */
884
- declare class MemoryStorageAdapter implements StorageAdapter {
885
- private storage;
886
- private logger?;
887
- constructor(logger?: APILogger);
1491
+ /** Cookie-backed storage (browser only). */
1492
+ declare class CookieStorageAdapter implements StorageAdapter {
1493
+ private opts;
1494
+ constructor(opts?: {
1495
+ domain?: string;
1496
+ path?: string;
1497
+ secure?: boolean;
1498
+ sameSite?: "Strict" | "Lax" | "None";
1499
+ maxAgeSeconds?: number;
1500
+ });
888
1501
  getItem(key: string): string | null;
889
1502
  setItem(key: string, value: string): void;
890
1503
  removeItem(key: string): void;
891
1504
  }
892
1505
 
893
- /**
894
- * Zod schema for AccountDeleteResponse
895
- *
896
- * This schema provides runtime validation and type inference.
897
- * * Response serializer for account deletion.
898
- * */
899
-
900
- /**
901
- * Response serializer for account deletion.
902
- */
903
- declare const AccountDeleteResponseSchema: z.ZodObject<{
904
- success: z.ZodBoolean;
905
- message: z.ZodString;
906
- }, z.core.$strip>;
907
- /**
908
- * Infer TypeScript type from Zod schema
909
- */
910
- type AccountDeleteResponse = z.infer<typeof AccountDeleteResponseSchema>;
1506
+ interface RequestLog {
1507
+ method: string;
1508
+ url: string;
1509
+ headers?: Record<string, string>;
1510
+ body?: any;
1511
+ timestamp: number;
1512
+ }
1513
+ interface ResponseLog {
1514
+ status: number;
1515
+ statusText: string;
1516
+ data?: any;
1517
+ duration: number;
1518
+ timestamp: number;
1519
+ }
1520
+ interface ErrorLog {
1521
+ message: string;
1522
+ statusCode?: number;
1523
+ fieldErrors?: Record<string, string[]>;
1524
+ duration: number;
1525
+ timestamp: number;
1526
+ }
1527
+ interface LoggerConfig {
1528
+ enabled: boolean;
1529
+ logRequests: boolean;
1530
+ logResponses: boolean;
1531
+ logErrors: boolean;
1532
+ logBodies: boolean;
1533
+ logHeaders: boolean;
1534
+ consola?: ConsolaInstance;
1535
+ }
1536
+ declare class APILogger {
1537
+ private config;
1538
+ private consola;
1539
+ constructor(config?: Partial<LoggerConfig>);
1540
+ enable(): void;
1541
+ disable(): void;
1542
+ setConfig(config: Partial<LoggerConfig>): void;
1543
+ private filterHeaders;
1544
+ logRequest(request: RequestLog): void;
1545
+ logResponse(request: RequestLog, response: ResponseLog): void;
1546
+ logError(request: RequestLog, error: ErrorLog): void;
1547
+ info(message: string, ...args: any[]): void;
1548
+ warn(message: string, ...args: any[]): void;
1549
+ error(message: string, ...args: any[]): void;
1550
+ debug(message: string, ...args: any[]): void;
1551
+ success(message: string, ...args: any[]): void;
1552
+ withTag(tag: string): ConsolaInstance;
1553
+ }
1554
+ declare const defaultLogger: APILogger;
911
1555
 
1556
+ interface APIOptions$2 {
1557
+ /** Override storage backend (LocalStorage by default; Memory for SSR/tests). */
1558
+ storage?: StorageAdapter;
1559
+ /** Logger config (defaults to dev-only). */
1560
+ logger?: Partial<LoggerConfig>;
1561
+ /** Locale for `Accept-Language`. If omitted, auto-detected from cookie/navigator. */
1562
+ locale?: string;
1563
+ /** API key sent as `X-API-Key`. Falls back to NEXT_PUBLIC_API_KEY. */
1564
+ apiKey?: string;
1565
+ /** Send Django session/CSRF cookies cross-origin. Defaults to true. */
1566
+ withCredentials?: boolean;
1567
+ }
912
1568
  /**
913
- * Zod schema for CentrifugoToken
1569
+ * Self-contained API wrapper for this group.
914
1570
  *
915
- * This schema provides runtime validation and type inference.
916
- * * Nested serializer for Centrifugo WebSocket connection token.
917
- * */
1571
+ * Each group has its own client + interceptor + token store. The interceptor
1572
+ * automatically attaches:
1573
+ * - `Authorization: Bearer <jwt>` from storage
1574
+ * - `Accept-Language` from `opts.locale` or `NEXT_LOCALE` cookie
1575
+ * - `X-API-Key` from `opts.apiKey` or `NEXT_PUBLIC_API_KEY`
1576
+ * - `credentials: 'include'` for Django session/CSRF cookies (toggle via opts)
1577
+ */
1578
+ declare class API$2 {
1579
+ private baseUrl;
1580
+ private storage;
1581
+ private locale;
1582
+ private apiKey;
1583
+ readonly logger: APILogger;
1584
+ constructor(baseUrl: string, opts?: APIOptions$2);
1585
+ getBaseUrl(): string;
1586
+ setBaseUrl(url: string): void;
1587
+ getToken(): string | null;
1588
+ setToken(token: string | null): void;
1589
+ getRefreshToken(): string | null;
1590
+ setRefreshToken(token: string | null): void;
1591
+ clearToken(): void;
1592
+ isAuthenticated(): boolean;
1593
+ getLocale(): string | null;
1594
+ setLocale(locale: string | null): void;
1595
+ getApiKey(): string | null;
1596
+ setApiKey(key: string | null): void;
1597
+ }
918
1598
 
919
1599
  /**
920
- * Nested serializer for Centrifugo WebSocket connection token.
921
- */
922
- declare const CentrifugoTokenSchema: z.ZodObject<{
923
- token: z.ZodString;
924
- centrifugo_url: z.ZodString;
925
- expires_at: z.ZodString;
926
- channels: z.ZodArray<z.ZodString>;
927
- }, z.core.$strip>;
928
- /**
929
- * Infer TypeScript type from Zod schema
930
- */
931
- type CentrifugoToken = z.infer<typeof CentrifugoTokenSchema>;
932
-
933
- /**
934
- * Zod schema for CfgAccountsProfileAvatarCreateRequest
935
- *
936
- * This schema provides runtime validation and type inference.
937
- * */
938
-
939
- declare const CfgAccountsProfileAvatarCreateRequestSchema: z.ZodObject<{
940
- avatar: z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>]>;
941
- }, z.core.$strip>;
942
- /**
943
- * Infer TypeScript type from Zod schema
944
- */
945
- type CfgAccountsProfileAvatarCreateRequest = z.infer<typeof CfgAccountsProfileAvatarCreateRequestSchema>;
946
-
947
- /**
948
- * Zod schema for OAuthAuthorizeRequestRequest
949
- *
950
- * This schema provides runtime validation and type inference.
951
- * * Request to start OAuth flow.
952
- * */
953
-
954
- /**
955
- * Request to start OAuth flow.
956
- */
957
- declare const OAuthAuthorizeRequestRequestSchema: z.ZodObject<{
958
- redirect_uri: z.ZodOptional<z.ZodString>;
959
- source_url: z.ZodOptional<z.ZodString>;
960
- }, z.core.$strip>;
961
- /**
962
- * Infer TypeScript type from Zod schema
963
- */
964
- type OAuthAuthorizeRequestRequest = z.infer<typeof OAuthAuthorizeRequestRequestSchema>;
965
-
966
- /**
967
- * Zod schema for OAuthAuthorizeResponse
968
- *
969
- * This schema provides runtime validation and type inference.
970
- * * Response with OAuth authorization URL.
971
- * */
972
-
973
- /**
974
- * Response with OAuth authorization URL.
975
- */
976
- declare const OAuthAuthorizeResponseSchema: z.ZodObject<{
977
- authorization_url: z.ZodString;
978
- state: z.ZodString;
979
- }, z.core.$strip>;
980
- /**
981
- * Infer TypeScript type from Zod schema
982
- */
983
- type OAuthAuthorizeResponse = z.infer<typeof OAuthAuthorizeResponseSchema>;
984
-
985
- /**
986
- * Zod schema for OAuthCallbackRequestRequest
987
- *
988
- * This schema provides runtime validation and type inference.
989
- * * Request to complete OAuth flow (callback handler).
990
- * */
991
-
992
- /**
993
- * Request to complete OAuth flow (callback handler).
994
- */
995
- declare const OAuthCallbackRequestRequestSchema: z.ZodObject<{
996
- code: z.ZodString;
997
- state: z.ZodString;
998
- redirect_uri: z.ZodOptional<z.ZodString>;
999
- }, z.core.$strip>;
1000
- /**
1001
- * Infer TypeScript type from Zod schema
1002
- */
1003
- type OAuthCallbackRequestRequest = z.infer<typeof OAuthCallbackRequestRequestSchema>;
1004
-
1005
- /**
1006
- * Zod schema for OAuthConnection
1007
- *
1008
- * This schema provides runtime validation and type inference.
1009
- * * Serializer for OAuth connection info (user-facing).
1010
- * */
1011
-
1012
- /**
1013
- * Serializer for OAuth connection info (user-facing).
1014
- */
1015
- declare const OAuthConnectionSchema: z.ZodObject<{
1016
- id: z.ZodNumber;
1017
- provider: z.ZodEnum<typeof OAuthConnectionProvider>;
1018
- provider_display: z.ZodString;
1019
- provider_username: z.ZodString;
1020
- provider_email: z.ZodEmail;
1021
- provider_avatar_url: z.ZodString;
1022
- connected_at: z.ZodString;
1023
- last_login_at: z.ZodString;
1024
- }, z.core.$strip>;
1025
- /**
1026
- * Infer TypeScript type from Zod schema
1027
- */
1028
- type OAuthConnection = z.infer<typeof OAuthConnectionSchema>;
1029
-
1030
- /**
1031
- * Zod schema for OAuthDisconnectRequestRequest
1032
- *
1033
- * This schema provides runtime validation and type inference.
1034
- * * Request to disconnect OAuth provider.
1035
- * */
1036
-
1037
- /**
1038
- * Request to disconnect OAuth provider.
1039
- */
1040
- declare const OAuthDisconnectRequestRequestSchema: z.ZodObject<{
1041
- provider: z.ZodEnum<typeof OAuthConnectionProvider>;
1042
- }, z.core.$strip>;
1043
- /**
1044
- * Infer TypeScript type from Zod schema
1045
- */
1046
- type OAuthDisconnectRequestRequest = z.infer<typeof OAuthDisconnectRequestRequestSchema>;
1047
-
1048
- /**
1049
- * Zod schema for OAuthError
1050
- *
1051
- * This schema provides runtime validation and type inference.
1052
- * * Error response for OAuth endpoints.
1053
- * */
1054
-
1055
- /**
1056
- * Error response for OAuth endpoints.
1057
- */
1058
- declare const OAuthErrorSchema: z.ZodObject<{
1059
- error: z.ZodString;
1060
- error_description: z.ZodOptional<z.ZodString>;
1061
- }, z.core.$strip>;
1062
- /**
1063
- * Infer TypeScript type from Zod schema
1064
- */
1065
- type OAuthError = z.infer<typeof OAuthErrorSchema>;
1066
-
1067
- /**
1068
- * Zod schema for OAuthProvidersResponse
1069
- *
1070
- * This schema provides runtime validation and type inference.
1071
- * * Response with available OAuth providers.
1072
- * */
1073
-
1074
- /**
1075
- * Response with available OAuth providers.
1076
- */
1077
- declare const OAuthProvidersResponseSchema: z.ZodObject<{
1078
- providers: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
1079
- }, z.core.$strip>;
1080
- /**
1081
- * Infer TypeScript type from Zod schema
1082
- */
1083
- type OAuthProvidersResponse = z.infer<typeof OAuthProvidersResponseSchema>;
1084
-
1085
- /**
1086
- * Zod schema for OAuthTokenResponse
1087
- *
1088
- * This schema provides runtime validation and type inference.
1089
- * * Response with JWT tokens after OAuth authentication.
1090
-
1091
- When 2FA is required:
1092
- - requires_2fa: True
1093
- - session_id: UUID of 2FA verification session
1094
- - access/refresh/user: null
1095
-
1096
- When 2FA is not required:
1097
- - requires_2fa: False
1098
- - session_id: null
1099
- - access/refresh/user: populated
1100
- * */
1101
-
1102
- /**
1103
- * Response with JWT tokens after OAuth authentication.
1104
-
1105
- When 2FA is required:
1106
- - requires_2fa: True
1107
- - session_id: UUID of 2FA verification session
1108
- - access/refresh/user: null
1109
-
1110
- When 2FA is not required:
1111
- - requires_2fa: False
1112
- - session_id: null
1113
- - access/refresh/user: populated
1114
- */
1115
- declare const OAuthTokenResponseSchema: z.ZodObject<{
1116
- requires_2fa: z.ZodOptional<z.ZodBoolean>;
1117
- session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1118
- access: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1119
- refresh: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1120
- user: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
1121
- is_new_user: z.ZodBoolean;
1122
- is_new_connection: z.ZodBoolean;
1123
- should_prompt_2fa: z.ZodOptional<z.ZodBoolean>;
1124
- }, z.core.$strip>;
1125
- /**
1126
- * Infer TypeScript type from Zod schema
1127
- */
1128
- type OAuthTokenResponse = z.infer<typeof OAuthTokenResponseSchema>;
1129
-
1130
- /**
1131
- * Zod schema for OTPErrorResponse
1132
- *
1133
- * This schema provides runtime validation and type inference.
1134
- * * Typed error response for OTP operations.
1135
-
1136
- error_code values:
1137
- - invalid_identifier — malformed email
1138
- - cooldown — too soon after last request (retry_after = seconds)
1139
- - hourly_limit — hourly quota exceeded (retry_after = seconds until reset)
1140
- - daily_limit — daily quota exceeded (retry_after = seconds until reset)
1141
- - rate_limited — IP-level rate limit hit (no retry_after)
1142
- - user_creation_failed — internal error creating account
1143
- - send_failed — transport error (email / SMS)
1144
- - internal_error — unexpected server error
1145
- * */
1146
-
1147
- /**
1148
- * Typed error response for OTP operations.
1149
-
1150
- error_code values:
1151
- - invalid_identifier — malformed email
1152
- - cooldown — too soon after last request (retry_after = seconds)
1153
- - hourly_limit — hourly quota exceeded (retry_after = seconds until reset)
1154
- - daily_limit — daily quota exceeded (retry_after = seconds until reset)
1155
- - rate_limited — IP-level rate limit hit (no retry_after)
1156
- - user_creation_failed — internal error creating account
1157
- - send_failed — transport error (email / SMS)
1158
- - internal_error — unexpected server error
1159
- */
1160
- declare const OTPErrorResponseSchema: z.ZodObject<{
1161
- error: z.ZodString;
1162
- error_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1163
- retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1164
- }, z.core.$strip>;
1165
- /**
1166
- * Infer TypeScript type from Zod schema
1167
- */
1168
- type OTPErrorResponse = z.infer<typeof OTPErrorResponseSchema>;
1169
-
1170
- /**
1171
- * Zod schema for OTPRequestRequest
1172
- *
1173
- * This schema provides runtime validation and type inference.
1174
- * * Serializer for OTP request.
1175
- * */
1176
-
1177
- /**
1178
- * Serializer for OTP request.
1179
- */
1180
- declare const OTPRequestRequestSchema: z.ZodObject<{
1181
- identifier: z.ZodString;
1182
- source_url: z.ZodOptional<z.ZodString>;
1183
- }, z.core.$strip>;
1184
- /**
1185
- * Infer TypeScript type from Zod schema
1186
- */
1187
- type OTPRequestRequest = z.infer<typeof OTPRequestRequestSchema>;
1188
-
1189
- /**
1190
- * Zod schema for OTPRequestResponse
1191
- *
1192
- * This schema provides runtime validation and type inference.
1193
- * * OTP request response.
1194
- * */
1195
-
1196
- /**
1197
- * OTP request response.
1198
- */
1199
- declare const OTPRequestResponseSchema: z.ZodObject<{
1200
- message: z.ZodString;
1201
- }, z.core.$strip>;
1202
- /**
1203
- * Infer TypeScript type from Zod schema
1204
- */
1205
- type OTPRequestResponse = z.infer<typeof OTPRequestResponseSchema>;
1206
-
1207
- /**
1208
- * Zod schema for OTPVerifyRequest
1209
- *
1210
- * This schema provides runtime validation and type inference.
1211
- * * Serializer for OTP verification.
1212
- * */
1213
-
1214
- /**
1215
- * Serializer for OTP verification.
1216
- */
1217
- declare const OTPVerifyRequestSchema: z.ZodObject<{
1218
- identifier: z.ZodString;
1219
- otp: z.ZodString;
1220
- source_url: z.ZodOptional<z.ZodString>;
1221
- }, z.core.$strip>;
1222
- /**
1223
- * Infer TypeScript type from Zod schema
1224
- */
1225
- type OTPVerifyRequest = z.infer<typeof OTPVerifyRequestSchema>;
1226
-
1227
- /**
1228
- * Zod schema for OTPVerifyResponse
1229
- *
1230
- * This schema provides runtime validation and type inference.
1231
- * * OTP verification response.
1232
-
1233
- When 2FA is required:
1234
- - requires_2fa: True
1235
- - session_id: UUID of 2FA verification session
1236
- - refresh/access/user: null
1237
-
1238
- When 2FA is not required:
1239
- - requires_2fa: False
1240
- - session_id: null
1241
- - refresh/access/user: populated
1242
- * */
1243
-
1244
- /**
1245
- * OTP verification response.
1246
-
1247
- When 2FA is required:
1248
- - requires_2fa: True
1249
- - session_id: UUID of 2FA verification session
1250
- - refresh/access/user: null
1251
-
1252
- When 2FA is not required:
1253
- - requires_2fa: False
1254
- - session_id: null
1255
- - refresh/access/user: populated
1256
- */
1257
- declare const OTPVerifyResponseSchema: z.ZodObject<{
1258
- requires_2fa: z.ZodOptional<z.ZodBoolean>;
1259
- session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1260
- refresh: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1261
- access: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1262
- user: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1263
- id: z.ZodNumber;
1264
- email: z.ZodEmail;
1265
- first_name: z.ZodOptional<z.ZodString>;
1266
- last_name: z.ZodOptional<z.ZodString>;
1267
- full_name: z.ZodString;
1268
- initials: z.ZodString;
1269
- display_username: z.ZodString;
1270
- company: z.ZodOptional<z.ZodString>;
1271
- phone: z.ZodOptional<z.ZodString>;
1272
- position: z.ZodOptional<z.ZodString>;
1273
- language: z.ZodOptional<z.ZodString>;
1274
- avatar: z.ZodNullable<z.ZodString>;
1275
- is_staff: z.ZodBoolean;
1276
- is_superuser: z.ZodBoolean;
1277
- date_joined: z.ZodString;
1278
- last_login: z.ZodNullable<z.ZodString>;
1279
- unanswered_messages_count: z.ZodNumber;
1280
- centrifugo: z.ZodNullable<z.ZodObject<{
1281
- token: z.ZodString;
1282
- centrifugo_url: z.ZodString;
1283
- expires_at: z.ZodString;
1284
- channels: z.ZodArray<z.ZodString>;
1285
- }, z.core.$strip>>;
1286
- }, z.core.$strip>>>;
1287
- should_prompt_2fa: z.ZodOptional<z.ZodBoolean>;
1288
- }, z.core.$strip>;
1289
- /**
1290
- * Infer TypeScript type from Zod schema
1291
- */
1292
- type OTPVerifyResponse = z.infer<typeof OTPVerifyResponseSchema>;
1293
-
1294
- /**
1295
- * Zod schema for PatchedUserProfileUpdateRequest
1296
- *
1297
- * This schema provides runtime validation and type inference.
1298
- * * Serializer for updating user profile.
1299
- * */
1300
-
1301
- /**
1302
- * Serializer for updating user profile.
1303
- */
1304
- declare const PatchedUserProfileUpdateRequestSchema: z.ZodObject<{
1305
- first_name: z.ZodOptional<z.ZodString>;
1306
- last_name: z.ZodOptional<z.ZodString>;
1307
- company: z.ZodOptional<z.ZodString>;
1308
- phone: z.ZodOptional<z.ZodString>;
1309
- position: z.ZodOptional<z.ZodString>;
1310
- language: z.ZodOptional<z.ZodString>;
1311
- }, z.core.$strip>;
1312
- /**
1313
- * Infer TypeScript type from Zod schema
1314
- */
1315
- type PatchedUserProfileUpdateRequest = z.infer<typeof PatchedUserProfileUpdateRequestSchema>;
1316
-
1317
- /**
1318
- * Zod schema for TokenRefresh
1319
- *
1320
- * This schema provides runtime validation and type inference.
1321
- * */
1322
-
1323
- declare const TokenRefreshSchema: z.ZodObject<{
1324
- access: z.ZodString;
1325
- refresh: z.ZodString;
1326
- }, z.core.$strip>;
1327
- /**
1328
- * Infer TypeScript type from Zod schema
1329
- */
1330
- type TokenRefresh = z.infer<typeof TokenRefreshSchema>;
1331
-
1332
- /**
1333
- * Zod schema for TokenRefreshRequest
1334
- *
1335
- * This schema provides runtime validation and type inference.
1336
- * */
1337
-
1338
- declare const TokenRefreshRequestSchema: z.ZodObject<{
1339
- refresh: z.ZodString;
1340
- }, z.core.$strip>;
1341
- /**
1342
- * Infer TypeScript type from Zod schema
1343
- */
1344
- type TokenRefreshRequest = z.infer<typeof TokenRefreshRequestSchema>;
1345
-
1346
- /**
1347
- * Zod schema for User
1348
- *
1349
- * This schema provides runtime validation and type inference.
1350
- * * Serializer for user details.
1351
- * */
1352
-
1353
- /**
1354
- * Serializer for user details.
1355
- */
1356
- declare const UserSchema: z.ZodObject<{
1357
- id: z.ZodNumber;
1358
- email: z.ZodEmail;
1359
- first_name: z.ZodOptional<z.ZodString>;
1360
- last_name: z.ZodOptional<z.ZodString>;
1361
- full_name: z.ZodString;
1362
- initials: z.ZodString;
1363
- display_username: z.ZodString;
1364
- company: z.ZodOptional<z.ZodString>;
1365
- phone: z.ZodOptional<z.ZodString>;
1366
- position: z.ZodOptional<z.ZodString>;
1367
- language: z.ZodOptional<z.ZodString>;
1368
- avatar: z.ZodNullable<z.ZodString>;
1369
- is_staff: z.ZodBoolean;
1370
- is_superuser: z.ZodBoolean;
1371
- date_joined: z.ZodString;
1372
- last_login: z.ZodNullable<z.ZodString>;
1373
- unanswered_messages_count: z.ZodNumber;
1374
- centrifugo: z.ZodNullable<z.ZodObject<{
1375
- token: z.ZodString;
1376
- centrifugo_url: z.ZodString;
1377
- expires_at: z.ZodString;
1378
- channels: z.ZodArray<z.ZodString>;
1379
- }, z.core.$strip>>;
1380
- }, z.core.$strip>;
1381
- /**
1382
- * Infer TypeScript type from Zod schema
1383
- */
1384
- type User = z.infer<typeof UserSchema>;
1385
-
1386
- /**
1387
- * Zod schema for UserProfileUpdateRequest
1388
- *
1389
- * This schema provides runtime validation and type inference.
1390
- * * Serializer for updating user profile.
1391
- * */
1392
-
1393
- /**
1394
- * Serializer for updating user profile.
1395
- */
1396
- declare const UserProfileUpdateRequestSchema: z.ZodObject<{
1397
- first_name: z.ZodOptional<z.ZodString>;
1398
- last_name: z.ZodOptional<z.ZodString>;
1399
- company: z.ZodOptional<z.ZodString>;
1400
- phone: z.ZodOptional<z.ZodString>;
1401
- position: z.ZodOptional<z.ZodString>;
1402
- language: z.ZodOptional<z.ZodString>;
1403
- }, z.core.$strip>;
1404
- /**
1405
- * Infer TypeScript type from Zod schema
1406
- */
1407
- type UserProfileUpdateRequest = z.infer<typeof UserProfileUpdateRequestSchema>;
1408
-
1409
- /**
1410
- * Zod Schemas - Runtime validation and type inference
1411
- *
1412
- * Auto-generated from OpenAPI specification.
1413
- * Provides runtime validation for API requests and responses.
1414
- *
1415
- * Usage:
1416
- * ```typescript
1417
- * import { UserSchema } from './schemas'
1418
- *
1419
- * // Validate data
1420
- * const user = UserSchema.parse(data)
1421
- *
1422
- * // Type inference
1423
- * type User = z.infer<typeof UserSchema>
1424
- * ```
1600
+ * HTTP API Error with DRF field-specific validation errors.
1425
1601
  */
1426
-
1427
- type index$2_AccountDeleteResponse = AccountDeleteResponse;
1428
- declare const index$2_AccountDeleteResponseSchema: typeof AccountDeleteResponseSchema;
1429
- type index$2_CentrifugoToken = CentrifugoToken;
1430
- declare const index$2_CentrifugoTokenSchema: typeof CentrifugoTokenSchema;
1431
- type index$2_CfgAccountsProfileAvatarCreateRequest = CfgAccountsProfileAvatarCreateRequest;
1432
- declare const index$2_CfgAccountsProfileAvatarCreateRequestSchema: typeof CfgAccountsProfileAvatarCreateRequestSchema;
1433
- type index$2_OAuthAuthorizeRequestRequest = OAuthAuthorizeRequestRequest;
1434
- declare const index$2_OAuthAuthorizeRequestRequestSchema: typeof OAuthAuthorizeRequestRequestSchema;
1435
- type index$2_OAuthAuthorizeResponse = OAuthAuthorizeResponse;
1436
- declare const index$2_OAuthAuthorizeResponseSchema: typeof OAuthAuthorizeResponseSchema;
1437
- type index$2_OAuthCallbackRequestRequest = OAuthCallbackRequestRequest;
1438
- declare const index$2_OAuthCallbackRequestRequestSchema: typeof OAuthCallbackRequestRequestSchema;
1439
- type index$2_OAuthConnection = OAuthConnection;
1440
- declare const index$2_OAuthConnectionSchema: typeof OAuthConnectionSchema;
1441
- type index$2_OAuthDisconnectRequestRequest = OAuthDisconnectRequestRequest;
1442
- declare const index$2_OAuthDisconnectRequestRequestSchema: typeof OAuthDisconnectRequestRequestSchema;
1443
- type index$2_OAuthError = OAuthError;
1444
- declare const index$2_OAuthErrorSchema: typeof OAuthErrorSchema;
1445
- type index$2_OAuthProvidersResponse = OAuthProvidersResponse;
1446
- declare const index$2_OAuthProvidersResponseSchema: typeof OAuthProvidersResponseSchema;
1447
- type index$2_OAuthTokenResponse = OAuthTokenResponse;
1448
- declare const index$2_OAuthTokenResponseSchema: typeof OAuthTokenResponseSchema;
1449
- type index$2_OTPErrorResponse = OTPErrorResponse;
1450
- declare const index$2_OTPErrorResponseSchema: typeof OTPErrorResponseSchema;
1451
- type index$2_OTPRequestRequest = OTPRequestRequest;
1452
- declare const index$2_OTPRequestRequestSchema: typeof OTPRequestRequestSchema;
1453
- type index$2_OTPRequestResponse = OTPRequestResponse;
1454
- declare const index$2_OTPRequestResponseSchema: typeof OTPRequestResponseSchema;
1455
- type index$2_OTPVerifyRequest = OTPVerifyRequest;
1456
- declare const index$2_OTPVerifyRequestSchema: typeof OTPVerifyRequestSchema;
1457
- type index$2_OTPVerifyResponse = OTPVerifyResponse;
1458
- declare const index$2_OTPVerifyResponseSchema: typeof OTPVerifyResponseSchema;
1459
- type index$2_PatchedUserProfileUpdateRequest = PatchedUserProfileUpdateRequest;
1460
- declare const index$2_PatchedUserProfileUpdateRequestSchema: typeof PatchedUserProfileUpdateRequestSchema;
1461
- type index$2_TokenRefresh = TokenRefresh;
1462
- type index$2_TokenRefreshRequest = TokenRefreshRequest;
1463
- declare const index$2_TokenRefreshRequestSchema: typeof TokenRefreshRequestSchema;
1464
- declare const index$2_TokenRefreshSchema: typeof TokenRefreshSchema;
1465
- type index$2_User = User;
1466
- type index$2_UserProfileUpdateRequest = UserProfileUpdateRequest;
1467
- declare const index$2_UserProfileUpdateRequestSchema: typeof UserProfileUpdateRequestSchema;
1468
- declare const index$2_UserSchema: typeof UserSchema;
1469
- declare namespace index$2 {
1470
- export { type index$2_AccountDeleteResponse as AccountDeleteResponse, index$2_AccountDeleteResponseSchema as AccountDeleteResponseSchema, type index$2_CentrifugoToken as CentrifugoToken, index$2_CentrifugoTokenSchema as CentrifugoTokenSchema, type index$2_CfgAccountsProfileAvatarCreateRequest as CfgAccountsProfileAvatarCreateRequest, index$2_CfgAccountsProfileAvatarCreateRequestSchema as CfgAccountsProfileAvatarCreateRequestSchema, type index$2_OAuthAuthorizeRequestRequest as OAuthAuthorizeRequestRequest, index$2_OAuthAuthorizeRequestRequestSchema as OAuthAuthorizeRequestRequestSchema, type index$2_OAuthAuthorizeResponse as OAuthAuthorizeResponse, index$2_OAuthAuthorizeResponseSchema as OAuthAuthorizeResponseSchema, type index$2_OAuthCallbackRequestRequest as OAuthCallbackRequestRequest, index$2_OAuthCallbackRequestRequestSchema as OAuthCallbackRequestRequestSchema, type index$2_OAuthConnection as OAuthConnection, index$2_OAuthConnectionSchema as OAuthConnectionSchema, type index$2_OAuthDisconnectRequestRequest as OAuthDisconnectRequestRequest, index$2_OAuthDisconnectRequestRequestSchema as OAuthDisconnectRequestRequestSchema, type index$2_OAuthError as OAuthError, index$2_OAuthErrorSchema as OAuthErrorSchema, type index$2_OAuthProvidersResponse as OAuthProvidersResponse, index$2_OAuthProvidersResponseSchema as OAuthProvidersResponseSchema, type index$2_OAuthTokenResponse as OAuthTokenResponse, index$2_OAuthTokenResponseSchema as OAuthTokenResponseSchema, type index$2_OTPErrorResponse as OTPErrorResponse, index$2_OTPErrorResponseSchema as OTPErrorResponseSchema, type index$2_OTPRequestRequest as OTPRequestRequest, index$2_OTPRequestRequestSchema as OTPRequestRequestSchema, type index$2_OTPRequestResponse as OTPRequestResponse, index$2_OTPRequestResponseSchema as OTPRequestResponseSchema, type index$2_OTPVerifyRequest as OTPVerifyRequest, index$2_OTPVerifyRequestSchema as OTPVerifyRequestSchema, type index$2_OTPVerifyResponse as OTPVerifyResponse, index$2_OTPVerifyResponseSchema as OTPVerifyResponseSchema, type index$2_PatchedUserProfileUpdateRequest as PatchedUserProfileUpdateRequest, index$2_PatchedUserProfileUpdateRequestSchema as PatchedUserProfileUpdateRequestSchema, type index$2_TokenRefresh as TokenRefresh, type index$2_TokenRefreshRequest as TokenRefreshRequest, index$2_TokenRefreshRequestSchema as TokenRefreshRequestSchema, index$2_TokenRefreshSchema as TokenRefreshSchema, type index$2_User as User, type index$2_UserProfileUpdateRequest as UserProfileUpdateRequest, index$2_UserProfileUpdateRequestSchema as UserProfileUpdateRequestSchema, index$2_UserSchema as UserSchema };
1602
+ declare class APIError extends Error {
1603
+ statusCode: number;
1604
+ statusText: string;
1605
+ response: any;
1606
+ url: string;
1607
+ constructor(statusCode: number, statusText: string, response: any, url: string, message?: string);
1608
+ get details(): Record<string, any> | null;
1609
+ get fieldErrors(): Record<string, string[]> | null;
1610
+ get errorMessage(): string;
1611
+ get isValidationError(): boolean;
1612
+ get isAuthError(): boolean;
1613
+ get isPermissionError(): boolean;
1614
+ get isNotFoundError(): boolean;
1615
+ get isServerError(): boolean;
1616
+ }
1617
+ /** Network Error (connection failed, timeout, etc.) */
1618
+ declare class NetworkError extends Error {
1619
+ url: string;
1620
+ originalError?: Error;
1621
+ constructor(message: string, url: string, originalError?: Error);
1471
1622
  }
1472
1623
 
1473
- /**
1474
- * Zod Validation Events - Browser CustomEvent integration
1475
- *
1476
- * Dispatches browser CustomEvents when Zod validation fails, allowing
1477
- * React/frontend apps to listen and handle validation errors globally.
1478
- *
1479
- * @example
1480
- * ```typescript
1481
- * // In your React app
1482
- * window.addEventListener('zod-validation-error', (event) => {
1483
- * const { operation, path, method, error, response } = event.detail;
1484
- * console.error(`Validation failed for ${method} ${path}`, error);
1485
- * // Show toast notification, log to Sentry, etc.
1486
- * });
1487
- * ```
1488
- */
1489
-
1490
- /**
1491
- * Validation error event detail
1492
- */
1493
1624
  interface ValidationErrorDetail {
1494
- /** Operation/function name that failed validation */
1495
1625
  operation: string;
1496
- /** API endpoint path */
1497
1626
  path: string;
1498
- /** HTTP method */
1499
1627
  method: string;
1500
- /** Zod validation error */
1501
1628
  error: ZodError;
1502
- /** Raw response data that failed validation */
1503
1629
  response: any;
1504
- /** Timestamp of the error */
1505
1630
  timestamp: Date;
1506
1631
  }
1507
- /**
1508
- * Custom event type for Zod validation errors
1509
- */
1510
1632
  type ValidationErrorEvent = CustomEvent<ValidationErrorDetail>;
1511
- /**
1512
- * Dispatch a Zod validation error event.
1513
- *
1514
- * Only dispatches in browser environment (when window is defined).
1515
- * Safe to call in Node.js/SSR - will be a no-op.
1516
- *
1517
- * @param detail - Validation error details
1518
- */
1519
1633
  declare function dispatchValidationError(detail: ValidationErrorDetail): void;
1520
- /**
1521
- * Add a global listener for Zod validation errors.
1522
- *
1523
- * @param callback - Function to call when validation error occurs
1524
- * @returns Cleanup function to remove the listener
1525
- *
1526
- * @example
1527
- * ```typescript
1528
- * const cleanup = onValidationError(({ operation, error }) => {
1529
- * toast.error(`Validation failed in ${operation}`);
1530
- * logToSentry(error);
1531
- * });
1532
- *
1533
- * // Later, remove listener
1534
- * cleanup();
1535
- * ```
1536
- */
1537
1634
  declare function onValidationError(callback: (detail: ValidationErrorDetail) => void): () => void;
1538
- /**
1539
- * Format Zod error for logging/display.
1540
- *
1541
- * @param error - Zod validation error
1542
- * @returns Formatted error message
1543
- */
1544
1635
  declare function formatZodError(error: ZodError): string;
1545
1636
 
1637
+ interface APIOptions$1 {
1638
+ /** Override storage backend (LocalStorage by default; Memory for SSR/tests). */
1639
+ storage?: StorageAdapter;
1640
+ /** Logger config (defaults to dev-only). */
1641
+ logger?: Partial<LoggerConfig>;
1642
+ /** Locale for `Accept-Language`. If omitted, auto-detected from cookie/navigator. */
1643
+ locale?: string;
1644
+ /** API key sent as `X-API-Key`. Falls back to NEXT_PUBLIC_API_KEY. */
1645
+ apiKey?: string;
1646
+ /** Send Django session/CSRF cookies cross-origin. Defaults to true. */
1647
+ withCredentials?: boolean;
1648
+ }
1546
1649
  /**
1547
- * API operation
1548
- *
1549
- * @method POST
1550
- * @path /cfg/accounts/otp/request/
1551
- */
1552
- declare function createAccountsOtpRequestCreate(data: OTPRequestRequest, client?: any): Promise<OTPRequestResponse>;
1553
- /**
1554
- * API operation
1555
- *
1556
- * @method POST
1557
- * @path /cfg/accounts/otp/verify/
1558
- */
1559
- declare function createAccountsOtpVerifyCreate(data: OTPVerifyRequest, client?: any): Promise<OTPVerifyResponse>;
1560
-
1561
- /**
1562
- * API operation
1563
- *
1564
- * @method POST
1565
- * @path /cfg/accounts/token/refresh/
1566
- */
1567
- declare function createAccountsTokenRefreshCreate(data: TokenRefreshRequest, client?: any): Promise<TokenRefresh>;
1568
-
1569
- /**
1570
- * List OAuth connections
1571
- *
1572
- * @method GET
1573
- * @path /cfg/accounts/oauth/connections/
1574
- */
1575
- declare function getAccountsOauthConnectionsList(client?: any): Promise<OAuthConnection[]>;
1576
- /**
1577
- * Disconnect OAuth provider
1578
- *
1579
- * @method POST
1580
- * @path /cfg/accounts/oauth/disconnect/
1581
- */
1582
- declare function createAccountsOauthDisconnectCreate(data: OAuthDisconnectRequestRequest, client?: any): Promise<any>;
1583
- /**
1584
- * Start GitHub OAuth
1585
- *
1586
- * @method POST
1587
- * @path /cfg/accounts/oauth/github/authorize/
1588
- */
1589
- declare function createAccountsOauthGithubAuthorizeCreate(data: OAuthAuthorizeRequestRequest, client?: any): Promise<OAuthAuthorizeResponse>;
1590
- /**
1591
- * Complete GitHub OAuth
1592
- *
1593
- * @method POST
1594
- * @path /cfg/accounts/oauth/github/callback/
1595
- */
1596
- declare function createAccountsOauthGithubCallbackCreate(data: OAuthCallbackRequestRequest, client?: any): Promise<OAuthTokenResponse>;
1597
- /**
1598
- * List OAuth providers
1650
+ * Self-contained API wrapper for this group.
1599
1651
  *
1600
- * @method GET
1601
- * @path /cfg/accounts/oauth/providers/
1652
+ * Each group has its own client + interceptor + token store. The interceptor
1653
+ * automatically attaches:
1654
+ * - `Authorization: Bearer <jwt>` from storage
1655
+ * - `Accept-Language` from `opts.locale` or `NEXT_LOCALE` cookie
1656
+ * - `X-API-Key` from `opts.apiKey` or `NEXT_PUBLIC_API_KEY`
1657
+ * - `credentials: 'include'` for Django session/CSRF cookies (toggle via opts)
1602
1658
  */
1603
- declare function getAccountsOauthProvidersRetrieve(client?: any): Promise<OAuthProvidersResponse>;
1659
+ declare class API$1 {
1660
+ private baseUrl;
1661
+ private storage;
1662
+ private locale;
1663
+ private apiKey;
1664
+ readonly logger: APILogger;
1665
+ constructor(baseUrl: string, opts?: APIOptions$1);
1666
+ getBaseUrl(): string;
1667
+ setBaseUrl(url: string): void;
1668
+ getToken(): string | null;
1669
+ setToken(token: string | null): void;
1670
+ getRefreshToken(): string | null;
1671
+ setRefreshToken(token: string | null): void;
1672
+ clearToken(): void;
1673
+ isAuthenticated(): boolean;
1674
+ getLocale(): string | null;
1675
+ setLocale(locale: string | null): void;
1676
+ getApiKey(): string | null;
1677
+ setApiKey(key: string | null): void;
1678
+ }
1604
1679
 
1680
+ interface APIOptions {
1681
+ /** Override storage backend (LocalStorage by default; Memory for SSR/tests). */
1682
+ storage?: StorageAdapter;
1683
+ /** Logger config (defaults to dev-only). */
1684
+ logger?: Partial<LoggerConfig>;
1685
+ /** Locale for `Accept-Language`. If omitted, auto-detected from cookie/navigator. */
1686
+ locale?: string;
1687
+ /** API key sent as `X-API-Key`. Falls back to NEXT_PUBLIC_API_KEY. */
1688
+ apiKey?: string;
1689
+ /** Send Django session/CSRF cookies cross-origin. Defaults to true. */
1690
+ withCredentials?: boolean;
1691
+ }
1605
1692
  /**
1606
- * Get current user profile
1607
- *
1608
- * @method GET
1609
- * @path /cfg/accounts/profile/
1610
- */
1611
- declare function getAccountsProfileRetrieve(client?: any): Promise<User>;
1612
- /**
1613
- * Upload user avatar
1614
- *
1615
- * @method POST
1616
- * @path /cfg/accounts/profile/avatar/
1617
- */
1618
- declare function createAccountsProfileAvatarCreate(data: CfgAccountsProfileAvatarCreateRequest, client?: any): Promise<User>;
1619
- /**
1620
- * Delete user account
1621
- *
1622
- * @method POST
1623
- * @path /cfg/accounts/profile/delete/
1624
- */
1625
- declare function createAccountsProfileDeleteCreate(client?: any): Promise<AccountDeleteResponse>;
1626
- /**
1627
- * Partial update user profile
1628
- *
1629
- * @method PUT
1630
- * @path /cfg/accounts/profile/partial/
1631
- */
1632
- declare function partialUpdateAccountsProfilePartialUpdate(data: UserProfileUpdateRequest, client?: any): Promise<User>;
1633
- /**
1634
- * Partial update user profile
1635
- *
1636
- * @method PATCH
1637
- * @path /cfg/accounts/profile/partial/
1638
- */
1639
- declare function partialUpdateAccountsProfilePartialPartialUpdate(data?: PatchedUserProfileUpdateRequest, client?: any): Promise<User>;
1640
- /**
1641
- * Update user profile
1642
- *
1643
- * @method PUT
1644
- * @path /cfg/accounts/profile/update/
1645
- */
1646
- declare function updateAccountsProfileUpdateUpdate(data: UserProfileUpdateRequest, client?: any): Promise<User>;
1647
- /**
1648
- * Update user profile
1693
+ * Self-contained API wrapper for this group.
1649
1694
  *
1650
- * @method PATCH
1651
- * @path /cfg/accounts/profile/update/
1695
+ * Each group has its own client + interceptor + token store. The interceptor
1696
+ * automatically attaches:
1697
+ * - `Authorization: Bearer <jwt>` from storage
1698
+ * - `Accept-Language` from `opts.locale` or `NEXT_LOCALE` cookie
1699
+ * - `X-API-Key` from `opts.apiKey` or `NEXT_PUBLIC_API_KEY`
1700
+ * - `credentials: 'include'` for Django session/CSRF cookies (toggle via opts)
1652
1701
  */
1653
- declare function partialUpdateAccountsProfileUpdatePartialUpdate(data?: PatchedUserProfileUpdateRequest, client?: any): Promise<User>;
1702
+ declare class API {
1703
+ private baseUrl;
1704
+ private storage;
1705
+ private locale;
1706
+ private apiKey;
1707
+ readonly logger: APILogger;
1708
+ constructor(baseUrl: string, opts?: APIOptions);
1709
+ getBaseUrl(): string;
1710
+ setBaseUrl(url: string): void;
1711
+ getToken(): string | null;
1712
+ setToken(token: string | null): void;
1713
+ getRefreshToken(): string | null;
1714
+ setRefreshToken(token: string | null): void;
1715
+ clearToken(): void;
1716
+ isAuthenticated(): boolean;
1717
+ getLocale(): string | null;
1718
+ setLocale(locale: string | null): void;
1719
+ getApiKey(): string | null;
1720
+ setApiKey(key: string | null): void;
1721
+ }
1654
1722
 
1655
- /**
1656
- * Typed Fetchers - Universal API functions
1657
- *
1658
- * Auto-generated from OpenAPI specification.
1659
- * These functions work in any JavaScript environment.
1660
- *
1661
- * Features:
1662
- * - Runtime validation with Zod
1663
- * - Type-safe parameters and responses
1664
- * - Works with any data-fetching library (SWR, React Query, etc)
1665
- * - Server Component compatible
1666
- *
1667
- * Usage:
1668
- * ```typescript
1669
- * import * as fetchers from './fetchers'
1670
- *
1671
- * // Direct usage
1672
- * const user = await fetchers.getUser(1)
1673
- *
1674
- * // With SWR
1675
- * const { data } = useSWR('user-1', () => fetchers.getUser(1))
1676
- *
1677
- * // With React Query
1678
- * const { data } = useQuery(['user', 1], () => fetchers.getUser(1))
1679
- * ```
1680
- */
1723
+ declare const CfgAccountsApi: API$2;
1724
+ declare const CfgCentrifugoApi: API$1;
1725
+ declare const CfgTotpApi: API;
1681
1726
 
1682
- declare const index$1_createAccountsOauthDisconnectCreate: typeof createAccountsOauthDisconnectCreate;
1683
- declare const index$1_createAccountsOauthGithubAuthorizeCreate: typeof createAccountsOauthGithubAuthorizeCreate;
1684
- declare const index$1_createAccountsOauthGithubCallbackCreate: typeof createAccountsOauthGithubCallbackCreate;
1685
- declare const index$1_createAccountsOtpRequestCreate: typeof createAccountsOtpRequestCreate;
1686
- declare const index$1_createAccountsOtpVerifyCreate: typeof createAccountsOtpVerifyCreate;
1687
- declare const index$1_createAccountsProfileAvatarCreate: typeof createAccountsProfileAvatarCreate;
1688
- declare const index$1_createAccountsProfileDeleteCreate: typeof createAccountsProfileDeleteCreate;
1689
- declare const index$1_createAccountsTokenRefreshCreate: typeof createAccountsTokenRefreshCreate;
1690
- declare const index$1_getAccountsOauthConnectionsList: typeof getAccountsOauthConnectionsList;
1691
- declare const index$1_getAccountsOauthProvidersRetrieve: typeof getAccountsOauthProvidersRetrieve;
1692
- declare const index$1_getAccountsProfileRetrieve: typeof getAccountsProfileRetrieve;
1693
- declare const index$1_partialUpdateAccountsProfilePartialPartialUpdate: typeof partialUpdateAccountsProfilePartialPartialUpdate;
1694
- declare const index$1_partialUpdateAccountsProfilePartialUpdate: typeof partialUpdateAccountsProfilePartialUpdate;
1695
- declare const index$1_partialUpdateAccountsProfileUpdatePartialUpdate: typeof partialUpdateAccountsProfileUpdatePartialUpdate;
1696
- declare const index$1_updateAccountsProfileUpdateUpdate: typeof updateAccountsProfileUpdateUpdate;
1697
- declare namespace index$1 {
1698
- export { index$1_createAccountsOauthDisconnectCreate as createAccountsOauthDisconnectCreate, index$1_createAccountsOauthGithubAuthorizeCreate as createAccountsOauthGithubAuthorizeCreate, index$1_createAccountsOauthGithubCallbackCreate as createAccountsOauthGithubCallbackCreate, index$1_createAccountsOtpRequestCreate as createAccountsOtpRequestCreate, index$1_createAccountsOtpVerifyCreate as createAccountsOtpVerifyCreate, index$1_createAccountsProfileAvatarCreate as createAccountsProfileAvatarCreate, index$1_createAccountsProfileDeleteCreate as createAccountsProfileDeleteCreate, index$1_createAccountsTokenRefreshCreate as createAccountsTokenRefreshCreate, index$1_getAccountsOauthConnectionsList as getAccountsOauthConnectionsList, index$1_getAccountsOauthProvidersRetrieve as getAccountsOauthProvidersRetrieve, index$1_getAccountsProfileRetrieve as getAccountsProfileRetrieve, index$1_partialUpdateAccountsProfilePartialPartialUpdate as partialUpdateAccountsProfilePartialPartialUpdate, index$1_partialUpdateAccountsProfilePartialUpdate as partialUpdateAccountsProfilePartialUpdate, index$1_partialUpdateAccountsProfileUpdatePartialUpdate as partialUpdateAccountsProfileUpdatePartialUpdate, index$1_updateAccountsProfileUpdateUpdate as updateAccountsProfileUpdateUpdate };
1727
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
1728
+ /**
1729
+ * You can provide a client instance returned by `createClient()` instead of
1730
+ * individual options. This might be also useful if you want to implement a
1731
+ * custom client.
1732
+ */
1733
+ client?: Client;
1734
+ /**
1735
+ * You can pass arbitrary values through the `meta` object. This can be
1736
+ * used to access values that aren't defined as part of the SDK function.
1737
+ */
1738
+ meta?: Record<string, unknown>;
1739
+ };
1740
+ declare class Cfg {
1741
+ /**
1742
+ * List OAuth connections
1743
+ *
1744
+ * Get all OAuth connections for the current user.
1745
+ */
1746
+ static cfgAccountsOauthConnectionsList<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthConnectionsListData, ThrowOnError>): RequestResult<CfgAccountsOauthConnectionsListResponses, unknown, ThrowOnError, "fields">;
1747
+ /**
1748
+ * Disconnect OAuth provider
1749
+ *
1750
+ * Remove OAuth connection for the specified provider.
1751
+ */
1752
+ static cfgAccountsOauthDisconnectCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthDisconnectCreateData, ThrowOnError>): RequestResult<CfgAccountsOauthDisconnectCreateResponses, CfgAccountsOauthDisconnectCreateErrors, ThrowOnError, "fields">;
1753
+ /**
1754
+ * Start GitHub OAuth
1755
+ *
1756
+ * Generate GitHub OAuth authorization URL. Redirect user to this URL to start authentication.
1757
+ */
1758
+ static cfgAccountsOauthGithubAuthorizeCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthGithubAuthorizeCreateData, ThrowOnError>): RequestResult<CfgAccountsOauthGithubAuthorizeCreateResponses, CfgAccountsOauthGithubAuthorizeCreateErrors, ThrowOnError, "fields">;
1759
+ /**
1760
+ * Complete GitHub OAuth
1761
+ *
1762
+ * Exchange authorization code for JWT tokens. Call this after GitHub redirects back with code.
1763
+ */
1764
+ static cfgAccountsOauthGithubCallbackCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthGithubCallbackCreateData, ThrowOnError>): RequestResult<CfgAccountsOauthGithubCallbackCreateResponses, CfgAccountsOauthGithubCallbackCreateErrors, ThrowOnError, "fields">;
1765
+ /**
1766
+ * List OAuth providers
1767
+ *
1768
+ * Get list of available OAuth providers for authentication.
1769
+ */
1770
+ static cfgAccountsOauthProvidersRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthProvidersRetrieveData, ThrowOnError>): RequestResult<CfgAccountsOauthProvidersRetrieveResponses, unknown, ThrowOnError, "fields">;
1771
+ /**
1772
+ * Request OTP code to email.
1773
+ */
1774
+ static cfgAccountsOtpRequestCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOtpRequestCreateData, ThrowOnError>): RequestResult<CfgAccountsOtpRequestCreateResponses, CfgAccountsOtpRequestCreateErrors, ThrowOnError, "fields">;
1775
+ /**
1776
+ * Verify OTP code and return JWT tokens or 2FA session.
1777
+ *
1778
+ * If user has 2FA enabled:
1779
+ * - Returns requires_2fa=True with session_id
1780
+ * - Client must complete 2FA verification at /cfg/totp/verify/
1781
+ *
1782
+ * If user has no 2FA:
1783
+ * - Returns JWT tokens and user data directly
1784
+ */
1785
+ static cfgAccountsOtpVerifyCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOtpVerifyCreateData, ThrowOnError>): RequestResult<CfgAccountsOtpVerifyCreateResponses, CfgAccountsOtpVerifyCreateErrors, ThrowOnError, "fields">;
1786
+ /**
1787
+ * Get current user profile
1788
+ *
1789
+ * Retrieve the current authenticated user's profile information.
1790
+ */
1791
+ static cfgAccountsProfileRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileRetrieveData, ThrowOnError>): RequestResult<CfgAccountsProfileRetrieveResponses, CfgAccountsProfileRetrieveErrors, ThrowOnError, "fields">;
1792
+ /**
1793
+ * Upload user avatar
1794
+ *
1795
+ * Upload avatar image for the current authenticated user. Accepts multipart/form-data with 'avatar' field.
1796
+ */
1797
+ static cfgAccountsProfileAvatarCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileAvatarCreateData, ThrowOnError>): RequestResult<CfgAccountsProfileAvatarCreateResponses, CfgAccountsProfileAvatarCreateErrors, ThrowOnError, "fields">;
1798
+ /**
1799
+ * Delete user account
1800
+ *
1801
+ *
1802
+ * Permanently delete the current user's account.
1803
+ *
1804
+ * This operation:
1805
+ * - Deactivates the account (user cannot log in)
1806
+ * - Anonymizes personal data (GDPR compliance)
1807
+ * - Frees up the email address for re-registration
1808
+ * - Preserves audit trail
1809
+ *
1810
+ * The account can be restored by an administrator if needed.
1811
+ *
1812
+ */
1813
+ static cfgAccountsProfileDeleteCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileDeleteCreateData, ThrowOnError>): RequestResult<CfgAccountsProfileDeleteCreateResponses, CfgAccountsProfileDeleteCreateErrors, ThrowOnError, "fields">;
1814
+ /**
1815
+ * Partial update user profile
1816
+ *
1817
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
1818
+ */
1819
+ static cfgAccountsProfilePartialPartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialPartialUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfilePartialPartialUpdateResponses, CfgAccountsProfilePartialPartialUpdateErrors, ThrowOnError, "fields">;
1820
+ /**
1821
+ * Partial update user profile
1822
+ *
1823
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
1824
+ */
1825
+ static cfgAccountsProfilePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfilePartialUpdateResponses, CfgAccountsProfilePartialUpdateErrors, ThrowOnError, "fields">;
1826
+ /**
1827
+ * Update user profile
1828
+ *
1829
+ * Update the current authenticated user's profile information.
1830
+ */
1831
+ static cfgAccountsProfileUpdatePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdatePartialUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfileUpdatePartialUpdateResponses, CfgAccountsProfileUpdatePartialUpdateErrors, ThrowOnError, "fields">;
1832
+ /**
1833
+ * Update user profile
1834
+ *
1835
+ * Update the current authenticated user's profile information.
1836
+ */
1837
+ static cfgAccountsProfileUpdateUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdateUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfileUpdateUpdateResponses, CfgAccountsProfileUpdateUpdateErrors, ThrowOnError, "fields">;
1838
+ /**
1839
+ * Refresh JWT token.
1840
+ */
1841
+ static cfgAccountsTokenRefreshCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsTokenRefreshCreateData, ThrowOnError>): RequestResult<CfgAccountsTokenRefreshCreateResponses, unknown, ThrowOnError, "fields">;
1842
+ /**
1843
+ * Get Centrifugo connection token
1844
+ *
1845
+ * Generate JWT token for WebSocket connection to Centrifugo. Token includes user's allowed channels based on their permissions. Requires authentication.
1846
+ */
1847
+ static cfgCentrifugoAuthTokenRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgCentrifugoAuthTokenRetrieveData, ThrowOnError>): RequestResult<CfgCentrifugoAuthTokenRetrieveResponses, CfgCentrifugoAuthTokenRetrieveErrors, ThrowOnError, "fields">;
1848
+ /**
1849
+ * Get backup codes status for user.
1850
+ */
1851
+ static cfgTotpBackupCodesRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgTotpBackupCodesRetrieveData, ThrowOnError>): RequestResult<CfgTotpBackupCodesRetrieveResponses, unknown, ThrowOnError, "fields">;
1852
+ /**
1853
+ * Regenerate backup codes.
1854
+ *
1855
+ * Requires TOTP code for verification.
1856
+ * Invalidates all existing codes.
1857
+ */
1858
+ static cfgTotpBackupCodesRegenerateCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpBackupCodesRegenerateCreateData, ThrowOnError>): RequestResult<CfgTotpBackupCodesRegenerateCreateResponses, CfgTotpBackupCodesRegenerateCreateErrors, ThrowOnError, "fields">;
1859
+ /**
1860
+ * List all TOTP devices for user.
1861
+ */
1862
+ static cfgTotpDevicesRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgTotpDevicesRetrieveData, ThrowOnError>): RequestResult<CfgTotpDevicesRetrieveResponses, unknown, ThrowOnError, "fields">;
1863
+ /**
1864
+ * Delete a TOTP device.
1865
+ *
1866
+ * Requires verification code if removing the last/primary device.
1867
+ */
1868
+ static cfgTotpDevicesDestroy<ThrowOnError extends boolean = false>(options: Options<CfgTotpDevicesDestroyData, ThrowOnError>): RequestResult<CfgTotpDevicesDestroyResponses, unknown, ThrowOnError, "fields">;
1869
+ /**
1870
+ * Completely disable 2FA for account.
1871
+ *
1872
+ * Requires verification code.
1873
+ */
1874
+ static cfgTotpDisableCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpDisableCreateData, ThrowOnError>): RequestResult<CfgTotpDisableCreateResponses, CfgTotpDisableCreateErrors, ThrowOnError, "fields">;
1875
+ /**
1876
+ * Start 2FA setup process.
1877
+ *
1878
+ * Creates a new TOTP device and returns QR code for scanning.
1879
+ */
1880
+ static cfgTotpSetupCreate<ThrowOnError extends boolean = false>(options?: Options<CfgTotpSetupCreateData, ThrowOnError>): RequestResult<CfgTotpSetupCreateResponses, CfgTotpSetupCreateErrors, ThrowOnError, "fields">;
1881
+ /**
1882
+ * Confirm 2FA setup with first valid code.
1883
+ *
1884
+ * Activates the device and generates backup codes.
1885
+ */
1886
+ static cfgTotpSetupConfirmCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpSetupConfirmCreateData, ThrowOnError>): RequestResult<CfgTotpSetupConfirmCreateResponses, CfgTotpSetupConfirmCreateErrors, ThrowOnError, "fields">;
1887
+ /**
1888
+ * Verify TOTP code for 2FA session.
1889
+ *
1890
+ * Completes authentication and returns JWT tokens on success.
1891
+ */
1892
+ static cfgTotpVerifyCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpVerifyCreateData, ThrowOnError>): RequestResult<CfgTotpVerifyCreateResponses, CfgTotpVerifyCreateErrors, ThrowOnError, "fields">;
1893
+ /**
1894
+ * Verify backup recovery code for 2FA session.
1895
+ *
1896
+ * Alternative verification method when TOTP device unavailable.
1897
+ */
1898
+ static cfgTotpVerifyBackupCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpVerifyBackupCreateData, ThrowOnError>): RequestResult<CfgTotpVerifyBackupCreateResponses, CfgTotpVerifyBackupCreateErrors, ThrowOnError, "fields">;
1899
+ }
1900
+ declare class Accounts {
1901
+ /**
1902
+ * List OAuth connections
1903
+ *
1904
+ * Get all OAuth connections for the current user.
1905
+ */
1906
+ static cfgAccountsOauthConnectionsList<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthConnectionsListData, ThrowOnError>): RequestResult<CfgAccountsOauthConnectionsListResponses, unknown, ThrowOnError, "fields">;
1907
+ /**
1908
+ * Disconnect OAuth provider
1909
+ *
1910
+ * Remove OAuth connection for the specified provider.
1911
+ */
1912
+ static cfgAccountsOauthDisconnectCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthDisconnectCreateData, ThrowOnError>): RequestResult<CfgAccountsOauthDisconnectCreateResponses, CfgAccountsOauthDisconnectCreateErrors, ThrowOnError, "fields">;
1913
+ /**
1914
+ * Start GitHub OAuth
1915
+ *
1916
+ * Generate GitHub OAuth authorization URL. Redirect user to this URL to start authentication.
1917
+ */
1918
+ static cfgAccountsOauthGithubAuthorizeCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthGithubAuthorizeCreateData, ThrowOnError>): RequestResult<CfgAccountsOauthGithubAuthorizeCreateResponses, CfgAccountsOauthGithubAuthorizeCreateErrors, ThrowOnError, "fields">;
1919
+ /**
1920
+ * Complete GitHub OAuth
1921
+ *
1922
+ * Exchange authorization code for JWT tokens. Call this after GitHub redirects back with code.
1923
+ */
1924
+ static cfgAccountsOauthGithubCallbackCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthGithubCallbackCreateData, ThrowOnError>): RequestResult<CfgAccountsOauthGithubCallbackCreateResponses, CfgAccountsOauthGithubCallbackCreateErrors, ThrowOnError, "fields">;
1925
+ /**
1926
+ * List OAuth providers
1927
+ *
1928
+ * Get list of available OAuth providers for authentication.
1929
+ */
1930
+ static cfgAccountsOauthProvidersRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthProvidersRetrieveData, ThrowOnError>): RequestResult<CfgAccountsOauthProvidersRetrieveResponses, unknown, ThrowOnError, "fields">;
1931
+ /**
1932
+ * Request OTP code to email.
1933
+ */
1934
+ static cfgAccountsOtpRequestCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOtpRequestCreateData, ThrowOnError>): RequestResult<CfgAccountsOtpRequestCreateResponses, CfgAccountsOtpRequestCreateErrors, ThrowOnError, "fields">;
1935
+ /**
1936
+ * Verify OTP code and return JWT tokens or 2FA session.
1937
+ *
1938
+ * If user has 2FA enabled:
1939
+ * - Returns requires_2fa=True with session_id
1940
+ * - Client must complete 2FA verification at /cfg/totp/verify/
1941
+ *
1942
+ * If user has no 2FA:
1943
+ * - Returns JWT tokens and user data directly
1944
+ */
1945
+ static cfgAccountsOtpVerifyCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOtpVerifyCreateData, ThrowOnError>): RequestResult<CfgAccountsOtpVerifyCreateResponses, CfgAccountsOtpVerifyCreateErrors, ThrowOnError, "fields">;
1946
+ /**
1947
+ * Get current user profile
1948
+ *
1949
+ * Retrieve the current authenticated user's profile information.
1950
+ */
1951
+ static cfgAccountsProfileRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileRetrieveData, ThrowOnError>): RequestResult<CfgAccountsProfileRetrieveResponses, CfgAccountsProfileRetrieveErrors, ThrowOnError, "fields">;
1952
+ /**
1953
+ * Upload user avatar
1954
+ *
1955
+ * Upload avatar image for the current authenticated user. Accepts multipart/form-data with 'avatar' field.
1956
+ */
1957
+ static cfgAccountsProfileAvatarCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileAvatarCreateData, ThrowOnError>): RequestResult<CfgAccountsProfileAvatarCreateResponses, CfgAccountsProfileAvatarCreateErrors, ThrowOnError, "fields">;
1958
+ /**
1959
+ * Delete user account
1960
+ *
1961
+ *
1962
+ * Permanently delete the current user's account.
1963
+ *
1964
+ * This operation:
1965
+ * - Deactivates the account (user cannot log in)
1966
+ * - Anonymizes personal data (GDPR compliance)
1967
+ * - Frees up the email address for re-registration
1968
+ * - Preserves audit trail
1969
+ *
1970
+ * The account can be restored by an administrator if needed.
1971
+ *
1972
+ */
1973
+ static cfgAccountsProfileDeleteCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileDeleteCreateData, ThrowOnError>): RequestResult<CfgAccountsProfileDeleteCreateResponses, CfgAccountsProfileDeleteCreateErrors, ThrowOnError, "fields">;
1974
+ /**
1975
+ * Partial update user profile
1976
+ *
1977
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
1978
+ */
1979
+ static cfgAccountsProfilePartialPartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialPartialUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfilePartialPartialUpdateResponses, CfgAccountsProfilePartialPartialUpdateErrors, ThrowOnError, "fields">;
1980
+ /**
1981
+ * Partial update user profile
1982
+ *
1983
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
1984
+ */
1985
+ static cfgAccountsProfilePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfilePartialUpdateResponses, CfgAccountsProfilePartialUpdateErrors, ThrowOnError, "fields">;
1986
+ /**
1987
+ * Update user profile
1988
+ *
1989
+ * Update the current authenticated user's profile information.
1990
+ */
1991
+ static cfgAccountsProfileUpdatePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdatePartialUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfileUpdatePartialUpdateResponses, CfgAccountsProfileUpdatePartialUpdateErrors, ThrowOnError, "fields">;
1992
+ /**
1993
+ * Update user profile
1994
+ *
1995
+ * Update the current authenticated user's profile information.
1996
+ */
1997
+ static cfgAccountsProfileUpdateUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdateUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfileUpdateUpdateResponses, CfgAccountsProfileUpdateUpdateErrors, ThrowOnError, "fields">;
1998
+ /**
1999
+ * Refresh JWT token.
2000
+ */
2001
+ static cfgAccountsTokenRefreshCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsTokenRefreshCreateData, ThrowOnError>): RequestResult<CfgAccountsTokenRefreshCreateResponses, unknown, ThrowOnError, "fields">;
1699
2002
  }
1700
-
1701
- /**
1702
- * Global API Instance - Singleton configuration with auto-configuration support
1703
- *
1704
- * This module provides a global API instance that auto-configures from
1705
- * environment variables or can be configured manually.
1706
- *
1707
- * AUTO-CONFIGURATION (recommended):
1708
- * Set one of these environment variables and the API will auto-configure:
1709
- * - NEXT_PUBLIC_API_URL (Next.js)
1710
- * - VITE_API_URL (Vite)
1711
- * - REACT_APP_API_URL (Create React App)
1712
- * - API_URL (generic)
1713
- *
1714
- * Then just use fetchers and hooks directly:
1715
- * ```typescript
1716
- * import { getUsers } from './_utils/fetchers'
1717
- * const users = await getUsers({ page: 1 })
1718
- * ```
1719
- *
1720
- * MANUAL CONFIGURATION:
1721
- * ```typescript
1722
- * import { configureAPI } from './api-instance'
1723
- *
1724
- * configureAPI({
1725
- * baseUrl: 'https://api.example.com',
1726
- * token: 'your-jwt-token'
1727
- * })
1728
- * ```
1729
- *
1730
- * For SSR or multiple instances:
1731
- * ```typescript
1732
- * import { API } from './index'
1733
- * import { getUsers } from './_utils/fetchers'
1734
- *
1735
- * const api = new API('https://api.example.com')
1736
- * const users = await getUsers({ page: 1 }, api)
1737
- * ```
1738
- */
1739
-
1740
- /**
1741
- * Get the global API instance
1742
- * Auto-configures from environment variables on first call if not manually configured.
1743
- * @throws Error if API is not configured and no env variable is set
1744
- */
1745
- declare function getAPIInstance(): API;
1746
- /**
1747
- * Check if API is configured (or can be auto-configured)
1748
- */
1749
- declare function isAPIConfigured(): boolean;
1750
- /**
1751
- * Configure the global API instance
1752
- *
1753
- * @param baseUrl - Base URL for the API
1754
- * @param options - Optional configuration (storage, retry, logger)
1755
- *
1756
- * @example
1757
- * ```typescript
1758
- * configureAPI({
1759
- * baseUrl: 'https://api.example.com',
1760
- * token: 'jwt-token',
1761
- * options: {
1762
- * retryConfig: { maxRetries: 3 },
1763
- * loggerConfig: { enabled: true }
1764
- * }
1765
- * })
1766
- * ```
1767
- */
1768
- declare function configureAPI(config: {
1769
- baseUrl: string;
1770
- token?: string;
1771
- refreshToken?: string;
1772
- options?: APIOptions;
1773
- }): API;
1774
- /**
1775
- * Reconfigure the global API instance with new settings
1776
- * Useful for updating tokens or base URL
1777
- */
1778
- declare function reconfigureAPI(updates: {
1779
- baseUrl?: string;
1780
- token?: string;
1781
- refreshToken?: string;
1782
- }): API;
1783
- /**
1784
- * Clear tokens from the global API instance
1785
- */
1786
- declare function clearAPITokens(): void;
1787
- /**
1788
- * Reset the global API instance
1789
- * Useful for testing or logout scenarios
1790
- */
1791
- declare function resetAPI(): void;
1792
-
1793
- /**
1794
- * API Error Classes
1795
- *
1796
- * Typed error classes with Django REST Framework support.
1797
- */
1798
- /**
1799
- * HTTP API Error with DRF field-specific validation errors.
1800
- *
1801
- * Usage:
1802
- * ```typescript
1803
- * try {
1804
- * await api.users.create(userData);
1805
- * } catch (error) {
1806
- * if (error instanceof APIError) {
1807
- * if (error.isValidationError) {
1808
- * console.log('Field errors:', error.fieldErrors);
1809
- * // { "email": ["Email already exists"], "username": ["Required"] }
1810
- * }
1811
- * }
1812
- * }
1813
- * ```
1814
- */
1815
- declare class APIError extends Error {
1816
- statusCode: number;
1817
- statusText: string;
1818
- response: any;
1819
- url: string;
1820
- constructor(statusCode: number, statusText: string, response: any, url: string, message?: string);
2003
+ declare class OAuth {
1821
2004
  /**
1822
- * Get error details from response.
1823
- * DRF typically returns: { "detail": "Error message" } or { "field": ["error1", "error2"] }
2005
+ * List OAuth connections
2006
+ *
2007
+ * Get all OAuth connections for the current user.
1824
2008
  */
1825
- get details(): Record<string, any> | null;
2009
+ static cfgAccountsOauthConnectionsList<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthConnectionsListData, ThrowOnError>): RequestResult<CfgAccountsOauthConnectionsListResponses, unknown, ThrowOnError, "fields">;
1826
2010
  /**
1827
- * Get field-specific validation errors from DRF.
1828
- * Returns: { "field_name": ["error1", "error2"], ... }
2011
+ * Disconnect OAuth provider
2012
+ *
2013
+ * Remove OAuth connection for the specified provider.
1829
2014
  */
1830
- get fieldErrors(): Record<string, string[]> | null;
2015
+ static cfgAccountsOauthDisconnectCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthDisconnectCreateData, ThrowOnError>): RequestResult<CfgAccountsOauthDisconnectCreateResponses, CfgAccountsOauthDisconnectCreateErrors, ThrowOnError, "fields">;
2016
+ /**
2017
+ * Start GitHub OAuth
2018
+ *
2019
+ * Generate GitHub OAuth authorization URL. Redirect user to this URL to start authentication.
2020
+ */
2021
+ static cfgAccountsOauthGithubAuthorizeCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthGithubAuthorizeCreateData, ThrowOnError>): RequestResult<CfgAccountsOauthGithubAuthorizeCreateResponses, CfgAccountsOauthGithubAuthorizeCreateErrors, ThrowOnError, "fields">;
1831
2022
  /**
1832
- * Get single error message from DRF.
1833
- * Checks for "detail", "message", or first field error.
2023
+ * Complete GitHub OAuth
2024
+ *
2025
+ * Exchange authorization code for JWT tokens. Call this after GitHub redirects back with code.
1834
2026
  */
1835
- get errorMessage(): string;
1836
- get isValidationError(): boolean;
1837
- get isAuthError(): boolean;
1838
- get isPermissionError(): boolean;
1839
- get isNotFoundError(): boolean;
1840
- get isServerError(): boolean;
2027
+ static cfgAccountsOauthGithubCallbackCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsOauthGithubCallbackCreateData, ThrowOnError>): RequestResult<CfgAccountsOauthGithubCallbackCreateResponses, CfgAccountsOauthGithubCallbackCreateErrors, ThrowOnError, "fields">;
2028
+ /**
2029
+ * List OAuth providers
2030
+ *
2031
+ * Get list of available OAuth providers for authentication.
2032
+ */
2033
+ static cfgAccountsOauthProvidersRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsOauthProvidersRetrieveData, ThrowOnError>): RequestResult<CfgAccountsOauthProvidersRetrieveResponses, unknown, ThrowOnError, "fields">;
1841
2034
  }
1842
- /**
1843
- * Network Error (connection failed, timeout, etc.)
1844
- */
1845
- declare class NetworkError extends Error {
1846
- url: string;
1847
- originalError?: Error;
1848
- constructor(message: string, url: string, originalError?: Error);
2035
+ declare class UserProfile {
2036
+ /**
2037
+ * Get current user profile
2038
+ *
2039
+ * Retrieve the current authenticated user's profile information.
2040
+ */
2041
+ static cfgAccountsProfileRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileRetrieveData, ThrowOnError>): RequestResult<CfgAccountsProfileRetrieveResponses, CfgAccountsProfileRetrieveErrors, ThrowOnError, "fields">;
2042
+ /**
2043
+ * Upload user avatar
2044
+ *
2045
+ * Upload avatar image for the current authenticated user. Accepts multipart/form-data with 'avatar' field.
2046
+ */
2047
+ static cfgAccountsProfileAvatarCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileAvatarCreateData, ThrowOnError>): RequestResult<CfgAccountsProfileAvatarCreateResponses, CfgAccountsProfileAvatarCreateErrors, ThrowOnError, "fields">;
2048
+ /**
2049
+ * Delete user account
2050
+ *
2051
+ *
2052
+ * Permanently delete the current user's account.
2053
+ *
2054
+ * This operation:
2055
+ * - Deactivates the account (user cannot log in)
2056
+ * - Anonymizes personal data (GDPR compliance)
2057
+ * - Frees up the email address for re-registration
2058
+ * - Preserves audit trail
2059
+ *
2060
+ * The account can be restored by an administrator if needed.
2061
+ *
2062
+ */
2063
+ static cfgAccountsProfileDeleteCreate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileDeleteCreateData, ThrowOnError>): RequestResult<CfgAccountsProfileDeleteCreateResponses, CfgAccountsProfileDeleteCreateErrors, ThrowOnError, "fields">;
2064
+ /**
2065
+ * Partial update user profile
2066
+ *
2067
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
2068
+ */
2069
+ static cfgAccountsProfilePartialPartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialPartialUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfilePartialPartialUpdateResponses, CfgAccountsProfilePartialPartialUpdateErrors, ThrowOnError, "fields">;
2070
+ /**
2071
+ * Partial update user profile
2072
+ *
2073
+ * Partially update the current authenticated user's profile information. Supports avatar upload.
2074
+ */
2075
+ static cfgAccountsProfilePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfilePartialUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfilePartialUpdateResponses, CfgAccountsProfilePartialUpdateErrors, ThrowOnError, "fields">;
2076
+ /**
2077
+ * Update user profile
2078
+ *
2079
+ * Update the current authenticated user's profile information.
2080
+ */
2081
+ static cfgAccountsProfileUpdatePartialUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdatePartialUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfileUpdatePartialUpdateResponses, CfgAccountsProfileUpdatePartialUpdateErrors, ThrowOnError, "fields">;
2082
+ /**
2083
+ * Update user profile
2084
+ *
2085
+ * Update the current authenticated user's profile information.
2086
+ */
2087
+ static cfgAccountsProfileUpdateUpdate<ThrowOnError extends boolean = false>(options?: Options<CfgAccountsProfileUpdateUpdateData, ThrowOnError>): RequestResult<CfgAccountsProfileUpdateUpdateResponses, CfgAccountsProfileUpdateUpdateErrors, ThrowOnError, "fields">;
1849
2088
  }
1850
-
1851
- /**
1852
- * Django CFG API - API Client with JWT Management
1853
- *
1854
- * Usage:
1855
- * ```typescript
1856
- * import { API } from './api';
1857
- *
1858
- * const api = new API('https://api.example.com');
1859
- *
1860
- * // Set JWT token
1861
- * api.setToken('your-jwt-token', 'refresh-token');
1862
- *
1863
- * // Use API
1864
- * const posts = await api.posts.list();
1865
- * const user = await api.users.retrieve(1);
1866
- *
1867
- * // Check authentication
1868
- * if (api.isAuthenticated()) {
1869
- * // ...
1870
- * }
1871
- *
1872
- * // Custom storage with logging (for Electron/Node.js)
1873
- * import { MemoryStorageAdapter, APILogger } from './storage';
1874
- * const logger = new APILogger({ enabled: true, logLevel: 'debug' });
1875
- * const api = new API('https://api.example.com', {
1876
- * storage: new MemoryStorageAdapter(logger),
1877
- * loggerConfig: { enabled: true, logLevel: 'debug' }
1878
- * });
1879
- *
1880
- * // Get OpenAPI schema
1881
- * const schema = api.getSchema();
1882
- * ```
1883
- */
1884
-
1885
- declare const TOKEN_KEY = "auth_token";
1886
- declare const REFRESH_TOKEN_KEY = "refresh_token";
1887
- interface APIOptions {
1888
- /** Custom storage adapter (defaults to LocalStorageAdapter) */
1889
- storage?: StorageAdapter;
1890
- /** Custom HTTP client adapter (defaults to FetchAdapter) */
1891
- httpClient?: HttpClientAdapter;
1892
- /** Retry configuration for failed requests */
1893
- retryConfig?: RetryConfig;
1894
- /** Logger configuration */
1895
- loggerConfig?: Partial<LoggerConfig>;
1896
- /** Locale for Accept-Language header (e.g. 'en', 'ko', 'ru') */
1897
- locale?: string;
2089
+ declare class Auth {
2090
+ /**
2091
+ * Refresh JWT token.
2092
+ */
2093
+ static cfgAccountsTokenRefreshCreate<ThrowOnError extends boolean = false>(options: Options<CfgAccountsTokenRefreshCreateData, ThrowOnError>): RequestResult<CfgAccountsTokenRefreshCreateResponses, unknown, ThrowOnError, "fields">;
1898
2094
  }
1899
- declare class API {
1900
- private baseUrl;
1901
- private _client;
1902
- private _token;
1903
- private _refreshToken;
1904
- private _locale;
1905
- private storage;
1906
- private options?;
1907
- auth: Auth;
1908
- oauth: Oauth;
1909
- user_profile: UserProfile;
1910
- accounts: Accounts;
1911
- constructor(baseUrl: string, options?: APIOptions);
1912
- private _loadTokensFromStorage;
1913
- private _reinitClients;
1914
- private _injectAuthHeader;
1915
- /**
1916
- * Get current JWT token
2095
+ declare class Centrifugo {
2096
+ /**
2097
+ * Get Centrifugo connection token
2098
+ *
2099
+ * Generate JWT token for WebSocket connection to Centrifugo. Token includes user's allowed channels based on their permissions. Requires authentication.
1917
2100
  */
1918
- getToken(): string | null;
2101
+ static cfgCentrifugoAuthTokenRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgCentrifugoAuthTokenRetrieveData, ThrowOnError>): RequestResult<CfgCentrifugoAuthTokenRetrieveResponses, CfgCentrifugoAuthTokenRetrieveErrors, ThrowOnError, "fields">;
2102
+ }
2103
+ declare class CentrifugoAuth {
1919
2104
  /**
1920
- * Get current refresh token
2105
+ * Get Centrifugo connection token
2106
+ *
2107
+ * Generate JWT token for WebSocket connection to Centrifugo. Token includes user's allowed channels based on their permissions. Requires authentication.
1921
2108
  */
1922
- getRefreshToken(): string | null;
2109
+ static cfgCentrifugoAuthTokenRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgCentrifugoAuthTokenRetrieveData, ThrowOnError>): RequestResult<CfgCentrifugoAuthTokenRetrieveResponses, CfgCentrifugoAuthTokenRetrieveErrors, ThrowOnError, "fields">;
2110
+ }
2111
+ declare class Totp {
1923
2112
  /**
1924
- * Set JWT token and refresh token
1925
- * @param token - JWT access token
1926
- * @param refreshToken - JWT refresh token (optional)
2113
+ * Get backup codes status for user.
1927
2114
  */
1928
- setToken(token: string, refreshToken?: string): void;
2115
+ static cfgTotpBackupCodesRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgTotpBackupCodesRetrieveData, ThrowOnError>): RequestResult<CfgTotpBackupCodesRetrieveResponses, unknown, ThrowOnError, "fields">;
1929
2116
  /**
1930
- * Clear all tokens
2117
+ * Regenerate backup codes.
2118
+ *
2119
+ * Requires TOTP code for verification.
2120
+ * Invalidates all existing codes.
1931
2121
  */
1932
- clearTokens(): void;
2122
+ static cfgTotpBackupCodesRegenerateCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpBackupCodesRegenerateCreateData, ThrowOnError>): RequestResult<CfgTotpBackupCodesRegenerateCreateResponses, CfgTotpBackupCodesRegenerateCreateErrors, ThrowOnError, "fields">;
1933
2123
  /**
1934
- * Check if user is authenticated
2124
+ * List all TOTP devices for user.
1935
2125
  */
1936
- isAuthenticated(): boolean;
2126
+ static cfgTotpDevicesRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgTotpDevicesRetrieveData, ThrowOnError>): RequestResult<CfgTotpDevicesRetrieveResponses, unknown, ThrowOnError, "fields">;
1937
2127
  /**
1938
- * Update base URL and reinitialize clients
1939
- * @param url - New base URL
2128
+ * Delete a TOTP device.
2129
+ *
2130
+ * Requires verification code if removing the last/primary device.
1940
2131
  */
1941
- setBaseUrl(url: string): void;
2132
+ static cfgTotpDevicesDestroy<ThrowOnError extends boolean = false>(options: Options<CfgTotpDevicesDestroyData, ThrowOnError>): RequestResult<CfgTotpDevicesDestroyResponses, unknown, ThrowOnError, "fields">;
1942
2133
  /**
1943
- * Get current base URL
2134
+ * Completely disable 2FA for account.
2135
+ *
2136
+ * Requires verification code.
1944
2137
  */
1945
- getBaseUrl(): string;
2138
+ static cfgTotpDisableCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpDisableCreateData, ThrowOnError>): RequestResult<CfgTotpDisableCreateResponses, CfgTotpDisableCreateErrors, ThrowOnError, "fields">;
1946
2139
  /**
1947
- * Set locale for Accept-Language header
1948
- * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
2140
+ * Start 2FA setup process.
2141
+ *
2142
+ * Creates a new TOTP device and returns QR code for scanning.
1949
2143
  */
1950
- setLocale(locale: string | null): void;
2144
+ static cfgTotpSetupCreate<ThrowOnError extends boolean = false>(options?: Options<CfgTotpSetupCreateData, ThrowOnError>): RequestResult<CfgTotpSetupCreateResponses, CfgTotpSetupCreateErrors, ThrowOnError, "fields">;
1951
2145
  /**
1952
- * Get current locale
2146
+ * Confirm 2FA setup with first valid code.
2147
+ *
2148
+ * Activates the device and generates backup codes.
1953
2149
  */
1954
- getLocale(): string | null;
2150
+ static cfgTotpSetupConfirmCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpSetupConfirmCreateData, ThrowOnError>): RequestResult<CfgTotpSetupConfirmCreateResponses, CfgTotpSetupConfirmCreateErrors, ThrowOnError, "fields">;
2151
+ /**
2152
+ * Verify TOTP code for 2FA session.
2153
+ *
2154
+ * Completes authentication and returns JWT tokens on success.
2155
+ */
2156
+ static cfgTotpVerifyCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpVerifyCreateData, ThrowOnError>): RequestResult<CfgTotpVerifyCreateResponses, CfgTotpVerifyCreateErrors, ThrowOnError, "fields">;
1955
2157
  /**
1956
- * Get OpenAPI schema path
1957
- * @returns Path to the OpenAPI schema JSON file
2158
+ * Verify backup recovery code for 2FA session.
1958
2159
  *
1959
- * Note: The OpenAPI schema is available in the schema.json file.
1960
- * You can load it dynamically using:
1961
- * ```typescript
1962
- * const schema = await fetch('./schema.json').then(r => r.json());
1963
- * // or using fs in Node.js:
1964
- * // const schema = JSON.parse(fs.readFileSync('./schema.json', 'utf-8'));
1965
- * ```
2160
+ * Alternative verification method when TOTP device unavailable.
1966
2161
  */
1967
- getSchemaPath(): string;
2162
+ static cfgTotpVerifyBackupCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpVerifyBackupCreateData, ThrowOnError>): RequestResult<CfgTotpVerifyBackupCreateResponses, CfgTotpVerifyBackupCreateErrors, ThrowOnError, "fields">;
1968
2163
  }
1969
-
1970
- type index_API = API;
1971
- declare const index_API: typeof API;
1972
- type index_APIClient = APIClient;
1973
- declare const index_APIClient: typeof APIClient;
1974
- type index_APIError = APIError;
1975
- declare const index_APIError: typeof APIError;
1976
- type index_APILogger = APILogger;
1977
- declare const index_APILogger: typeof APILogger;
1978
- type index_APIOptions = APIOptions;
1979
- type index_AccountDeleteResponse = AccountDeleteResponse;
1980
- declare const index_AccountDeleteResponseSchema: typeof AccountDeleteResponseSchema;
1981
- type index_CentrifugoToken = CentrifugoToken;
1982
- declare const index_CentrifugoTokenSchema: typeof CentrifugoTokenSchema;
1983
- type index_CfgAccountsProfileAvatarCreateRequest = CfgAccountsProfileAvatarCreateRequest;
1984
- declare const index_CfgAccountsProfileAvatarCreateRequestSchema: typeof CfgAccountsProfileAvatarCreateRequestSchema;
1985
- type index_CookieStorageAdapter = CookieStorageAdapter;
1986
- declare const index_CookieStorageAdapter: typeof CookieStorageAdapter;
1987
- declare const index_DEFAULT_RETRY_CONFIG: typeof DEFAULT_RETRY_CONFIG;
1988
- type index_ErrorLog = ErrorLog;
1989
- type index_FailedAttemptInfo = FailedAttemptInfo;
1990
- type index_FetchAdapter = FetchAdapter;
1991
- declare const index_FetchAdapter: typeof FetchAdapter;
1992
- type index_HttpRequest = HttpRequest;
1993
- type index_HttpResponse<T = any> = HttpResponse<T>;
1994
- type index_KeepAliveFetchAdapter = KeepAliveFetchAdapter;
1995
- declare const index_KeepAliveFetchAdapter: typeof KeepAliveFetchAdapter;
1996
- type index_LocalStorageAdapter = LocalStorageAdapter;
1997
- declare const index_LocalStorageAdapter: typeof LocalStorageAdapter;
1998
- type index_LoggerConfig = LoggerConfig;
1999
- type index_MemoryStorageAdapter = MemoryStorageAdapter;
2000
- declare const index_MemoryStorageAdapter: typeof MemoryStorageAdapter;
2001
- type index_NetworkError = NetworkError;
2002
- declare const index_NetworkError: typeof NetworkError;
2003
- type index_OAuthAuthorizeRequestRequest = OAuthAuthorizeRequestRequest;
2004
- declare const index_OAuthAuthorizeRequestRequestSchema: typeof OAuthAuthorizeRequestRequestSchema;
2005
- type index_OAuthAuthorizeResponse = OAuthAuthorizeResponse;
2006
- declare const index_OAuthAuthorizeResponseSchema: typeof OAuthAuthorizeResponseSchema;
2007
- type index_OAuthCallbackRequestRequest = OAuthCallbackRequestRequest;
2008
- declare const index_OAuthCallbackRequestRequestSchema: typeof OAuthCallbackRequestRequestSchema;
2009
- type index_OAuthConnection = OAuthConnection;
2010
- declare const index_OAuthConnectionSchema: typeof OAuthConnectionSchema;
2011
- type index_OAuthDisconnectRequestRequest = OAuthDisconnectRequestRequest;
2012
- declare const index_OAuthDisconnectRequestRequestSchema: typeof OAuthDisconnectRequestRequestSchema;
2013
- type index_OAuthError = OAuthError;
2014
- declare const index_OAuthErrorSchema: typeof OAuthErrorSchema;
2015
- type index_OAuthProvidersResponse = OAuthProvidersResponse;
2016
- declare const index_OAuthProvidersResponseSchema: typeof OAuthProvidersResponseSchema;
2017
- type index_OAuthTokenResponse = OAuthTokenResponse;
2018
- declare const index_OAuthTokenResponseSchema: typeof OAuthTokenResponseSchema;
2019
- type index_OTPErrorResponse = OTPErrorResponse;
2020
- declare const index_OTPErrorResponseSchema: typeof OTPErrorResponseSchema;
2021
- type index_OTPRequestRequest = OTPRequestRequest;
2022
- declare const index_OTPRequestRequestSchema: typeof OTPRequestRequestSchema;
2023
- type index_OTPRequestResponse = OTPRequestResponse;
2024
- declare const index_OTPRequestResponseSchema: typeof OTPRequestResponseSchema;
2025
- type index_OTPVerifyRequest = OTPVerifyRequest;
2026
- declare const index_OTPVerifyRequestSchema: typeof OTPVerifyRequestSchema;
2027
- type index_OTPVerifyResponse = OTPVerifyResponse;
2028
- declare const index_OTPVerifyResponseSchema: typeof OTPVerifyResponseSchema;
2029
- type index_PatchedUserProfileUpdateRequest = PatchedUserProfileUpdateRequest;
2030
- declare const index_PatchedUserProfileUpdateRequestSchema: typeof PatchedUserProfileUpdateRequestSchema;
2031
- declare const index_REFRESH_TOKEN_KEY: typeof REFRESH_TOKEN_KEY;
2032
- type index_RequestLog = RequestLog;
2033
- type index_ResponseLog = ResponseLog;
2034
- type index_RetryConfig = RetryConfig;
2035
- type index_StorageAdapter = StorageAdapter;
2036
- declare const index_TOKEN_KEY: typeof TOKEN_KEY;
2037
- type index_TokenRefresh = TokenRefresh;
2038
- type index_TokenRefreshRequest = TokenRefreshRequest;
2039
- declare const index_TokenRefreshRequestSchema: typeof TokenRefreshRequestSchema;
2040
- declare const index_TokenRefreshSchema: typeof TokenRefreshSchema;
2041
- type index_User = User;
2042
- type index_UserProfileUpdateRequest = UserProfileUpdateRequest;
2043
- declare const index_UserProfileUpdateRequestSchema: typeof UserProfileUpdateRequestSchema;
2044
- declare const index_UserSchema: typeof UserSchema;
2045
- type index_ValidationErrorDetail = ValidationErrorDetail;
2046
- type index_ValidationErrorEvent = ValidationErrorEvent;
2047
- declare const index_clearAPITokens: typeof clearAPITokens;
2048
- declare const index_configureAPI: typeof configureAPI;
2049
- declare const index_createAccountsOauthDisconnectCreate: typeof createAccountsOauthDisconnectCreate;
2050
- declare const index_createAccountsOauthGithubAuthorizeCreate: typeof createAccountsOauthGithubAuthorizeCreate;
2051
- declare const index_createAccountsOauthGithubCallbackCreate: typeof createAccountsOauthGithubCallbackCreate;
2052
- declare const index_createAccountsOtpRequestCreate: typeof createAccountsOtpRequestCreate;
2053
- declare const index_createAccountsOtpVerifyCreate: typeof createAccountsOtpVerifyCreate;
2054
- declare const index_createAccountsProfileAvatarCreate: typeof createAccountsProfileAvatarCreate;
2055
- declare const index_createAccountsProfileDeleteCreate: typeof createAccountsProfileDeleteCreate;
2056
- declare const index_createAccountsTokenRefreshCreate: typeof createAccountsTokenRefreshCreate;
2057
- declare const index_dispatchValidationError: typeof dispatchValidationError;
2058
- declare const index_formatZodError: typeof formatZodError;
2059
- declare const index_getAPIInstance: typeof getAPIInstance;
2060
- declare const index_getAccountsOauthConnectionsList: typeof getAccountsOauthConnectionsList;
2061
- declare const index_getAccountsOauthProvidersRetrieve: typeof getAccountsOauthProvidersRetrieve;
2062
- declare const index_getAccountsProfileRetrieve: typeof getAccountsProfileRetrieve;
2063
- declare const index_isAPIConfigured: typeof isAPIConfigured;
2064
- declare const index_onValidationError: typeof onValidationError;
2065
- declare const index_partialUpdateAccountsProfilePartialPartialUpdate: typeof partialUpdateAccountsProfilePartialPartialUpdate;
2066
- declare const index_partialUpdateAccountsProfilePartialUpdate: typeof partialUpdateAccountsProfilePartialUpdate;
2067
- declare const index_partialUpdateAccountsProfileUpdatePartialUpdate: typeof partialUpdateAccountsProfileUpdatePartialUpdate;
2068
- declare const index_reconfigureAPI: typeof reconfigureAPI;
2069
- declare const index_resetAPI: typeof resetAPI;
2070
- declare const index_shouldRetry: typeof shouldRetry;
2071
- declare const index_updateAccountsProfileUpdateUpdate: typeof updateAccountsProfileUpdateUpdate;
2072
- declare const index_withRetry: typeof withRetry;
2073
- declare namespace index {
2074
- export { index_API as API, index_APIClient as APIClient, index_APIError as APIError, index_APILogger as APILogger, type index_APIOptions as APIOptions, type index_AccountDeleteResponse as AccountDeleteResponse, index_AccountDeleteResponseSchema as AccountDeleteResponseSchema, models as AccountsTypes, models$3 as AuthTypes, type index_CentrifugoToken as CentrifugoToken, index_CentrifugoTokenSchema as CentrifugoTokenSchema, type index_CfgAccountsProfileAvatarCreateRequest as CfgAccountsProfileAvatarCreateRequest, index_CfgAccountsProfileAvatarCreateRequestSchema as CfgAccountsProfileAvatarCreateRequestSchema, index_CookieStorageAdapter as CookieStorageAdapter, index_DEFAULT_RETRY_CONFIG as DEFAULT_RETRY_CONFIG, enums as Enums, type index_ErrorLog as ErrorLog, type index_FailedAttemptInfo as FailedAttemptInfo, index_FetchAdapter as FetchAdapter, index$1 as Fetchers, type HttpClientAdapter$1 as HttpClientAdapter, type index_HttpRequest as HttpRequest, type index_HttpResponse as HttpResponse, index_KeepAliveFetchAdapter as KeepAliveFetchAdapter, index_LocalStorageAdapter as LocalStorageAdapter, type index_LoggerConfig as LoggerConfig, index_MemoryStorageAdapter as MemoryStorageAdapter, index_NetworkError as NetworkError, type index_OAuthAuthorizeRequestRequest as OAuthAuthorizeRequestRequest, index_OAuthAuthorizeRequestRequestSchema as OAuthAuthorizeRequestRequestSchema, type index_OAuthAuthorizeResponse as OAuthAuthorizeResponse, index_OAuthAuthorizeResponseSchema as OAuthAuthorizeResponseSchema, type index_OAuthCallbackRequestRequest as OAuthCallbackRequestRequest, index_OAuthCallbackRequestRequestSchema as OAuthCallbackRequestRequestSchema, type index_OAuthConnection as OAuthConnection, index_OAuthConnectionSchema as OAuthConnectionSchema, type index_OAuthDisconnectRequestRequest as OAuthDisconnectRequestRequest, index_OAuthDisconnectRequestRequestSchema as OAuthDisconnectRequestRequestSchema, type index_OAuthError as OAuthError, index_OAuthErrorSchema as OAuthErrorSchema, type index_OAuthProvidersResponse as OAuthProvidersResponse, index_OAuthProvidersResponseSchema as OAuthProvidersResponseSchema, type index_OAuthTokenResponse as OAuthTokenResponse, index_OAuthTokenResponseSchema as OAuthTokenResponseSchema, type index_OTPErrorResponse as OTPErrorResponse, index_OTPErrorResponseSchema as OTPErrorResponseSchema, type index_OTPRequestRequest as OTPRequestRequest, index_OTPRequestRequestSchema as OTPRequestRequestSchema, type index_OTPRequestResponse as OTPRequestResponse, index_OTPRequestResponseSchema as OTPRequestResponseSchema, type index_OTPVerifyRequest as OTPVerifyRequest, index_OTPVerifyRequestSchema as OTPVerifyRequestSchema, type index_OTPVerifyResponse as OTPVerifyResponse, index_OTPVerifyResponseSchema as OTPVerifyResponseSchema, models$2 as OauthTypes, type index_PatchedUserProfileUpdateRequest as PatchedUserProfileUpdateRequest, index_PatchedUserProfileUpdateRequestSchema as PatchedUserProfileUpdateRequestSchema, index_REFRESH_TOKEN_KEY as REFRESH_TOKEN_KEY, type index_RequestLog as RequestLog, type index_ResponseLog as ResponseLog, type index_RetryConfig as RetryConfig, index$2 as Schemas, type index_StorageAdapter as StorageAdapter, index_TOKEN_KEY as TOKEN_KEY, type index_TokenRefresh as TokenRefresh, type index_TokenRefreshRequest as TokenRefreshRequest, index_TokenRefreshRequestSchema as TokenRefreshRequestSchema, index_TokenRefreshSchema as TokenRefreshSchema, type index_User as User, models$1 as UserProfileTypes, type index_UserProfileUpdateRequest as UserProfileUpdateRequest, index_UserProfileUpdateRequestSchema as UserProfileUpdateRequestSchema, index_UserSchema as UserSchema, type index_ValidationErrorDetail as ValidationErrorDetail, type index_ValidationErrorEvent as ValidationErrorEvent, index_clearAPITokens as clearAPITokens, index_configureAPI as configureAPI, index_createAccountsOauthDisconnectCreate as createAccountsOauthDisconnectCreate, index_createAccountsOauthGithubAuthorizeCreate as createAccountsOauthGithubAuthorizeCreate, index_createAccountsOauthGithubCallbackCreate as createAccountsOauthGithubCallbackCreate, index_createAccountsOtpRequestCreate as createAccountsOtpRequestCreate, index_createAccountsOtpVerifyCreate as createAccountsOtpVerifyCreate, index_createAccountsProfileAvatarCreate as createAccountsProfileAvatarCreate, index_createAccountsProfileDeleteCreate as createAccountsProfileDeleteCreate, index_createAccountsTokenRefreshCreate as createAccountsTokenRefreshCreate, API as default, index_dispatchValidationError as dispatchValidationError, index_formatZodError as formatZodError, index_getAPIInstance as getAPIInstance, index_getAccountsOauthConnectionsList as getAccountsOauthConnectionsList, index_getAccountsOauthProvidersRetrieve as getAccountsOauthProvidersRetrieve, index_getAccountsProfileRetrieve as getAccountsProfileRetrieve, index_isAPIConfigured as isAPIConfigured, index_onValidationError as onValidationError, index_partialUpdateAccountsProfilePartialPartialUpdate as partialUpdateAccountsProfilePartialPartialUpdate, index_partialUpdateAccountsProfilePartialUpdate as partialUpdateAccountsProfilePartialUpdate, index_partialUpdateAccountsProfileUpdatePartialUpdate as partialUpdateAccountsProfileUpdatePartialUpdate, index_reconfigureAPI as reconfigureAPI, index_resetAPI as resetAPI, index_shouldRetry as shouldRetry, index_updateAccountsProfileUpdateUpdate as updateAccountsProfileUpdateUpdate, index_withRetry as withRetry };
2164
+ declare class BackupCodes {
2165
+ /**
2166
+ * Get backup codes status for user.
2167
+ */
2168
+ static cfgTotpBackupCodesRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgTotpBackupCodesRetrieveData, ThrowOnError>): RequestResult<CfgTotpBackupCodesRetrieveResponses, unknown, ThrowOnError, "fields">;
2169
+ /**
2170
+ * Regenerate backup codes.
2171
+ *
2172
+ * Requires TOTP code for verification.
2173
+ * Invalidates all existing codes.
2174
+ */
2175
+ static cfgTotpBackupCodesRegenerateCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpBackupCodesRegenerateCreateData, ThrowOnError>): RequestResult<CfgTotpBackupCodesRegenerateCreateResponses, CfgTotpBackupCodesRegenerateCreateErrors, ThrowOnError, "fields">;
2176
+ }
2177
+ declare class TotpManagement {
2178
+ /**
2179
+ * List all TOTP devices for user.
2180
+ */
2181
+ static cfgTotpDevicesRetrieve<ThrowOnError extends boolean = false>(options?: Options<CfgTotpDevicesRetrieveData, ThrowOnError>): RequestResult<CfgTotpDevicesRetrieveResponses, unknown, ThrowOnError, "fields">;
2182
+ /**
2183
+ * Completely disable 2FA for account.
2184
+ *
2185
+ * Requires verification code.
2186
+ */
2187
+ static cfgTotpDisableCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpDisableCreateData, ThrowOnError>): RequestResult<CfgTotpDisableCreateResponses, CfgTotpDisableCreateErrors, ThrowOnError, "fields">;
2188
+ }
2189
+ declare class TotpSetup {
2190
+ /**
2191
+ * Start 2FA setup process.
2192
+ *
2193
+ * Creates a new TOTP device and returns QR code for scanning.
2194
+ */
2195
+ static cfgTotpSetupCreate<ThrowOnError extends boolean = false>(options?: Options<CfgTotpSetupCreateData, ThrowOnError>): RequestResult<CfgTotpSetupCreateResponses, CfgTotpSetupCreateErrors, ThrowOnError, "fields">;
2196
+ /**
2197
+ * Confirm 2FA setup with first valid code.
2198
+ *
2199
+ * Activates the device and generates backup codes.
2200
+ */
2201
+ static cfgTotpSetupConfirmCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpSetupConfirmCreateData, ThrowOnError>): RequestResult<CfgTotpSetupConfirmCreateResponses, CfgTotpSetupConfirmCreateErrors, ThrowOnError, "fields">;
2202
+ }
2203
+ declare class TotpVerification {
2204
+ /**
2205
+ * Verify TOTP code for 2FA session.
2206
+ *
2207
+ * Completes authentication and returns JWT tokens on success.
2208
+ */
2209
+ static cfgTotpVerifyCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpVerifyCreateData, ThrowOnError>): RequestResult<CfgTotpVerifyCreateResponses, CfgTotpVerifyCreateErrors, ThrowOnError, "fields">;
2210
+ /**
2211
+ * Verify backup recovery code for 2FA session.
2212
+ *
2213
+ * Alternative verification method when TOTP device unavailable.
2214
+ */
2215
+ static cfgTotpVerifyBackupCreate<ThrowOnError extends boolean = false>(options: Options<CfgTotpVerifyBackupCreateData, ThrowOnError>): RequestResult<CfgTotpVerifyBackupCreateResponses, CfgTotpVerifyBackupCreateErrors, ThrowOnError, "fields">;
2075
2216
  }
2076
2217
 
2077
- /**
2078
- * Zod schema for ConnectionTokenResponse
2079
- *
2080
- * This schema provides runtime validation and type inference.
2081
- * * Response model for Centrifugo connection token.
2082
- * */
2083
-
2084
- /**
2085
- * Response model for Centrifugo connection token.
2086
- */
2087
- declare const ConnectionTokenResponseSchema: z.ZodObject<{
2088
- token: z.ZodString;
2089
- centrifugo_url: z.ZodString;
2090
- expires_at: z.ZodString;
2091
- channels: z.ZodArray<z.ZodString>;
2092
- }, z.core.$strip>;
2093
- /**
2094
- * Infer TypeScript type from Zod schema
2095
- */
2096
- type ConnectionTokenResponse = z.infer<typeof ConnectionTokenResponseSchema>;
2097
-
2098
- /**
2099
- * Get Centrifugo connection token
2100
- *
2101
- * @method GET
2102
- * @path /cfg/centrifugo/auth/token/
2103
- */
2104
- declare function getCentrifugoAuthTokenRetrieve(client?: any): Promise<ConnectionTokenResponse>;
2218
+ type types_gen$2_AccountDeleteResponse = AccountDeleteResponse;
2219
+ type types_gen$2_BackupCodesRegenerateRequest = BackupCodesRegenerateRequest;
2220
+ type types_gen$2_BackupCodesRegenerateResponse = BackupCodesRegenerateResponse;
2221
+ type types_gen$2_BackupCodesStatus = BackupCodesStatus;
2222
+ type types_gen$2_CentrifugoToken = CentrifugoToken;
2223
+ type types_gen$2_CfgAccountsOauthConnectionsListData = CfgAccountsOauthConnectionsListData;
2224
+ type types_gen$2_CfgAccountsOauthConnectionsListResponse = CfgAccountsOauthConnectionsListResponse;
2225
+ type types_gen$2_CfgAccountsOauthConnectionsListResponses = CfgAccountsOauthConnectionsListResponses;
2226
+ type types_gen$2_CfgAccountsOauthDisconnectCreateData = CfgAccountsOauthDisconnectCreateData;
2227
+ type types_gen$2_CfgAccountsOauthDisconnectCreateError = CfgAccountsOauthDisconnectCreateError;
2228
+ type types_gen$2_CfgAccountsOauthDisconnectCreateErrors = CfgAccountsOauthDisconnectCreateErrors;
2229
+ type types_gen$2_CfgAccountsOauthDisconnectCreateResponse = CfgAccountsOauthDisconnectCreateResponse;
2230
+ type types_gen$2_CfgAccountsOauthDisconnectCreateResponses = CfgAccountsOauthDisconnectCreateResponses;
2231
+ type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateData = CfgAccountsOauthGithubAuthorizeCreateData;
2232
+ type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateError = CfgAccountsOauthGithubAuthorizeCreateError;
2233
+ type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateErrors = CfgAccountsOauthGithubAuthorizeCreateErrors;
2234
+ type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateResponse = CfgAccountsOauthGithubAuthorizeCreateResponse;
2235
+ type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateResponses = CfgAccountsOauthGithubAuthorizeCreateResponses;
2236
+ type types_gen$2_CfgAccountsOauthGithubCallbackCreateData = CfgAccountsOauthGithubCallbackCreateData;
2237
+ type types_gen$2_CfgAccountsOauthGithubCallbackCreateError = CfgAccountsOauthGithubCallbackCreateError;
2238
+ type types_gen$2_CfgAccountsOauthGithubCallbackCreateErrors = CfgAccountsOauthGithubCallbackCreateErrors;
2239
+ type types_gen$2_CfgAccountsOauthGithubCallbackCreateResponse = CfgAccountsOauthGithubCallbackCreateResponse;
2240
+ type types_gen$2_CfgAccountsOauthGithubCallbackCreateResponses = CfgAccountsOauthGithubCallbackCreateResponses;
2241
+ type types_gen$2_CfgAccountsOauthProvidersRetrieveData = CfgAccountsOauthProvidersRetrieveData;
2242
+ type types_gen$2_CfgAccountsOauthProvidersRetrieveResponse = CfgAccountsOauthProvidersRetrieveResponse;
2243
+ type types_gen$2_CfgAccountsOauthProvidersRetrieveResponses = CfgAccountsOauthProvidersRetrieveResponses;
2244
+ type types_gen$2_CfgAccountsOtpRequestCreateData = CfgAccountsOtpRequestCreateData;
2245
+ type types_gen$2_CfgAccountsOtpRequestCreateError = CfgAccountsOtpRequestCreateError;
2246
+ type types_gen$2_CfgAccountsOtpRequestCreateErrors = CfgAccountsOtpRequestCreateErrors;
2247
+ type types_gen$2_CfgAccountsOtpRequestCreateResponse = CfgAccountsOtpRequestCreateResponse;
2248
+ type types_gen$2_CfgAccountsOtpRequestCreateResponses = CfgAccountsOtpRequestCreateResponses;
2249
+ type types_gen$2_CfgAccountsOtpVerifyCreateData = CfgAccountsOtpVerifyCreateData;
2250
+ type types_gen$2_CfgAccountsOtpVerifyCreateError = CfgAccountsOtpVerifyCreateError;
2251
+ type types_gen$2_CfgAccountsOtpVerifyCreateErrors = CfgAccountsOtpVerifyCreateErrors;
2252
+ type types_gen$2_CfgAccountsOtpVerifyCreateResponse = CfgAccountsOtpVerifyCreateResponse;
2253
+ type types_gen$2_CfgAccountsOtpVerifyCreateResponses = CfgAccountsOtpVerifyCreateResponses;
2254
+ type types_gen$2_CfgAccountsProfileAvatarCreateData = CfgAccountsProfileAvatarCreateData;
2255
+ type types_gen$2_CfgAccountsProfileAvatarCreateErrors = CfgAccountsProfileAvatarCreateErrors;
2256
+ type types_gen$2_CfgAccountsProfileAvatarCreateResponse = CfgAccountsProfileAvatarCreateResponse;
2257
+ type types_gen$2_CfgAccountsProfileAvatarCreateResponses = CfgAccountsProfileAvatarCreateResponses;
2258
+ type types_gen$2_CfgAccountsProfileDeleteCreateData = CfgAccountsProfileDeleteCreateData;
2259
+ type types_gen$2_CfgAccountsProfileDeleteCreateErrors = CfgAccountsProfileDeleteCreateErrors;
2260
+ type types_gen$2_CfgAccountsProfileDeleteCreateResponse = CfgAccountsProfileDeleteCreateResponse;
2261
+ type types_gen$2_CfgAccountsProfileDeleteCreateResponses = CfgAccountsProfileDeleteCreateResponses;
2262
+ type types_gen$2_CfgAccountsProfilePartialPartialUpdateData = CfgAccountsProfilePartialPartialUpdateData;
2263
+ type types_gen$2_CfgAccountsProfilePartialPartialUpdateErrors = CfgAccountsProfilePartialPartialUpdateErrors;
2264
+ type types_gen$2_CfgAccountsProfilePartialPartialUpdateResponse = CfgAccountsProfilePartialPartialUpdateResponse;
2265
+ type types_gen$2_CfgAccountsProfilePartialPartialUpdateResponses = CfgAccountsProfilePartialPartialUpdateResponses;
2266
+ type types_gen$2_CfgAccountsProfilePartialUpdateData = CfgAccountsProfilePartialUpdateData;
2267
+ type types_gen$2_CfgAccountsProfilePartialUpdateErrors = CfgAccountsProfilePartialUpdateErrors;
2268
+ type types_gen$2_CfgAccountsProfilePartialUpdateResponse = CfgAccountsProfilePartialUpdateResponse;
2269
+ type types_gen$2_CfgAccountsProfilePartialUpdateResponses = CfgAccountsProfilePartialUpdateResponses;
2270
+ type types_gen$2_CfgAccountsProfileRetrieveData = CfgAccountsProfileRetrieveData;
2271
+ type types_gen$2_CfgAccountsProfileRetrieveErrors = CfgAccountsProfileRetrieveErrors;
2272
+ type types_gen$2_CfgAccountsProfileRetrieveResponse = CfgAccountsProfileRetrieveResponse;
2273
+ type types_gen$2_CfgAccountsProfileRetrieveResponses = CfgAccountsProfileRetrieveResponses;
2274
+ type types_gen$2_CfgAccountsProfileUpdatePartialUpdateData = CfgAccountsProfileUpdatePartialUpdateData;
2275
+ type types_gen$2_CfgAccountsProfileUpdatePartialUpdateErrors = CfgAccountsProfileUpdatePartialUpdateErrors;
2276
+ type types_gen$2_CfgAccountsProfileUpdatePartialUpdateResponse = CfgAccountsProfileUpdatePartialUpdateResponse;
2277
+ type types_gen$2_CfgAccountsProfileUpdatePartialUpdateResponses = CfgAccountsProfileUpdatePartialUpdateResponses;
2278
+ type types_gen$2_CfgAccountsProfileUpdateUpdateData = CfgAccountsProfileUpdateUpdateData;
2279
+ type types_gen$2_CfgAccountsProfileUpdateUpdateErrors = CfgAccountsProfileUpdateUpdateErrors;
2280
+ type types_gen$2_CfgAccountsProfileUpdateUpdateResponse = CfgAccountsProfileUpdateUpdateResponse;
2281
+ type types_gen$2_CfgAccountsProfileUpdateUpdateResponses = CfgAccountsProfileUpdateUpdateResponses;
2282
+ type types_gen$2_CfgAccountsTokenRefreshCreateData = CfgAccountsTokenRefreshCreateData;
2283
+ type types_gen$2_CfgAccountsTokenRefreshCreateResponse = CfgAccountsTokenRefreshCreateResponse;
2284
+ type types_gen$2_CfgAccountsTokenRefreshCreateResponses = CfgAccountsTokenRefreshCreateResponses;
2285
+ type types_gen$2_CfgCentrifugoAuthTokenRetrieveData = CfgCentrifugoAuthTokenRetrieveData;
2286
+ type types_gen$2_CfgCentrifugoAuthTokenRetrieveErrors = CfgCentrifugoAuthTokenRetrieveErrors;
2287
+ type types_gen$2_CfgCentrifugoAuthTokenRetrieveResponse = CfgCentrifugoAuthTokenRetrieveResponse;
2288
+ type types_gen$2_CfgCentrifugoAuthTokenRetrieveResponses = CfgCentrifugoAuthTokenRetrieveResponses;
2289
+ type types_gen$2_CfgTotpBackupCodesRegenerateCreateData = CfgTotpBackupCodesRegenerateCreateData;
2290
+ type types_gen$2_CfgTotpBackupCodesRegenerateCreateErrors = CfgTotpBackupCodesRegenerateCreateErrors;
2291
+ type types_gen$2_CfgTotpBackupCodesRegenerateCreateResponse = CfgTotpBackupCodesRegenerateCreateResponse;
2292
+ type types_gen$2_CfgTotpBackupCodesRegenerateCreateResponses = CfgTotpBackupCodesRegenerateCreateResponses;
2293
+ type types_gen$2_CfgTotpBackupCodesRetrieveData = CfgTotpBackupCodesRetrieveData;
2294
+ type types_gen$2_CfgTotpBackupCodesRetrieveResponse = CfgTotpBackupCodesRetrieveResponse;
2295
+ type types_gen$2_CfgTotpBackupCodesRetrieveResponses = CfgTotpBackupCodesRetrieveResponses;
2296
+ type types_gen$2_CfgTotpDevicesDestroyData = CfgTotpDevicesDestroyData;
2297
+ type types_gen$2_CfgTotpDevicesDestroyResponse = CfgTotpDevicesDestroyResponse;
2298
+ type types_gen$2_CfgTotpDevicesDestroyResponses = CfgTotpDevicesDestroyResponses;
2299
+ type types_gen$2_CfgTotpDevicesRetrieveData = CfgTotpDevicesRetrieveData;
2300
+ type types_gen$2_CfgTotpDevicesRetrieveResponse = CfgTotpDevicesRetrieveResponse;
2301
+ type types_gen$2_CfgTotpDevicesRetrieveResponses = CfgTotpDevicesRetrieveResponses;
2302
+ type types_gen$2_CfgTotpDisableCreateData = CfgTotpDisableCreateData;
2303
+ type types_gen$2_CfgTotpDisableCreateErrors = CfgTotpDisableCreateErrors;
2304
+ type types_gen$2_CfgTotpDisableCreateResponses = CfgTotpDisableCreateResponses;
2305
+ type types_gen$2_CfgTotpSetupConfirmCreateData = CfgTotpSetupConfirmCreateData;
2306
+ type types_gen$2_CfgTotpSetupConfirmCreateErrors = CfgTotpSetupConfirmCreateErrors;
2307
+ type types_gen$2_CfgTotpSetupConfirmCreateResponse = CfgTotpSetupConfirmCreateResponse;
2308
+ type types_gen$2_CfgTotpSetupConfirmCreateResponses = CfgTotpSetupConfirmCreateResponses;
2309
+ type types_gen$2_CfgTotpSetupCreateData = CfgTotpSetupCreateData;
2310
+ type types_gen$2_CfgTotpSetupCreateErrors = CfgTotpSetupCreateErrors;
2311
+ type types_gen$2_CfgTotpSetupCreateResponse = CfgTotpSetupCreateResponse;
2312
+ type types_gen$2_CfgTotpSetupCreateResponses = CfgTotpSetupCreateResponses;
2313
+ type types_gen$2_CfgTotpVerifyBackupCreateData = CfgTotpVerifyBackupCreateData;
2314
+ type types_gen$2_CfgTotpVerifyBackupCreateErrors = CfgTotpVerifyBackupCreateErrors;
2315
+ type types_gen$2_CfgTotpVerifyBackupCreateResponse = CfgTotpVerifyBackupCreateResponse;
2316
+ type types_gen$2_CfgTotpVerifyBackupCreateResponses = CfgTotpVerifyBackupCreateResponses;
2317
+ type types_gen$2_CfgTotpVerifyCreateData = CfgTotpVerifyCreateData;
2318
+ type types_gen$2_CfgTotpVerifyCreateErrors = CfgTotpVerifyCreateErrors;
2319
+ type types_gen$2_CfgTotpVerifyCreateResponse = CfgTotpVerifyCreateResponse;
2320
+ type types_gen$2_CfgTotpVerifyCreateResponses = CfgTotpVerifyCreateResponses;
2321
+ type types_gen$2_CfgUserUpdateRequest = CfgUserUpdateRequest;
2322
+ type types_gen$2_ClientOptions = ClientOptions;
2323
+ type types_gen$2_ConfirmSetupRequest = ConfirmSetupRequest;
2324
+ type types_gen$2_ConfirmSetupResponse = ConfirmSetupResponse;
2325
+ type types_gen$2_ConnectionTokenResponse = ConnectionTokenResponse;
2326
+ type types_gen$2_DeviceList = DeviceList;
2327
+ type types_gen$2_DeviceListResponse = DeviceListResponse;
2328
+ type types_gen$2_DeviceListResponseWritable = DeviceListResponseWritable;
2329
+ type types_gen$2_DeviceListStatusEnum = DeviceListStatusEnum;
2330
+ declare const types_gen$2_DeviceListStatusEnum: typeof DeviceListStatusEnum;
2331
+ type types_gen$2_DisableRequest = DisableRequest;
2332
+ type types_gen$2_OAuthAuthorizeRequestRequest = OAuthAuthorizeRequestRequest;
2333
+ type types_gen$2_OAuthAuthorizeResponse = OAuthAuthorizeResponse;
2334
+ type types_gen$2_OAuthCallbackRequestRequest = OAuthCallbackRequestRequest;
2335
+ type types_gen$2_OAuthConnection = OAuthConnection;
2336
+ type types_gen$2_OAuthDisconnectRequestRequest = OAuthDisconnectRequestRequest;
2337
+ type types_gen$2_OAuthError = OAuthError;
2338
+ type types_gen$2_OAuthProvidersResponse = OAuthProvidersResponse;
2339
+ type types_gen$2_OAuthTokenResponse = OAuthTokenResponse;
2340
+ type types_gen$2_OtpErrorResponse = OtpErrorResponse;
2341
+ type types_gen$2_OtpRequestRequest = OtpRequestRequest;
2342
+ type types_gen$2_OtpRequestResponse = OtpRequestResponse;
2343
+ type types_gen$2_OtpVerifyRequest = OtpVerifyRequest;
2344
+ type types_gen$2_OtpVerifyResponse = OtpVerifyResponse;
2345
+ type types_gen$2_OtpVerifyResponseWritable = OtpVerifyResponseWritable;
2346
+ type types_gen$2_PatchedCfgUserUpdateRequest = PatchedCfgUserUpdateRequest;
2347
+ type types_gen$2_ProviderEnum = ProviderEnum;
2348
+ declare const types_gen$2_ProviderEnum: typeof ProviderEnum;
2349
+ type types_gen$2_SetupRequest = SetupRequest;
2350
+ type types_gen$2_SetupResponse = SetupResponse;
2351
+ type types_gen$2_TokenRefresh = TokenRefresh;
2352
+ type types_gen$2_TokenRefreshRequest = TokenRefreshRequest;
2353
+ type types_gen$2_TokenRefreshWritable = TokenRefreshWritable;
2354
+ type types_gen$2_TotpVerifyUser = TotpVerifyUser;
2355
+ type types_gen$2_TotpVerifyUserWritable = TotpVerifyUserWritable;
2356
+ type types_gen$2_User = User;
2357
+ type types_gen$2_UserWritable = UserWritable;
2358
+ type types_gen$2_VerifyBackupRequest = VerifyBackupRequest;
2359
+ type types_gen$2_VerifyRequest = VerifyRequest;
2360
+ type types_gen$2_VerifyResponse = VerifyResponse;
2361
+ type types_gen$2_VerifyResponseWritable = VerifyResponseWritable;
2362
+ declare namespace types_gen$2 {
2363
+ export { type types_gen$2_AccountDeleteResponse as AccountDeleteResponse, type types_gen$2_BackupCodesRegenerateRequest as BackupCodesRegenerateRequest, type types_gen$2_BackupCodesRegenerateResponse as BackupCodesRegenerateResponse, type types_gen$2_BackupCodesStatus as BackupCodesStatus, type types_gen$2_CentrifugoToken as CentrifugoToken, type types_gen$2_CfgAccountsOauthConnectionsListData as CfgAccountsOauthConnectionsListData, type types_gen$2_CfgAccountsOauthConnectionsListResponse as CfgAccountsOauthConnectionsListResponse, type types_gen$2_CfgAccountsOauthConnectionsListResponses as CfgAccountsOauthConnectionsListResponses, type types_gen$2_CfgAccountsOauthDisconnectCreateData as CfgAccountsOauthDisconnectCreateData, type types_gen$2_CfgAccountsOauthDisconnectCreateError as CfgAccountsOauthDisconnectCreateError, type types_gen$2_CfgAccountsOauthDisconnectCreateErrors as CfgAccountsOauthDisconnectCreateErrors, type types_gen$2_CfgAccountsOauthDisconnectCreateResponse as CfgAccountsOauthDisconnectCreateResponse, type types_gen$2_CfgAccountsOauthDisconnectCreateResponses as CfgAccountsOauthDisconnectCreateResponses, type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateData as CfgAccountsOauthGithubAuthorizeCreateData, type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateError as CfgAccountsOauthGithubAuthorizeCreateError, type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateErrors as CfgAccountsOauthGithubAuthorizeCreateErrors, type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateResponse as CfgAccountsOauthGithubAuthorizeCreateResponse, type types_gen$2_CfgAccountsOauthGithubAuthorizeCreateResponses as CfgAccountsOauthGithubAuthorizeCreateResponses, type types_gen$2_CfgAccountsOauthGithubCallbackCreateData as CfgAccountsOauthGithubCallbackCreateData, type types_gen$2_CfgAccountsOauthGithubCallbackCreateError as CfgAccountsOauthGithubCallbackCreateError, type types_gen$2_CfgAccountsOauthGithubCallbackCreateErrors as CfgAccountsOauthGithubCallbackCreateErrors, type types_gen$2_CfgAccountsOauthGithubCallbackCreateResponse as CfgAccountsOauthGithubCallbackCreateResponse, type types_gen$2_CfgAccountsOauthGithubCallbackCreateResponses as CfgAccountsOauthGithubCallbackCreateResponses, type types_gen$2_CfgAccountsOauthProvidersRetrieveData as CfgAccountsOauthProvidersRetrieveData, type types_gen$2_CfgAccountsOauthProvidersRetrieveResponse as CfgAccountsOauthProvidersRetrieveResponse, type types_gen$2_CfgAccountsOauthProvidersRetrieveResponses as CfgAccountsOauthProvidersRetrieveResponses, type types_gen$2_CfgAccountsOtpRequestCreateData as CfgAccountsOtpRequestCreateData, type types_gen$2_CfgAccountsOtpRequestCreateError as CfgAccountsOtpRequestCreateError, type types_gen$2_CfgAccountsOtpRequestCreateErrors as CfgAccountsOtpRequestCreateErrors, type types_gen$2_CfgAccountsOtpRequestCreateResponse as CfgAccountsOtpRequestCreateResponse, type types_gen$2_CfgAccountsOtpRequestCreateResponses as CfgAccountsOtpRequestCreateResponses, type types_gen$2_CfgAccountsOtpVerifyCreateData as CfgAccountsOtpVerifyCreateData, type types_gen$2_CfgAccountsOtpVerifyCreateError as CfgAccountsOtpVerifyCreateError, type types_gen$2_CfgAccountsOtpVerifyCreateErrors as CfgAccountsOtpVerifyCreateErrors, type types_gen$2_CfgAccountsOtpVerifyCreateResponse as CfgAccountsOtpVerifyCreateResponse, type types_gen$2_CfgAccountsOtpVerifyCreateResponses as CfgAccountsOtpVerifyCreateResponses, type types_gen$2_CfgAccountsProfileAvatarCreateData as CfgAccountsProfileAvatarCreateData, type types_gen$2_CfgAccountsProfileAvatarCreateErrors as CfgAccountsProfileAvatarCreateErrors, type types_gen$2_CfgAccountsProfileAvatarCreateResponse as CfgAccountsProfileAvatarCreateResponse, type types_gen$2_CfgAccountsProfileAvatarCreateResponses as CfgAccountsProfileAvatarCreateResponses, type types_gen$2_CfgAccountsProfileDeleteCreateData as CfgAccountsProfileDeleteCreateData, type types_gen$2_CfgAccountsProfileDeleteCreateErrors as CfgAccountsProfileDeleteCreateErrors, type types_gen$2_CfgAccountsProfileDeleteCreateResponse as CfgAccountsProfileDeleteCreateResponse, type types_gen$2_CfgAccountsProfileDeleteCreateResponses as CfgAccountsProfileDeleteCreateResponses, type types_gen$2_CfgAccountsProfilePartialPartialUpdateData as CfgAccountsProfilePartialPartialUpdateData, type types_gen$2_CfgAccountsProfilePartialPartialUpdateErrors as CfgAccountsProfilePartialPartialUpdateErrors, type types_gen$2_CfgAccountsProfilePartialPartialUpdateResponse as CfgAccountsProfilePartialPartialUpdateResponse, type types_gen$2_CfgAccountsProfilePartialPartialUpdateResponses as CfgAccountsProfilePartialPartialUpdateResponses, type types_gen$2_CfgAccountsProfilePartialUpdateData as CfgAccountsProfilePartialUpdateData, type types_gen$2_CfgAccountsProfilePartialUpdateErrors as CfgAccountsProfilePartialUpdateErrors, type types_gen$2_CfgAccountsProfilePartialUpdateResponse as CfgAccountsProfilePartialUpdateResponse, type types_gen$2_CfgAccountsProfilePartialUpdateResponses as CfgAccountsProfilePartialUpdateResponses, type types_gen$2_CfgAccountsProfileRetrieveData as CfgAccountsProfileRetrieveData, type types_gen$2_CfgAccountsProfileRetrieveErrors as CfgAccountsProfileRetrieveErrors, type types_gen$2_CfgAccountsProfileRetrieveResponse as CfgAccountsProfileRetrieveResponse, type types_gen$2_CfgAccountsProfileRetrieveResponses as CfgAccountsProfileRetrieveResponses, type types_gen$2_CfgAccountsProfileUpdatePartialUpdateData as CfgAccountsProfileUpdatePartialUpdateData, type types_gen$2_CfgAccountsProfileUpdatePartialUpdateErrors as CfgAccountsProfileUpdatePartialUpdateErrors, type types_gen$2_CfgAccountsProfileUpdatePartialUpdateResponse as CfgAccountsProfileUpdatePartialUpdateResponse, type types_gen$2_CfgAccountsProfileUpdatePartialUpdateResponses as CfgAccountsProfileUpdatePartialUpdateResponses, type types_gen$2_CfgAccountsProfileUpdateUpdateData as CfgAccountsProfileUpdateUpdateData, type types_gen$2_CfgAccountsProfileUpdateUpdateErrors as CfgAccountsProfileUpdateUpdateErrors, type types_gen$2_CfgAccountsProfileUpdateUpdateResponse as CfgAccountsProfileUpdateUpdateResponse, type types_gen$2_CfgAccountsProfileUpdateUpdateResponses as CfgAccountsProfileUpdateUpdateResponses, type types_gen$2_CfgAccountsTokenRefreshCreateData as CfgAccountsTokenRefreshCreateData, type types_gen$2_CfgAccountsTokenRefreshCreateResponse as CfgAccountsTokenRefreshCreateResponse, type types_gen$2_CfgAccountsTokenRefreshCreateResponses as CfgAccountsTokenRefreshCreateResponses, type types_gen$2_CfgCentrifugoAuthTokenRetrieveData as CfgCentrifugoAuthTokenRetrieveData, type types_gen$2_CfgCentrifugoAuthTokenRetrieveErrors as CfgCentrifugoAuthTokenRetrieveErrors, type types_gen$2_CfgCentrifugoAuthTokenRetrieveResponse as CfgCentrifugoAuthTokenRetrieveResponse, type types_gen$2_CfgCentrifugoAuthTokenRetrieveResponses as CfgCentrifugoAuthTokenRetrieveResponses, type types_gen$2_CfgTotpBackupCodesRegenerateCreateData as CfgTotpBackupCodesRegenerateCreateData, type types_gen$2_CfgTotpBackupCodesRegenerateCreateErrors as CfgTotpBackupCodesRegenerateCreateErrors, type types_gen$2_CfgTotpBackupCodesRegenerateCreateResponse as CfgTotpBackupCodesRegenerateCreateResponse, type types_gen$2_CfgTotpBackupCodesRegenerateCreateResponses as CfgTotpBackupCodesRegenerateCreateResponses, type types_gen$2_CfgTotpBackupCodesRetrieveData as CfgTotpBackupCodesRetrieveData, type types_gen$2_CfgTotpBackupCodesRetrieveResponse as CfgTotpBackupCodesRetrieveResponse, type types_gen$2_CfgTotpBackupCodesRetrieveResponses as CfgTotpBackupCodesRetrieveResponses, type types_gen$2_CfgTotpDevicesDestroyData as CfgTotpDevicesDestroyData, type types_gen$2_CfgTotpDevicesDestroyResponse as CfgTotpDevicesDestroyResponse, type types_gen$2_CfgTotpDevicesDestroyResponses as CfgTotpDevicesDestroyResponses, type types_gen$2_CfgTotpDevicesRetrieveData as CfgTotpDevicesRetrieveData, type types_gen$2_CfgTotpDevicesRetrieveResponse as CfgTotpDevicesRetrieveResponse, type types_gen$2_CfgTotpDevicesRetrieveResponses as CfgTotpDevicesRetrieveResponses, type types_gen$2_CfgTotpDisableCreateData as CfgTotpDisableCreateData, type types_gen$2_CfgTotpDisableCreateErrors as CfgTotpDisableCreateErrors, type types_gen$2_CfgTotpDisableCreateResponses as CfgTotpDisableCreateResponses, type types_gen$2_CfgTotpSetupConfirmCreateData as CfgTotpSetupConfirmCreateData, type types_gen$2_CfgTotpSetupConfirmCreateErrors as CfgTotpSetupConfirmCreateErrors, type types_gen$2_CfgTotpSetupConfirmCreateResponse as CfgTotpSetupConfirmCreateResponse, type types_gen$2_CfgTotpSetupConfirmCreateResponses as CfgTotpSetupConfirmCreateResponses, type types_gen$2_CfgTotpSetupCreateData as CfgTotpSetupCreateData, type types_gen$2_CfgTotpSetupCreateErrors as CfgTotpSetupCreateErrors, type types_gen$2_CfgTotpSetupCreateResponse as CfgTotpSetupCreateResponse, type types_gen$2_CfgTotpSetupCreateResponses as CfgTotpSetupCreateResponses, type types_gen$2_CfgTotpVerifyBackupCreateData as CfgTotpVerifyBackupCreateData, type types_gen$2_CfgTotpVerifyBackupCreateErrors as CfgTotpVerifyBackupCreateErrors, type types_gen$2_CfgTotpVerifyBackupCreateResponse as CfgTotpVerifyBackupCreateResponse, type types_gen$2_CfgTotpVerifyBackupCreateResponses as CfgTotpVerifyBackupCreateResponses, type types_gen$2_CfgTotpVerifyCreateData as CfgTotpVerifyCreateData, type types_gen$2_CfgTotpVerifyCreateErrors as CfgTotpVerifyCreateErrors, type types_gen$2_CfgTotpVerifyCreateResponse as CfgTotpVerifyCreateResponse, type types_gen$2_CfgTotpVerifyCreateResponses as CfgTotpVerifyCreateResponses, type types_gen$2_CfgUserUpdateRequest as CfgUserUpdateRequest, type types_gen$2_ClientOptions as ClientOptions, type types_gen$2_ConfirmSetupRequest as ConfirmSetupRequest, type types_gen$2_ConfirmSetupResponse as ConfirmSetupResponse, type types_gen$2_ConnectionTokenResponse as ConnectionTokenResponse, type types_gen$2_DeviceList as DeviceList, type types_gen$2_DeviceListResponse as DeviceListResponse, type types_gen$2_DeviceListResponseWritable as DeviceListResponseWritable, types_gen$2_DeviceListStatusEnum as DeviceListStatusEnum, type types_gen$2_DisableRequest as DisableRequest, type types_gen$2_OAuthAuthorizeRequestRequest as OAuthAuthorizeRequestRequest, type types_gen$2_OAuthAuthorizeResponse as OAuthAuthorizeResponse, type types_gen$2_OAuthCallbackRequestRequest as OAuthCallbackRequestRequest, type types_gen$2_OAuthConnection as OAuthConnection, type types_gen$2_OAuthDisconnectRequestRequest as OAuthDisconnectRequestRequest, type types_gen$2_OAuthError as OAuthError, type types_gen$2_OAuthProvidersResponse as OAuthProvidersResponse, type types_gen$2_OAuthTokenResponse as OAuthTokenResponse, type types_gen$2_OtpErrorResponse as OtpErrorResponse, type types_gen$2_OtpRequestRequest as OtpRequestRequest, type types_gen$2_OtpRequestResponse as OtpRequestResponse, type types_gen$2_OtpVerifyRequest as OtpVerifyRequest, type types_gen$2_OtpVerifyResponse as OtpVerifyResponse, type types_gen$2_OtpVerifyResponseWritable as OtpVerifyResponseWritable, type types_gen$2_PatchedCfgUserUpdateRequest as PatchedCfgUserUpdateRequest, types_gen$2_ProviderEnum as ProviderEnum, type types_gen$2_SetupRequest as SetupRequest, type types_gen$2_SetupResponse as SetupResponse, type types_gen$2_TokenRefresh as TokenRefresh, type types_gen$2_TokenRefreshRequest as TokenRefreshRequest, type types_gen$2_TokenRefreshWritable as TokenRefreshWritable, type types_gen$2_TotpVerifyUser as TotpVerifyUser, type types_gen$2_TotpVerifyUserWritable as TotpVerifyUserWritable, type types_gen$2_User as User, type types_gen$2_UserWritable as UserWritable, type types_gen$2_VerifyBackupRequest as VerifyBackupRequest, type types_gen$2_VerifyRequest as VerifyRequest, type types_gen$2_VerifyResponse as VerifyResponse, type types_gen$2_VerifyResponseWritable as VerifyResponseWritable };
2364
+ }
2105
2365
 
2106
- /**
2107
- * @djangocfg/api - Shared API Package
2108
- *
2109
- * Core authentication API (cfg_accounts only).
2110
- * Extensions are now in separate packages:
2111
- * - @djangocfg/ext-support
2112
- * - @djangocfg/ext-payments
2113
- * - etc.
2114
- */
2366
+ type types_gen$1_AccountDeleteResponse = AccountDeleteResponse;
2367
+ type types_gen$1_BackupCodesRegenerateRequest = BackupCodesRegenerateRequest;
2368
+ type types_gen$1_BackupCodesRegenerateResponse = BackupCodesRegenerateResponse;
2369
+ type types_gen$1_BackupCodesStatus = BackupCodesStatus;
2370
+ type types_gen$1_CentrifugoToken = CentrifugoToken;
2371
+ type types_gen$1_CfgAccountsOauthConnectionsListData = CfgAccountsOauthConnectionsListData;
2372
+ type types_gen$1_CfgAccountsOauthConnectionsListResponse = CfgAccountsOauthConnectionsListResponse;
2373
+ type types_gen$1_CfgAccountsOauthConnectionsListResponses = CfgAccountsOauthConnectionsListResponses;
2374
+ type types_gen$1_CfgAccountsOauthDisconnectCreateData = CfgAccountsOauthDisconnectCreateData;
2375
+ type types_gen$1_CfgAccountsOauthDisconnectCreateError = CfgAccountsOauthDisconnectCreateError;
2376
+ type types_gen$1_CfgAccountsOauthDisconnectCreateErrors = CfgAccountsOauthDisconnectCreateErrors;
2377
+ type types_gen$1_CfgAccountsOauthDisconnectCreateResponse = CfgAccountsOauthDisconnectCreateResponse;
2378
+ type types_gen$1_CfgAccountsOauthDisconnectCreateResponses = CfgAccountsOauthDisconnectCreateResponses;
2379
+ type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateData = CfgAccountsOauthGithubAuthorizeCreateData;
2380
+ type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateError = CfgAccountsOauthGithubAuthorizeCreateError;
2381
+ type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateErrors = CfgAccountsOauthGithubAuthorizeCreateErrors;
2382
+ type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateResponse = CfgAccountsOauthGithubAuthorizeCreateResponse;
2383
+ type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateResponses = CfgAccountsOauthGithubAuthorizeCreateResponses;
2384
+ type types_gen$1_CfgAccountsOauthGithubCallbackCreateData = CfgAccountsOauthGithubCallbackCreateData;
2385
+ type types_gen$1_CfgAccountsOauthGithubCallbackCreateError = CfgAccountsOauthGithubCallbackCreateError;
2386
+ type types_gen$1_CfgAccountsOauthGithubCallbackCreateErrors = CfgAccountsOauthGithubCallbackCreateErrors;
2387
+ type types_gen$1_CfgAccountsOauthGithubCallbackCreateResponse = CfgAccountsOauthGithubCallbackCreateResponse;
2388
+ type types_gen$1_CfgAccountsOauthGithubCallbackCreateResponses = CfgAccountsOauthGithubCallbackCreateResponses;
2389
+ type types_gen$1_CfgAccountsOauthProvidersRetrieveData = CfgAccountsOauthProvidersRetrieveData;
2390
+ type types_gen$1_CfgAccountsOauthProvidersRetrieveResponse = CfgAccountsOauthProvidersRetrieveResponse;
2391
+ type types_gen$1_CfgAccountsOauthProvidersRetrieveResponses = CfgAccountsOauthProvidersRetrieveResponses;
2392
+ type types_gen$1_CfgAccountsOtpRequestCreateData = CfgAccountsOtpRequestCreateData;
2393
+ type types_gen$1_CfgAccountsOtpRequestCreateError = CfgAccountsOtpRequestCreateError;
2394
+ type types_gen$1_CfgAccountsOtpRequestCreateErrors = CfgAccountsOtpRequestCreateErrors;
2395
+ type types_gen$1_CfgAccountsOtpRequestCreateResponse = CfgAccountsOtpRequestCreateResponse;
2396
+ type types_gen$1_CfgAccountsOtpRequestCreateResponses = CfgAccountsOtpRequestCreateResponses;
2397
+ type types_gen$1_CfgAccountsOtpVerifyCreateData = CfgAccountsOtpVerifyCreateData;
2398
+ type types_gen$1_CfgAccountsOtpVerifyCreateError = CfgAccountsOtpVerifyCreateError;
2399
+ type types_gen$1_CfgAccountsOtpVerifyCreateErrors = CfgAccountsOtpVerifyCreateErrors;
2400
+ type types_gen$1_CfgAccountsOtpVerifyCreateResponse = CfgAccountsOtpVerifyCreateResponse;
2401
+ type types_gen$1_CfgAccountsOtpVerifyCreateResponses = CfgAccountsOtpVerifyCreateResponses;
2402
+ type types_gen$1_CfgAccountsProfileAvatarCreateData = CfgAccountsProfileAvatarCreateData;
2403
+ type types_gen$1_CfgAccountsProfileAvatarCreateErrors = CfgAccountsProfileAvatarCreateErrors;
2404
+ type types_gen$1_CfgAccountsProfileAvatarCreateResponse = CfgAccountsProfileAvatarCreateResponse;
2405
+ type types_gen$1_CfgAccountsProfileAvatarCreateResponses = CfgAccountsProfileAvatarCreateResponses;
2406
+ type types_gen$1_CfgAccountsProfileDeleteCreateData = CfgAccountsProfileDeleteCreateData;
2407
+ type types_gen$1_CfgAccountsProfileDeleteCreateErrors = CfgAccountsProfileDeleteCreateErrors;
2408
+ type types_gen$1_CfgAccountsProfileDeleteCreateResponse = CfgAccountsProfileDeleteCreateResponse;
2409
+ type types_gen$1_CfgAccountsProfileDeleteCreateResponses = CfgAccountsProfileDeleteCreateResponses;
2410
+ type types_gen$1_CfgAccountsProfilePartialPartialUpdateData = CfgAccountsProfilePartialPartialUpdateData;
2411
+ type types_gen$1_CfgAccountsProfilePartialPartialUpdateErrors = CfgAccountsProfilePartialPartialUpdateErrors;
2412
+ type types_gen$1_CfgAccountsProfilePartialPartialUpdateResponse = CfgAccountsProfilePartialPartialUpdateResponse;
2413
+ type types_gen$1_CfgAccountsProfilePartialPartialUpdateResponses = CfgAccountsProfilePartialPartialUpdateResponses;
2414
+ type types_gen$1_CfgAccountsProfilePartialUpdateData = CfgAccountsProfilePartialUpdateData;
2415
+ type types_gen$1_CfgAccountsProfilePartialUpdateErrors = CfgAccountsProfilePartialUpdateErrors;
2416
+ type types_gen$1_CfgAccountsProfilePartialUpdateResponse = CfgAccountsProfilePartialUpdateResponse;
2417
+ type types_gen$1_CfgAccountsProfilePartialUpdateResponses = CfgAccountsProfilePartialUpdateResponses;
2418
+ type types_gen$1_CfgAccountsProfileRetrieveData = CfgAccountsProfileRetrieveData;
2419
+ type types_gen$1_CfgAccountsProfileRetrieveErrors = CfgAccountsProfileRetrieveErrors;
2420
+ type types_gen$1_CfgAccountsProfileRetrieveResponse = CfgAccountsProfileRetrieveResponse;
2421
+ type types_gen$1_CfgAccountsProfileRetrieveResponses = CfgAccountsProfileRetrieveResponses;
2422
+ type types_gen$1_CfgAccountsProfileUpdatePartialUpdateData = CfgAccountsProfileUpdatePartialUpdateData;
2423
+ type types_gen$1_CfgAccountsProfileUpdatePartialUpdateErrors = CfgAccountsProfileUpdatePartialUpdateErrors;
2424
+ type types_gen$1_CfgAccountsProfileUpdatePartialUpdateResponse = CfgAccountsProfileUpdatePartialUpdateResponse;
2425
+ type types_gen$1_CfgAccountsProfileUpdatePartialUpdateResponses = CfgAccountsProfileUpdatePartialUpdateResponses;
2426
+ type types_gen$1_CfgAccountsProfileUpdateUpdateData = CfgAccountsProfileUpdateUpdateData;
2427
+ type types_gen$1_CfgAccountsProfileUpdateUpdateErrors = CfgAccountsProfileUpdateUpdateErrors;
2428
+ type types_gen$1_CfgAccountsProfileUpdateUpdateResponse = CfgAccountsProfileUpdateUpdateResponse;
2429
+ type types_gen$1_CfgAccountsProfileUpdateUpdateResponses = CfgAccountsProfileUpdateUpdateResponses;
2430
+ type types_gen$1_CfgAccountsTokenRefreshCreateData = CfgAccountsTokenRefreshCreateData;
2431
+ type types_gen$1_CfgAccountsTokenRefreshCreateResponse = CfgAccountsTokenRefreshCreateResponse;
2432
+ type types_gen$1_CfgAccountsTokenRefreshCreateResponses = CfgAccountsTokenRefreshCreateResponses;
2433
+ type types_gen$1_CfgCentrifugoAuthTokenRetrieveData = CfgCentrifugoAuthTokenRetrieveData;
2434
+ type types_gen$1_CfgCentrifugoAuthTokenRetrieveErrors = CfgCentrifugoAuthTokenRetrieveErrors;
2435
+ type types_gen$1_CfgCentrifugoAuthTokenRetrieveResponse = CfgCentrifugoAuthTokenRetrieveResponse;
2436
+ type types_gen$1_CfgCentrifugoAuthTokenRetrieveResponses = CfgCentrifugoAuthTokenRetrieveResponses;
2437
+ type types_gen$1_CfgTotpBackupCodesRegenerateCreateData = CfgTotpBackupCodesRegenerateCreateData;
2438
+ type types_gen$1_CfgTotpBackupCodesRegenerateCreateErrors = CfgTotpBackupCodesRegenerateCreateErrors;
2439
+ type types_gen$1_CfgTotpBackupCodesRegenerateCreateResponse = CfgTotpBackupCodesRegenerateCreateResponse;
2440
+ type types_gen$1_CfgTotpBackupCodesRegenerateCreateResponses = CfgTotpBackupCodesRegenerateCreateResponses;
2441
+ type types_gen$1_CfgTotpBackupCodesRetrieveData = CfgTotpBackupCodesRetrieveData;
2442
+ type types_gen$1_CfgTotpBackupCodesRetrieveResponse = CfgTotpBackupCodesRetrieveResponse;
2443
+ type types_gen$1_CfgTotpBackupCodesRetrieveResponses = CfgTotpBackupCodesRetrieveResponses;
2444
+ type types_gen$1_CfgTotpDevicesDestroyData = CfgTotpDevicesDestroyData;
2445
+ type types_gen$1_CfgTotpDevicesDestroyResponse = CfgTotpDevicesDestroyResponse;
2446
+ type types_gen$1_CfgTotpDevicesDestroyResponses = CfgTotpDevicesDestroyResponses;
2447
+ type types_gen$1_CfgTotpDevicesRetrieveData = CfgTotpDevicesRetrieveData;
2448
+ type types_gen$1_CfgTotpDevicesRetrieveResponse = CfgTotpDevicesRetrieveResponse;
2449
+ type types_gen$1_CfgTotpDevicesRetrieveResponses = CfgTotpDevicesRetrieveResponses;
2450
+ type types_gen$1_CfgTotpDisableCreateData = CfgTotpDisableCreateData;
2451
+ type types_gen$1_CfgTotpDisableCreateErrors = CfgTotpDisableCreateErrors;
2452
+ type types_gen$1_CfgTotpDisableCreateResponses = CfgTotpDisableCreateResponses;
2453
+ type types_gen$1_CfgTotpSetupConfirmCreateData = CfgTotpSetupConfirmCreateData;
2454
+ type types_gen$1_CfgTotpSetupConfirmCreateErrors = CfgTotpSetupConfirmCreateErrors;
2455
+ type types_gen$1_CfgTotpSetupConfirmCreateResponse = CfgTotpSetupConfirmCreateResponse;
2456
+ type types_gen$1_CfgTotpSetupConfirmCreateResponses = CfgTotpSetupConfirmCreateResponses;
2457
+ type types_gen$1_CfgTotpSetupCreateData = CfgTotpSetupCreateData;
2458
+ type types_gen$1_CfgTotpSetupCreateErrors = CfgTotpSetupCreateErrors;
2459
+ type types_gen$1_CfgTotpSetupCreateResponse = CfgTotpSetupCreateResponse;
2460
+ type types_gen$1_CfgTotpSetupCreateResponses = CfgTotpSetupCreateResponses;
2461
+ type types_gen$1_CfgTotpVerifyBackupCreateData = CfgTotpVerifyBackupCreateData;
2462
+ type types_gen$1_CfgTotpVerifyBackupCreateErrors = CfgTotpVerifyBackupCreateErrors;
2463
+ type types_gen$1_CfgTotpVerifyBackupCreateResponse = CfgTotpVerifyBackupCreateResponse;
2464
+ type types_gen$1_CfgTotpVerifyBackupCreateResponses = CfgTotpVerifyBackupCreateResponses;
2465
+ type types_gen$1_CfgTotpVerifyCreateData = CfgTotpVerifyCreateData;
2466
+ type types_gen$1_CfgTotpVerifyCreateErrors = CfgTotpVerifyCreateErrors;
2467
+ type types_gen$1_CfgTotpVerifyCreateResponse = CfgTotpVerifyCreateResponse;
2468
+ type types_gen$1_CfgTotpVerifyCreateResponses = CfgTotpVerifyCreateResponses;
2469
+ type types_gen$1_CfgUserUpdateRequest = CfgUserUpdateRequest;
2470
+ type types_gen$1_ClientOptions = ClientOptions;
2471
+ type types_gen$1_ConfirmSetupRequest = ConfirmSetupRequest;
2472
+ type types_gen$1_ConfirmSetupResponse = ConfirmSetupResponse;
2473
+ type types_gen$1_ConnectionTokenResponse = ConnectionTokenResponse;
2474
+ type types_gen$1_DeviceList = DeviceList;
2475
+ type types_gen$1_DeviceListResponse = DeviceListResponse;
2476
+ type types_gen$1_DeviceListResponseWritable = DeviceListResponseWritable;
2477
+ type types_gen$1_DeviceListStatusEnum = DeviceListStatusEnum;
2478
+ declare const types_gen$1_DeviceListStatusEnum: typeof DeviceListStatusEnum;
2479
+ type types_gen$1_DisableRequest = DisableRequest;
2480
+ type types_gen$1_OAuthAuthorizeRequestRequest = OAuthAuthorizeRequestRequest;
2481
+ type types_gen$1_OAuthAuthorizeResponse = OAuthAuthorizeResponse;
2482
+ type types_gen$1_OAuthCallbackRequestRequest = OAuthCallbackRequestRequest;
2483
+ type types_gen$1_OAuthConnection = OAuthConnection;
2484
+ type types_gen$1_OAuthDisconnectRequestRequest = OAuthDisconnectRequestRequest;
2485
+ type types_gen$1_OAuthError = OAuthError;
2486
+ type types_gen$1_OAuthProvidersResponse = OAuthProvidersResponse;
2487
+ type types_gen$1_OAuthTokenResponse = OAuthTokenResponse;
2488
+ type types_gen$1_OtpErrorResponse = OtpErrorResponse;
2489
+ type types_gen$1_OtpRequestRequest = OtpRequestRequest;
2490
+ type types_gen$1_OtpRequestResponse = OtpRequestResponse;
2491
+ type types_gen$1_OtpVerifyRequest = OtpVerifyRequest;
2492
+ type types_gen$1_OtpVerifyResponse = OtpVerifyResponse;
2493
+ type types_gen$1_OtpVerifyResponseWritable = OtpVerifyResponseWritable;
2494
+ type types_gen$1_PatchedCfgUserUpdateRequest = PatchedCfgUserUpdateRequest;
2495
+ type types_gen$1_ProviderEnum = ProviderEnum;
2496
+ declare const types_gen$1_ProviderEnum: typeof ProviderEnum;
2497
+ type types_gen$1_SetupRequest = SetupRequest;
2498
+ type types_gen$1_SetupResponse = SetupResponse;
2499
+ type types_gen$1_TokenRefresh = TokenRefresh;
2500
+ type types_gen$1_TokenRefreshRequest = TokenRefreshRequest;
2501
+ type types_gen$1_TokenRefreshWritable = TokenRefreshWritable;
2502
+ type types_gen$1_TotpVerifyUser = TotpVerifyUser;
2503
+ type types_gen$1_TotpVerifyUserWritable = TotpVerifyUserWritable;
2504
+ type types_gen$1_User = User;
2505
+ type types_gen$1_UserWritable = UserWritable;
2506
+ type types_gen$1_VerifyBackupRequest = VerifyBackupRequest;
2507
+ type types_gen$1_VerifyRequest = VerifyRequest;
2508
+ type types_gen$1_VerifyResponse = VerifyResponse;
2509
+ type types_gen$1_VerifyResponseWritable = VerifyResponseWritable;
2510
+ declare namespace types_gen$1 {
2511
+ export { type types_gen$1_AccountDeleteResponse as AccountDeleteResponse, type types_gen$1_BackupCodesRegenerateRequest as BackupCodesRegenerateRequest, type types_gen$1_BackupCodesRegenerateResponse as BackupCodesRegenerateResponse, type types_gen$1_BackupCodesStatus as BackupCodesStatus, type types_gen$1_CentrifugoToken as CentrifugoToken, type types_gen$1_CfgAccountsOauthConnectionsListData as CfgAccountsOauthConnectionsListData, type types_gen$1_CfgAccountsOauthConnectionsListResponse as CfgAccountsOauthConnectionsListResponse, type types_gen$1_CfgAccountsOauthConnectionsListResponses as CfgAccountsOauthConnectionsListResponses, type types_gen$1_CfgAccountsOauthDisconnectCreateData as CfgAccountsOauthDisconnectCreateData, type types_gen$1_CfgAccountsOauthDisconnectCreateError as CfgAccountsOauthDisconnectCreateError, type types_gen$1_CfgAccountsOauthDisconnectCreateErrors as CfgAccountsOauthDisconnectCreateErrors, type types_gen$1_CfgAccountsOauthDisconnectCreateResponse as CfgAccountsOauthDisconnectCreateResponse, type types_gen$1_CfgAccountsOauthDisconnectCreateResponses as CfgAccountsOauthDisconnectCreateResponses, type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateData as CfgAccountsOauthGithubAuthorizeCreateData, type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateError as CfgAccountsOauthGithubAuthorizeCreateError, type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateErrors as CfgAccountsOauthGithubAuthorizeCreateErrors, type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateResponse as CfgAccountsOauthGithubAuthorizeCreateResponse, type types_gen$1_CfgAccountsOauthGithubAuthorizeCreateResponses as CfgAccountsOauthGithubAuthorizeCreateResponses, type types_gen$1_CfgAccountsOauthGithubCallbackCreateData as CfgAccountsOauthGithubCallbackCreateData, type types_gen$1_CfgAccountsOauthGithubCallbackCreateError as CfgAccountsOauthGithubCallbackCreateError, type types_gen$1_CfgAccountsOauthGithubCallbackCreateErrors as CfgAccountsOauthGithubCallbackCreateErrors, type types_gen$1_CfgAccountsOauthGithubCallbackCreateResponse as CfgAccountsOauthGithubCallbackCreateResponse, type types_gen$1_CfgAccountsOauthGithubCallbackCreateResponses as CfgAccountsOauthGithubCallbackCreateResponses, type types_gen$1_CfgAccountsOauthProvidersRetrieveData as CfgAccountsOauthProvidersRetrieveData, type types_gen$1_CfgAccountsOauthProvidersRetrieveResponse as CfgAccountsOauthProvidersRetrieveResponse, type types_gen$1_CfgAccountsOauthProvidersRetrieveResponses as CfgAccountsOauthProvidersRetrieveResponses, type types_gen$1_CfgAccountsOtpRequestCreateData as CfgAccountsOtpRequestCreateData, type types_gen$1_CfgAccountsOtpRequestCreateError as CfgAccountsOtpRequestCreateError, type types_gen$1_CfgAccountsOtpRequestCreateErrors as CfgAccountsOtpRequestCreateErrors, type types_gen$1_CfgAccountsOtpRequestCreateResponse as CfgAccountsOtpRequestCreateResponse, type types_gen$1_CfgAccountsOtpRequestCreateResponses as CfgAccountsOtpRequestCreateResponses, type types_gen$1_CfgAccountsOtpVerifyCreateData as CfgAccountsOtpVerifyCreateData, type types_gen$1_CfgAccountsOtpVerifyCreateError as CfgAccountsOtpVerifyCreateError, type types_gen$1_CfgAccountsOtpVerifyCreateErrors as CfgAccountsOtpVerifyCreateErrors, type types_gen$1_CfgAccountsOtpVerifyCreateResponse as CfgAccountsOtpVerifyCreateResponse, type types_gen$1_CfgAccountsOtpVerifyCreateResponses as CfgAccountsOtpVerifyCreateResponses, type types_gen$1_CfgAccountsProfileAvatarCreateData as CfgAccountsProfileAvatarCreateData, type types_gen$1_CfgAccountsProfileAvatarCreateErrors as CfgAccountsProfileAvatarCreateErrors, type types_gen$1_CfgAccountsProfileAvatarCreateResponse as CfgAccountsProfileAvatarCreateResponse, type types_gen$1_CfgAccountsProfileAvatarCreateResponses as CfgAccountsProfileAvatarCreateResponses, type types_gen$1_CfgAccountsProfileDeleteCreateData as CfgAccountsProfileDeleteCreateData, type types_gen$1_CfgAccountsProfileDeleteCreateErrors as CfgAccountsProfileDeleteCreateErrors, type types_gen$1_CfgAccountsProfileDeleteCreateResponse as CfgAccountsProfileDeleteCreateResponse, type types_gen$1_CfgAccountsProfileDeleteCreateResponses as CfgAccountsProfileDeleteCreateResponses, type types_gen$1_CfgAccountsProfilePartialPartialUpdateData as CfgAccountsProfilePartialPartialUpdateData, type types_gen$1_CfgAccountsProfilePartialPartialUpdateErrors as CfgAccountsProfilePartialPartialUpdateErrors, type types_gen$1_CfgAccountsProfilePartialPartialUpdateResponse as CfgAccountsProfilePartialPartialUpdateResponse, type types_gen$1_CfgAccountsProfilePartialPartialUpdateResponses as CfgAccountsProfilePartialPartialUpdateResponses, type types_gen$1_CfgAccountsProfilePartialUpdateData as CfgAccountsProfilePartialUpdateData, type types_gen$1_CfgAccountsProfilePartialUpdateErrors as CfgAccountsProfilePartialUpdateErrors, type types_gen$1_CfgAccountsProfilePartialUpdateResponse as CfgAccountsProfilePartialUpdateResponse, type types_gen$1_CfgAccountsProfilePartialUpdateResponses as CfgAccountsProfilePartialUpdateResponses, type types_gen$1_CfgAccountsProfileRetrieveData as CfgAccountsProfileRetrieveData, type types_gen$1_CfgAccountsProfileRetrieveErrors as CfgAccountsProfileRetrieveErrors, type types_gen$1_CfgAccountsProfileRetrieveResponse as CfgAccountsProfileRetrieveResponse, type types_gen$1_CfgAccountsProfileRetrieveResponses as CfgAccountsProfileRetrieveResponses, type types_gen$1_CfgAccountsProfileUpdatePartialUpdateData as CfgAccountsProfileUpdatePartialUpdateData, type types_gen$1_CfgAccountsProfileUpdatePartialUpdateErrors as CfgAccountsProfileUpdatePartialUpdateErrors, type types_gen$1_CfgAccountsProfileUpdatePartialUpdateResponse as CfgAccountsProfileUpdatePartialUpdateResponse, type types_gen$1_CfgAccountsProfileUpdatePartialUpdateResponses as CfgAccountsProfileUpdatePartialUpdateResponses, type types_gen$1_CfgAccountsProfileUpdateUpdateData as CfgAccountsProfileUpdateUpdateData, type types_gen$1_CfgAccountsProfileUpdateUpdateErrors as CfgAccountsProfileUpdateUpdateErrors, type types_gen$1_CfgAccountsProfileUpdateUpdateResponse as CfgAccountsProfileUpdateUpdateResponse, type types_gen$1_CfgAccountsProfileUpdateUpdateResponses as CfgAccountsProfileUpdateUpdateResponses, type types_gen$1_CfgAccountsTokenRefreshCreateData as CfgAccountsTokenRefreshCreateData, type types_gen$1_CfgAccountsTokenRefreshCreateResponse as CfgAccountsTokenRefreshCreateResponse, type types_gen$1_CfgAccountsTokenRefreshCreateResponses as CfgAccountsTokenRefreshCreateResponses, type types_gen$1_CfgCentrifugoAuthTokenRetrieveData as CfgCentrifugoAuthTokenRetrieveData, type types_gen$1_CfgCentrifugoAuthTokenRetrieveErrors as CfgCentrifugoAuthTokenRetrieveErrors, type types_gen$1_CfgCentrifugoAuthTokenRetrieveResponse as CfgCentrifugoAuthTokenRetrieveResponse, type types_gen$1_CfgCentrifugoAuthTokenRetrieveResponses as CfgCentrifugoAuthTokenRetrieveResponses, type types_gen$1_CfgTotpBackupCodesRegenerateCreateData as CfgTotpBackupCodesRegenerateCreateData, type types_gen$1_CfgTotpBackupCodesRegenerateCreateErrors as CfgTotpBackupCodesRegenerateCreateErrors, type types_gen$1_CfgTotpBackupCodesRegenerateCreateResponse as CfgTotpBackupCodesRegenerateCreateResponse, type types_gen$1_CfgTotpBackupCodesRegenerateCreateResponses as CfgTotpBackupCodesRegenerateCreateResponses, type types_gen$1_CfgTotpBackupCodesRetrieveData as CfgTotpBackupCodesRetrieveData, type types_gen$1_CfgTotpBackupCodesRetrieveResponse as CfgTotpBackupCodesRetrieveResponse, type types_gen$1_CfgTotpBackupCodesRetrieveResponses as CfgTotpBackupCodesRetrieveResponses, type types_gen$1_CfgTotpDevicesDestroyData as CfgTotpDevicesDestroyData, type types_gen$1_CfgTotpDevicesDestroyResponse as CfgTotpDevicesDestroyResponse, type types_gen$1_CfgTotpDevicesDestroyResponses as CfgTotpDevicesDestroyResponses, type types_gen$1_CfgTotpDevicesRetrieveData as CfgTotpDevicesRetrieveData, type types_gen$1_CfgTotpDevicesRetrieveResponse as CfgTotpDevicesRetrieveResponse, type types_gen$1_CfgTotpDevicesRetrieveResponses as CfgTotpDevicesRetrieveResponses, type types_gen$1_CfgTotpDisableCreateData as CfgTotpDisableCreateData, type types_gen$1_CfgTotpDisableCreateErrors as CfgTotpDisableCreateErrors, type types_gen$1_CfgTotpDisableCreateResponses as CfgTotpDisableCreateResponses, type types_gen$1_CfgTotpSetupConfirmCreateData as CfgTotpSetupConfirmCreateData, type types_gen$1_CfgTotpSetupConfirmCreateErrors as CfgTotpSetupConfirmCreateErrors, type types_gen$1_CfgTotpSetupConfirmCreateResponse as CfgTotpSetupConfirmCreateResponse, type types_gen$1_CfgTotpSetupConfirmCreateResponses as CfgTotpSetupConfirmCreateResponses, type types_gen$1_CfgTotpSetupCreateData as CfgTotpSetupCreateData, type types_gen$1_CfgTotpSetupCreateErrors as CfgTotpSetupCreateErrors, type types_gen$1_CfgTotpSetupCreateResponse as CfgTotpSetupCreateResponse, type types_gen$1_CfgTotpSetupCreateResponses as CfgTotpSetupCreateResponses, type types_gen$1_CfgTotpVerifyBackupCreateData as CfgTotpVerifyBackupCreateData, type types_gen$1_CfgTotpVerifyBackupCreateErrors as CfgTotpVerifyBackupCreateErrors, type types_gen$1_CfgTotpVerifyBackupCreateResponse as CfgTotpVerifyBackupCreateResponse, type types_gen$1_CfgTotpVerifyBackupCreateResponses as CfgTotpVerifyBackupCreateResponses, type types_gen$1_CfgTotpVerifyCreateData as CfgTotpVerifyCreateData, type types_gen$1_CfgTotpVerifyCreateErrors as CfgTotpVerifyCreateErrors, type types_gen$1_CfgTotpVerifyCreateResponse as CfgTotpVerifyCreateResponse, type types_gen$1_CfgTotpVerifyCreateResponses as CfgTotpVerifyCreateResponses, type types_gen$1_CfgUserUpdateRequest as CfgUserUpdateRequest, type types_gen$1_ClientOptions as ClientOptions, type types_gen$1_ConfirmSetupRequest as ConfirmSetupRequest, type types_gen$1_ConfirmSetupResponse as ConfirmSetupResponse, type types_gen$1_ConnectionTokenResponse as ConnectionTokenResponse, type types_gen$1_DeviceList as DeviceList, type types_gen$1_DeviceListResponse as DeviceListResponse, type types_gen$1_DeviceListResponseWritable as DeviceListResponseWritable, types_gen$1_DeviceListStatusEnum as DeviceListStatusEnum, type types_gen$1_DisableRequest as DisableRequest, type types_gen$1_OAuthAuthorizeRequestRequest as OAuthAuthorizeRequestRequest, type types_gen$1_OAuthAuthorizeResponse as OAuthAuthorizeResponse, type types_gen$1_OAuthCallbackRequestRequest as OAuthCallbackRequestRequest, type types_gen$1_OAuthConnection as OAuthConnection, type types_gen$1_OAuthDisconnectRequestRequest as OAuthDisconnectRequestRequest, type types_gen$1_OAuthError as OAuthError, type types_gen$1_OAuthProvidersResponse as OAuthProvidersResponse, type types_gen$1_OAuthTokenResponse as OAuthTokenResponse, type types_gen$1_OtpErrorResponse as OtpErrorResponse, type types_gen$1_OtpRequestRequest as OtpRequestRequest, type types_gen$1_OtpRequestResponse as OtpRequestResponse, type types_gen$1_OtpVerifyRequest as OtpVerifyRequest, type types_gen$1_OtpVerifyResponse as OtpVerifyResponse, type types_gen$1_OtpVerifyResponseWritable as OtpVerifyResponseWritable, type types_gen$1_PatchedCfgUserUpdateRequest as PatchedCfgUserUpdateRequest, types_gen$1_ProviderEnum as ProviderEnum, type types_gen$1_SetupRequest as SetupRequest, type types_gen$1_SetupResponse as SetupResponse, type types_gen$1_TokenRefresh as TokenRefresh, type types_gen$1_TokenRefreshRequest as TokenRefreshRequest, type types_gen$1_TokenRefreshWritable as TokenRefreshWritable, type types_gen$1_TotpVerifyUser as TotpVerifyUser, type types_gen$1_TotpVerifyUserWritable as TotpVerifyUserWritable, type types_gen$1_User as User, type types_gen$1_UserWritable as UserWritable, type types_gen$1_VerifyBackupRequest as VerifyBackupRequest, type types_gen$1_VerifyRequest as VerifyRequest, type types_gen$1_VerifyResponse as VerifyResponse, type types_gen$1_VerifyResponseWritable as VerifyResponseWritable };
2512
+ }
2115
2513
 
2116
- declare const api: API;
2117
- /**
2118
- * Base Client Class
2119
- *
2120
- * Service classes can extend this to access api instance
2121
- */
2122
- declare class BaseClient {
2123
- protected static api: API;
2514
+ type types_gen_AccountDeleteResponse = AccountDeleteResponse;
2515
+ type types_gen_BackupCodesRegenerateRequest = BackupCodesRegenerateRequest;
2516
+ type types_gen_BackupCodesRegenerateResponse = BackupCodesRegenerateResponse;
2517
+ type types_gen_BackupCodesStatus = BackupCodesStatus;
2518
+ type types_gen_CentrifugoToken = CentrifugoToken;
2519
+ type types_gen_CfgAccountsOauthConnectionsListData = CfgAccountsOauthConnectionsListData;
2520
+ type types_gen_CfgAccountsOauthConnectionsListResponse = CfgAccountsOauthConnectionsListResponse;
2521
+ type types_gen_CfgAccountsOauthConnectionsListResponses = CfgAccountsOauthConnectionsListResponses;
2522
+ type types_gen_CfgAccountsOauthDisconnectCreateData = CfgAccountsOauthDisconnectCreateData;
2523
+ type types_gen_CfgAccountsOauthDisconnectCreateError = CfgAccountsOauthDisconnectCreateError;
2524
+ type types_gen_CfgAccountsOauthDisconnectCreateErrors = CfgAccountsOauthDisconnectCreateErrors;
2525
+ type types_gen_CfgAccountsOauthDisconnectCreateResponse = CfgAccountsOauthDisconnectCreateResponse;
2526
+ type types_gen_CfgAccountsOauthDisconnectCreateResponses = CfgAccountsOauthDisconnectCreateResponses;
2527
+ type types_gen_CfgAccountsOauthGithubAuthorizeCreateData = CfgAccountsOauthGithubAuthorizeCreateData;
2528
+ type types_gen_CfgAccountsOauthGithubAuthorizeCreateError = CfgAccountsOauthGithubAuthorizeCreateError;
2529
+ type types_gen_CfgAccountsOauthGithubAuthorizeCreateErrors = CfgAccountsOauthGithubAuthorizeCreateErrors;
2530
+ type types_gen_CfgAccountsOauthGithubAuthorizeCreateResponse = CfgAccountsOauthGithubAuthorizeCreateResponse;
2531
+ type types_gen_CfgAccountsOauthGithubAuthorizeCreateResponses = CfgAccountsOauthGithubAuthorizeCreateResponses;
2532
+ type types_gen_CfgAccountsOauthGithubCallbackCreateData = CfgAccountsOauthGithubCallbackCreateData;
2533
+ type types_gen_CfgAccountsOauthGithubCallbackCreateError = CfgAccountsOauthGithubCallbackCreateError;
2534
+ type types_gen_CfgAccountsOauthGithubCallbackCreateErrors = CfgAccountsOauthGithubCallbackCreateErrors;
2535
+ type types_gen_CfgAccountsOauthGithubCallbackCreateResponse = CfgAccountsOauthGithubCallbackCreateResponse;
2536
+ type types_gen_CfgAccountsOauthGithubCallbackCreateResponses = CfgAccountsOauthGithubCallbackCreateResponses;
2537
+ type types_gen_CfgAccountsOauthProvidersRetrieveData = CfgAccountsOauthProvidersRetrieveData;
2538
+ type types_gen_CfgAccountsOauthProvidersRetrieveResponse = CfgAccountsOauthProvidersRetrieveResponse;
2539
+ type types_gen_CfgAccountsOauthProvidersRetrieveResponses = CfgAccountsOauthProvidersRetrieveResponses;
2540
+ type types_gen_CfgAccountsOtpRequestCreateData = CfgAccountsOtpRequestCreateData;
2541
+ type types_gen_CfgAccountsOtpRequestCreateError = CfgAccountsOtpRequestCreateError;
2542
+ type types_gen_CfgAccountsOtpRequestCreateErrors = CfgAccountsOtpRequestCreateErrors;
2543
+ type types_gen_CfgAccountsOtpRequestCreateResponse = CfgAccountsOtpRequestCreateResponse;
2544
+ type types_gen_CfgAccountsOtpRequestCreateResponses = CfgAccountsOtpRequestCreateResponses;
2545
+ type types_gen_CfgAccountsOtpVerifyCreateData = CfgAccountsOtpVerifyCreateData;
2546
+ type types_gen_CfgAccountsOtpVerifyCreateError = CfgAccountsOtpVerifyCreateError;
2547
+ type types_gen_CfgAccountsOtpVerifyCreateErrors = CfgAccountsOtpVerifyCreateErrors;
2548
+ type types_gen_CfgAccountsOtpVerifyCreateResponse = CfgAccountsOtpVerifyCreateResponse;
2549
+ type types_gen_CfgAccountsOtpVerifyCreateResponses = CfgAccountsOtpVerifyCreateResponses;
2550
+ type types_gen_CfgAccountsProfileAvatarCreateData = CfgAccountsProfileAvatarCreateData;
2551
+ type types_gen_CfgAccountsProfileAvatarCreateErrors = CfgAccountsProfileAvatarCreateErrors;
2552
+ type types_gen_CfgAccountsProfileAvatarCreateResponse = CfgAccountsProfileAvatarCreateResponse;
2553
+ type types_gen_CfgAccountsProfileAvatarCreateResponses = CfgAccountsProfileAvatarCreateResponses;
2554
+ type types_gen_CfgAccountsProfileDeleteCreateData = CfgAccountsProfileDeleteCreateData;
2555
+ type types_gen_CfgAccountsProfileDeleteCreateErrors = CfgAccountsProfileDeleteCreateErrors;
2556
+ type types_gen_CfgAccountsProfileDeleteCreateResponse = CfgAccountsProfileDeleteCreateResponse;
2557
+ type types_gen_CfgAccountsProfileDeleteCreateResponses = CfgAccountsProfileDeleteCreateResponses;
2558
+ type types_gen_CfgAccountsProfilePartialPartialUpdateData = CfgAccountsProfilePartialPartialUpdateData;
2559
+ type types_gen_CfgAccountsProfilePartialPartialUpdateErrors = CfgAccountsProfilePartialPartialUpdateErrors;
2560
+ type types_gen_CfgAccountsProfilePartialPartialUpdateResponse = CfgAccountsProfilePartialPartialUpdateResponse;
2561
+ type types_gen_CfgAccountsProfilePartialPartialUpdateResponses = CfgAccountsProfilePartialPartialUpdateResponses;
2562
+ type types_gen_CfgAccountsProfilePartialUpdateData = CfgAccountsProfilePartialUpdateData;
2563
+ type types_gen_CfgAccountsProfilePartialUpdateErrors = CfgAccountsProfilePartialUpdateErrors;
2564
+ type types_gen_CfgAccountsProfilePartialUpdateResponse = CfgAccountsProfilePartialUpdateResponse;
2565
+ type types_gen_CfgAccountsProfilePartialUpdateResponses = CfgAccountsProfilePartialUpdateResponses;
2566
+ type types_gen_CfgAccountsProfileRetrieveData = CfgAccountsProfileRetrieveData;
2567
+ type types_gen_CfgAccountsProfileRetrieveErrors = CfgAccountsProfileRetrieveErrors;
2568
+ type types_gen_CfgAccountsProfileRetrieveResponse = CfgAccountsProfileRetrieveResponse;
2569
+ type types_gen_CfgAccountsProfileRetrieveResponses = CfgAccountsProfileRetrieveResponses;
2570
+ type types_gen_CfgAccountsProfileUpdatePartialUpdateData = CfgAccountsProfileUpdatePartialUpdateData;
2571
+ type types_gen_CfgAccountsProfileUpdatePartialUpdateErrors = CfgAccountsProfileUpdatePartialUpdateErrors;
2572
+ type types_gen_CfgAccountsProfileUpdatePartialUpdateResponse = CfgAccountsProfileUpdatePartialUpdateResponse;
2573
+ type types_gen_CfgAccountsProfileUpdatePartialUpdateResponses = CfgAccountsProfileUpdatePartialUpdateResponses;
2574
+ type types_gen_CfgAccountsProfileUpdateUpdateData = CfgAccountsProfileUpdateUpdateData;
2575
+ type types_gen_CfgAccountsProfileUpdateUpdateErrors = CfgAccountsProfileUpdateUpdateErrors;
2576
+ type types_gen_CfgAccountsProfileUpdateUpdateResponse = CfgAccountsProfileUpdateUpdateResponse;
2577
+ type types_gen_CfgAccountsProfileUpdateUpdateResponses = CfgAccountsProfileUpdateUpdateResponses;
2578
+ type types_gen_CfgAccountsTokenRefreshCreateData = CfgAccountsTokenRefreshCreateData;
2579
+ type types_gen_CfgAccountsTokenRefreshCreateResponse = CfgAccountsTokenRefreshCreateResponse;
2580
+ type types_gen_CfgAccountsTokenRefreshCreateResponses = CfgAccountsTokenRefreshCreateResponses;
2581
+ type types_gen_CfgCentrifugoAuthTokenRetrieveData = CfgCentrifugoAuthTokenRetrieveData;
2582
+ type types_gen_CfgCentrifugoAuthTokenRetrieveErrors = CfgCentrifugoAuthTokenRetrieveErrors;
2583
+ type types_gen_CfgCentrifugoAuthTokenRetrieveResponse = CfgCentrifugoAuthTokenRetrieveResponse;
2584
+ type types_gen_CfgCentrifugoAuthTokenRetrieveResponses = CfgCentrifugoAuthTokenRetrieveResponses;
2585
+ type types_gen_CfgTotpBackupCodesRegenerateCreateData = CfgTotpBackupCodesRegenerateCreateData;
2586
+ type types_gen_CfgTotpBackupCodesRegenerateCreateErrors = CfgTotpBackupCodesRegenerateCreateErrors;
2587
+ type types_gen_CfgTotpBackupCodesRegenerateCreateResponse = CfgTotpBackupCodesRegenerateCreateResponse;
2588
+ type types_gen_CfgTotpBackupCodesRegenerateCreateResponses = CfgTotpBackupCodesRegenerateCreateResponses;
2589
+ type types_gen_CfgTotpBackupCodesRetrieveData = CfgTotpBackupCodesRetrieveData;
2590
+ type types_gen_CfgTotpBackupCodesRetrieveResponse = CfgTotpBackupCodesRetrieveResponse;
2591
+ type types_gen_CfgTotpBackupCodesRetrieveResponses = CfgTotpBackupCodesRetrieveResponses;
2592
+ type types_gen_CfgTotpDevicesDestroyData = CfgTotpDevicesDestroyData;
2593
+ type types_gen_CfgTotpDevicesDestroyResponse = CfgTotpDevicesDestroyResponse;
2594
+ type types_gen_CfgTotpDevicesDestroyResponses = CfgTotpDevicesDestroyResponses;
2595
+ type types_gen_CfgTotpDevicesRetrieveData = CfgTotpDevicesRetrieveData;
2596
+ type types_gen_CfgTotpDevicesRetrieveResponse = CfgTotpDevicesRetrieveResponse;
2597
+ type types_gen_CfgTotpDevicesRetrieveResponses = CfgTotpDevicesRetrieveResponses;
2598
+ type types_gen_CfgTotpDisableCreateData = CfgTotpDisableCreateData;
2599
+ type types_gen_CfgTotpDisableCreateErrors = CfgTotpDisableCreateErrors;
2600
+ type types_gen_CfgTotpDisableCreateResponses = CfgTotpDisableCreateResponses;
2601
+ type types_gen_CfgTotpSetupConfirmCreateData = CfgTotpSetupConfirmCreateData;
2602
+ type types_gen_CfgTotpSetupConfirmCreateErrors = CfgTotpSetupConfirmCreateErrors;
2603
+ type types_gen_CfgTotpSetupConfirmCreateResponse = CfgTotpSetupConfirmCreateResponse;
2604
+ type types_gen_CfgTotpSetupConfirmCreateResponses = CfgTotpSetupConfirmCreateResponses;
2605
+ type types_gen_CfgTotpSetupCreateData = CfgTotpSetupCreateData;
2606
+ type types_gen_CfgTotpSetupCreateErrors = CfgTotpSetupCreateErrors;
2607
+ type types_gen_CfgTotpSetupCreateResponse = CfgTotpSetupCreateResponse;
2608
+ type types_gen_CfgTotpSetupCreateResponses = CfgTotpSetupCreateResponses;
2609
+ type types_gen_CfgTotpVerifyBackupCreateData = CfgTotpVerifyBackupCreateData;
2610
+ type types_gen_CfgTotpVerifyBackupCreateErrors = CfgTotpVerifyBackupCreateErrors;
2611
+ type types_gen_CfgTotpVerifyBackupCreateResponse = CfgTotpVerifyBackupCreateResponse;
2612
+ type types_gen_CfgTotpVerifyBackupCreateResponses = CfgTotpVerifyBackupCreateResponses;
2613
+ type types_gen_CfgTotpVerifyCreateData = CfgTotpVerifyCreateData;
2614
+ type types_gen_CfgTotpVerifyCreateErrors = CfgTotpVerifyCreateErrors;
2615
+ type types_gen_CfgTotpVerifyCreateResponse = CfgTotpVerifyCreateResponse;
2616
+ type types_gen_CfgTotpVerifyCreateResponses = CfgTotpVerifyCreateResponses;
2617
+ type types_gen_CfgUserUpdateRequest = CfgUserUpdateRequest;
2618
+ type types_gen_ClientOptions = ClientOptions;
2619
+ type types_gen_ConfirmSetupRequest = ConfirmSetupRequest;
2620
+ type types_gen_ConfirmSetupResponse = ConfirmSetupResponse;
2621
+ type types_gen_ConnectionTokenResponse = ConnectionTokenResponse;
2622
+ type types_gen_DeviceList = DeviceList;
2623
+ type types_gen_DeviceListResponse = DeviceListResponse;
2624
+ type types_gen_DeviceListResponseWritable = DeviceListResponseWritable;
2625
+ type types_gen_DeviceListStatusEnum = DeviceListStatusEnum;
2626
+ declare const types_gen_DeviceListStatusEnum: typeof DeviceListStatusEnum;
2627
+ type types_gen_DisableRequest = DisableRequest;
2628
+ type types_gen_OAuthAuthorizeRequestRequest = OAuthAuthorizeRequestRequest;
2629
+ type types_gen_OAuthAuthorizeResponse = OAuthAuthorizeResponse;
2630
+ type types_gen_OAuthCallbackRequestRequest = OAuthCallbackRequestRequest;
2631
+ type types_gen_OAuthConnection = OAuthConnection;
2632
+ type types_gen_OAuthDisconnectRequestRequest = OAuthDisconnectRequestRequest;
2633
+ type types_gen_OAuthError = OAuthError;
2634
+ type types_gen_OAuthProvidersResponse = OAuthProvidersResponse;
2635
+ type types_gen_OAuthTokenResponse = OAuthTokenResponse;
2636
+ type types_gen_OtpErrorResponse = OtpErrorResponse;
2637
+ type types_gen_OtpRequestRequest = OtpRequestRequest;
2638
+ type types_gen_OtpRequestResponse = OtpRequestResponse;
2639
+ type types_gen_OtpVerifyRequest = OtpVerifyRequest;
2640
+ type types_gen_OtpVerifyResponse = OtpVerifyResponse;
2641
+ type types_gen_OtpVerifyResponseWritable = OtpVerifyResponseWritable;
2642
+ type types_gen_PatchedCfgUserUpdateRequest = PatchedCfgUserUpdateRequest;
2643
+ type types_gen_ProviderEnum = ProviderEnum;
2644
+ declare const types_gen_ProviderEnum: typeof ProviderEnum;
2645
+ type types_gen_SetupRequest = SetupRequest;
2646
+ type types_gen_SetupResponse = SetupResponse;
2647
+ type types_gen_TokenRefresh = TokenRefresh;
2648
+ type types_gen_TokenRefreshRequest = TokenRefreshRequest;
2649
+ type types_gen_TokenRefreshWritable = TokenRefreshWritable;
2650
+ type types_gen_TotpVerifyUser = TotpVerifyUser;
2651
+ type types_gen_TotpVerifyUserWritable = TotpVerifyUserWritable;
2652
+ type types_gen_User = User;
2653
+ type types_gen_UserWritable = UserWritable;
2654
+ type types_gen_VerifyBackupRequest = VerifyBackupRequest;
2655
+ type types_gen_VerifyRequest = VerifyRequest;
2656
+ type types_gen_VerifyResponse = VerifyResponse;
2657
+ type types_gen_VerifyResponseWritable = VerifyResponseWritable;
2658
+ declare namespace types_gen {
2659
+ export { type types_gen_AccountDeleteResponse as AccountDeleteResponse, type types_gen_BackupCodesRegenerateRequest as BackupCodesRegenerateRequest, type types_gen_BackupCodesRegenerateResponse as BackupCodesRegenerateResponse, type types_gen_BackupCodesStatus as BackupCodesStatus, type types_gen_CentrifugoToken as CentrifugoToken, type types_gen_CfgAccountsOauthConnectionsListData as CfgAccountsOauthConnectionsListData, type types_gen_CfgAccountsOauthConnectionsListResponse as CfgAccountsOauthConnectionsListResponse, type types_gen_CfgAccountsOauthConnectionsListResponses as CfgAccountsOauthConnectionsListResponses, type types_gen_CfgAccountsOauthDisconnectCreateData as CfgAccountsOauthDisconnectCreateData, type types_gen_CfgAccountsOauthDisconnectCreateError as CfgAccountsOauthDisconnectCreateError, type types_gen_CfgAccountsOauthDisconnectCreateErrors as CfgAccountsOauthDisconnectCreateErrors, type types_gen_CfgAccountsOauthDisconnectCreateResponse as CfgAccountsOauthDisconnectCreateResponse, type types_gen_CfgAccountsOauthDisconnectCreateResponses as CfgAccountsOauthDisconnectCreateResponses, type types_gen_CfgAccountsOauthGithubAuthorizeCreateData as CfgAccountsOauthGithubAuthorizeCreateData, type types_gen_CfgAccountsOauthGithubAuthorizeCreateError as CfgAccountsOauthGithubAuthorizeCreateError, type types_gen_CfgAccountsOauthGithubAuthorizeCreateErrors as CfgAccountsOauthGithubAuthorizeCreateErrors, type types_gen_CfgAccountsOauthGithubAuthorizeCreateResponse as CfgAccountsOauthGithubAuthorizeCreateResponse, type types_gen_CfgAccountsOauthGithubAuthorizeCreateResponses as CfgAccountsOauthGithubAuthorizeCreateResponses, type types_gen_CfgAccountsOauthGithubCallbackCreateData as CfgAccountsOauthGithubCallbackCreateData, type types_gen_CfgAccountsOauthGithubCallbackCreateError as CfgAccountsOauthGithubCallbackCreateError, type types_gen_CfgAccountsOauthGithubCallbackCreateErrors as CfgAccountsOauthGithubCallbackCreateErrors, type types_gen_CfgAccountsOauthGithubCallbackCreateResponse as CfgAccountsOauthGithubCallbackCreateResponse, type types_gen_CfgAccountsOauthGithubCallbackCreateResponses as CfgAccountsOauthGithubCallbackCreateResponses, type types_gen_CfgAccountsOauthProvidersRetrieveData as CfgAccountsOauthProvidersRetrieveData, type types_gen_CfgAccountsOauthProvidersRetrieveResponse as CfgAccountsOauthProvidersRetrieveResponse, type types_gen_CfgAccountsOauthProvidersRetrieveResponses as CfgAccountsOauthProvidersRetrieveResponses, type types_gen_CfgAccountsOtpRequestCreateData as CfgAccountsOtpRequestCreateData, type types_gen_CfgAccountsOtpRequestCreateError as CfgAccountsOtpRequestCreateError, type types_gen_CfgAccountsOtpRequestCreateErrors as CfgAccountsOtpRequestCreateErrors, type types_gen_CfgAccountsOtpRequestCreateResponse as CfgAccountsOtpRequestCreateResponse, type types_gen_CfgAccountsOtpRequestCreateResponses as CfgAccountsOtpRequestCreateResponses, type types_gen_CfgAccountsOtpVerifyCreateData as CfgAccountsOtpVerifyCreateData, type types_gen_CfgAccountsOtpVerifyCreateError as CfgAccountsOtpVerifyCreateError, type types_gen_CfgAccountsOtpVerifyCreateErrors as CfgAccountsOtpVerifyCreateErrors, type types_gen_CfgAccountsOtpVerifyCreateResponse as CfgAccountsOtpVerifyCreateResponse, type types_gen_CfgAccountsOtpVerifyCreateResponses as CfgAccountsOtpVerifyCreateResponses, type types_gen_CfgAccountsProfileAvatarCreateData as CfgAccountsProfileAvatarCreateData, type types_gen_CfgAccountsProfileAvatarCreateErrors as CfgAccountsProfileAvatarCreateErrors, type types_gen_CfgAccountsProfileAvatarCreateResponse as CfgAccountsProfileAvatarCreateResponse, type types_gen_CfgAccountsProfileAvatarCreateResponses as CfgAccountsProfileAvatarCreateResponses, type types_gen_CfgAccountsProfileDeleteCreateData as CfgAccountsProfileDeleteCreateData, type types_gen_CfgAccountsProfileDeleteCreateErrors as CfgAccountsProfileDeleteCreateErrors, type types_gen_CfgAccountsProfileDeleteCreateResponse as CfgAccountsProfileDeleteCreateResponse, type types_gen_CfgAccountsProfileDeleteCreateResponses as CfgAccountsProfileDeleteCreateResponses, type types_gen_CfgAccountsProfilePartialPartialUpdateData as CfgAccountsProfilePartialPartialUpdateData, type types_gen_CfgAccountsProfilePartialPartialUpdateErrors as CfgAccountsProfilePartialPartialUpdateErrors, type types_gen_CfgAccountsProfilePartialPartialUpdateResponse as CfgAccountsProfilePartialPartialUpdateResponse, type types_gen_CfgAccountsProfilePartialPartialUpdateResponses as CfgAccountsProfilePartialPartialUpdateResponses, type types_gen_CfgAccountsProfilePartialUpdateData as CfgAccountsProfilePartialUpdateData, type types_gen_CfgAccountsProfilePartialUpdateErrors as CfgAccountsProfilePartialUpdateErrors, type types_gen_CfgAccountsProfilePartialUpdateResponse as CfgAccountsProfilePartialUpdateResponse, type types_gen_CfgAccountsProfilePartialUpdateResponses as CfgAccountsProfilePartialUpdateResponses, type types_gen_CfgAccountsProfileRetrieveData as CfgAccountsProfileRetrieveData, type types_gen_CfgAccountsProfileRetrieveErrors as CfgAccountsProfileRetrieveErrors, type types_gen_CfgAccountsProfileRetrieveResponse as CfgAccountsProfileRetrieveResponse, type types_gen_CfgAccountsProfileRetrieveResponses as CfgAccountsProfileRetrieveResponses, type types_gen_CfgAccountsProfileUpdatePartialUpdateData as CfgAccountsProfileUpdatePartialUpdateData, type types_gen_CfgAccountsProfileUpdatePartialUpdateErrors as CfgAccountsProfileUpdatePartialUpdateErrors, type types_gen_CfgAccountsProfileUpdatePartialUpdateResponse as CfgAccountsProfileUpdatePartialUpdateResponse, type types_gen_CfgAccountsProfileUpdatePartialUpdateResponses as CfgAccountsProfileUpdatePartialUpdateResponses, type types_gen_CfgAccountsProfileUpdateUpdateData as CfgAccountsProfileUpdateUpdateData, type types_gen_CfgAccountsProfileUpdateUpdateErrors as CfgAccountsProfileUpdateUpdateErrors, type types_gen_CfgAccountsProfileUpdateUpdateResponse as CfgAccountsProfileUpdateUpdateResponse, type types_gen_CfgAccountsProfileUpdateUpdateResponses as CfgAccountsProfileUpdateUpdateResponses, type types_gen_CfgAccountsTokenRefreshCreateData as CfgAccountsTokenRefreshCreateData, type types_gen_CfgAccountsTokenRefreshCreateResponse as CfgAccountsTokenRefreshCreateResponse, type types_gen_CfgAccountsTokenRefreshCreateResponses as CfgAccountsTokenRefreshCreateResponses, type types_gen_CfgCentrifugoAuthTokenRetrieveData as CfgCentrifugoAuthTokenRetrieveData, type types_gen_CfgCentrifugoAuthTokenRetrieveErrors as CfgCentrifugoAuthTokenRetrieveErrors, type types_gen_CfgCentrifugoAuthTokenRetrieveResponse as CfgCentrifugoAuthTokenRetrieveResponse, type types_gen_CfgCentrifugoAuthTokenRetrieveResponses as CfgCentrifugoAuthTokenRetrieveResponses, type types_gen_CfgTotpBackupCodesRegenerateCreateData as CfgTotpBackupCodesRegenerateCreateData, type types_gen_CfgTotpBackupCodesRegenerateCreateErrors as CfgTotpBackupCodesRegenerateCreateErrors, type types_gen_CfgTotpBackupCodesRegenerateCreateResponse as CfgTotpBackupCodesRegenerateCreateResponse, type types_gen_CfgTotpBackupCodesRegenerateCreateResponses as CfgTotpBackupCodesRegenerateCreateResponses, type types_gen_CfgTotpBackupCodesRetrieveData as CfgTotpBackupCodesRetrieveData, type types_gen_CfgTotpBackupCodesRetrieveResponse as CfgTotpBackupCodesRetrieveResponse, type types_gen_CfgTotpBackupCodesRetrieveResponses as CfgTotpBackupCodesRetrieveResponses, type types_gen_CfgTotpDevicesDestroyData as CfgTotpDevicesDestroyData, type types_gen_CfgTotpDevicesDestroyResponse as CfgTotpDevicesDestroyResponse, type types_gen_CfgTotpDevicesDestroyResponses as CfgTotpDevicesDestroyResponses, type types_gen_CfgTotpDevicesRetrieveData as CfgTotpDevicesRetrieveData, type types_gen_CfgTotpDevicesRetrieveResponse as CfgTotpDevicesRetrieveResponse, type types_gen_CfgTotpDevicesRetrieveResponses as CfgTotpDevicesRetrieveResponses, type types_gen_CfgTotpDisableCreateData as CfgTotpDisableCreateData, type types_gen_CfgTotpDisableCreateErrors as CfgTotpDisableCreateErrors, type types_gen_CfgTotpDisableCreateResponses as CfgTotpDisableCreateResponses, type types_gen_CfgTotpSetupConfirmCreateData as CfgTotpSetupConfirmCreateData, type types_gen_CfgTotpSetupConfirmCreateErrors as CfgTotpSetupConfirmCreateErrors, type types_gen_CfgTotpSetupConfirmCreateResponse as CfgTotpSetupConfirmCreateResponse, type types_gen_CfgTotpSetupConfirmCreateResponses as CfgTotpSetupConfirmCreateResponses, type types_gen_CfgTotpSetupCreateData as CfgTotpSetupCreateData, type types_gen_CfgTotpSetupCreateErrors as CfgTotpSetupCreateErrors, type types_gen_CfgTotpSetupCreateResponse as CfgTotpSetupCreateResponse, type types_gen_CfgTotpSetupCreateResponses as CfgTotpSetupCreateResponses, type types_gen_CfgTotpVerifyBackupCreateData as CfgTotpVerifyBackupCreateData, type types_gen_CfgTotpVerifyBackupCreateErrors as CfgTotpVerifyBackupCreateErrors, type types_gen_CfgTotpVerifyBackupCreateResponse as CfgTotpVerifyBackupCreateResponse, type types_gen_CfgTotpVerifyBackupCreateResponses as CfgTotpVerifyBackupCreateResponses, type types_gen_CfgTotpVerifyCreateData as CfgTotpVerifyCreateData, type types_gen_CfgTotpVerifyCreateErrors as CfgTotpVerifyCreateErrors, type types_gen_CfgTotpVerifyCreateResponse as CfgTotpVerifyCreateResponse, type types_gen_CfgTotpVerifyCreateResponses as CfgTotpVerifyCreateResponses, type types_gen_CfgUserUpdateRequest as CfgUserUpdateRequest, type types_gen_ClientOptions as ClientOptions, type types_gen_ConfirmSetupRequest as ConfirmSetupRequest, type types_gen_ConfirmSetupResponse as ConfirmSetupResponse, type types_gen_ConnectionTokenResponse as ConnectionTokenResponse, type types_gen_DeviceList as DeviceList, type types_gen_DeviceListResponse as DeviceListResponse, type types_gen_DeviceListResponseWritable as DeviceListResponseWritable, types_gen_DeviceListStatusEnum as DeviceListStatusEnum, type types_gen_DisableRequest as DisableRequest, type types_gen_OAuthAuthorizeRequestRequest as OAuthAuthorizeRequestRequest, type types_gen_OAuthAuthorizeResponse as OAuthAuthorizeResponse, type types_gen_OAuthCallbackRequestRequest as OAuthCallbackRequestRequest, type types_gen_OAuthConnection as OAuthConnection, type types_gen_OAuthDisconnectRequestRequest as OAuthDisconnectRequestRequest, type types_gen_OAuthError as OAuthError, type types_gen_OAuthProvidersResponse as OAuthProvidersResponse, type types_gen_OAuthTokenResponse as OAuthTokenResponse, type types_gen_OtpErrorResponse as OtpErrorResponse, type types_gen_OtpRequestRequest as OtpRequestRequest, type types_gen_OtpRequestResponse as OtpRequestResponse, type types_gen_OtpVerifyRequest as OtpVerifyRequest, type types_gen_OtpVerifyResponse as OtpVerifyResponse, type types_gen_OtpVerifyResponseWritable as OtpVerifyResponseWritable, type types_gen_PatchedCfgUserUpdateRequest as PatchedCfgUserUpdateRequest, types_gen_ProviderEnum as ProviderEnum, type types_gen_SetupRequest as SetupRequest, type types_gen_SetupResponse as SetupResponse, type types_gen_TokenRefresh as TokenRefresh, type types_gen_TokenRefreshRequest as TokenRefreshRequest, type types_gen_TokenRefreshWritable as TokenRefreshWritable, type types_gen_TotpVerifyUser as TotpVerifyUser, type types_gen_TotpVerifyUserWritable as TotpVerifyUserWritable, type types_gen_User as User, type types_gen_UserWritable as UserWritable, type types_gen_VerifyBackupRequest as VerifyBackupRequest, type types_gen_VerifyRequest as VerifyRequest, type types_gen_VerifyResponse as VerifyResponse, type types_gen_VerifyResponseWritable as VerifyResponseWritable };
2124
2660
  }
2125
2661
 
2126
- export { API, APIClient, APIError, APILogger, type APIOptions, type AccountDeleteResponse, AccountDeleteResponseSchema, models as AccountsTypes, models$3 as AuthTypes, BaseClient, type CentrifugoToken, CentrifugoTokenSchema, type CfgAccountsProfileAvatarCreateRequest, CfgAccountsProfileAvatarCreateRequestSchema, index as CfgAccountsTypes, CookieStorageAdapter, DEFAULT_RETRY_CONFIG, enums as Enums, type ErrorLog, type FailedAttemptInfo, FetchAdapter, index$1 as Fetchers, type HttpClientAdapter$1 as HttpClientAdapter, type HttpRequest, type HttpResponse, KeepAliveFetchAdapter, LocalStorageAdapter, type LoggerConfig, MemoryStorageAdapter, NetworkError, type OAuthAuthorizeRequestRequest, OAuthAuthorizeRequestRequestSchema, type OAuthAuthorizeResponse, OAuthAuthorizeResponseSchema, type OAuthCallbackRequestRequest, OAuthCallbackRequestRequestSchema, type OAuthConnection, OAuthConnectionSchema, type OAuthDisconnectRequestRequest, OAuthDisconnectRequestRequestSchema, type OAuthError, OAuthErrorSchema, type OAuthProvidersResponse, OAuthProvidersResponseSchema, type OAuthTokenResponse, OAuthTokenResponseSchema, type OTPErrorResponse, OTPErrorResponseSchema, type OTPRequestRequest, OTPRequestRequestSchema, type OTPRequestResponse, OTPRequestResponseSchema, type OTPVerifyRequest, OTPVerifyRequestSchema, type OTPVerifyResponse, OTPVerifyResponseSchema, models$2 as OauthTypes, type PatchedUserProfileUpdateRequest, PatchedUserProfileUpdateRequestSchema, REFRESH_TOKEN_KEY, type RequestLog, type ResponseLog, type RetryConfig, index$2 as Schemas, type StorageAdapter, TOKEN_KEY, type TokenRefresh, type TokenRefreshRequest, TokenRefreshRequestSchema, TokenRefreshSchema, type User, models$1 as UserProfileTypes, type UserProfileUpdateRequest, UserProfileUpdateRequestSchema, UserSchema, type ValidationErrorDetail, type ValidationErrorEvent, api, clearAPITokens, configureAPI, createAccountsOauthDisconnectCreate, createAccountsOauthGithubAuthorizeCreate, createAccountsOauthGithubCallbackCreate, createAccountsOtpRequestCreate, createAccountsOtpVerifyCreate, createAccountsProfileAvatarCreate, createAccountsProfileDeleteCreate, createAccountsTokenRefreshCreate, dispatchValidationError, formatZodError, getAPIInstance, getAccountsOauthConnectionsList, getAccountsOauthProvidersRetrieve, getAccountsProfileRetrieve, getCentrifugoAuthTokenRetrieve, isAPIConfigured, onValidationError, partialUpdateAccountsProfilePartialPartialUpdate, partialUpdateAccountsProfilePartialUpdate, partialUpdateAccountsProfileUpdatePartialUpdate, reconfigureAPI, resetAPI, shouldRetry, updateAccountsProfileUpdateUpdate, withRetry };
2662
+ export { APIError, APILogger, Accounts, types_gen$2 as AccountsTypes, Auth, BackupCodes, Centrifugo, CentrifugoAuth, types_gen as CentrifugoTypes, Cfg, API$2 as CfgAccountsAPI, CfgAccountsApi, API$1 as CfgCentrifugoAPI, CfgCentrifugoApi, API as CfgTotpAPI, CfgTotpApi, CookieStorageAdapter, type ErrorLog, LocalStorageAdapter, type LoggerConfig, MemoryStorageAdapter, NetworkError, OAuth, type RequestLog, type ResponseLog, type StorageAdapter, Totp, TotpManagement, TotpSetup, types_gen$1 as TotpTypes, TotpVerification, type User, UserProfile, type ValidationErrorDetail, type ValidationErrorEvent, CfgAccountsApi as api, defaultLogger, dispatchValidationError, formatZodError, onValidationError };