@b3dotfun/sdk 0.1.69-alpha.9 → 0.1.69-test.0

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 (258) hide show
  1. package/dist/cjs/anyspend/constants/rpc.d.ts +1 -1
  2. package/dist/cjs/anyspend/constants/rpc.js +1 -1
  3. package/dist/cjs/anyspend/react/components/AnySpendNFT.js +2 -2
  4. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
  5. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.js +10 -2
  6. package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.js +3 -3
  7. package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.js +43 -23
  8. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
  9. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +10 -9
  10. package/dist/cjs/anyspend/react/components/common/InsufficientDepositPayment.js +2 -2
  11. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +2 -2
  12. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -2
  13. package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.js +2 -2
  14. package/dist/cjs/anyspend/utils/chain.js +8 -7
  15. package/dist/cjs/global-account/better-auth-client.d.ts +1883 -0
  16. package/dist/cjs/global-account/better-auth-client.js +17 -0
  17. package/dist/cjs/global-account/bsmnt.d.ts +0 -1
  18. package/dist/cjs/global-account/bsmnt.js +0 -6
  19. package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +4 -1
  20. package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.js +2 -1
  21. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +8 -1
  22. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +9 -12
  23. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +6 -9
  24. package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
  25. package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.js +120 -0
  26. package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  27. package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
  28. package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
  29. package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +4 -2
  30. package/dist/cjs/global-account/react/components/LinkAccount/LinkedAccountItem.js +2 -1
  31. package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +15 -6
  32. package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +2 -2
  33. package/dist/cjs/global-account/react/components/Send/Send.js +5 -2
  34. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
  35. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthResetPassword.js +67 -0
  36. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +34 -0
  37. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +163 -0
  38. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -4
  39. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +6 -0
  40. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +138 -0
  41. package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +5 -1
  42. package/dist/cjs/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.js +2 -1
  43. package/dist/cjs/global-account/react/components/custom/Button.d.ts +1 -1
  44. package/dist/cjs/global-account/react/components/index.d.ts +3 -0
  45. package/dist/cjs/global-account/react/components/index.js +7 -3
  46. package/dist/cjs/global-account/react/components/ui/button.d.ts +1 -1
  47. package/dist/cjs/global-account/react/hooks/index.d.ts +1 -0
  48. package/dist/cjs/global-account/react/hooks/index.js +5 -2
  49. package/dist/cjs/global-account/react/hooks/useAuth.js +24 -11
  50. package/dist/cjs/global-account/react/hooks/useAuthentication.js +21 -8
  51. package/dist/cjs/global-account/react/hooks/useBetterAuth.d.ts +973 -0
  52. package/dist/cjs/global-account/react/hooks/useBetterAuth.js +157 -0
  53. package/dist/cjs/global-account/react/utils/createWagmiConfig.d.ts +4 -13
  54. package/dist/cjs/global-account/react/utils/createWagmiConfig.js +5 -7
  55. package/dist/cjs/global-account/react/utils/index.d.ts +0 -1
  56. package/dist/cjs/global-account/react/utils/index.js +0 -1
  57. package/dist/cjs/global-account/react/utils/profileDisplay.js +17 -18
  58. package/dist/cjs/shared/constants/chains/b3Chain.d.ts +7 -7
  59. package/dist/cjs/shared/constants/chains/b3Chain.js +4 -4
  60. package/dist/cjs/shared/constants/chains/b3Viem.d.ts +6 -0
  61. package/dist/cjs/shared/constants/chains/b3Viem.js +19 -0
  62. package/dist/cjs/shared/constants/chains/supported.d.ts +1 -1
  63. package/dist/cjs/shared/generated/chain-networks.json +2 -2
  64. package/dist/cjs/shared/utils/chains.d.ts +1 -1
  65. package/dist/cjs/shared/utils/chains.js +2 -2
  66. package/dist/cjs/wallet/react/components/ConnectWallet.d.ts +11 -0
  67. package/dist/cjs/wallet/react/components/ConnectWallet.js +467 -0
  68. package/dist/cjs/wallet/react/components/WalletProvider.d.ts +35 -0
  69. package/dist/cjs/wallet/react/components/WalletProvider.js +20 -0
  70. package/dist/cjs/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
  71. package/dist/cjs/wallet/react/hooks/useWalletDisconnect.js +22 -0
  72. package/dist/cjs/wallet/react/hooks/useWalletState.d.ts +31 -0
  73. package/dist/cjs/wallet/react/hooks/useWalletState.js +63 -0
  74. package/dist/cjs/wallet/react/index.d.ts +5 -0
  75. package/dist/cjs/wallet/react/index.js +16 -0
  76. package/dist/cjs/wallet/utils/createWalletConfig.d.ts +21 -0
  77. package/dist/cjs/wallet/utils/createWalletConfig.js +24 -0
  78. package/dist/esm/anyspend/constants/rpc.d.ts +1 -1
  79. package/dist/esm/anyspend/constants/rpc.js +1 -1
  80. package/dist/esm/anyspend/react/components/AnySpendNFT.js +2 -2
  81. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
  82. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.js +10 -2
  83. package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.js +3 -3
  84. package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.js +44 -24
  85. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
  86. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +9 -8
  87. package/dist/esm/anyspend/react/components/common/InsufficientDepositPayment.js +2 -2
  88. package/dist/esm/anyspend/react/components/common/OrderDetails.js +2 -2
  89. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -2
  90. package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.js +2 -2
  91. package/dist/esm/anyspend/utils/chain.js +10 -9
  92. package/dist/esm/global-account/better-auth-client.d.ts +1883 -0
  93. package/dist/esm/global-account/better-auth-client.js +13 -0
  94. package/dist/esm/global-account/bsmnt.d.ts +0 -1
  95. package/dist/esm/global-account/bsmnt.js +0 -5
  96. package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +4 -1
  97. package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.js +2 -1
  98. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +8 -1
  99. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +4 -7
  100. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +2 -5
  101. package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
  102. package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.js +115 -0
  103. package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  104. package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
  105. package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
  106. package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +4 -2
  107. package/dist/esm/global-account/react/components/LinkAccount/LinkedAccountItem.js +2 -1
  108. package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +13 -7
  109. package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +2 -2
  110. package/dist/esm/global-account/react/components/Send/Send.js +5 -2
  111. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
  112. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthResetPassword.js +64 -0
  113. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +34 -0
  114. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +160 -0
  115. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -4
  116. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +6 -0
  117. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +135 -0
  118. package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +5 -1
  119. package/dist/esm/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.js +2 -1
  120. package/dist/esm/global-account/react/components/custom/Button.d.ts +1 -1
  121. package/dist/esm/global-account/react/components/index.d.ts +3 -0
  122. package/dist/esm/global-account/react/components/index.js +2 -0
  123. package/dist/esm/global-account/react/components/ui/button.d.ts +1 -1
  124. package/dist/esm/global-account/react/hooks/index.d.ts +1 -0
  125. package/dist/esm/global-account/react/hooks/index.js +1 -0
  126. package/dist/esm/global-account/react/hooks/useAuth.js +24 -11
  127. package/dist/esm/global-account/react/hooks/useAuthentication.js +21 -8
  128. package/dist/esm/global-account/react/hooks/useBetterAuth.d.ts +973 -0
  129. package/dist/esm/global-account/react/hooks/useBetterAuth.js +149 -0
  130. package/dist/esm/global-account/react/utils/createWagmiConfig.d.ts +4 -13
  131. package/dist/esm/global-account/react/utils/createWagmiConfig.js +5 -7
  132. package/dist/esm/global-account/react/utils/index.d.ts +0 -1
  133. package/dist/esm/global-account/react/utils/index.js +0 -1
  134. package/dist/esm/global-account/react/utils/profileDisplay.js +17 -18
  135. package/dist/esm/shared/constants/chains/b3Chain.d.ts +7 -7
  136. package/dist/esm/shared/constants/chains/b3Chain.js +4 -4
  137. package/dist/esm/shared/constants/chains/b3Viem.d.ts +6 -0
  138. package/dist/esm/shared/constants/chains/b3Viem.js +16 -0
  139. package/dist/esm/shared/constants/chains/supported.d.ts +1 -1
  140. package/dist/esm/shared/generated/chain-networks.json +2 -2
  141. package/dist/esm/shared/utils/chains.d.ts +1 -1
  142. package/dist/esm/shared/utils/chains.js +2 -2
  143. package/dist/esm/wallet/react/components/ConnectWallet.d.ts +11 -0
  144. package/dist/esm/wallet/react/components/ConnectWallet.js +431 -0
  145. package/dist/esm/wallet/react/components/WalletProvider.d.ts +35 -0
  146. package/dist/esm/wallet/react/components/WalletProvider.js +17 -0
  147. package/dist/esm/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
  148. package/dist/esm/wallet/react/hooks/useWalletDisconnect.js +19 -0
  149. package/dist/esm/wallet/react/hooks/useWalletState.d.ts +31 -0
  150. package/dist/esm/wallet/react/hooks/useWalletState.js +60 -0
  151. package/dist/esm/wallet/react/index.d.ts +5 -0
  152. package/dist/esm/wallet/react/index.js +8 -0
  153. package/dist/esm/wallet/utils/createWalletConfig.d.ts +21 -0
  154. package/dist/esm/wallet/utils/createWalletConfig.js +21 -0
  155. package/dist/styles/index.css +1 -1
  156. package/dist/types/anyspend/constants/rpc.d.ts +1 -1
  157. package/dist/types/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
  158. package/dist/types/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
  159. package/dist/types/global-account/better-auth-client.d.ts +1883 -0
  160. package/dist/types/global-account/bsmnt.d.ts +0 -1
  161. package/dist/types/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +4 -1
  162. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +8 -1
  163. package/dist/types/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
  164. package/dist/types/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  165. package/dist/types/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
  166. package/dist/types/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
  167. package/dist/types/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +34 -0
  168. package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +6 -0
  169. package/dist/types/global-account/react/components/custom/Button.d.ts +1 -1
  170. package/dist/types/global-account/react/components/index.d.ts +3 -0
  171. package/dist/types/global-account/react/components/ui/button.d.ts +1 -1
  172. package/dist/types/global-account/react/hooks/index.d.ts +1 -0
  173. package/dist/types/global-account/react/hooks/useBetterAuth.d.ts +973 -0
  174. package/dist/types/global-account/react/utils/createWagmiConfig.d.ts +4 -13
  175. package/dist/types/global-account/react/utils/index.d.ts +0 -1
  176. package/dist/types/shared/constants/chains/b3Chain.d.ts +7 -7
  177. package/dist/types/shared/constants/chains/b3Viem.d.ts +6 -0
  178. package/dist/types/shared/constants/chains/supported.d.ts +1 -1
  179. package/dist/types/shared/utils/chains.d.ts +1 -1
  180. package/dist/types/wallet/react/components/ConnectWallet.d.ts +11 -0
  181. package/dist/types/wallet/react/components/WalletProvider.d.ts +35 -0
  182. package/dist/types/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
  183. package/dist/types/wallet/react/hooks/useWalletState.d.ts +31 -0
  184. package/dist/types/wallet/react/index.d.ts +5 -0
  185. package/dist/types/wallet/utils/createWalletConfig.d.ts +21 -0
  186. package/package.json +14 -6
  187. package/src/anyspend/constants/rpc.ts +2 -1
  188. package/src/anyspend/react/components/AnySpendNFT.tsx +2 -2
  189. package/src/anyspend/react/components/checkout/AnySpendCheckout.tsx +15 -1
  190. package/src/anyspend/react/components/checkout/CheckoutSuccess.tsx +3 -3
  191. package/src/anyspend/react/components/checkout/CryptoPayPanel.tsx +45 -27
  192. package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +10 -8
  193. package/src/anyspend/react/components/common/InsufficientDepositPayment.tsx +2 -2
  194. package/src/anyspend/react/components/common/OrderDetails.tsx +2 -2
  195. package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +4 -4
  196. package/src/anyspend/react/components/common/TransferCryptoDetails.tsx +2 -2
  197. package/src/anyspend/utils/chain.ts +9 -9
  198. package/src/global-account/better-auth-client.ts +17 -0
  199. package/src/global-account/bsmnt.ts +0 -6
  200. package/src/global-account/react/components/B3Provider/B3ConfigProvider.tsx +6 -0
  201. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +14 -20
  202. package/src/global-account/react/components/B3Provider/B3Provider.tsx +52 -40
  203. package/src/global-account/react/components/B3Provider/BetterAuthProvider.tsx +127 -0
  204. package/src/global-account/react/components/B3Provider/LocalSDKProvider.tsx +5 -0
  205. package/src/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.tsx +17 -10
  206. package/src/global-account/react/components/LinkAccount/LinkedAccountItem.tsx +2 -1
  207. package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +29 -11
  208. package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +2 -2
  209. package/src/global-account/react/components/Send/Send.tsx +8 -5
  210. package/src/global-account/react/components/SignInWithB3/BetterAuthResetPassword.tsx +146 -0
  211. package/src/global-account/react/components/SignInWithB3/BetterAuthSignIn.tsx +426 -0
  212. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +13 -4
  213. package/src/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.tsx +308 -0
  214. package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +5 -1
  215. package/src/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.tsx +2 -1
  216. package/src/global-account/react/components/index.ts +3 -0
  217. package/src/global-account/react/hooks/index.ts +1 -0
  218. package/src/global-account/react/hooks/useAuth.ts +24 -11
  219. package/src/global-account/react/hooks/useAuthentication.ts +21 -8
  220. package/src/global-account/react/hooks/useBetterAuth.ts +191 -0
  221. package/src/global-account/react/utils/createWagmiConfig.tsx +6 -7
  222. package/src/global-account/react/utils/index.ts +0 -1
  223. package/src/global-account/react/utils/profileDisplay.ts +21 -19
  224. package/src/shared/constants/chains/b3Chain.ts +5 -5
  225. package/src/shared/constants/chains/b3Viem.ts +18 -0
  226. package/src/shared/generated/chain-networks.json +2 -2
  227. package/src/shared/utils/chains.ts +3 -2
  228. package/src/wallet/__tests__/createWalletConfig.test.ts +39 -0
  229. package/src/wallet/react/components/ConnectWallet.tsx +665 -0
  230. package/src/wallet/react/components/WalletProvider.tsx +64 -0
  231. package/src/wallet/react/hooks/useWalletDisconnect.ts +22 -0
  232. package/src/wallet/react/hooks/useWalletState.ts +93 -0
  233. package/src/wallet/react/index.ts +10 -0
  234. package/src/wallet/utils/createWalletConfig.ts +39 -0
  235. package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
  236. package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -54
  237. package/dist/cjs/global-account/react/components/ProfileAvatar.d.ts +0 -0
  238. package/dist/cjs/global-account/react/components/ProfileAvatar.js +0 -127
  239. package/dist/cjs/global-account/react/hooks/useRPMToken.d.ts +0 -7
  240. package/dist/cjs/global-account/react/hooks/useRPMToken.js +0 -11
  241. package/dist/cjs/global-account/react/utils/updateAvatar.d.ts +0 -4
  242. package/dist/cjs/global-account/react/utils/updateAvatar.js +0 -54
  243. package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
  244. package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -51
  245. package/dist/esm/global-account/react/components/ProfileAvatar.d.ts +0 -0
  246. package/dist/esm/global-account/react/components/ProfileAvatar.js +0 -127
  247. package/dist/esm/global-account/react/hooks/useRPMToken.d.ts +0 -7
  248. package/dist/esm/global-account/react/hooks/useRPMToken.js +0 -8
  249. package/dist/esm/global-account/react/utils/updateAvatar.d.ts +0 -4
  250. package/dist/esm/global-account/react/utils/updateAvatar.js +0 -18
  251. package/dist/types/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
  252. package/dist/types/global-account/react/components/ProfileAvatar.d.ts +0 -0
  253. package/dist/types/global-account/react/hooks/useRPMToken.d.ts +0 -7
  254. package/dist/types/global-account/react/utils/updateAvatar.d.ts +0 -4
  255. package/src/global-account/react/components/AvatarCreator/AvatarCreator.tsx +0 -90
  256. package/src/global-account/react/components/ProfileAvatar.tsx +0 -138
  257. package/src/global-account/react/hooks/useRPMToken.ts +0 -17
  258. package/src/global-account/react/utils/updateAvatar.ts +0 -21
@@ -0,0 +1,973 @@
1
+ export type BetterAuthSocialProvider = "google" | "discord" | "apple" | "github" | "slack" | "microsoft";
2
+ /** Thrown when email verification is required before the user can sign in. */
3
+ export declare class EmailVerificationRequiredError extends Error {
4
+ constructor(message?: string);
5
+ }
6
+ /**
7
+ * Hook for authentication via Better Auth (email/password + social providers).
8
+ *
9
+ * Follows the same pattern as Thirdweb auth:
10
+ * 1. Better Auth sign-in returns a session token
11
+ * 2. Token is passed as accessToken to app.authenticate({ strategy: "better-auth" })
12
+ * 3. BetterAuthStrategy verifies the token and issues a Feathers JWT
13
+ */
14
+ export declare function useBetterAuth(): {
15
+ signInWithEmail: (email: string, password: string) => Promise<import("@feathersjs/authentication").AuthenticationResult>;
16
+ signUpWithEmail: (email: string, password: string, name: string) => Promise<import("@feathersjs/authentication").AuthenticationResult>;
17
+ signInWithSocial: (provider: BetterAuthSocialProvider) => Promise<void>;
18
+ requestPasswordReset: (email: string, redirectTo?: string) => Promise<{
19
+ data: {
20
+ status: boolean;
21
+ message: string;
22
+ };
23
+ error: null;
24
+ }>;
25
+ resetPassword: (newPassword: string, token: string) => Promise<{
26
+ data: {
27
+ status: boolean;
28
+ };
29
+ error: null;
30
+ }>;
31
+ exchangeForFeathersJWT: (sessionToken: string) => Promise<import("@feathersjs/authentication").AuthenticationResult>;
32
+ betterAuthClient: {
33
+ signIn: {
34
+ social: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
35
+ 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";
36
+ callbackURL?: string | undefined;
37
+ newUserCallbackURL?: string | undefined;
38
+ errorCallbackURL?: string | undefined;
39
+ disableRedirect?: boolean | undefined;
40
+ idToken?: {
41
+ token: string;
42
+ nonce?: string | undefined;
43
+ accessToken?: string | undefined;
44
+ refreshToken?: string | undefined;
45
+ expiresAt?: number | undefined;
46
+ user?: {
47
+ name?: {
48
+ firstName?: string | undefined;
49
+ lastName?: string | undefined;
50
+ } | undefined;
51
+ email?: string | undefined;
52
+ } | undefined;
53
+ } | undefined;
54
+ scopes?: string[] | undefined;
55
+ requestSignUp?: boolean | undefined;
56
+ loginHint?: string | undefined;
57
+ additionalData?: Record<string, any> | undefined;
58
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
59
+ 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";
60
+ callbackURL?: string | undefined;
61
+ newUserCallbackURL?: string | undefined;
62
+ errorCallbackURL?: string | undefined;
63
+ disableRedirect?: boolean | undefined;
64
+ idToken?: {
65
+ token: string;
66
+ nonce?: string | undefined;
67
+ accessToken?: string | undefined;
68
+ refreshToken?: string | undefined;
69
+ expiresAt?: number | undefined;
70
+ user?: {
71
+ name?: {
72
+ firstName?: string | undefined;
73
+ lastName?: string | undefined;
74
+ } | undefined;
75
+ email?: string | undefined;
76
+ } | undefined;
77
+ } | undefined;
78
+ scopes?: string[] | undefined;
79
+ requestSignUp?: boolean | undefined;
80
+ loginHint?: string | undefined;
81
+ additionalData?: Record<string, any> | undefined;
82
+ } & {
83
+ fetchOptions?: FetchOptions | undefined;
84
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
85
+ redirect: boolean;
86
+ url: string;
87
+ } | (Omit<{
88
+ redirect: boolean;
89
+ token: string;
90
+ url: undefined;
91
+ user: {
92
+ id: string;
93
+ createdAt: Date;
94
+ updatedAt: Date;
95
+ email: string;
96
+ emailVerified: boolean;
97
+ name: string;
98
+ image?: string | null | undefined | undefined;
99
+ };
100
+ }, "user"> & {
101
+ user: import("better-auth/client").StripEmptyObjects<{
102
+ id: string;
103
+ createdAt: Date;
104
+ updatedAt: Date;
105
+ email: string;
106
+ emailVerified: boolean;
107
+ name: string;
108
+ image?: string | null | undefined;
109
+ }>;
110
+ }), {
111
+ code?: string | undefined;
112
+ message?: string | undefined;
113
+ }, FetchOptions["throw"] extends true ? true : false>>;
114
+ };
115
+ } & {
116
+ signOut: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
117
+ query?: Record<string, any> | undefined;
118
+ fetchOptions?: FetchOptions | undefined;
119
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
120
+ success: boolean;
121
+ }, {
122
+ code?: string | undefined;
123
+ message?: string | undefined;
124
+ }, FetchOptions["throw"] extends true ? true : false>>;
125
+ } & {
126
+ signUp: {
127
+ email: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
128
+ name: string;
129
+ email: string;
130
+ password: string;
131
+ image?: string | undefined;
132
+ callbackURL?: string | undefined;
133
+ rememberMe?: boolean | undefined;
134
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
135
+ email: string;
136
+ name: string;
137
+ password: string;
138
+ image?: string | undefined;
139
+ callbackURL?: string | undefined;
140
+ fetchOptions?: FetchOptions | undefined;
141
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
142
+ token: null;
143
+ user: {
144
+ id: string;
145
+ createdAt: Date;
146
+ updatedAt: Date;
147
+ email: string;
148
+ emailVerified: boolean;
149
+ name: string;
150
+ image?: string | null | undefined | undefined;
151
+ };
152
+ }, "user"> & {
153
+ user: import("better-auth/client").StripEmptyObjects<{
154
+ id: string;
155
+ createdAt: Date;
156
+ updatedAt: Date;
157
+ email: string;
158
+ emailVerified: boolean;
159
+ name: string;
160
+ image?: string | null | undefined;
161
+ }>;
162
+ }) | (Omit<{
163
+ token: string;
164
+ user: {
165
+ id: string;
166
+ createdAt: Date;
167
+ updatedAt: Date;
168
+ email: string;
169
+ emailVerified: boolean;
170
+ name: string;
171
+ image?: string | null | undefined | undefined;
172
+ };
173
+ }, "user"> & {
174
+ user: import("better-auth/client").StripEmptyObjects<{
175
+ id: string;
176
+ createdAt: Date;
177
+ updatedAt: Date;
178
+ email: string;
179
+ emailVerified: boolean;
180
+ name: string;
181
+ image?: string | null | undefined;
182
+ }>;
183
+ }), {
184
+ code?: string | undefined;
185
+ message?: string | undefined;
186
+ }, FetchOptions["throw"] extends true ? true : false>>;
187
+ };
188
+ } & {
189
+ signIn: {
190
+ email: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
191
+ email: string;
192
+ password: string;
193
+ callbackURL?: string | undefined;
194
+ rememberMe?: boolean | undefined;
195
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
196
+ email: string;
197
+ password: string;
198
+ callbackURL?: string | undefined;
199
+ rememberMe?: boolean | undefined;
200
+ } & {
201
+ fetchOptions?: FetchOptions | undefined;
202
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
203
+ redirect: boolean;
204
+ token: string;
205
+ url?: string | undefined;
206
+ user: {
207
+ id: string;
208
+ createdAt: Date;
209
+ updatedAt: Date;
210
+ email: string;
211
+ emailVerified: boolean;
212
+ name: string;
213
+ image?: string | null | undefined | undefined;
214
+ };
215
+ }, "user"> & {
216
+ user: import("better-auth/client").StripEmptyObjects<{
217
+ id: string;
218
+ createdAt: Date;
219
+ updatedAt: Date;
220
+ email: string;
221
+ emailVerified: boolean;
222
+ name: string;
223
+ image?: string | null | undefined;
224
+ }>;
225
+ }, {
226
+ code?: string | undefined;
227
+ message?: string | undefined;
228
+ }, FetchOptions["throw"] extends true ? true : false>>;
229
+ };
230
+ } & {
231
+ resetPassword: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
232
+ newPassword: string;
233
+ token?: string | undefined;
234
+ }> & Record<string, any>, Partial<{
235
+ token?: string | undefined;
236
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
237
+ newPassword: string;
238
+ token?: string | undefined;
239
+ } & {
240
+ fetchOptions?: FetchOptions | undefined;
241
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
242
+ status: boolean;
243
+ }, {
244
+ code?: string | undefined;
245
+ message?: string | undefined;
246
+ }, FetchOptions["throw"] extends true ? true : false>>;
247
+ } & {
248
+ verifyEmail: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
249
+ token: string;
250
+ callbackURL?: string | undefined;
251
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
252
+ query: {
253
+ token: string;
254
+ callbackURL?: string | undefined;
255
+ };
256
+ fetchOptions?: FetchOptions | undefined;
257
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<void | {
258
+ status: boolean;
259
+ }>, {
260
+ code?: string | undefined;
261
+ message?: string | undefined;
262
+ }, FetchOptions["throw"] extends true ? true : false>>;
263
+ } & {
264
+ sendVerificationEmail: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
265
+ email: string;
266
+ callbackURL?: string | undefined;
267
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
268
+ email: string;
269
+ callbackURL?: string | undefined;
270
+ } & {
271
+ fetchOptions?: FetchOptions | undefined;
272
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
273
+ status: boolean;
274
+ }, {
275
+ code?: string | undefined;
276
+ message?: string | undefined;
277
+ }, FetchOptions["throw"] extends true ? true : false>>;
278
+ } & {
279
+ changeEmail: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
280
+ newEmail: string;
281
+ callbackURL?: string | undefined;
282
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
283
+ newEmail: string;
284
+ callbackURL?: string | undefined;
285
+ } & {
286
+ fetchOptions?: FetchOptions | undefined;
287
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
288
+ status: boolean;
289
+ }, {
290
+ code?: string | undefined;
291
+ message?: string | undefined;
292
+ }, FetchOptions["throw"] extends true ? true : false>>;
293
+ } & {
294
+ changePassword: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
295
+ newPassword: string;
296
+ currentPassword: string;
297
+ revokeOtherSessions?: boolean | undefined;
298
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
299
+ newPassword: string;
300
+ currentPassword: string;
301
+ revokeOtherSessions?: boolean | undefined;
302
+ } & {
303
+ fetchOptions?: FetchOptions | undefined;
304
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
305
+ token: string | null;
306
+ user: {
307
+ id: string;
308
+ createdAt: Date;
309
+ updatedAt: Date;
310
+ email: string;
311
+ emailVerified: boolean;
312
+ name: string;
313
+ image?: string | null | undefined;
314
+ } & Record<string, any> & {
315
+ id: string;
316
+ createdAt: Date;
317
+ updatedAt: Date;
318
+ email: string;
319
+ emailVerified: boolean;
320
+ name: string;
321
+ image?: string | null | undefined;
322
+ };
323
+ }, "user"> & {
324
+ user: import("better-auth/client").StripEmptyObjects<{
325
+ id: string;
326
+ createdAt: Date;
327
+ updatedAt: Date;
328
+ email: string;
329
+ emailVerified: boolean;
330
+ name: string;
331
+ image?: string | null | undefined;
332
+ }>;
333
+ }, {
334
+ code?: string | undefined;
335
+ message?: string | undefined;
336
+ }, FetchOptions["throw"] extends true ? true : false>>;
337
+ } & {
338
+ updateSession: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<Partial<{}>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<Partial<{}> & {
339
+ fetchOptions?: FetchOptions | undefined;
340
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
341
+ session: {
342
+ id: string;
343
+ createdAt: Date;
344
+ updatedAt: Date;
345
+ userId: string;
346
+ expiresAt: Date;
347
+ token: string;
348
+ ipAddress?: string | null | undefined;
349
+ userAgent?: string | null | undefined;
350
+ };
351
+ }, {
352
+ code?: string | undefined;
353
+ message?: string | undefined;
354
+ }, FetchOptions["throw"] extends true ? true : false>>;
355
+ } & {
356
+ updateUser: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<Partial<{}> & {
357
+ name?: string | undefined;
358
+ image?: string | undefined | null;
359
+ }> & 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").InferUserUpdateCtx<{
360
+ baseURL: string;
361
+ basePath: string;
362
+ fetchOptions: {
363
+ credentials: "include";
364
+ };
365
+ }, FetchOptions>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
366
+ status: boolean;
367
+ }, {
368
+ code?: string | undefined;
369
+ message?: string | undefined;
370
+ }, FetchOptions["throw"] extends true ? true : false>>;
371
+ } & {
372
+ deleteUser: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
373
+ callbackURL?: string | undefined;
374
+ password?: string | undefined;
375
+ token?: string | undefined;
376
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
377
+ callbackURL?: string | undefined;
378
+ password?: string | undefined;
379
+ token?: string | undefined;
380
+ } & {
381
+ fetchOptions?: FetchOptions | undefined;
382
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
383
+ success: boolean;
384
+ message: string;
385
+ }, {
386
+ code?: string | undefined;
387
+ message?: string | undefined;
388
+ }, FetchOptions["throw"] extends true ? true : false>>;
389
+ } & {
390
+ requestPasswordReset: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
391
+ email: string;
392
+ redirectTo?: string | undefined;
393
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
394
+ email: string;
395
+ redirectTo?: string | undefined;
396
+ } & {
397
+ fetchOptions?: FetchOptions | undefined;
398
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
399
+ status: boolean;
400
+ message: string;
401
+ }, {
402
+ code?: string | undefined;
403
+ message?: string | undefined;
404
+ }, FetchOptions["throw"] extends true ? true : false>>;
405
+ } & {
406
+ resetPassword: {
407
+ ":token": <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
408
+ callbackURL: string;
409
+ }> & Record<string, any>, {
410
+ token: string;
411
+ }>>(data_0: import("better-auth/client").Prettify<{
412
+ query: {
413
+ callbackURL: string;
414
+ };
415
+ fetchOptions?: FetchOptions | undefined;
416
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<never, {
417
+ code?: string | undefined;
418
+ message?: string | undefined;
419
+ }, FetchOptions["throw"] extends true ? true : false>>;
420
+ };
421
+ } & {
422
+ listSessions: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
423
+ query?: Record<string, any> | undefined;
424
+ fetchOptions?: FetchOptions | undefined;
425
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth/client").Prettify<{
426
+ id: string;
427
+ createdAt: Date;
428
+ updatedAt: Date;
429
+ userId: string;
430
+ expiresAt: Date;
431
+ token: string;
432
+ ipAddress?: string | null | undefined | undefined;
433
+ userAgent?: string | null | undefined | undefined;
434
+ }>[], {
435
+ code?: string | undefined;
436
+ message?: string | undefined;
437
+ }, FetchOptions["throw"] extends true ? true : false>>;
438
+ } & {
439
+ revokeSession: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
440
+ token: string;
441
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
442
+ token: string;
443
+ } & {
444
+ fetchOptions?: FetchOptions | undefined;
445
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
446
+ status: boolean;
447
+ }, {
448
+ code?: string | undefined;
449
+ message?: string | undefined;
450
+ }, FetchOptions["throw"] extends true ? true : false>>;
451
+ } & {
452
+ revokeSessions: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
453
+ query?: Record<string, any> | undefined;
454
+ fetchOptions?: FetchOptions | undefined;
455
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
456
+ status: boolean;
457
+ }, {
458
+ code?: string | undefined;
459
+ message?: string | undefined;
460
+ }, FetchOptions["throw"] extends true ? true : false>>;
461
+ } & {
462
+ revokeOtherSessions: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
463
+ query?: Record<string, any> | undefined;
464
+ fetchOptions?: FetchOptions | undefined;
465
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
466
+ status: boolean;
467
+ }, {
468
+ code?: string | undefined;
469
+ message?: string | undefined;
470
+ }, FetchOptions["throw"] extends true ? true : false>>;
471
+ } & {
472
+ linkSocial: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
473
+ provider: unknown;
474
+ callbackURL?: string | undefined;
475
+ idToken?: {
476
+ token: string;
477
+ nonce?: string | undefined;
478
+ accessToken?: string | undefined;
479
+ refreshToken?: string | undefined;
480
+ scopes?: string[] | undefined;
481
+ } | undefined;
482
+ requestSignUp?: boolean | undefined;
483
+ scopes?: string[] | undefined;
484
+ errorCallbackURL?: string | undefined;
485
+ disableRedirect?: boolean | undefined;
486
+ additionalData?: Record<string, any> | undefined;
487
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
488
+ provider: unknown;
489
+ callbackURL?: string | undefined;
490
+ idToken?: {
491
+ token: string;
492
+ nonce?: string | undefined;
493
+ accessToken?: string | undefined;
494
+ refreshToken?: string | undefined;
495
+ scopes?: string[] | undefined;
496
+ } | undefined;
497
+ requestSignUp?: boolean | undefined;
498
+ scopes?: string[] | undefined;
499
+ errorCallbackURL?: string | undefined;
500
+ disableRedirect?: boolean | undefined;
501
+ additionalData?: Record<string, any> | undefined;
502
+ } & {
503
+ fetchOptions?: FetchOptions | undefined;
504
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
505
+ url: string;
506
+ redirect: boolean;
507
+ }, {
508
+ code?: string | undefined;
509
+ message?: string | undefined;
510
+ }, FetchOptions["throw"] extends true ? true : false>>;
511
+ } & {
512
+ listAccounts: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
513
+ query?: Record<string, any> | undefined;
514
+ fetchOptions?: FetchOptions | undefined;
515
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
516
+ scopes: string[];
517
+ id: string;
518
+ createdAt: Date;
519
+ updatedAt: Date;
520
+ userId: string;
521
+ providerId: string;
522
+ accountId: string;
523
+ }[], {
524
+ code?: string | undefined;
525
+ message?: string | undefined;
526
+ }, FetchOptions["throw"] extends true ? true : false>>;
527
+ } & {
528
+ deleteUser: {
529
+ callback: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
530
+ token: string;
531
+ callbackURL?: string | undefined;
532
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
533
+ query: {
534
+ token: string;
535
+ callbackURL?: string | undefined;
536
+ };
537
+ fetchOptions?: FetchOptions | undefined;
538
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
539
+ success: boolean;
540
+ message: string;
541
+ }, {
542
+ code?: string | undefined;
543
+ message?: string | undefined;
544
+ }, FetchOptions["throw"] extends true ? true : false>>;
545
+ };
546
+ } & {
547
+ unlinkAccount: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
548
+ providerId: string;
549
+ accountId?: string | undefined;
550
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
551
+ providerId: string;
552
+ accountId?: string | undefined;
553
+ } & {
554
+ fetchOptions?: FetchOptions | undefined;
555
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
556
+ status: boolean;
557
+ }, {
558
+ code?: string | undefined;
559
+ message?: string | undefined;
560
+ }, FetchOptions["throw"] extends true ? true : false>>;
561
+ } & {
562
+ refreshToken: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
563
+ providerId: string;
564
+ accountId?: string | undefined;
565
+ userId?: string | undefined;
566
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
567
+ providerId: string;
568
+ accountId?: string | undefined;
569
+ userId?: string | undefined;
570
+ } & {
571
+ fetchOptions?: FetchOptions | undefined;
572
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
573
+ accessToken: string | undefined;
574
+ refreshToken: string;
575
+ accessTokenExpiresAt: Date | undefined;
576
+ refreshTokenExpiresAt: Date | null | undefined;
577
+ scope: string | null | undefined;
578
+ idToken: string | null | undefined;
579
+ providerId: string;
580
+ accountId: string;
581
+ }, {
582
+ code?: string | undefined;
583
+ message?: string | undefined;
584
+ }, FetchOptions["throw"] extends true ? true : false>>;
585
+ } & {
586
+ getAccessToken: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
587
+ providerId: string;
588
+ accountId?: string | undefined;
589
+ userId?: string | undefined;
590
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/client").Prettify<{
591
+ providerId: string;
592
+ accountId?: string | undefined;
593
+ userId?: string | undefined;
594
+ } & {
595
+ fetchOptions?: FetchOptions | undefined;
596
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
597
+ accessToken: string;
598
+ accessTokenExpiresAt: Date | undefined;
599
+ scopes: string[];
600
+ idToken: string | undefined;
601
+ }, {
602
+ code?: string | undefined;
603
+ message?: string | undefined;
604
+ }, FetchOptions["throw"] extends true ? true : false>>;
605
+ } & {
606
+ accountInfo: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
607
+ accountId?: string | undefined;
608
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
609
+ query?: {
610
+ accountId?: string | undefined;
611
+ } | undefined;
612
+ fetchOptions?: FetchOptions | undefined;
613
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
614
+ user: import("@better-auth/core/oauth2").OAuth2UserInfo;
615
+ data: Record<string, any>;
616
+ }, {
617
+ code?: string | undefined;
618
+ message?: string | undefined;
619
+ }, FetchOptions["throw"] extends true ? true : false>>;
620
+ } & {
621
+ getSession: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
622
+ disableCookieCache?: unknown;
623
+ disableRefresh?: unknown;
624
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/client").Prettify<{
625
+ query?: {
626
+ disableCookieCache?: unknown;
627
+ disableRefresh?: unknown;
628
+ } | undefined;
629
+ fetchOptions?: FetchOptions | undefined;
630
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
631
+ user: import("better-auth/client").StripEmptyObjects<{
632
+ id: string;
633
+ createdAt: Date;
634
+ updatedAt: Date;
635
+ email: string;
636
+ emailVerified: boolean;
637
+ name: string;
638
+ image?: string | null | undefined;
639
+ }>;
640
+ session: import("better-auth/client").StripEmptyObjects<{
641
+ id: string;
642
+ createdAt: Date;
643
+ updatedAt: Date;
644
+ userId: string;
645
+ expiresAt: Date;
646
+ token: string;
647
+ ipAddress?: string | null | undefined;
648
+ userAgent?: string | null | undefined;
649
+ }>;
650
+ } | null, {
651
+ code?: string | undefined;
652
+ message?: string | undefined;
653
+ }, FetchOptions["throw"] extends true ? true : false>>;
654
+ } & {
655
+ useSession: import("nanostores").Atom<{
656
+ data: {
657
+ user: import("better-auth/client").StripEmptyObjects<{
658
+ id: string;
659
+ createdAt: Date;
660
+ updatedAt: Date;
661
+ email: string;
662
+ emailVerified: boolean;
663
+ name: string;
664
+ image?: string | null | undefined;
665
+ }>;
666
+ session: import("better-auth/client").StripEmptyObjects<{
667
+ id: string;
668
+ createdAt: Date;
669
+ updatedAt: Date;
670
+ userId: string;
671
+ expiresAt: Date;
672
+ token: string;
673
+ ipAddress?: string | null | undefined;
674
+ userAgent?: string | null | undefined;
675
+ }>;
676
+ } | null;
677
+ error: import("@better-fetch/fetch").BetterFetchError | null;
678
+ isPending: boolean;
679
+ isRefetching: boolean;
680
+ refetch: (queryParams?: {
681
+ query?: import("better-auth/client").SessionQueryParams;
682
+ } | undefined) => Promise<void>;
683
+ }>;
684
+ $fetch: import("@better-fetch/fetch").BetterFetch<{
685
+ plugins: (import("@better-fetch/fetch").BetterFetchPlugin<Record<string, any>> | {
686
+ id: string;
687
+ name: string;
688
+ hooks: {
689
+ onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
690
+ };
691
+ } | {
692
+ id: string;
693
+ name: string;
694
+ hooks: {
695
+ onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
696
+ onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
697
+ onRequest: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
698
+ onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
699
+ };
700
+ })[];
701
+ cache?: RequestCache | undefined;
702
+ priority?: RequestPriority | undefined;
703
+ credentials?: RequestCredentials;
704
+ headers?: (HeadersInit & (HeadersInit | {
705
+ accept: "application/json" | "text/plain" | "application/octet-stream";
706
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
707
+ authorization: "Bearer" | "Basic";
708
+ })) | undefined;
709
+ integrity?: string | undefined;
710
+ keepalive?: boolean | undefined;
711
+ method: string;
712
+ mode?: RequestMode | undefined;
713
+ redirect?: RequestRedirect | undefined;
714
+ referrer?: string | undefined;
715
+ referrerPolicy?: ReferrerPolicy | undefined;
716
+ signal?: (AbortSignal | null) | undefined;
717
+ window?: null | undefined;
718
+ onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
719
+ hookOptions?: {
720
+ cloneResponse?: boolean;
721
+ } | undefined;
722
+ timeout?: number | undefined;
723
+ customFetchImpl: import("@better-fetch/fetch").FetchEsque;
724
+ baseURL: string;
725
+ throw?: boolean | undefined;
726
+ auth?: ({
727
+ type: "Bearer";
728
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
729
+ } | {
730
+ type: "Basic";
731
+ username: string | (() => string | undefined) | undefined;
732
+ password: string | (() => string | undefined) | undefined;
733
+ } | {
734
+ type: "Custom";
735
+ prefix: string | (() => string | undefined) | undefined;
736
+ value: string | (() => string | undefined) | undefined;
737
+ }) | undefined;
738
+ body?: any;
739
+ query?: any;
740
+ params?: any;
741
+ duplex?: "full" | "half" | undefined;
742
+ jsonParser: (text: string) => Promise<any> | any;
743
+ retry?: import("@better-fetch/fetch").RetryOptions | undefined;
744
+ retryAttempt?: number | undefined;
745
+ output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
746
+ errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
747
+ disableValidation?: boolean | undefined;
748
+ disableSignal?: boolean | undefined;
749
+ }, unknown, unknown, {}>;
750
+ $store: {
751
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
752
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
753
+ atoms: Record<string, import("nanostores").WritableAtom<any>>;
754
+ };
755
+ $Infer: {
756
+ Session: {
757
+ user: import("better-auth/client").StripEmptyObjects<{
758
+ id: string;
759
+ createdAt: Date;
760
+ updatedAt: Date;
761
+ email: string;
762
+ emailVerified: boolean;
763
+ name: string;
764
+ image?: string | null | undefined;
765
+ }>;
766
+ session: import("better-auth/client").StripEmptyObjects<{
767
+ id: string;
768
+ createdAt: Date;
769
+ updatedAt: Date;
770
+ userId: string;
771
+ expiresAt: Date;
772
+ token: string;
773
+ ipAddress?: string | null | undefined;
774
+ userAgent?: string | null | undefined;
775
+ }>;
776
+ };
777
+ };
778
+ $ERROR_CODES: {
779
+ USER_NOT_FOUND: {
780
+ readonly code: "USER_NOT_FOUND";
781
+ message: string;
782
+ };
783
+ FAILED_TO_CREATE_USER: {
784
+ readonly code: "FAILED_TO_CREATE_USER";
785
+ message: string;
786
+ };
787
+ FAILED_TO_CREATE_SESSION: {
788
+ readonly code: "FAILED_TO_CREATE_SESSION";
789
+ message: string;
790
+ };
791
+ FAILED_TO_UPDATE_USER: {
792
+ readonly code: "FAILED_TO_UPDATE_USER";
793
+ message: string;
794
+ };
795
+ FAILED_TO_GET_SESSION: {
796
+ readonly code: "FAILED_TO_GET_SESSION";
797
+ message: string;
798
+ };
799
+ INVALID_PASSWORD: {
800
+ readonly code: "INVALID_PASSWORD";
801
+ message: string;
802
+ };
803
+ INVALID_EMAIL: {
804
+ readonly code: "INVALID_EMAIL";
805
+ message: string;
806
+ };
807
+ INVALID_EMAIL_OR_PASSWORD: {
808
+ readonly code: "INVALID_EMAIL_OR_PASSWORD";
809
+ message: string;
810
+ };
811
+ INVALID_USER: {
812
+ readonly code: "INVALID_USER";
813
+ message: string;
814
+ };
815
+ SOCIAL_ACCOUNT_ALREADY_LINKED: {
816
+ readonly code: "SOCIAL_ACCOUNT_ALREADY_LINKED";
817
+ message: string;
818
+ };
819
+ PROVIDER_NOT_FOUND: {
820
+ readonly code: "PROVIDER_NOT_FOUND";
821
+ message: string;
822
+ };
823
+ INVALID_TOKEN: {
824
+ readonly code: "INVALID_TOKEN";
825
+ message: string;
826
+ };
827
+ TOKEN_EXPIRED: {
828
+ readonly code: "TOKEN_EXPIRED";
829
+ message: string;
830
+ };
831
+ ID_TOKEN_NOT_SUPPORTED: {
832
+ readonly code: "ID_TOKEN_NOT_SUPPORTED";
833
+ message: string;
834
+ };
835
+ FAILED_TO_GET_USER_INFO: {
836
+ readonly code: "FAILED_TO_GET_USER_INFO";
837
+ message: string;
838
+ };
839
+ USER_EMAIL_NOT_FOUND: {
840
+ readonly code: "USER_EMAIL_NOT_FOUND";
841
+ message: string;
842
+ };
843
+ EMAIL_NOT_VERIFIED: {
844
+ readonly code: "EMAIL_NOT_VERIFIED";
845
+ message: string;
846
+ };
847
+ PASSWORD_TOO_SHORT: {
848
+ readonly code: "PASSWORD_TOO_SHORT";
849
+ message: string;
850
+ };
851
+ PASSWORD_TOO_LONG: {
852
+ readonly code: "PASSWORD_TOO_LONG";
853
+ message: string;
854
+ };
855
+ USER_ALREADY_EXISTS: {
856
+ readonly code: "USER_ALREADY_EXISTS";
857
+ message: string;
858
+ };
859
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: {
860
+ readonly code: "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL";
861
+ message: string;
862
+ };
863
+ EMAIL_CAN_NOT_BE_UPDATED: {
864
+ readonly code: "EMAIL_CAN_NOT_BE_UPDATED";
865
+ message: string;
866
+ };
867
+ CREDENTIAL_ACCOUNT_NOT_FOUND: {
868
+ readonly code: "CREDENTIAL_ACCOUNT_NOT_FOUND";
869
+ message: string;
870
+ };
871
+ ACCOUNT_NOT_FOUND: {
872
+ readonly code: "ACCOUNT_NOT_FOUND";
873
+ message: string;
874
+ };
875
+ SESSION_EXPIRED: {
876
+ readonly code: "SESSION_EXPIRED";
877
+ message: string;
878
+ };
879
+ FAILED_TO_UNLINK_LAST_ACCOUNT: {
880
+ readonly code: "FAILED_TO_UNLINK_LAST_ACCOUNT";
881
+ message: string;
882
+ };
883
+ USER_ALREADY_HAS_PASSWORD: {
884
+ readonly code: "USER_ALREADY_HAS_PASSWORD";
885
+ message: string;
886
+ };
887
+ CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: {
888
+ readonly code: "CROSS_SITE_NAVIGATION_LOGIN_BLOCKED";
889
+ message: string;
890
+ };
891
+ VERIFICATION_EMAIL_NOT_ENABLED: {
892
+ readonly code: "VERIFICATION_EMAIL_NOT_ENABLED";
893
+ message: string;
894
+ };
895
+ EMAIL_ALREADY_VERIFIED: {
896
+ readonly code: "EMAIL_ALREADY_VERIFIED";
897
+ message: string;
898
+ };
899
+ EMAIL_MISMATCH: {
900
+ readonly code: "EMAIL_MISMATCH";
901
+ message: string;
902
+ };
903
+ SESSION_NOT_FRESH: {
904
+ readonly code: "SESSION_NOT_FRESH";
905
+ message: string;
906
+ };
907
+ LINKED_ACCOUNT_ALREADY_EXISTS: {
908
+ readonly code: "LINKED_ACCOUNT_ALREADY_EXISTS";
909
+ message: string;
910
+ };
911
+ INVALID_ORIGIN: {
912
+ readonly code: "INVALID_ORIGIN";
913
+ message: string;
914
+ };
915
+ INVALID_CALLBACK_URL: {
916
+ readonly code: "INVALID_CALLBACK_URL";
917
+ message: string;
918
+ };
919
+ INVALID_REDIRECT_URL: {
920
+ readonly code: "INVALID_REDIRECT_URL";
921
+ message: string;
922
+ };
923
+ INVALID_ERROR_CALLBACK_URL: {
924
+ readonly code: "INVALID_ERROR_CALLBACK_URL";
925
+ message: string;
926
+ };
927
+ INVALID_NEW_USER_CALLBACK_URL: {
928
+ readonly code: "INVALID_NEW_USER_CALLBACK_URL";
929
+ message: string;
930
+ };
931
+ MISSING_OR_NULL_ORIGIN: {
932
+ readonly code: "MISSING_OR_NULL_ORIGIN";
933
+ message: string;
934
+ };
935
+ CALLBACK_URL_REQUIRED: {
936
+ readonly code: "CALLBACK_URL_REQUIRED";
937
+ message: string;
938
+ };
939
+ FAILED_TO_CREATE_VERIFICATION: {
940
+ readonly code: "FAILED_TO_CREATE_VERIFICATION";
941
+ message: string;
942
+ };
943
+ FIELD_NOT_ALLOWED: {
944
+ readonly code: "FIELD_NOT_ALLOWED";
945
+ message: string;
946
+ };
947
+ ASYNC_VALIDATION_NOT_SUPPORTED: {
948
+ readonly code: "ASYNC_VALIDATION_NOT_SUPPORTED";
949
+ message: string;
950
+ };
951
+ VALIDATION_ERROR: {
952
+ readonly code: "VALIDATION_ERROR";
953
+ message: string;
954
+ };
955
+ MISSING_FIELD: {
956
+ readonly code: "MISSING_FIELD";
957
+ message: string;
958
+ };
959
+ METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: {
960
+ readonly code: "METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED";
961
+ message: string;
962
+ };
963
+ BODY_MUST_BE_AN_OBJECT: {
964
+ readonly code: "BODY_MUST_BE_AN_OBJECT";
965
+ message: string;
966
+ };
967
+ PASSWORD_ALREADY_SET: {
968
+ readonly code: "PASSWORD_ALREADY_SET";
969
+ message: string;
970
+ };
971
+ };
972
+ };
973
+ };