@b3dotfun/sdk 0.1.70-alpha.1 → 0.1.70-alpha.10

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 (292) hide show
  1. package/constants/chains/b3Chain.js +3 -1
  2. package/dist/cjs/anyspend/constants/rpc.d.ts +2 -1
  3. package/dist/cjs/anyspend/constants/rpc.js +4 -2
  4. package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
  5. package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -2
  6. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
  7. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -2
  8. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
  9. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +21 -14
  10. package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +9 -3
  11. package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
  12. package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.js +2 -2
  13. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
  14. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -2
  15. package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
  16. package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
  17. package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
  18. package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
  19. package/dist/cjs/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
  20. package/dist/cjs/anyspend/react/components/AnySpendWorkflowTrigger.js +2 -2
  21. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
  22. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
  23. package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
  24. package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +2 -2
  25. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
  26. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.js +2 -2
  27. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
  28. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +2 -2
  29. package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
  30. package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +13 -3
  31. package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +3 -3
  32. package/dist/cjs/anyspend/utils/chain.d.ts +39 -1
  33. package/dist/cjs/anyspend/utils/chain.js +23 -2
  34. package/dist/cjs/anyspend/utils/token.d.ts +2 -0
  35. package/dist/cjs/anyspend/utils/token.js +15 -1
  36. package/dist/cjs/app.shared.d.ts +9 -1
  37. package/dist/cjs/app.shared.js +19 -0
  38. package/dist/cjs/global-account/app.native.d.ts +1 -1
  39. package/dist/cjs/global-account/better-auth-client.d.ts +3314 -36
  40. package/dist/cjs/global-account/better-auth-client.js +28 -3
  41. package/dist/cjs/global-account/bsmnt.d.ts +2 -2
  42. package/dist/cjs/global-account/bsmnt.native.d.ts +1 -1
  43. package/dist/cjs/global-account/client-manager.d.ts +7 -5
  44. package/dist/cjs/global-account/client-manager.js +19 -4
  45. package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +6 -11
  46. package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +1 -5
  47. package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.js +1 -2
  48. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +8 -13
  49. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +24 -3
  50. package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.js +48 -8
  51. package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +1 -1
  52. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +1 -5
  53. package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +3 -2
  54. package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +1 -3
  55. package/dist/cjs/global-account/react/components/index.d.ts +0 -2
  56. package/dist/cjs/global-account/react/components/index.js +3 -7
  57. package/dist/cjs/global-account/react/hooks/index.d.ts +0 -1
  58. package/dist/cjs/global-account/react/hooks/index.js +2 -4
  59. package/dist/cjs/global-account/react/hooks/useAuth.d.ts +3 -3
  60. package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +1 -1
  61. package/dist/cjs/global-account/react/hooks/useAuthentication.js +1 -1
  62. package/dist/cjs/global-account/react/hooks/useBetterAuth.d.ts +1656 -21
  63. package/dist/cjs/global-account/react/hooks/useBetterAuth.js +13 -14
  64. package/dist/cjs/global-account/react/hooks/useClient.d.ts +3 -3
  65. package/dist/cjs/global-account/react/hooks/useNativeBalance.js +2 -2
  66. package/dist/cjs/global-account/react/hooks/useSiwe.d.ts +1 -1
  67. package/dist/cjs/global-account/react/hooks/useSiwe.native.d.ts +1 -1
  68. package/dist/cjs/global-account/react/hooks/useTWAuth.d.ts +1 -1
  69. package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +20 -17
  70. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +28 -0
  71. package/dist/cjs/global-account/types/b3-api.types.d.ts +5 -0
  72. package/dist/cjs/global-account/types/feature-flags.d.ts +5 -5
  73. package/dist/cjs/notifications/services/api.js +1 -0
  74. package/dist/cjs/shared/constants/chains/b3Chain.d.ts +6 -54
  75. package/dist/cjs/shared/constants/chains/b3Chain.js +5 -41
  76. package/dist/cjs/shared/constants/chains/supported.d.ts +1 -49
  77. package/dist/cjs/shared/constants/chains/supported.js +8 -36
  78. package/dist/cjs/shared/utils/chain-transformers.d.ts +4 -4
  79. package/dist/cjs/shared/utils/chain-transformers.js +38 -37
  80. package/dist/cjs/shared/utils/thirdweb-insights.js +2 -2
  81. package/dist/cjs/shared/utils/upload.d.ts +9 -0
  82. package/dist/cjs/shared/utils/upload.js +34 -0
  83. package/dist/esm/anyspend/constants/rpc.d.ts +2 -1
  84. package/dist/esm/anyspend/constants/rpc.js +3 -1
  85. package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
  86. package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -2
  87. package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
  88. package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -2
  89. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
  90. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +21 -14
  91. package/dist/esm/anyspend/react/components/AnySpendDeposit.js +10 -4
  92. package/dist/esm/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
  93. package/dist/esm/anyspend/react/components/AnySpendDepositUpside.js +2 -2
  94. package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
  95. package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
  96. package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
  97. package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
  98. package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
  99. package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
  100. package/dist/esm/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
  101. package/dist/esm/anyspend/react/components/AnySpendWorkflowTrigger.js +2 -2
  102. package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
  103. package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
  104. package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
  105. package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +2 -2
  106. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
  107. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.js +2 -2
  108. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
  109. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +2 -2
  110. package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
  111. package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +14 -4
  112. package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +3 -3
  113. package/dist/esm/anyspend/utils/chain.d.ts +39 -1
  114. package/dist/esm/anyspend/utils/chain.js +24 -3
  115. package/dist/esm/anyspend/utils/token.d.ts +2 -0
  116. package/dist/esm/anyspend/utils/token.js +13 -0
  117. package/dist/esm/app.shared.d.ts +9 -1
  118. package/dist/esm/app.shared.js +17 -0
  119. package/dist/esm/global-account/app.native.d.ts +1 -1
  120. package/dist/esm/global-account/better-auth-client.d.ts +3314 -36
  121. package/dist/esm/global-account/better-auth-client.js +27 -4
  122. package/dist/esm/global-account/bsmnt.d.ts +2 -2
  123. package/dist/esm/global-account/bsmnt.native.d.ts +1 -1
  124. package/dist/esm/global-account/client-manager.d.ts +7 -5
  125. package/dist/esm/global-account/client-manager.js +19 -5
  126. package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +6 -11
  127. package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +1 -5
  128. package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.js +1 -2
  129. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +8 -13
  130. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +25 -4
  131. package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.js +48 -8
  132. package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +1 -1
  133. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +1 -5
  134. package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +3 -2
  135. package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +1 -3
  136. package/dist/esm/global-account/react/components/index.d.ts +0 -2
  137. package/dist/esm/global-account/react/components/index.js +0 -2
  138. package/dist/esm/global-account/react/hooks/index.d.ts +0 -1
  139. package/dist/esm/global-account/react/hooks/index.js +0 -1
  140. package/dist/esm/global-account/react/hooks/useAuth.d.ts +3 -3
  141. package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +1 -1
  142. package/dist/esm/global-account/react/hooks/useAuthentication.js +1 -1
  143. package/dist/esm/global-account/react/hooks/useBetterAuth.d.ts +1656 -21
  144. package/dist/esm/global-account/react/hooks/useBetterAuth.js +13 -14
  145. package/dist/esm/global-account/react/hooks/useClient.d.ts +3 -3
  146. package/dist/esm/global-account/react/hooks/useNativeBalance.js +1 -1
  147. package/dist/esm/global-account/react/hooks/useSiwe.d.ts +1 -1
  148. package/dist/esm/global-account/react/hooks/useSiwe.native.d.ts +1 -1
  149. package/dist/esm/global-account/react/hooks/useTWAuth.d.ts +1 -1
  150. package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +20 -17
  151. package/dist/esm/global-account/react/stores/useModalStore.d.ts +28 -0
  152. package/dist/esm/global-account/types/b3-api.types.d.ts +5 -0
  153. package/dist/esm/global-account/types/feature-flags.d.ts +5 -5
  154. package/dist/esm/notifications/services/api.js +1 -0
  155. package/dist/esm/shared/constants/chains/b3Chain.d.ts +6 -54
  156. package/dist/esm/shared/constants/chains/b3Chain.js +4 -38
  157. package/dist/esm/shared/constants/chains/supported.d.ts +1 -49
  158. package/dist/esm/shared/constants/chains/supported.js +7 -35
  159. package/dist/esm/shared/utils/chain-transformers.d.ts +4 -4
  160. package/dist/esm/shared/utils/chain-transformers.js +38 -37
  161. package/dist/esm/shared/utils/thirdweb-insights.js +2 -2
  162. package/dist/esm/shared/utils/upload.d.ts +9 -0
  163. package/dist/esm/shared/utils/upload.js +31 -0
  164. package/dist/styles/index.css +1 -1
  165. package/dist/types/anyspend/constants/rpc.d.ts +2 -1
  166. package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
  167. package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
  168. package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
  169. package/dist/types/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
  170. package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
  171. package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
  172. package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
  173. package/dist/types/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
  174. package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
  175. package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
  176. package/dist/types/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
  177. package/dist/types/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
  178. package/dist/types/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
  179. package/dist/types/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +3 -3
  180. package/dist/types/anyspend/utils/chain.d.ts +39 -1
  181. package/dist/types/anyspend/utils/token.d.ts +2 -0
  182. package/dist/types/app.shared.d.ts +9 -1
  183. package/dist/types/global-account/app.native.d.ts +1 -1
  184. package/dist/types/global-account/better-auth-client.d.ts +3314 -36
  185. package/dist/types/global-account/bsmnt.d.ts +2 -2
  186. package/dist/types/global-account/bsmnt.native.d.ts +1 -1
  187. package/dist/types/global-account/client-manager.d.ts +7 -5
  188. package/dist/types/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +1 -5
  189. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +8 -13
  190. package/dist/types/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +3 -2
  191. package/dist/types/global-account/react/components/index.d.ts +0 -2
  192. package/dist/types/global-account/react/hooks/index.d.ts +0 -1
  193. package/dist/types/global-account/react/hooks/useAuth.d.ts +3 -3
  194. package/dist/types/global-account/react/hooks/useAuthentication.d.ts +1 -1
  195. package/dist/types/global-account/react/hooks/useBetterAuth.d.ts +1656 -21
  196. package/dist/types/global-account/react/hooks/useClient.d.ts +3 -3
  197. package/dist/types/global-account/react/hooks/useSiwe.d.ts +1 -1
  198. package/dist/types/global-account/react/hooks/useSiwe.native.d.ts +1 -1
  199. package/dist/types/global-account/react/hooks/useTWAuth.d.ts +1 -1
  200. package/dist/types/global-account/react/stores/useModalStore.d.ts +28 -0
  201. package/dist/types/global-account/types/b3-api.types.d.ts +5 -0
  202. package/dist/types/global-account/types/feature-flags.d.ts +5 -5
  203. package/dist/types/shared/constants/chains/b3Chain.d.ts +6 -54
  204. package/dist/types/shared/constants/chains/supported.d.ts +1 -49
  205. package/dist/types/shared/utils/chain-transformers.d.ts +4 -4
  206. package/dist/types/shared/utils/upload.d.ts +9 -0
  207. package/node_modules/@b3/chain-registry/chains.json +1160 -0
  208. package/node_modules/@b3/chain-registry/package.json +14 -0
  209. package/node_modules/@b3/chain-registry/src/index.ts +169 -0
  210. package/node_modules/@b3/chain-registry/tsconfig.json +16 -0
  211. package/package.json +76 -28
  212. package/src/anyspend/constants/rpc.ts +3 -2
  213. package/src/anyspend/react/components/AnySpendBondKit.tsx +2 -0
  214. package/src/anyspend/react/components/AnySpendBuySpin.tsx +3 -0
  215. package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +29 -14
  216. package/src/anyspend/react/components/AnySpendDeposit.tsx +13 -3
  217. package/src/anyspend/react/components/AnySpendDepositUpside.tsx +3 -0
  218. package/src/anyspend/react/components/AnySpendStakeB3.tsx +3 -0
  219. package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +3 -0
  220. package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +3 -0
  221. package/src/anyspend/react/components/AnySpendWorkflowTrigger.tsx +4 -0
  222. package/src/anyspend/react/components/AnyspendDepositHype.tsx +3 -0
  223. package/src/anyspend/react/components/AnyspendSignatureMint.tsx +3 -0
  224. package/src/anyspend/react/components/checkout/AnySpendCheckout.tsx +4 -0
  225. package/src/anyspend/react/components/checkout/AnySpendCheckoutTrigger.tsx +4 -0
  226. package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +97 -79
  227. package/src/anyspend/react/hooks/useAnyspendQuote.ts +13 -13
  228. package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +4 -4
  229. package/src/anyspend/types/api_req_res.ts +10 -5
  230. package/src/anyspend/utils/chain.ts +26 -1
  231. package/src/anyspend/utils/token.ts +14 -0
  232. package/src/app.shared.ts +21 -1
  233. package/src/global-account/app.native.ts +5 -1
  234. package/src/global-account/better-auth-client.ts +30 -4
  235. package/src/global-account/bsmnt.native.ts +5 -1
  236. package/src/global-account/bsmnt.ts +9 -2
  237. package/src/global-account/client-manager.ts +41 -9
  238. package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +6 -11
  239. package/src/global-account/react/components/B3Provider/B3ConfigProvider.tsx +0 -6
  240. package/src/global-account/react/components/B3Provider/B3Provider.tsx +49 -32
  241. package/src/global-account/react/components/B3Provider/BetterAuthProvider.tsx +53 -8
  242. package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +1 -1
  243. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +1 -4
  244. package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +2 -4
  245. package/src/global-account/react/components/index.ts +0 -2
  246. package/src/global-account/react/components/ui/button.tsx +1 -2
  247. package/src/global-account/react/hooks/index.ts +0 -1
  248. package/src/global-account/react/hooks/useAuth.ts +2 -2
  249. package/src/global-account/react/hooks/useAuthentication.ts +2 -2
  250. package/src/global-account/react/hooks/useBetterAuth.ts +14 -15
  251. package/src/global-account/react/hooks/useClient.ts +11 -2
  252. package/src/global-account/react/hooks/useNativeBalance.tsx +1 -1
  253. package/src/global-account/react/hooks/useSiwe.native.tsx +1 -1
  254. package/src/global-account/react/hooks/useSiwe.tsx +1 -1
  255. package/src/global-account/react/hooks/useTWAuth.tsx +1 -1
  256. package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +22 -20
  257. package/src/global-account/react/stores/useModalStore.ts +28 -0
  258. package/src/global-account/types/b3-api.types.ts +5 -1
  259. package/src/notifications/services/api.ts +1 -0
  260. package/src/shared/constants/chains/b3Chain.ts +4 -43
  261. package/src/shared/constants/chains/supported.ts +9 -48
  262. package/src/shared/utils/chain-transformers.ts +41 -39
  263. package/src/shared/utils/thirdweb-insights.ts +2 -2
  264. package/src/shared/utils/upload.ts +48 -0
  265. package/src/styles/index.css +27 -0
  266. package/dist/cjs/global-account/react/components/B3Provider/BetterAuthClientProvider.d.ts +0 -17
  267. package/dist/cjs/global-account/react/components/B3Provider/BetterAuthClientProvider.js +0 -31
  268. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.d.ts +0 -10
  269. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +0 -46
  270. package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +0 -11
  271. package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +0 -70
  272. package/dist/cjs/global-account/types/chain-networks.d.ts +0 -44
  273. package/dist/cjs/global-account/types/chain-networks.js +0 -48
  274. package/dist/cjs/shared/generated/chain-networks.json +0 -684
  275. package/dist/esm/global-account/react/components/B3Provider/BetterAuthClientProvider.d.ts +0 -17
  276. package/dist/esm/global-account/react/components/B3Provider/BetterAuthClientProvider.js +0 -27
  277. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.d.ts +0 -10
  278. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +0 -43
  279. package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +0 -11
  280. package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +0 -67
  281. package/dist/esm/global-account/types/chain-networks.d.ts +0 -44
  282. package/dist/esm/global-account/types/chain-networks.js +0 -45
  283. package/dist/esm/shared/generated/chain-networks.json +0 -684
  284. package/dist/types/global-account/react/components/B3Provider/BetterAuthClientProvider.d.ts +0 -17
  285. package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Privy.d.ts +0 -10
  286. package/dist/types/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +0 -11
  287. package/dist/types/global-account/types/chain-networks.d.ts +0 -44
  288. package/src/global-account/react/components/B3Provider/BetterAuthClientProvider.tsx +0 -40
  289. package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +0 -63
  290. package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +0 -79
  291. package/src/global-account/types/chain-networks.ts +0 -54
  292. package/src/shared/generated/chain-networks.json +0 -684
@@ -1,5 +1,247 @@
1
1
  export type B3BetterAuthClient = ReturnType<typeof createB3BetterAuthClient>;
2
2
  export declare function createB3BetterAuthClient(baseURL?: string): {
3
+ twoFactor: {
4
+ enable: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
5
+ password?: string | undefined;
6
+ issuer?: string | undefined;
7
+ } | {
8
+ password: string;
9
+ issuer?: string | undefined;
10
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<({
11
+ password?: string | undefined;
12
+ issuer?: string | undefined;
13
+ } | {
14
+ password: string;
15
+ issuer?: string | undefined;
16
+ }) & {
17
+ fetchOptions?: FetchOptions | undefined;
18
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
19
+ totpURI: string;
20
+ backupCodes: string[];
21
+ }, {
22
+ code?: string | undefined;
23
+ message?: string | undefined;
24
+ }, FetchOptions["throw"] extends true ? true : false>>;
25
+ };
26
+ } & {
27
+ twoFactor: {
28
+ disable: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
29
+ password?: string | undefined;
30
+ } | {
31
+ password: string;
32
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<({
33
+ password?: string | undefined;
34
+ } | {
35
+ password: string;
36
+ }) & {
37
+ fetchOptions?: FetchOptions | undefined;
38
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
39
+ status: boolean;
40
+ }, {
41
+ code?: string | undefined;
42
+ message?: string | undefined;
43
+ }, FetchOptions["throw"] extends true ? true : false>>;
44
+ };
45
+ } & {
46
+ twoFactor: {
47
+ verifyBackupCode: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
48
+ code: string;
49
+ disableSession?: boolean | undefined;
50
+ trustDevice?: boolean | undefined;
51
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
52
+ code: string;
53
+ disableSession?: boolean | undefined;
54
+ trustDevice?: boolean | undefined;
55
+ } & {
56
+ fetchOptions?: FetchOptions | undefined;
57
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
58
+ token: string | undefined;
59
+ user: (Record<string, any> & {
60
+ id: string;
61
+ createdAt: Date;
62
+ updatedAt: Date;
63
+ email: string;
64
+ emailVerified: boolean;
65
+ name: string;
66
+ image?: string | null | undefined;
67
+ }) | import("better-auth/client/plugins").UserWithTwoFactor;
68
+ }, "user"> & {
69
+ user: import("better-auth/client").StripEmptyObjects<{
70
+ id: string;
71
+ createdAt: Date;
72
+ updatedAt: Date;
73
+ email: string;
74
+ emailVerified: boolean;
75
+ name: string;
76
+ image?: string | null | undefined;
77
+ } & {
78
+ twoFactorEnabled: boolean | null | undefined;
79
+ } & {}>;
80
+ }, {
81
+ code?: string | undefined;
82
+ message?: string | undefined;
83
+ }, FetchOptions["throw"] extends true ? true : false>>;
84
+ };
85
+ } & {
86
+ twoFactor: {
87
+ generateBackupCodes: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
88
+ password?: string | undefined;
89
+ } | {
90
+ password: string;
91
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<({
92
+ password?: string | undefined;
93
+ } | {
94
+ password: string;
95
+ }) & {
96
+ fetchOptions?: FetchOptions | undefined;
97
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
98
+ status: boolean;
99
+ backupCodes: string[];
100
+ }, {
101
+ code?: string | undefined;
102
+ message?: string | undefined;
103
+ }, FetchOptions["throw"] extends true ? true : false>>;
104
+ };
105
+ } & {
106
+ twoFactor: {
107
+ sendOtp: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
108
+ trustDevice?: boolean | undefined;
109
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
110
+ query?: Record<string, any> | undefined;
111
+ fetchOptions?: FetchOptions | undefined;
112
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
113
+ status: boolean;
114
+ }, {
115
+ code?: string | undefined;
116
+ message?: string | undefined;
117
+ }, FetchOptions["throw"] extends true ? true : false>>;
118
+ };
119
+ } & {
120
+ twoFactor: {
121
+ verifyOtp: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
122
+ code: string;
123
+ trustDevice?: boolean | undefined;
124
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
125
+ code: string;
126
+ trustDevice?: boolean | undefined;
127
+ } & {
128
+ fetchOptions?: FetchOptions | undefined;
129
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
130
+ token: string;
131
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
132
+ }, "user"> & {
133
+ user: import("better-auth/client").StripEmptyObjects<{
134
+ id: string;
135
+ createdAt: Date;
136
+ updatedAt: Date;
137
+ email: string;
138
+ emailVerified: boolean;
139
+ name: string;
140
+ image?: string | null | undefined;
141
+ } & {
142
+ twoFactorEnabled: boolean | null | undefined;
143
+ } & {}>;
144
+ }) | (Omit<{
145
+ token: string;
146
+ user: Record<string, any> & {
147
+ id: string;
148
+ createdAt: Date;
149
+ updatedAt: Date;
150
+ email: string;
151
+ emailVerified: boolean;
152
+ name: string;
153
+ image?: string | null | undefined;
154
+ };
155
+ }, "user"> & {
156
+ user: import("better-auth/client").StripEmptyObjects<{
157
+ id: string;
158
+ createdAt: Date;
159
+ updatedAt: Date;
160
+ email: string;
161
+ emailVerified: boolean;
162
+ name: string;
163
+ image?: string | null | undefined;
164
+ } & {
165
+ twoFactorEnabled: boolean | null | undefined;
166
+ } & {}>;
167
+ }), {
168
+ code?: string | undefined;
169
+ message?: string | undefined;
170
+ }, FetchOptions["throw"] extends true ? true : false>>;
171
+ };
172
+ } & {
173
+ twoFactor: {
174
+ getTotpUri: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
175
+ password?: string | undefined;
176
+ } | {
177
+ password: string;
178
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<({
179
+ password?: string | undefined;
180
+ } | {
181
+ password: string;
182
+ }) & {
183
+ fetchOptions?: FetchOptions | undefined;
184
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
185
+ totpURI: string;
186
+ }, {
187
+ code?: string | undefined;
188
+ message?: string | undefined;
189
+ }, FetchOptions["throw"] extends true ? true : false>>;
190
+ };
191
+ } & {
192
+ twoFactor: {
193
+ verifyTotp: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
194
+ code: string;
195
+ trustDevice?: boolean | undefined;
196
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
197
+ code: string;
198
+ trustDevice?: boolean | undefined;
199
+ } & {
200
+ fetchOptions?: FetchOptions | undefined;
201
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
202
+ token: string;
203
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
204
+ }, "user"> & {
205
+ user: import("better-auth/client").StripEmptyObjects<{
206
+ id: string;
207
+ createdAt: Date;
208
+ updatedAt: Date;
209
+ email: string;
210
+ emailVerified: boolean;
211
+ name: string;
212
+ image?: string | null | undefined;
213
+ } & {
214
+ twoFactorEnabled: boolean | null | undefined;
215
+ } & {}>;
216
+ }) | (Omit<{
217
+ token: string;
218
+ user: Record<string, any> & {
219
+ id: string;
220
+ createdAt: Date;
221
+ updatedAt: Date;
222
+ email: string;
223
+ emailVerified: boolean;
224
+ name: string;
225
+ image?: string | null | undefined;
226
+ };
227
+ }, "user"> & {
228
+ user: import("better-auth/client").StripEmptyObjects<{
229
+ id: string;
230
+ createdAt: Date;
231
+ updatedAt: Date;
232
+ email: string;
233
+ emailVerified: boolean;
234
+ name: string;
235
+ image?: string | null | undefined;
236
+ } & {
237
+ twoFactorEnabled: boolean | null | undefined;
238
+ } & {}>;
239
+ }), {
240
+ code?: string | undefined;
241
+ message?: string | undefined;
242
+ }, FetchOptions["throw"] extends true ? true : false>>;
243
+ };
244
+ } & {
3
245
  signIn: {
4
246
  social: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
5
247
  provider: (string & {}) | "apple" | "google" | "github" | "discord" | "line" | "facebook" | "twitch" | "tiktok" | "zoom" | "linear" | "huggingface" | "atlassian" | "cognito" | "figma" | "microsoft" | "slack" | "spotify" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "reddit" | "roblox" | "salesforce" | "vk" | "notion" | "kakao" | "naver" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
@@ -76,7 +318,9 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
76
318
  emailVerified: boolean;
77
319
  name: string;
78
320
  image?: string | null | undefined;
79
- }>;
321
+ } & {
322
+ twoFactorEnabled: boolean | null | undefined;
323
+ } & {}>;
80
324
  }), {
81
325
  code?: string | undefined;
82
326
  message?: string | undefined;
@@ -101,14 +345,684 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
101
345
  image?: string | undefined;
102
346
  callbackURL?: string | undefined;
103
347
  rememberMe?: boolean | undefined;
104
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
105
- email: string;
106
- name: string;
107
- password: string;
108
- image?: string | undefined;
109
- callbackURL?: string | undefined;
110
- fetchOptions?: FetchOptions | undefined;
111
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
348
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<import("better-auth/client").InferSignUpEmailCtx<{
349
+ baseURL: string;
350
+ basePath: string;
351
+ fetchOptions: {
352
+ credentials: "include";
353
+ };
354
+ plugins: {
355
+ id: "two-factor";
356
+ version: string;
357
+ $InferServerPlugin: ReturnType<(<O extends import("better-auth/client/plugins").TwoFactorOptions>(options?: O) => {
358
+ id: "two-factor";
359
+ version: string;
360
+ endpoints: {
361
+ enableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/enable", {
362
+ method: "POST";
363
+ body: import("zod").ZodObject<{
364
+ password: import("zod").ZodOptional<import("zod").ZodString>;
365
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
366
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
367
+ password: import("zod").ZodString;
368
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
369
+ }, import("zod/v4/core").$strip>;
370
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
371
+ session: {
372
+ session: Record<string, any> & {
373
+ id: string;
374
+ createdAt: Date;
375
+ updatedAt: Date;
376
+ userId: string;
377
+ expiresAt: Date;
378
+ token: string;
379
+ ipAddress?: string | null | undefined;
380
+ userAgent?: string | null | undefined;
381
+ };
382
+ user: Record<string, any> & {
383
+ id: string;
384
+ createdAt: Date;
385
+ updatedAt: Date;
386
+ email: string;
387
+ emailVerified: boolean;
388
+ name: string;
389
+ image?: string | null | undefined;
390
+ };
391
+ };
392
+ }>)[];
393
+ metadata: {
394
+ openapi: {
395
+ summary: string;
396
+ description: string;
397
+ responses: {
398
+ 200: {
399
+ description: string;
400
+ content: {
401
+ "application/json": {
402
+ schema: {
403
+ type: "object";
404
+ properties: {
405
+ totpURI: {
406
+ type: string;
407
+ description: string;
408
+ };
409
+ backupCodes: {
410
+ type: string;
411
+ items: {
412
+ type: string;
413
+ };
414
+ description: string;
415
+ };
416
+ };
417
+ };
418
+ };
419
+ };
420
+ };
421
+ };
422
+ };
423
+ };
424
+ }, {
425
+ totpURI: string;
426
+ backupCodes: string[];
427
+ }>;
428
+ disableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/disable", {
429
+ method: "POST";
430
+ body: import("zod").ZodObject<{
431
+ password: import("zod").ZodOptional<import("zod").ZodString>;
432
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
433
+ password: import("zod").ZodString;
434
+ }, import("zod/v4/core").$strip>;
435
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
436
+ session: {
437
+ session: Record<string, any> & {
438
+ id: string;
439
+ createdAt: Date;
440
+ updatedAt: Date;
441
+ userId: string;
442
+ expiresAt: Date;
443
+ token: string;
444
+ ipAddress?: string | null | undefined;
445
+ userAgent?: string | null | undefined;
446
+ };
447
+ user: Record<string, any> & {
448
+ id: string;
449
+ createdAt: Date;
450
+ updatedAt: Date;
451
+ email: string;
452
+ emailVerified: boolean;
453
+ name: string;
454
+ image?: string | null | undefined;
455
+ };
456
+ };
457
+ }>)[];
458
+ metadata: {
459
+ openapi: {
460
+ summary: string;
461
+ description: string;
462
+ responses: {
463
+ 200: {
464
+ description: string;
465
+ content: {
466
+ "application/json": {
467
+ schema: {
468
+ type: "object";
469
+ properties: {
470
+ status: {
471
+ type: string;
472
+ };
473
+ };
474
+ };
475
+ };
476
+ };
477
+ };
478
+ };
479
+ };
480
+ };
481
+ }, {
482
+ status: boolean;
483
+ }>;
484
+ verifyBackupCode: import("better-call").StrictEndpoint<"/two-factor/verify-backup-code", {
485
+ method: "POST";
486
+ body: import("zod").ZodObject<{
487
+ code: import("zod").ZodString;
488
+ disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
489
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
490
+ }, import("zod/v4/core").$strip>;
491
+ metadata: {
492
+ openapi: {
493
+ description: string;
494
+ responses: {
495
+ "200": {
496
+ description: string;
497
+ content: {
498
+ "application/json": {
499
+ schema: {
500
+ type: "object";
501
+ properties: {
502
+ user: {
503
+ type: string;
504
+ properties: {
505
+ id: {
506
+ type: string;
507
+ description: string;
508
+ };
509
+ email: {
510
+ type: string;
511
+ format: string;
512
+ nullable: boolean;
513
+ description: string;
514
+ };
515
+ emailVerified: {
516
+ type: string;
517
+ nullable: boolean;
518
+ description: string;
519
+ };
520
+ name: {
521
+ type: string;
522
+ nullable: boolean;
523
+ description: string;
524
+ };
525
+ image: {
526
+ type: string;
527
+ format: string;
528
+ nullable: boolean;
529
+ description: string;
530
+ };
531
+ twoFactorEnabled: {
532
+ type: string;
533
+ description: string;
534
+ };
535
+ createdAt: {
536
+ type: string;
537
+ format: string;
538
+ description: string;
539
+ };
540
+ updatedAt: {
541
+ type: string;
542
+ format: string;
543
+ description: string;
544
+ };
545
+ };
546
+ required: string[];
547
+ description: string;
548
+ };
549
+ session: {
550
+ type: string;
551
+ properties: {
552
+ token: {
553
+ type: string;
554
+ description: string;
555
+ };
556
+ userId: {
557
+ type: string;
558
+ description: string;
559
+ };
560
+ createdAt: {
561
+ type: string;
562
+ format: string;
563
+ description: string;
564
+ };
565
+ expiresAt: {
566
+ type: string;
567
+ format: string;
568
+ description: string;
569
+ };
570
+ };
571
+ required: string[];
572
+ description: string;
573
+ };
574
+ };
575
+ required: string[];
576
+ };
577
+ };
578
+ };
579
+ };
580
+ };
581
+ };
582
+ };
583
+ }, {
584
+ token: string | undefined;
585
+ user: (Record<string, any> & {
586
+ id: string;
587
+ createdAt: Date;
588
+ updatedAt: Date;
589
+ email: string;
590
+ emailVerified: boolean;
591
+ name: string;
592
+ image?: string | null | undefined;
593
+ }) | import("better-auth/client/plugins").UserWithTwoFactor;
594
+ }>;
595
+ generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
596
+ method: "POST";
597
+ body: import("zod").ZodObject<{
598
+ password: import("zod").ZodOptional<import("zod").ZodString>;
599
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
600
+ password: import("zod").ZodString;
601
+ }, import("zod/v4/core").$strip>;
602
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
603
+ session: {
604
+ session: Record<string, any> & {
605
+ id: string;
606
+ createdAt: Date;
607
+ updatedAt: Date;
608
+ userId: string;
609
+ expiresAt: Date;
610
+ token: string;
611
+ ipAddress?: string | null | undefined;
612
+ userAgent?: string | null | undefined;
613
+ };
614
+ user: Record<string, any> & {
615
+ id: string;
616
+ createdAt: Date;
617
+ updatedAt: Date;
618
+ email: string;
619
+ emailVerified: boolean;
620
+ name: string;
621
+ image?: string | null | undefined;
622
+ };
623
+ };
624
+ }>)[];
625
+ metadata: {
626
+ openapi: {
627
+ description: string;
628
+ responses: {
629
+ "200": {
630
+ description: string;
631
+ content: {
632
+ "application/json": {
633
+ schema: {
634
+ type: "object";
635
+ properties: {
636
+ status: {
637
+ type: string;
638
+ description: string;
639
+ enum: boolean[];
640
+ };
641
+ backupCodes: {
642
+ type: string;
643
+ items: {
644
+ type: string;
645
+ };
646
+ description: string;
647
+ };
648
+ };
649
+ required: string[];
650
+ };
651
+ };
652
+ };
653
+ };
654
+ };
655
+ };
656
+ };
657
+ }, {
658
+ status: boolean;
659
+ backupCodes: string[];
660
+ }>;
661
+ viewBackupCodes: import("better-call").StrictEndpoint<string, {
662
+ method: "POST";
663
+ body: import("zod").ZodObject<{
664
+ userId: import("zod").ZodCoercedString<unknown>;
665
+ }, import("zod/v4/core").$strip>;
666
+ }, {
667
+ status: boolean;
668
+ backupCodes: string[];
669
+ }>;
670
+ sendTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/send-otp", {
671
+ method: "POST";
672
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
673
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
674
+ }, import("zod/v4/core").$strip>>;
675
+ metadata: {
676
+ openapi: {
677
+ summary: string;
678
+ description: string;
679
+ responses: {
680
+ 200: {
681
+ description: string;
682
+ content: {
683
+ "application/json": {
684
+ schema: {
685
+ type: "object";
686
+ properties: {
687
+ status: {
688
+ type: string;
689
+ };
690
+ };
691
+ };
692
+ };
693
+ };
694
+ };
695
+ };
696
+ };
697
+ };
698
+ }, {
699
+ status: boolean;
700
+ }>;
701
+ verifyTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/verify-otp", {
702
+ method: "POST";
703
+ body: import("zod").ZodObject<{
704
+ code: import("zod").ZodString;
705
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
706
+ }, import("zod/v4/core").$strip>;
707
+ metadata: {
708
+ openapi: {
709
+ summary: string;
710
+ description: string;
711
+ responses: {
712
+ "200": {
713
+ description: string;
714
+ content: {
715
+ "application/json": {
716
+ schema: {
717
+ type: "object";
718
+ properties: {
719
+ token: {
720
+ type: string;
721
+ description: string;
722
+ };
723
+ user: {
724
+ type: string;
725
+ properties: {
726
+ id: {
727
+ type: string;
728
+ description: string;
729
+ };
730
+ email: {
731
+ type: string;
732
+ format: string;
733
+ nullable: boolean;
734
+ description: string;
735
+ };
736
+ emailVerified: {
737
+ type: string;
738
+ nullable: boolean;
739
+ description: string;
740
+ };
741
+ name: {
742
+ type: string;
743
+ nullable: boolean;
744
+ description: string;
745
+ };
746
+ image: {
747
+ type: string;
748
+ format: string;
749
+ nullable: boolean;
750
+ description: string;
751
+ };
752
+ createdAt: {
753
+ type: string;
754
+ format: string;
755
+ description: string;
756
+ };
757
+ updatedAt: {
758
+ type: string;
759
+ format: string;
760
+ description: string;
761
+ };
762
+ };
763
+ required: string[];
764
+ description: string;
765
+ };
766
+ };
767
+ required: string[];
768
+ };
769
+ };
770
+ };
771
+ };
772
+ };
773
+ };
774
+ };
775
+ }, {
776
+ token: string;
777
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
778
+ } | {
779
+ token: string;
780
+ user: Record<string, any> & {
781
+ id: string;
782
+ createdAt: Date;
783
+ updatedAt: Date;
784
+ email: string;
785
+ emailVerified: boolean;
786
+ name: string;
787
+ image?: string | null | undefined;
788
+ };
789
+ }>;
790
+ generateTOTP: import("better-call").StrictEndpoint<string, {
791
+ method: "POST";
792
+ body: import("zod").ZodObject<{
793
+ secret: import("zod").ZodString;
794
+ }, import("zod/v4/core").$strip>;
795
+ metadata: {
796
+ openapi: {
797
+ summary: string;
798
+ description: string;
799
+ responses: {
800
+ 200: {
801
+ description: string;
802
+ content: {
803
+ "application/json": {
804
+ schema: {
805
+ type: "object";
806
+ properties: {
807
+ code: {
808
+ type: string;
809
+ };
810
+ };
811
+ };
812
+ };
813
+ };
814
+ };
815
+ };
816
+ };
817
+ };
818
+ }, {
819
+ code: string;
820
+ }>;
821
+ getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
822
+ method: "POST";
823
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
824
+ session: {
825
+ session: Record<string, any> & {
826
+ id: string;
827
+ createdAt: Date;
828
+ updatedAt: Date;
829
+ userId: string;
830
+ expiresAt: Date;
831
+ token: string;
832
+ ipAddress?: string | null | undefined;
833
+ userAgent?: string | null | undefined;
834
+ };
835
+ user: Record<string, any> & {
836
+ id: string;
837
+ createdAt: Date;
838
+ updatedAt: Date;
839
+ email: string;
840
+ emailVerified: boolean;
841
+ name: string;
842
+ image?: string | null | undefined;
843
+ };
844
+ };
845
+ }>)[];
846
+ body: import("zod").ZodObject<{
847
+ password: import("zod").ZodOptional<import("zod").ZodString>;
848
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
849
+ password: import("zod").ZodString;
850
+ }, import("zod/v4/core").$strip>;
851
+ metadata: {
852
+ openapi: {
853
+ summary: string;
854
+ description: string;
855
+ responses: {
856
+ 200: {
857
+ description: string;
858
+ content: {
859
+ "application/json": {
860
+ schema: {
861
+ type: "object";
862
+ properties: {
863
+ totpURI: {
864
+ type: string;
865
+ };
866
+ };
867
+ };
868
+ };
869
+ };
870
+ };
871
+ };
872
+ };
873
+ };
874
+ }, {
875
+ totpURI: string;
876
+ }>;
877
+ verifyTOTP: import("better-call").StrictEndpoint<"/two-factor/verify-totp", {
878
+ method: "POST";
879
+ body: import("zod").ZodObject<{
880
+ code: import("zod").ZodString;
881
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
882
+ }, import("zod/v4/core").$strip>;
883
+ metadata: {
884
+ openapi: {
885
+ summary: string;
886
+ description: string;
887
+ responses: {
888
+ 200: {
889
+ description: string;
890
+ content: {
891
+ "application/json": {
892
+ schema: {
893
+ type: "object";
894
+ properties: {
895
+ status: {
896
+ type: string;
897
+ };
898
+ };
899
+ };
900
+ };
901
+ };
902
+ };
903
+ };
904
+ };
905
+ };
906
+ }, {
907
+ token: string;
908
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
909
+ } | {
910
+ token: string;
911
+ user: Record<string, any> & {
912
+ id: string;
913
+ createdAt: Date;
914
+ updatedAt: Date;
915
+ email: string;
916
+ emailVerified: boolean;
917
+ name: string;
918
+ image?: string | null | undefined;
919
+ };
920
+ }>;
921
+ };
922
+ options: NoInfer<O>;
923
+ hooks: {
924
+ after: {
925
+ matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
926
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
927
+ twoFactorRedirect: boolean;
928
+ twoFactorMethods: string[];
929
+ } | undefined>;
930
+ }[];
931
+ };
932
+ schema: {
933
+ user: {
934
+ fields: {
935
+ twoFactorEnabled: {
936
+ type: "boolean";
937
+ required: false;
938
+ defaultValue: false;
939
+ input: false;
940
+ };
941
+ };
942
+ };
943
+ twoFactor: {
944
+ fields: {
945
+ secret: {
946
+ type: "string";
947
+ required: true;
948
+ returned: false;
949
+ index: true;
950
+ };
951
+ backupCodes: {
952
+ type: "string";
953
+ required: true;
954
+ returned: false;
955
+ };
956
+ userId: {
957
+ type: "string";
958
+ required: true;
959
+ returned: false;
960
+ references: {
961
+ model: string;
962
+ field: string;
963
+ };
964
+ index: true;
965
+ };
966
+ verified: {
967
+ type: "boolean";
968
+ required: false;
969
+ defaultValue: true;
970
+ input: false;
971
+ };
972
+ };
973
+ };
974
+ };
975
+ rateLimit: {
976
+ pathMatcher(path: string): boolean;
977
+ window: number;
978
+ max: number;
979
+ }[];
980
+ $ERROR_CODES: {
981
+ OTP_NOT_ENABLED: import("better-auth/*").RawError<"OTP_NOT_ENABLED">;
982
+ OTP_HAS_EXPIRED: import("better-auth/*").RawError<"OTP_HAS_EXPIRED">;
983
+ TOTP_NOT_ENABLED: import("better-auth/*").RawError<"TOTP_NOT_ENABLED">;
984
+ TWO_FACTOR_NOT_ENABLED: import("better-auth/*").RawError<"TWO_FACTOR_NOT_ENABLED">;
985
+ BACKUP_CODES_NOT_ENABLED: import("better-auth/*").RawError<"BACKUP_CODES_NOT_ENABLED">;
986
+ INVALID_BACKUP_CODE: import("better-auth/*").RawError<"INVALID_BACKUP_CODE">;
987
+ INVALID_CODE: import("better-auth/*").RawError<"INVALID_CODE">;
988
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth/*").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
989
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth/*").RawError<"INVALID_TWO_FACTOR_COOKIE">;
990
+ };
991
+ })>;
992
+ atomListeners: {
993
+ matcher: (path: string) => boolean;
994
+ signal: "$sessionSignal";
995
+ }[];
996
+ pathMethods: {
997
+ "/two-factor/disable": "POST";
998
+ "/two-factor/enable": "POST";
999
+ "/two-factor/send-otp": "POST";
1000
+ "/two-factor/generate-backup-codes": "POST";
1001
+ "/two-factor/get-totp-uri": "POST";
1002
+ "/two-factor/verify-totp": "POST";
1003
+ "/two-factor/verify-otp": "POST";
1004
+ "/two-factor/verify-backup-code": "POST";
1005
+ };
1006
+ fetchPlugins: {
1007
+ id: string;
1008
+ name: string;
1009
+ hooks: {
1010
+ onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): Promise<void>;
1011
+ };
1012
+ }[];
1013
+ $ERROR_CODES: {
1014
+ OTP_NOT_ENABLED: import("better-auth/*").RawError<"OTP_NOT_ENABLED">;
1015
+ OTP_HAS_EXPIRED: import("better-auth/*").RawError<"OTP_HAS_EXPIRED">;
1016
+ TOTP_NOT_ENABLED: import("better-auth/*").RawError<"TOTP_NOT_ENABLED">;
1017
+ TWO_FACTOR_NOT_ENABLED: import("better-auth/*").RawError<"TWO_FACTOR_NOT_ENABLED">;
1018
+ BACKUP_CODES_NOT_ENABLED: import("better-auth/*").RawError<"BACKUP_CODES_NOT_ENABLED">;
1019
+ INVALID_BACKUP_CODE: import("better-auth/*").RawError<"INVALID_BACKUP_CODE">;
1020
+ INVALID_CODE: import("better-auth/*").RawError<"INVALID_CODE">;
1021
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth/*").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
1022
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth/*").RawError<"INVALID_TWO_FACTOR_COOKIE">;
1023
+ };
1024
+ }[];
1025
+ }, FetchOptions>>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
112
1026
  token: null;
113
1027
  user: {
114
1028
  id: string;
@@ -128,7 +1042,9 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
128
1042
  emailVerified: boolean;
129
1043
  name: string;
130
1044
  image?: string | null | undefined;
131
- }>;
1045
+ } & {
1046
+ twoFactorEnabled: boolean | null | undefined;
1047
+ } & {}>;
132
1048
  }) | (Omit<{
133
1049
  token: string;
134
1050
  user: {
@@ -149,7 +1065,9 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
149
1065
  emailVerified: boolean;
150
1066
  name: string;
151
1067
  image?: string | null | undefined;
152
- }>;
1068
+ } & {
1069
+ twoFactorEnabled: boolean | null | undefined;
1070
+ } & {}>;
153
1071
  }), {
154
1072
  code?: string | undefined;
155
1073
  message?: string | undefined;
@@ -191,7 +1109,9 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
191
1109
  emailVerified: boolean;
192
1110
  name: string;
193
1111
  image?: string | null | undefined;
194
- }>;
1112
+ } & {
1113
+ twoFactorEnabled: boolean | null | undefined;
1114
+ } & {}>;
195
1115
  }, {
196
1116
  code?: string | undefined;
197
1117
  message?: string | undefined;
@@ -299,7 +1219,9 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
299
1219
  emailVerified: boolean;
300
1220
  name: string;
301
1221
  image?: string | null | undefined;
302
- }>;
1222
+ } & {
1223
+ twoFactorEnabled: boolean | null | undefined;
1224
+ } & {}>;
303
1225
  }, {
304
1226
  code?: string | undefined;
305
1227
  message?: string | undefined;
@@ -332,6 +1254,677 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
332
1254
  fetchOptions: {
333
1255
  credentials: "include";
334
1256
  };
1257
+ plugins: {
1258
+ id: "two-factor";
1259
+ version: string;
1260
+ $InferServerPlugin: ReturnType<(<O extends import("better-auth/client/plugins").TwoFactorOptions>(options?: O) => {
1261
+ id: "two-factor";
1262
+ version: string;
1263
+ endpoints: {
1264
+ enableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/enable", {
1265
+ method: "POST";
1266
+ body: import("zod").ZodObject<{
1267
+ password: import("zod").ZodOptional<import("zod").ZodString>;
1268
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
1269
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
1270
+ password: import("zod").ZodString;
1271
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
1272
+ }, import("zod/v4/core").$strip>;
1273
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1274
+ session: {
1275
+ session: Record<string, any> & {
1276
+ id: string;
1277
+ createdAt: Date;
1278
+ updatedAt: Date;
1279
+ userId: string;
1280
+ expiresAt: Date;
1281
+ token: string;
1282
+ ipAddress?: string | null | undefined;
1283
+ userAgent?: string | null | undefined;
1284
+ };
1285
+ user: Record<string, any> & {
1286
+ id: string;
1287
+ createdAt: Date;
1288
+ updatedAt: Date;
1289
+ email: string;
1290
+ emailVerified: boolean;
1291
+ name: string;
1292
+ image?: string | null | undefined;
1293
+ };
1294
+ };
1295
+ }>)[];
1296
+ metadata: {
1297
+ openapi: {
1298
+ summary: string;
1299
+ description: string;
1300
+ responses: {
1301
+ 200: {
1302
+ description: string;
1303
+ content: {
1304
+ "application/json": {
1305
+ schema: {
1306
+ type: "object";
1307
+ properties: {
1308
+ totpURI: {
1309
+ type: string;
1310
+ description: string;
1311
+ };
1312
+ backupCodes: {
1313
+ type: string;
1314
+ items: {
1315
+ type: string;
1316
+ };
1317
+ description: string;
1318
+ };
1319
+ };
1320
+ };
1321
+ };
1322
+ };
1323
+ };
1324
+ };
1325
+ };
1326
+ };
1327
+ }, {
1328
+ totpURI: string;
1329
+ backupCodes: string[];
1330
+ }>;
1331
+ disableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/disable", {
1332
+ method: "POST";
1333
+ body: import("zod").ZodObject<{
1334
+ password: import("zod").ZodOptional<import("zod").ZodString>;
1335
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
1336
+ password: import("zod").ZodString;
1337
+ }, import("zod/v4/core").$strip>;
1338
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1339
+ session: {
1340
+ session: Record<string, any> & {
1341
+ id: string;
1342
+ createdAt: Date;
1343
+ updatedAt: Date;
1344
+ userId: string;
1345
+ expiresAt: Date;
1346
+ token: string;
1347
+ ipAddress?: string | null | undefined;
1348
+ userAgent?: string | null | undefined;
1349
+ };
1350
+ user: Record<string, any> & {
1351
+ id: string;
1352
+ createdAt: Date;
1353
+ updatedAt: Date;
1354
+ email: string;
1355
+ emailVerified: boolean;
1356
+ name: string;
1357
+ image?: string | null | undefined;
1358
+ };
1359
+ };
1360
+ }>)[];
1361
+ metadata: {
1362
+ openapi: {
1363
+ summary: string;
1364
+ description: string;
1365
+ responses: {
1366
+ 200: {
1367
+ description: string;
1368
+ content: {
1369
+ "application/json": {
1370
+ schema: {
1371
+ type: "object";
1372
+ properties: {
1373
+ status: {
1374
+ type: string;
1375
+ };
1376
+ };
1377
+ };
1378
+ };
1379
+ };
1380
+ };
1381
+ };
1382
+ };
1383
+ };
1384
+ }, {
1385
+ status: boolean;
1386
+ }>;
1387
+ verifyBackupCode: import("better-call").StrictEndpoint<"/two-factor/verify-backup-code", {
1388
+ method: "POST";
1389
+ body: import("zod").ZodObject<{
1390
+ code: import("zod").ZodString;
1391
+ disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
1392
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
1393
+ }, import("zod/v4/core").$strip>;
1394
+ metadata: {
1395
+ openapi: {
1396
+ description: string;
1397
+ responses: {
1398
+ "200": {
1399
+ description: string;
1400
+ content: {
1401
+ "application/json": {
1402
+ schema: {
1403
+ type: "object";
1404
+ properties: {
1405
+ user: {
1406
+ type: string;
1407
+ properties: {
1408
+ id: {
1409
+ type: string;
1410
+ description: string;
1411
+ };
1412
+ email: {
1413
+ type: string;
1414
+ format: string;
1415
+ nullable: boolean;
1416
+ description: string;
1417
+ };
1418
+ emailVerified: {
1419
+ type: string;
1420
+ nullable: boolean;
1421
+ description: string;
1422
+ };
1423
+ name: {
1424
+ type: string;
1425
+ nullable: boolean;
1426
+ description: string;
1427
+ };
1428
+ image: {
1429
+ type: string;
1430
+ format: string;
1431
+ nullable: boolean;
1432
+ description: string;
1433
+ };
1434
+ twoFactorEnabled: {
1435
+ type: string;
1436
+ description: string;
1437
+ };
1438
+ createdAt: {
1439
+ type: string;
1440
+ format: string;
1441
+ description: string;
1442
+ };
1443
+ updatedAt: {
1444
+ type: string;
1445
+ format: string;
1446
+ description: string;
1447
+ };
1448
+ };
1449
+ required: string[];
1450
+ description: string;
1451
+ };
1452
+ session: {
1453
+ type: string;
1454
+ properties: {
1455
+ token: {
1456
+ type: string;
1457
+ description: string;
1458
+ };
1459
+ userId: {
1460
+ type: string;
1461
+ description: string;
1462
+ };
1463
+ createdAt: {
1464
+ type: string;
1465
+ format: string;
1466
+ description: string;
1467
+ };
1468
+ expiresAt: {
1469
+ type: string;
1470
+ format: string;
1471
+ description: string;
1472
+ };
1473
+ };
1474
+ required: string[];
1475
+ description: string;
1476
+ };
1477
+ };
1478
+ required: string[];
1479
+ };
1480
+ };
1481
+ };
1482
+ };
1483
+ };
1484
+ };
1485
+ };
1486
+ }, {
1487
+ token: string | undefined;
1488
+ user: (Record<string, any> & {
1489
+ id: string;
1490
+ createdAt: Date;
1491
+ updatedAt: Date;
1492
+ email: string;
1493
+ emailVerified: boolean;
1494
+ name: string;
1495
+ image?: string | null | undefined;
1496
+ }) | import("better-auth/client/plugins").UserWithTwoFactor;
1497
+ }>;
1498
+ generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
1499
+ method: "POST";
1500
+ body: import("zod").ZodObject<{
1501
+ password: import("zod").ZodOptional<import("zod").ZodString>;
1502
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
1503
+ password: import("zod").ZodString;
1504
+ }, import("zod/v4/core").$strip>;
1505
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1506
+ session: {
1507
+ session: Record<string, any> & {
1508
+ id: string;
1509
+ createdAt: Date;
1510
+ updatedAt: Date;
1511
+ userId: string;
1512
+ expiresAt: Date;
1513
+ token: string;
1514
+ ipAddress?: string | null | undefined;
1515
+ userAgent?: string | null | undefined;
1516
+ };
1517
+ user: Record<string, any> & {
1518
+ id: string;
1519
+ createdAt: Date;
1520
+ updatedAt: Date;
1521
+ email: string;
1522
+ emailVerified: boolean;
1523
+ name: string;
1524
+ image?: string | null | undefined;
1525
+ };
1526
+ };
1527
+ }>)[];
1528
+ metadata: {
1529
+ openapi: {
1530
+ description: string;
1531
+ responses: {
1532
+ "200": {
1533
+ description: string;
1534
+ content: {
1535
+ "application/json": {
1536
+ schema: {
1537
+ type: "object";
1538
+ properties: {
1539
+ status: {
1540
+ type: string;
1541
+ description: string;
1542
+ enum: boolean[];
1543
+ };
1544
+ backupCodes: {
1545
+ type: string;
1546
+ items: {
1547
+ type: string;
1548
+ };
1549
+ description: string;
1550
+ };
1551
+ };
1552
+ required: string[];
1553
+ };
1554
+ };
1555
+ };
1556
+ };
1557
+ };
1558
+ };
1559
+ };
1560
+ }, {
1561
+ status: boolean;
1562
+ backupCodes: string[];
1563
+ }>;
1564
+ viewBackupCodes: import("better-call").StrictEndpoint<string, {
1565
+ method: "POST";
1566
+ body: import("zod").ZodObject<{
1567
+ userId: import("zod").ZodCoercedString<unknown>;
1568
+ }, import("zod/v4/core").$strip>;
1569
+ }, {
1570
+ status: boolean;
1571
+ backupCodes: string[];
1572
+ }>;
1573
+ sendTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/send-otp", {
1574
+ method: "POST";
1575
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
1576
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
1577
+ }, import("zod/v4/core").$strip>>;
1578
+ metadata: {
1579
+ openapi: {
1580
+ summary: string;
1581
+ description: string;
1582
+ responses: {
1583
+ 200: {
1584
+ description: string;
1585
+ content: {
1586
+ "application/json": {
1587
+ schema: {
1588
+ type: "object";
1589
+ properties: {
1590
+ status: {
1591
+ type: string;
1592
+ };
1593
+ };
1594
+ };
1595
+ };
1596
+ };
1597
+ };
1598
+ };
1599
+ };
1600
+ };
1601
+ }, {
1602
+ status: boolean;
1603
+ }>;
1604
+ verifyTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/verify-otp", {
1605
+ method: "POST";
1606
+ body: import("zod").ZodObject<{
1607
+ code: import("zod").ZodString;
1608
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
1609
+ }, import("zod/v4/core").$strip>;
1610
+ metadata: {
1611
+ openapi: {
1612
+ summary: string;
1613
+ description: string;
1614
+ responses: {
1615
+ "200": {
1616
+ description: string;
1617
+ content: {
1618
+ "application/json": {
1619
+ schema: {
1620
+ type: "object";
1621
+ properties: {
1622
+ token: {
1623
+ type: string;
1624
+ description: string;
1625
+ };
1626
+ user: {
1627
+ type: string;
1628
+ properties: {
1629
+ id: {
1630
+ type: string;
1631
+ description: string;
1632
+ };
1633
+ email: {
1634
+ type: string;
1635
+ format: string;
1636
+ nullable: boolean;
1637
+ description: string;
1638
+ };
1639
+ emailVerified: {
1640
+ type: string;
1641
+ nullable: boolean;
1642
+ description: string;
1643
+ };
1644
+ name: {
1645
+ type: string;
1646
+ nullable: boolean;
1647
+ description: string;
1648
+ };
1649
+ image: {
1650
+ type: string;
1651
+ format: string;
1652
+ nullable: boolean;
1653
+ description: string;
1654
+ };
1655
+ createdAt: {
1656
+ type: string;
1657
+ format: string;
1658
+ description: string;
1659
+ };
1660
+ updatedAt: {
1661
+ type: string;
1662
+ format: string;
1663
+ description: string;
1664
+ };
1665
+ };
1666
+ required: string[];
1667
+ description: string;
1668
+ };
1669
+ };
1670
+ required: string[];
1671
+ };
1672
+ };
1673
+ };
1674
+ };
1675
+ };
1676
+ };
1677
+ };
1678
+ }, {
1679
+ token: string;
1680
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
1681
+ } | {
1682
+ token: string;
1683
+ user: Record<string, any> & {
1684
+ id: string;
1685
+ createdAt: Date;
1686
+ updatedAt: Date;
1687
+ email: string;
1688
+ emailVerified: boolean;
1689
+ name: string;
1690
+ image?: string | null | undefined;
1691
+ };
1692
+ }>;
1693
+ generateTOTP: import("better-call").StrictEndpoint<string, {
1694
+ method: "POST";
1695
+ body: import("zod").ZodObject<{
1696
+ secret: import("zod").ZodString;
1697
+ }, import("zod/v4/core").$strip>;
1698
+ metadata: {
1699
+ openapi: {
1700
+ summary: string;
1701
+ description: string;
1702
+ responses: {
1703
+ 200: {
1704
+ description: string;
1705
+ content: {
1706
+ "application/json": {
1707
+ schema: {
1708
+ type: "object";
1709
+ properties: {
1710
+ code: {
1711
+ type: string;
1712
+ };
1713
+ };
1714
+ };
1715
+ };
1716
+ };
1717
+ };
1718
+ };
1719
+ };
1720
+ };
1721
+ }, {
1722
+ code: string;
1723
+ }>;
1724
+ getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
1725
+ method: "POST";
1726
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1727
+ session: {
1728
+ session: Record<string, any> & {
1729
+ id: string;
1730
+ createdAt: Date;
1731
+ updatedAt: Date;
1732
+ userId: string;
1733
+ expiresAt: Date;
1734
+ token: string;
1735
+ ipAddress?: string | null | undefined;
1736
+ userAgent?: string | null | undefined;
1737
+ };
1738
+ user: Record<string, any> & {
1739
+ id: string;
1740
+ createdAt: Date;
1741
+ updatedAt: Date;
1742
+ email: string;
1743
+ emailVerified: boolean;
1744
+ name: string;
1745
+ image?: string | null | undefined;
1746
+ };
1747
+ };
1748
+ }>)[];
1749
+ body: import("zod").ZodObject<{
1750
+ password: import("zod").ZodOptional<import("zod").ZodString>;
1751
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
1752
+ password: import("zod").ZodString;
1753
+ }, import("zod/v4/core").$strip>;
1754
+ metadata: {
1755
+ openapi: {
1756
+ summary: string;
1757
+ description: string;
1758
+ responses: {
1759
+ 200: {
1760
+ description: string;
1761
+ content: {
1762
+ "application/json": {
1763
+ schema: {
1764
+ type: "object";
1765
+ properties: {
1766
+ totpURI: {
1767
+ type: string;
1768
+ };
1769
+ };
1770
+ };
1771
+ };
1772
+ };
1773
+ };
1774
+ };
1775
+ };
1776
+ };
1777
+ }, {
1778
+ totpURI: string;
1779
+ }>;
1780
+ verifyTOTP: import("better-call").StrictEndpoint<"/two-factor/verify-totp", {
1781
+ method: "POST";
1782
+ body: import("zod").ZodObject<{
1783
+ code: import("zod").ZodString;
1784
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
1785
+ }, import("zod/v4/core").$strip>;
1786
+ metadata: {
1787
+ openapi: {
1788
+ summary: string;
1789
+ description: string;
1790
+ responses: {
1791
+ 200: {
1792
+ description: string;
1793
+ content: {
1794
+ "application/json": {
1795
+ schema: {
1796
+ type: "object";
1797
+ properties: {
1798
+ status: {
1799
+ type: string;
1800
+ };
1801
+ };
1802
+ };
1803
+ };
1804
+ };
1805
+ };
1806
+ };
1807
+ };
1808
+ };
1809
+ }, {
1810
+ token: string;
1811
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
1812
+ } | {
1813
+ token: string;
1814
+ user: Record<string, any> & {
1815
+ id: string;
1816
+ createdAt: Date;
1817
+ updatedAt: Date;
1818
+ email: string;
1819
+ emailVerified: boolean;
1820
+ name: string;
1821
+ image?: string | null | undefined;
1822
+ };
1823
+ }>;
1824
+ };
1825
+ options: NoInfer<O>;
1826
+ hooks: {
1827
+ after: {
1828
+ matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
1829
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1830
+ twoFactorRedirect: boolean;
1831
+ twoFactorMethods: string[];
1832
+ } | undefined>;
1833
+ }[];
1834
+ };
1835
+ schema: {
1836
+ user: {
1837
+ fields: {
1838
+ twoFactorEnabled: {
1839
+ type: "boolean";
1840
+ required: false;
1841
+ defaultValue: false;
1842
+ input: false;
1843
+ };
1844
+ };
1845
+ };
1846
+ twoFactor: {
1847
+ fields: {
1848
+ secret: {
1849
+ type: "string";
1850
+ required: true;
1851
+ returned: false;
1852
+ index: true;
1853
+ };
1854
+ backupCodes: {
1855
+ type: "string";
1856
+ required: true;
1857
+ returned: false;
1858
+ };
1859
+ userId: {
1860
+ type: "string";
1861
+ required: true;
1862
+ returned: false;
1863
+ references: {
1864
+ model: string;
1865
+ field: string;
1866
+ };
1867
+ index: true;
1868
+ };
1869
+ verified: {
1870
+ type: "boolean";
1871
+ required: false;
1872
+ defaultValue: true;
1873
+ input: false;
1874
+ };
1875
+ };
1876
+ };
1877
+ };
1878
+ rateLimit: {
1879
+ pathMatcher(path: string): boolean;
1880
+ window: number;
1881
+ max: number;
1882
+ }[];
1883
+ $ERROR_CODES: {
1884
+ OTP_NOT_ENABLED: import("better-auth/*").RawError<"OTP_NOT_ENABLED">;
1885
+ OTP_HAS_EXPIRED: import("better-auth/*").RawError<"OTP_HAS_EXPIRED">;
1886
+ TOTP_NOT_ENABLED: import("better-auth/*").RawError<"TOTP_NOT_ENABLED">;
1887
+ TWO_FACTOR_NOT_ENABLED: import("better-auth/*").RawError<"TWO_FACTOR_NOT_ENABLED">;
1888
+ BACKUP_CODES_NOT_ENABLED: import("better-auth/*").RawError<"BACKUP_CODES_NOT_ENABLED">;
1889
+ INVALID_BACKUP_CODE: import("better-auth/*").RawError<"INVALID_BACKUP_CODE">;
1890
+ INVALID_CODE: import("better-auth/*").RawError<"INVALID_CODE">;
1891
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth/*").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
1892
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth/*").RawError<"INVALID_TWO_FACTOR_COOKIE">;
1893
+ };
1894
+ })>;
1895
+ atomListeners: {
1896
+ matcher: (path: string) => boolean;
1897
+ signal: "$sessionSignal";
1898
+ }[];
1899
+ pathMethods: {
1900
+ "/two-factor/disable": "POST";
1901
+ "/two-factor/enable": "POST";
1902
+ "/two-factor/send-otp": "POST";
1903
+ "/two-factor/generate-backup-codes": "POST";
1904
+ "/two-factor/get-totp-uri": "POST";
1905
+ "/two-factor/verify-totp": "POST";
1906
+ "/two-factor/verify-otp": "POST";
1907
+ "/two-factor/verify-backup-code": "POST";
1908
+ };
1909
+ fetchPlugins: {
1910
+ id: string;
1911
+ name: string;
1912
+ hooks: {
1913
+ onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): Promise<void>;
1914
+ };
1915
+ }[];
1916
+ $ERROR_CODES: {
1917
+ OTP_NOT_ENABLED: import("better-auth/*").RawError<"OTP_NOT_ENABLED">;
1918
+ OTP_HAS_EXPIRED: import("better-auth/*").RawError<"OTP_HAS_EXPIRED">;
1919
+ TOTP_NOT_ENABLED: import("better-auth/*").RawError<"TOTP_NOT_ENABLED">;
1920
+ TWO_FACTOR_NOT_ENABLED: import("better-auth/*").RawError<"TWO_FACTOR_NOT_ENABLED">;
1921
+ BACKUP_CODES_NOT_ENABLED: import("better-auth/*").RawError<"BACKUP_CODES_NOT_ENABLED">;
1922
+ INVALID_BACKUP_CODE: import("better-auth/*").RawError<"INVALID_BACKUP_CODE">;
1923
+ INVALID_CODE: import("better-auth/*").RawError<"INVALID_CODE">;
1924
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth/*").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
1925
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth/*").RawError<"INVALID_TWO_FACTOR_COOKIE">;
1926
+ };
1927
+ }[];
335
1928
  }, FetchOptions>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
336
1929
  status: boolean;
337
1930
  }, {
@@ -581,7 +2174,7 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
581
2174
  } | undefined;
582
2175
  fetchOptions?: FetchOptions | undefined;
583
2176
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
584
- user: import("@better-auth/core/oauth2").OAuth2UserInfo;
2177
+ user: import("better-auth/*").OAuth2UserInfo;
585
2178
  data: Record<string, any>;
586
2179
  }, {
587
2180
  code?: string | undefined;
@@ -606,7 +2199,9 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
606
2199
  emailVerified: boolean;
607
2200
  name: string;
608
2201
  image?: string | null | undefined;
609
- }>;
2202
+ } & {
2203
+ twoFactorEnabled: boolean | null | undefined;
2204
+ } & {}>;
610
2205
  session: import("better-auth/client").StripEmptyObjects<{
611
2206
  id: string;
612
2207
  createdAt: Date;
@@ -632,7 +2227,9 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
632
2227
  emailVerified: boolean;
633
2228
  name: string;
634
2229
  image?: string | null | undefined;
635
- }>;
2230
+ } & {
2231
+ twoFactorEnabled: boolean | null | undefined;
2232
+ } & {}>;
636
2233
  session: import("better-auth/client").StripEmptyObjects<{
637
2234
  id: string;
638
2235
  createdAt: Date;
@@ -668,8 +2265,8 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
668
2265
  onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
669
2266
  };
670
2267
  })[];
671
- cache?: RequestCache | undefined;
672
2268
  priority?: RequestPriority | undefined;
2269
+ cache?: RequestCache | undefined;
673
2270
  credentials?: RequestCredentials;
674
2271
  headers?: (HeadersInit & (HeadersInit | {
675
2272
  accept: "application/json" | "text/plain" | "application/octet-stream";
@@ -732,7 +2329,9 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
732
2329
  emailVerified: boolean;
733
2330
  name: string;
734
2331
  image?: string | null | undefined;
735
- }>;
2332
+ } & {
2333
+ twoFactorEnabled: boolean | null | undefined;
2334
+ } & {}>;
736
2335
  session: import("better-auth/client").StripEmptyObjects<{
737
2336
  id: string;
738
2337
  createdAt: Date;
@@ -746,6 +2345,42 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
746
2345
  };
747
2346
  };
748
2347
  $ERROR_CODES: {
2348
+ OTP_NOT_ENABLED: {
2349
+ readonly code: "OTP_NOT_ENABLED";
2350
+ message: string;
2351
+ };
2352
+ OTP_HAS_EXPIRED: {
2353
+ readonly code: "OTP_HAS_EXPIRED";
2354
+ message: string;
2355
+ };
2356
+ TOTP_NOT_ENABLED: {
2357
+ readonly code: "TOTP_NOT_ENABLED";
2358
+ message: string;
2359
+ };
2360
+ TWO_FACTOR_NOT_ENABLED: {
2361
+ readonly code: "TWO_FACTOR_NOT_ENABLED";
2362
+ message: string;
2363
+ };
2364
+ BACKUP_CODES_NOT_ENABLED: {
2365
+ readonly code: "BACKUP_CODES_NOT_ENABLED";
2366
+ message: string;
2367
+ };
2368
+ INVALID_BACKUP_CODE: {
2369
+ readonly code: "INVALID_BACKUP_CODE";
2370
+ message: string;
2371
+ };
2372
+ INVALID_CODE: {
2373
+ readonly code: "INVALID_CODE";
2374
+ message: string;
2375
+ };
2376
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: {
2377
+ readonly code: "TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE";
2378
+ message: string;
2379
+ };
2380
+ INVALID_TWO_FACTOR_COOKIE: {
2381
+ readonly code: "INVALID_TWO_FACTOR_COOKIE";
2382
+ message: string;
2383
+ };
749
2384
  USER_NOT_FOUND: {
750
2385
  readonly code: "USER_NOT_FOUND";
751
2386
  message: string;
@@ -940,7 +2575,257 @@ export declare function createB3BetterAuthClient(baseURL?: string): {
940
2575
  };
941
2576
  };
942
2577
  };
2578
+ /** Get the shared BetterAuth client, creating it if needed. */
2579
+ export declare function getBetterAuthClient(): B3BetterAuthClient;
2580
+ /** Force-recreate the client on next access (e.g. after API URL change). */
2581
+ export declare function resetBetterAuthClient(): void;
2582
+ /**
2583
+ * @deprecated Use `getBetterAuthClient()` instead. This static singleton
2584
+ * does not reflect runtime API URL changes via `B3Provider apiUrl` prop.
2585
+ */
943
2586
  export declare const betterAuthClient: {
2587
+ twoFactor: {
2588
+ enable: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
2589
+ password?: string | undefined;
2590
+ issuer?: string | undefined;
2591
+ } | {
2592
+ password: string;
2593
+ issuer?: string | undefined;
2594
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<({
2595
+ password?: string | undefined;
2596
+ issuer?: string | undefined;
2597
+ } | {
2598
+ password: string;
2599
+ issuer?: string | undefined;
2600
+ }) & {
2601
+ fetchOptions?: FetchOptions | undefined;
2602
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
2603
+ totpURI: string;
2604
+ backupCodes: string[];
2605
+ }, {
2606
+ code?: string | undefined;
2607
+ message?: string | undefined;
2608
+ }, FetchOptions["throw"] extends true ? true : false>>;
2609
+ };
2610
+ } & {
2611
+ twoFactor: {
2612
+ disable: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
2613
+ password?: string | undefined;
2614
+ } | {
2615
+ password: string;
2616
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<({
2617
+ password?: string | undefined;
2618
+ } | {
2619
+ password: string;
2620
+ }) & {
2621
+ fetchOptions?: FetchOptions | undefined;
2622
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
2623
+ status: boolean;
2624
+ }, {
2625
+ code?: string | undefined;
2626
+ message?: string | undefined;
2627
+ }, FetchOptions["throw"] extends true ? true : false>>;
2628
+ };
2629
+ } & {
2630
+ twoFactor: {
2631
+ verifyBackupCode: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
2632
+ code: string;
2633
+ disableSession?: boolean | undefined;
2634
+ trustDevice?: boolean | undefined;
2635
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
2636
+ code: string;
2637
+ disableSession?: boolean | undefined;
2638
+ trustDevice?: boolean | undefined;
2639
+ } & {
2640
+ fetchOptions?: FetchOptions | undefined;
2641
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
2642
+ token: string | undefined;
2643
+ user: (Record<string, any> & {
2644
+ id: string;
2645
+ createdAt: Date;
2646
+ updatedAt: Date;
2647
+ email: string;
2648
+ emailVerified: boolean;
2649
+ name: string;
2650
+ image?: string | null | undefined;
2651
+ }) | import("better-auth/client/plugins").UserWithTwoFactor;
2652
+ }, "user"> & {
2653
+ user: import("better-auth/client").StripEmptyObjects<{
2654
+ id: string;
2655
+ createdAt: Date;
2656
+ updatedAt: Date;
2657
+ email: string;
2658
+ emailVerified: boolean;
2659
+ name: string;
2660
+ image?: string | null | undefined;
2661
+ } & {
2662
+ twoFactorEnabled: boolean | null | undefined;
2663
+ } & {}>;
2664
+ }, {
2665
+ code?: string | undefined;
2666
+ message?: string | undefined;
2667
+ }, FetchOptions["throw"] extends true ? true : false>>;
2668
+ };
2669
+ } & {
2670
+ twoFactor: {
2671
+ generateBackupCodes: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
2672
+ password?: string | undefined;
2673
+ } | {
2674
+ password: string;
2675
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<({
2676
+ password?: string | undefined;
2677
+ } | {
2678
+ password: string;
2679
+ }) & {
2680
+ fetchOptions?: FetchOptions | undefined;
2681
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
2682
+ status: boolean;
2683
+ backupCodes: string[];
2684
+ }, {
2685
+ code?: string | undefined;
2686
+ message?: string | undefined;
2687
+ }, FetchOptions["throw"] extends true ? true : false>>;
2688
+ };
2689
+ } & {
2690
+ twoFactor: {
2691
+ sendOtp: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
2692
+ trustDevice?: boolean | undefined;
2693
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
2694
+ query?: Record<string, any> | undefined;
2695
+ fetchOptions?: FetchOptions | undefined;
2696
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
2697
+ status: boolean;
2698
+ }, {
2699
+ code?: string | undefined;
2700
+ message?: string | undefined;
2701
+ }, FetchOptions["throw"] extends true ? true : false>>;
2702
+ };
2703
+ } & {
2704
+ twoFactor: {
2705
+ verifyOtp: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
2706
+ code: string;
2707
+ trustDevice?: boolean | undefined;
2708
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
2709
+ code: string;
2710
+ trustDevice?: boolean | undefined;
2711
+ } & {
2712
+ fetchOptions?: FetchOptions | undefined;
2713
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
2714
+ token: string;
2715
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
2716
+ }, "user"> & {
2717
+ user: import("better-auth/client").StripEmptyObjects<{
2718
+ id: string;
2719
+ createdAt: Date;
2720
+ updatedAt: Date;
2721
+ email: string;
2722
+ emailVerified: boolean;
2723
+ name: string;
2724
+ image?: string | null | undefined;
2725
+ } & {
2726
+ twoFactorEnabled: boolean | null | undefined;
2727
+ } & {}>;
2728
+ }) | (Omit<{
2729
+ token: string;
2730
+ user: Record<string, any> & {
2731
+ id: string;
2732
+ createdAt: Date;
2733
+ updatedAt: Date;
2734
+ email: string;
2735
+ emailVerified: boolean;
2736
+ name: string;
2737
+ image?: string | null | undefined;
2738
+ };
2739
+ }, "user"> & {
2740
+ user: import("better-auth/client").StripEmptyObjects<{
2741
+ id: string;
2742
+ createdAt: Date;
2743
+ updatedAt: Date;
2744
+ email: string;
2745
+ emailVerified: boolean;
2746
+ name: string;
2747
+ image?: string | null | undefined;
2748
+ } & {
2749
+ twoFactorEnabled: boolean | null | undefined;
2750
+ } & {}>;
2751
+ }), {
2752
+ code?: string | undefined;
2753
+ message?: string | undefined;
2754
+ }, FetchOptions["throw"] extends true ? true : false>>;
2755
+ };
2756
+ } & {
2757
+ twoFactor: {
2758
+ getTotpUri: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
2759
+ password?: string | undefined;
2760
+ } | {
2761
+ password: string;
2762
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<({
2763
+ password?: string | undefined;
2764
+ } | {
2765
+ password: string;
2766
+ }) & {
2767
+ fetchOptions?: FetchOptions | undefined;
2768
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
2769
+ totpURI: string;
2770
+ }, {
2771
+ code?: string | undefined;
2772
+ message?: string | undefined;
2773
+ }, FetchOptions["throw"] extends true ? true : false>>;
2774
+ };
2775
+ } & {
2776
+ twoFactor: {
2777
+ verifyTotp: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
2778
+ code: string;
2779
+ trustDevice?: boolean | undefined;
2780
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
2781
+ code: string;
2782
+ trustDevice?: boolean | undefined;
2783
+ } & {
2784
+ fetchOptions?: FetchOptions | undefined;
2785
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
2786
+ token: string;
2787
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
2788
+ }, "user"> & {
2789
+ user: import("better-auth/client").StripEmptyObjects<{
2790
+ id: string;
2791
+ createdAt: Date;
2792
+ updatedAt: Date;
2793
+ email: string;
2794
+ emailVerified: boolean;
2795
+ name: string;
2796
+ image?: string | null | undefined;
2797
+ } & {
2798
+ twoFactorEnabled: boolean | null | undefined;
2799
+ } & {}>;
2800
+ }) | (Omit<{
2801
+ token: string;
2802
+ user: Record<string, any> & {
2803
+ id: string;
2804
+ createdAt: Date;
2805
+ updatedAt: Date;
2806
+ email: string;
2807
+ emailVerified: boolean;
2808
+ name: string;
2809
+ image?: string | null | undefined;
2810
+ };
2811
+ }, "user"> & {
2812
+ user: import("better-auth/client").StripEmptyObjects<{
2813
+ id: string;
2814
+ createdAt: Date;
2815
+ updatedAt: Date;
2816
+ email: string;
2817
+ emailVerified: boolean;
2818
+ name: string;
2819
+ image?: string | null | undefined;
2820
+ } & {
2821
+ twoFactorEnabled: boolean | null | undefined;
2822
+ } & {}>;
2823
+ }), {
2824
+ code?: string | undefined;
2825
+ message?: string | undefined;
2826
+ }, FetchOptions["throw"] extends true ? true : false>>;
2827
+ };
2828
+ } & {
944
2829
  signIn: {
945
2830
  social: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
946
2831
  provider: (string & {}) | "apple" | "google" | "github" | "discord" | "line" | "facebook" | "twitch" | "tiktok" | "zoom" | "linear" | "huggingface" | "atlassian" | "cognito" | "figma" | "microsoft" | "slack" | "spotify" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "reddit" | "roblox" | "salesforce" | "vk" | "notion" | "kakao" | "naver" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
@@ -1017,7 +2902,9 @@ export declare const betterAuthClient: {
1017
2902
  emailVerified: boolean;
1018
2903
  name: string;
1019
2904
  image?: string | null | undefined;
1020
- }>;
2905
+ } & {
2906
+ twoFactorEnabled: boolean | null | undefined;
2907
+ } & {}>;
1021
2908
  }), {
1022
2909
  code?: string | undefined;
1023
2910
  message?: string | undefined;
@@ -1042,14 +2929,684 @@ export declare const betterAuthClient: {
1042
2929
  image?: string | undefined;
1043
2930
  callbackURL?: string | undefined;
1044
2931
  rememberMe?: boolean | undefined;
1045
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
1046
- email: string;
1047
- name: string;
1048
- password: string;
1049
- image?: string | undefined;
1050
- callbackURL?: string | undefined;
1051
- fetchOptions?: FetchOptions | undefined;
1052
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
2932
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<import("better-auth/client").InferSignUpEmailCtx<{
2933
+ baseURL: string;
2934
+ basePath: string;
2935
+ fetchOptions: {
2936
+ credentials: "include";
2937
+ };
2938
+ plugins: {
2939
+ id: "two-factor";
2940
+ version: string;
2941
+ $InferServerPlugin: ReturnType<(<O extends import("better-auth/client/plugins").TwoFactorOptions>(options?: O) => {
2942
+ id: "two-factor";
2943
+ version: string;
2944
+ endpoints: {
2945
+ enableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/enable", {
2946
+ method: "POST";
2947
+ body: import("zod").ZodObject<{
2948
+ password: import("zod").ZodOptional<import("zod").ZodString>;
2949
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
2950
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
2951
+ password: import("zod").ZodString;
2952
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
2953
+ }, import("zod/v4/core").$strip>;
2954
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2955
+ session: {
2956
+ session: Record<string, any> & {
2957
+ id: string;
2958
+ createdAt: Date;
2959
+ updatedAt: Date;
2960
+ userId: string;
2961
+ expiresAt: Date;
2962
+ token: string;
2963
+ ipAddress?: string | null | undefined;
2964
+ userAgent?: string | null | undefined;
2965
+ };
2966
+ user: Record<string, any> & {
2967
+ id: string;
2968
+ createdAt: Date;
2969
+ updatedAt: Date;
2970
+ email: string;
2971
+ emailVerified: boolean;
2972
+ name: string;
2973
+ image?: string | null | undefined;
2974
+ };
2975
+ };
2976
+ }>)[];
2977
+ metadata: {
2978
+ openapi: {
2979
+ summary: string;
2980
+ description: string;
2981
+ responses: {
2982
+ 200: {
2983
+ description: string;
2984
+ content: {
2985
+ "application/json": {
2986
+ schema: {
2987
+ type: "object";
2988
+ properties: {
2989
+ totpURI: {
2990
+ type: string;
2991
+ description: string;
2992
+ };
2993
+ backupCodes: {
2994
+ type: string;
2995
+ items: {
2996
+ type: string;
2997
+ };
2998
+ description: string;
2999
+ };
3000
+ };
3001
+ };
3002
+ };
3003
+ };
3004
+ };
3005
+ };
3006
+ };
3007
+ };
3008
+ }, {
3009
+ totpURI: string;
3010
+ backupCodes: string[];
3011
+ }>;
3012
+ disableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/disable", {
3013
+ method: "POST";
3014
+ body: import("zod").ZodObject<{
3015
+ password: import("zod").ZodOptional<import("zod").ZodString>;
3016
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3017
+ password: import("zod").ZodString;
3018
+ }, import("zod/v4/core").$strip>;
3019
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3020
+ session: {
3021
+ session: Record<string, any> & {
3022
+ id: string;
3023
+ createdAt: Date;
3024
+ updatedAt: Date;
3025
+ userId: string;
3026
+ expiresAt: Date;
3027
+ token: string;
3028
+ ipAddress?: string | null | undefined;
3029
+ userAgent?: string | null | undefined;
3030
+ };
3031
+ user: Record<string, any> & {
3032
+ id: string;
3033
+ createdAt: Date;
3034
+ updatedAt: Date;
3035
+ email: string;
3036
+ emailVerified: boolean;
3037
+ name: string;
3038
+ image?: string | null | undefined;
3039
+ };
3040
+ };
3041
+ }>)[];
3042
+ metadata: {
3043
+ openapi: {
3044
+ summary: string;
3045
+ description: string;
3046
+ responses: {
3047
+ 200: {
3048
+ description: string;
3049
+ content: {
3050
+ "application/json": {
3051
+ schema: {
3052
+ type: "object";
3053
+ properties: {
3054
+ status: {
3055
+ type: string;
3056
+ };
3057
+ };
3058
+ };
3059
+ };
3060
+ };
3061
+ };
3062
+ };
3063
+ };
3064
+ };
3065
+ }, {
3066
+ status: boolean;
3067
+ }>;
3068
+ verifyBackupCode: import("better-call").StrictEndpoint<"/two-factor/verify-backup-code", {
3069
+ method: "POST";
3070
+ body: import("zod").ZodObject<{
3071
+ code: import("zod").ZodString;
3072
+ disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
3073
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
3074
+ }, import("zod/v4/core").$strip>;
3075
+ metadata: {
3076
+ openapi: {
3077
+ description: string;
3078
+ responses: {
3079
+ "200": {
3080
+ description: string;
3081
+ content: {
3082
+ "application/json": {
3083
+ schema: {
3084
+ type: "object";
3085
+ properties: {
3086
+ user: {
3087
+ type: string;
3088
+ properties: {
3089
+ id: {
3090
+ type: string;
3091
+ description: string;
3092
+ };
3093
+ email: {
3094
+ type: string;
3095
+ format: string;
3096
+ nullable: boolean;
3097
+ description: string;
3098
+ };
3099
+ emailVerified: {
3100
+ type: string;
3101
+ nullable: boolean;
3102
+ description: string;
3103
+ };
3104
+ name: {
3105
+ type: string;
3106
+ nullable: boolean;
3107
+ description: string;
3108
+ };
3109
+ image: {
3110
+ type: string;
3111
+ format: string;
3112
+ nullable: boolean;
3113
+ description: string;
3114
+ };
3115
+ twoFactorEnabled: {
3116
+ type: string;
3117
+ description: string;
3118
+ };
3119
+ createdAt: {
3120
+ type: string;
3121
+ format: string;
3122
+ description: string;
3123
+ };
3124
+ updatedAt: {
3125
+ type: string;
3126
+ format: string;
3127
+ description: string;
3128
+ };
3129
+ };
3130
+ required: string[];
3131
+ description: string;
3132
+ };
3133
+ session: {
3134
+ type: string;
3135
+ properties: {
3136
+ token: {
3137
+ type: string;
3138
+ description: string;
3139
+ };
3140
+ userId: {
3141
+ type: string;
3142
+ description: string;
3143
+ };
3144
+ createdAt: {
3145
+ type: string;
3146
+ format: string;
3147
+ description: string;
3148
+ };
3149
+ expiresAt: {
3150
+ type: string;
3151
+ format: string;
3152
+ description: string;
3153
+ };
3154
+ };
3155
+ required: string[];
3156
+ description: string;
3157
+ };
3158
+ };
3159
+ required: string[];
3160
+ };
3161
+ };
3162
+ };
3163
+ };
3164
+ };
3165
+ };
3166
+ };
3167
+ }, {
3168
+ token: string | undefined;
3169
+ user: (Record<string, any> & {
3170
+ id: string;
3171
+ createdAt: Date;
3172
+ updatedAt: Date;
3173
+ email: string;
3174
+ emailVerified: boolean;
3175
+ name: string;
3176
+ image?: string | null | undefined;
3177
+ }) | import("better-auth/client/plugins").UserWithTwoFactor;
3178
+ }>;
3179
+ generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
3180
+ method: "POST";
3181
+ body: import("zod").ZodObject<{
3182
+ password: import("zod").ZodOptional<import("zod").ZodString>;
3183
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3184
+ password: import("zod").ZodString;
3185
+ }, import("zod/v4/core").$strip>;
3186
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3187
+ session: {
3188
+ session: Record<string, any> & {
3189
+ id: string;
3190
+ createdAt: Date;
3191
+ updatedAt: Date;
3192
+ userId: string;
3193
+ expiresAt: Date;
3194
+ token: string;
3195
+ ipAddress?: string | null | undefined;
3196
+ userAgent?: string | null | undefined;
3197
+ };
3198
+ user: Record<string, any> & {
3199
+ id: string;
3200
+ createdAt: Date;
3201
+ updatedAt: Date;
3202
+ email: string;
3203
+ emailVerified: boolean;
3204
+ name: string;
3205
+ image?: string | null | undefined;
3206
+ };
3207
+ };
3208
+ }>)[];
3209
+ metadata: {
3210
+ openapi: {
3211
+ description: string;
3212
+ responses: {
3213
+ "200": {
3214
+ description: string;
3215
+ content: {
3216
+ "application/json": {
3217
+ schema: {
3218
+ type: "object";
3219
+ properties: {
3220
+ status: {
3221
+ type: string;
3222
+ description: string;
3223
+ enum: boolean[];
3224
+ };
3225
+ backupCodes: {
3226
+ type: string;
3227
+ items: {
3228
+ type: string;
3229
+ };
3230
+ description: string;
3231
+ };
3232
+ };
3233
+ required: string[];
3234
+ };
3235
+ };
3236
+ };
3237
+ };
3238
+ };
3239
+ };
3240
+ };
3241
+ }, {
3242
+ status: boolean;
3243
+ backupCodes: string[];
3244
+ }>;
3245
+ viewBackupCodes: import("better-call").StrictEndpoint<string, {
3246
+ method: "POST";
3247
+ body: import("zod").ZodObject<{
3248
+ userId: import("zod").ZodCoercedString<unknown>;
3249
+ }, import("zod/v4/core").$strip>;
3250
+ }, {
3251
+ status: boolean;
3252
+ backupCodes: string[];
3253
+ }>;
3254
+ sendTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/send-otp", {
3255
+ method: "POST";
3256
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
3257
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
3258
+ }, import("zod/v4/core").$strip>>;
3259
+ metadata: {
3260
+ openapi: {
3261
+ summary: string;
3262
+ description: string;
3263
+ responses: {
3264
+ 200: {
3265
+ description: string;
3266
+ content: {
3267
+ "application/json": {
3268
+ schema: {
3269
+ type: "object";
3270
+ properties: {
3271
+ status: {
3272
+ type: string;
3273
+ };
3274
+ };
3275
+ };
3276
+ };
3277
+ };
3278
+ };
3279
+ };
3280
+ };
3281
+ };
3282
+ }, {
3283
+ status: boolean;
3284
+ }>;
3285
+ verifyTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/verify-otp", {
3286
+ method: "POST";
3287
+ body: import("zod").ZodObject<{
3288
+ code: import("zod").ZodString;
3289
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
3290
+ }, import("zod/v4/core").$strip>;
3291
+ metadata: {
3292
+ openapi: {
3293
+ summary: string;
3294
+ description: string;
3295
+ responses: {
3296
+ "200": {
3297
+ description: string;
3298
+ content: {
3299
+ "application/json": {
3300
+ schema: {
3301
+ type: "object";
3302
+ properties: {
3303
+ token: {
3304
+ type: string;
3305
+ description: string;
3306
+ };
3307
+ user: {
3308
+ type: string;
3309
+ properties: {
3310
+ id: {
3311
+ type: string;
3312
+ description: string;
3313
+ };
3314
+ email: {
3315
+ type: string;
3316
+ format: string;
3317
+ nullable: boolean;
3318
+ description: string;
3319
+ };
3320
+ emailVerified: {
3321
+ type: string;
3322
+ nullable: boolean;
3323
+ description: string;
3324
+ };
3325
+ name: {
3326
+ type: string;
3327
+ nullable: boolean;
3328
+ description: string;
3329
+ };
3330
+ image: {
3331
+ type: string;
3332
+ format: string;
3333
+ nullable: boolean;
3334
+ description: string;
3335
+ };
3336
+ createdAt: {
3337
+ type: string;
3338
+ format: string;
3339
+ description: string;
3340
+ };
3341
+ updatedAt: {
3342
+ type: string;
3343
+ format: string;
3344
+ description: string;
3345
+ };
3346
+ };
3347
+ required: string[];
3348
+ description: string;
3349
+ };
3350
+ };
3351
+ required: string[];
3352
+ };
3353
+ };
3354
+ };
3355
+ };
3356
+ };
3357
+ };
3358
+ };
3359
+ }, {
3360
+ token: string;
3361
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
3362
+ } | {
3363
+ token: string;
3364
+ user: Record<string, any> & {
3365
+ id: string;
3366
+ createdAt: Date;
3367
+ updatedAt: Date;
3368
+ email: string;
3369
+ emailVerified: boolean;
3370
+ name: string;
3371
+ image?: string | null | undefined;
3372
+ };
3373
+ }>;
3374
+ generateTOTP: import("better-call").StrictEndpoint<string, {
3375
+ method: "POST";
3376
+ body: import("zod").ZodObject<{
3377
+ secret: import("zod").ZodString;
3378
+ }, import("zod/v4/core").$strip>;
3379
+ metadata: {
3380
+ openapi: {
3381
+ summary: string;
3382
+ description: string;
3383
+ responses: {
3384
+ 200: {
3385
+ description: string;
3386
+ content: {
3387
+ "application/json": {
3388
+ schema: {
3389
+ type: "object";
3390
+ properties: {
3391
+ code: {
3392
+ type: string;
3393
+ };
3394
+ };
3395
+ };
3396
+ };
3397
+ };
3398
+ };
3399
+ };
3400
+ };
3401
+ };
3402
+ }, {
3403
+ code: string;
3404
+ }>;
3405
+ getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
3406
+ method: "POST";
3407
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3408
+ session: {
3409
+ session: Record<string, any> & {
3410
+ id: string;
3411
+ createdAt: Date;
3412
+ updatedAt: Date;
3413
+ userId: string;
3414
+ expiresAt: Date;
3415
+ token: string;
3416
+ ipAddress?: string | null | undefined;
3417
+ userAgent?: string | null | undefined;
3418
+ };
3419
+ user: Record<string, any> & {
3420
+ id: string;
3421
+ createdAt: Date;
3422
+ updatedAt: Date;
3423
+ email: string;
3424
+ emailVerified: boolean;
3425
+ name: string;
3426
+ image?: string | null | undefined;
3427
+ };
3428
+ };
3429
+ }>)[];
3430
+ body: import("zod").ZodObject<{
3431
+ password: import("zod").ZodOptional<import("zod").ZodString>;
3432
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3433
+ password: import("zod").ZodString;
3434
+ }, import("zod/v4/core").$strip>;
3435
+ metadata: {
3436
+ openapi: {
3437
+ summary: string;
3438
+ description: string;
3439
+ responses: {
3440
+ 200: {
3441
+ description: string;
3442
+ content: {
3443
+ "application/json": {
3444
+ schema: {
3445
+ type: "object";
3446
+ properties: {
3447
+ totpURI: {
3448
+ type: string;
3449
+ };
3450
+ };
3451
+ };
3452
+ };
3453
+ };
3454
+ };
3455
+ };
3456
+ };
3457
+ };
3458
+ }, {
3459
+ totpURI: string;
3460
+ }>;
3461
+ verifyTOTP: import("better-call").StrictEndpoint<"/two-factor/verify-totp", {
3462
+ method: "POST";
3463
+ body: import("zod").ZodObject<{
3464
+ code: import("zod").ZodString;
3465
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
3466
+ }, import("zod/v4/core").$strip>;
3467
+ metadata: {
3468
+ openapi: {
3469
+ summary: string;
3470
+ description: string;
3471
+ responses: {
3472
+ 200: {
3473
+ description: string;
3474
+ content: {
3475
+ "application/json": {
3476
+ schema: {
3477
+ type: "object";
3478
+ properties: {
3479
+ status: {
3480
+ type: string;
3481
+ };
3482
+ };
3483
+ };
3484
+ };
3485
+ };
3486
+ };
3487
+ };
3488
+ };
3489
+ };
3490
+ }, {
3491
+ token: string;
3492
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
3493
+ } | {
3494
+ token: string;
3495
+ user: Record<string, any> & {
3496
+ id: string;
3497
+ createdAt: Date;
3498
+ updatedAt: Date;
3499
+ email: string;
3500
+ emailVerified: boolean;
3501
+ name: string;
3502
+ image?: string | null | undefined;
3503
+ };
3504
+ }>;
3505
+ };
3506
+ options: NoInfer<O>;
3507
+ hooks: {
3508
+ after: {
3509
+ matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
3510
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3511
+ twoFactorRedirect: boolean;
3512
+ twoFactorMethods: string[];
3513
+ } | undefined>;
3514
+ }[];
3515
+ };
3516
+ schema: {
3517
+ user: {
3518
+ fields: {
3519
+ twoFactorEnabled: {
3520
+ type: "boolean";
3521
+ required: false;
3522
+ defaultValue: false;
3523
+ input: false;
3524
+ };
3525
+ };
3526
+ };
3527
+ twoFactor: {
3528
+ fields: {
3529
+ secret: {
3530
+ type: "string";
3531
+ required: true;
3532
+ returned: false;
3533
+ index: true;
3534
+ };
3535
+ backupCodes: {
3536
+ type: "string";
3537
+ required: true;
3538
+ returned: false;
3539
+ };
3540
+ userId: {
3541
+ type: "string";
3542
+ required: true;
3543
+ returned: false;
3544
+ references: {
3545
+ model: string;
3546
+ field: string;
3547
+ };
3548
+ index: true;
3549
+ };
3550
+ verified: {
3551
+ type: "boolean";
3552
+ required: false;
3553
+ defaultValue: true;
3554
+ input: false;
3555
+ };
3556
+ };
3557
+ };
3558
+ };
3559
+ rateLimit: {
3560
+ pathMatcher(path: string): boolean;
3561
+ window: number;
3562
+ max: number;
3563
+ }[];
3564
+ $ERROR_CODES: {
3565
+ OTP_NOT_ENABLED: import("better-auth/*").RawError<"OTP_NOT_ENABLED">;
3566
+ OTP_HAS_EXPIRED: import("better-auth/*").RawError<"OTP_HAS_EXPIRED">;
3567
+ TOTP_NOT_ENABLED: import("better-auth/*").RawError<"TOTP_NOT_ENABLED">;
3568
+ TWO_FACTOR_NOT_ENABLED: import("better-auth/*").RawError<"TWO_FACTOR_NOT_ENABLED">;
3569
+ BACKUP_CODES_NOT_ENABLED: import("better-auth/*").RawError<"BACKUP_CODES_NOT_ENABLED">;
3570
+ INVALID_BACKUP_CODE: import("better-auth/*").RawError<"INVALID_BACKUP_CODE">;
3571
+ INVALID_CODE: import("better-auth/*").RawError<"INVALID_CODE">;
3572
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth/*").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
3573
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth/*").RawError<"INVALID_TWO_FACTOR_COOKIE">;
3574
+ };
3575
+ })>;
3576
+ atomListeners: {
3577
+ matcher: (path: string) => boolean;
3578
+ signal: "$sessionSignal";
3579
+ }[];
3580
+ pathMethods: {
3581
+ "/two-factor/disable": "POST";
3582
+ "/two-factor/enable": "POST";
3583
+ "/two-factor/send-otp": "POST";
3584
+ "/two-factor/generate-backup-codes": "POST";
3585
+ "/two-factor/get-totp-uri": "POST";
3586
+ "/two-factor/verify-totp": "POST";
3587
+ "/two-factor/verify-otp": "POST";
3588
+ "/two-factor/verify-backup-code": "POST";
3589
+ };
3590
+ fetchPlugins: {
3591
+ id: string;
3592
+ name: string;
3593
+ hooks: {
3594
+ onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): Promise<void>;
3595
+ };
3596
+ }[];
3597
+ $ERROR_CODES: {
3598
+ OTP_NOT_ENABLED: import("better-auth/*").RawError<"OTP_NOT_ENABLED">;
3599
+ OTP_HAS_EXPIRED: import("better-auth/*").RawError<"OTP_HAS_EXPIRED">;
3600
+ TOTP_NOT_ENABLED: import("better-auth/*").RawError<"TOTP_NOT_ENABLED">;
3601
+ TWO_FACTOR_NOT_ENABLED: import("better-auth/*").RawError<"TWO_FACTOR_NOT_ENABLED">;
3602
+ BACKUP_CODES_NOT_ENABLED: import("better-auth/*").RawError<"BACKUP_CODES_NOT_ENABLED">;
3603
+ INVALID_BACKUP_CODE: import("better-auth/*").RawError<"INVALID_BACKUP_CODE">;
3604
+ INVALID_CODE: import("better-auth/*").RawError<"INVALID_CODE">;
3605
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth/*").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
3606
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth/*").RawError<"INVALID_TWO_FACTOR_COOKIE">;
3607
+ };
3608
+ }[];
3609
+ }, FetchOptions>>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
1053
3610
  token: null;
1054
3611
  user: {
1055
3612
  id: string;
@@ -1069,7 +3626,9 @@ export declare const betterAuthClient: {
1069
3626
  emailVerified: boolean;
1070
3627
  name: string;
1071
3628
  image?: string | null | undefined;
1072
- }>;
3629
+ } & {
3630
+ twoFactorEnabled: boolean | null | undefined;
3631
+ } & {}>;
1073
3632
  }) | (Omit<{
1074
3633
  token: string;
1075
3634
  user: {
@@ -1090,7 +3649,9 @@ export declare const betterAuthClient: {
1090
3649
  emailVerified: boolean;
1091
3650
  name: string;
1092
3651
  image?: string | null | undefined;
1093
- }>;
3652
+ } & {
3653
+ twoFactorEnabled: boolean | null | undefined;
3654
+ } & {}>;
1094
3655
  }), {
1095
3656
  code?: string | undefined;
1096
3657
  message?: string | undefined;
@@ -1132,7 +3693,9 @@ export declare const betterAuthClient: {
1132
3693
  emailVerified: boolean;
1133
3694
  name: string;
1134
3695
  image?: string | null | undefined;
1135
- }>;
3696
+ } & {
3697
+ twoFactorEnabled: boolean | null | undefined;
3698
+ } & {}>;
1136
3699
  }, {
1137
3700
  code?: string | undefined;
1138
3701
  message?: string | undefined;
@@ -1240,7 +3803,9 @@ export declare const betterAuthClient: {
1240
3803
  emailVerified: boolean;
1241
3804
  name: string;
1242
3805
  image?: string | null | undefined;
1243
- }>;
3806
+ } & {
3807
+ twoFactorEnabled: boolean | null | undefined;
3808
+ } & {}>;
1244
3809
  }, {
1245
3810
  code?: string | undefined;
1246
3811
  message?: string | undefined;
@@ -1273,6 +3838,677 @@ export declare const betterAuthClient: {
1273
3838
  fetchOptions: {
1274
3839
  credentials: "include";
1275
3840
  };
3841
+ plugins: {
3842
+ id: "two-factor";
3843
+ version: string;
3844
+ $InferServerPlugin: ReturnType<(<O extends import("better-auth/client/plugins").TwoFactorOptions>(options?: O) => {
3845
+ id: "two-factor";
3846
+ version: string;
3847
+ endpoints: {
3848
+ enableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/enable", {
3849
+ method: "POST";
3850
+ body: import("zod").ZodObject<{
3851
+ password: import("zod").ZodOptional<import("zod").ZodString>;
3852
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
3853
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3854
+ password: import("zod").ZodString;
3855
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
3856
+ }, import("zod/v4/core").$strip>;
3857
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3858
+ session: {
3859
+ session: Record<string, any> & {
3860
+ id: string;
3861
+ createdAt: Date;
3862
+ updatedAt: Date;
3863
+ userId: string;
3864
+ expiresAt: Date;
3865
+ token: string;
3866
+ ipAddress?: string | null | undefined;
3867
+ userAgent?: string | null | undefined;
3868
+ };
3869
+ user: Record<string, any> & {
3870
+ id: string;
3871
+ createdAt: Date;
3872
+ updatedAt: Date;
3873
+ email: string;
3874
+ emailVerified: boolean;
3875
+ name: string;
3876
+ image?: string | null | undefined;
3877
+ };
3878
+ };
3879
+ }>)[];
3880
+ metadata: {
3881
+ openapi: {
3882
+ summary: string;
3883
+ description: string;
3884
+ responses: {
3885
+ 200: {
3886
+ description: string;
3887
+ content: {
3888
+ "application/json": {
3889
+ schema: {
3890
+ type: "object";
3891
+ properties: {
3892
+ totpURI: {
3893
+ type: string;
3894
+ description: string;
3895
+ };
3896
+ backupCodes: {
3897
+ type: string;
3898
+ items: {
3899
+ type: string;
3900
+ };
3901
+ description: string;
3902
+ };
3903
+ };
3904
+ };
3905
+ };
3906
+ };
3907
+ };
3908
+ };
3909
+ };
3910
+ };
3911
+ }, {
3912
+ totpURI: string;
3913
+ backupCodes: string[];
3914
+ }>;
3915
+ disableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/disable", {
3916
+ method: "POST";
3917
+ body: import("zod").ZodObject<{
3918
+ password: import("zod").ZodOptional<import("zod").ZodString>;
3919
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3920
+ password: import("zod").ZodString;
3921
+ }, import("zod/v4/core").$strip>;
3922
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3923
+ session: {
3924
+ session: Record<string, any> & {
3925
+ id: string;
3926
+ createdAt: Date;
3927
+ updatedAt: Date;
3928
+ userId: string;
3929
+ expiresAt: Date;
3930
+ token: string;
3931
+ ipAddress?: string | null | undefined;
3932
+ userAgent?: string | null | undefined;
3933
+ };
3934
+ user: Record<string, any> & {
3935
+ id: string;
3936
+ createdAt: Date;
3937
+ updatedAt: Date;
3938
+ email: string;
3939
+ emailVerified: boolean;
3940
+ name: string;
3941
+ image?: string | null | undefined;
3942
+ };
3943
+ };
3944
+ }>)[];
3945
+ metadata: {
3946
+ openapi: {
3947
+ summary: string;
3948
+ description: string;
3949
+ responses: {
3950
+ 200: {
3951
+ description: string;
3952
+ content: {
3953
+ "application/json": {
3954
+ schema: {
3955
+ type: "object";
3956
+ properties: {
3957
+ status: {
3958
+ type: string;
3959
+ };
3960
+ };
3961
+ };
3962
+ };
3963
+ };
3964
+ };
3965
+ };
3966
+ };
3967
+ };
3968
+ }, {
3969
+ status: boolean;
3970
+ }>;
3971
+ verifyBackupCode: import("better-call").StrictEndpoint<"/two-factor/verify-backup-code", {
3972
+ method: "POST";
3973
+ body: import("zod").ZodObject<{
3974
+ code: import("zod").ZodString;
3975
+ disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
3976
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
3977
+ }, import("zod/v4/core").$strip>;
3978
+ metadata: {
3979
+ openapi: {
3980
+ description: string;
3981
+ responses: {
3982
+ "200": {
3983
+ description: string;
3984
+ content: {
3985
+ "application/json": {
3986
+ schema: {
3987
+ type: "object";
3988
+ properties: {
3989
+ user: {
3990
+ type: string;
3991
+ properties: {
3992
+ id: {
3993
+ type: string;
3994
+ description: string;
3995
+ };
3996
+ email: {
3997
+ type: string;
3998
+ format: string;
3999
+ nullable: boolean;
4000
+ description: string;
4001
+ };
4002
+ emailVerified: {
4003
+ type: string;
4004
+ nullable: boolean;
4005
+ description: string;
4006
+ };
4007
+ name: {
4008
+ type: string;
4009
+ nullable: boolean;
4010
+ description: string;
4011
+ };
4012
+ image: {
4013
+ type: string;
4014
+ format: string;
4015
+ nullable: boolean;
4016
+ description: string;
4017
+ };
4018
+ twoFactorEnabled: {
4019
+ type: string;
4020
+ description: string;
4021
+ };
4022
+ createdAt: {
4023
+ type: string;
4024
+ format: string;
4025
+ description: string;
4026
+ };
4027
+ updatedAt: {
4028
+ type: string;
4029
+ format: string;
4030
+ description: string;
4031
+ };
4032
+ };
4033
+ required: string[];
4034
+ description: string;
4035
+ };
4036
+ session: {
4037
+ type: string;
4038
+ properties: {
4039
+ token: {
4040
+ type: string;
4041
+ description: string;
4042
+ };
4043
+ userId: {
4044
+ type: string;
4045
+ description: string;
4046
+ };
4047
+ createdAt: {
4048
+ type: string;
4049
+ format: string;
4050
+ description: string;
4051
+ };
4052
+ expiresAt: {
4053
+ type: string;
4054
+ format: string;
4055
+ description: string;
4056
+ };
4057
+ };
4058
+ required: string[];
4059
+ description: string;
4060
+ };
4061
+ };
4062
+ required: string[];
4063
+ };
4064
+ };
4065
+ };
4066
+ };
4067
+ };
4068
+ };
4069
+ };
4070
+ }, {
4071
+ token: string | undefined;
4072
+ user: (Record<string, any> & {
4073
+ id: string;
4074
+ createdAt: Date;
4075
+ updatedAt: Date;
4076
+ email: string;
4077
+ emailVerified: boolean;
4078
+ name: string;
4079
+ image?: string | null | undefined;
4080
+ }) | import("better-auth/client/plugins").UserWithTwoFactor;
4081
+ }>;
4082
+ generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
4083
+ method: "POST";
4084
+ body: import("zod").ZodObject<{
4085
+ password: import("zod").ZodOptional<import("zod").ZodString>;
4086
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
4087
+ password: import("zod").ZodString;
4088
+ }, import("zod/v4/core").$strip>;
4089
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
4090
+ session: {
4091
+ session: Record<string, any> & {
4092
+ id: string;
4093
+ createdAt: Date;
4094
+ updatedAt: Date;
4095
+ userId: string;
4096
+ expiresAt: Date;
4097
+ token: string;
4098
+ ipAddress?: string | null | undefined;
4099
+ userAgent?: string | null | undefined;
4100
+ };
4101
+ user: Record<string, any> & {
4102
+ id: string;
4103
+ createdAt: Date;
4104
+ updatedAt: Date;
4105
+ email: string;
4106
+ emailVerified: boolean;
4107
+ name: string;
4108
+ image?: string | null | undefined;
4109
+ };
4110
+ };
4111
+ }>)[];
4112
+ metadata: {
4113
+ openapi: {
4114
+ description: string;
4115
+ responses: {
4116
+ "200": {
4117
+ description: string;
4118
+ content: {
4119
+ "application/json": {
4120
+ schema: {
4121
+ type: "object";
4122
+ properties: {
4123
+ status: {
4124
+ type: string;
4125
+ description: string;
4126
+ enum: boolean[];
4127
+ };
4128
+ backupCodes: {
4129
+ type: string;
4130
+ items: {
4131
+ type: string;
4132
+ };
4133
+ description: string;
4134
+ };
4135
+ };
4136
+ required: string[];
4137
+ };
4138
+ };
4139
+ };
4140
+ };
4141
+ };
4142
+ };
4143
+ };
4144
+ }, {
4145
+ status: boolean;
4146
+ backupCodes: string[];
4147
+ }>;
4148
+ viewBackupCodes: import("better-call").StrictEndpoint<string, {
4149
+ method: "POST";
4150
+ body: import("zod").ZodObject<{
4151
+ userId: import("zod").ZodCoercedString<unknown>;
4152
+ }, import("zod/v4/core").$strip>;
4153
+ }, {
4154
+ status: boolean;
4155
+ backupCodes: string[];
4156
+ }>;
4157
+ sendTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/send-otp", {
4158
+ method: "POST";
4159
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
4160
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
4161
+ }, import("zod/v4/core").$strip>>;
4162
+ metadata: {
4163
+ openapi: {
4164
+ summary: string;
4165
+ description: string;
4166
+ responses: {
4167
+ 200: {
4168
+ description: string;
4169
+ content: {
4170
+ "application/json": {
4171
+ schema: {
4172
+ type: "object";
4173
+ properties: {
4174
+ status: {
4175
+ type: string;
4176
+ };
4177
+ };
4178
+ };
4179
+ };
4180
+ };
4181
+ };
4182
+ };
4183
+ };
4184
+ };
4185
+ }, {
4186
+ status: boolean;
4187
+ }>;
4188
+ verifyTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/verify-otp", {
4189
+ method: "POST";
4190
+ body: import("zod").ZodObject<{
4191
+ code: import("zod").ZodString;
4192
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
4193
+ }, import("zod/v4/core").$strip>;
4194
+ metadata: {
4195
+ openapi: {
4196
+ summary: string;
4197
+ description: string;
4198
+ responses: {
4199
+ "200": {
4200
+ description: string;
4201
+ content: {
4202
+ "application/json": {
4203
+ schema: {
4204
+ type: "object";
4205
+ properties: {
4206
+ token: {
4207
+ type: string;
4208
+ description: string;
4209
+ };
4210
+ user: {
4211
+ type: string;
4212
+ properties: {
4213
+ id: {
4214
+ type: string;
4215
+ description: string;
4216
+ };
4217
+ email: {
4218
+ type: string;
4219
+ format: string;
4220
+ nullable: boolean;
4221
+ description: string;
4222
+ };
4223
+ emailVerified: {
4224
+ type: string;
4225
+ nullable: boolean;
4226
+ description: string;
4227
+ };
4228
+ name: {
4229
+ type: string;
4230
+ nullable: boolean;
4231
+ description: string;
4232
+ };
4233
+ image: {
4234
+ type: string;
4235
+ format: string;
4236
+ nullable: boolean;
4237
+ description: string;
4238
+ };
4239
+ createdAt: {
4240
+ type: string;
4241
+ format: string;
4242
+ description: string;
4243
+ };
4244
+ updatedAt: {
4245
+ type: string;
4246
+ format: string;
4247
+ description: string;
4248
+ };
4249
+ };
4250
+ required: string[];
4251
+ description: string;
4252
+ };
4253
+ };
4254
+ required: string[];
4255
+ };
4256
+ };
4257
+ };
4258
+ };
4259
+ };
4260
+ };
4261
+ };
4262
+ }, {
4263
+ token: string;
4264
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
4265
+ } | {
4266
+ token: string;
4267
+ user: Record<string, any> & {
4268
+ id: string;
4269
+ createdAt: Date;
4270
+ updatedAt: Date;
4271
+ email: string;
4272
+ emailVerified: boolean;
4273
+ name: string;
4274
+ image?: string | null | undefined;
4275
+ };
4276
+ }>;
4277
+ generateTOTP: import("better-call").StrictEndpoint<string, {
4278
+ method: "POST";
4279
+ body: import("zod").ZodObject<{
4280
+ secret: import("zod").ZodString;
4281
+ }, import("zod/v4/core").$strip>;
4282
+ metadata: {
4283
+ openapi: {
4284
+ summary: string;
4285
+ description: string;
4286
+ responses: {
4287
+ 200: {
4288
+ description: string;
4289
+ content: {
4290
+ "application/json": {
4291
+ schema: {
4292
+ type: "object";
4293
+ properties: {
4294
+ code: {
4295
+ type: string;
4296
+ };
4297
+ };
4298
+ };
4299
+ };
4300
+ };
4301
+ };
4302
+ };
4303
+ };
4304
+ };
4305
+ }, {
4306
+ code: string;
4307
+ }>;
4308
+ getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
4309
+ method: "POST";
4310
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
4311
+ session: {
4312
+ session: Record<string, any> & {
4313
+ id: string;
4314
+ createdAt: Date;
4315
+ updatedAt: Date;
4316
+ userId: string;
4317
+ expiresAt: Date;
4318
+ token: string;
4319
+ ipAddress?: string | null | undefined;
4320
+ userAgent?: string | null | undefined;
4321
+ };
4322
+ user: Record<string, any> & {
4323
+ id: string;
4324
+ createdAt: Date;
4325
+ updatedAt: Date;
4326
+ email: string;
4327
+ emailVerified: boolean;
4328
+ name: string;
4329
+ image?: string | null | undefined;
4330
+ };
4331
+ };
4332
+ }>)[];
4333
+ body: import("zod").ZodObject<{
4334
+ password: import("zod").ZodOptional<import("zod").ZodString>;
4335
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
4336
+ password: import("zod").ZodString;
4337
+ }, import("zod/v4/core").$strip>;
4338
+ metadata: {
4339
+ openapi: {
4340
+ summary: string;
4341
+ description: string;
4342
+ responses: {
4343
+ 200: {
4344
+ description: string;
4345
+ content: {
4346
+ "application/json": {
4347
+ schema: {
4348
+ type: "object";
4349
+ properties: {
4350
+ totpURI: {
4351
+ type: string;
4352
+ };
4353
+ };
4354
+ };
4355
+ };
4356
+ };
4357
+ };
4358
+ };
4359
+ };
4360
+ };
4361
+ }, {
4362
+ totpURI: string;
4363
+ }>;
4364
+ verifyTOTP: import("better-call").StrictEndpoint<"/two-factor/verify-totp", {
4365
+ method: "POST";
4366
+ body: import("zod").ZodObject<{
4367
+ code: import("zod").ZodString;
4368
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
4369
+ }, import("zod/v4/core").$strip>;
4370
+ metadata: {
4371
+ openapi: {
4372
+ summary: string;
4373
+ description: string;
4374
+ responses: {
4375
+ 200: {
4376
+ description: string;
4377
+ content: {
4378
+ "application/json": {
4379
+ schema: {
4380
+ type: "object";
4381
+ properties: {
4382
+ status: {
4383
+ type: string;
4384
+ };
4385
+ };
4386
+ };
4387
+ };
4388
+ };
4389
+ };
4390
+ };
4391
+ };
4392
+ };
4393
+ }, {
4394
+ token: string;
4395
+ user: import("better-auth/client/plugins").UserWithTwoFactor;
4396
+ } | {
4397
+ token: string;
4398
+ user: Record<string, any> & {
4399
+ id: string;
4400
+ createdAt: Date;
4401
+ updatedAt: Date;
4402
+ email: string;
4403
+ emailVerified: boolean;
4404
+ name: string;
4405
+ image?: string | null | undefined;
4406
+ };
4407
+ }>;
4408
+ };
4409
+ options: NoInfer<O>;
4410
+ hooks: {
4411
+ after: {
4412
+ matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
4413
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
4414
+ twoFactorRedirect: boolean;
4415
+ twoFactorMethods: string[];
4416
+ } | undefined>;
4417
+ }[];
4418
+ };
4419
+ schema: {
4420
+ user: {
4421
+ fields: {
4422
+ twoFactorEnabled: {
4423
+ type: "boolean";
4424
+ required: false;
4425
+ defaultValue: false;
4426
+ input: false;
4427
+ };
4428
+ };
4429
+ };
4430
+ twoFactor: {
4431
+ fields: {
4432
+ secret: {
4433
+ type: "string";
4434
+ required: true;
4435
+ returned: false;
4436
+ index: true;
4437
+ };
4438
+ backupCodes: {
4439
+ type: "string";
4440
+ required: true;
4441
+ returned: false;
4442
+ };
4443
+ userId: {
4444
+ type: "string";
4445
+ required: true;
4446
+ returned: false;
4447
+ references: {
4448
+ model: string;
4449
+ field: string;
4450
+ };
4451
+ index: true;
4452
+ };
4453
+ verified: {
4454
+ type: "boolean";
4455
+ required: false;
4456
+ defaultValue: true;
4457
+ input: false;
4458
+ };
4459
+ };
4460
+ };
4461
+ };
4462
+ rateLimit: {
4463
+ pathMatcher(path: string): boolean;
4464
+ window: number;
4465
+ max: number;
4466
+ }[];
4467
+ $ERROR_CODES: {
4468
+ OTP_NOT_ENABLED: import("better-auth/*").RawError<"OTP_NOT_ENABLED">;
4469
+ OTP_HAS_EXPIRED: import("better-auth/*").RawError<"OTP_HAS_EXPIRED">;
4470
+ TOTP_NOT_ENABLED: import("better-auth/*").RawError<"TOTP_NOT_ENABLED">;
4471
+ TWO_FACTOR_NOT_ENABLED: import("better-auth/*").RawError<"TWO_FACTOR_NOT_ENABLED">;
4472
+ BACKUP_CODES_NOT_ENABLED: import("better-auth/*").RawError<"BACKUP_CODES_NOT_ENABLED">;
4473
+ INVALID_BACKUP_CODE: import("better-auth/*").RawError<"INVALID_BACKUP_CODE">;
4474
+ INVALID_CODE: import("better-auth/*").RawError<"INVALID_CODE">;
4475
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth/*").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
4476
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth/*").RawError<"INVALID_TWO_FACTOR_COOKIE">;
4477
+ };
4478
+ })>;
4479
+ atomListeners: {
4480
+ matcher: (path: string) => boolean;
4481
+ signal: "$sessionSignal";
4482
+ }[];
4483
+ pathMethods: {
4484
+ "/two-factor/disable": "POST";
4485
+ "/two-factor/enable": "POST";
4486
+ "/two-factor/send-otp": "POST";
4487
+ "/two-factor/generate-backup-codes": "POST";
4488
+ "/two-factor/get-totp-uri": "POST";
4489
+ "/two-factor/verify-totp": "POST";
4490
+ "/two-factor/verify-otp": "POST";
4491
+ "/two-factor/verify-backup-code": "POST";
4492
+ };
4493
+ fetchPlugins: {
4494
+ id: string;
4495
+ name: string;
4496
+ hooks: {
4497
+ onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): Promise<void>;
4498
+ };
4499
+ }[];
4500
+ $ERROR_CODES: {
4501
+ OTP_NOT_ENABLED: import("better-auth/*").RawError<"OTP_NOT_ENABLED">;
4502
+ OTP_HAS_EXPIRED: import("better-auth/*").RawError<"OTP_HAS_EXPIRED">;
4503
+ TOTP_NOT_ENABLED: import("better-auth/*").RawError<"TOTP_NOT_ENABLED">;
4504
+ TWO_FACTOR_NOT_ENABLED: import("better-auth/*").RawError<"TWO_FACTOR_NOT_ENABLED">;
4505
+ BACKUP_CODES_NOT_ENABLED: import("better-auth/*").RawError<"BACKUP_CODES_NOT_ENABLED">;
4506
+ INVALID_BACKUP_CODE: import("better-auth/*").RawError<"INVALID_BACKUP_CODE">;
4507
+ INVALID_CODE: import("better-auth/*").RawError<"INVALID_CODE">;
4508
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth/*").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
4509
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth/*").RawError<"INVALID_TWO_FACTOR_COOKIE">;
4510
+ };
4511
+ }[];
1276
4512
  }, FetchOptions>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1277
4513
  status: boolean;
1278
4514
  }, {
@@ -1522,7 +4758,7 @@ export declare const betterAuthClient: {
1522
4758
  } | undefined;
1523
4759
  fetchOptions?: FetchOptions | undefined;
1524
4760
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1525
- user: import("@better-auth/core/oauth2").OAuth2UserInfo;
4761
+ user: import("better-auth/*").OAuth2UserInfo;
1526
4762
  data: Record<string, any>;
1527
4763
  }, {
1528
4764
  code?: string | undefined;
@@ -1547,7 +4783,9 @@ export declare const betterAuthClient: {
1547
4783
  emailVerified: boolean;
1548
4784
  name: string;
1549
4785
  image?: string | null | undefined;
1550
- }>;
4786
+ } & {
4787
+ twoFactorEnabled: boolean | null | undefined;
4788
+ } & {}>;
1551
4789
  session: import("better-auth/client").StripEmptyObjects<{
1552
4790
  id: string;
1553
4791
  createdAt: Date;
@@ -1573,7 +4811,9 @@ export declare const betterAuthClient: {
1573
4811
  emailVerified: boolean;
1574
4812
  name: string;
1575
4813
  image?: string | null | undefined;
1576
- }>;
4814
+ } & {
4815
+ twoFactorEnabled: boolean | null | undefined;
4816
+ } & {}>;
1577
4817
  session: import("better-auth/client").StripEmptyObjects<{
1578
4818
  id: string;
1579
4819
  createdAt: Date;
@@ -1609,8 +4849,8 @@ export declare const betterAuthClient: {
1609
4849
  onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
1610
4850
  };
1611
4851
  })[];
1612
- cache?: RequestCache | undefined;
1613
4852
  priority?: RequestPriority | undefined;
4853
+ cache?: RequestCache | undefined;
1614
4854
  credentials?: RequestCredentials;
1615
4855
  headers?: (HeadersInit & (HeadersInit | {
1616
4856
  accept: "application/json" | "text/plain" | "application/octet-stream";
@@ -1673,7 +4913,9 @@ export declare const betterAuthClient: {
1673
4913
  emailVerified: boolean;
1674
4914
  name: string;
1675
4915
  image?: string | null | undefined;
1676
- }>;
4916
+ } & {
4917
+ twoFactorEnabled: boolean | null | undefined;
4918
+ } & {}>;
1677
4919
  session: import("better-auth/client").StripEmptyObjects<{
1678
4920
  id: string;
1679
4921
  createdAt: Date;
@@ -1687,6 +4929,42 @@ export declare const betterAuthClient: {
1687
4929
  };
1688
4930
  };
1689
4931
  $ERROR_CODES: {
4932
+ OTP_NOT_ENABLED: {
4933
+ readonly code: "OTP_NOT_ENABLED";
4934
+ message: string;
4935
+ };
4936
+ OTP_HAS_EXPIRED: {
4937
+ readonly code: "OTP_HAS_EXPIRED";
4938
+ message: string;
4939
+ };
4940
+ TOTP_NOT_ENABLED: {
4941
+ readonly code: "TOTP_NOT_ENABLED";
4942
+ message: string;
4943
+ };
4944
+ TWO_FACTOR_NOT_ENABLED: {
4945
+ readonly code: "TWO_FACTOR_NOT_ENABLED";
4946
+ message: string;
4947
+ };
4948
+ BACKUP_CODES_NOT_ENABLED: {
4949
+ readonly code: "BACKUP_CODES_NOT_ENABLED";
4950
+ message: string;
4951
+ };
4952
+ INVALID_BACKUP_CODE: {
4953
+ readonly code: "INVALID_BACKUP_CODE";
4954
+ message: string;
4955
+ };
4956
+ INVALID_CODE: {
4957
+ readonly code: "INVALID_CODE";
4958
+ message: string;
4959
+ };
4960
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: {
4961
+ readonly code: "TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE";
4962
+ message: string;
4963
+ };
4964
+ INVALID_TWO_FACTOR_COOKIE: {
4965
+ readonly code: "INVALID_TWO_FACTOR_COOKIE";
4966
+ message: string;
4967
+ };
1690
4968
  USER_NOT_FOUND: {
1691
4969
  readonly code: "USER_NOT_FOUND";
1692
4970
  message: string;